| | |
| | | };
|
| | | const checkID = (rule, value, callback) => {
|
| | | if (!value) {
|
| | | return callback(new Error("密码不能为空"));
|
| | | return callback(new Error("ID不能为空"));
|
| | | }
|
| | | };
|
| | | return {
|
| | |
| | | },
|
| | | exitCluster() {
|
| | | const h = this.$createElement;
|
| | | let res = {};
|
| | |
|
| | | this.$msgbox({
|
| | | title: "",
|
| | | message: h(
|
| | |
| | | // this.showCurCluster = false;
|
| | | // }
|
| | | 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 = "";
|
| | | try {
|
| | | res = await leave();
|
| | | if (res && res.success) {
|
| | | clearInterval(this.intervalTimer);
|
| | | this.showCurCluster = false;
|
| | | this.ruleForm.virtualIp = "";
|
| | | this.ruleForm.clustername = "";
|
| | | this.ruleForm.clusterpwd = "";
|
| | | this.clusterid = "";
|
| | | }
|
| | |
|
| | | this.$notify({
|
| | | title: res.success ? "成功" : "失败",
|
| | | message: res.msg,
|
| | | type: res.success ? "success" : "error",
|
| | | });
|
| | | this.findCluster();
|
| | | } catch (err) {
|
| | | console.log(err);
|
| | | this.$notify.error({
|
| | | title: "失败",
|
| | | message: err.msg,
|
| | | });
|
| | | }
|
| | | },
|
| | | (err) => {
|
| | |
| | | }
|
| | | .cluster-guanli {
|
| | | margin: 0 auto;
|
| | | width: 760px;
|
| | | // width: 760px;
|
| | | padding: 0 10px;
|
| | | .btns {
|
| | | margin-top: 30px !important;
|