diff --git a/src/api/apiDefinitions.ts b/src/api/apiDefinitions.ts index d255789..99da36d 100644 --- a/src/api/apiDefinitions.ts +++ b/src/api/apiDefinitions.ts @@ -90,5 +90,6 @@ export default { 'AppSettings.getPushSetting': ['GET', '/api/app/GetPushSetting/{id}'], 'Push.test': ['POST', '/api/push/Test'], 'Push.recordList': ['GET', '/api/push/RecordList'], - 'Push.retry': ['POST', '/api/push/Retry/{id}'] + 'Push.retry': ['POST', '/api/push/Retry/{id}'], + 'Push.download': ['GET', '/api/push/Download/{id}'] }; diff --git a/src/components/GroupTreeSearchPanel.vue b/src/components/GroupTreeSearchPanel.vue index ce96faa..2c4c7c6 100644 --- a/src/components/GroupTreeSearchPanel.vue +++ b/src/components/GroupTreeSearchPanel.vue @@ -36,6 +36,7 @@ const DEFAULT_CACHE_KEY = 'bsch.group-tree.selected-node' const props = withDefaults(defineProps<{ treeApi: () => Promise; autoClick?: boolean; + autoSelect?: boolean; defaultSearchVisible?: boolean; showCloseButton?: boolean; searchPlaceholder?: string; @@ -43,6 +44,7 @@ const props = withDefaults(defineProps<{ checkable?: boolean; }>(), { autoClick: false, + autoSelect: true, defaultSearchVisible: true, showCloseButton: false, searchPlaceholder: '输入组名称搜索', @@ -155,9 +157,12 @@ async function loadTree(preferredId?: number | null) { if (!treeData.value.length) return; await nextTick(); - const selectId = resolveInitialSelectId(treeData.value, preferredId); - if (selectId != null) { - refMyTree.value?.reloadTree(selectId); + // 默认自动选中首个可用节点(触发 on-change);移动组等场景传 autoSelect=false 关闭,避免打开即误触"不能移动到自身" + if (props.autoSelect) { + const selectId = resolveInitialSelectId(treeData.value, preferredId); + if (selectId != null) { + refMyTree.value?.reloadTree(selectId); + } } } diff --git a/src/views/group-user/group/GroupMove.vue b/src/views/group-user/group/GroupMove.vue index 50b47fc..3917150 100644 --- a/src/views/group-user/group/GroupMove.vue +++ b/src/views/group-user/group/GroupMove.vue @@ -7,7 +7,7 @@
移动至:
+ :autoSelect="false" :defaultSearchVisible="true" :showCloseButton="false" @on-change="onPickTarget" />
已选择目标:{{ targetName }}