From 9123b2d54bc38e1e05307221e84fb0a7f1fe9b73 Mon Sep 17 00:00:00 2001 From: liujun Date: Sun, 7 Apr 2024 20:03:20 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=8A=82=E7=82=B9?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E6=8F=92=E4=BB=B6=E8=B0=83=E7=94=A8=E5=AE=89?= =?UTF-8?q?=E8=A3=85=E9=80=9A=E9=81=93=E5=A4=B1=E8=B4=A5=E9=97=AE=E9=A2=98?= =?UTF-8?q?=20#7397?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../static/components/atoms/nodeman/create_task/v6_0.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pipeline_plugins/components/static/components/atoms/nodeman/create_task/v6_0.js b/pipeline_plugins/components/static/components/atoms/nodeman/create_task/v6_0.js index 165acdf478..590979bcc8 100644 --- a/pipeline_plugins/components/static/components/atoms/nodeman/create_task/v6_0.js +++ b/pipeline_plugins/components/static/components/atoms/nodeman/create_task/v6_0.js @@ -60,8 +60,7 @@ remote_data_init: function (resp) { if (resp.result === false) { show_msg(resp.message, 'error'); - } - if (resp.data.length != 0){ + }else if (resp.data.length != 0){ this._set_value(resp.data[0]["value"]); } return resp.data; @@ -76,11 +75,12 @@ { source: "nodeman_bk_cloud_id", type: "change", - action: function () { - var cloud_id = this.get_parent().get_child("nodeman_bk_cloud_id").value; + action: function (cloud_id) { if (cloud_id !== '') { this.remote_url = $.context.get('site_url') + 'pipeline/nodeman_get_install_channel/' + cloud_id + '/'; this.remoteMethod(); + }else{ + this._set_value(""); } } },