| | |
| | | import { Message } from '@bole-core/core'; |
| | | import { EnumUserGender, EnumTaskUserHireStatusText } from '@/constants'; |
| | | import StaffInfoDialog from '@/views/FlexJobManage/components/StaffInfoDialog.vue'; |
| | | import { convertApi2FormUrlOnlyOne } from '@/utils'; |
| | | import { convertApi2FormUrlOnlyOne, hiddenIDNumberForEnd4 } from '@/utils'; |
| | | import * as taskUserServices from '@/services/api/taskUser'; |
| | | import * as enterpriseEmployeeServices from '@/services/api/enterpriseEmployee'; |
| | | |
| | |
| | | }, |
| | | extraProps: { |
| | | hide: (row: API.GetTaskUsersQueryResultItem) => |
| | | row.hireStatus === EnumTaskUserHireStatus.Pass, |
| | | row.hireStatus === EnumTaskUserHireStatus.Pass || !state.isInternal, |
| | | }, |
| | | }, |
| | | refuseBtn: { |
| | |
| | | }, |
| | | extraProps: { |
| | | hide: (row: API.GetTaskUsersQueryResultItem) => |
| | | row.hireStatus !== EnumTaskUserHireStatus.Wait, |
| | | row.hireStatus !== EnumTaskUserHireStatus.Wait || !state.isInternal, |
| | | }, |
| | | }, |
| | | }; |
| | |
| | | const id = route.params.id as string; |
| | | const BaseState = { |
| | | loading: true, |
| | | |
| | | isInternal: false, |
| | | }; |
| | | |
| | | const state = reactive({ ...BaseState }); |
| | |
| | | let res = await taskUserServices.getTaskUsers(params, { |
| | | showLoading: !state.loading, |
| | | }); |
| | | if (res) { |
| | | state.isInternal = res.objectData?.isInternal; |
| | | } |
| | | return res; |
| | | } catch (error) { |
| | | console.log('error: ', error); |
| | |
| | | columnsRenderProps: { |
| | | gender: { type: 'enum', valueEnum: EnumUserGenderTextForPerson }, |
| | | hireStatus: { type: 'enum', valueEnum: EnumTaskUserHireStatusText }, |
| | | identity: { |
| | | formatter: (row: API.GetTaskUsersQueryResultItem) => { |
| | | return hiddenIDNumberForEnd4(row.identity); |
| | | }, |
| | | }, |
| | | }, |
| | | } |
| | | ); |