From e9e3db616fd3a1de44c0a1f3df73a39281b4281d Mon Sep 17 00:00:00 2001
From: hanbaoshan <hanbaoshan@aiotlink.com>
Date: 星期二, 20 十月 2020 11:26:55 +0800
Subject: [PATCH] 加入集群节点优化,更新虚拟/外部IP名称

---
 src/pages/settings/components/ClusterManagement.vue |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/src/pages/settings/components/ClusterManagement.vue b/src/pages/settings/components/ClusterManagement.vue
index 7a58e68..9f07655 100644
--- a/src/pages/settings/components/ClusterManagement.vue
+++ b/src/pages/settings/components/ClusterManagement.vue
@@ -52,7 +52,7 @@
                 <!-- <el-button size="mini" :disabled="searchDis" @click="searchColony">鎼滅储闆嗙兢</el-button>
                 <el-button size="mini" @click="stopSearch">鍋滄鎼滅储</el-button>-->
               </el-form-item>
-              <el-form-item label="闆嗙兢瀵嗙爜" prop="clusterpwd" style="width:500px">
+              <el-form-item label="闆嗙兢瀵嗙爜" prop="clusterpwd" style="width:440px">
                 <el-input
                   v-model="joinForm.clusterpwd"
                   placeholder="璇疯緭鍏ラ泦缇ゅ瘑鐮�"
@@ -85,7 +85,7 @@
               ></el-input>
             </el-form-item>
 
-            <el-form-item label="铏氭嫙IP" prop="virtualIp">
+            <el-form-item label="铏氭嫙/澶栭儴IP" prop="virtualIp">
               <ip-input :ip="ruleForm.virtualIp" :on-blur="onIpBlur"></ip-input>
             </el-form-item>
             <el-form-item style="width:440px;text-align: right;">
@@ -290,7 +290,8 @@
       members: [],
       innerNodes: [],
       intervalTimer: null,
-      joinLoading: false
+      joinLoading: false,
+      showJoinConfirm: false
     };
   },
   mounted() {
@@ -600,7 +601,7 @@
 
     },
     joinNode(event, node) {
-      debugger
+      let _this = this;
       this.currentCluster.cluster_id = node.cluster_id;
       if (this.activeName === "3") {
         this.manageForm.clustername = node.clusterName;
@@ -610,6 +611,8 @@
       if (this.activeName === "2") {
         this.$refs["joinForm"].validate(valid => {
           if (valid) {
+            if(_this.showJoinConfirm) return;
+            _this.showJoinConfirm = true;
             this.$confirm("鏄惁瑕佸姞鍏ヨ妭鐐� " + node.nodeName + "?", "鍔犲叆闆嗙兢", {
               confirmButtonText: "纭畾",
               cancelButtonText: "鍙栨秷",
@@ -629,6 +632,7 @@
                 // })
                 console.log(this.currentCluster, '閫夋嫨鐨勯泦缇よ妭鐐�')
                 this.join("joinForm");
+                _this.showJoinConfirm = false;
               })
               .catch(() => {
                 this.$notify({
@@ -636,6 +640,7 @@
                   duration: 1000,
                   message: "宸插彇娑�"
                 });
+                _this.showJoinConfirm = false;
               });
           } else {
             console.log("error submit!!");

--
Gitblit v1.8.0