From 20b0ce2db27b64a60de60aee05dedd448099e330 Mon Sep 17 00:00:00 2001 From: 马宇豪 <978517621@qq.com> Date: 星期一, 08 七月 2024 10:12:16 +0800 Subject: [PATCH] xiugai --- src/views/intellectInspect/inspectIndex/components/inspectRecordDialog.vue | 42 +++++++++++++++++++++++++----------------- 1 files changed, 25 insertions(+), 17 deletions(-) diff --git a/src/views/intellectInspect/inspectIndex/components/inspectRecordDialog.vue b/src/views/intellectInspect/inspectIndex/components/inspectRecordDialog.vue index f08ccda..732952b 100644 --- a/src/views/intellectInspect/inspectIndex/components/inspectRecordDialog.vue +++ b/src/views/intellectInspect/inspectIndex/components/inspectRecordDialog.vue @@ -43,11 +43,18 @@ <el-tabs class="active" v-model="activeName"> <el-tab-pane label="巡检链" name="inspectChain"> <el-table :data="inspectTaskForm.points" fit style="width: 100%"> - <el-table-column type="index" label="序号"/> - <el-table-column prop="point" label="巡检点" show-overflow-tooltip align="center"></el-table-column> - <el-table-column prop="region" label="所属设备" show-overflow-tooltip align="center"></el-table-column> - <el-table-column prop="rfid" label="RFID" show-overflow-tooltip align="center"></el-table-column> - <el-table-column prop="quotaContent" label="指标作业" show-overflow-tooltip align="center"></el-table-column> + <el-table-column type="index" label="序号" /> + <el-table-column prop="point" label="巡检点" show-overflow-tooltip align="center"/> + <el-table-column prop="region" label="所属设备" show-overflow-tooltip align="center"/> + <el-table-column prop="rfid" label="RFID" show-overflow-tooltip align="center"/> + <el-table-column prop="quotaContent" label="指标名称" show-overflow-tooltip align="center"/> + <el-table-column prop="rfidPosition" label="定位状态" show-overflow-tooltip align="center"> + <template #default="scope"> + <div :style="{ color: scope.row.rfidPosition == 1 ? '#ff0000' : '#409eff' }"> + {{ scope.row.rfidPosition == 1 ? '未定位' : scope.row.rfidPosition == 2 ? '已定位' : '--' }} + </div> + </template> + </el-table-column> <el-table-column prop="secondReferenceResult" label="记录值" show-overflow-tooltip align="center"> <template #default="scope"> <div :style="{ color: scope.row.reportResult == 1 ? '#ff0000' : '#409eff' }"> @@ -55,11 +62,11 @@ </div> </template> </el-table-column> - <el-table-column prop="quotaUnit" label="指标单位" show-overflow-tooltip align="center"></el-table-column> + <el-table-column prop="quotaUnit" label="指标单位" show-overflow-tooltip align="center"/> <el-table-column prop="reportResult" label="结果" show-overflow-tooltip align="center"> <template #default="scope"> <div :style="{ color: scope.row.reportResult == 1 ? '#ff0000' : '#409eff' }"> - {{ scope.row.reportResult == 0 ? '正常' : scope.row.reportResult == 1 ? '存在异常' : '无' }} + {{ scope.row.reportResult == 0 ? '正常' : scope.row.reportResult == 1 ? '存在异常' : scope.row.reportResult == 2 ? '备' : '无' }} </div> </template> </el-table-column> @@ -93,7 +100,7 @@ import { inspectRecordApi } from '/@/api/intellectInspectSystem/inspectRecord'; interface dataState { title: string; - taskAndQuotas: [], + taskAndQuotas: []; pointTitle: string; activeName: string; inspectPointConfirm: boolean; @@ -151,7 +158,7 @@ regionUuid: string | null; rfidId: number | null; quotaId: number | null; - quotaUnit: number | null; + quotaUnit: string | null; reportResult: number | null; secondReferenceResult: number | null; execSequence: number | null; @@ -223,7 +230,8 @@ ], firstReferenceValueList: [ { id: 0, name: '正常' }, - { id: 1, name: '存在异常' } + { id: 1, name: '存在异常' }, + { id: 2, name: '备' } ], secondReferenceSignList: [ { id: 1, name: '>' }, @@ -266,7 +274,7 @@ } }; - const showInspectRecordDialog = (type: string, item: { id: number; uuid: string; execUserName:string }, workTypeList: [], department: [], timeType: [], classGroupList: [], quotaList: [], inspectPointAllList: []) => { + const showInspectRecordDialog = (type: string, item: { id: number; uuid: string; execUserName: string }, workTypeList: [], department: [], timeType: [], classGroupList: [], quotaList: [], inspectPointAllList: []) => { data.quotaList = JSON.parse(JSON.stringify(quotaList)); data.timeList = JSON.parse(JSON.stringify(timeType)); data.inspectPointAllList = JSON.parse(JSON.stringify(inspectPointAllList)); @@ -276,7 +284,7 @@ data.ifShowInspectTaskDialog = true; data.inspectPointConfirm = false; data.title = '查看巡检记录'; - getSum(item.id) + getSum(item.id); inspectRecordApi() .getInspectRecordById({ id: item.id, uuid: item.uuid }) .then((res) => { @@ -296,18 +304,18 @@ // return row.secondReferenceResult==0?'正常':(row.reportResult==1?'异常':'无') // } - const getSum = async (id) =>{ - let res = await inspectRecordApi().getInspectRecordSum({id:id}); + const getSum = async (id: number) => { + let res = await inspectRecordApi().getInspectRecordSum({ id: id }); if (res.data.code === '200') { - data.taskAndQuotas = JSON.parse(JSON.stringify(res.data.data.taskAndQuotas)) - console.log(data.taskAndQuotas,'666666666666') + data.taskAndQuotas = JSON.parse(JSON.stringify(res.data.data.taskAndQuotas)); + console.log(data.taskAndQuotas, '666666666666'); } else { ElMessage({ type: 'warning', message: res.data.msg }); } - } + }; const submitInspectPoint = async () => { if (data.title === '新增巡检任务' && data.pointTitle === '新增巡检点') { -- Gitblit v1.9.2