From 4d0869fcc085f7b4d8af2182bb8b16b70ff6482c Mon Sep 17 00:00:00 2001 From: wangyizhi Date: Sat, 16 Oct 2021 22:45:55 +0800 Subject: [PATCH] fix DAG environment list error (#6551) --- .../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) - }) - } + }) } }