Commit e3c8c330 by 史敦盼

判空

2 parents 7b342fd9 ed5f1ac0
......@@ -868,7 +868,8 @@ export default {
tabType: '元模型图元',
scopeApplicationOptions: [],
rowData: {},
predefineColors: archiEleColor
predefineColors: archiEleColor,
graphId: ''
}
},
created(){
......@@ -1127,6 +1128,7 @@ export default {
console.log(this.standardList[this.graphIndex2])
this.selectGraphSrc = this.standardList[this.graphIndex2].icon
this.selectGraphShape = this.standardList[this.graphIndex2].graphName
this.graphId = this.standardList[this.graphIndex2].graphId
} else {
this.selectGraphSrc =
'data:image/svg+xml;base64,' + this.graphList[this.graphIndex].icon
......@@ -1313,6 +1315,7 @@ export default {
referenceRelationship: this.ruleForm.referenceRelationship,
example: this.ruleForm.example,
scope: this.ruleForm.scope,
graphId: this.graphId
}
const requestParams =
this.is_add_edit == 'add'
......@@ -1391,6 +1394,7 @@ export default {
referenceRelationship: this.ruleForm.referenceRelationship,
example: this.ruleForm.example,
scope: this.ruleForm.scope,
graphId: this.graphId
}
const requestParams =
this.is_add_edit == 'add'
......@@ -1580,7 +1584,7 @@ export default {
)
item['archiLevelName'] = result1 ? result1.label : ''
item['archiBelongName'] = result2 ? result2.label : ''
if (item.icon.includes('svg+xml')) {
if (item?.icon.includes('svg+xml')) {
const item_icon = item.icon.split('base64,')[1]
const decode_item_icon = window.atob(item_icon) //svg解码,为字符串
const svgDocument = new DOMParser().parseFromString(
......
......@@ -1253,7 +1253,7 @@ export default {
},
// 获取上级元素
getPreArc(item) {
getPreArc({eleName: item.elementName}).then(res => {
getPreArc({eleName: item?.elementName}).then(res => {
if(res.code === 200) {
this.preArcList = res.data
}
......@@ -1268,7 +1268,7 @@ export default {
(item) => item.elementId == data,
)
this.getPreArc(currentItem)
if (currentItem.eaLevel == 1) {
if (currentItem?.eaLevel == 1) {
this.disabled1 = true
} else {
this.disabled1 = false
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!