-
+
@@ -87,7 +93,11 @@
+
+
{{item.key}}={{item.value}}
+
+
@@ -180,7 +190,8 @@
return {
rightBox: {
show: false,
- title: ''
+ title: '',
+ isEdit:false
},
rules: {
name: [
@@ -197,8 +208,9 @@
}
},
methods: {
- show(show) {
+ show(show,isEdit) {
this.rightBox.show = show;
+ this.rightBox.isEdit=isEdit
},
/*关闭弹框*/
@@ -238,7 +250,14 @@
}
});
},
-
+ saveOrToEdit: function() {
+ if (!this.rightBox.isEdit) {
+ this.rightBox.isEdit = true;
+ this.rightBox.title = this.$t("project.module.editModule") + " ID:" + this.module.id;
+ } else {
+ this.save();
+ }
+ },
/*删除*/
del() {
this.$confirm(this.$t("tip.confirmDelete"), {
@@ -317,9 +336,10 @@
watch: {
module: {
immediate: true,
+ deep:true,
handler(n, o) {
if (n && n.id) {
- this.rightBox.title = this.$t("project.module.editModule") + " ID:" + n.id;
+ this.rightBox.title =this.rightBox.isEdit? this.$t("project.module.editModule") + " ID:" + n.id : this.$t("project.module.module") + " ID:" + n.id ;
} else {
this.rightBox.title = this.$t("project.module.createModule");
}
diff --git a/nezha-fronted/src/components/common/rightBox/projectBox.vue b/nezha-fronted/src/components/common/rightBox/projectBox.vue
index 071081e10..d87e6b27f 100644
--- a/nezha-fronted/src/components/common/rightBox/projectBox.vue
+++ b/nezha-fronted/src/components/common/rightBox/projectBox.vue
@@ -6,8 +6,9 @@
-