NEZ-2239 fix: terminal 样式错误 以及地图resize 不生效

This commit is contained in:
zhangyu
2022-10-11 17:59:23 +08:00
parent 69aeee0d72
commit 4c8052e0bc
7 changed files with 49 additions and 25 deletions

View File

@@ -6,7 +6,7 @@
background: $--background-color-empty;
z-index: 2000;
height: 300px;
padding: 0 !important;
.shell-split {
cursor: ns-resize;
height: 8px;
@@ -210,6 +210,7 @@
}
.sub-list{
background: #000 !important;
left: -2px;
}
/* 上滑resize工具条--end */
.config-dropdown.w260{

View File

@@ -1,5 +1,5 @@
<template>
<div class="overview">
<div class="overview" >
<div class="content-col-content" style="padding:0">
<div :id="'map' + (isFullscreen ? '-screen-' : '' ) + chartInfo.id " style="height: 100%; width: 100%"></div>
</div>
@@ -301,19 +301,26 @@ export default {
},
pointAnimation (timeStep) {
const opacity = 0.5 + (timeStep % 1000) / 1000 / 2
this.map && this.map.setPaintProperty('pointLayer', 'circle-opacity', [
'step',
['get', 'color'],
0.5,
2,
opacity,
3,
0.5
])
requestAnimationFrame(this.pointAnimation)
if (this.map) {
this.map.setPaintProperty('pointLayer', 'circle-opacity', [
'step',
['get', 'color'],
0.5,
2,
opacity,
3,
0.5
])
requestAnimationFrame(this.pointAnimation)
}
},
resize () {
this.map.resize()
console.log(123123123123)
setTimeout(() => {
this.map && this.map.remove()
this.map = null
this.initChart()
}, 100)
}
},
beforeDestroy () {

View File

@@ -1768,10 +1768,15 @@ export default {
const domRect = dom ? dom.getBoundingClientRect() : {}
getTopology(this.topologyIndex).canvasPos = domRect
if (this.fromOverView) {
if (this.oldTopologyData && !this.oldTopologyData.pens) {
this.oldTopologyData.pens = []
try {
const obj = JSON.parse(this.oldTopologyData)
if (obj && !obj.pens) {
obj.pens = []
}
getTopology(this.topologyIndex).open(obj)
} catch (e) {
console.log(e)
}
getTopology(this.topologyIndex).open(this.oldTopologyData || {})
}
let flag = false
const position = {

View File

@@ -31,17 +31,19 @@ export default {
},
methods: {
changeDetailType (flag) {
this.detailType = flag
const query = { ...this.$route.query, detailType: flag }
setTimeout(() => {
const query = { ...this.$route.query, detailType: flag }
query.bottomBox = this.detailType !== 'view'
this.$router.replace({ query: query }).catch(err => {})
}, 100)
if (this.detailType === flag) {
return
}
this.detailType = flag
// this.$refs.dataList.bottomBox.showSubList = false
// if (this.orderBy) {
// this.detailViewRightObj = ''
// }
query.bottomBox = this.detailType !== 'view'
this.$router.replace({ query: query }).catch(err => {})
let dataList = ''
localStorage.setItem('detail-view-' + this.tableId, this.detailType)
if (this.detailType === 'view') {

View File

@@ -2234,10 +2234,15 @@ export default {
let domRect = document.getElementById('topology-canvas' + this.topologyIndex).getBoundingClientRect()
getTopology(this.topologyIndex).canvasPos = domRect
if (this.fromOverView) {
if (this.oldTopologyData && !this.oldTopologyData.pens) {
this.oldTopologyData.pens = []
try {
const obj = JSON.parse(this.oldTopologyData)
if (obj && !obj.pens) {
obj.pens = []
}
getTopology(this.topologyIndex).open(obj)
} catch (e) {
console.log(e)
}
getTopology(this.topologyIndex).open(this.oldTopologyData)
}
let flag = false

View File

@@ -43,7 +43,8 @@ const store = new Vuex.Store({
globalShow: false,
globalSearchId: '',
isRouteLive: true,
nowPath: ''
nowPath: '',
myEvent: new Event('resize')
},
getters: {
getGlobalSearchId (state) {
@@ -181,6 +182,7 @@ const store = new Vuex.Store({
isShrink (state) {
state.isShrink = !state.isShrink
localStorage.setItem('nz-left-menu-shrink', state.isShrink)
window.dispatchEvent(state.myEvent)
},
setMetricsList (state, metricsList) {
state.metricsList = [...metricsList]

View File

@@ -45,7 +45,8 @@ const store = new Vuex.Store({
globalShow: false,
globalSearchId: '',
isRouteLive: true,
nowPath: ''
nowPath: '',
myEvent: new Event('resize')
},
getters: {
getGlobalSearchId (state) {
@@ -183,6 +184,7 @@ const store = new Vuex.Store({
isShrink (state) {
state.isShrink = !state.isShrink
localStorage.setItem('nz-left-menu-shrink', state.isShrink)
window.dispatchEvent(state.myEvent)
},
setMetricsList (state, metricsList) {
state.metricsList = [...metricsList]