From a1576d1fa2492f9ef7576be137f2ab07c0929e4b Mon Sep 17 00:00:00 2001 From: break60 <790061044@qq.com> Date: Fri, 29 May 2020 17:07:01 +0800 Subject: [PATCH] Fix abnormal display of regular worker parameters --- .../definition/pages/list/_source/timing.vue | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/timing.vue b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/timing.vue index 06163575cb..82a82dec45 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/timing.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/timing.vue @@ -186,7 +186,7 @@ receiversCc: [], i18n: i18n.globalScope.LOCALE, processInstancePriority: 'MEDIUM', - workerGroup: 'default', + workerGroup: '', previewTimes: [] } }, @@ -309,6 +309,20 @@ watch: { }, created () { + if(this.item.workerGroup===undefined) { + let stateWorkerGroupsList = this.store.state.security.workerGroupsListAll || [] + if (stateWorkerGroupsList.length) { + this.workerGroup = stateWorkerGroupsList[0].id + } else { + this.store.dispatch('security/getWorkerGroupsAll').then(res => { + this.$nextTick(() => { + this.workerGroup = res[0].id + }) + }) + } + } else { + this.workerGroup = this.item.workerGroup + } if(this.item.crontab !== null){ this.crontab = this.item.crontab } @@ -336,7 +350,6 @@ }, mounted () { let item = this.item - // Determine whether to echo if (this.item.crontab) { this.crontab = item.crontab @@ -344,7 +357,6 @@ this.failureStrategy = item.failureStrategy this.warningType = item.warningType this.processInstancePriority = item.processInstancePriority - this.workerGroup = item.workerGroup || 'default' this._getNotifyGroupList().then(() => { this.$nextTick(() => { // let list = _.filter(this.notifyGroupList, v => v.id === item.warningGroupId)