文件名从 src/views/intellectInspect/inspectIndex2/index.vue 修改 |
| | |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <!-- <div class="list">--> |
| | | <!-- <div class="list-tit">--> |
| | | <!-- <span class="w60">任务信息</span>--> |
| | | <!-- <span class="w20">任务状态</span>--> |
| | | <!-- <span class="w20">操作</span>--> |
| | | <!-- </div>--> |
| | | <!-- <div class="cardTop" v-for="(item, index) in tableData" :key="index">--> |
| | | <!-- <div class="l-info">--> |
| | | <!-- <span class="place">{{ item.taskName }},</span>--> |
| | | <!-- <p v-if="item.execUserName == null">该任务暂无人认领</p>--> |
| | | <!-- <p v-else>--> |
| | | <!-- <span class="time">{{ item.taskStatus == 2 ? item.startTime : item.endTime }}</span>由<span class="name">{{ item.execUserName }}</span--> |
| | | <!-- >进行的巡检任务--> |
| | | <!-- </p>--> |
| | | <!-- </div>--> |
| | | <!-- <div class="m-info">--> |
| | | <!-- 任务状态:<span :class="item.taskStatus == 1 ? 'grey' : item.taskStatus == 2 ? 'green' : item.taskStatus == 3 ? 'blue' : 'red'">{{ item.taskStatus == 1 ? '待巡检' : item.taskStatus == 2 ? '巡检中' : item.taskStatus == 3 ? '已巡检' : '超期未巡检' }}</span>--> |
| | | <!-- </div>--> |
| | | <!-- <div class="r-info">--> |
| | | <!-- <el-button type="text" v-if="item.taskStatus == 2" @click="toLine(item)" size="small">查看实时巡检</el-button>--> |
| | | <!-- <el-button type="text" v-else class="reviewBtn" @click="toDetails('查看', item)" size="small">查看巡检记录</el-button>--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <!-- <div class="pageBtn">--> |
| | | <!-- <el-pagination v-model:currentPage="pageIndex" v-model:page-size="pageSize" :page-sizes="[10, 15]" small="false" background layout="total, sizes, prev, pager, next, jumper" :total="totalSize" @size-change="handleSizeChange" @current-change="handleCurrentChange" />--> |
| | | <!-- </div>--> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | <div class="chart"> |
| | | <el-table :data="unusualData" stripe border :header-cell-style="{ background: '#fafafa' }"> |
| | | <el-table-column prop="num" label="工单编号" align="center"/> |
| | | <el-table-column prop="spot" label="异常巡检点" align="center"/> |
| | | <el-table-column prop="time" label="巡检(发现)时间" align="center"/> |
| | | <el-table-column prop="job" label="所属巡检任务" align="center"/> |
| | | <el-table-column prop="area" label="设备/区域名称" align="center"/> |
| | | <el-table-column prop="refer" label="正常参考值" align="center"/> |
| | | <el-table-column prop="real" label="实际巡检值" align="center"/> |
| | | <el-table-column prop="name" label="隐患处置人" align="center"/> |
| | | <el-table-column prop="phone" label="电话" align="center"/> |
| | | <el-table-column prop="status" label="处置状态" align="center"/> |
| | | <el-table-column prop="describe" label="处置描述反馈" align="center"/> |
| | | <el-table-column prop="workOrderNum" label="工单编号" align="center"/> |
| | | <el-table-column prop="pointCode" label="异常巡检点" align="center"/> |
| | | <el-table-column prop="occurrenceTime" label="巡检(发现)时间" align="center"/> |
| | | <el-table-column prop="taskName" label="所属巡检任务" align="center"/> |
| | | <el-table-column prop="regionName" label="设备/区域名称" align="center"/> |
| | | <el-table-column prop="refer" label="正常参考值" align="center"> |
| | | <template #default="scope"> |
| | | <span>{{scope.row.dataReportType==1?(scope.row.firstReferenceValue==0?'正常':'异常'):scope.row.dataReportType==2?((scope.row.secondReferenceSignscope==1?'>':'>=') + scope.row.secondReferenceValue + ',' + (scope.row.thirdReferenceSign==3?'<':'<=') + scope.row.thirdReferenceValue): ((scope.row.firstReferenceValue==0?'正常':'异常') + ',' + ((scope.row.secondReferenceSignscope==1?'>':'>=') + scope.row.secondReferenceValue + ',' + (scope.row.thirdReferenceSign==3?'<':'<=') + scope.row.thirdReferenceValue))}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="实际巡检值" align="center"> |
| | | <template #default="scope"> |
| | | <span>{{scope.row.dataReportType==1?(scope.row.firstReferenceResult==0?'正常':'异常'):scope.row.dataReportType==2?scope.row.secondReferenceResult:(scope.row.firstReferenceResult==0?'正常':'异常') + ',' + scope.row.secondReferenceResult}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="hiddenDangerHandlerName" label="隐患处置人" align="center"/> |
| | | <el-table-column prop="hiddenDangerHandlerPhone" label="电话" align="center"/> |
| | | <el-table-column prop="handlerStatus" label="处置状态" align="center"> |
| | | <template #default="scope"> |
| | | <el-tag :type="scope.row.handlerStatus == 2?'danger':(scope.row.handlerStatus == 1 || scope.row.handlerStatus == 3)?'':'success'">{{scope.row.handlerStatus == 1?'待响应':scope.row.handlerStatus == 2?'标记误报':scope.row.handlerStatus == 3?'自查处理中':scope.row.handlerStatus == 4?'已移交上报':scope.row.handlerStatus == 5?'待验收':'已完成'}}</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="handlerDesc" label="处置描述反馈" align="center"/> |
| | | <el-table-column label="操作" align="center" width="180" fixed="right"> |
| | | <template #default="scope"> |
| | | <el-button type="text" size="small" class="checkBtn">验收</el-button> |
| | | <el-button type="text" size="small" class="reviewBtn">查看现场照片</el-button> |
| | | <el-button v-if="scope.row.handlerStatus == 5" type="text" size="small" class="checkBtn" @click="acceptance(scope.row)">验收</el-button> |
| | | <el-button v-if="scope.row.handlerStatus !==1 && scope.row.handlerStatus !==2" type="text" size="small" class="reviewBtn" @click="openPhoto(scope.row)">查看现场照片</el-button> |
| | | <el-button v-if="scope.row.handlerStatus ==1" type="text" size="small" @click="remark(scope.row)">标记误报</el-button> |
| | | <span v-if="scope.row.handlerStatus == 2" style="color: red">标记误报</span> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <el-dialog |
| | | v-model="dialogVisible" |
| | | :title= '"工单编号:" + workNum' |
| | | width="60%" |
| | | :before-close="handleClose" |
| | | center |
| | | > |
| | | <div style="margin-bottom: 20px"> |
| | | <div style="margin-bottom: 10px">处置前:</div> |
| | | <div v-if="beImgs && beImgs.length>0"> |
| | | <el-image v-for="(item,index) in beImgs" :key="index" style="width: 100px; height: 100px" :src="item" fit="fill" /> |
| | | </div> |
| | | <div v-else> |
| | | 无照片信息 |
| | | </div> |
| | | </div> |
| | | <div> |
| | | <div style="margin-bottom: 10px">处置后</div> |
| | | <div v-if="afImgs && beImgs.length>0"> |
| | | <el-image v-for="(item,index) in afImgs" :key="index" style="width: 100px; height: 100px" :src="item" fit="fill" /> |
| | | </div> |
| | | <div v-else> |
| | | 无照片信息 |
| | | </div> |
| | | </div> |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <el-button type="primary" @click="dialogVisible = false"> |
| | | 确认 |
| | | </el-button> |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | | <inspect-record-dialog ref="inspectRecordDialogRef" @refreshInspectRecord="getInspectRecord"></inspect-record-dialog> |
| | | <inspect-list ref="inspectListRef"></inspect-list> |
| | | <unusual-list ref="unusualListRef"></unusual-list> |
| | | <unusual-list ref="unusualListRef" @refreshRecord="getListExcepOrder"></unusual-list> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import { Session } from '/@/utils/storage'; |
| | | import { Edit, View, Plus, Delete, Refresh, Search, Download } from '@element-plus/icons-vue'; |
| | | import { ElTable } from 'element-plus'; |
| | | import { FormInstance, FormRules, ElMessage } from 'element-plus'; |
| | | import { FormInstance, FormRules, ElMessage, ElMessageBox } from 'element-plus'; |
| | | import { inspectRecordApi } from '/@/api/intellectInspectSystem/inspectRecord'; |
| | | import { inspectIndexApi } from '/@/api/intellectInspectSystem/inspectIndex' |
| | | import { useRouter } from 'vue-router'; |
| | |
| | | chartStatus:boolean; |
| | | period: string; |
| | | isFull:boolean; |
| | | themeColor:string |
| | | themeColor:string; |
| | | dialogVisible:boolean; |
| | | workNum: string; |
| | | beImgs: []; |
| | | afImgs: [] |
| | | } |
| | | interface type { |
| | | id: number; |
| | |
| | | const state = reactive<stateType>({ |
| | | isFull: false, |
| | | themeColor: '#333', |
| | | workNum: '', |
| | | beImgs: [], |
| | | afImgs: [], |
| | | pageIndex: 1, |
| | | pageSize: 5, |
| | | totalSize: 0, |
| | | tableData: [], |
| | | unusualData: [ |
| | | { |
| | | num: '202302280001', |
| | | spot: '70736', |
| | | time: '2023-03-02 17:44:25', |
| | | job: '甲醇车间XXX巡检', |
| | | area: 'xxx设备', |
| | | refer: '8.9~10Mpa', |
| | | real: '15.6Mpa', |
| | | name: '黄公子', |
| | | phone: '15261806176', |
| | | status: '待验收', |
| | | describe: '更换法兰更换法兰更换法兰更换法兰更换法兰更换法兰' |
| | | }, |
| | | { |
| | | num: '202302280001', |
| | | spot: '70736', |
| | | time: '2023-03-02 17:44:25', |
| | | job: '甲醇车间XXX巡检', |
| | | area: 'xxx设备', |
| | | refer: '8.9~10Mpa', |
| | | real: '15.6Mpa', |
| | | name: '黄公子', |
| | | phone: '15261806176', |
| | | status: '待验收', |
| | | describe: '更换法兰更换法兰更换法兰更换法兰更换法兰更换法兰' |
| | | }, |
| | | { |
| | | num: '202302280001', |
| | | spot: '70736', |
| | | time: '2023-03-02 17:44:25', |
| | | job: '甲醇车间XXX巡检', |
| | | area: 'xxx设备', |
| | | refer: '8.9~10Mpa', |
| | | real: '15.6Mpa', |
| | | name: '黄公子', |
| | | phone: '15261806176', |
| | | status: '待验收', |
| | | describe: '更换法兰更换法兰更换法兰更换法兰更换法兰更换法兰' |
| | | }, |
| | | { |
| | | num: '202302280001', |
| | | spot: '70736', |
| | | time: '2023-03-02 17:44:25', |
| | | job: '甲醇车间XXX巡检', |
| | | area: 'xxx设备', |
| | | refer: '8.9~10Mpa', |
| | | real: '15.6Mpa', |
| | | name: '黄公子', |
| | | phone: '15261806176', |
| | | status: '待验收', |
| | | describe: '更换法兰更换法兰更换法兰更换法兰更换法兰更换法兰' |
| | | } |
| | | ], |
| | | unusualData: [], |
| | | unchecked: null, |
| | | unusual: null, |
| | | chartStatus: true, |
| | |
| | | ], |
| | | classGroupList: [], |
| | | quotaList: [], |
| | | inspectPointAllList: [] |
| | | inspectPointAllList: [], |
| | | dialogVisible: false |
| | | }); |
| | | const inspectRecordDialogRef = ref(); |
| | | const inspectListRef = ref(); |
| | |
| | | initSbtj() |
| | | }); |
| | | const toFullscreen =()=>{ |
| | | console.log(state.isFull,'quanp',state.themeColor) |
| | | // console.log(state.isFull,'quanp',state.themeColor) |
| | | const element = document.getElementById('bigScreen') |
| | | if (!screenfull.isEnabled) { |
| | | ElMessage.warning('暂不不支持全屏'); |
| | |
| | | } |
| | | const checkAllList =()=>{ |
| | | unusualListRef.value.showUnusualList() |
| | | } |
| | | const acceptance =(row:object)=>{ |
| | | ElMessageBox.confirm( |
| | | '确认完成验收并结束工单?', |
| | | '完成验收', |
| | | { |
| | | confirmButtonText: '确认', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | center: true |
| | | } |
| | | ) |
| | | .then(async() => { |
| | | const res = await inspectIndexApi().acceptedStatus({id: row.id}); |
| | | if (res.data.code === '200') { |
| | | getListExcepOrder(); |
| | | ElMessage({ |
| | | type: 'success', |
| | | message: '验收成功', |
| | | }) |
| | | } else { |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: '验收失败' |
| | | }); |
| | | } |
| | | }) |
| | | .catch(() => { |
| | | ElMessage({ |
| | | type: 'info', |
| | | message: '取消验收', |
| | | }) |
| | | }) |
| | | } |
| | | const remark =(row:object)=>{ |
| | | ElMessageBox.confirm( |
| | | '确认是否标记误报?', |
| | | '标记误报', |
| | | { |
| | | confirmButtonText: '确认', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | center: true |
| | | } |
| | | ) |
| | | .then(async() => { |
| | | const res = await inspectIndexApi().falseAlarmStatus({id: row.id}); |
| | | if (res.data.code === '200') { |
| | | getListExcepOrder(); |
| | | ElMessage({ |
| | | type: 'success', |
| | | message: '标记误报成功', |
| | | }) |
| | | } else { |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: '标记误报失败' |
| | | }); |
| | | } |
| | | }) |
| | | .catch(() => { |
| | | ElMessage({ |
| | | type: 'info', |
| | | message: '取消标记', |
| | | }) |
| | | }) |
| | | } |
| | | const openPhoto = async(row)=>{ |
| | | state.dialogVisible = true |
| | | state.workNum = row.workOrderNum |
| | | const res = await inspectIndexApi().getListImages({id: row.id}); |
| | | if (res.data.code === '200') { |
| | | state.beImgs = res.data.data.beforeImages |
| | | state.afImgs = res.data.data.afterImages |
| | | } else { |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: '图片获取失败' |
| | | }); |
| | | } |
| | | } |
| | | type EChartsOption = echarts.EChartsOption |
| | | const initXjLine =()=>{ |
| | |
| | | }; |
| | | // 分页获取 |
| | | const getListExcepOrder = async () => { |
| | | const data = { pageSize: state.pageSize, pageIndex: state.pageIndex }; |
| | | const data = { pageSize: 4, pageIndex: state.pageIndex }; |
| | | let res = await inspectIndexApi().getListExcepOrderByPage(data); |
| | | if (res.data.code === '200') { |
| | | console.log(res.data,'res') |
| | | state.unusualData = JSON.parse(JSON.stringify(res.data.data.records)) |
| | | } else { |
| | | ElMessage({ |
| | | type: 'warning', |
| | |
| | | toFullscreen, |
| | | checkAllRecord, |
| | | checkAllList, |
| | | acceptance, |
| | | remark, |
| | | openPhoto, |
| | | toLine, |
| | | toOverTime, |
| | | toDetails, |