NEZ-2692 fix: projetc topo bug

This commit is contained in:
zhangyu
2023-03-15 15:51:38 +08:00
parent 488ba27f1c
commit f61ab95c9c
3 changed files with 37 additions and 4 deletions

View File

@@ -1,8 +1,35 @@
<template>
<div class="pens-data right-box__container" :key="pen.id">
<div v-if="pen.id">
<!-- <el-input-number v-model="pen.x" @change="change('x')"/>-->
<!-- node-->
<div class="form-row-box">
<div class="form-row-content">
<div class="form-row-item">
<div class="form-row-key">
{{$t('asset.id')}}
</div>
<div class="form-row-value">
<el-input
size="small"
class="input"
v-model.number="pen.id"
readonly
@change="change('id')"></el-input>
</div>
</div>
<div class="form-row-item">
<div class="form-row-key">
{{$t('overall.name')}}
</div>
<div class="form-row-value">
<el-input
size="small"
class="input"
v-model.number="pen.nzName"
@change="change('nzName')"></el-input>
</div>
</div>
</div>
</div>
<div v-if="!pen.type">
<div class="form-row-box">
<!-- Module -->

View File

@@ -171,6 +171,10 @@ export default {
})
},
previewExit () {
if (this.$refs.topTool && this.$refs.topTool.option.map) {
this.$refs.topTool.option.map = false
getTopology(this.meta2dId).hideMap()
}
this.isPreview = false
getTopology(this.meta2dId).lock(0)
getTopology(this.meta2dId).stopAnimate()
@@ -186,7 +190,7 @@ export default {
cancelTopology () {
this.isPreview = false
this.$store.commit('setShowTopoScreen', this.topoScreenState)
if (this.$refs.topTool.option.map) {
if (this.$refs.topTool && this.$refs.topTool.option.map) {
getTopology(this.meta2dId).hideMap()
}
this.$emit('exitEdit', true)

View File

@@ -25,11 +25,13 @@ export default {
const result = await this.$http.get(url) // 获取本地的config.json 判断是否需要清空localStorage 以及设备的宽 和 axios的baseUrl
this.$axios.defaults.baseURL = result.body.baseUrl
const version = result.body.version
const baseUrl = result.body.baseUrl
localStorage.setItem('nz-baseURL', baseUrl)
const defaultWindowWidth = result.body.width || 1024
if (version !== localStorage.getItem('nz-version')) {
localStorage.clear()
localStorage.clear()
localStorage.setItem('nz-version', version)
localStorage.setItem('nz-baseURL', baseUrl)
herfSpiltArr[2] = herfSpiltArr[2] + '?t=' + new Date().getTime()
window.location.href = herfSpiltArr[0] + '//' + herfSpiltArr[2]
}