Explorar o código

x修改设备台账 关联资产 只在编辑模式生效

haojianlong %!s(int64=5) %!d(string=hai) anos
pai
achega
ec9d69fdbf
Modificáronse 1 ficheiros con 15 adicións e 15 borrados
  1. 15 15
      src/components/ledger/handsontables/device.vue

+ 15 - 15
src/components/ledger/handsontables/device.vue

@@ -149,7 +149,7 @@ export default {
     lookPic,
     myCascader
   },
-  created() { 
+  created() {
     buildFloor.getData(this.buildFloorData)
   },
   computed: {
@@ -241,7 +241,7 @@ export default {
         getDataDictionary(params, res => {
           this.tableHeader = res.Content;
           this.tableHeader.forEach(item => {
-            if(item.Path && item.InputMode){
+            if (item.Path && item.InputMode) {
               this.inputMap[item.Path] = item.InputMode
             }
           })
@@ -341,7 +341,7 @@ export default {
                       tools.setDataForKey(
                         item,
                         head.Path,
-                        child.error ? child.value? "表号功能号格式错误" : "表号功能号不存在" : "暂未采集到实时数据"
+                        child.error ? child.value ? "表号功能号格式错误" : "表号功能号不存在" : "暂未采集到实时数据"
                       );
                     }
                   });
@@ -441,14 +441,14 @@ export default {
           readOnly: true,
           renderer: tools.LinkEquipLocalName
         }, {
-          data: "LinkSystem",
-          renderer: text.systemList,
-          readOnly: true
-        }, {
-          data: "Count",
-          readOnly: true,
-          renderer: tools.lookDetails
-        }
+        data: "LinkSystem",
+        renderer: text.systemList,
+        readOnly: true
+      }, {
+        data: "Count",
+        readOnly: true,
+        renderer: tools.lookDetails
+      }
       );
       if (this.showType == "all") {
         data.splice(6, 0, {
@@ -601,8 +601,8 @@ export default {
       change.map(item => {
         let key = item[1].split(".")[0]
         if (key == "flowBuild" && keyList.indexOf(key) == -1) {
-          keyList.push("BuildingId","FloorId")
-          param.Projection.push("BuildingId","FloorId")
+          keyList.push("BuildingId", "FloorId")
+          param.Projection.push("BuildingId", "FloorId")
         }
         if (item[1] && keyList.indexOf(key) == -1 && item[1] != 'PropertyId') {
           keyList.push(key);
@@ -688,7 +688,7 @@ export default {
           return false
         //关联资产
         case 'LinkEquipLocalName':
-          if (this.linkNameFalg) {
+          if (!this.onlyRead) {
             this.myDialog.changeRea = true;
           }
           return false
@@ -795,7 +795,7 @@ export default {
       this.updateInput = ''
     },
     //更新临时维护信息点
-    handleClickUpdate(){
+    handleClickUpdate() {
       tools.setDataForKey(this.tableData[this.row], this.updateInfoPoint, this.updateInput)
       this.handleUpdataTable([[this.row, this.updateInfoPoint, null, this.updateInput]], "edit")
       this.updateInputShow = false