hanbaoshan
2020-10-10 f98f5deaaa6c5a9cf4023e2d2dd1c445980e5a8f
src/pages/settings/components/ClusterManagement.vue
@@ -30,10 +30,15 @@
          </el-tab-pane>
          
          <!-- 加入已有集群 -->
          <el-tab-pane label="加入已有集群" name="3" :disabled="isHasColony">
          <el-tab-pane label="加入已有集群" name="2" :disabled="isHasColony">
            <el-form label-width="80px" :model="joinForm" :rules="joinRules" ref="joinForm">
              <el-form-item label="IP地址" style="width:440px">
                <el-input v-model="joinForm.clusterip" placeholder="请输入集群内任意IP地址" size="small">
                <el-input
                  v-model="joinForm.clusterip"
                  placeholder="请输入集群内任意IP地址"
                  size="small"
                  autocomplete="new-password"
                >
                  <el-button
                    type="text"
                    slot="suffix"
@@ -54,6 +59,7 @@
                  placeholder="请输入集群密码"
                  show-password
                  size="small"
                  autocomplete="new-password"
                ></el-input>
              </el-form-item>
              <el-form-item style="width:440px">
@@ -95,7 +101,7 @@
          </el-form>
        </div>
      </el-col>
      <el-col :span="14" style="height: 100%;" v-if="members.length !== 0">
      <el-col :span="10" style="height: 100%;" v-if="members.length !== 0">
        <serfDiagram
          ref="diagram"
          :members="members"
@@ -134,7 +140,12 @@
          <el-tab-pane label="加入已有集群" name="s-second">
            <el-form label-width="80px">
              <el-form-item label="IP地址" style="text-align: left;">
                <el-input v-model="clusterip2" placeholder="请输入集群内任意IP地址" size="small">
                <el-input
                  v-model="clusterip2"
                  placeholder="请输入集群内任意IP地址"
                  size="small"
                  autocomplete="off"
                >
                  <el-button
                    type="text"
                    slot="suffix"
@@ -294,7 +305,7 @@
    submitForm(formName) {
      this.$refs[formName].validate(valid => {
        if (valid) {
          alert("submit!");
          //alert("submit!");
          let json = {
            clusterId: this.clusterid,
            clusterName: this.ruleForm.clustername,
@@ -376,6 +387,7 @@
    async searchColony() {
      this.$refs["joinForm"].validate(valid => {
        if (valid) {
          this.members = [];
          let json = {
            password: this.joinForm.clusterpwd,
            ip: this.joinForm.clusterip
@@ -549,6 +561,7 @@
      
    },
    joinNode(event, node) {
      debugger
      this.currentCluster.cluster_id = node.cluster_id;
      if (this.activeName === "3") {
        this.manageForm.clustername = node.clusterName;