| | |
| | | const workSiteOptions = ref<{ label: string; value: any }[]>([]); |
| | | |
| | | // 选项 |
| | | |
| | | const options = reactive({ |
| | | status: [ |
| | | { label: t("在职"), value: 0 }, |
| | | { label: t("离职"), value: 1 }, |
| | | { label: t("禁用"), value: 2 }, |
| | | sex: [ |
| | | { label: t('未知'), value: '未知' }, |
| | | { label: t('男'), value: '男' }, |
| | | { label: t('女'), value: '女' } |
| | | ], |
| | | status: [ |
| | | { label: t('在职'), value: 0 }, |
| | | { label: t('离职'), value: 1 }, |
| | | { label: t('禁用'), value: 2 } |
| | | ] |
| | | }); |
| | | |
| | | // cl-upsert |
| | |
| | | span: 12, |
| | | required: true, |
| | | }, |
| | | |
| | | { |
| | | label: t("手机号"), |
| | | label: t('手机号'), |
| | | prop: "phone", |
| | | component: { name: "el-input", props: { clearable: true } }, |
| | | span: 12, |
| | | required: true |
| | | }, |
| | | { |
| | | label: t('密码'), |
| | | prop: "password", |
| | | component: { name: "el-input", props: { clearable: true } }, |
| | | span: 12, |
| | | required: true |
| | | |
| | | }, |
| | | { |
| | | label: t('性别'), |
| | | prop: "sex", |
| | | component: { name: "el-radio-group", options: options.sex }, |
| | | value: 0, |
| | | required: true |
| | | }, |
| | | { |
| | | label: t('生日'), |
| | | prop: "birthday", |
| | | component: { |
| | | name: "el-date-picker", |
| | | props: { type: "date", valueFormat: "YYYY-MM-DD" } |
| | | }, |
| | | span: 12 |
| | | }, |
| | | { |
| | | label: t("入职日期"), |
| | | prop: "hireDate", |
| | | component: { |
| | | name: "el-date-picker", |
| | | props: { type: "date", valueFormat: "YYYY-MM-DD" }, |
| | | }, |
| | | span: 12, |
| | | }, |
| | | { |
| | | label: t("离职日期"), |
| | | prop: "leaveDate", |
| | | component: { |
| | | name: "el-date-picker", |
| | | props: { type: "date", valueFormat: "YYYY-MM-DD" }, |
| | |
| | | const Table = useTable({ |
| | | columns: [ |
| | | { type: "selection" }, |
| | | { label: t("所属单位"), prop: "departmentName", minWidth: 120 }, |
| | | { label: t("身份证号"), prop: "businessId", minWidth: 140 }, |
| | | { label: t("姓名"), prop: "businessName", minWidth: 140 }, |
| | | { label: t("手机号"), prop: "phone", minWidth: 140 }, |
| | | { label: t("性别"), prop: "sex", minWidth: 140 }, |
| | | { |
| | | label: t("入职日期"), |
| | | prop: "hireDate", |
| | | minWidth: 140, |
| | | sortable: "custom", |
| | | component: { |
| | | name: "cl-date-text", |
| | | props: { format: "YYYY-MM-DD" }, |
| | | }, |
| | | }, |
| | | { |
| | | label: t("离职日期"), |
| | | prop: "leaveDate", |
| | | minWidth: 140, |
| | | sortable: "custom", |
| | | component: { |
| | |
| | | minWidth: 120, |
| | | dict: options.status, |
| | | }, |
| | | { label: t("所属单位"), prop: "departmentName", minWidth: 120 }, |
| | | { label: t("工作站点"), prop: "workSiteName", minWidth: 120 }, |
| | | { |
| | | label: t("身份证正面照"), |