Files
admin-govern/src/views/govern/log/opera.vue

49 lines
1.6 KiB
Vue
Raw Normal View History

2024-01-09 16:32:14 +08:00
<template>
<div class="default-main">
<TableHeader datePicker></TableHeader>
2024-01-10 10:10:44 +08:00
<Table ref="tableRef" :isGroup="true" />
2024-01-09 16:32:14 +08:00
</div>
</template>
<script setup lang="ts">
import { Plus } from '@element-plus/icons-vue'
import { ref, onMounted, provide } from 'vue'
import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue'
defineOptions({
2024-01-10 10:10:44 +08:00
name: 'govern/log/operation'
2024-01-09 16:32:14 +08:00
})
const tableStore = new TableStore({
url: '/cs-device-boot/cslog/queryLog',
method: 'POST',
column: [
2025-07-15 16:31:06 +08:00
{ title: '操作日期', field: 'createTime', align: 'center', sortable: true },
2024-01-10 10:10:44 +08:00
{ title: '操作描述', field: 'operate', align: 'center', width: '300' },
2024-01-09 16:32:14 +08:00
{ title: '用户名称', field: 'userName', align: 'center' },
2025-07-15 16:31:06 +08:00
{ title: '更新时间', field: 'updateTime', align: 'center', sortable: true },
2024-01-09 16:32:14 +08:00
{ title: '失败原因', field: 'failReason', align: 'center' },
{ title: '状态', field: 'result', align: 'center' },
{ title: '登录名', field: 'loginName', align: 'center' }
2024-01-10 10:10:44 +08:00
],
loadCallback: () => {
tableStore.table.data.forEach((item: any) => {
item.failReason = item.failReason || '/'
item.result = item.result === 1 ? '成功' : '失败'
item.loginName = item.loginName || '/'
})
}
2024-01-09 16:32:14 +08:00
})
provide('tableStore', tableStore)
tableStore.table.params.searchState = 0
tableStore.table.params.sortBy = ''
tableStore.table.params.orderBy = ''
onMounted(() => {
tableStore.index()
})
2024-01-10 10:10:44 +08:00
2024-01-09 16:32:14 +08:00
const addMenu = () => {}
</script>