diff --git a/src/views/modules/eam/eamAdmin.vue b/src/views/modules/eam/eamAdmin.vue index 5bd82f4..2b63afe 100644 --- a/src/views/modules/eam/eamAdmin.vue +++ b/src/views/modules/eam/eamAdmin.vue @@ -98,7 +98,7 @@ 部门 - + @@ -258,6 +258,7 @@ adminName:'', active:'', department:'', + departmentName:'', phone:'', tel:'', email:'', @@ -561,8 +562,10 @@ } for (let i = 0; i < this.departmentListSelections.length; i++) { this.modalData.department = this.modalData.department + ";" + this.departmentListSelections[i].deptId + this.modalData.departmentName = this.modalData.departmentName + ";" + this.departmentListSelections[i].deptName } this.modalData.department = this.modalData.department.substring(1) + this.modalData.departmentName = this.modalData.departmentName.substring(1) this.departmentModelFlag = false }, @@ -817,6 +820,7 @@ if (data && data.code === 0) { this.departmentList = data.rows this.modalData.department = '' + this.modalData.departmentName = '' this.departmentModelFlag = true; }else { this.$alert(data.msg, '错误', { diff --git a/src/views/modules/eam/eamWorkOrderForCheck.vue b/src/views/modules/eam/eamWorkOrderForCheck.vue index 69a6a52..1a3d53d 100644 --- a/src/views/modules/eam/eamWorkOrderForCheck.vue +++ b/src/views/modules/eam/eamWorkOrderForCheck.vue @@ -945,25 +945,25 @@ // 实测值按钮 reportModal(row){ - let indata={ - site:row.site, - itemNo:row.itemNo, - planID:row.planID, - orderNo:row.orderNo, - itemType:row.functionType, + let indata = { + site: row.site, + itemNo: row.itemNo, + planID: row.planID, + orderNo: row.orderNo, + itemType: row.functionType, } eamWorkOrderReportSearch(indata).then(({data}) => { - this.detailList=data.rows + this.detailList = data.rows }) - this.saveData={ - site:row.site, - orderNo:row.orderNo, - planID:row.planID, - planOperatorName:row.planOperatorName, - workTime:row.workTime, - remark:row.remark, + this.saveData = { + site: row.site, + orderNo: row.orderNo, + planID: row.planID, + planOperatorName: row.planOperatorName, + workTime: row.workTime, + remark: row.remark, }, - this.detailModelFlag=true; + this.detailModelFlag = true; }, cancelOrder(row){ row.userId=this.$store.state.user.name; diff --git a/src/views/modules/eam/eam_device_list.vue b/src/views/modules/eam/eam_device_list.vue index 2025f01..5fa7185 100644 --- a/src/views/modules/eam/eam_device_list.vue +++ b/src/views/modules/eam/eam_device_list.vue @@ -93,10 +93,9 @@ layout="total, sizes, prev, pager, next, jumper"> - + - + @@ -140,8 +139,7 @@ :label="item.columnLabel"> - - 点检单 - 点检记录 - -
- - - - - - - - - - - -
+ + +
+ + + + + + + + + + + +
+
+ + + + + + + + + + +
+ + 保存 关闭 + + +
+ + + + + + + + + + + +
+ + 关闭 + +
+ @@ -216,6 +309,7 @@ eamWorkOrderItemSearch, saveCheckOrderReport, queryHistoryRecord, // 查询设备的点检历史记录 + eamWorkOrderReportSearch, 历史记录详情 } from "@/api/eam/eam.js" import Chooselist from '@/views/modules/common/Chooselist_eam' @@ -675,7 +769,201 @@ }, ], HistoryRecordList: [], - HistoryModelFlag: false + HistoryModelFlag: false, + activeTable: 'inspection_form', + columnHistoryList: [ + { + columnProp: 'orderNo', + headerAlign: "center", + align: "center", + columnLabel: '工单编号', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + }, + { + columnProp: 'planDesc', + headerAlign: "center", + align: "center", + columnLabel: '计划描述', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + }, + { + columnProp: 'actualDate', + headerAlign: "center", + align: "center", + columnLabel: '点检日期', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + }, + { + columnProp: 'checkResult', + headerAlign: "center", + align: "center", + columnLabel: '点检结论', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + }, + { + columnProp: 'actualOperatorName', + headerAlign: "center", + align: "center", + columnLabel: '点检人员', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + }, + { + columnProp: 'objectID', + headerAlign: "center", + align: "center", + columnLabel: '设备编码', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + }, + { + columnProp: 'objectDesc', + headerAlign: "center", + align: "center", + columnLabel: '设备名称', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + }, + { + columnProp: 'remark', + headerAlign: "center", + align: "center", + columnLabel: '备注', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + }, + ], + historyDetailList: [], + historyDetailModelFlag: false, + columnHistoryDetailList: [ + { + columnProp: 'itemNo', + headerAlign: "center", + align: "center", + columnLabel: '点检项目编码', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 90, + }, + { + columnProp: 'itemDesc', + headerAlign: "center", + align: "center", + columnLabel: '点检项目名称', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 90, + }, + { + columnProp: 'itemRemark', + headerAlign: "center", + align: "center", + columnLabel: '点检方法说明', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 120, + }, + { + columnProp: 'valueType', + headerAlign: "center", + align: "center", + columnLabel: '检测值类型', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 70, + }, + { + columnProp: 'defaultValue', + headerAlign: "center", + align: "center", + columnLabel: '参照值', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 70, + }, + { + columnProp: 'maxValue', + headerAlign: "center", + align: "center", + columnLabel: '最大值', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 70, + }, + { + columnProp: 'minValue', + headerAlign: "center", + align: "center", + columnLabel: '最小值', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 70, + }, + ], } }, mounted () { @@ -838,7 +1126,9 @@ mesUser: this.$store.state.user.name, itemList: [], checkResult: '' - }, + } + this.getInspectionFormData(); + this.queryHistoryRecord(); this.detailModelFlag = true; }, @@ -918,10 +1208,11 @@ } } this.saveData.itemList = JSON.parse(JSON.stringify(this.detailList)) + console.log(this.saveData) await saveCheckOrderReport(this.saveData).then(({data}) => { if (data && data.code == '0') { this.getDataList() - this.detailModelFlag=false + this.detailModelFlag = false this.$message({ message: '操作成功', type: 'success', @@ -937,7 +1228,40 @@ }) }, - //查询设备的点检记录 + // 列表表格选择替换 + tabClick (tab, event) { + // 刷新列表数据 + this.refreshCurrentTabTable() + }, + + // 刷新页签的table数据 + refreshCurrentTabTable () { + // 区分不同的页签刷新不同的列表数据 + if (this.activeTable == 'inspection_form') { + this.getInspectionFormData(); + } else if (this.activeTable == 'history_record') { + this.queryHistoryRecord(); + } + }, + + // 检验单 + getInspectionFormData(){ + let tempData = { + site: this.saveData.site, + planID: this.saveData.planID, + orderNo: this.saveData.orderNo, + itemType: 'A', + objectID: this.saveData.objectID + } + eamWorkOrderItemSearch(tempData).then(({data}) => { + if (data && data.code === 0) { + this.detailList = data.rows + }else { + this.detailList = []; + } + }) + }, + // 点检记录 queryHistoryRecord(){ let tempData = { site: this.saveData.site, @@ -945,10 +1269,25 @@ functionType: 'A' } queryHistoryRecord(tempData).then(({data}) => { - this.HistoryRecordList = data.rows + if (data && data.code === 0) { + this.HistoryRecordList = data.rows + }else { + this.HistoryRecordList = []; + } }) - this.HistoryModelFlag = true }, + // 详情 + detailModal(row){ + let tempData = { + site: this.saveData.site, + orderNo: row.orderNo, + } + eamWorkOrderReportSearch(tempData).then(({data}) => { + this.historyDetailList = data.rows + }) + this.historyDetailModelFlag = true; + }, + } } diff --git a/src/views/modules/reportWorkOrder/reportMaintenanceOrder.vue b/src/views/modules/reportWorkOrder/reportMaintenanceOrder.vue index 649feb1..4545a5e 100644 --- a/src/views/modules/reportWorkOrder/reportMaintenanceOrder.vue +++ b/src/views/modules/reportWorkOrder/reportMaintenanceOrder.vue @@ -120,13 +120,11 @@ value-format='yyyy-MM-dd HH:mm:ss' format='yyyy-MM-dd HH:mm:ss' placeholder="结束日期"> - - - + - + @@ -135,57 +133,150 @@ -
- - - - - - - - - - -
+ + +
+ + + + + + + + + + +
+
+ + + + + + + + + + + +
保存 关闭 + +
+ + + + + + + + + + + +
+ + 关闭 + + +
+ @@ -195,6 +286,8 @@ eamWorkOrderSearch, eamWorkOrderItemSearch, saveCheckOrderReport, + queryHistoryRecord, // 查询设备的点检历史记录 + eamWorkOrderReportSearch, 历史记录详情 } from "@/api/eam/eam.js" import Chooselist from '@/views/modules/common/Chooselist_eam' import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js' @@ -633,6 +726,195 @@ columnWidth: 70, }, ], + activeTable: 'inspection_form', + HistoryRecordList: [], + HistoryModelFlag: false, + columnHistoryList: [ + { + columnProp: 'orderNo', + headerAlign: "center", + align: "center", + columnLabel: '工单编号', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + }, + { + columnProp: 'planDesc', + headerAlign: "center", + align: "center", + columnLabel: '计划描述', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + }, + { + columnProp: 'actualDate', + headerAlign: "center", + align: "center", + columnLabel: '维保日期', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + }, + { + columnProp: 'checkResult', + headerAlign: "center", + align: "center", + columnLabel: '维保结论', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + }, + { + columnProp: 'actualOperatorName', + headerAlign: "center", + align: "center", + columnLabel: '维保人员', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + }, + { + columnProp: 'objectID', + headerAlign: "center", + align: "center", + columnLabel: '设备编码', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + }, + { + columnProp: 'objectDesc', + headerAlign: "center", + align: "center", + columnLabel: '设备名称', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + }, + { + columnProp: 'remark', + headerAlign: "center", + align: "center", + columnLabel: '备注', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + }, + ], + historyDetailList: [], + historyDetailModelFlag: false, + columnHistoryDetailList: [ + { + columnProp: 'itemNo', + headerAlign: "center", + align: "center", + columnLabel: '维保项目编码', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + }, + { + columnProp: 'itemDesc', + headerAlign: "center", + align: "center", + columnLabel: '维保项目名称', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + }, + { + columnProp: 'itemRemark', + headerAlign: "center", + align: "center", + columnLabel: '维保方法说明', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + }, + { + columnProp: 'valueType', + headerAlign: "center", + align: "center", + columnLabel: '检测值类型', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + }, + { + columnProp: 'defaultValue', + headerAlign: "center", + align: "center", + columnLabel: '参照值', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + }, + { + columnProp: 'maxValue', + headerAlign: "center", + align: "center", + columnLabel: '最大值', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + }, + { + columnProp: 'minValue', + headerAlign: "center", + align: "center", + columnLabel: '最小值', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + }, + ], } }, mounted () { @@ -645,6 +927,65 @@ this.getDataList() }, methods: { + // 列表表格选择替换 + tabClick (tab, event) { + // 刷新列表数据 + this.refreshCurrentTabTable() + }, + // 刷新页签的table数据 + refreshCurrentTabTable () { + // 区分不同的页签刷新不同的列表数据 + if (this.activeTable == 'inspection_form') { + this.getInspectionFormData(); + } else if (this.activeTable == 'history_record') { + this.queryHistoryRecord(); + } + }, + // 检验单 + getInspectionFormData(){ + let tempData = { + site: this.saveData.site, + planID: this.saveData.planID, + orderNo: this.saveData.orderNo, + itemType: 'B', + objectID: this.saveData.objectID + } + eamWorkOrderItemSearch(tempData).then(({data}) => { + if (data && data.code === 0) { + this.detailList = data.rows + }else { + this.detailList = []; + } + }) + }, + // 点检记录 + queryHistoryRecord(){ + let tempData = { + site: this.saveData.site, + objectID: this.saveData.objectID, + functionType: 'B' + } + queryHistoryRecord(tempData).then(({data}) => { + if (data && data.code === 0) { + this.HistoryRecordList = data.rows + }else { + this.HistoryRecordList = []; + } + }) + }, + // 详情 + detailModal(row){ + let tempData = { + site: this.saveData.site, + orderNo: row.orderNo, + } + eamWorkOrderReportSearch(tempData).then(({data}) => { + this.historyDetailList = data.rows + }) + this.historyDetailModelFlag = true; + }, + + // 校验用户是否收藏 favoriteIsOk() { let userFavorite = { @@ -791,8 +1132,10 @@ mesUser:this.$store.state.user.name, itemList:[], checkResult: '' - }, - this.detailModelFlag = true; + } + this.getInspectionFormData() + this.queryHistoryRecord() + this.detailModelFlag = true }, saveCheckReport(){ if(this.saveData.checkResult == ''||this.saveData.checkResult == null){