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 25b5bbf78197c28ca07a35ff41e65791f20bba96..ff5d0da2bc503b6c570dfaee48ec5752c1528fe2 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) - }) - } + }) } }