修改测试问题
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<TableHeader datePicker></TableHeader>
|
||||
<TableHeader datePicker showExport></TableHeader>
|
||||
<Table ref="tableRef" :isGroup="true" />
|
||||
</div>
|
||||
</template>
|
||||
@@ -17,7 +17,8 @@ defineOptions({
|
||||
const tableStore = new TableStore({
|
||||
url: '/cs-device-boot/cslog/queryLog',
|
||||
method: 'POST',
|
||||
column: [ {
|
||||
column: [
|
||||
{
|
||||
field: 'index',
|
||||
title: '序号',
|
||||
width: '80',
|
||||
@@ -29,17 +30,41 @@ const tableStore = new TableStore({
|
||||
{ title: '操作描述', field: 'operate', align: 'center', minWidth: '300' },
|
||||
{ title: '用户名称', field: 'userName', align: 'center', minWidth: '130' },
|
||||
{ title: '更新时间', field: 'updateTime', align: 'center', sortable: true, minWidth: '150' },
|
||||
{ title: '失败原因', field: 'failReason', align: 'center', minWidth: '200' },
|
||||
{ title: '状态', field: 'result', align: 'center', minWidth: '100' },
|
||||
{ title: '登录名', field: 'loginName', align: 'center', minWidth: '120' }
|
||||
{
|
||||
title: '失败原因',
|
||||
field: 'failReason',
|
||||
align: 'center',
|
||||
minWidth: '200',
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue || '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
field: 'result',
|
||||
align: 'center',
|
||||
minWidth: '100',
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue == 1 ? '成功' : '失败'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '登录名',
|
||||
field: 'loginName',
|
||||
align: 'center',
|
||||
minWidth: '120',
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue || '/'
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
loadCallback: () => {
|
||||
tableStore.table.data.forEach((item: any) => {
|
||||
item.failReason = item.failReason || '/'
|
||||
item.result = item.result === 1 ? '成功' : '失败'
|
||||
item.loginName = item.loginName || '/'
|
||||
})
|
||||
// tableStore.table.data.forEach((item: any) => {
|
||||
// item.failReason = item.failReason || '/'
|
||||
// item.result = item.result === 1 ? '成功' : '失败'
|
||||
// item.loginName = item.loginName || '/'
|
||||
// })
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user