From f4d826eede4874699c3f84b52ee213a9171bdfc3 Mon Sep 17 00:00:00 2001 From: OS <29528966+lenboo@users.noreply.github.com> Date: Sat, 16 Oct 2021 22:54:34 +0800 Subject: [PATCH] fix DAG environment list error (#6551) (#6552) Co-authored-by: wangyizhi --- .../formModel/_source/relatedEnvironment.vue | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/_source/relatedEnvironment.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/_source/relatedEnvironment.vue index 25b5bbf781..ff5d0da2bc 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/_source/relatedEnvironment.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/_source/relatedEnvironment.vue @@ -109,17 +109,10 @@ } }, created () { - let stateEnvironmentList = this.store.state.security.environmentListAll || [] - - if (stateEnvironmentList.length && stateEnvironmentList.length > 0) { - this.environmentList = stateEnvironmentList + this._getEnvironmentAll().then(res => { + this.environmentList = res this._initEnvironmentOptions(this.workerGroup) - } else { - this._getEnvironmentAll().then(res => { - this.environmentList = res - this._initEnvironmentOptions(this.workerGroup) - }) - } + }) } }