修改测试问题

This commit is contained in:
guanj
2026-01-16 15:54:16 +08:00
parent 5ceb9be9e2
commit c09e6f54dd
15 changed files with 111 additions and 50 deletions

View File

@@ -1,10 +1,14 @@
<template>
<div class="default-main">
<TableHeader datePicker>
<TableHeader datePicker showExport>
<template v-slot:select>
<el-form-item label="设备名称">
<el-input maxlength="32" show-word-limit v-model.trim="tableStore.table.params.searchValue"
placeholder="请输入设备名称" />
<el-input
maxlength="32"
show-word-limit
v-model.trim="tableStore.table.params.searchValue"
placeholder="请输入设备名称"
/>
</el-form-item>
</template>
</TableHeader>
@@ -25,7 +29,7 @@ const tableStore = new TableStore({
url: '/cs-device-boot/process/queryPage',
method: 'POST',
column: [
{
{
field: 'index',
title: '序号',
width: '80',
@@ -36,22 +40,41 @@ const tableStore = new TableStore({
{ title: '设备名称', field: 'devName', align: 'center' },
{ title: '操作用户', field: 'operatorName', align: 'center' },
{
title: '操作内容', field: 'process', align: 'center', formatter: (row: any) => {
return row.cellValue == 1 ? '设备登记' : row.cellValue == 2 ? '功能调试' : row.cellValue == 3 ? '出厂调试' : row.cellValue == 4 ? '设备投运' : ''
title: '操作内容',
field: 'process',
align: 'center',
formatter: (row: any) => {
return row.cellValue == 1
? '设备登记'
: row.cellValue == 2
? '功能调试'
: row.cellValue == 3
? '出厂调试'
: row.cellValue == 4
? '设备投运'
: ''
}
},
{ title: '开始时间', field: 'startTime', align: 'center', sortable: true },
{ title: '结束时间', field: 'endTime', align: 'center', sortable: true }
{
title: '结束时间',
field: 'endTime',
align: 'center',
sortable: true,
formatter: (row: any) => {
return row.cellValue || '/'
}
}
],
loadCallback: () => {
tableStore.table.data.forEach((item: any) => {
item.result = item.result === 1 ? '成功' : '失败'
for (let key in item) {
if (typeof item[key] !== 'number') {
item[key] = item[key] || '/'
}
}
// for (let key in item) {
// if (typeof item[key] !== 'number') {
// item[key] = item[key] || '/'
// }
// }
})
}
})
@@ -65,5 +88,5 @@ onMounted(() => {
tableStore.index()
})
const addMenu = () => { }
const addMenu = () => {}
</script>