From 5eb3190bd23483f0170d29552480c5e3e88a72aa Mon Sep 17 00:00:00 2001 From: zhaochongyu Date: Thu, 13 May 2021 16:33:34 +0800 Subject: [PATCH] features updating --- index.html | 2 +- src/api/homeTable.js | 3 +- src/components/Dialogs/Dialogs.vue | 198 ++++++++++++------ src/components/HomeTable/HomeTable.vue | 33 ++- .../Layout/Operations/Operations.vue | 44 ++-- 5 files changed, 188 insertions(+), 92 deletions(-) diff --git a/index.html b/index.html index c954583..5fbbb9d 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@ - HA-VUE + openUnicorn HA
diff --git a/src/api/homeTable.js b/src/api/homeTable.js index 15b7976..c162755 100644 --- a/src/api/homeTable.js +++ b/src/api/homeTable.js @@ -141,11 +141,10 @@ export function standbyAction(url) { } -export function runAction(url, data) { +export function runAction(url) { return request({ url, method: 'put', - data }) diff --git a/src/components/Dialogs/Dialogs.vue b/src/components/Dialogs/Dialogs.vue index ffc22d1..b5e0259 100644 --- a/src/components/Dialogs/Dialogs.vue +++ b/src/components/Dialogs/Dialogs.vue @@ -5,12 +5,17 @@ :visible.sync="isVisible" width="700px" :before-close="closeDialog" + v-if="isRouterShow" >
{{ title }}
- + - - + 刷新 - + { - if(_this.chosenItem.running_node.indexOf(item.id) == -1) { - _this.migrateNodes.push(item.id) + _this.nodeLists.forEach((item) => { + if (_this.chosenItem.running_node.indexOf(item.id) == -1) { + _this.migrateNodes.push(item.id); } - }) + }); _this.disableMigrateDialog = true; - } else { let req = "/resources/" + this.chosenItem.id + "/" + action; easyRequest(req).then(() => { @@ -583,14 +587,13 @@ export default { for (const key in _this.rscLocation) { location[key] = _this.rscLocation[key]; if (_this.rscLocation[key].length == 0) { - continue - } else if(_this.rscLocation[key].length >= 1) { + continue; + } else if (_this.rscLocation[key].length >= 1) { location.node_level.push({ level: key, node: _this.rscLocation[key], }); } else { - } } @@ -647,7 +650,10 @@ export default { period: "", to_node: "", }; - this.disableMigrateDialog = false + this.disableMigrateDialog = false; + }, + cleanSelets() { + this.$emit("clear"); }, }, }; -- Gitee