| | |
| | | [ExternalSystem.JYB]: '江佑共保运营端', |
| | | [ExternalSystem.flexjob]: '灵工系统运营端', |
| | | }; |
| | | |
| | | export enum OperateHistoryTypeEnum { |
| | | /** |
| | | * 认证用户日志 |
| | | */ |
| | | CertifiedUser = 10, |
| | | /** |
| | | * 平台用户日志 |
| | | */ |
| | | PlatformUser = 11, |
| | | /** |
| | | * 用户认证审核日志 |
| | | */ |
| | | UserCertificationAudit = 12, |
| | | /** |
| | | * 公告日志 |
| | | */ |
| | | SystemNotice = 13, |
| | | /** |
| | | * 资讯管理日志 |
| | | */ |
| | | InformationForManage = 14, |
| | | /** |
| | | * 资讯审核日志 |
| | | */ |
| | | InformationWaitForCheck = 15, |
| | | /** |
| | | * 开户管理日志 |
| | | */ |
| | | WalletAccountOpen = 16, |
| | | /** |
| | | * 转账审核对单日志 |
| | | */ |
| | | alletSingleTransfer = 17, |
| | | /** |
| | | * 充值审核 |
| | | */ |
| | | WalletRecharge = 18, |
| | | /** |
| | | * 账户管理 |
| | | */ |
| | | AccountManage = 19, |
| | | /** |
| | | * 认证管理 |
| | | */ |
| | | UserCertificationManage = 20, |
| | | /** |
| | | * 批量转账审核日志 |
| | | */ |
| | | AuditWalletBatchTransfer = 21, |
| | | /** |
| | | * 行业机构审核日志 |
| | | */ |
| | | IndustryBodyAudit = 22, |
| | | /** |
| | | * 行业配套审核日志 |
| | | */ |
| | | IndustryMatingAudit = 23, |
| | | /** |
| | | * 甲方企业审核日志 |
| | | */ |
| | | FirstPartyCompanyAudit = 24, |
| | | /** |
| | | * 人资公司审核日志 |
| | | */ |
| | | ParkOrHRAudit = 25, |
| | | /** |
| | | * 行业机构管理日志 |
| | | */ |
| | | IndustryBodyManage = 26, |
| | | /** |
| | | * 行业配套管理日志 |
| | | */ |
| | | IndustryMatingManage = 27, |
| | | /** |
| | | * 甲方企业管理日志 |
| | | */ |
| | | FirstPartyCompanyManage = 28, |
| | | /** |
| | | * 人资公司管理日志 |
| | | */ |
| | | ParkOrHRManage = 29, |
| | | /** |
| | | * 客户管理日志 |
| | | */ |
| | | CustomerManage = 30, |
| | | /** |
| | | * 奖励配置日志 |
| | | */ |
| | | ParkRewardManage = 31, |
| | | /** |
| | | * 客户模板操作日志 |
| | | */ |
| | | CustomerContractTemplate = 32, |
| | | } |
| | |
| | | export * from './table'; |
| | | export * from './fourStreams'; |
| | | export * from './industrialPark'; |
| | | export * from './log'; |
| | | export * from './useOpenLogHooks'; |
| New file |
| | |
| | | import * as operateHistoryServices from '@/services/api/OperateHistory'; |
| | | import { OrderInputType } from '@bole-core/core'; |
| | | import { useTable } from '@bole-core/components'; |
| | | import { MaybeRef } from 'vue'; |
| | | import { OperateHistoryTypeEnum } from '@/constants'; |
| | | |
| | | export enum OperateType { |
| | | /** |
| | | * 审核 |
| | | */ |
| | | Audit = 1, |
| | | /** |
| | | * 入账 |
| | | */ |
| | | Account = 2, |
| | | /** |
| | | * 上传发票 |
| | | */ |
| | | Invoice = 3, |
| | | } |
| | | |
| | | export const OperateTypeText = { |
| | | [OperateType.Audit]: '审核', |
| | | [OperateType.Account]: '入账', |
| | | [OperateType.Invoice]: '上传发票', |
| | | }; |
| | | |
| | | export type UseTableLogListOptions = { |
| | | relationId: MaybeRef<string>; |
| | | operateType?: MaybeRef<number>; |
| | | }; |
| | | |
| | | export function useTableLogList({ relationId, operateType }: UseTableLogListOptions) { |
| | | const BaseState = { |
| | | loading: true, |
| | | }; |
| | | |
| | | const state = reactive({ ...BaseState }); |
| | | |
| | | const { getDataSource: getList, proTableProps } = useTable( |
| | | async ({ pageIndex, pageSize }) => { |
| | | try { |
| | | let params: API.GetOperateHistoryInput = { |
| | | pageModel: { |
| | | rows: pageSize, |
| | | page: pageIndex, |
| | | orderInput: [{ property: 'creationTime', order: OrderInputType.Desc }], |
| | | }, |
| | | relationId: unref(relationId), |
| | | }; |
| | | const _operateType = unref(operateType); |
| | | if (_operateType) { |
| | | params.operateName = OperateTypeText[_operateType]; |
| | | } |
| | | let res = await operateHistoryServices.getOperateHistoryByRelationId(params, { |
| | | showLoading: !state.loading, |
| | | }); |
| | | return res; |
| | | } catch (error) {} |
| | | }, |
| | | { |
| | | queryKey: ['operateHistoryServices/getOperateHistoryByRelationId'], |
| | | columnsRenderProps: { |
| | | creationTime: { |
| | | type: 'date', |
| | | format: 'YYYY-MM-DD HH:mm:ss', |
| | | }, |
| | | }, |
| | | } |
| | | ); |
| | | |
| | | const OperateHistoryTableColumns: API.CustomModuleColumnDto[] = [ |
| | | { id: '1', enCode: 'creatorName', name: '操作人' }, |
| | | { id: '2', enCode: 'creationTime', name: '操作时间', width: 180 }, |
| | | { id: '3', enCode: 'operateName', name: '操作' }, |
| | | { id: '4', enCode: 'operateContent', name: '操作内容' }, |
| | | ]; |
| | | |
| | | return { |
| | | state, |
| | | getList, |
| | | proTableProps, |
| | | OperateHistoryTableColumns, |
| | | }; |
| | | } |
| | | |
| | | export type UseTableLogListByTypeOptions = { |
| | | relationId: MaybeRef<string>; |
| | | operateHistoryType?: MaybeRef<OperateHistoryTypeEnum>; |
| | | }; |
| | | |
| | | export function useTableLogListByType({ |
| | | relationId, |
| | | operateHistoryType, |
| | | }: UseTableLogListByTypeOptions) { |
| | | const BaseState = { |
| | | loading: true, |
| | | }; |
| | | |
| | | const state = reactive({ ...BaseState }); |
| | | |
| | | const { getDataSource: getList, proTableProps } = useTable( |
| | | async ({ pageIndex, pageSize }) => { |
| | | try { |
| | | let params: API.QueryOperateHistoryByTypeInput = { |
| | | pageModel: { |
| | | rows: pageSize, |
| | | page: pageIndex, |
| | | orderInput: [{ property: 'creationTime', order: OrderInputType.Desc }], |
| | | }, |
| | | typeId: unref(relationId), |
| | | operateHistoryType: unref(operateHistoryType), |
| | | }; |
| | | |
| | | let res = await operateHistoryServices.getOperateHistoryByType(params, { |
| | | showLoading: !state.loading, |
| | | }); |
| | | return res; |
| | | } catch (error) {} |
| | | }, |
| | | { |
| | | queryKey: ['operateHistoryServices/getOperateHistoryByRelationId'], |
| | | columnsRenderProps: { |
| | | creationTime: { |
| | | type: 'date', |
| | | format: 'YYYY-MM-DD HH:mm:ss', |
| | | }, |
| | | }, |
| | | } |
| | | ); |
| | | |
| | | const OperateHistoryTableColumns: API.CustomModuleColumnDto[] = [ |
| | | { id: '1', enCode: 'creatorName', name: '操作人' }, |
| | | { id: '2', enCode: 'creationTime', name: '操作时间', width: 180 }, |
| | | { id: '3', enCode: 'operateName', name: '操作' }, |
| | | { id: '4', enCode: 'operateContent', name: '操作内容' }, |
| | | ]; |
| | | |
| | | return { |
| | | state, |
| | | getList, |
| | | proTableProps, |
| | | OperateHistoryTableColumns, |
| | | }; |
| | | } |
| New file |
| | |
| | | import { useDialog } from '@bole-core/components'; |
| | | import { OperateHistoryTypeEnum } from '@/constants'; |
| | | |
| | | type UseAdvertisementListOptions = { |
| | | operateType?: MaybeRef<number>; |
| | | }; |
| | | |
| | | export function useOpenLogDialog(options: UseAdvertisementListOptions = {}) { |
| | | const { operateType } = options; |
| | | |
| | | const relationId = ref(''); |
| | | |
| | | const { dialogProps, dialogState } = useDialog(); |
| | | |
| | | async function openLogDialog(_relationId: string) { |
| | | relationId.value = _relationId; |
| | | await nextTick(); |
| | | dialogState.dialogVisible = true; |
| | | } |
| | | |
| | | const logDialogProps = computed(() => { |
| | | return { |
| | | ...dialogProps.value, |
| | | relationId: relationId.value, |
| | | operateType: unref(operateType), |
| | | }; |
| | | }); |
| | | return { |
| | | logDialogProps, |
| | | openLogDialog, |
| | | }; |
| | | } |
| | | |
| | | type UseOpenLogByTypeDialogOptions = { |
| | | operateHistoryType?: MaybeRef<OperateHistoryTypeEnum>; |
| | | }; |
| | | |
| | | export function useOpenLogByTypeDialog(options: UseOpenLogByTypeDialogOptions = {}) { |
| | | const { operateHistoryType } = options; |
| | | |
| | | const relationId = ref(''); |
| | | |
| | | const { dialogProps, dialogState } = useDialog(); |
| | | |
| | | async function openLogDialog(_relationId: string) { |
| | | relationId.value = _relationId; |
| | | await nextTick(); |
| | | dialogState.dialogVisible = true; |
| | | } |
| | | |
| | | const logDialogProps = computed(() => { |
| | | return { |
| | | ...dialogProps.value, |
| | | relationId: relationId.value, |
| | | operateHistoryType: unref(operateHistoryType), |
| | | }; |
| | | }); |
| | | return { |
| | | logDialogProps, |
| | | openLogDialog, |
| | | }; |
| | | } |
| | |
| | | </ProTableV2> |
| | | <ParkBountyApplyRedoDialog v-bind="dialogProps" /> |
| | | </AppContainer> |
| | | <OperateHistoryLogDialog v-bind="logDialogProps" /> |
| | | </LoadingLayout> |
| | | </template> |
| | | |
| | |
| | | import * as parkBountyApplyServices from '@/services/api/ParkBountyApply'; |
| | | import _ from 'lodash'; |
| | | import { ModelValueType } from 'element-plus'; |
| | | import { useAccess, useGlobalEventContext, useIndustrialParkDropDownList } from '@/hooks'; |
| | | import { |
| | | useAccess, |
| | | useGlobalEventContext, |
| | | useIndustrialParkDropDownList, |
| | | useOpenLogDialog, |
| | | } from '@/hooks'; |
| | | import ParkBountyApplyRedoDialog from './components/ParkBountyApplyRedoDialog.vue'; |
| | | |
| | | defineOptions({ |
| | |
| | | row.outReCheckStatus !== BountyCheckStatusEnum.CheckPassed, |
| | | }, |
| | | }, |
| | | logBtn: { emits: { onClick: (role) => openLogDialog(role.id) } }, |
| | | }; |
| | | |
| | | const { checkSubModuleItemShow, column, operationBtns } = useAccess({ |
| | |
| | | } |
| | | } catch (error) {} |
| | | } |
| | | |
| | | const { openLogDialog, logDialogProps } = useOpenLogDialog(); |
| | | </script> |
| | |
| | | </ProTableV2> |
| | | <ParkBountyApplyRedoDialog v-bind="dialogProps" /> |
| | | </AppContainer> |
| | | <OperateHistoryLogDialog v-bind="logDialogProps" /> |
| | | </LoadingLayout> |
| | | </template> |
| | | |
| | |
| | | import * as parkBountyApplyServices from '@/services/api/ParkBountyApply'; |
| | | import _ from 'lodash'; |
| | | import { ModelValueType } from 'element-plus'; |
| | | import { useAccess, useGlobalEventContext, useIndustrialParkDropDownList } from '@/hooks'; |
| | | import { |
| | | useAccess, |
| | | useGlobalEventContext, |
| | | useIndustrialParkDropDownList, |
| | | useOpenLogDialog, |
| | | } from '@/hooks'; |
| | | import ParkBountyApplyRedoDialog from './components/ParkBountyApplyRedoDialog.vue'; |
| | | |
| | | defineOptions({ |
| | |
| | | row.outCheckStatus !== BountyCheckStatusEnum.CheckPassed, |
| | | }, |
| | | }, |
| | | logBtn: { emits: { onClick: (role) => openLogDialog(role.id) } }, |
| | | }; |
| | | |
| | | const { checkSubModuleItemShow, column, operationBtns } = useAccess({ |
| | |
| | | } |
| | | } catch (error) {} |
| | | } |
| | | |
| | | const { openLogDialog, logDialogProps } = useOpenLogDialog(); |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |