diff --git a/public/components/property/addInspectionPoint/addInspectionPoint.html b/public/components/property/addInspectionPoint/addInspectionPoint.html index 16c0a1e02..f89c65c0c 100644 --- a/public/components/property/addInspectionPoint/addInspectionPoint.html +++ b/public/components/property/addInspectionPoint/addInspectionPoint.html @@ -1,5 +1,5 @@ - + \ No newline at end of file diff --git a/public/components/property/addInspectionPoint/addInspectionPoint.js b/public/components/property/addInspectionPoint/addInspectionPoint.js index bb4511d8f..ba44f9824 100644 --- a/public/components/property/addInspectionPoint/addInspectionPoint.js +++ b/public/components/property/addInspectionPoint/addInspectionPoint.js @@ -8,7 +8,9 @@ data: { addInspectionPointInfo: { inspectionId: '', - machineId: '', + pointObjId: '', + pointObjType: '', + pointObjName: '', inspectionName: '', remark: '' } @@ -21,8 +23,9 @@ $('#addInspectionPointModel').modal('show'); }); vc.on("addInspectionPointInfo", "notify", function (_param) { - if (_param.hasOwnProperty("machineId")) { - vc.component.addInspectionPointInfo.machineId = _param.machineId; + if (_param.hasOwnProperty("machineId") && $that.addInspectionPointInfo.pointObjType == '1001') { + vc.component.addInspectionPointInfo.pointObjId = _param.machineId; + vc.component.addInspectionPointInfo.pointObjName = _param.machineName; } }); }, @@ -43,11 +46,25 @@ errInfo: "巡检点名称不能超过100位" }, ], - 'addInspectionPointInfo.machineId': [ + 'addInspectionPointInfo.pointObjId': [ { limit: "required", param: "", - errInfo: "设备信息不能为空" + errInfo: "位置信息不能为空" + }, + ], + 'addInspectionPointInfo.pointObjType': [ + { + limit: "required", + param: "", + errInfo: "巡检类型不能为空" + }, + ], + 'addInspectionPointInfo.pointObjName': [ + { + limit: "required", + param: "", + errInfo: "巡检位置不能为空" }, ], 'addInspectionPointInfo.remark': [ @@ -61,13 +78,15 @@ }); }, saveInspectionPointInfo: function () { + + if ($that.addInspectionPointInfo.pointObjType == '2002') { + $that.addInspectionPointInfo.pointObjId = '-1'; + } if (!vc.component.addInspectionPointValidate()) { vc.toast(vc.validate.errInfo); return; } - vc.component.addInspectionPointInfo.communityId = vc.getCurrentCommunity().communityId; - vc.component.addInspectionPointInfo.machineId = vc.component.addInspectionPointInfo.machineId; //不提交数据将数据 回调给侦听处理 if (vc.notNull($props.callBackListener)) { vc.emit($props.callBackListener, $props.callBackFunction, vc.component.addInspectionPointInfo); @@ -104,8 +123,12 @@ }, clearAddInspectionPointInfo: function () { vc.component.addInspectionPointInfo = { + inspectionId: '', + pointObjId: '', + pointObjType: '', + pointObjName: '', inspectionName: '', - remark: '', + remark: '' }; } diff --git a/public/components/property/editInspectionPoint/editInspectionPoint.html b/public/components/property/editInspectionPoint/editInspectionPoint.html index 722a63939..dab369573 100644 --- a/public/components/property/editInspectionPoint/editInspectionPoint.html +++ b/public/components/property/editInspectionPoint/editInspectionPoint.html @@ -15,6 +15,23 @@
+ +
+ +
+
+
+ +
+ +
+
+
巡检点名称 + 巡检类型 + 巡检位置 巡检点ID - 设备位置 - 设备编码 - 设备名称 操作 @@ -76,11 +75,9 @@ {{inspectionPoint.inspectionName}} + {{inspectionPoint.pointObjType=='1001'?'设备':'环境'}} + {{inspectionPoint.pointObjName}} {{inspectionPoint.inspectionId}} - {{inspectionPoint.locationObjName}} - {{inspectionPoint.machineCode}} - {{inspectionPoint.machineName}} -