From 97dc0ccda2d0796164c47701de4f8f3a1432a10c Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Wed, 7 Aug 2024 14:02:11 +0800 Subject: [PATCH] =?UTF-8?q?feat(X-Pack):=20=E9=BB=98=E8=AE=A4=E7=BB=84?= =?UTF-8?q?=E7=BB=87=E7=AE=A1=E7=90=86=E5=91=98=E5=8F=AF=E4=BB=A5=E6=9F=A5?= =?UTF-8?q?=E7=9C=8B=E7=BB=84=E7=BB=87=E4=B8=8B=E6=89=80=E6=9C=89=E6=97=A5?= =?UTF-8?q?=E5=BF=97=20#10897?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/drawer-main/src/DrawerMain.vue | 25 +++++++++++++++++-- de-xpack | 2 +- .../api/permissions/org/api/OrgApi.java | 4 +++ .../api/permissions/user/api/UserApi.java | 4 +++ 4 files changed, 32 insertions(+), 3 deletions(-) diff --git a/core/core-frontend/src/components/drawer-main/src/DrawerMain.vue b/core/core-frontend/src/components/drawer-main/src/DrawerMain.vue index 293382d1e1..a8de71f1c7 100644 --- a/core/core-frontend/src/components/drawer-main/src/DrawerMain.vue +++ b/core/core-frontend/src/components/drawer-main/src/DrawerMain.vue @@ -33,6 +33,18 @@ const userDrawer = ref(false) const init = () => { userDrawer.value = true } +const cleanrInnerValue = (index: number) => { + const field = componentList.value[index]?.field + if (!field) { + return + } + myRefs.value[index]?.clear() + for (let i = 0; i < state.conditions.length; i++) { + if (state.conditions[i].field === field) { + state.conditions[i].value = [] + } + } +} const clearInnerTag = (index?: number) => { if (isNaN(index)) { for (let i = 0; i < componentList.value.length; i++) { @@ -74,6 +86,7 @@ const filterChange = (value, field, operator) => { if (!exits && value?.length) { state.conditions.push({ field, value, operator }) } + treeFilterChange(value, field, operator) } const reset = () => { clearFilter() @@ -82,14 +95,22 @@ const reset = () => { const close = () => { userDrawer.value = false } -const emits = defineEmits(['trigger-filter']) +const emits = defineEmits(['trigger-filter', 'tree-filter-change']) const trigger = () => { emits('trigger-filter', state.conditions) } +const treeFilterChange = (value, field, operator) => { + emits('tree-filter-change', { + value, + field, + operator + }) +} defineExpose({ init, clearFilter, - close + close, + cleanrInnerValue }) diff --git a/de-xpack b/de-xpack index 11240f0a32..a3398f5493 160000 --- a/de-xpack +++ b/de-xpack @@ -1 +1 @@ -Subproject commit 11240f0a32fc1916409c82580e79fb17bb7988eb +Subproject commit a3398f5493e2ac0fcc5df37345c10afe419853bc diff --git a/sdk/api/api-permissions/src/main/java/io/dataease/api/permissions/org/api/OrgApi.java b/sdk/api/api-permissions/src/main/java/io/dataease/api/permissions/org/api/OrgApi.java index 7f8ec71fe4..b42df9cc9f 100644 --- a/sdk/api/api-permissions/src/main/java/io/dataease/api/permissions/org/api/OrgApi.java +++ b/sdk/api/api-permissions/src/main/java/io/dataease/api/permissions/org/api/OrgApi.java @@ -61,4 +61,8 @@ public interface OrgApi { @Operation(hidden = true) @GetMapping("/detail/{oid}") OrgDetailVO detail(@PathVariable("oid") Long oid); + + @Operation(hidden = true) + @GetMapping("/subOrgs") + List subOrgs(); } diff --git a/sdk/api/api-permissions/src/main/java/io/dataease/api/permissions/user/api/UserApi.java b/sdk/api/api-permissions/src/main/java/io/dataease/api/permissions/user/api/UserApi.java index 993e470c5f..ab368e28f2 100644 --- a/sdk/api/api-permissions/src/main/java/io/dataease/api/permissions/user/api/UserApi.java +++ b/sdk/api/api-permissions/src/main/java/io/dataease/api/permissions/user/api/UserApi.java @@ -190,4 +190,8 @@ public interface UserApi { @GetMapping("/invalidPwd") InvalidPwdVO invalidPwd(); + @Hidden + @PostMapping("/subOrgUser") + List subOrgUser(@RequestBody List oidList); + }