| | |
| | | <SearchInput |
| | | v-model="extraParamState.searchWord" |
| | | style="width: 250px" |
| | | placeholder="任务名称" |
| | | placeholder="姓名/身份证/电话" |
| | | @on-click-search="getList" |
| | | @keyup.enter="getList()" |
| | | > |
| | | </SearchInput> |
| | | </QueryFilterItem> |
| | | </template> |
| | | <template #btn> |
| | | <el-button @click="goAddOrEdit()" type="primary">发布</el-button> |
| | | </template> |
| | | </ProTableQueryFilterBar> |
| | | <ProTableV2 |
| | |
| | | FieldRadio, |
| | | defineOperationBtns, |
| | | } from '@bole-core/components'; |
| | | import * as flexEnterpriseServices from '@/services/api/FlexEnterprise'; |
| | | import { EmploymentArrangeColumns } from './constants'; |
| | | import { OrderInputType, Message } from '@bole-core/core'; |
| | | import { useGlobalEventContext } from '@/hooks'; |
| | | import { Message } from '@bole-core/core'; |
| | | import { FlexEnterpriseSettingStatus } from '@/constants'; |
| | | |
| | | defineOptions({ |
| | |
| | | const operationBtns = defineOperationBtns([ |
| | | { |
| | | data: { |
| | | enCode: 'editBtn', |
| | | name: '编辑', |
| | | }, |
| | | emits: { |
| | | onClick: (role) => goAddOrEdit(role), |
| | | }, |
| | | }, |
| | | { |
| | | data: { |
| | | enCode: 'detailBtn', |
| | | name: '详情', |
| | | }, |
| | | emits: { |
| | | onClick: (role) => goDetail(role), |
| | | }, |
| | | }, |
| | | { |
| | | data: { |
| | | enCode: 'publishBtn', |
| | | name: '发布', |
| | | }, |
| | | emits: { |
| | | onClick: (role) => handlePublish(role), |
| | | }, |
| | | extraProps: { |
| | | hide: (row) => false, |
| | | }, |
| | | }, |
| | | { |
| | | data: { |
| | | enCode: 'unPublishBtn', |
| | | name: '停止发布', |
| | | }, |
| | | emits: { |
| | | onClick: (role) => handleUnPublish(role), |
| | | }, |
| | | extraProps: { |
| | | hide: (row) => false, |
| | | }, |
| | | }, |
| | | { |
| | | data: { |
| | | enCode: 'arrangeBtn', |
| | | name: '安排', |
| | | }, |
| | | props: { type: 'danger' }, |
| | | emits: { |
| | | onClick: (role) => handleArrange(role), |
| | | }, |
| | |
| | | }; |
| | | |
| | | const state = reactive({ ...BaseState }); |
| | | |
| | | const eventContext = useGlobalEventContext(); |
| | | |
| | | eventContext.addEvent('employment:add', () => { |
| | | getList(); |
| | | }); |
| | | |
| | | eventContext.addEvent('employment:edit', () => { |
| | | getList(paginationState.pageIndex); |
| | | }); |
| | | |
| | | onMounted(async () => { |
| | | await getList(); |
| | |
| | | { |
| | | defaultExtraParams: { |
| | | searchWord: '', |
| | | orderInput: [{ property: 'id', order: OrderInputType.Desc }], |
| | | orderInput: [{ property: 'id', order: EnumPagedListOrder.Desc }], |
| | | flexEnterpriseSettingStatus: '' as any as FlexEnterpriseSettingStatus, |
| | | }, |
| | | queryKey: ['flexEnterpriseServices/getFlexEnterpriseList'], |
| | |
| | | } |
| | | ); |
| | | |
| | | function handlePublish(row) { |
| | | console.log(row); |
| | | } |
| | | function handleUnPublish(row) { |
| | | console.log(row); |
| | | } |
| | | |
| | | function handleArrange(row) { |
| | | router.push({ |
| | | name: 'EmploymentManageArrange', |
| | | params: { |
| | | id: row?.id ?? '', |
| | | }, |
| | | }); |
| | | } |
| | | function goAddOrEdit(row?) { |
| | | router.push({ |
| | | name: 'AddOrEditEmployment', |
| | | params: { |
| | | id: row?.id ?? '', |
| | | }, |
| | | }); |
| | | } |
| | | function goDetail(row) { |
| | | router.push({ |
| | | name: 'EmploymentManageDetail', |
| | | params: { |
| | | id: row?.id ?? '', |
| | | }, |
| | | }); |
| | | console.log('row: ', row); |
| | | } |
| | | </script> |