fix: 修改 chart diagram 第一次上传图片无法使用的问题

This commit is contained in:
zhangyu
2021-09-26 14:45:11 +08:00
parent f465b6b129
commit 5abda52fb1
2 changed files with 49 additions and 15 deletions

View File

@@ -825,8 +825,9 @@ export default {
opacity: data.data.opacity,
name: data.name
}
if (this.fromOverView) { // 优化从首页来的加载速度
if (this.fromOverView || this.fromChartBox) { // 优化从首页来的加载速度
const arr = data.pens.filter(item => !item.type)
this.imgInit = false
this.addNodeInit(arr)
}
const timer = setInterval(() => {
@@ -1577,7 +1578,7 @@ export default {
const group = this.tools.find(tool => tool.group === this.uploadPic.unit)
this.iconArray.push({
...iconInfo.data.list[0],
image: data
image: data.data
})
if (group) {
group.children.push({
@@ -1585,7 +1586,7 @@ export default {
data: {
...imageTemp2.data,
text: res.data.imageName,
image: data,
image: data.data,
imageId: res.data.id,
unit: this.uploadPic.unit
}
@@ -1598,7 +1599,7 @@ export default {
data: {
...imageTemp2.data,
text: res.data.imageName,
image: data,
image: data.data,
imageId: res.data.id,
unit: this.uploadPic.unit
}