diff --git a/dolphinscheduler-ui/.eslintrc.yml b/dolphinscheduler-ui/.eslintrc.yml index d95b73ced6..a72507d2f2 100644 --- a/dolphinscheduler-ui/.eslintrc.yml +++ b/dolphinscheduler-ui/.eslintrc.yml @@ -34,7 +34,6 @@ plugins: - vue rules: vue/script-indent: ['error', 2, { 'baseIndent': 1, 'switchCase': 1 }] - vue/no-mutating-props: 'off' prefer-promise-reject-errors: 'off' no-prototype-builtins: 'off' no-mixed-operators: 'off' diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.vue index b5299a80cf..6fc5f103a7 100755 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.vue @@ -156,7 +156,7 @@ :visible.sync="nodeDrawer" size="50%" :with-header="false"> - + + v-model="selectedValue"> { if (item.dependItemList.length === 0) { this.dependTaskList.splice(i, 1) diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/dependent.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/dependent.vue index 220ec99f46..978142891e 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/dependent.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/dependent.vue @@ -97,6 +97,7 @@ $('body').find('.tooltip.fade.top.in').remove() }, _onDeleteAll (i) { + this.dependTaskList[this.index].dependItemList.splice(i, 1) this.dependTaskList.map((item, i) => { if (item.dependItemList.length === 0) { this.dependTaskList.splice(i, 1) diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/udp/_source/selectTenant.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/udp/_source/selectTenant.vue index 3ff0c2f9b8..e3611ba6a0 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/udp/_source/selectTenant.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/udp/_source/selectTenant.vue @@ -18,7 +18,7 @@ - + {{item}} @@ -74,6 +74,7 @@ tagModel: false, email: '', activeIndex: null, + activeListL: _.cloneDeep(this.activeList), emailList: [], index: 0, emailWidth: 100, @@ -105,13 +106,13 @@ let email = this.email let is = (n) => { - return _.some(_.cloneDeep(this.repeatData).concat(_.cloneDeep(this.activeList)), v => v === n) + return _.some(_.cloneDeep(this.repeatData).concat(_.cloneDeep(this.activeListL)), v => v === n) } if (isEmial(email)) { if (!is(email)) { this.emailWidth = 0 - this.activeList.push(email) + this.activeListL.push(email) this.email = '' this._handlerEmailWitch() return true @@ -132,7 +133,7 @@ this.emailList = [] this.isEmail = false } else { - let a = _.cloneDeep(this.repeatData).concat(_.cloneDeep(this.activeList)) + let a = _.cloneDeep(this.repeatData).concat(_.cloneDeep(this.activeListL)) let b = a.concat(emailList) let list = fuzzyQuery(b, val) this.emailList = _.uniqWith(list.length && list, _.isEqual) @@ -161,11 +162,11 @@ if (!this.isCn) { this.emailWidth = 0 if (_.isInteger(this.activeIndex)) { - this.activeList.pop() + this.activeListL.pop() this.activeIndex = null } else { if (!this.email) { - this.activeIndex = this.activeList.length - 1 + this.activeIndex = this.activeListL.length - 1 } } this._handlerEmailWitch() @@ -176,7 +177,7 @@ */ _del (i) { this.emailWidth = 0 - this.activeList.splice(i, 1) + this.activeListL.splice(i, 1) this._handlerEmailWitch() }, /** @@ -221,14 +222,14 @@ this.email = '' // Non-existing data - if (_.filter(_.cloneDeep(this.repeatData).concat(_.cloneDeep(this.activeList)), v => v === item).length) { + if (_.filter(_.cloneDeep(this.repeatData).concat(_.cloneDeep(this.activeListL)), v => v === item).length) { this.$message.warning(`${i18n.$t('Mailbox already exists! Recipients and copyers cannot repeat')}`) return } // Width initialization this.emailWidth = 0 // Insert data - this.activeList.push(item) + this.activeListL.push(item) // Calculated width this._handlerEmailWitch() // Check mailbox index initialization @@ -264,7 +265,12 @@ this.activeIndex = null }, activeList (val) { - this.$emit('valueEvent', val) + this.activeListL = _.cloneDeep(val) + }, + activeListL (val) { + if (!_.isEqual(val, this.activeList)) { + this.$emit('valueEvent', val) + } } }, created () { diff --git a/dolphinscheduler-ui/src/js/module/components/priority/priority.vue b/dolphinscheduler-ui/src/js/module/components/priority/priority.vue index cc1a54d4da..9427f082df 100644 --- a/dolphinscheduler-ui/src/js/module/components/priority/priority.vue +++ b/dolphinscheduler-ui/src/js/module/components/priority/priority.vue @@ -16,7 +16,7 @@ */ - + ` }, _onChange (o) { - this.value = o this.$emit('priorityEvent', o) } }, + watch: { + value (val) { + this.selectedValue = val + } + }, created () { }, mounted () {