Pārlūkot izejas kodu

设备台账数据类型

haojianlong 4 gadi atpakaļ
vecāks
revīzija
1c2cb3a2db

+ 1 - 1
src/components/business_space/business/handsontable.vue

@@ -411,7 +411,7 @@ export default {
         this.$message("该信息点的值为自动生成,不可人工维护!");
         return false;
       }
-      if (!this.onlyRead && showTools.inputModeArr.indexOf(inputData.inputMode) == '-1') {
+      if (!this.onlyRead && showTools.inputModeArr.indexOf(inputData.dataType) == '-1') {
         this.updateInfoPoint = val;
         this.updateInput = tools.dataForKey(this.tableData[row.row], val);
         this.myDialog.update = true;

+ 1 - 1
src/components/ledger/handsontables/assets.vue

@@ -1028,7 +1028,7 @@ export default {
         this.$message("该信息点的值为自动生成,不可人工维护!");
         return false;
       }
-      if (!this.onlyRead && showTools.inputModeArr.indexOf(inputData.inputMode) == '-1') {
+      if (!this.onlyRead && showTools.inputModeArr.indexOf(inputData.dataType) == '-1') {
         this.updateInfoPoint = val;
         this.updateInput = tools.dataForKey(this.tableData[row.row], val);
         this.myDialog.update = true;

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

@@ -1301,7 +1301,7 @@ export default {
       }
       if (
         !this.onlyRead &&
-        showTools.inputModeArr.indexOf(inputData.inputMode) == "-1"
+        showTools.inputModeArr.indexOf(inputData.dataType) == "-1"
       ) {
         this.updateInfoPoint = val;
         this.updateInput = tools.dataForKey(this.tableData[row.row], val);

+ 1 - 1
src/components/ledger/handsontables/system.vue

@@ -596,7 +596,7 @@ export default {
         this.$message("该信息点的值为自动生成,不可人工维护!");
         return false;
       }
-      if (!this.onlyRead && showTools.inputModeArr.indexOf(inputData.inputMode) == '-1') {
+      if (!this.onlyRead && showTools.inputModeArr.indexOf(inputData.dataType) == '-1') {
         this.updateInfoPoint = val;
         this.updateInput = tools.dataForKey(this.tableData[row.row], val);
         this.myDialog.update = true;

+ 9 - 123
src/utils/handsontable/notShow.js

@@ -140,9 +140,16 @@ let partsAddNoShow = [
   "InsurerWeb",
   "InsurerFax",
 ]
+// 将映射表枚举值转为数组
+const mapToArr = () => {
+  const arr = []
+  for(let key in dataTypeMap) {
+    arr.push(dataTypeMap[key])
+  }
+  return arr;
+}
 const showTools = {
-  inputModeArr: ["A1", "A2", "B1", "B2", "C5", "D1", "D1L", "D2", "E1", "E2", "L", "L1", "L2", "F1", "F2", "M"],
-             // ["A1", "A2", "B1",       "C5", "D1",        "D2", "E1",       "L", "L1", "L2", "F1", "F2", "M", "Own"]
+  inputModeArr: mapToArr(),
   addArr: () => {
     return cutArr
   },
@@ -183,14 +190,6 @@ const showTools = {
     })
     return falg
   },
-  // 将映射表枚举值转为数组
-  mapToArr: () => {
-    const arr = []
-    for(let key in dataTypeMap) {
-      arr.push(dataTypeMap[key])
-    }
-    return arr;
-  },
   //插入需要的关系
   insertionRea: (data) => {
     cutArr.map(item => {
@@ -343,119 +342,6 @@ const showTools = {
     })
     return arr
   },
-  // 弃用
-  // changeTypes(arr, onlyRead, isWatch, allMess, falg = false, taizhang = false) {
-  //   let data = arr.map(item => {
-  //     if (falg) {
-  //       if (item.firstTag == "控制参数" ||
-  //         item.firstTag == "设定参数" ||
-  //         item.firstTag == "运行参数") {
-  //         return undefined
-  //       }
-  //     }
-  //     if (item.code == "BIMLocation") {
-  //       return undefined
-  //     }
-  //     if (onlyRead || inputModeArr.indexOf(item.inputMode) > -1) {
-  //       if (item.Visible || !allMess) {
-  //         //固定不显示的code
-  //         if (!showTools.cantShow(item.code) && !onlyRead && !taizhang) {
-  //           return undefined
-  //         }
-
-  //         if (!showTools.isShow(item.code) && !taizhang && !taizhang) {
-  //           if (isWatch && !onlyRead) {
-  //             return undefined
-  //           }
-  //         }
-
-  //         if (item.code == "EquipQRCode") {
-  //           return {
-  //             data: "Infos." + item.code,
-  //             renderer: text.lookQRCode,
-  //             readOnly: true
-  //           }
-  //         }
-
-  //         if (item.inputMode == "D1") {
-  //           return {
-  //             data: "Infos." + item.code,
-  //             renderer: tools.customDropdownRenderer,
-  //             editor: "chosen",
-  //             chosenOptions: {
-  //               // multiple: true,//多选
-  //               data: item.dataSource || ""
-  //             }
-  //           };
-  //         } else if (item.inputMode == "A1" || item.inputMode == "A2") {
-  //           return {
-  //             data: "Infos." + item.code,
-  //             type: "numeric",
-  //             numericFormat: {
-  //               pattern: "0,0.00"
-  //               // culture: 'de-DE' // use this for EUR (German),
-  //               // more cultures available on http://numbrojs.com/languages.html
-  //             }
-  //           };
-  //         } else if (item.inputMode == "C5") {
-  //           return {
-  //             data: "Infos." + item.code,
-  //             type: "date",
-  //             dateFormat: "YYYY-MM-DD",
-  //             correctFormat: true
-  //           };
-  //         } else if (
-  //           item.inputMode == "B1" ||
-  //           item.inputMode == "L" ||
-  //           item.inputMode == "L1" ||
-  //           item.inputMode == "L2" ||
-  //           item.inputMode == "M"
-  //         ) {
-  //           return {
-  //             data: "Infos." + item.code
-  //           };
-  //         } else if (
-  //           item.inputMode == "X"
-  //           // item.inputMode == "L1" ||
-  //           // item.inputMode == "L2"
-  //         ) {
-  //           //   return undefined
-  //           return {
-  //             data: "Infos." + item.code,
-  //             readOnly: true
-  //           };
-  //         } else if (item.inputMode == "D2") {
-  //           return {
-  //             data: "Infos." + item.code,
-  //             renderer: tools.customDropdownRenderer,
-  //             editor: "chosen",
-  //             chosenOptions: {
-  //               multiple: true, //多选
-  //               data: item.dataSource || ""
-  //             }
-  //           };
-  //         } else if (item.inputMode == "Own" && !onlyRead) {
-  //           return {
-  //             data: "Infos." + item.code,
-  //             renderer: text.idType,
-  //           }
-  //         } else {
-  //           return {
-  //             data: "infos." + item.code
-  //           }
-  //         }
-  //       } else {
-  //         return undefined
-  //       }
-  //     } else {
-  //       return false
-  //     }
-
-
-  //   }).filter(item => item);
-  //   return data
-  // },
-
   showTypes(arr, onlyRead, isWatch, allMess, falg = false, typeArr = false) {
     let data = arr.map(item => {
       if (falg) {

+ 1 - 1
src/views/ledger/cenotelist/index.vue

@@ -402,7 +402,7 @@ export default {
         this.$message("该信息点的值为自动生成,不可人工维护!");
         return false;
       }
-      if (!this.onlyRead && showTools.inputModeArr.indexOf(inputData.inputMode) == '-1') {
+      if (!this.onlyRead && showTools.inputModeArr.indexOf(inputData.dataType) == '-1') {
         this.updateInfoPoint = val;
         this.updateInput = tools.dataForKey(this.tableData[row.row], val);
         this.myDialog.update = true;

+ 1 - 1
src/views/ledger/facility/partsmanage/index.vue

@@ -761,7 +761,7 @@ export default {
         this.$message("该信息点的值为自动生成,不可人工维护!");
         return false;
       }
-      if (!this.onlyRead && showTools.inputModeArr.indexOf(inputData.inputMode) == '-1') {
+      if (!this.onlyRead && showTools.inputModeArr.indexOf(inputData.dataType) == '-1') {
         this.updateInfoPoint = val;
         this.updateInput = tools.dataForKey(this.tableData[row.row], val);
         this.myDialog.update = true;

+ 1 - 1
src/views/ledger/rentlist/index.vue

@@ -434,7 +434,7 @@ export default {
         this.$message("该信息点的值为自动生成,不可人工维护!");
         return false;
       }
-      if (!this.onlyRead && showTools.inputModeArr.indexOf(inputData.inputMode) == '-1') {
+      if (!this.onlyRead && showTools.inputModeArr.indexOf(inputData.dataType) == '-1') {
         this.updateInfoPoint = val
         this.updateInput = tools.dataForKey(this.tableData[row.row], val)
         this.myDialog.update = true

+ 1 - 1
src/views/ledger/spacelist/spaceadd/index.vue

@@ -378,7 +378,7 @@ export default {
         this.$message("该信息点的值为自动生成,不可人工维护!");
         return false;
       }
-      if (!this.onlyRead && showTools.inputModeArr.indexOf(inputData.inputMode) == '-1') {
+      if (!this.onlyRead && showTools.inputModeArr.indexOf(inputData.dataType) == '-1') {
         this.updateInfoPoint = val;
         this.updateInput = tools.dataForKey(this.tableData[row.row], val);
         this.myDialog.update = true;