|
@@ -50,7 +50,7 @@
|
|
|
</p>
|
|
|
<!-- components -->
|
|
|
<no-handle :ref='"noHandle"+index' v-if='it.DataRuleType == "无需处理,直接使用"' :noHandleShow='noHandleShow'></no-handle>
|
|
|
- <auto-handle :ref='"autoHandle"+index' v-else-if='it.DataRuleType == "需自动单位转换"' :unitObj='it' :autoHandleShow='autoHandleShow'>
|
|
|
+ <auto-handle :ref='"autoHandle"+index' v-else-if='it.DataRuleType == "需自动单位转换"' :unitObj='it.unitObj' :autoHandleShow='autoHandleShow'>
|
|
|
</auto-handle>
|
|
|
<enum-handle :ref='"enumHandle"+index' v-else-if='it.DataRuleType == "需按设置枚举转换"' :enumHandleShow='enumHandleShow'></enum-handle>
|
|
|
<formula-handle :ref='"formulaHandle"+index' v-else-if='it.DataRuleType == "需按公式转换"' :formulaHandleShow='formulaHandleShow'>
|
|
@@ -213,7 +213,7 @@ export default {
|
|
|
let componsplitHandle = `splitHandle${i}`
|
|
|
this.$refs[componsplitHandle][0].getForm(splitHandle => {
|
|
|
if (splitHandle) {
|
|
|
- this.typeList[i].other = formulaHandle
|
|
|
+ this.typeList[i].other = splitHandle
|
|
|
// this.saveForm(this.form, splitHandle)
|
|
|
} else {
|
|
|
this.errMsg()
|
|
@@ -500,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]
|
|
@@ -511,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}`
|
|
@@ -532,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]
|
|
@@ -690,6 +702,13 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
this.typeList = this.typeList.map((t, i) => {
|
|
|
+ t.unitObj = {
|
|
|
+ infoPointCode: data[val[i][val[i].length - 1]].InfoPointCode,
|
|
|
+ infoPointName: data[val[i][val[i].length - 1]].InfoPointName,
|
|
|
+ dataSource: data[val[i][val[i].length - 1]].DataSource || '',
|
|
|
+ type: data[val[i][val[i].length - 1]].Type,
|
|
|
+ unit: data[val[i][val[i].length - 1]].Unit
|
|
|
+ }
|
|
|
t.ValueDescription = this.delDataSource(data[val[i][val[i].length - 1]].DataSource)
|
|
|
return t;
|
|
|
})
|