From c05d86c9731d637d732c5b8f7a1feca5b31f4a2a Mon Sep 17 00:00:00 2001 From: dataeaseShu <106045316+dataeaseShu@users.noreply.github.com> Date: Fri, 24 Mar 2023 10:14:45 +0800 Subject: [PATCH 1/3] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E8=8B=A5id=E9=87=8D=E5=A4=8D=E5=88=99?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=8C=81=E7=BB=AD=E5=A4=84=E4=BA=8E=E5=8A=A0?= =?UTF-8?q?=E8=BD=BD=E4=B8=AD=EF=BC=8C=E4=BD=86=E6=98=AF=E5=AE=9E=E9=99=85?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=B7=B2=E7=BB=8F=E8=BF=94=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/system/user/UserEditer.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/views/system/user/UserEditer.vue b/frontend/src/views/system/user/UserEditer.vue index 5e58d7b4c8..37997c3ad5 100644 --- a/frontend/src/views/system/user/UserEditer.vue +++ b/frontend/src/views/system/user/UserEditer.vue @@ -561,6 +561,7 @@ export default { this.$success(this.$t('commons.save_success')) this.reset() this.$emit('saved') + }).finally(() => { this.loading = false }) } else { From ef89427017b3cf79dc8432e73a0a585200c9bcb4 Mon Sep 17 00:00:00 2001 From: dataeaseShu <106045316+dataeaseShu@users.noreply.github.com> Date: Fri, 24 Mar 2023 10:18:35 +0800 Subject: [PATCH 2/3] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=9B=86=E6=96=87=E4=BB=B6=E5=A4=B9=E6=97=B6?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=99=A8=E5=93=8D=E5=BA=94=E4=B8=8D=E5=8F=8A?= =?UTF-8?q?=E6=97=B6=E5=AF=BC=E8=87=B4=E5=A4=9A=E6=AC=A1=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/dataset/group/Group.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frontend/src/views/dataset/group/Group.vue b/frontend/src/views/dataset/group/Group.vue index 822cec1e01..114ac16388 100644 --- a/frontend/src/views/dataset/group/Group.vue +++ b/frontend/src/views/dataset/group/Group.vue @@ -570,6 +570,7 @@ export default { data() { return { sceneMode: false, + saveGroupLoading: false, treeLoading: false, dialogTitle: '', search: '', @@ -859,12 +860,16 @@ export default { saveGroup(group) { this.$refs['groupForm'].validate((valid) => { if (valid) { + if (this.saveGroupLoading) return + this.saveGroupLoading = true addGroup(group).then((res) => { this.close() this.openMessageSuccess('dataset.save_success') this.expandedArray.push(group.pid) const opt = group.id ? 'rename' : 'new' updateCacheTree(opt, 'dataset-tree', res.data, this.tData) + }).finally(() => { + this.saveGroupLoading = false }) } else { return false From 247dff6a354f42c71db4f9179918078475a440fa Mon Sep 17 00:00:00 2001 From: dataeaseShu <106045316+dataeaseShu@users.noreply.github.com> Date: Fri, 24 Mar 2023 11:51:32 +0800 Subject: [PATCH 3/3] =?UTF-8?q?fix:=20=E8=BF=87=E6=BB=A4=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E5=A4=9A=E9=80=89=E6=97=B6=E5=9B=A0=E4=B8=BA=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E5=8A=A0=E8=BD=BD=E5=AF=BC=E8=87=B4=E5=85=A8=E9=80=89=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E6=9F=A5=E7=9C=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/elVisualSelect/index.vue | 27 ++++++++++++++++--- .../components/widget/deWidget/DeSelect.vue | 1 + 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/elVisualSelect/index.vue b/frontend/src/components/elVisualSelect/index.vue index d05209996f..21be80326c 100644 --- a/frontend/src/components/elVisualSelect/index.vue +++ b/frontend/src/components/elVisualSelect/index.vue @@ -6,6 +6,7 @@ :class="classId" popper-class="VisualSelects coustom-de-select" no-match-text=" " + reserve-keyword clearable v-bind="$attrs" v-on="$listeners" @@ -93,7 +94,7 @@ export default { }, computed: { isIndeterminate() { - return Array.isArray(this.selectValue) && this.selectValue.length > 0 && this.selectValue.length !== this.list.length + return Array.isArray(this.selectValue) && this.selectValue.length > 0 && this.isAllSelect() > 0 && this.selectValue.length !== this.halfSelect() } }, watch: { @@ -218,14 +219,34 @@ export default { this.domList.style.paddingTop = scrollTop - (scrollTop % this.itemHeight) + 'px' }, popChange() { + this.$emit('resetKeyWords', '') this.domList.style.paddingTop = 0 + 'px' - + this.startIndex = 0 + this.$nextTick(() => { + if (this.$attrs.multiple) { + this.selectAll = this.selectValue.length === this.list.length + } + }) this.resetList() this.reCacularHeight() }, + isAllSelect() { + let vals = this.list.length + if (this.keyWord.trim()) { + vals = this.list.filter(item => item.text.includes(this.keyWord.trim())).map(ele => ele.id).filter(ele => this.selectValue.includes(ele)).length + } + return vals + }, + halfSelect() { + let vals = this.list.length + if (this.keyWord.trim()) { + vals = this.list.filter(item => item.text.includes(this.keyWord.trim())).map(ele => ele.id).length + } + return vals + }, visualChange(val) { if (this.$attrs.multiple) { - this.selectAll = val.length === this.list.length + this.selectAll = val.length === this.halfSelect() } this.$emit('visual-change', val) } diff --git a/frontend/src/components/widget/deWidget/DeSelect.vue b/frontend/src/components/widget/deWidget/DeSelect.vue index 7038e8938b..cc5c68fe96 100644 --- a/frontend/src/components/widget/deWidget/DeSelect.vue +++ b/frontend/src/components/widget/deWidget/DeSelect.vue @@ -16,6 +16,7 @@ :key-word="keyWord" popper-class="coustom-de-select" :list="data" + @resetKeyWords="filterMethod" :custom-style="customStyle" @change="changeValue" @focus="setOptionWidth"