From ffc637544bda4872938ea66ed1c2ef67f3fb14c8 Mon Sep 17 00:00:00 2001 From: Admin <978517621@qq.com> Date: 星期三, 17 八月 2022 09:14:55 +0800 Subject: [PATCH] Default Changelist --- src/views/intellectInspect/inspectIndex/components/inspectRecordDialog.vue | 33 ++++++++++++++++++++++++++++++--- 1 files changed, 30 insertions(+), 3 deletions(-) diff --git a/src/views/intellectInspect/inspectIndex/components/inspectRecordDialog.vue b/src/views/intellectInspect/inspectIndex/components/inspectRecordDialog.vue index b199964..e065d90 100644 --- a/src/views/intellectInspect/inspectIndex/components/inspectRecordDialog.vue +++ b/src/views/intellectInspect/inspectIndex/components/inspectRecordDialog.vue @@ -41,7 +41,21 @@ <el-table-column type="index" label="序号" width="60" /> <el-table-column prop="region" label="巡检点" 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 prop="secondReferenceResult" label="参数值" show-overflow-tooltip align="center"> + <template #default="scope"> + <div :style="{color: scope.row.reportResult==1?'#ff0000':'#409eff'}"> + {{scope.row.dataReportType==1?'无':scope.row.secondReferenceResult}} + </div> + </template> + </el-table-column> <el-table-column prop="quotaUnit" label="指标单位" show-overflow-tooltip align="center"></el-table-column> + <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?'异常':'无')}} + </div> + </template> + </el-table-column> <!-- <el-table-column label="操作" width="150" align="center">--> <!-- <template #default="scope">--> <!-- <el-button size="small" text type="danger" @click="onDelCheckUnit(scope.$index, scope.row)">删除</el-button>--> @@ -125,7 +139,9 @@ regionUuid: string | null; rfidId: number | null; quotaId: number | null; - quotaUnit: string | null; + quotaUnit: number | null; + reportResult: number | null + secondReferenceResult: number |null; execSequence: number | null; dataReportType: number | null; firstReferenceValue: number | null; @@ -157,6 +173,8 @@ quotaId: null, quotaUnit: null, execSequence: null, + secondReferenceResult:null, + reportResult: null, dataReportType: null, firstReferenceValue: null, secondReferenceSign: null, @@ -215,7 +233,9 @@ rfidId: null, quotaId: null, quotaUnit: null, + reportResult: null, execSequence: null, + secondReferenceResult:null, dataReportType: null, firstReferenceValue: null, secondReferenceSign: null, @@ -246,11 +266,18 @@ data.inspectTaskForm.execDepId = res.data.data.execDepId; giveClassGroup(); data.inspectTaskForm = JSON.parse(JSON.stringify(res.data.data)); + console.log(data.inspectTaskForm,'this data') } else { } }) .catch((error) => {}); }; + + // 格式化表格数据 + // const toRefer =(row, column, cellValue, index)=>{ + // return row.secondReferenceResult==0?'正常':(row.reportResult==1?'异常':'无') + // } + const submitInspectPoint = async () => { if (data.title === '新增巡检任务' && data.pointTitle === '新增巡检点') { @@ -340,7 +367,6 @@ const giveQuotaUnit = () => { data.inspectPointForm.quotaUnit = data.quotaList.find((item) => item.id === data.inspectPointForm.quotaId)?.unit as string; }; - const submitInspectTask = () => { inspectTaskFormRef.value.validate(async (valid: Boolean) => { if (valid) { @@ -390,6 +416,7 @@ ...toRefs(data), inspectTaskFormRef, deleteFlow, + // toRefer, giveQuotaUnit, giveClassGroup, submitInspectTask, @@ -405,7 +432,7 @@ <style scoped lang="scss"> $homeNavLengh: 8; .home-container { - height: calc(100vh - 114px); + height: calc(100vh - 144px); box-sizing: border-box; overflow: hidden; .homeCard { -- Gitblit v1.9.2