Commit ed5f1ac0 by 史敦盼

判空

1 parent 28d6ee83
...@@ -868,7 +868,8 @@ export default { ...@@ -868,7 +868,8 @@ export default {
tabType: '元模型图元', tabType: '元模型图元',
scopeApplicationOptions: [], scopeApplicationOptions: [],
rowData: {}, rowData: {},
predefineColors: archiEleColor predefineColors: archiEleColor,
graphId: ''
} }
}, },
mounted() { mounted() {
...@@ -1116,6 +1117,7 @@ export default { ...@@ -1116,6 +1117,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
...@@ -1302,6 +1304,7 @@ export default { ...@@ -1302,6 +1304,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'
...@@ -1380,6 +1383,7 @@ export default { ...@@ -1380,6 +1383,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'
...@@ -1561,7 +1565,7 @@ export default { ...@@ -1561,7 +1565,7 @@ export default {
this.pager.size = result.data.size this.pager.size = result.data.size
if (result.data.records.length > 0) { if (result.data.records.length > 0) {
result.data.records.map((item) => { result.data.records.map((item) => {
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!