HRM: 员工台账岗位多选前端改造
- 员工新增/编辑表单岗位改为多选下拉(postIds)
- 列表/详情/员工选择组件岗位展示改为 postNames(逗号拼接)
- API 类型 postId/postName 更新为 postIds/postNames
- 导入弹窗提示岗位与角色均支持逗号分隔多个
Co-Authored-By: Claude <noreply@anthropic.com>
| | |
| | | userId?: number; |
| | | deptId?: number; |
| | | deptName?: string; |
| | | postId?: number; |
| | | postName?: string; |
| | | postIds?: number[]; |
| | | postNames?: string; |
| | | employeeNo?: string; |
| | | name?: string; |
| | | gender?: number; |
| | |
| | | <div>员工编号:{{ selectedItem.employeeNo || '-' }}</div> |
| | | <div>员工姓名:{{ selectedItem.name || '-' }}</div> |
| | | <div v-if="selectedItem.deptName">部门:{{ selectedItem.deptName }}</div> |
| | | <div v-if="selectedItem.postName">岗位:{{ selectedItem.postName }}</div> |
| | | <div v-if="selectedItem.postNames">岗位:{{ selectedItem.postNames }}</div> |
| | | </div> |
| | | </template> |
| | | <Input |
| | |
| | | rules: 'selectRequired', |
| | | }, |
| | | { |
| | | fieldName: 'postId', |
| | | fieldName: 'postIds', |
| | | label: '岗位', |
| | | component: 'ApiSelect', |
| | | componentProps: { |
| | | api: getSimplePostList, |
| | | labelField: 'name', |
| | | valueField: 'id', |
| | | placeholder: '请选择岗位', |
| | | mode: 'multiple', |
| | | placeholder: '请选择岗位(可多选)', |
| | | }, |
| | | rules: 'selectRequired', |
| | | }, |
| | |
| | | }, |
| | | { field: 'phone', title: '手机号码', minWidth: 120 }, |
| | | { field: 'deptName', title: '部门', minWidth: 120 }, |
| | | { field: 'postName', title: '岗位', minWidth: 120 }, |
| | | { field: 'postNames', title: '岗位', minWidth: 120 }, |
| | | { field: 'nation', title: '民族', width: 90 }, |
| | | { field: 'age', title: '年龄', width: 70 }, |
| | | { field: 'education', title: '学历', width: 90 }, |
| | |
| | | { field: 'employeeNo', title: '员工编号', minWidth: 120 }, |
| | | { field: 'name', title: '员工姓名', minWidth: 100 }, |
| | | { field: 'deptName', title: '部门', minWidth: 120 }, |
| | | { field: 'postName', title: '岗位', minWidth: 120 }, |
| | | { field: 'postNames', title: '岗位', minWidth: 120 }, |
| | | { field: 'phone', title: '手机号码', minWidth: 120 }, |
| | | ]; |
| | | } |
| | |
| | | <!-- 工作信息 --> |
| | | <Descriptions title="工作信息" bordered :column="2" class="mb-4"> |
| | | <DescriptionsItem label="归属部门">{{ employee.deptName || '-' }}</DescriptionsItem> |
| | | <DescriptionsItem label="岗位">{{ employee.postName || '-' }}</DescriptionsItem> |
| | | <DescriptionsItem label="岗位">{{ employee.postNames || '-' }}</DescriptionsItem> |
| | | <DescriptionsItem label="入职日期">{{ employee.hireDate }}</DescriptionsItem> |
| | | <DescriptionsItem label="转正日期">{{ employee.regularDate || '-' }}</DescriptionsItem> |
| | | <DescriptionsItem label="离职日期">{{ employee.leaveDate || '-' }}</DescriptionsItem> |
| | |
| | | <Switch v-model:checked="updateSupport" /> |
| | | </div> |
| | | <div class="mt-2 text-gray-500"> |
| | | 仅允许导入 xls、xlsx 格式文件;模板中"部门名称/岗位名称/用户角色"填写名称,角色多个用逗号分隔 |
| | | 仅允许导入 xls、xlsx 格式文件;模板中"部门名称/岗位名称/用户角色"填写名称,岗位和角色多个用逗号分隔 |
| | | </div> |
| | | <!-- 导入进度条 --> |
| | | <div v-if="importing" class="mt-4"> |