新增设备调试页面
This commit is contained in:
@@ -69,7 +69,7 @@ const init = async () => {
|
|||||||
icon: 'fa fa-dashboard',
|
icon: 'fa fa-dashboard',
|
||||||
menu_type: 'tab',
|
menu_type: 'tab',
|
||||||
url: '',
|
url: '',
|
||||||
component: '/src/views/Event-boot/Region/overview.vue',
|
component: '/src/views/govern/log/debug.vue',
|
||||||
keepalive: 'dashboard',
|
keepalive: 'dashboard',
|
||||||
extend: 'none',
|
extend: 'none',
|
||||||
children: []
|
children: []
|
||||||
|
|||||||
53
src/views/govern/log/debug.vue
Normal file
53
src/views/govern/log/debug.vue
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
<template>
|
||||||
|
<div class="default-main">
|
||||||
|
<TableHeader datePicker>
|
||||||
|
<template v-slot:select>
|
||||||
|
<el-form-item label="设备名称">
|
||||||
|
<el-input v-model="tableStore.table.params.searchValue" placeholder="请输入设备名称" />
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
</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/debug'
|
||||||
|
})
|
||||||
|
const tableStore = new TableStore({
|
||||||
|
url: '/cs-device-boot/process/queryPage',
|
||||||
|
method: 'POST',
|
||||||
|
column: [
|
||||||
|
{ title: '设备名称', field: 'devName', align: 'center' },
|
||||||
|
{ title: '操作用户', field: 'operatorName', align: 'center' },
|
||||||
|
{ title: '操作内容', field: 'processName', align: 'center', width: '300' },
|
||||||
|
{ title: '开始时间', field: 'startTime', align: 'center' },
|
||||||
|
{ title: '结束时间', field: 'endTime', 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 = ''
|
||||||
|
tableStore.table.params.searchValue = ''
|
||||||
|
onMounted(() => {
|
||||||
|
tableStore.index()
|
||||||
|
})
|
||||||
|
|
||||||
|
const addMenu = () => {}
|
||||||
|
</script>
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="default-main">
|
<div class="default-main">
|
||||||
<TableHeader datePicker></TableHeader>
|
<TableHeader datePicker></TableHeader>
|
||||||
<Table ref="tableRef" />
|
<Table ref="tableRef" :isGroup="true" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
@@ -12,20 +12,28 @@ import Table from '@/components/table/index.vue'
|
|||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'govern/log/push'
|
name: 'govern/log/operation'
|
||||||
})
|
})
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/cs-device-boot/cslog/queryLog',
|
url: '/cs-device-boot/cslog/queryLog',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{ title: '操作日期', field: 'createTime', align: 'center' },
|
{ title: '操作日期', field: 'createTime', align: 'center' },
|
||||||
{ title: '操作描述', field: 'operate', align: 'center', width: '400' },
|
{ title: '操作描述', field: 'operate', align: 'center', width: '300' },
|
||||||
{ title: '用户名称', field: 'userName', align: 'center' },
|
{ title: '用户名称', field: 'userName', align: 'center' },
|
||||||
{ title: '更新时间', field: 'updateTime', align: 'center' },
|
{ title: '更新时间', field: 'updateTime', align: 'center' },
|
||||||
{ title: '失败原因', field: 'failReason', align: 'center' },
|
{ title: '失败原因', field: 'failReason', align: 'center' },
|
||||||
{ title: '状态', field: 'result', align: 'center' },
|
{ title: '状态', field: 'result', align: 'center' },
|
||||||
{ title: '登录名', field: 'loginName', 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)
|
provide('tableStore', tableStore)
|
||||||
@@ -35,5 +43,6 @@ tableStore.table.params.orderBy = ''
|
|||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
|
|
||||||
const addMenu = () => {}
|
const addMenu = () => {}
|
||||||
</script>
|
</script>
|
||||||
Reference in New Issue
Block a user