NEZ-2756 fix: 修改首页topo 图片较少不加载的问题
This commit is contained in:
@@ -17,6 +17,7 @@
|
|||||||
:show-zoom="false"
|
:show-zoom="false"
|
||||||
class="meta2d-chart"
|
class="meta2d-chart"
|
||||||
:is-chart="true"
|
:is-chart="true"
|
||||||
|
:iconArray="iconArray"
|
||||||
:ref="'topology' + index"
|
:ref="'topology' + index"
|
||||||
/>
|
/>
|
||||||
</el-carousel-item>
|
</el-carousel-item>
|
||||||
@@ -37,7 +38,8 @@ export default {
|
|||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
topologyLoading: false,
|
topologyLoading: false,
|
||||||
allProject: []
|
allProject: [],
|
||||||
|
iconArray: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mixins: [chartMixin],
|
mixins: [chartMixin],
|
||||||
@@ -136,6 +138,9 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
// this.queryAllProjectData()
|
// this.queryAllProjectData()
|
||||||
|
this.$get('/topology/icon').then(res => {
|
||||||
|
this.iconArray = [...res.data.list]
|
||||||
|
})
|
||||||
},
|
},
|
||||||
beforeDestroy () {
|
beforeDestroy () {
|
||||||
this.allProject = []
|
this.allProject = []
|
||||||
|
|||||||
@@ -4,7 +4,8 @@ export default {
|
|||||||
topoData: {},
|
topoData: {},
|
||||||
querysArray: [],
|
querysArray: [],
|
||||||
meta2dType: '',
|
meta2dType: '',
|
||||||
params: {}
|
params: {},
|
||||||
|
iconArray: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|||||||
@@ -74,7 +74,6 @@ export default {
|
|||||||
offsetX: 0,
|
offsetX: 0,
|
||||||
offsetY: 0,
|
offsetY: 0,
|
||||||
moduleId: '',
|
moduleId: '',
|
||||||
iconArray: []
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mixins: [topoUtil],
|
mixins: [topoUtil],
|
||||||
@@ -121,9 +120,6 @@ export default {
|
|||||||
// meta2d.on('add', this.appPen) // 添加新画笔·
|
// meta2d.on('add', this.appPen) // 添加新画笔·
|
||||||
meta2d.on('click', this.topoClick) // click画笔·
|
meta2d.on('click', this.topoClick) // click画笔·
|
||||||
setTopology(this.meta2dId, meta2d)
|
setTopology(this.meta2dId, meta2d)
|
||||||
this.$get('/topology/icon').then(res => {
|
|
||||||
this.iconArray = [...res.data.list]
|
|
||||||
})
|
|
||||||
this.reload()
|
this.reload()
|
||||||
},
|
},
|
||||||
reload () {
|
reload () {
|
||||||
|
|||||||
@@ -126,6 +126,12 @@ export default {
|
|||||||
mixins: [meta2dMain, topoUtil],
|
mixins: [meta2dMain, topoUtil],
|
||||||
props: {
|
props: {
|
||||||
meta2dId: {}, // 唯一id 不可重复
|
meta2dId: {}, // 唯一id 不可重复
|
||||||
|
iconArray: {
|
||||||
|
type: Array,
|
||||||
|
default: () => {
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
},
|
||||||
topoData: {}, // topo图数据
|
topoData: {}, // topo图数据
|
||||||
isChart: {
|
isChart: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
|
|||||||
@@ -57,6 +57,7 @@
|
|||||||
:querysArray="isPreview.querysArray"
|
:querysArray="isPreview.querysArray"
|
||||||
:project="isPreview.currentProject"
|
:project="isPreview.currentProject"
|
||||||
:params="isPreview.params"
|
:params="isPreview.params"
|
||||||
|
:iconArray="iconArray"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@@ -620,7 +621,9 @@ export default {
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.ready = true
|
this.ready = true
|
||||||
}, 300)
|
}, 300)
|
||||||
|
this.$get('/topology/icon').then(res => {
|
||||||
|
this.iconArray = [...res.data.list]
|
||||||
|
})
|
||||||
this.initEvent()
|
this.initEvent()
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|||||||
Reference in New Issue
Block a user