From d7e24c64a3961040fdc7fec835c2efa5d2f106c0 Mon Sep 17 00:00:00 2001
From: ZZJ <zzjdsg2300@163.com>
Date: 星期日, 26 九月 2021 19:54:54 +0800
Subject: [PATCH] 弹层层级bug修复v2
---
src/pages/settings/views/clusterManagement.vue | 66 ++++++++++++++++++++++----------
1 files changed, 45 insertions(+), 21 deletions(-)
diff --git a/src/pages/settings/views/clusterManagement.vue b/src/pages/settings/views/clusterManagement.vue
index 7f85dd0..25c41de 100644
--- a/src/pages/settings/views/clusterManagement.vue
+++ b/src/pages/settings/views/clusterManagement.vue
@@ -1,6 +1,6 @@
<template>
<div class="all">
- <div class="cluster-guanli" v-if="showCurCluster">
+ <div class="cluster-guanli" v-if="showCurCluster&& isHasColony">
<cloud-node :nodes="innerNodes"></cloud-node>
<div class="bar">
@@ -22,13 +22,13 @@
></span
>
<span
- class="icon iconfont"
+ class="icon iconfont" style="font-size:21px;"
@click="clearInput(1)"
v-show="isFillingName"
></span
>
- <span
- class="icon iconfont"
+ <span
+ class="icon iconfont" style="font-size:20px;"
@click="updateCluster(1)"
v-show="isFillingName"
></span
@@ -65,14 +65,14 @@
></span
>
<span
- class="icon iconfont"
+ class="icon iconfont" style="font-size:21px;"
@click="clearInput(2)"
v-show="isFillingIp"
></span
>
<span
class="icon iconfont"
- @click="updateCluster(2)"
+ @click="updateCluster(2)" style="font-size:20px;"
v-show="isFillingIp"
></span
>
@@ -83,18 +83,18 @@
</div>
<div class="cluster-content">
- <div class="cluster-center" ref="left" v-if="!showCurCluster">
+ <div class="cluster-center" ref="left" v-if="!showCurCluster|| !isHasColony">
<div
class="menu-item"
:class="activePage == i ? 'menu-item-active' : ''"
v-for="(item, i) in tabList"
:key="i"
- @click="openRight(item, i)"
+ @click="openRight(i)"
>
{{ item }}
</div>
</div>
- <div class="cluster-right" v-if="!showCurCluster">
+ <div class="cluster-right" v-if="!showCurCluster || !isHasColony">
<div class="create-new" v-if="activePage == 0">
<el-form
:model="ruleForm"
@@ -198,6 +198,7 @@
import {
createSerfCluster,
randomPwd,
+ leave,
search,
getSearchNodes,
stopSearching,
@@ -284,9 +285,8 @@
},
mounted() {
this.findCluster();
- let _this = this;
this.intervalTimer = setInterval(() => {
- _this.findCluster();
+ this.findCluster();
}, 30000);
},
beforeDestroy() {
@@ -405,7 +405,7 @@
this.stopSearch();
}, 10 * 1000);
},
- openRight(item, i) {
+ openRight( i) {
this.activePage = i;
},
async stopSearch() {
@@ -457,12 +457,29 @@
this.ruleForm.clusterpwd = uuid.join("");
},
exitCluster() {
- clearInterval(this.intervalTimer);
- this.showCurCluster = false;
- this.ruleForm.virtualIp = "";
- this.ruleForm.clustername = "";
- this.ruleForm.clusterpwd = "";
- this.clusterid = "";
+ this.$confirm("纭畾閫�鍑洪泦缇ゅ悧锛�","鎻愮ず").then(async () => {
+ let res = await leave();
+ this.$notify({
+ title: res.success ? "鎴愬姛" : "澶辫触",
+ message: res.msg,
+ type: res.success ? "success" : "error",
+ });
+ if (res && res.success) {
+ clearInterval(this.intervalTimer);
+ this.showCurCluster = false;
+ this.ruleForm.virtualIp = "";
+ this.ruleForm.clustername = "";
+ this.ruleForm.clusterpwd = "";
+ this.clusterid = "";
+ }
+ },(err) => {
+ clearInterval(this.intervalTimer);
+ this.showCurCluster = false;
+ this.ruleForm.virtualIp = "";
+ this.ruleForm.clustername = "";
+ this.ruleForm.clusterpwd = "";
+ this.clusterid = "";
+ })
},
clearInput(typ) {
if (typ == 1) {
@@ -571,6 +588,9 @@
padding: 0 20px;
justify-content: space-between;
align-items: center;
+ .title{
+ font-size: 14px;
+ }
.input-area {
display: flex;
width: 340px;
@@ -578,6 +598,10 @@
line-height: 30px;
justify-content: inherit;
box-sizing: border-box;
+ .icon{
+ cursor: pointer;
+ // font-size: 18px;
+ }
}
}
.exit {
@@ -609,7 +633,7 @@
padding: 10px;
border-right: 5px solid #f8f8f8;
.menu-item {
- background-color: #f8f8f8;
+ background-color: #f8f8f8; cursor: pointer;
height: 50px;
margin-bottom: 10px;
border-radius: 8px;
@@ -620,11 +644,11 @@
padding: 0 20px;
}
.menu-item-active {
- background-color: #3d68e1;
+ background-color: var(--colorCard);
color: white;
}
.menu-item:hover {
- background-color: #3d68e1;
+ background-color: var(--colorCard);
color: white;
}
}
--
Gitblit v1.8.0