From bacfba0fa6f8a7db3517fd58b5f3087f8d94892e Mon Sep 17 00:00:00 2001 From: yaojn Date: Wed, 10 Jan 2024 18:17:16 +0800 Subject: [PATCH 1/3] =?UTF-8?q?-=20[=E4=BF=AE=E5=A4=8D]=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E7=BC=96=E8=BE=91-cmdb=E5=88=86=E6=B4=BE=E5=99=A8=E7=9A=84?= =?UTF-8?q?=E4=BA=A4=E4=BA=92=E9=97=AE=E9=A2=98=20=20-=20[=E5=85=B3?= =?UTF-8?q?=E8=81=94]#[1065916958212096]=E6=B5=81=E7=A8=8B=E7=BC=96?= =?UTF-8?q?=E8=BE=91-cmdb=E5=88=86=E6=B4=BE=E5=99=A8=E7=9A=84=E4=BA=A4?= =?UTF-8?q?=E4=BA=92=E9=97=AE=E9=A2=98=20http://192.168.0.96:8090/demo/rdm?= =?UTF-8?q?.html#/bug-detail/939050947543040/939050947543057/1065916958212?= =?UTF-8?q?096?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/nodesetting/dispatcher/cmdb-dispatcher.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/views/pages/process/flow/flowedit/components/nodesetting/dispatcher/cmdb-dispatcher.vue b/src/views/pages/process/flow/flowedit/components/nodesetting/dispatcher/cmdb-dispatcher.vue index aa0d175a..548e9106 100644 --- a/src/views/pages/process/flow/flowedit/components/nodesetting/dispatcher/cmdb-dispatcher.vue +++ b/src/views/pages/process/flow/flowedit/components/nodesetting/dispatcher/cmdb-dispatcher.vue @@ -157,9 +157,10 @@ export default { // 数据来源改变的时候 if (value) { this.handleWorkerList(value); + this.filterList = []; this.addFilter('', '', value); } else { - this.formItemList.splice(1, this.formItemList.length - 1); + this.formItemList.splice(2, this.formItemList.length); for (let key in this.formData) { if (!this.formNameList.includes(key)) { delete this.formData[key]; @@ -307,6 +308,7 @@ export default { }, handleWorkerList(id) { // 根据不同的类型,处理处理人 + this.formItemList.splice(2, this.formItemList.length); let formItemList = [...this.formItemList, ...this.otherFormItemList]; formItemList.forEach(item => { if (item.name == 'workerList') { -- Gitee From 03558cfc2e2cd627f58975fe4fe19e35dbc712d2 Mon Sep 17 00:00:00 2001 From: yaojn Date: Wed, 10 Jan 2024 18:57:43 +0800 Subject: [PATCH 2/3] =?UTF-8?q?-=20[=E4=BF=AE=E5=A4=8D]=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E7=BC=96=E8=BE=91-cmdb=E5=88=86=E6=B4=BE=E5=99=A8=E7=9A=84?= =?UTF-8?q?=E4=BA=A4=E4=BA=92=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nodesetting/dispatcher/cmdb-dispatcher.vue | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/views/pages/process/flow/flowedit/components/nodesetting/dispatcher/cmdb-dispatcher.vue b/src/views/pages/process/flow/flowedit/components/nodesetting/dispatcher/cmdb-dispatcher.vue index 548e9106..e8d5e5cf 100644 --- a/src/views/pages/process/flow/flowedit/components/nodesetting/dispatcher/cmdb-dispatcher.vue +++ b/src/views/pages/process/flow/flowedit/components/nodesetting/dispatcher/cmdb-dispatcher.vue @@ -161,8 +161,10 @@ export default { this.addFilter('', '', value); } else { this.formItemList.splice(2, this.formItemList.length); + this.priorityList = []; for (let key in this.formData) { - if (!this.formNameList.includes(key)) { + console.log('key', key); + if (key && !this.formNameList.includes(key)) { delete this.formData[key]; } } @@ -308,8 +310,9 @@ export default { }, handleWorkerList(id) { // 根据不同的类型,处理处理人 - this.formItemList.splice(2, this.formItemList.length); - let formItemList = [...this.formItemList, ...this.otherFormItemList]; + let defaultFormItemList = this.$utils.deepClone(this.formItemList); + defaultFormItemList.splice(2, defaultFormItemList.length); + let formItemList = [...defaultFormItemList, ...this.otherFormItemList]; formItemList.forEach(item => { if (item.name == 'workerList') { // 处理人 -- Gitee From f25376a549e72fd3020dd6a48ed4ae2b6caf96b1 Mon Sep 17 00:00:00 2001 From: yaojn Date: Thu, 11 Jan 2024 10:38:21 +0800 Subject: [PATCH 3/3] =?UTF-8?q?-=20[=E4=BF=AE=E5=A4=8D]=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E7=BC=96=E8=BE=91-cmdb=E5=88=86=E6=B4=BE=E5=99=A8=E7=9A=84?= =?UTF-8?q?=E4=BA=A4=E4=BA=92=E9=97=AE=E9=A2=98=20=20-=20[=E5=85=B3?= =?UTF-8?q?=E8=81=94]#[1065916958212096]=E6=B5=81=E7=A8=8B=E7=BC=96?= =?UTF-8?q?=E8=BE=91-cmdb=E5=88=86=E6=B4=BE=E5=99=A8=E7=9A=84=E4=BA=A4?= =?UTF-8?q?=E4=BA=92=E9=97=AE=E9=A2=98=20http://192.168.0.96:8090/demo/rdm?= =?UTF-8?q?.html#/bug-detail/939050947543040/939050947543057/1065916958212?= =?UTF-8?q?096?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nodesetting/dispatcher/cmdb-dispatcher.vue | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/views/pages/process/flow/flowedit/components/nodesetting/dispatcher/cmdb-dispatcher.vue b/src/views/pages/process/flow/flowedit/components/nodesetting/dispatcher/cmdb-dispatcher.vue index e8d5e5cf..0b59a3f7 100644 --- a/src/views/pages/process/flow/flowedit/components/nodesetting/dispatcher/cmdb-dispatcher.vue +++ b/src/views/pages/process/flow/flowedit/components/nodesetting/dispatcher/cmdb-dispatcher.vue @@ -155,6 +155,11 @@ export default { firstSelect: false, onChange: value => { // 数据来源改变的时候 + for (let key in this.formData) { + if (key && !this.formNameList.includes(key)) { + delete this.formData[key]; + } + } if (value) { this.handleWorkerList(value); this.filterList = []; @@ -162,12 +167,6 @@ export default { } else { this.formItemList.splice(2, this.formItemList.length); this.priorityList = []; - for (let key in this.formData) { - console.log('key', key); - if (key && !this.formNameList.includes(key)) { - delete this.formData[key]; - } - } } } } @@ -229,7 +228,7 @@ export default { let id = dataSource || this.formData.dataSource; if (this.formData.type == 'ci') { keyConfig = { - url: 'api/rest/cmdb/ci/listattr', + dynamicUrl: 'api/rest/cmdb/ci/listattr', textName: 'label', valueName: 'id', params: { -- Gitee