Pre Merge pull request !164 from Admin/dev
						commit
						92a5f02ebf
					
				| 
						 | 
					@ -69,6 +69,7 @@ const deptSearchKeys = ref('');
 | 
				
			||||||
// 用户数据管理
 | 
					// 用户数据管理
 | 
				
			||||||
const userList = ref<SystemUserApi.User[]>([]); // 存储所有已知用户
 | 
					const userList = ref<SystemUserApi.User[]>([]); // 存储所有已知用户
 | 
				
			||||||
const selectedUserIds = ref<string[]>([]);
 | 
					const selectedUserIds = ref<string[]>([]);
 | 
				
			||||||
 | 
					const openModalData = ref<{ userIds?: number[] }>({});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// 弹窗配置
 | 
					// 弹窗配置
 | 
				
			||||||
const [Modal, modalApi] = useVbenModal({
 | 
					const [Modal, modalApi] = useVbenModal({
 | 
				
			||||||
| 
						 | 
					@ -80,7 +81,7 @@ const [Modal, modalApi] = useVbenModal({
 | 
				
			||||||
      return;
 | 
					      return;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    // 加载数据
 | 
					    // 加载数据
 | 
				
			||||||
    const data = modalApi.getData();
 | 
					    const data = openModalData.value || modalApi.getData();
 | 
				
			||||||
    if (!data) {
 | 
					    if (!data) {
 | 
				
			||||||
      return;
 | 
					      return;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
| 
						 | 
					@ -124,6 +125,16 @@ const [Modal, modalApi] = useVbenModal({
 | 
				
			||||||
  destroyOnClose: true,
 | 
					  destroyOnClose: true,
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					defineExpose({
 | 
				
			||||||
 | 
					  open(userIds: number[]) {
 | 
				
			||||||
 | 
					    openModalData.value = {
 | 
				
			||||||
 | 
					      userIds,
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					    modalApi.open();
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  close: modalApi.close,
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// 左侧列表状态
 | 
					// 左侧列表状态
 | 
				
			||||||
const leftListState = ref({
 | 
					const leftListState = ref({
 | 
				
			||||||
  searchValue: '',
 | 
					  searchValue: '',
 | 
				
			||||||
| 
						 | 
					@ -408,9 +419,9 @@ function processDeptNode(node: any): DeptTreeNode {
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<template>
 | 
					<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]">
 | 
					    <Row :gutter="[16, 16]">
 | 
				
			||||||
      <Col :span="6">
 | 
					      <Col :span="7">
 | 
				
			||||||
        <div class="h-[500px] overflow-auto rounded border">
 | 
					        <div class="h-[500px] overflow-auto rounded border">
 | 
				
			||||||
          <div class="border-b p-2">
 | 
					          <div class="border-b p-2">
 | 
				
			||||||
            <Input
 | 
					            <Input
 | 
				
			||||||
| 
						 | 
					@ -429,7 +440,7 @@ function processDeptNode(node: any): DeptTreeNode {
 | 
				
			||||||
          />
 | 
					          />
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
      </Col>
 | 
					      </Col>
 | 
				
			||||||
      <Col :span="18">
 | 
					      <Col :span="17">
 | 
				
			||||||
        <Transfer
 | 
					        <Transfer
 | 
				
			||||||
          :row-key="(record) => String(record.id)"
 | 
					          :row-key="(record) => String(record.id)"
 | 
				
			||||||
          :data-source="transferDataSource"
 | 
					          :data-source="transferDataSource"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue