|
@@ -1,6 +1,7 @@
|
|
|
|
|
|
import text from "@/utils/handsontable/mainText"
|
|
|
import tools from "@/utils/scan/tools"
|
|
|
+let InputModeArr = ["A1", "A2", "B1", "C5", "D1", "D2", "E1", "L", "L1", "L2", "F1", "F2", "M", "Own"]
|
|
|
|
|
|
let noShowArr = [
|
|
|
"Brand",
|
|
@@ -420,125 +421,124 @@ const showTools = {
|
|
|
if (item.InfoPointCode == "BIMLocation") {
|
|
|
return undefined
|
|
|
}
|
|
|
- if (onlyRead || (!!typeArr && typeArr.indexOf(item.InputMode) > -1)) {
|
|
|
- return undefined
|
|
|
- }
|
|
|
- if (item.Visible || !allMess) {
|
|
|
-
|
|
|
- if (!showTools.cantShow(item.InfoPointCode) && !onlyRead) {
|
|
|
- return undefined
|
|
|
- }
|
|
|
-
|
|
|
- if (!showTools.isShow(item.InfoPointCode)) {
|
|
|
- if (isWatch && !onlyRead) {
|
|
|
+ if (onlyRead || InputModeArr.indexOf(item.InputMode) > -1) {
|
|
|
+ if (item.Visible || !allMess) {
|
|
|
+
|
|
|
+ if (!showTools.cantShow(item.InfoPointCode) && !onlyRead) {
|
|
|
return undefined
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
- if (item.InfoPointCode == "EquipQRCode" || item.InfoPointCode == "RoomQRCode") {
|
|
|
- return {
|
|
|
- data: "infos." + item.InfoPointCode,
|
|
|
- renderer: text.lookQRCode,
|
|
|
- readOnly: true
|
|
|
+ if (!showTools.isShow(item.InfoPointCode)) {
|
|
|
+ if (isWatch && !onlyRead) {
|
|
|
+ return undefined
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
-
|
|
|
- if (
|
|
|
- item.InfoPointCode == "InstallPic" ||
|
|
|
- item.InfoPointCode == "InstallDrawing" ||
|
|
|
- item.InfoPointCode == "Nameplate" ||
|
|
|
- item.InfoPointCode == "Pic" ||
|
|
|
- item.InfoPointCode == "Drawing"
|
|
|
- ) {
|
|
|
- return {
|
|
|
- data: "infos." + item.InfoPointCode,
|
|
|
- renderer: text.picType,
|
|
|
- readOnly: true
|
|
|
+ if (item.InfoPointCode == "EquipQRCode" || item.InfoPointCode == "RoomQRCode") {
|
|
|
+ return {
|
|
|
+ data: "infos." + item.InfoPointCode,
|
|
|
+ renderer: text.lookQRCode,
|
|
|
+ readOnly: true
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
-
|
|
|
- if (item.InfoPointCode == "InsuranceFile" ||
|
|
|
- item.InfoPointCode == "Archive" ||
|
|
|
- item.InfoPointCode == "CheckReport") {
|
|
|
- return {
|
|
|
- data: "infos." + item.InfoPointCode,
|
|
|
- renderer: text.fileType,
|
|
|
- readOnly: true
|
|
|
+
|
|
|
+ if (
|
|
|
+ item.InfoPointCode == "InstallPic" ||
|
|
|
+ item.InfoPointCode == "InstallDrawing" ||
|
|
|
+ item.InfoPointCode == "Nameplate" ||
|
|
|
+ item.InfoPointCode == "Pic" ||
|
|
|
+ item.InfoPointCode == "Drawing"
|
|
|
+ ) {
|
|
|
+ return {
|
|
|
+ data: "infos." + item.InfoPointCode,
|
|
|
+ renderer: text.picType,
|
|
|
+ readOnly: true
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
- if (item.InputMode == "D1") {
|
|
|
- return {
|
|
|
- data: "infos." + item.InfoPointCode,
|
|
|
- renderer: tools.customDropdownRenderer,
|
|
|
- editor: "chosen",
|
|
|
- chosenOptions: {
|
|
|
-
|
|
|
- data: item.DataSource || ""
|
|
|
+
|
|
|
+ if (item.InfoPointCode == "InsuranceFile" ||
|
|
|
+ item.InfoPointCode == "Archive" ||
|
|
|
+ item.InfoPointCode == "CheckReport") {
|
|
|
+ return {
|
|
|
+ data: "infos." + item.InfoPointCode,
|
|
|
+ renderer: text.fileType,
|
|
|
+ readOnly: true
|
|
|
}
|
|
|
- };
|
|
|
- } else if (item.InputMode == "A1" || item.InputMode == "A2") {
|
|
|
- return {
|
|
|
- data: "infos." + item.InfoPointCode,
|
|
|
- type: "numeric",
|
|
|
- numericFormat: {
|
|
|
- pattern: "0,0.00"
|
|
|
-
|
|
|
-
|
|
|
+ }
|
|
|
+
|
|
|
+ if (item.InputMode == "D1") {
|
|
|
+ return {
|
|
|
+ data: "infos." + item.InfoPointCode,
|
|
|
+ renderer: tools.customDropdownRenderer,
|
|
|
+ editor: "chosen",
|
|
|
+ chosenOptions: {
|
|
|
+
|
|
|
+ data: item.DataSource || ""
|
|
|
+ }
|
|
|
+ };
|
|
|
+ } else if (item.InputMode == "A1" || item.InputMode == "A2") {
|
|
|
+ return {
|
|
|
+ data: "infos." + item.InfoPointCode,
|
|
|
+ type: "numeric",
|
|
|
+ numericFormat: {
|
|
|
+ pattern: "0,0.00"
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+ };
|
|
|
+ } else if (item.InputMode == "C5") {
|
|
|
+ return {
|
|
|
+ data: "infos." + item.InfoPointCode,
|
|
|
+ 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.InfoPointCode
|
|
|
}
|
|
|
- };
|
|
|
- } else if (item.InputMode == "C5") {
|
|
|
- return {
|
|
|
- data: "infos." + item.InfoPointCode,
|
|
|
- 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.InfoPointCode
|
|
|
- };
|
|
|
- } else if (
|
|
|
- item.InputMode == "X" ||
|
|
|
- item.InputMode == "F2"
|
|
|
-
|
|
|
-
|
|
|
- ) {
|
|
|
-
|
|
|
- return {
|
|
|
- data: "infos." + item.InfoPointCode,
|
|
|
- readOnly: true
|
|
|
- };
|
|
|
- } else if (item.InputMode == "D2") {
|
|
|
- return {
|
|
|
- data: "infos." + item.InfoPointCode,
|
|
|
- renderer: tools.customDropdownRenderer,
|
|
|
- editor: "chosen",
|
|
|
- chosenOptions: {
|
|
|
- multiple: true,
|
|
|
- data: item.DataSource || ""
|
|
|
+ } else if (
|
|
|
+ item.InputMode == "X" ||
|
|
|
+ item.InputMode == "F2"
|
|
|
+ ) {
|
|
|
+ return {
|
|
|
+ data: "infos." + item.InfoPointCode,
|
|
|
+ readOnly: true
|
|
|
+ };
|
|
|
+ } else if (item.InputMode == "D2") {
|
|
|
+ return {
|
|
|
+ data: "infos." + item.InfoPointCode,
|
|
|
+ renderer: tools.customDropdownRenderer,
|
|
|
+ editor: "chosen",
|
|
|
+ chosenOptions: {
|
|
|
+ multiple: true,
|
|
|
+ data: item.DataSource || ""
|
|
|
+ }
|
|
|
+ };
|
|
|
+ } else if (item.InputMode == "Own" && !onlyRead) {
|
|
|
+ return {
|
|
|
+ data: "infos." + item.InfoPointCode,
|
|
|
+ renderer: text.idType,
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ return {
|
|
|
+ data: "infos." + item.InfoPointCode
|
|
|
}
|
|
|
- };
|
|
|
- } else if (item.InputMode == "Own" && !onlyRead) {
|
|
|
- return {
|
|
|
- data: "infos." + item.InfoPointCode,
|
|
|
- renderer: text.idType,
|
|
|
}
|
|
|
} else {
|
|
|
- return undefined;
|
|
|
+ return undefined
|
|
|
}
|
|
|
} else {
|
|
|
return undefined
|
|
|
}
|
|
|
-
|
|
|
}).filter(item => item);
|
|
|
return data
|
|
|
},
|
|
@@ -556,7 +556,7 @@ const showTools = {
|
|
|
if (item.InfoPointCode == "BIMLocation") {
|
|
|
return undefined
|
|
|
}
|
|
|
- if (onlyRead || (!!readArr && readArr.indexOf(item.InputMode) > -1)) {
|
|
|
+ if (onlyRead || InputModeArr.indexOf(item.InputMode) > -1) {
|
|
|
if (item.Visible || !allMess) {
|
|
|
if (!showTools.cantShow(item.InfoPointCode) && !onlyRead && !taizhang) {
|
|
|
return undefined
|
|
@@ -576,7 +576,7 @@ const showTools = {
|
|
|
return undefined
|
|
|
}
|
|
|
} else {
|
|
|
- return undefined;
|
|
|
+ return undefined
|
|
|
}
|
|
|
}).filter(d => d);
|
|
|
return data
|
|
@@ -594,7 +594,7 @@ const showTools = {
|
|
|
if (item.InfoPointCode == "BIMLocation") {
|
|
|
return undefined
|
|
|
}
|
|
|
- if (onlyRead || (!!typeArr && typeArr.indexOf(item.InputMode) > -1)) {
|
|
|
+ if (onlyRead || InputModeArr.indexOf(item.InputMode) > -1) {
|
|
|
if (item.Visible || !allMess) {
|
|
|
|
|
|
if (!showTools.cantShow(item.InfoPointCode) && !onlyRead) {
|
|
@@ -719,7 +719,7 @@ const showTools = {
|
|
|
if (item.InfoPointCode == "BIMLocation") {
|
|
|
return undefined
|
|
|
}
|
|
|
- if (onlyRead || (!!readArr && readArr.indexOf(item.InputMode) > -1)) {
|
|
|
+ if (onlyRead || InputModeArr.indexOf(item.InputMode) > -1) {
|
|
|
if (item.Visible || !allMess) {
|
|
|
if (!showTools.fixedNoShowField(partsAddNoShow, item.InfoPointCode) && !onlyRead && !taizhang) {
|
|
|
return undefined
|
|
@@ -758,7 +758,7 @@ const showTools = {
|
|
|
if (item.Path == "BIMLocation") {
|
|
|
return undefined
|
|
|
}
|
|
|
- if (onlyRead || (!!typeArr && typeArr.indexOf(item.InputMode) > -1)) {
|
|
|
+ if (onlyRead || InputModeArr.indexOf(item.InputMode) > -1) {
|
|
|
if (item.Visible || !allMess) {
|
|
|
|
|
|
if (!showTools.fixedNoShowField(partsAddNoShow, item.InfoPointCode) && !onlyRead && !taizhang) {
|