From f4e39d5ac216c0ae5f3464c8987977cc05f5669e Mon Sep 17 00:00:00 2001 From: zhutianqi Date: Sun, 21 Nov 2021 15:33:04 +0800 Subject: [PATCH 1/3] commit --- src/components/roleTree/index.vue | 32 +++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/src/components/roleTree/index.vue b/src/components/roleTree/index.vue index 7434afef8..c521386bf 100644 --- a/src/components/roleTree/index.vue +++ b/src/components/roleTree/index.vue @@ -26,6 +26,7 @@ style="height: 100%; overflow: auto;" class="filter-tree tree-line" :class="treeClass" + @check-change="checkChange" :data="treeData" :props="defaultProps" :default-checked-keys="nodeList" @@ -116,15 +117,25 @@ } }, methods: { + checkChange (row, type, c) { + if (!type) { + if (this.nodeList.length > 0) { + for (let a = 0; a < this.nodeList.length; a ++) { + if (row.id === this.nodeList[a]) { + this.nodeList.splice(a, 1) + } + } + } + } + }, treeClass () { - }, handleTreeDrawerCancel () { this.filterText = '' this.isVisible2 = false }, saveUserInfo () { - if (this.nodeList.length) { + if (this.nodeList.length > 0) { let ids = '' this.nodeList.forEach(item => { if (ids.length > 0) { @@ -134,18 +145,27 @@ ids = item } }) - let oldList = [] this.$http.get('SarInstitution/institution/getNextById', { ids: ids }, { _this: this }, res => { - oldList = res + let oldList2 = res.concat(this.roleList) + let result = [] + let obj = {} + for(let i = 0; i < oldList2.length; i++){ + if(!obj[oldList2[i].id]){ + result.push(oldList2[i]); + obj[oldList2[i].id] = true; + } + } + this.isVisible2 = false + this.$emit('checkedRole', result) }) } else { + this.isVisible2 = false + this.$emit('checkedRole', this.roleList) } - this.isVisible2 = false - this.$emit('checkedRole', this.roleList) }, drawerCheck (data) { if (this.checkBox) { From 73acf4d7920a55c25ffd075a157b57cb5072e96a Mon Sep 17 00:00:00 2001 From: "zhaokaiyao@91isoft.com" <6922339zky> Date: Sun, 21 Nov 2021 16:03:26 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E8=AF=A6=E6=83=85=E5=85=B3=E8=81=94?= =?UTF-8?q?=E6=9D=A1=E6=AC=BE,=E5=85=B3=E8=81=94=E6=88=90=E5=8A=9F?= =?UTF-8?q?=E6=B6=88=E6=81=AF=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/details/otherStandardDetails/index.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/pages/details/otherStandardDetails/index.vue b/src/pages/details/otherStandardDetails/index.vue index 8557d1325..d414d8724 100644 --- a/src/pages/details/otherStandardDetails/index.vue +++ b/src/pages/details/otherStandardDetails/index.vue @@ -3024,7 +3024,13 @@ this.$refs['relatedTermsSelect'].handleSubmit(() => { this.selectSarStandItems() this.btnLoading = false + this.$message({ + message: '关联成功', + type: 'success' + }); }) + + }, closeRelatedTermsDrawer() { this.$refs['relatedTermsDrawer'].closeDrawer() From 99e7c9774d0d894ac2f2b22f522b0f0637a4f053 Mon Sep 17 00:00:00 2001 From: yanyizhou <2311759275@qq.com> Date: Sun, 21 Nov 2021 16:05:24 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=B8=94=E5=A2=9E=E5=8A=A0=E6=A8=A1?= =?UTF-8?q?=E7=B3=8A=E7=AD=9B=E9=80=89=EF=BC=88=E8=BE=93=E5=85=A5=E9=A6=96?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=EF=BC=8C=E8=B7=B3=E5=87=BA=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E9=80=89=E9=A1=B9=EF=BC=8C=E4=BE=9B=E9=80=89=E6=8B=A9=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/CustomFormComponents/Select.vue | 1 + .../domesticStandardsAndRegulations/index.vue | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/CustomFormComponents/Select.vue b/src/components/CustomFormComponents/Select.vue index a87165b3e..58cf2fc03 100644 --- a/src/components/CustomFormComponents/Select.vue +++ b/src/components/CustomFormComponents/Select.vue @@ -12,6 +12,7 @@ :placeholder="placeholder" :disabled="disabled" clearable + filterable @change="handleChange" > -