| | |
| | | </SearchInput> |
| | | </QueryFilterItem> |
| | | </template> |
| | | <template #btn> |
| | | <el-button @click="goAddOrEdit()" type="primary">发布</el-button> |
| | | </template> |
| | | </ProTableQueryFilterBar> |
| | | <ProTableV2 |
| | | v-bind="proTableProps" |
| | |
| | | import * as flexEnterpriseServices from '@/services/api/FlexEnterprise'; |
| | | import { EmploymentArrangeColumns } from './constants'; |
| | | import { OrderInputType, Message } from '@bole-core/core'; |
| | | import { useGlobalEventContext } from '@/hooks'; |
| | | 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(); |
| | |
| | | } |
| | | ); |
| | | |
| | | 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 ?? '', |
| | | }, |