From 85f7bdb64b1f8b0fdaf58355a4f3fc389ec26ad0 Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期二, 18 十一月 2025 16:00:00 +0800
Subject: [PATCH] feat: 新增审核撤回日志
---
src/views/MaterialReview/MaterialReview.vue | 11 +
src/hooks/useOpenLogHooks.ts | 62 ++++++++++
src/views/MaterialReview/MaterialReReviewList.vue | 11 +
src/hooks/log.ts | 145 ++++++++++++++++++++++++
src/constants/enum.ts | 95 +++++++++++++++
src/hooks/index.ts | 2
6 files changed, 324 insertions(+), 2 deletions(-)
diff --git a/src/constants/enum.ts b/src/constants/enum.ts
index 80a41ea..62bf523 100644
--- a/src/constants/enum.ts
+++ b/src/constants/enum.ts
@@ -98,3 +98,98 @@
[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,
+}
diff --git a/src/hooks/index.ts b/src/hooks/index.ts
index 475a6f8..d2afaa4 100644
--- a/src/hooks/index.ts
+++ b/src/hooks/index.ts
@@ -11,3 +11,5 @@
export * from './table';
export * from './fourStreams';
export * from './industrialPark';
+export * from './log';
+export * from './useOpenLogHooks';
diff --git a/src/hooks/log.ts b/src/hooks/log.ts
new file mode 100644
index 0000000..05e8446
--- /dev/null
+++ b/src/hooks/log.ts
@@ -0,0 +1,145 @@
+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,
+ };
+}
diff --git a/src/hooks/useOpenLogHooks.ts b/src/hooks/useOpenLogHooks.ts
new file mode 100644
index 0000000..549f915
--- /dev/null
+++ b/src/hooks/useOpenLogHooks.ts
@@ -0,0 +1,62 @@
+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,
+ };
+}
diff --git a/src/views/MaterialReview/MaterialReReviewList.vue b/src/views/MaterialReview/MaterialReReviewList.vue
index 39f1213..5ba24ef 100644
--- a/src/views/MaterialReview/MaterialReReviewList.vue
+++ b/src/views/MaterialReview/MaterialReReviewList.vue
@@ -61,6 +61,7 @@
</ProTableV2>
<ParkBountyApplyRedoDialog v-bind="dialogProps" />
</AppContainer>
+ <OperateHistoryLogDialog v-bind="logDialogProps" />
</LoadingLayout>
</template>
@@ -85,7 +86,12 @@
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({
@@ -116,6 +122,7 @@
row.outReCheckStatus !== BountyCheckStatusEnum.CheckPassed,
},
},
+ logBtn: { emits: { onClick: (role) => openLogDialog(role.id) } },
};
const { checkSubModuleItemShow, column, operationBtns } = useAccess({
@@ -243,4 +250,6 @@
}
} catch (error) {}
}
+
+const { openLogDialog, logDialogProps } = useOpenLogDialog();
</script>
diff --git a/src/views/MaterialReview/MaterialReview.vue b/src/views/MaterialReview/MaterialReview.vue
index 29530d4..7eb8ee8 100644
--- a/src/views/MaterialReview/MaterialReview.vue
+++ b/src/views/MaterialReview/MaterialReview.vue
@@ -61,6 +61,7 @@
</ProTableV2>
<ParkBountyApplyRedoDialog v-bind="dialogProps" />
</AppContainer>
+ <OperateHistoryLogDialog v-bind="logDialogProps" />
</LoadingLayout>
</template>
@@ -85,7 +86,12 @@
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({
@@ -116,6 +122,7 @@
row.outCheckStatus !== BountyCheckStatusEnum.CheckPassed,
},
},
+ logBtn: { emits: { onClick: (role) => openLogDialog(role.id) } },
};
const { checkSubModuleItemShow, column, operationBtns } = useAccess({
@@ -234,6 +241,8 @@
}
} catch (error) {}
}
+
+const { openLogDialog, logDialogProps } = useOpenLogDialog();
</script>
<style lang="scss" scoped>
--
Gitblit v1.9.1