diff --git a/frontend/src/components/business/ms-associate-case/useTreeSelection.ts b/frontend/src/components/business/ms-associate-case/useTreeSelection.ts index d17a78aedc..931b6b96e0 100644 --- a/frontend/src/components/business/ms-associate-case/useTreeSelection.ts +++ b/frontend/src/components/business/ms-associate-case/useTreeSelection.ts @@ -171,6 +171,7 @@ export default function useTreeSelection(selectedModuleProps: SelectedModuleProp Object.keys(selectedModulesMaps.value).forEach((key) => { delete selectedModulesMaps.value[key]; }); + checkedKeys.value = []; isCheckedAll.value = false; } diff --git a/frontend/src/components/business/ms-tree/index.vue b/frontend/src/components/business/ms-tree/index.vue index 8780b37ed0..7900861409 100644 --- a/frontend/src/components/business/ms-tree/index.vue +++ b/frontend/src/components/business/ms-tree/index.vue @@ -322,7 +322,7 @@ filterTreeData.value = data.value; } nextTick(() => { - treeRef.value?.expandAll(false); + treeRef.value?.expandAll(props.defaultExpandAll ?? false); }); } else { updateDebouncedSearch(); diff --git a/frontend/src/components/pure/ms-tree-select/index.vue b/frontend/src/components/pure/ms-tree-select/index.vue index f08f18cf14..ba0bb3fa3e 100644 --- a/frontend/src/components/pure/ms-tree-select/index.vue +++ b/frontend/src/components/pure/ms-tree-select/index.vue @@ -1,80 +1,168 @@ - - - {{ slotData.label }} + + + {{ slotData.label }} + + + + + + + {{ nodeData.name }} + + + + + {{ + checkedKeys.includes(nodeData.id) + ? t('ms.case.associate.cancelCurrent') + : t('ms.case.associate.selectCurrent') + }} + + + - - - {{ node[props?.fieldNames?.title || 'title'] }} - - - + diff --git a/frontend/src/views/api-test/management/components/management/api/createShareModal.vue b/frontend/src/views/api-test/management/components/management/api/createShareModal.vue index a8821d09e1..ed3e04347a 100644 --- a/frontend/src/views/api-test/management/components/management/api/createShareModal.vue +++ b/frontend/src/views/api-test/management/components/management/api/createShareModal.vue @@ -31,6 +31,7 @@ :data="moduleTree" allow-clear :multiple="true" + tree-check-strictly :tree-checkable="true" :placeholder="t('common.pleaseSelect')" :field-names="{ title: 'name', key: 'id', children: 'children' }"