|
@@ -131,7 +131,8 @@ export default {
|
|
|
formulaHandleShow: {},
|
|
|
splitHandleShow: {},
|
|
|
dictionaryData: [],
|
|
|
- typeList: []
|
|
|
+ typeList: [],
|
|
|
+ pointToRelationID: {}, //保存信息点->relationid map
|
|
|
}
|
|
|
},
|
|
|
props: {
|
|
@@ -253,6 +254,10 @@ export default {
|
|
|
//设备-部件-空间
|
|
|
eachData.EquipmentTypeCode = temp[1]
|
|
|
eachData.EquipmentType = tempNames[1]
|
|
|
+ let key = `${eachData.TypeCode}-${eachData.EquipmentTypeCode}-${eachData.InfomationPointCode}`
|
|
|
+ if (this.pointToRelationID[key]) {
|
|
|
+ eachData.Id = this.pointToRelationID[key]
|
|
|
+ }
|
|
|
} else if (temp.length == 4) {
|
|
|
eachData.SpecialtyCode = temp[1]
|
|
|
eachData.Specialty = tempNames[1]
|
|
@@ -260,6 +265,15 @@ export default {
|
|
|
eachData.System = tempNames[2]
|
|
|
eachData.EquipmentTypeCode = eachData.SystemCode //为了配置从动参取值存储
|
|
|
eachData.EquipmentType = eachData.System
|
|
|
+ let key = `${eachData.TypeCode}-${eachData.SpecialtyCode}-${eachData.SystemCode}-${eachData.InfomationPointCode}`
|
|
|
+ if (this.pointToRelationID[key]) {
|
|
|
+ eachData.Id = this.pointToRelationID[key]
|
|
|
+ }
|
|
|
+ } else if (temp.length == 2) {
|
|
|
+ let key = `${eachData.TypeCode}-${eachData.InfomationPointCode}`
|
|
|
+ if (this.pointToRelationID[key]) {
|
|
|
+ eachData.Id = this.pointToRelationID[key]
|
|
|
+ }
|
|
|
}
|
|
|
let type = t.DataRuleType;
|
|
|
updateParams.data.Content[0].EquipmentMark = eachData.EquipmentMark
|
|
@@ -491,15 +505,19 @@ export default {
|
|
|
if (length) {
|
|
|
var data = val.RelationList[0]
|
|
|
let dict = [data.SpecialtyCode, data.SystemCode, data.EquipmentTypeCode]
|
|
|
- //回显字典
|
|
|
+ //回显字典--并保存信息点->relationid map
|
|
|
+ this.pointToRelationID = {}
|
|
|
let tempArr = val.RelationList.map(t => {
|
|
|
let eachData = [];
|
|
|
if (t.TypeCode == 'Eq' || t.TypeCode == 'Ec' || t.TypeCode == 'Sp') {
|
|
|
eachData = [t.TypeCode, t.EquipmentTypeCode, t.InfomationPointCode]
|
|
|
+ this.pointToRelationID[`${t.TypeCode}-${t.EquipmentTypeCode}-${t.InfomationPointCode}`] = t.Id
|
|
|
} else if (t.TypeCode == 'Sy') {
|
|
|
eachData = [t.TypeCode, t.SpecialtyCode, t.SystemCode, t.InfomationPointCode]
|
|
|
+ this.pointToRelationID[`${t.TypeCode}-${t.SpecialtyCode}-${t.SystemCode}-${t.InfomationPointCode}`] = t.Id
|
|
|
} else {
|
|
|
eachData = [t.TypeCode, t.InfomationPointCode]
|
|
|
+ this.pointToRelationID[`${t.TypeCode}-${t.InfomationPointCode}`] = t.Id
|
|
|
}
|
|
|
return eachData;
|
|
|
})
|