Pre Merge pull request !164 from Admin/dev

pull/164/MERGE
Admin 2025-07-09 07:09:09 +00:00 committed by Gitee
commit 92a5f02ebf
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 15 additions and 4 deletions

View File

@ -69,6 +69,7 @@ const deptSearchKeys = ref('');
//
const userList = ref<SystemUserApi.User[]>([]); //
const selectedUserIds = ref<string[]>([]);
const openModalData = ref<{ userIds?: number[] }>({});
//
const [Modal, modalApi] = useVbenModal({
@ -80,7 +81,7 @@ const [Modal, modalApi] = useVbenModal({
return;
}
//
const data = modalApi.getData();
const data = openModalData.value || modalApi.getData();
if (!data) {
return;
}
@ -124,6 +125,16 @@ const [Modal, modalApi] = useVbenModal({
destroyOnClose: true,
});
defineExpose({
open(userIds: number[]) {
openModalData.value = {
userIds,
};
modalApi.open();
},
close: modalApi.close,
});
//
const leftListState = ref({
searchValue: '',
@ -408,9 +419,9 @@ function processDeptNode(node: any): DeptTreeNode {
</script>
<template>
<Modal class="w-2/5" key="user-select-modal" :title="title">
<Modal class="w-3/5" key="user-select-modal" :title="title">
<Row :gutter="[16, 16]">
<Col :span="6">
<Col :span="7">
<div class="h-[500px] overflow-auto rounded border">
<div class="border-b p-2">
<Input
@ -429,7 +440,7 @@ function processDeptNode(node: any): DeptTreeNode {
/>
</div>
</Col>
<Col :span="18">
<Col :span="17">
<Transfer
:row-key="(record) => String(record.id)"
:data-source="transferDataSource"