| | |
| | | <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 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> |
| | |
| | | import { inspectRecordApi } from '/@/api/intellectInspectSystem/inspectRecord'; |
| | | interface dataState { |
| | | title: string; |
| | | taskAndQuotas: [], |
| | | taskAndQuotas: []; |
| | | pointTitle: string; |
| | | activeName: string; |
| | | inspectPointConfirm: boolean; |
| | |
| | | regionUuid: string | null; |
| | | rfidId: number | null; |
| | | quotaId: number | null; |
| | | quotaUnit: number | null; |
| | | quotaUnit: string | null; |
| | | reportResult: number | null; |
| | | secondReferenceResult: number | null; |
| | | execSequence: number | null; |
| | |
| | | } |
| | | }; |
| | | |
| | | 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)); |
| | |
| | | data.ifShowInspectTaskDialog = true; |
| | | data.inspectPointConfirm = false; |
| | | data.title = '查看巡检记录'; |
| | | getSum(item.id) |
| | | getSum(item.id); |
| | | inspectRecordApi() |
| | | .getInspectRecordById({ id: item.id, uuid: item.uuid }) |
| | | .then((res) => { |
| | |
| | | // 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 === '新增巡检点') { |