From b29a61b79260c2d610527b4502d287bd1993b62c Mon Sep 17 00:00:00 2001 From: Bai Date: Mon, 8 Jun 2020 14:02:59 +0800 Subject: [PATCH] =?UTF-8?q?[Update]=20=E6=B7=BB=E5=8A=A0=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E8=8A=82=E7=82=B9=E8=B5=84=E4=BA=A7=E7=A1=AC=E4=BB=B6=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E6=89=A7=E8=A1=8C=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/AutoDataZTree/index.vue | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/components/AutoDataZTree/index.vue b/src/components/AutoDataZTree/index.vue index 89f6725e9..c1f2bf1d6 100644 --- a/src/components/AutoDataZTree/index.vue +++ b/src/components/AutoDataZTree/index.vue @@ -148,7 +148,19 @@ export default { }, updateNodeAssetHardwareInfo: function() { - + this.hideRMenu() + const currentNode = this.zTree.getSelectedNodes()[0] + if (!currentNode) { + return + } + this.$axios.post( + `/api/v1/assets/nodes/${currentNode.meta.node.id}/tasks/`, + { 'action': 'refresh' } + ).then((res) => { + window.open(`/core/ops/celery/task/${res.task}/log/`, '_blank', 'toolbar=yes, width=900, height=600') + }).catch(error => { + this.$message.error(this.$t('common.updateErrorMsg' + ' ' + error)) + }) }, testNodeAssetConnectivity: function() {