zhangzengfei
2022-07-20 4a800a8fc83c6bd1f86a8e847b079a51a7532c09
src/pages/systemSettings/components/ClusterManagement.vue
@@ -273,7 +273,6 @@
  updateClusterName,
  joinCluster,
  leave,
  getVrrp,
  setVrrp,
  createESNode,
  addESNode,
@@ -293,7 +292,7 @@
  },
  data() {
    const checkPwd = (rule, value, callback) => {
      debugger
      debugger;
      if (!value) {
        return callback(new Error("密码不能为空"));
      }
@@ -512,7 +511,6 @@
    async search(json) {
      let res = await search(json);
      if (res && res.success) {
        console.log(res, "搜索集群");
        this.searchNum = res.data;
      }
      this.searchDis = true;
@@ -615,16 +613,6 @@
        }
      }
    },
    // 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({
@@ -664,11 +652,7 @@
      })
        .then(async () => {
          let res = await leave();
          this.$notify({
            title: res.success ? "成功" : "失败",
            message: res.msg,
            type: res.success ? "success" : "error",
          });
          if (res && res.success) {
            this.ruleForm.clustername = "";
            this.ruleForm.clusterpwd = "";
@@ -677,6 +661,11 @@
            this.activeName = "1";
            this.members = [];
            this.innerNodes = [];
            this.$notify({
              title: "成功",
              message: "退出成功",
              type: "success",
            });
          }
        })
        .catch(() => {
@@ -687,6 +676,11 @@
          this.activeName = "1";
          this.members = [];
          this.innerNodes = [];
          this.$notify({
            title: "失败",
            message: "退出失败",
            type: "error",
          });
        });
    },
    joinNode(event, node) {
@@ -944,9 +938,6 @@
  #h-alaycluster {
    .el-form-item__content {
      text-align: left;
      // input {
      //   max-width: 360px;
      // }
    }
  }
}