Browse Source

fix DAG environment list error (#6551)

wangyizhi 3 years ago
parent
commit
4d0869fcc0

+ 3 - 10
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)
-        })
-      }
+      })
     }
   }
 </script>