|
@@ -540,7 +540,7 @@ const showTools = {
|
|
|
return data
|
|
|
},
|
|
|
|
|
|
- showHeaderTypes(arr, onlyRead, isWatch, allMess, falg = false, typeArr = false) {
|
|
|
+ showHeaderTypes(arr, typeArr, onlyRead, isWatch, allMess, falg = false) {
|
|
|
let data = arr.map(item => {
|
|
|
if (item.FirstTag && !item.FirstTag == "") {
|
|
|
item.InfoPointCode = `${item.FirstTag}.${item.InfoPointCode}`
|
|
@@ -556,110 +556,110 @@ const showTools = {
|
|
|
return undefined
|
|
|
}
|
|
|
if (!!typeArr && typeArr.indexOf(item.InputMode) > -1) {
|
|
|
- return undefined
|
|
|
- }
|
|
|
- if (item.Visible || !allMess) {
|
|
|
- //固定不显示的code
|
|
|
- if (!showTools.cantShow(item.InfoPointCode) && !onlyRead) {
|
|
|
- return undefined
|
|
|
- }
|
|
|
-
|
|
|
- if (!showTools.isShow(item.InfoPointCode)) {
|
|
|
- if (isWatch && !onlyRead) {
|
|
|
+ if (item.Visible || !allMess) {
|
|
|
+ //固定不显示的code
|
|
|
+ if (!showTools.cantShow(item.InfoPointCode) && !onlyRead) {
|
|
|
return undefined
|
|
|
}
|
|
|
- }
|
|
|
-
|
|
|
- if (item.InfoPointCode == "EquipQRCode") {
|
|
|
- return {
|
|
|
- data: item.InfoPointCode,
|
|
|
- renderer: text.lookQRCode,
|
|
|
- readOnly: onlyRead
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- //图片类型
|
|
|
- if (
|
|
|
- item.InfoPointCode == "InstallPic" ||
|
|
|
- item.InfoPointCode == "InstallDrawing" ||
|
|
|
- item.InfoPointCode == "Nameplate" ||
|
|
|
- item.InfoPointCode == "Pic" ||
|
|
|
- item.InfoPointCode == "Drawing"
|
|
|
- ) {
|
|
|
- return {
|
|
|
- data: item.InfoPointCode,
|
|
|
- renderer: text.picType,
|
|
|
- readOnly: onlyRead
|
|
|
+
|
|
|
+ if (!showTools.isShow(item.InfoPointCode)) {
|
|
|
+ if (isWatch && !onlyRead) {
|
|
|
+ return undefined
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
-
|
|
|
- //文件类型
|
|
|
- if (item.InfoPointCode == "InsuranceFile" ||
|
|
|
- item.InfoPointCode == "Archive" ||
|
|
|
- item.InfoPointCode == "CheckReport") {
|
|
|
- return {
|
|
|
- data: item.InfoPointCode,
|
|
|
- renderer: text.fileType,
|
|
|
- readOnly: onlyRead
|
|
|
+
|
|
|
+ if (item.InfoPointCode == "EquipQRCode") {
|
|
|
+ return {
|
|
|
+ data: item.InfoPointCode,
|
|
|
+ renderer: text.lookQRCode,
|
|
|
+ readOnly: onlyRead
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
-
|
|
|
- if (item.InputMode == "D1" || item.InputMode == "D2") {
|
|
|
- return {
|
|
|
- data: item.InfoPointCode,
|
|
|
- renderer: tools.customDropdownRenderer,
|
|
|
- editor: "chosen",
|
|
|
- readOnly: onlyRead,
|
|
|
- chosenOptions: {
|
|
|
- multiple: true, //多选
|
|
|
- data: item.DataSource? tools.formatDataSource(item.DataSource): ""
|
|
|
+
|
|
|
+ //图片类型
|
|
|
+ if (
|
|
|
+ item.InfoPointCode == "InstallPic" ||
|
|
|
+ item.InfoPointCode == "InstallDrawing" ||
|
|
|
+ item.InfoPointCode == "Nameplate" ||
|
|
|
+ item.InfoPointCode == "Pic" ||
|
|
|
+ item.InfoPointCode == "Drawing"
|
|
|
+ ) {
|
|
|
+ return {
|
|
|
+ data: item.InfoPointCode,
|
|
|
+ renderer: text.picType,
|
|
|
+ readOnly: onlyRead
|
|
|
}
|
|
|
- };
|
|
|
- } else if (item.InputMode == "E1") {//单选
|
|
|
- return {
|
|
|
- data: item.InfoPointCode,
|
|
|
- renderer: tools.customDropdownRenderer,
|
|
|
- editor: "chosen",
|
|
|
- readOnly: onlyRead,
|
|
|
- chosenOptions: {
|
|
|
- data: item.DataSource? tools.formatDataSource(item.DataSource): ""
|
|
|
+ }
|
|
|
+
|
|
|
+ //文件类型
|
|
|
+ if (item.InfoPointCode == "InsuranceFile" ||
|
|
|
+ item.InfoPointCode == "Archive" ||
|
|
|
+ item.InfoPointCode == "CheckReport") {
|
|
|
+ return {
|
|
|
+ data: item.InfoPointCode,
|
|
|
+ renderer: text.fileType,
|
|
|
+ readOnly: onlyRead
|
|
|
}
|
|
|
- };
|
|
|
- } else if (item.InputMode == "A1" || item.InputMode == "A2") {
|
|
|
- return {
|
|
|
- data: item.InfoPointCode,
|
|
|
- type: "numeric",
|
|
|
- readOnly: onlyRead,
|
|
|
- numericFormat: {
|
|
|
- pattern: "0,0.00"
|
|
|
- // culture: 'de-DE' // use this for EUR (German),
|
|
|
- // more cultures available on http://numbrojs.com/languages.html
|
|
|
+ }
|
|
|
+
|
|
|
+ if (item.InputMode == "D1" || item.InputMode == "D2") {
|
|
|
+ return {
|
|
|
+ data: item.InfoPointCode,
|
|
|
+ renderer: tools.customDropdownRenderer,
|
|
|
+ editor: "chosen",
|
|
|
+ readOnly: onlyRead,
|
|
|
+ chosenOptions: {
|
|
|
+ multiple: true, //多选
|
|
|
+ data: item.DataSource? tools.formatDataSource(item.DataSource): ""
|
|
|
+ }
|
|
|
+ };
|
|
|
+ } else if (item.InputMode == "E1") {//单选
|
|
|
+ return {
|
|
|
+ data: item.InfoPointCode,
|
|
|
+ renderer: tools.customDropdownRenderer,
|
|
|
+ editor: "chosen",
|
|
|
+ readOnly: onlyRead,
|
|
|
+ chosenOptions: {
|
|
|
+ data: item.DataSource? tools.formatDataSource(item.DataSource): ""
|
|
|
+ }
|
|
|
+ };
|
|
|
+ } else if (item.InputMode == "A1" || item.InputMode == "A2") {
|
|
|
+ return {
|
|
|
+ data: item.InfoPointCode,
|
|
|
+ type: "numeric",
|
|
|
+ readOnly: onlyRead,
|
|
|
+ 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: item.InfoPointCode,
|
|
|
+ type: "date",
|
|
|
+ dateFormat: "YYYY-MM-DD",
|
|
|
+ readOnly: onlyRead,
|
|
|
+ correctFormat: true
|
|
|
+ };
|
|
|
+ } else if (item.InputMode == "Own" && !onlyRead) {
|
|
|
+ return {
|
|
|
+ data: item.InfoPointCode,
|
|
|
+ renderer: text.idType,
|
|
|
+ readOnly: onlyRead
|
|
|
}
|
|
|
- };
|
|
|
- } else if (item.InputMode == "C5") {
|
|
|
- return {
|
|
|
- data: item.InfoPointCode,
|
|
|
- type: "date",
|
|
|
- dateFormat: "YYYY-MM-DD",
|
|
|
- readOnly: onlyRead,
|
|
|
- correctFormat: true
|
|
|
- };
|
|
|
- } else if (item.InputMode == "Own" && !onlyRead) {
|
|
|
- return {
|
|
|
- data: item.InfoPointCode,
|
|
|
- renderer: text.idType,
|
|
|
- readOnly: onlyRead
|
|
|
+ } else {
|
|
|
+ return {
|
|
|
+ data: item.InfoPointCode,
|
|
|
+ readOnly: onlyRead
|
|
|
+ };
|
|
|
}
|
|
|
} else {
|
|
|
- return {
|
|
|
- data: item.InfoPointCode,
|
|
|
- readOnly: onlyRead
|
|
|
- };
|
|
|
+ return undefined
|
|
|
}
|
|
|
} else {
|
|
|
return undefined
|
|
|
}
|
|
|
-
|
|
|
}).filter(item => item);
|
|
|
return data
|
|
|
}
|