Commit e3c8c330 by 史敦盼

判空

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