diff --git a/nezha-fronted/src/components/common/header.vue b/nezha-fronted/src/components/common/header.vue index 59bc334bd..77684bcd5 100644 --- a/nezha-fronted/src/components/common/header.vue +++ b/nezha-fronted/src/components/common/header.vue @@ -9,7 +9,7 @@ > -
+
{{$store.state.consoleCount<=10?$store.state.consoleCount:'10+'}}
@@ -150,16 +150,12 @@ - - - - + + - - - + +
@@ -174,6 +170,13 @@ }, data() { return { + rightBox: { + project: {show: false}, + module: {show: false}, + endpoint: {show: false}, + asset: {show: false}, + alertRule: {show: false}, + }, username: sessionStorage.getItem("nz-username"), language: localStorage.getItem("nz-language") ? localStorage.getItem("nz-language") : 'en', assetData: [], @@ -181,10 +184,6 @@ activeItemIndex:'', activeItemIndexes: [], hoverItemIndex: '', - editPanel:{//新增or编辑的panel - id:'', - name: '' - }, projectData: [], //顶部菜单project列表中的数据 editProject: {id: '', name: '', remark: ''}, //新增/编辑的project currentProject: {id: '', name: '', remark: ''}, //module/endpoint弹框用来回显project @@ -257,15 +256,6 @@ } }, methods: { - closeAsset() { - this.addUnitShow = false; - this.assetBoxShow = false; - }, - refreshAsset(flag) { - if (flag && this.$route.path == "/asset") { - window.location.reload(); - } - }, cli(){ this.$store.commit('openConsole'); }, @@ -284,14 +274,11 @@ }, createBox(item) { - if (item.type == 0) { - this.$refs.panelBox.show(true); - this.editPanel = {id: '', name: ''}; - }else if (item.type == 1) { - this.$refs.projectBox.show(true,true); + if (item.type == 1) { + this.rightBox.project.show = true; this.editProject = {id: '', name: '', remark: ''}; } else if (item.type == 2) { - this.$refs.moduleBox.show(true,true); + this.rightBox.module.show = true; this.editModule = { id: '', name: '', @@ -437,8 +424,8 @@ }) }, toEditProject(p) { - this.$refs.projectBox.show(true,true); this.editProject = Object.assign({}, p); + this.rightBox.project.show = true; }, indOf(a, b) { let c = []; diff --git a/nezha-fronted/src/components/common/rightBox/addEndpointBox.vue b/nezha-fronted/src/components/common/rightBox/addEndpointBox.vue index da8392f75..f08737075 100644 --- a/nezha-fronted/src/components/common/rightBox/addEndpointBox.vue +++ b/nezha-fronted/src/components/common/rightBox/addEndpointBox.vue @@ -1,229 +1,226 @@ diff --git a/nezha-fronted/src/components/common/rightBox/editEndpointBox.vue b/nezha-fronted/src/components/common/rightBox/editEndpointBox.vue index 3f593337c..c2d6f81f2 100644 --- a/nezha-fronted/src/components/common/rightBox/editEndpointBox.vue +++ b/nezha-fronted/src/components/common/rightBox/editEndpointBox.vue @@ -1,206 +1,119 @@ diff --git a/nezha-fronted/src/components/page/project/project.vue b/nezha-fronted/src/components/page/project/project.vue index 04f4371a0..f37f2f96e 100644 --- a/nezha-fronted/src/components/page/project/project.vue +++ b/nezha-fronted/src/components/page/project/project.vue @@ -26,10 +26,10 @@