From 1763eee5dfe249902201964d9d0649cb0b82c486 Mon Sep 17 00:00:00 2001
From: chenjinsong <523037378@qq.com>
Date: Wed, 8 Jan 2020 09:16:34 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20asset=E5=BC=B9=E6=A1=86=E5=86=85?=
=?UTF-8?q?=E4=BA=A4=E4=BA=92bug=E4=BF=AE=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
dc联动、各种操作点击交互bug
---
.../src/components/common/dcConfig.vue | 6 +-
.../src/components/common/header.vue | 22 +++-
.../src/components/common/language/en.js | 1 +
.../src/components/page/asset/asset.vue | 103 +++++++++---------
.../components/page/asset/assetAddUnit.vue | 8 +-
.../components/page/asset/assetEditUnit.vue | 41 +++++--
.../src/components/page/project/project.vue | 2 +-
nezha-fronted/src/store/index.js | 3 +-
8 files changed, 106 insertions(+), 80 deletions(-)
diff --git a/nezha-fronted/src/components/common/dcConfig.vue b/nezha-fronted/src/components/common/dcConfig.vue
index c2a14ac3a..15310edf0 100644
--- a/nezha-fronted/src/components/common/dcConfig.vue
+++ b/nezha-fronted/src/components/common/dcConfig.vue
@@ -26,7 +26,7 @@
-
+
@@ -108,7 +108,6 @@
}
},
openBox:function(){
- console.log("show")
this.popBox.show=true;
},
getUserData() {
@@ -125,7 +124,6 @@
if(valide){
const h = temp.$createElement;
if(!temp.idc.id){
- console.log("save")
temp.$post('idc', temp.idc).then(response => {
if (response.code === 200) {
temp.$message({duration: 1000, type: 'success', message: temp.$t("tip.deleteSuccess")});
@@ -136,7 +134,6 @@
}
})
}else{
- console.log("edit")
this.$put('idc', temp.idc).then(response => {
if (response.code === 200) {
temp.$message({duration: 1000, type: 'success', message: temp.$t("tip.deleteSuccess")});
@@ -201,7 +198,6 @@
this.title = this.$t('asset.createAssetTab.AddIdcTab.title');
this.popBox.isEdit=false;
this.resetData();
- console.log("reset")
}
}
},
diff --git a/nezha-fronted/src/components/common/header.vue b/nezha-fronted/src/components/common/header.vue
index b8998afcd..ef2f42d63 100644
--- a/nezha-fronted/src/components/common/header.vue
+++ b/nezha-fronted/src/components/common/header.vue
@@ -57,7 +57,12 @@
{{item.name}}
-
+
+
+
+
+
@@ -334,8 +339,11 @@
}
},
jumpToAsset(data, id) {
- this.$store.state.assetData.moduleData = data;
- this.$store.state.assetData.selectedData = id;
+ if (id != this.$store.state.assetData.selectedData) {
+ this.$store.state.assetData = {selectedData: id, step: this.$store.state.assetData.step+1};
+ } else {
+ this.$store.state.assetData.step = this.$store.state.assetData.step+1;
+ }
this.jumpTo(data);
},
jumpToProject(p) {
@@ -723,3 +731,9 @@
border-bottom-right-radius: 8px;
}
+
diff --git a/nezha-fronted/src/components/common/language/en.js b/nezha-fronted/src/components/common/language/en.js
index 95bf63b9f..28f4f1a59 100644
--- a/nezha-fronted/src/components/common/language/en.js
+++ b/nezha-fronted/src/components/common/language/en.js
@@ -111,6 +111,7 @@ const en = {
},
tip: {
confirmDelete: "Confirm Delete?",
+ assetConfirmDelete: 'Its associated Endpoints and Alert Rules will also be deleted, confirm delete?',
yes: "Yes",
no: "No",
deleteSuccess: "Successfully Deleted",
diff --git a/nezha-fronted/src/components/page/asset/asset.vue b/nezha-fronted/src/components/page/asset/asset.vue
index 6fcbe918f..079d7dc35 100644
--- a/nezha-fronted/src/components/page/asset/asset.vue
+++ b/nezha-fronted/src/components/page/asset/asset.vue
@@ -4,7 +4,7 @@