fix:重置topology后缩放回到1
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="right-box right-box-edit-endpoint" v-clickoutside="clickOutside">
|
<div class="mc" @click.self="clickOutside">
|
||||||
|
<div class="right-box right-box-edit-endpoint">
|
||||||
<!-- begin--顶部按钮-->
|
<!-- begin--顶部按钮-->
|
||||||
<div class="right-box-top-btns">
|
<div class="right-box-top-btns">
|
||||||
<!--<button id="edit-ep-del" type="button" @click="del" class="nz-btn nz-btn-size-normal nz-btn-size-alien nz-btn-style-light ">-->
|
<!--<button id="edit-ep-del" type="button" @click="del" class="nz-btn nz-btn-size-normal nz-btn-size-alien nz-btn-style-light ">-->
|
||||||
@@ -127,6 +128,7 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -211,7 +213,7 @@
|
|||||||
this.addNodeInit()
|
this.addNodeInit()
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
addNodeInit(){
|
addNodeInit(selImageId){
|
||||||
this.$get('/project/topo/icon').then(res=>{
|
this.$get('/project/topo/icon').then(res=>{
|
||||||
this.iconArray=res.data.list;
|
this.iconArray=res.data.list;
|
||||||
this.iconArray.forEach((item,index)=>{
|
this.iconArray.forEach((item,index)=>{
|
||||||
@@ -222,6 +224,9 @@
|
|||||||
if(index===this.iconArray.length-1){
|
if(index===this.iconArray.length-1){
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
this.iconArray=[...this.iconArray];
|
this.iconArray=[...this.iconArray];
|
||||||
|
if(selImageId){
|
||||||
|
this.form.iconId=selImageId;
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -334,9 +339,8 @@
|
|||||||
form.append("name", fileName.substring(0, fileName.lastIndexOf(".")));
|
form.append("name", fileName.substring(0, fileName.lastIndexOf(".")));
|
||||||
this.$post('/project/topo/icon',form,{'Content-Type': 'multipart/form-data'}).then(res => {
|
this.$post('/project/topo/icon',form,{'Content-Type': 'multipart/form-data'}).then(res => {
|
||||||
if(res.code == 200 ){
|
if(res.code == 200 ){
|
||||||
this.form.iconId=res.data.id;
|
|
||||||
this.$message({duration: 2000, type: 'success', message: this.$t("tip.saveSuccess")});
|
this.$message({duration: 2000, type: 'success', message: this.$t("tip.saveSuccess")});
|
||||||
this.addNodeInit();
|
this.addNodeInit(res.data.id);
|
||||||
}else{
|
}else{
|
||||||
this.$message.error(res.msg);
|
this.$message.error(res.msg);
|
||||||
}
|
}
|
||||||
@@ -348,6 +352,14 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
.mc{
|
||||||
|
position: fixed;
|
||||||
|
width: 100vw;
|
||||||
|
height: 100vh;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
z-index: 11;
|
||||||
|
}
|
||||||
/deep/ .avatar-uploader{
|
/deep/ .avatar-uploader{
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
color: #1989fa;
|
color: #1989fa;
|
||||||
|
|||||||
@@ -211,6 +211,7 @@
|
|||||||
},500)
|
},500)
|
||||||
}
|
}
|
||||||
this.$refs['topology'].viewsCenter={x:0,y:0};
|
this.$refs['topology'].viewsCenter={x:0,y:0};
|
||||||
|
this.$refs['topology'].zoom=1;
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
formatNodesArr(arr){
|
formatNodesArr(arr){
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="system">
|
<div class="system" v-scroll-bar>
|
||||||
<el-tabs type="border-card" @tab-click="selectTab" v-model="activeTab" class="system-tabs" >
|
<el-tabs type="border-card" @tab-click="selectTab" v-model="activeTab" class="system-tabs" >
|
||||||
<el-tab-pane :label="$t('config.system.basic.basic')" name="basic">
|
<el-tab-pane :label="$t('config.system.basic.basic')" name="basic">
|
||||||
<div class="system-config-form">
|
<div class="system-config-form">
|
||||||
@@ -659,13 +659,14 @@
|
|||||||
<style scoped>
|
<style scoped>
|
||||||
.system{
|
.system{
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
.system-config-form{
|
.system-config-form{
|
||||||
width: 61.8% !important;
|
width: 61.8% !important;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
.linkBox{
|
.linkBox{
|
||||||
max-height: calc(100vh - 300px);
|
max-height: 800px;
|
||||||
width: 800px;
|
width: 800px;
|
||||||
}
|
}
|
||||||
.scrollBox{
|
.scrollBox{
|
||||||
|
|||||||
Reference in New Issue
Block a user