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