2026-01-14 13:30:23 +08:00
|
|
|
<template>
|
|
|
|
|
<div class="default-main">
|
2026-01-16 15:54:16 +08:00
|
|
|
<TableHeader datePicker showExport>
|
2026-01-14 13:30:23 +08:00
|
|
|
<template v-slot:select>
|
|
|
|
|
<el-form-item label="设备名称">
|
2026-01-16 15:54:16 +08:00
|
|
|
<el-input
|
|
|
|
|
maxlength="32"
|
|
|
|
|
show-word-limit
|
|
|
|
|
v-model.trim="tableStore.table.params.searchValue"
|
|
|
|
|
placeholder="请输入设备名称"
|
|
|
|
|
/>
|
2026-01-14 13:30:23 +08:00
|
|
|
</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: [
|
2026-01-16 15:54:16 +08:00
|
|
|
{
|
2026-01-14 13:30:23 +08:00
|
|
|
field: 'index',
|
|
|
|
|
title: '序号',
|
|
|
|
|
width: '80',
|
|
|
|
|
formatter: (row: any) => {
|
|
|
|
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{ title: '设备名称', field: 'devName', align: 'center' },
|
|
|
|
|
{ title: '操作用户', field: 'operatorName', align: 'center' },
|
|
|
|
|
{
|
2026-01-16 15:54:16 +08:00
|
|
|
title: '操作内容',
|
|
|
|
|
field: 'process',
|
|
|
|
|
align: 'center',
|
|
|
|
|
formatter: (row: any) => {
|
|
|
|
|
return row.cellValue == 1
|
|
|
|
|
? '设备登记'
|
|
|
|
|
: row.cellValue == 2
|
|
|
|
|
? '功能调试'
|
|
|
|
|
: row.cellValue == 3
|
|
|
|
|
? '出厂调试'
|
|
|
|
|
: row.cellValue == 4
|
|
|
|
|
? '设备投运'
|
|
|
|
|
: ''
|
2026-01-14 13:30:23 +08:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{ title: '开始时间', field: 'startTime', align: 'center', sortable: true },
|
2026-01-16 15:54:16 +08:00
|
|
|
{
|
|
|
|
|
title: '结束时间',
|
|
|
|
|
field: 'endTime',
|
|
|
|
|
align: 'center',
|
|
|
|
|
sortable: true,
|
|
|
|
|
formatter: (row: any) => {
|
|
|
|
|
return row.cellValue || '/'
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-01-14 13:30:23 +08:00
|
|
|
],
|
|
|
|
|
|
|
|
|
|
loadCallback: () => {
|
|
|
|
|
tableStore.table.data.forEach((item: any) => {
|
|
|
|
|
item.result = item.result === 1 ? '成功' : '失败'
|
2026-01-16 15:54:16 +08:00
|
|
|
// for (let key in item) {
|
|
|
|
|
// if (typeof item[key] !== 'number') {
|
|
|
|
|
// item[key] = item[key] || '/'
|
|
|
|
|
// }
|
|
|
|
|
// }
|
2026-01-14 13:30:23 +08:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
provide('tableStore', tableStore)
|
|
|
|
|
tableStore.table.params.searchState = 0
|
|
|
|
|
tableStore.table.params.sortBy = ''
|
|
|
|
|
tableStore.table.params.orderBy = ''
|
|
|
|
|
tableStore.table.params.searchValue = ''
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
tableStore.index()
|
|
|
|
|
})
|
|
|
|
|
|
2026-01-16 15:54:16 +08:00
|
|
|
const addMenu = () => {}
|
2026-01-14 13:30:23 +08:00
|
|
|
</script>
|