liu
3 天以前 b03108422a2f35efed279ff3061e5cf3142f76e3
HRM: 员工台账岗位多选前端改造

- 员工新增/编辑表单岗位改为多选下拉(postIds)
- 列表/详情/员工选择组件岗位展示改为 postNames(逗号拼接)
- API 类型 postId/postName 更新为 postIds/postNames
- 导入弹窗提示岗位与角色均支持逗号分隔多个

Co-Authored-By: Claude <noreply@anthropic.com>
已修改5个文件
19 ■■■■ 文件已修改
src/api/hrm/employee/index.ts 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/hrm/employee/components/select.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/hrm/employee/data.ts 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/hrm/employee/modules/detail.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/hrm/employee/modules/import-form.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/hrm/employee/index.ts
@@ -9,8 +9,8 @@
    userId?: number;
    deptId?: number;
    deptName?: string;
    postId?: number;
    postName?: string;
    postIds?: number[];
    postNames?: string;
    employeeNo?: string;
    name?: string;
    gender?: number;
src/views/hrm/employee/components/select.vue
@@ -118,7 +118,7 @@
          <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
src/views/hrm/employee/data.ts
@@ -95,14 +95,15 @@
      rules: 'selectRequired',
    },
    {
      fieldName: 'postId',
      fieldName: 'postIds',
      label: '岗位',
      component: 'ApiSelect',
      componentProps: {
        api: getSimplePostList,
        labelField: 'name',
        valueField: 'id',
        placeholder: '请选择岗位',
        mode: 'multiple',
        placeholder: '请选择岗位(可多选)',
      },
      rules: 'selectRequired',
    },
@@ -367,7 +368,7 @@
    },
    { 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 },
@@ -431,7 +432,7 @@
    { 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 },
  ];
}
src/views/hrm/employee/modules/detail.vue
@@ -59,7 +59,7 @@
    <!-- 工作信息 -->
    <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>
src/views/hrm/employee/modules/import-form.vue
@@ -113,7 +113,7 @@
        <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">