|
@@ -5,10 +5,10 @@ import fieldData from "@/utils/handsontable/fillterField"
|
|
let InputModeArr = ["A1", "A2", "B1", "C5", "D1", "D2", "E1", "L", "L1", "L2", "F1", "F2", "M", "Own"]
|
|
let InputModeArr = ["A1", "A2", "B1", "C5", "D1", "D2", "E1", "L", "L1", "L2", "F1", "F2", "M", "Own"]
|
|
//在编辑模式下并且勾选隐藏自动填充的信息点不显示的字段
|
|
//在编辑模式下并且勾选隐藏自动填充的信息点不显示的字段
|
|
let noShowArr = [
|
|
let noShowArr = [
|
|
- "Specification",
|
|
|
|
- "ServiceLife"
|
|
|
|
- ]
|
|
|
|
- //在编辑模式下不显示的字段
|
|
|
|
|
|
+ "Specification",
|
|
|
|
+ "ServiceLife"
|
|
|
|
+]
|
|
|
|
+//在编辑模式下不显示的字段
|
|
let cantShow = [
|
|
let cantShow = [
|
|
"EquipQRCode",
|
|
"EquipQRCode",
|
|
"EquipID",
|
|
"EquipID",
|
|
@@ -47,27 +47,27 @@ let cantShow = [
|
|
|
|
|
|
//台账编辑页面不显示的厂商信息
|
|
//台账编辑页面不显示的厂商信息
|
|
let firmArr = [
|
|
let firmArr = [
|
|
- "Brand",//品牌
|
|
|
|
- "Specification",//设备型号
|
|
|
|
- "Manufacturer",//生产厂家
|
|
|
|
- "Supplier",//供应商单位名称
|
|
|
|
- "SupplierContactor",//供应商联系人
|
|
|
|
- "SupplierPhone",//供应商联系电话
|
|
|
|
- "SupplierEmail",//供应商电子邮件
|
|
|
|
- "SupplierWeb",//供应商网址
|
|
|
|
- "SupplierFax",//供应商传真
|
|
|
|
- "Maintainer",//维修商单位名称
|
|
|
|
- "MaintainerContactor",//维修商联系人
|
|
|
|
- "MaintainerPhone",//维修商联系电话
|
|
|
|
- "MaintainerEmail",//维修商电子邮件
|
|
|
|
- "MaintainerWeb",//维修商网址
|
|
|
|
- "MaintainerFax",//维修商传真
|
|
|
|
- "Insurer",//保险公司名称
|
|
|
|
- "InsurerContactor",//保险公司联系人
|
|
|
|
- "InsurerPhone",//保险公司联系电话
|
|
|
|
- 'InsurerEmail',//保险公司电子邮件
|
|
|
|
- "InsurerWeb",//保险公司网址
|
|
|
|
- "InsurerFax"//保险公司传真
|
|
|
|
|
|
+ "Brand", //品牌
|
|
|
|
+ "Specification", //设备型号
|
|
|
|
+ "Manufacturer", //生产厂家
|
|
|
|
+ "Supplier", //供应商单位名称
|
|
|
|
+ "SupplierContactor", //供应商联系人
|
|
|
|
+ "SupplierPhone", //供应商联系电话
|
|
|
|
+ "SupplierEmail", //供应商电子邮件
|
|
|
|
+ "SupplierWeb", //供应商网址
|
|
|
|
+ "SupplierFax", //供应商传真
|
|
|
|
+ "Maintainer", //维修商单位名称
|
|
|
|
+ "MaintainerContactor", //维修商联系人
|
|
|
|
+ "MaintainerPhone", //维修商联系电话
|
|
|
|
+ "MaintainerEmail", //维修商电子邮件
|
|
|
|
+ "MaintainerWeb", //维修商网址
|
|
|
|
+ "MaintainerFax", //维修商传真
|
|
|
|
+ "Insurer", //保险公司名称
|
|
|
|
+ "InsurerContactor", //保险公司联系人
|
|
|
|
+ "InsurerPhone", //保险公司联系电话
|
|
|
|
+ 'InsurerEmail', //保险公司电子邮件
|
|
|
|
+ "InsurerWeb", //保险公司网址
|
|
|
|
+ "InsurerFax" //保险公司传真
|
|
// "DPManufacturerID",//品牌型号Id
|
|
// "DPManufacturerID",//品牌型号Id
|
|
// "DPSupplierID",//供应商信息Id
|
|
// "DPSupplierID",//供应商信息Id
|
|
// "DPMaintainerID",//维修商信息Id
|
|
// "DPMaintainerID",//维修商信息Id
|
|
@@ -93,23 +93,23 @@ let cutArr = [{
|
|
}]
|
|
}]
|
|
|
|
|
|
let newData = [{
|
|
let newData = [{
|
|
- name: "品牌型号",
|
|
|
|
- code: "DPManufacturerID",
|
|
|
|
- num: 2,
|
|
|
|
- }, {
|
|
|
|
- name: "供应商信息",
|
|
|
|
- code: "DPSupplierID",
|
|
|
|
- num: 8
|
|
|
|
- }, {
|
|
|
|
- name: "维修商信息",
|
|
|
|
- code: "DPMaintainerID",
|
|
|
|
- num: 35
|
|
|
|
- }, {
|
|
|
|
- name: "保险公司信息",
|
|
|
|
- code: "DPInsurerID",
|
|
|
|
- num: 42
|
|
|
|
- }]
|
|
|
|
- //创建部件固定不显示-管理部件固定不显示(即编辑模式)
|
|
|
|
|
|
+ name: "品牌型号",
|
|
|
|
+ code: "DPManufacturerID",
|
|
|
|
+ num: 2,
|
|
|
|
+}, {
|
|
|
|
+ name: "供应商信息",
|
|
|
|
+ code: "DPSupplierID",
|
|
|
|
+ num: 8
|
|
|
|
+}, {
|
|
|
|
+ name: "维修商信息",
|
|
|
|
+ code: "DPMaintainerID",
|
|
|
|
+ num: 35
|
|
|
|
+}, {
|
|
|
|
+ name: "保险公司信息",
|
|
|
|
+ code: "DPInsurerID",
|
|
|
|
+ num: 42
|
|
|
|
+}]
|
|
|
|
+//创建部件固定不显示-管理部件固定不显示(即编辑模式)
|
|
let partsAddNoShow = [
|
|
let partsAddNoShow = [
|
|
'EquipID',
|
|
'EquipID',
|
|
'EquipName',
|
|
'EquipName',
|
|
@@ -220,7 +220,7 @@ const showTools = {
|
|
scound = 0,
|
|
scound = 0,
|
|
three = 0,
|
|
three = 0,
|
|
four = 0
|
|
four = 0
|
|
- arr.find(function(value, index, arr) {
|
|
|
|
|
|
+ arr.find(function (value, index, arr) {
|
|
if (
|
|
if (
|
|
(value.InfoPointName == "品牌" ||
|
|
(value.InfoPointName == "品牌" ||
|
|
value.InfoPointName == "设备型号" ||
|
|
value.InfoPointName == "设备型号" ||
|
|
@@ -360,8 +360,8 @@ const showTools = {
|
|
type: "numeric",
|
|
type: "numeric",
|
|
numericFormat: {
|
|
numericFormat: {
|
|
pattern: "0,0.00"
|
|
pattern: "0,0.00"
|
|
- // culture: 'de-DE' // use this for EUR (German),
|
|
|
|
- // more cultures available on http://numbrojs.com/languages.html
|
|
|
|
|
|
+ // culture: 'de-DE' // use this for EUR (German),
|
|
|
|
+ // more cultures available on http://numbrojs.com/languages.html
|
|
}
|
|
}
|
|
};
|
|
};
|
|
} else if (item.InputMode == "C5") {
|
|
} else if (item.InputMode == "C5") {
|
|
@@ -417,7 +417,7 @@ const showTools = {
|
|
} else {
|
|
} else {
|
|
return false
|
|
return false
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
|
|
|
|
}).filter(item => item);
|
|
}).filter(item => item);
|
|
return data
|
|
return data
|
|
@@ -498,8 +498,8 @@ const showTools = {
|
|
type: "numeric",
|
|
type: "numeric",
|
|
numericFormat: {
|
|
numericFormat: {
|
|
pattern: "0,0.00"
|
|
pattern: "0,0.00"
|
|
- // culture: 'de-DE' // use this for EUR (German),
|
|
|
|
- // more cultures available on http://numbrojs.com/languages.html
|
|
|
|
|
|
+ // culture: 'de-DE' // use this for EUR (German),
|
|
|
|
+ // more cultures available on http://numbrojs.com/languages.html
|
|
}
|
|
}
|
|
};
|
|
};
|
|
} else if (item.InputMode == "C5") {
|
|
} else if (item.InputMode == "C5") {
|
|
@@ -876,8 +876,11 @@ const showTools = {
|
|
* @param {*} taizhang 是否是台账类型
|
|
* @param {*} taizhang 是否是台账类型
|
|
*
|
|
*
|
|
*/
|
|
*/
|
|
- headerTextFilter (arr, type, onlyRead, showType, taizhang = false) {
|
|
|
|
|
|
+ headerTextFilter(arr, type, onlyRead, showType, taizhang = false) {
|
|
let data = arr.map(item => {
|
|
let data = arr.map(item => {
|
|
|
|
+ if (type == "property" && item.FirstTag == "RunParam") { //资产台账不显示运行参数
|
|
|
|
+ return undefined
|
|
|
|
+ }
|
|
if (onlyRead) { //只读模式
|
|
if (onlyRead) { //只读模式
|
|
if (!showTools.filterUnshow(onlyRead, type, item.InfoPointCode)) { //过滤固定不显示字段
|
|
if (!showTools.filterUnshow(onlyRead, type, item.InfoPointCode)) { //过滤固定不显示字段
|
|
return undefined
|
|
return undefined
|
|
@@ -915,8 +918,11 @@ const showTools = {
|
|
}).filter(d => d)
|
|
}).filter(d => d)
|
|
return data
|
|
return data
|
|
},
|
|
},
|
|
- headerTypeFilter (arr, type, onlyRead, showType, taizhang = false) {
|
|
|
|
|
|
+ headerTypeFilter(arr, type, onlyRead, showType, taizhang = false) {
|
|
let data = arr.map(item => {
|
|
let data = arr.map(item => {
|
|
|
|
+ if (type == "property" && item.FirstTag == "RunParam") { //资产台账不显示运行参数
|
|
|
|
+ return undefined
|
|
|
|
+ }
|
|
if (onlyRead) { //只读模式
|
|
if (onlyRead) { //只读模式
|
|
if (!showTools.filterUnshow(onlyRead, type, item.InfoPointCode)) { //过滤固定不显示字段
|
|
if (!showTools.filterUnshow(onlyRead, type, item.InfoPointCode)) { //过滤固定不显示字段
|
|
return undefined
|
|
return undefined
|
|
@@ -949,19 +955,18 @@ const showTools = {
|
|
} else {
|
|
} else {
|
|
return undefined
|
|
return undefined
|
|
}
|
|
}
|
|
-
|
|
|
|
}
|
|
}
|
|
}).filter(d => d)
|
|
}).filter(d => d)
|
|
return data
|
|
return data
|
|
},
|
|
},
|
|
- isUnit (item) {
|
|
|
|
|
|
+ isUnit(item) {
|
|
if (!item.Unit || item.Unit == "") {
|
|
if (!item.Unit || item.Unit == "") {
|
|
return item.InfoPointName;
|
|
return item.InfoPointName;
|
|
} else {
|
|
} else {
|
|
return item.InfoPointName + "(" + item.Unit + ")";
|
|
return item.InfoPointName + "(" + item.Unit + ")";
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- textFormat (item, onlyRead) {
|
|
|
|
|
|
+ textFormat(item, onlyRead) {
|
|
if (item.InfoPointCode == "EquipQRCode") {
|
|
if (item.InfoPointCode == "EquipQRCode") {
|
|
return {
|
|
return {
|
|
data: item.Path,
|
|
data: item.Path,
|
|
@@ -1034,16 +1039,16 @@ const showTools = {
|
|
readOnly: onlyRead,
|
|
readOnly: onlyRead,
|
|
correctFormat: true
|
|
correctFormat: true
|
|
};
|
|
};
|
|
- } else if ( item.InputMode == "A3" ||
|
|
|
|
- item.InputMode == "A4" ||
|
|
|
|
- item.InputMode == "B1" ||
|
|
|
|
- item.InputMode == "B2" ||
|
|
|
|
- item.InputMode == "F1" ||
|
|
|
|
- item.InputMode == "F2" ||
|
|
|
|
- item.InputMode == "L1" ||
|
|
|
|
- item.InputMode == "L2" ||
|
|
|
|
- item.InputMode == "L" ||
|
|
|
|
- item.InputMode == "M" ) { //文本输入
|
|
|
|
|
|
+ } else if (item.InputMode == "A3" ||
|
|
|
|
+ item.InputMode == "A4" ||
|
|
|
|
+ item.InputMode == "B1" ||
|
|
|
|
+ item.InputMode == "B2" ||
|
|
|
|
+ item.InputMode == "F1" ||
|
|
|
|
+ item.InputMode == "F2" ||
|
|
|
|
+ item.InputMode == "L1" ||
|
|
|
|
+ item.InputMode == "L2" ||
|
|
|
|
+ item.InputMode == "L" ||
|
|
|
|
+ item.InputMode == "M") { //文本输入
|
|
return {
|
|
return {
|
|
data: item.Path,
|
|
data: item.Path,
|
|
readOnly: onlyRead
|
|
readOnly: onlyRead
|
|
@@ -1055,7 +1060,7 @@ const showTools = {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- inputModeFilter (item, onlyRead) {
|
|
|
|
|
|
+ inputModeFilter(item, onlyRead) {
|
|
if (item.InfoPointCode == "EquipQRCode") {
|
|
if (item.InfoPointCode == "EquipQRCode") {
|
|
return {
|
|
return {
|
|
data: item.Path,
|
|
data: item.Path,
|
|
@@ -1142,16 +1147,16 @@ const showTools = {
|
|
readOnly: !item.Editable,
|
|
readOnly: !item.Editable,
|
|
correctFormat: true
|
|
correctFormat: true
|
|
};
|
|
};
|
|
- } else if ( item.InputMode == "A3" ||
|
|
|
|
- item.InputMode == "A4" ||
|
|
|
|
- item.InputMode == "B1" ||
|
|
|
|
- item.InputMode == "B2" ||
|
|
|
|
- item.InputMode == "F1" ||
|
|
|
|
- item.InputMode == "F2" ||
|
|
|
|
- item.InputMode == "L1" ||
|
|
|
|
- item.InputMode == "L2" ||
|
|
|
|
- item.InputMode == "L" ||
|
|
|
|
- item.InputMode == "M" ) { //文本输入
|
|
|
|
|
|
+ } else if (item.InputMode == "A3" ||
|
|
|
|
+ item.InputMode == "A4" ||
|
|
|
|
+ item.InputMode == "B1" ||
|
|
|
|
+ item.InputMode == "B2" ||
|
|
|
|
+ item.InputMode == "F1" ||
|
|
|
|
+ item.InputMode == "F2" ||
|
|
|
|
+ item.InputMode == "L1" ||
|
|
|
|
+ item.InputMode == "L2" ||
|
|
|
|
+ item.InputMode == "L" ||
|
|
|
|
+ item.InputMode == "M") { //文本输入
|
|
return {
|
|
return {
|
|
data: item.Path,
|
|
data: item.Path,
|
|
readOnly: !item.Editable
|
|
readOnly: !item.Editable
|
|
@@ -1164,7 +1169,8 @@ const showTools = {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
filterUnshow: (onlyRead, type, code) => {
|
|
filterUnshow: (onlyRead, type, code) => {
|
|
- let falg = true, data = fieldData[type]
|
|
|
|
|
|
+ let falg = true,
|
|
|
|
+ data = fieldData[type]
|
|
if (onlyRead) {
|
|
if (onlyRead) {
|
|
data.onlyRead.map(item => {
|
|
data.onlyRead.map(item => {
|
|
if (item == code) {
|
|
if (item == code) {
|
|
@@ -1192,4 +1198,4 @@ const showTools = {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-export default showTools
|
|
|
|
|
|
+export default showTools
|