样式修改
This commit is contained in:
@@ -48,11 +48,10 @@ export function getOnlineUsers(data:any) {
|
||||
});
|
||||
}
|
||||
//获取表空间大小
|
||||
export function getMemoInfo(data:any) {
|
||||
export function getMemoInfo() {
|
||||
return createAxios({
|
||||
url: "/system-boot/audit/getMemoInfo",
|
||||
method: "post",
|
||||
data,
|
||||
});
|
||||
}
|
||||
export function getSysConfig() {
|
||||
|
||||
@@ -2,45 +2,6 @@
|
||||
<div class="default-main">
|
||||
<div v-show="flg">
|
||||
<TableHeader datePicker showExport ref="TableHeaderRef">
|
||||
<template v-slot:select>
|
||||
<el-form :inline="true" label-width="90px" class="">
|
||||
<el-form-item label="用户名:">
|
||||
<el-select v-model="tableStore.table.params.loginName" placeholder="用户名" clearable
|
||||
filterable>
|
||||
<el-option v-for="item in userName" :key="item.id" :label="item.loginName"
|
||||
:value="item.loginName"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="事件类型:">
|
||||
<el-select v-model="tableStore.table.params.type" placeholder="事件类型" clearable>
|
||||
<el-option v-for="item in eventType" :key="item.id" :label="item.label"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="操作类型:">
|
||||
<el-select v-model="tableStore.table.params.operateType" placeholder="操作类型" clearable>
|
||||
<el-option v-for="item in operationType" :key="item.value" :label="item.value"
|
||||
:value="item.value"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="操作结果:">
|
||||
<el-select v-model="tableStore.table.params.result" placeholder="操作结果" clearable>
|
||||
<el-option v-for="item in resultList" :key="item.id" :label="item.label"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button type="primary" @click="backups">文件备份</el-button>
|
||||
<el-button type="primary" @click="details">统计</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
</div>
|
||||
<div v-if="!flg">
|
||||
<Statistics @back="onSubmit" ref="statistics" />
|
||||
<!-- <TableHeader datePicker showExport :showReset="false" ref="TableHeaderRef">
|
||||
<template v-slot:select>
|
||||
<el-form :inline="true" label-width="90px" class="">
|
||||
<el-form-item label="用户名:">
|
||||
@@ -78,13 +39,27 @@
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="操作结果:">
|
||||
<el-select v-model="tableStore.table.params.result" placeholder="操作结果" clearable>
|
||||
<el-option
|
||||
v-for="item in resultList"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button type="primary" @click="back">返回</el-button>
|
||||
<el-button type="primary" @click="backups" :icon="DocumentCopy">文件备份</el-button>
|
||||
<el-button type="primary" @click="details" :icon="Tickets">统计</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef_1" /> -->
|
||||
<Table ref="tableRef" />
|
||||
</div>
|
||||
<div v-if="!flg">
|
||||
<Statistics @back="onSubmit" ref="statistics" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -93,17 +68,10 @@ import { ref, onMounted, provide, nextTick } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import {
|
||||
getAllUserList,
|
||||
getAuditLog,
|
||||
censusAuditLog,
|
||||
logFileWriter,
|
||||
recoverLogFile,
|
||||
getMemoInfo,
|
||||
getSysConfig
|
||||
} from '@/api/auditManage/auditList'
|
||||
import { getAllUserList, logFileWriter, recoverLogFile, getMemoInfo, getSysConfig } from '@/api/auditManage/auditList'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import Statistics from './statistics.vue'
|
||||
import { DocumentCopy, Tickets } from '@element-plus/icons-vue'
|
||||
|
||||
defineOptions({
|
||||
name: 'BusinessAdministrator/Audit/Operations/Management'
|
||||
@@ -159,13 +127,22 @@ const tableStore: any = new TableStore({
|
||||
method: 'POST',
|
||||
column: [
|
||||
{
|
||||
field: 'create_time', title: '操作时间', sortable: true,
|
||||
field: 'create_time',
|
||||
title: '操作时间',
|
||||
sortable: true,
|
||||
formatter: (row: any) => {
|
||||
return row.row.time
|
||||
}
|
||||
},
|
||||
{ field: 'userName', title: '操作人员' },
|
||||
{ field: 'operate', title: '操作类型', sortable: true },
|
||||
{
|
||||
field: 'operate_type',
|
||||
title: '操作类型',
|
||||
sortable: true,
|
||||
formatter: (row: any) => {
|
||||
return row.row.operate
|
||||
}
|
||||
},
|
||||
{ field: 'describe', title: '事件描述' },
|
||||
{ field: 'type', title: '事件类型', sortable: true },
|
||||
{ field: 'result', title: '操作结果', sortable: true },
|
||||
@@ -189,13 +166,10 @@ tableStore.table.params.pageSize = 100
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
onMounted(() => {
|
||||
// tableStore.index()
|
||||
search()
|
||||
onSubmit()
|
||||
})
|
||||
|
||||
|
||||
|
||||
//下拉框查询
|
||||
const search = () => {
|
||||
getAllUserList().then(res => {
|
||||
@@ -214,12 +188,11 @@ const details = () => {
|
||||
const onSubmit = async () => {
|
||||
flg.value = true
|
||||
await tableStore.index()
|
||||
|
||||
}
|
||||
|
||||
// 查询日志大小
|
||||
const getLogSize = () => {
|
||||
getMemoInfo({}).then(res => {
|
||||
getMemoInfo().then(res => {
|
||||
getSysConfig().then(re => {
|
||||
if (res.data > re.data.logSize) {
|
||||
ElMessage({
|
||||
@@ -234,9 +207,9 @@ const getLogSize = () => {
|
||||
}
|
||||
|
||||
// 备份
|
||||
const backups = async() => {
|
||||
const backups = async () => {
|
||||
loading.value = true
|
||||
await logFileWriter({}).then(res => { })
|
||||
await logFileWriter({}).then(res => {})
|
||||
setTimeout(() => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
@@ -249,7 +222,7 @@ const backups = async() => {
|
||||
// 恢复
|
||||
const restore = () => {
|
||||
loading.value = true
|
||||
recoverLogFile({}).then(res => { })
|
||||
recoverLogFile({}).then(res => {})
|
||||
setTimeout(() => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
|
||||
Reference in New Issue
Block a user