From 9d9a8eea63f36bc376cf8bd443710b12e3722a0c Mon Sep 17 00:00:00 2001
From: ZZJ <zzjdsg2300@163.com>
Date: 星期五, 12 十一月 2021 16:51:47 +0800
Subject: [PATCH] bug修复
---
src/pages/settings/components/ClusterManagement.vue | 78 +++++++++++++++++++++-----------------
1 files changed, 43 insertions(+), 35 deletions(-)
diff --git a/src/pages/settings/components/ClusterManagement.vue b/src/pages/settings/components/ClusterManagement.vue
index d18c0c1..bedd193 100644
--- a/src/pages/settings/components/ClusterManagement.vue
+++ b/src/pages/settings/components/ClusterManagement.vue
@@ -321,12 +321,12 @@
checkPsd(psd) {
return psd.trim().length === 6
},
- cleanValue() {
- this.members = [];
- },
- sHandleClick(tab, event) {
- console.log(tab, event);
- },
+ // cleanValue() {
+ // this.members = [];
+ // },
+ // sHandleClick(tab, event) {
+ // console.log(tab, event);
+ // },
submitForm(formName) {
this.$refs[formName].validate(valid => {
if (valid) {
@@ -347,25 +347,25 @@
});
},
- saveForm(formName) {
- this.$refs[formName].validate(valid => {
- if (valid) {
- alert("submit!");
- let json = {
- enable: this.vrIpForm.enable,
- serve_port: this.vrIpForm.serve_port,
- virtual_ip: this.vrIpForm.virtual_ip,
+ // saveForm(formName) {
+ // this.$refs[formName].validate(valid => {
+ // if (valid) {
+ // alert("submit!");
+ // let json = {
+ // enable: this.vrIpForm.enable,
+ // serve_port: this.vrIpForm.serve_port,
+ // virtual_ip: this.vrIpForm.virtual_ip,
- };
- setVrrp(json).then(() => {
- this.getVrrpInfo();
- });
- } else {
- console.log("error submit!!");
- return false;
- }
- });
- },
+ // };
+ // setVrrp(json).then(() => {
+ // this.getVrrpInfo();
+ // });
+ // } else {
+ // console.log("error submit!!");
+ // return false;
+ // }
+ // });
+ // },
join(formName) {
let _this = this;
@@ -552,16 +552,16 @@
}
}
},
- getVrrpInfo() {
- getVrrp().then(res => {
- if (res.success) {
- this.vrIpForm.virtual_ip = res.data.virtual_ip;
- this.vrIpForm.enable = res.data.enable;
- }
- }).catch(e => {
- console.log(e)
- })
- },
+ // getVrrpInfo() {
+ // getVrrp().then(res => {
+ // if (res.success) {
+ // this.vrIpForm.virtual_ip = res.data.virtual_ip;
+ // this.vrIpForm.enable = res.data.enable;
+ // }
+ // }).catch(e => {
+ // console.log(e)
+ // })
+ // },
async updateCluster() {
if (this.ruleForm.clustername === "") {
this.$message({
@@ -614,7 +614,15 @@
this.members = [];
this.innerNodes = [];
}
- }).catch(() => { });
+ }).catch(() => {
+ this.ruleForm.clustername = "";
+ this.ruleForm.clusterpwd = ""
+ this.clusterid = "";
+ this.isHasColony = false;
+ this.activeName = "1";
+ this.members = [];
+ this.innerNodes = [];
+ });
},
joinNode(event, node) {
--
Gitblit v1.8.0