新增设备调试页面

This commit is contained in:
GGJ
2024-01-10 10:10:44 +08:00
parent d0525a90a3
commit fa31b14088
3 changed files with 67 additions and 5 deletions

View File

@@ -0,0 +1,48 @@
<template>
<div class="default-main">
<TableHeader datePicker></TableHeader>
<Table ref="tableRef" :isGroup="true" />
</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({
name: 'govern/log/operation'
})
const tableStore = new TableStore({
url: '/cs-device-boot/cslog/queryLog',
method: 'POST',
column: [
{ title: '操作日期', field: 'createTime', align: 'center' },
{ title: '操作描述', field: 'operate', align: 'center', width: '300' },
{ title: '用户名称', field: 'userName', align: 'center' },
{ title: '更新时间', field: 'updateTime', align: 'center' },
{ title: '失败原因', field: 'failReason', align: 'center' },
{ title: '状态', field: 'result', align: 'center' },
{ title: '登录名', field: 'loginName', align: 'center' }
],
loadCallback: () => {
tableStore.table.data.forEach((item: any) => {
item.failReason = item.failReason || '/'
item.result = item.result === 1 ? '成功' : '失败'
item.loginName = item.loginName || '/'
})
}
})
provide('tableStore', tableStore)
tableStore.table.params.searchState = 0
tableStore.table.params.sortBy = ''
tableStore.table.params.orderBy = ''
onMounted(() => {
tableStore.index()
})
const addMenu = () => {}
</script>