This commit is contained in:
sjl
2025-01-17 14:57:17 +08:00
parent ce47831992
commit 5738594be2
4 changed files with 59 additions and 50 deletions

View File

@@ -65,9 +65,9 @@ import ImportExcel from "@/components/ImportExcel/index.vue";
import {useDownload} from "@/hooks/useDownload";
import {exportPqDev} from "@/api/device/device";
defineOptions({
name: 'planList'
})
// defineOptions({
// name: 'planList'
// })
const dictStore = useDictStore()
const openDeviceView = ref()
const openSourceView = ref()
@@ -115,6 +115,51 @@ const columns = reactive<ColumnProps<Plan.ReqPlan>[]>([
width: 220,
search: { el: 'input' },
},
{
prop: 'testState',
label: '检测状态',
width: 120,
enum:dictTestState,
search: { el:'select',props: { filterable: true }},
fieldNames: { label: 'label', value: 'id' },
render: scope => {
return (
scope.row.testState === 0 ? '未检' : scope.row.testState === 1 ? '检测中' : '检测完成'
)
},
},
{
prop: 'reportState',
label: '检测报告状态',
width: 120,
enum:dictReportState,
search: { el: 'select', props: { filterable: true } },
fieldNames: { label: 'label', value: 'id' },
render: scope => {
return (
scope.row.reportState === 0 ? '未生成' : scope.row.reportState === 1 ? '部分生成' : '全部生成'
)
},
},
{
prop: 'result',
label: '检测结果',
width: 120,
enum:dictResult,
search: { el: 'select', props: { filterable: true } },
fieldNames: { label: 'label', value: 'id' },
render: scope => {
console.log('检测结果',scope.row.result)
return (
scope.row.result === 0 ? '不符合' : scope.row.result === 1 ? '符合' : '/'
)
},
},
{
prop: 'createTime',
label: '创建时间',
width: 200,
},
{
prop: 'sourceName',
label: '检测源',
@@ -194,50 +239,7 @@ const columns = reactive<ColumnProps<Plan.ReqPlan>[]>([
return dictItem ? dictItem.name : '/' // 如果找到匹配的项,返回对应的 name
},
},
{
prop: 'testState',
label: '检测状态',
width: 120,
enum:dictTestState,
search: { el:'select',props: { filterable: true }},
fieldNames: { label: 'label', value: 'id' },
render: scope => {
return (
scope.row.testState === 0 ? '未检' : scope.row.testState === 1 ? '检测中' : '检测完成'
)
},
},
{
prop: 'reportState',
label: '检测报告状态',
width: 120,
enum:dictReportState,
search: { el: 'select', props: { filterable: true } },
fieldNames: { label: 'label', value: 'id' },
render: scope => {
return (
scope.row.reportState === 0 ? '未生成' : scope.row.reportState === 1 ? '部分生成' : '全部生成'
)
},
},
{
prop: 'result',
label: '检测结果',
width: 120,
enum:dictResult,
search: { el: 'select', props: { filterable: true } },
fieldNames: { label: 'label', value: 'id' },
render: scope => {
return (
scope.row.result === 0 ? '不符合' : scope.row.result === 1 ? '符合' : '/'
)
},
},
{
prop: 'createTime',
label: '创建时间',
width: 200,
},
{ prop: 'operation', label: '操作', fixed: 'right', width: 200 },
])