From a5b6b9c75f73d3b44b3c7abaefe17205fb20be40 Mon Sep 17 00:00:00 2001 From: zhutianqi Date: Wed, 8 Dec 2021 16:54:54 +0800 Subject: [PATCH 1/4] commit --- src/components/roleTree/index.vue | 55 ++++++++++++++++++++----------- 1 file changed, 36 insertions(+), 19 deletions(-) diff --git a/src/components/roleTree/index.vue b/src/components/roleTree/index.vue index 64c8f8a1e..c21e09c28 100644 --- a/src/components/roleTree/index.vue +++ b/src/components/roleTree/index.vue @@ -143,26 +143,33 @@ } }), checkChange2 (row, type, c) { - if (type) { - this.nodeList.push(row.id) + if (this.checkBox) { } else { - for (let a = 0; a < this.nodeList.length; a ++) { - if (row.id === this.nodeList[a]) { - this.nodeList.splice(a, 1) + if (type) { + this.nodeList.push(row.id) + } else { + for (let a = 0; a < this.nodeList.length; a ++) { + if (row.id === this.nodeList[a]) { + this.nodeList.splice(a, 1) + } } } } }, checkChange (row, type, c) { - if (type) { - this.nodeList.push(row.id) + if (this.checkBox) { } else { - for (let a = 0; a < this.nodeList.length; a ++) { - if (row.id === this.nodeList[a]) { - this.nodeList.splice(a, 1) + if (type) { + this.nodeList.push(row.id) + } else { + for (let a = 0; a < this.nodeList.length; a ++) { + if (row.id === this.nodeList[a]) { + this.nodeList.splice(a, 1) + } } } } + }, handleTreeDrawerCancel () { this.filterText = '' @@ -200,17 +207,27 @@ this.open1 = true }, drawerCheck (data) { - if (this.checkBox) { + if (this.checkBox) { // 单选 // 单选判断 - var getlist = this.$refs.tree.getCheckedNodes().concat(this.$refs.tree.getHalfCheckedNodes()); - if(getlist.length == 1) { - this.roleRow = getlist[0] - } else { - this.$refs.tree.setCheckedKeys([data.id]); - this.roleRow = this.$refs.tree.getCheckedNodes()[0] + let getlist = this.$refs.tree.getCheckedNodes() + if (getlist.length > 1) { + this.$refs.tree.setCheckedKeys([]) + this.$refs.tree.setCheckedKeys([data.id]) + this.roleList = [data] + } else if (getlist.length === 0) { + this.roleList = [{}] + } else if (getlist.length === 1) { + this.roleList = [data] } - this.roleList = [this.roleRow] - } else { + // var getlist = this.$refs.tree.getCheckedNodes().concat(this.$refs.tree.getHalfCheckedNodes()); + // if(getlist.length == 1) { + // this.roleRow = getlist[0] + // } else { + // this.$refs.tree.setCheckedKeys([data.id]) + // this.roleRow = this.$refs.tree.getCheckedNodes()[0] + // } + // this.roleList = [this.roleRow] + } else { // 多选 this.roleList = this.$refs.tree.getCheckedNodes().concat(this.$refs.tree.getHalfCheckedNodes()) } }, From dc5f5386b398d5925652f8495cf60d158e9f696a Mon Sep 17 00:00:00 2001 From: yanyizhou <2311759275@qq.com> Date: Wed, 8 Dec 2021 17:30:06 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=B3=95=E8=A7=84=E6=B8=85=E5=8D=95=20?= =?UTF-8?q?=E5=9C=A8=E4=BA=A7=E8=BD=A6=E5=AE=9E=E6=96=BD=E6=97=A5=E6=9C=9F?= =?UTF-8?q?=E5=92=8C=E6=96=B0=E8=BD=A6=E5=9E=8B=E5=AE=9E=E6=96=BD=E6=97=A5?= =?UTF-8?q?=E6=9C=9F=E5=9B=A0=E4=B8=BA=E5=A4=9A=E9=80=89=E4=B9=8B=E5=90=8E?= =?UTF-8?q?=E5=9B=9E=E6=98=BE=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../accessStandardsAndRegulations/pages/addEdit.vue | 6 +++--- .../accessStandardsAndRegulations/pages/otherAddEit.vue | 6 +++--- .../accessStandardsAndRegulations/pages/projectAddEit.vue | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/pages/regulatoryRepository/accessStandardsAndRegulations/pages/addEdit.vue b/src/pages/regulatoryRepository/accessStandardsAndRegulations/pages/addEdit.vue index 0558a4442..a06e24246 100644 --- a/src/pages/regulatoryRepository/accessStandardsAndRegulations/pages/addEdit.vue +++ b/src/pages/regulatoryRepository/accessStandardsAndRegulations/pages/addEdit.vue @@ -217,8 +217,8 @@ width="150" label="新车型实施日期"> Date: Wed, 8 Dec 2021 17:41:43 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E6=B3=95=E8=A7=84=E6=B8=85=E5=8D=95=20?= =?UTF-8?q?=E5=9C=A8=E4=BA=A7=E8=BD=A6=E5=AE=9E=E6=96=BD=E6=97=A5=E6=9C=9F?= =?UTF-8?q?=E5=92=8C=E6=96=B0=E8=BD=A6=E5=9E=8B=E5=AE=9E=E6=96=BD=E6=97=A5?= =?UTF-8?q?=E6=9C=9F=E5=9B=A0=E4=B8=BA=E5=A4=9A=E9=80=89=E4=B9=8B=E5=90=8E?= =?UTF-8?q?=E5=9B=9E=E6=98=BE=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../accessStandardsAndRegulations/pages/addEdit.vue | 13 ------------- .../pages/otherAddEit.vue | 13 ------------- .../pages/projectAddEit.vue | 13 ------------- 3 files changed, 39 deletions(-) diff --git a/src/pages/regulatoryRepository/accessStandardsAndRegulations/pages/addEdit.vue b/src/pages/regulatoryRepository/accessStandardsAndRegulations/pages/addEdit.vue index a06e24246..39bb29fce 100644 --- a/src/pages/regulatoryRepository/accessStandardsAndRegulations/pages/addEdit.vue +++ b/src/pages/regulatoryRepository/accessStandardsAndRegulations/pages/addEdit.vue @@ -338,9 +338,6 @@ align="center" width="210px" label="标准实施日期"> - - - - - - - - - Date: Wed, 8 Dec 2021 17:56:27 +0800 Subject: [PATCH 4/4] commit --- .../pages/technologyInvolveProject.vue | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/pages/regulatoryRepository/localProductsOrProjectLibrary/pages/technologyInvolveProject.vue b/src/pages/regulatoryRepository/localProductsOrProjectLibrary/pages/technologyInvolveProject.vue index d1a1a8024..331585b44 100644 --- a/src/pages/regulatoryRepository/localProductsOrProjectLibrary/pages/technologyInvolveProject.vue +++ b/src/pages/regulatoryRepository/localProductsOrProjectLibrary/pages/technologyInvolveProject.vue @@ -101,10 +101,11 @@ @@ -113,7 +114,7 @@