|
@@ -369,8 +369,6 @@ export default {
|
|
|
// updateParams.data.Content[0].EquipmentMark = other.EquipmentMark
|
|
|
break
|
|
|
case '需拆分处理':
|
|
|
- console.log('---------------')
|
|
|
- console.log(t.other)
|
|
|
let SplitPoints = t.other.devArr.length ? t.other.devArr : undefined
|
|
|
let DataRuleContent4 = undefined
|
|
|
var enum5 = null
|
|
@@ -392,7 +390,6 @@ export default {
|
|
|
}
|
|
|
ele.DataRuleContent = JSON.stringify([cutStr, enum5])
|
|
|
})
|
|
|
- console.log(SplitPoints)
|
|
|
eachData.SplitPoints = SplitPoints;
|
|
|
// otherParams = {
|
|
|
// SplitPoints: SplitPoints
|
|
@@ -503,8 +500,6 @@ export default {
|
|
|
let length = val.RelationList.length
|
|
|
let eqMark = this.editData.Point.EquipmentMark
|
|
|
this.form.EquipmentMark = eqMark;
|
|
|
- console.log('-------------')
|
|
|
- console.log(val)
|
|
|
if (length) {
|
|
|
var data = val.RelationList[0]
|
|
|
let dict = [data.SpecialtyCode, data.SystemCode, data.EquipmentTypeCode]
|
|
@@ -514,19 +509,29 @@ export default {
|
|
|
let eachData = [];
|
|
|
if (t.TypeCode == 'Eq' || t.TypeCode == 'Ec' || t.TypeCode == 'Sp') {
|
|
|
eachData = [t.TypeCode, t.EquipmentTypeCode, t.InfomationPointCode]
|
|
|
+ if (this.pointToRelationID[`${t.TypeCode}-${t.EquipmentTypeCode}-${t.InfomationPointCode}`]) {
|
|
|
+ return undefined
|
|
|
+ }
|
|
|
this.pointToRelationID[`${t.TypeCode}-${t.EquipmentTypeCode}-${t.InfomationPointCode}`] = t.Id
|
|
|
} else if (t.TypeCode == 'Sy') {
|
|
|
eachData = [t.TypeCode, t.SpecialtyCode, t.SystemCode, t.InfomationPointCode]
|
|
|
+ if (this.pointToRelationID[`${t.TypeCode}-${t.SpecialtyCode}-${t.SystemCode}-${t.InfomationPointCode}`]) {
|
|
|
+ return undefined
|
|
|
+ }
|
|
|
this.pointToRelationID[`${t.TypeCode}-${t.SpecialtyCode}-${t.SystemCode}-${t.InfomationPointCode}`] = t.Id
|
|
|
} else {
|
|
|
eachData = [t.TypeCode, t.InfomationPointCode]
|
|
|
+ if (this.pointToRelationID[`${t.TypeCode}-${t.InfomationPointCode}`]) {
|
|
|
+ return undefined
|
|
|
+ }
|
|
|
this.pointToRelationID[`${t.TypeCode}-${t.InfomationPointCode}`] = t.Id
|
|
|
}
|
|
|
return eachData;
|
|
|
- })
|
|
|
+ }).filter(item => item)
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.dictionaryCas.setCascaderVal(tempArr);
|
|
|
})
|
|
|
+ let typeTempList = []
|
|
|
this.typeList = val.RelationList.map(t => {
|
|
|
if (t.TypeCode == 'Eq' || t.TypeCode == 'Ec' || t.TypeCode == 'Sp') {
|
|
|
t.name = `${t.Type}-${t.EquipmentType}-${t.InfomationPoint}`
|
|
@@ -535,8 +540,12 @@ export default {
|
|
|
} else {
|
|
|
t.name = `${t.Type}-${t.InfomationPoint}`
|
|
|
}
|
|
|
+ if (typeTempList.indexOf(t.name) > -1) {
|
|
|
+ return undefined
|
|
|
+ }
|
|
|
+ typeTempList.push(t.name)
|
|
|
return t;
|
|
|
- });
|
|
|
+ }).filter(item => item);
|
|
|
this.form.DataRuleType = data.DataRuleType
|
|
|
// this.handleItemChange(dict, () => {
|
|
|
// this.unitObj = this.infoDict[data.InfomationPointCode]
|