@ebiz/designer-components 0.0.39 → 0.0.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,825 @@
1
+ <template>
2
+ <div class="ebiz-employee-selector">
3
+ <!-- 选择框展示区 -->
4
+ <div>
5
+ <div class="selected-items" v-if="selectedItems && selectedItems.length">
6
+ <div v-for="(item, index) in selectedItems" :key="index" class="selected-item">
7
+ <t-avatar v-if="item.avatar" :image="item.avatar" size="small" />
8
+ <t-avatar v-else size="small">{{ getAvatarText(item.name) }}</t-avatar>
9
+ <span class="item-info">
10
+ <span class="item-code">{{ item.code }}</span>
11
+ <span class="item-name">{{ item.name }}</span>
12
+ </span>
13
+ <t-icon name="close" class="item-remove" @click="removeItem(index, item.id)"></t-icon>
14
+ </div>
15
+ </div>
16
+ <t-button @click="showDialog" variant="text" theme="primary" size="small"> 选择人员 </t-button>
17
+ </div>
18
+
19
+ <!-- 选择弹窗 -->
20
+ <t-dialog v-model:visible="dialogVisible" header="选择人员" :width="800" :footer="false" :close-btn="true"
21
+ :close-on-esc-keydown="true" :close-on-overlay-click="true">
22
+
23
+ <!-- 选项卡 -->
24
+ <t-tabs v-model="activeTab" class="selector-tabs">
25
+ <t-tab-panel value="organization" label="组织架构" :destroyOnHide="false"></t-tab-panel>
26
+ <t-tab-panel value="role" label="角色" :destroyOnHide="false"></t-tab-panel>
27
+ <!-- <t-tab-panel value="position" label="岗位" :destroyOnHide="false"></t-tab-panel> -->
28
+ <!-- <t-tab-panel value="department" label="同部门" :destroyOnHide="false"></t-tab-panel> -->
29
+ <!-- <t-tab-panel value="subordinate" label="我的下属" :destroyOnHide="false"></t-tab-panel> -->
30
+ </t-tabs>
31
+
32
+
33
+ <div>
34
+
35
+ <div class="selector-dialog-content">
36
+ <!-- 左侧选择区域 -->
37
+ <div class="left-panel">
38
+ <!-- 顶部搜索区域 -->
39
+ <div class="search-box">
40
+ <t-input v-model="searchText" placeholder="请输入姓名/拼音/工号" clearable>
41
+ <template #suffix-icon>
42
+ <t-icon name="search"></t-icon>
43
+ </template>
44
+ </t-input>
45
+ </div>
46
+
47
+ <!-- 内容区域 -->
48
+ <div class="content-area">
49
+ <div v-if="loading" class="loading-container">
50
+ <t-loading />
51
+ </div>
52
+
53
+ <!-- 组织架构 -->
54
+ <div v-show="activeTab === 'organization'" class="tab-content">
55
+ <t-tree ref="organizationTree" :data="organizationData"
56
+ :keys="{ label: 'name', value: 'id', children: 'children' }" hover activable :active="currentActive"
57
+ @active="handleActive" />
58
+ </div>
59
+
60
+ <!-- 角色 -->
61
+ <div v-show="activeTab === 'role'" class="tab-content">
62
+ <t-tree ref="roleTree" :data="roleData" :keys="{ label: 'name', value: 'id' }" hover activable
63
+ :active="currentActive" @active="handleActive" />
64
+ </div>
65
+
66
+ <!-- 岗位 -->
67
+ <div v-show="activeTab === 'position'" class="tab-content">
68
+ <t-tree ref="positionTree" :data="positionData" :keys="{ label: 'name', value: 'id' }" hover activable
69
+ :active="currentActive" @active="handleActive" />
70
+ </div>
71
+
72
+ <!-- 同部门 -->
73
+ <div v-show="activeTab === 'department'" class="tab-content">
74
+ <t-list :split="true" size="small">
75
+ <t-list-item v-for="(item, index) in departmentData" :key="index">
76
+ <div class="department-item" @click="selectDepartment(item)">
77
+ {{ item.name }}
78
+ </div>
79
+ </t-list-item>
80
+ </t-list>
81
+ </div>
82
+
83
+ <!-- 我的下属 -->
84
+ <div v-show="activeTab === 'subordinate'" class="tab-content">
85
+ <t-list :split="true" size="small">
86
+ <t-list-item v-for="(item, index) in subordinateData" :key="index">
87
+ <div class="department-item" @click="selectDepartment(item)">
88
+ {{ item.name }}
89
+ </div>
90
+ </t-list-item>
91
+ </t-list>
92
+ </div>
93
+ </div>
94
+ </div>
95
+
96
+ <!-- 右侧人员列表区域 -->
97
+ <div class="right-panel">
98
+ <div class="employee-header">
99
+ <div class="employee-title">
100
+ {{ currentNodeName || '人员列表' }}
101
+ </div>
102
+ <div class="employee-count">
103
+ <t-checkbox v-model="selectAll" @change="handleSelectAll">全选</t-checkbox>
104
+ <span class="count-info">共 {{ employeeList.length }} 人</span>
105
+ </div>
106
+ </div>
107
+
108
+ <div class="employee-list">
109
+ <div v-for="(item, index) in filteredEmployeeList" :key="index" class="employee-item">
110
+ <t-checkbox v-model="item.checked" @change="handleCheckChange(item)"></t-checkbox>
111
+ <div class="employee-avatar">
112
+ <t-avatar v-if="item.avatar" :image="item.avatar" size="small" />
113
+ <t-avatar v-else size="small">{{ getAvatarText(item.name) }}</t-avatar>
114
+ </div>
115
+ <div class="employee-info">
116
+ <div class="employee-code">{{ item.code }}</div>
117
+ <div class="employee-name">{{ item.name }}</div>
118
+ </div>
119
+ </div>
120
+ <div v-if="filteredEmployeeList.length === 0" class="empty-data">
121
+ <t-empty />
122
+ </div>
123
+ </div>
124
+ </div>
125
+ </div>
126
+ </div>
127
+
128
+
129
+ <!-- 底部按钮区域 -->
130
+ <template #footer>
131
+ <div class="dialog-footer">
132
+ <div class="selected-preview">
133
+ 已选: {{ selectedEmployees.length }} 人
134
+ </div>
135
+ <div class="dialog-actions">
136
+ <t-button theme="default" @click="handleCancel">取消</t-button>
137
+ <t-button theme="primary" @click="handleConfirm">确定</t-button>
138
+ </div>
139
+ </div>
140
+ </template>
141
+ </t-dialog>
142
+ </div>
143
+ </template>
144
+
145
+ <script setup>
146
+ import { ref, computed, watch, onMounted } from 'vue';
147
+ import {
148
+ Dialog as TDialog,
149
+ Button as TButton,
150
+ Icon as TIcon,
151
+ Input as TInput,
152
+ Tabs as TTabs,
153
+ TabPanel as TTabPanel,
154
+ Loading as TLoading,
155
+ Tree as TTree,
156
+ Avatar as TAvatar,
157
+ Checkbox as TCheckbox,
158
+ Empty as TEmpty,
159
+ List as TList,
160
+ ListItem as TListItem,
161
+ MessagePlugin
162
+ } from 'tdesign-vue-next';
163
+ import dataService from '../apiService/simpleDataService';
164
+
165
+ // 定义组件属性
166
+ const props = defineProps({
167
+ // 选中的数据,支持v-model,只存储ID列表
168
+ modelValue: {
169
+ type: Array,
170
+ default: () => []
171
+ },
172
+ // 单选模式
173
+ single: {
174
+ type: Boolean,
175
+ default: false
176
+ },
177
+ // 是否包含部门
178
+ includeDepartment: {
179
+ type: Boolean,
180
+ default: false
181
+ },
182
+ // 默认标签页
183
+ defaultTab: {
184
+ type: String,
185
+ default: 'organization'
186
+ },
187
+ // 是否展示顶层组织
188
+ showRootOrg: {
189
+ type: Boolean,
190
+ default: true
191
+ },
192
+ // 最大选择数量,0表示不限制
193
+ maxCount: {
194
+ type: Number,
195
+ default: 0
196
+ }
197
+ });
198
+
199
+ // 定义组件事件
200
+ const emit = defineEmits(['update:modelValue', 'change']);
201
+
202
+ // 内部状态变量
203
+ const dialogVisible = ref(false);
204
+ const searchText = ref('');
205
+ const activeTab = ref(props.defaultTab);
206
+ const loading = ref(false);
207
+ const selectedItems = ref([]);
208
+
209
+ // 数据源
210
+ const organizationData = ref([]);
211
+ const roleData = ref([]);
212
+ const positionData = ref([]);
213
+ const departmentData = ref([]);
214
+ const subordinateData = ref([]);
215
+ const employeeList = ref([]);
216
+ const currentActive = ref([]);
217
+ const currentNodeName = ref('');
218
+ const selectAll = ref(false);
219
+
220
+ // 从名称中获取头像显示文本
221
+ const getAvatarText = (name) => {
222
+ return name ? name.substring(0, 1) : '';
223
+ };
224
+
225
+ // 判断员工是否已选中
226
+ const isEmployeeSelected = (employee) => {
227
+ return props.modelValue && props.modelValue.includes(employee.id);
228
+ };
229
+
230
+ // 处理组织数据,转换为树形结构
231
+ const processOrgData = (data) => {
232
+ console.log(data);
233
+ // 转换数据结构为树形结构
234
+ const map = {};
235
+ const result = [];
236
+
237
+ data.forEach(item => {
238
+ map[item.id] = {
239
+ ...item,
240
+ name: item.name,
241
+ id: item.id,
242
+ children: []
243
+ };
244
+ });
245
+
246
+ data.forEach(item => {
247
+ const node = map[item.id];
248
+
249
+ if (item.manager_dept && map[item.manager_dept]) {
250
+ map[item.manager_dept].children.push(node);
251
+ } else {
252
+ // 只有在显示根组织或不存在父节点时才添加到结果中
253
+ if (props.showRootOrg || !item.manager_dept) {
254
+ result.push(node);
255
+ }
256
+ }
257
+ });
258
+
259
+ console.log(result);
260
+
261
+ return result;
262
+ };
263
+
264
+ // 更新全选状态
265
+ const updateSelectAllStatus = () => {
266
+ selectAll.value = employeeList.value.length > 0 && employeeList.value.every(item => item.checked);
267
+ };
268
+
269
+ // 选中的员工列表
270
+ const selectedEmployees = computed(() => {
271
+ return employeeList.value.filter((item) => item.checked);
272
+ });
273
+
274
+ // 根据搜索文本过滤的员工列表
275
+ const filteredEmployeeList = computed(() => {
276
+ if (!searchText.value) {
277
+ return employeeList.value;
278
+ }
279
+
280
+ const keyword = searchText.value.toLowerCase();
281
+ return employeeList.value.filter((item) => {
282
+ return (
283
+ item.name.toLowerCase().includes(keyword) ||
284
+ (item.pinyin && item.pinyin.toLowerCase().includes(keyword)) ||
285
+ (item.code && item.code.toLowerCase().includes(keyword))
286
+ );
287
+ });
288
+ });
289
+
290
+ // 获取组织架构数据
291
+ const fetchOrganizationData = async () => {
292
+ loading.value = true;
293
+ try {
294
+ const response = await dataService.fetch(
295
+ {},
296
+ {
297
+ apiId: 1933,
298
+ key: 'organizationalStructure'
299
+ }
300
+ );
301
+ organizationData.value = processOrgData(response.data || []);
302
+ } catch (error) {
303
+ MessagePlugin.error({
304
+ content: '获取组织架构数据失败',
305
+ duration: 3000
306
+ });
307
+ } finally {
308
+ loading.value = false;
309
+ }
310
+ };
311
+
312
+ // 获取角色数据
313
+ const fetchRoleData = async () => {
314
+ loading.value = true;
315
+ try {
316
+ const response = await dataService.fetch(
317
+ {},
318
+ {},
319
+ '/process/roleList'
320
+ );
321
+ roleData.value = response || [];
322
+ } catch (error) {
323
+ MessagePlugin.error({
324
+ content: '获取角色数据失败',
325
+ duration: 3000
326
+ });
327
+ } finally {
328
+ loading.value = false;
329
+ }
330
+ };
331
+
332
+ // 获取岗位数据
333
+ const fetchPositionData = async () => {
334
+ loading.value = true;
335
+ try {
336
+ const response = await dataService.fetch(
337
+ {},
338
+ {
339
+ },
340
+ '/process/roleList'
341
+ );
342
+ positionData.value = response?.data || [];
343
+ } catch (error) {
344
+ MessagePlugin.error({
345
+ content: '获取岗位数据失败',
346
+ duration: 3000
347
+ });
348
+ } finally {
349
+ loading.value = false;
350
+ }
351
+ };
352
+
353
+ // 获取部门数据
354
+ const fetchDepartmentData = async () => {
355
+ loading.value = true;
356
+ try {
357
+ const response = await dataService.fetch(
358
+ {},
359
+ {
360
+ apiId: 1933,
361
+ key: 'departmentList',
362
+ apiType: 'MULTIPLE_DATA_SEARCH'
363
+ }
364
+ );
365
+ departmentData.value = response?.data || [];
366
+ } catch (error) {
367
+ MessagePlugin.error({
368
+ content: '获取部门数据失败',
369
+ duration: 3000
370
+ });
371
+ } finally {
372
+ loading.value = false;
373
+ }
374
+ };
375
+
376
+ // 获取下属数据
377
+ const fetchSubordinateData = async () => {
378
+ loading.value = true;
379
+ try {
380
+ const response = await dataService.fetch(
381
+ {},
382
+ {
383
+ apiKey: 'subordinateList',
384
+ apiType: 'MULTIPLE_DATA_SEARCH'
385
+ }
386
+ );
387
+ subordinateData.value = response?.data || [];
388
+ } catch (error) {
389
+ MessagePlugin.error({
390
+ content: '获取下属数据失败',
391
+ duration: 3000
392
+ });
393
+ } finally {
394
+ loading.value = false;
395
+ }
396
+ };
397
+
398
+ // 根据节点ID获取员工列表
399
+ const fetchEmployeesByNode = async (nodeId, type) => {
400
+ loading.value = true;
401
+ employeeList.value = [];
402
+
403
+ try {
404
+ const params = {};
405
+
406
+ // 根据不同类型设置不同的查询参数
407
+ switch (type) {
408
+ case 'organization':
409
+ params.deptId = nodeId[0];
410
+ break;
411
+ case 'role':
412
+ params.roleId = nodeId;
413
+ break;
414
+ case 'position':
415
+ params.positionId = nodeId;
416
+ break;
417
+ case 'department':
418
+ params.departmentId = nodeId;
419
+ break;
420
+ case 'subordinate':
421
+ params.managerId = nodeId;
422
+ break;
423
+ }
424
+
425
+ const response = await dataService.fetch(
426
+ params,
427
+ {},
428
+ '/process/userList' // 直接使用新的API路径
429
+ );
430
+
431
+ // 处理返回数据,添加checked属性
432
+ const employees = (response?.data || []).map(emp => ({
433
+ ...emp,
434
+ checked: isEmployeeSelected(emp)
435
+ }));
436
+
437
+ employeeList.value = employees;
438
+ updateSelectAllStatus();
439
+ } catch (error) {
440
+ MessagePlugin.error({
441
+ content: '获取员工列表失败',
442
+ duration: 3000
443
+ });
444
+ } finally {
445
+ loading.value = false;
446
+ }
447
+ };
448
+
449
+ // 根据ID列表批量获取员工信息
450
+ const fetchEmployeesByIds = async (ids) => {
451
+ if (!ids || ids.length === 0) {
452
+ selectedItems.value = [];
453
+ return;
454
+ }
455
+
456
+ loading.value = true;
457
+ try {
458
+ const response = await dataService.fetch(
459
+ {
460
+ ids: ids // 使用新的接口参数格式
461
+ },
462
+ {},
463
+ '/v1/employee/getByIds' // 直接使用新的API路径
464
+ );
465
+
466
+ if (response?.data && Array.isArray(response.data)) {
467
+ selectedItems.value = response.data;
468
+ } else {
469
+ selectedItems.value = [];
470
+ MessagePlugin.warning({
471
+ content: '获取员工详情返回的数据格式不正确',
472
+ duration: 3000
473
+ });
474
+ }
475
+ } catch (error) {
476
+ selectedItems.value = [];
477
+ MessagePlugin.error({
478
+ content: '获取员工详情失败: ' + (error.message || '未知错误'),
479
+ duration: 3000
480
+ });
481
+ } finally {
482
+ loading.value = false;
483
+ }
484
+ };
485
+
486
+ // 处理节点激活
487
+ const handleActive = (value, context) => {
488
+ currentActive.value = [value];
489
+ currentNodeName.value = context.node?.label || '';
490
+
491
+ // 获取该节点下的员工
492
+ fetchEmployeesByNode(value, activeTab.value);
493
+ };
494
+
495
+ // 选择部门
496
+ const selectDepartment = (department) => {
497
+ currentNodeName.value = department.name;
498
+ fetchEmployeesByNode(department.id, activeTab.value);
499
+ };
500
+
501
+ // 处理全选
502
+ const handleSelectAll = (checked) => {
503
+ employeeList.value.forEach(item => {
504
+ item.checked = checked;
505
+ });
506
+ };
507
+
508
+ // 处理选中状态变更
509
+ const handleCheckChange = (item) => {
510
+ // 单选模式下,取消其他选中
511
+ if (props.single && item.checked) {
512
+ employeeList.value.forEach(emp => {
513
+ if (emp.id !== item.id) {
514
+ emp.checked = false;
515
+ }
516
+ });
517
+ }
518
+
519
+ // 检查最大选择数量限制
520
+ if (props.maxCount > 0) {
521
+ const checkedCount = employeeList.value.filter(emp => emp.checked).length;
522
+ if (checkedCount > props.maxCount) {
523
+ item.checked = false;
524
+ // 可以添加提示信息
525
+ }
526
+ }
527
+
528
+ updateSelectAllStatus();
529
+ };
530
+
531
+ // 移除已选择的项目
532
+ const removeItem = (index, id) => {
533
+ // 移除ID
534
+ const newIds = [...props.modelValue];
535
+ const idIndex = newIds.indexOf(id);
536
+ if (idIndex !== -1) {
537
+ newIds.splice(idIndex, 1);
538
+ emit('update:modelValue', newIds);
539
+ emit('change', newIds);
540
+ }
541
+
542
+ // 移除展示项
543
+ selectedItems.value.splice(index, 1);
544
+ };
545
+
546
+ // 初始化选择器
547
+ const initSelector = async () => {
548
+ // 获取数据
549
+ if (activeTab.value === 'organization' && organizationData.value.length === 0) {
550
+ await fetchOrganizationData();
551
+ } else if (activeTab.value === 'role' && roleData.value.length === 0) {
552
+ await fetchRoleData();
553
+ } else if (activeTab.value === 'position' && positionData.value.length === 0) {
554
+ await fetchPositionData();
555
+ } else if (activeTab.value === 'department' && departmentData.value.length === 0) {
556
+ await fetchDepartmentData();
557
+ } else if (activeTab.value === 'subordinate' && subordinateData.value.length === 0) {
558
+ await fetchSubordinateData();
559
+ }
560
+ };
561
+
562
+ // 显示对话框
563
+ const showDialog = () => {
564
+ // 初始化数据
565
+ initSelector();
566
+ dialogVisible.value = true;
567
+ };
568
+
569
+ // 确认选择
570
+ const handleConfirm = () => {
571
+ const selectedEmployeeIds = employeeList.value
572
+ .filter(item => item.checked)
573
+ .map(item => item.id);
574
+
575
+ emit('update:modelValue', selectedEmployeeIds);
576
+ emit('change', selectedEmployeeIds);
577
+ dialogVisible.value = false;
578
+ };
579
+
580
+ // 取消选择
581
+ const handleCancel = () => {
582
+ dialogVisible.value = false;
583
+ };
584
+
585
+ // 监听标签页切换
586
+ watch(activeTab, () => {
587
+ // 切换标签页时重新加载数据
588
+ initSelector();
589
+ });
590
+
591
+ // 监听modelValue变化,更新展示的员工信息
592
+ watch(() => props.modelValue, (newIds, oldIds) => {
593
+ // 判断值是否真的变化了 (通过比较JSON字符串)
594
+ const newIdsStr = JSON.stringify(newIds || []);
595
+ const oldIdsStr = JSON.stringify(oldIds || []);
596
+
597
+ if (newIdsStr !== oldIdsStr) {
598
+ // 获取员工详情数据
599
+ fetchEmployeesByIds(newIds);
600
+ }
601
+ }, { immediate: true, deep: true });
602
+
603
+ // 组件挂载时执行
604
+ onMounted(() => {
605
+ // 初始化数据
606
+ if (props.defaultTab === 'organization') {
607
+ fetchOrganizationData();
608
+ }
609
+
610
+ // 获取已选员工详情
611
+ fetchEmployeesByIds(props.modelValue);
612
+ });
613
+ </script>
614
+
615
+ <style scoped>
616
+ .ebiz-employee-selector {
617
+ width: 100%;
618
+ display: flex;
619
+ flex-direction: column;
620
+ }
621
+
622
+ /* 选择框展示区 */
623
+ .employee-selector-container {
624
+ min-height: 32px;
625
+ width: 100%;
626
+ border: 1px solid #dcdcdc;
627
+ border-radius: 3px;
628
+ padding: 4px 8px;
629
+ display: flex;
630
+ flex-wrap: wrap;
631
+ gap: 8px;
632
+ align-items: center;
633
+ }
634
+
635
+ .selected-items {
636
+ display: flex;
637
+ flex-wrap: wrap;
638
+ gap: 8px;
639
+ }
640
+
641
+ .selected-item {
642
+ display: flex;
643
+ align-items: center;
644
+ background-color: #f0f0f0;
645
+ border-radius: 3px;
646
+ padding: 2px 8px 2px 2px;
647
+ gap: 8px;
648
+ }
649
+
650
+ .item-info {
651
+ display: flex;
652
+ align-items: center;
653
+ gap: 4px;
654
+ }
655
+
656
+ .item-code {
657
+ color: #999;
658
+ font-size: 12px;
659
+ }
660
+
661
+ .item-name {
662
+ font-size: 14px;
663
+ }
664
+
665
+ .item-remove {
666
+ cursor: pointer;
667
+ color: #999;
668
+ font-size: 12px;
669
+ }
670
+
671
+ .item-remove:hover {
672
+ color: #E34D59;
673
+ }
674
+
675
+ /* 选择弹窗 */
676
+ .selector-dialog-content {
677
+ display: flex;
678
+ height: 500px;
679
+ }
680
+
681
+ .left-panel, .right-panel {
682
+ height: 100%;
683
+ overflow: hidden;
684
+ display: flex;
685
+ flex-direction: column;
686
+ }
687
+
688
+ .left-panel {
689
+ width: 40%;
690
+ border-right: 1px solid #dcdcdc;
691
+ padding-right: 16px;
692
+ }
693
+
694
+ .right-panel {
695
+ width: 60%;
696
+ padding-left: 16px;
697
+ }
698
+
699
+ .search-box {
700
+ margin-bottom: 16px;
701
+ }
702
+
703
+ .selector-tabs {
704
+ margin-bottom: 16px;
705
+ }
706
+
707
+ .content-area {
708
+ flex: 1;
709
+ overflow: auto;
710
+ position: relative;
711
+ }
712
+
713
+ .loading-container {
714
+ position: absolute;
715
+ top: 0;
716
+ left: 0;
717
+ right: 0;
718
+ bottom: 0;
719
+ display: flex;
720
+ justify-content: center;
721
+ align-items: center;
722
+ background-color: rgba(255, 255, 255, 0.6);
723
+ z-index: 1;
724
+ }
725
+
726
+ .tab-content {
727
+ height: 100%;
728
+ overflow: auto;
729
+ }
730
+
731
+ .department-item {
732
+ cursor: pointer;
733
+ padding: 8px;
734
+ }
735
+
736
+ .department-item:hover {
737
+ background-color: #f5f5f5;
738
+ }
739
+
740
+ .employee-header {
741
+ display: flex;
742
+ justify-content: space-between;
743
+ align-items: center;
744
+ margin-bottom: 16px;
745
+ }
746
+
747
+ .employee-title {
748
+ font-weight: bold;
749
+ font-size: 16px;
750
+ }
751
+
752
+ .employee-count {
753
+ display: flex;
754
+ align-items: center;
755
+ gap: 8px;
756
+ }
757
+
758
+ .count-info {
759
+ color: #999;
760
+ font-size: 14px;
761
+ }
762
+
763
+ .employee-list {
764
+ flex: 1;
765
+ overflow: auto;
766
+ display: flex;
767
+ flex-direction: column;
768
+ gap: 8px;
769
+ }
770
+
771
+ .employee-item {
772
+ display: flex;
773
+ align-items: center;
774
+ gap: 12px;
775
+ padding: 8px;
776
+ border-radius: 4px;
777
+ }
778
+
779
+ .employee-item:hover {
780
+ background-color: #f5f5f5;
781
+ }
782
+
783
+ .employee-avatar {
784
+ display: flex;
785
+ align-items: center;
786
+ }
787
+
788
+ .employee-info {
789
+ display: flex;
790
+ gap: 8px;
791
+ align-items: center;
792
+ }
793
+
794
+ .employee-code {
795
+ color: #999;
796
+ font-size: 12px;
797
+ }
798
+
799
+ .employee-name {
800
+ font-size: 14px;
801
+ }
802
+
803
+ .empty-data {
804
+ display: flex;
805
+ justify-content: center;
806
+ align-items: center;
807
+ height: 200px;
808
+ }
809
+
810
+ .dialog-footer {
811
+ display: flex;
812
+ justify-content: space-between;
813
+ align-items: center;
814
+ padding: 16px 0;
815
+ }
816
+
817
+ .selected-preview {
818
+ color: #666;
819
+ }
820
+
821
+ .dialog-actions {
822
+ display: flex;
823
+ gap: 8px;
824
+ }
825
+ </style>