fix bug for manage node-project console component feature

This commit is contained in:
Eleven 2021-03-02 20:40:36 +08:00
parent 3b956f78e2
commit de538c1b04
2 changed files with 22 additions and 1 deletions

View File

@ -223,6 +223,13 @@ export default {
//
expand(expanded, record) {
if (expanded) {
if (!record.openStatus) {
this.$notification.error({
message: '节点未启用',
duration: 2
});
return false;
}
//
this.childLoading = true;
getNodeStatus(record.id).then(res => {

View File

@ -145,11 +145,25 @@ export default {
this.project.status = true;
}
}
// status
if (res.op === 'status') {
if (this.copyId) {
this.replica.status = true;
} else {
this.project.status = true;
}
}
} else {
this.$notification.error({
message: res.msg,
duration: 5
});
//
if (this.copyId) {
this.replica.status = false;
} else {
this.project.status = false;
}
}
}
this.logContext += `${msg.data}\r\n`;
@ -197,7 +211,7 @@ export default {
stop() {
this.$confirm({
title: '系统提示',
content: '真的要重启项目么?',
content: '真的要停止项目么?',
okText: '确认',
cancelText: '取消',
onOk: () => {