!69 refactor(bpm): 抽取默认审批意见到共享composable,按层级统一管理
* refactor(bpm): 抽取默认审批意见到共享composable,按层级统一管理
This commit is contained in:
@@ -0,0 +1,139 @@
|
|||||||
|
/**
|
||||||
|
* 默认审批意见 — 统一管理各 BPM 表单的审批意见模板
|
||||||
|
*
|
||||||
|
* 层级:
|
||||||
|
* 通用 → 跨领域复用
|
||||||
|
* 巡视整改 → DqInspectTask 特有
|
||||||
|
* 习讲话/党委事项 → BgXiSpeak / BgPartymatter 特有
|
||||||
|
*/
|
||||||
|
|
||||||
|
// ========== 工具函数 ==========
|
||||||
|
|
||||||
|
export function splitDeptNames(value: any): string[] {
|
||||||
|
return String(value || '')
|
||||||
|
.split(/[,,;;、]/)
|
||||||
|
.map((item) => item.trim())
|
||||||
|
.filter(Boolean);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function normalizeDeptNames(value: any): string {
|
||||||
|
return splitDeptNames(value).join('、');
|
||||||
|
}
|
||||||
|
|
||||||
|
// ========== 通用审批意见 ==========
|
||||||
|
|
||||||
|
export function buildApproveReason() {
|
||||||
|
return '同意。';
|
||||||
|
}
|
||||||
|
|
||||||
|
export function buildDeptHandlerFeedbackReason() {
|
||||||
|
return '已完成反馈,请领导审批。';
|
||||||
|
}
|
||||||
|
|
||||||
|
export function buildDeptLeaderAssignReason(userNameText?: string) {
|
||||||
|
return userNameText ? `请${userNameText}办理。` : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
export function buildDeptLeaderDirectFeedbackReason() {
|
||||||
|
return '已完成反馈。';
|
||||||
|
}
|
||||||
|
|
||||||
|
export function buildSuperviseConfirmAllReason() {
|
||||||
|
return '已确认全部反馈事项。';
|
||||||
|
}
|
||||||
|
|
||||||
|
export function buildSuperviseCheckReason() {
|
||||||
|
return '已核查。';
|
||||||
|
}
|
||||||
|
|
||||||
|
export function buildJiJianCheckReason() {
|
||||||
|
return '已监察。';
|
||||||
|
}
|
||||||
|
|
||||||
|
// ========== 巡视整改领域 ==========
|
||||||
|
|
||||||
|
export function buildCollectDoneReason() {
|
||||||
|
return '已收集完成,同意。';
|
||||||
|
}
|
||||||
|
|
||||||
|
export function buildSecretaryApprovedReason() {
|
||||||
|
return '党委书记已审批。';
|
||||||
|
}
|
||||||
|
|
||||||
|
export function buildDisciplineSecretaryApprovedReason() {
|
||||||
|
return '纪委书记已审批。';
|
||||||
|
}
|
||||||
|
|
||||||
|
export function buildDeptLeaderApprovedReason() {
|
||||||
|
return '责任部门负责人已审批。';
|
||||||
|
}
|
||||||
|
|
||||||
|
export function buildChargeDeptApprovedReason() {
|
||||||
|
return '责任经办部门已审批。';
|
||||||
|
}
|
||||||
|
|
||||||
|
export function buildChargeLeaderApprovedReason() {
|
||||||
|
return '分管所领导已审批。';
|
||||||
|
}
|
||||||
|
|
||||||
|
export function buildAlreadyApprovedReason() {
|
||||||
|
return '已审批。';
|
||||||
|
}
|
||||||
|
|
||||||
|
export function buildAlreadyReviewedReason() {
|
||||||
|
return '已审查。';
|
||||||
|
}
|
||||||
|
|
||||||
|
export function buildPleaseDeptHandleReason() {
|
||||||
|
return '请相关部门办理。';
|
||||||
|
}
|
||||||
|
|
||||||
|
export function buildLaunchSupervisionReason() {
|
||||||
|
return '已发起督办流程。';
|
||||||
|
}
|
||||||
|
|
||||||
|
export function buildPartyMassesConfirmedReason() {
|
||||||
|
return '党群经办人已确认。';
|
||||||
|
}
|
||||||
|
|
||||||
|
export function buildAssignProcessReason() {
|
||||||
|
return '分配人办理流程。';
|
||||||
|
}
|
||||||
|
|
||||||
|
export function buildJiJianCheckedReason() {
|
||||||
|
return '纪检经办人已监察。';
|
||||||
|
}
|
||||||
|
|
||||||
|
// ========== 习讲话/党委事项领域 ==========
|
||||||
|
|
||||||
|
// 目前全部复用通用审批意见,如有领域特有意见在此追加
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 返回常用 builder 集合,组件按需解构使用
|
||||||
|
*/
|
||||||
|
export function useDefaultApprovalReason() {
|
||||||
|
return {
|
||||||
|
splitDeptNames,
|
||||||
|
normalizeDeptNames,
|
||||||
|
buildApproveReason,
|
||||||
|
buildDeptHandlerFeedbackReason,
|
||||||
|
buildDeptLeaderAssignReason,
|
||||||
|
buildDeptLeaderDirectFeedbackReason,
|
||||||
|
buildSuperviseConfirmAllReason,
|
||||||
|
buildSuperviseCheckReason,
|
||||||
|
buildJiJianCheckReason,
|
||||||
|
buildCollectDoneReason,
|
||||||
|
buildSecretaryApprovedReason,
|
||||||
|
buildDisciplineSecretaryApprovedReason,
|
||||||
|
buildDeptLeaderApprovedReason,
|
||||||
|
buildChargeDeptApprovedReason,
|
||||||
|
buildChargeLeaderApprovedReason,
|
||||||
|
buildAlreadyApprovedReason,
|
||||||
|
buildAlreadyReviewedReason,
|
||||||
|
buildPleaseDeptHandleReason,
|
||||||
|
buildLaunchSupervisionReason,
|
||||||
|
buildPartyMassesConfirmedReason,
|
||||||
|
buildAssignProcessReason,
|
||||||
|
buildJiJianCheckedReason,
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -285,6 +285,16 @@
|
|||||||
import SUploadFile from '/@/components/semri/fileComponent/SUploadFile.vue';
|
import SUploadFile from '/@/components/semri/fileComponent/SUploadFile.vue';
|
||||||
import DeptRoleUserSelectRadioGroup from '/@/components/semri/userComponent/DeptRoleUserSelectRadioGroup.vue';
|
import DeptRoleUserSelectRadioGroup from '/@/components/semri/userComponent/DeptRoleUserSelectRadioGroup.vue';
|
||||||
import { PARTY_COMMITTEE_DEPT_ID, SDW_LEADER_ROLE_ID } from '/@/constant/supervision';
|
import { PARTY_COMMITTEE_DEPT_ID, SDW_LEADER_ROLE_ID } from '/@/constant/supervision';
|
||||||
|
import {
|
||||||
|
buildApproveReason,
|
||||||
|
buildDeptHandlerFeedbackReason,
|
||||||
|
buildDeptLeaderAssignReason,
|
||||||
|
buildDeptLeaderDirectFeedbackReason,
|
||||||
|
buildSuperviseConfirmAllReason,
|
||||||
|
buildSuperviseCheckReason,
|
||||||
|
buildJiJianCheckReason,
|
||||||
|
normalizeDeptNames,
|
||||||
|
} from '/@/composables/useDefaultApprovalReason';
|
||||||
|
|
||||||
const { isDisabledAuth, hasPermission, initBpmFormData } = usePermission();
|
const { isDisabledAuth, hasPermission, initBpmFormData } = usePermission();
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
@@ -437,45 +447,39 @@ import { PARTY_COMMITTEE_DEPT_ID, SDW_LEADER_ROLE_ID } from '/@/constant/supervi
|
|||||||
|
|
||||||
// ==================== 默认审批意见 ====================
|
// ==================== 默认审批意见 ====================
|
||||||
const handleReasonTemplateMap: Record<string, () => string> = {
|
const handleReasonTemplateMap: Record<string, () => string> = {
|
||||||
// TODO: 填写各节点的 taskDefKey
|
|
||||||
// 部门负责人审批 / 所党委审批 / 督办部门负责人审批 / 纪检负责人审批
|
// 部门负责人审批 / 所党委审批 / 督办部门负责人审批 / 纪检负责人审批
|
||||||
// 'Task_': buildApproveReason,
|
|
||||||
// 部门经办人反馈完成情况 / 收集流程部门经办人填写 / 反馈流程部门经办人填写反馈
|
|
||||||
// 'Task_': buildDeptHandlerFeedbackReason,
|
|
||||||
// 部门负责人接受任务并分配
|
|
||||||
// 'Task_': buildDeptLeaderAssignReason,
|
|
||||||
// 部门负责人直接反馈
|
|
||||||
// 'Task_': buildDeptLeaderDirectFeedbackReason,
|
|
||||||
// 督办部门经办人确认全部反馈事项
|
|
||||||
// 'Task_': buildSuperviseConfirmAllReason,
|
|
||||||
// 督办经办人核查 / 反馈流程督办经办人核查
|
|
||||||
// 'Task_': buildSuperviseCheckReason,
|
|
||||||
// 纪检经办人监察
|
|
||||||
// 'Task_': buildJiJianCheckReason,
|
|
||||||
Task_15sm4w5: buildApproveReason,
|
Task_15sm4w5: buildApproveReason,
|
||||||
Task_00i7rrp: buildApproveReason,
|
Task_00i7rrp: buildApproveReason,
|
||||||
Task_00v3pcv: buildDeptHandlerFeedbackReason,
|
|
||||||
Task_04bazej: buildApproveReason,
|
Task_04bazej: buildApproveReason,
|
||||||
Task_08zb04x: buildDeptHandlerFeedbackReason,
|
|
||||||
Task_0bj578x: buildApproveReason,
|
Task_0bj578x: buildApproveReason,
|
||||||
Task_0jrgrzs: buildDeptHandlerFeedbackReason,
|
|
||||||
Task_0mf32ge: buildApproveReason,
|
Task_0mf32ge: buildApproveReason,
|
||||||
Task_0zmn6ik: buildApproveReason,
|
Task_0zmn6ik: buildApproveReason,
|
||||||
Task_133caii: buildApproveReason,
|
Task_133caii: buildApproveReason,
|
||||||
Task_15sm4w5: buildApproveReason,
|
|
||||||
Task_175afz2: buildApproveReason,
|
Task_175afz2: buildApproveReason,
|
||||||
Task_1ogk921: buildApproveReason,
|
Task_1ogk921: buildApproveReason,
|
||||||
Task_1v9ce78: buildDeptLeaderAssignReason,
|
|
||||||
Task_1w4vxgc: buildApproveReason,
|
Task_1w4vxgc: buildApproveReason,
|
||||||
Task_1wfkrvj: buildApproveReason,
|
Task_1wfkrvj: buildApproveReason,
|
||||||
// 反馈流程节点
|
// 反馈流程节点
|
||||||
Task_005iiwi: buildApproveReason,
|
Task_005iiwi: buildApproveReason,
|
||||||
Task_06di2wf: buildApproveReason,
|
Task_06di2wf: buildApproveReason,
|
||||||
Task_0bahwr8: buildJiJianCheckReason,
|
|
||||||
Task_0sialna: buildDeptLeaderDirectFeedbackReason,
|
|
||||||
Task_12vdqzv: buildDeptHandlerFeedbackReason,
|
|
||||||
Task_13olnz1: buildSuperviseCheckReason,
|
|
||||||
Task_1l650tz: buildApproveReason,
|
Task_1l650tz: buildApproveReason,
|
||||||
|
// 部门经办人反馈完成情况 / 收集流程部门经办人填写 / 反馈流程部门经办人填写反馈
|
||||||
|
Task_00v3pcv: buildDeptHandlerFeedbackReason,
|
||||||
|
Task_08zb04x: buildDeptHandlerFeedbackReason,
|
||||||
|
Task_0jrgrzs: buildDeptHandlerFeedbackReason,
|
||||||
|
Task_12vdqzv: buildDeptHandlerFeedbackReason,
|
||||||
|
// 部门负责人接受任务并分配
|
||||||
|
Task_1v9ce78: () => buildDeptLeaderAssignReason(
|
||||||
|
normalizeDeptNames(subApproveUserNameText.value || subApproveUser.value),
|
||||||
|
),
|
||||||
|
// 部门负责人直接反馈
|
||||||
|
Task_0sialna: buildDeptLeaderDirectFeedbackReason,
|
||||||
|
// 督办部门经办人确认全部反馈事项
|
||||||
|
// (暂无映射,预留 buildSuperviseConfirmAllReason)
|
||||||
|
// 督办经办人核查 / 反馈流程督办经办人核查
|
||||||
|
Task_13olnz1: buildSuperviseCheckReason,
|
||||||
|
// 纪检经办人监察
|
||||||
|
Task_0bahwr8: buildJiJianCheckReason,
|
||||||
};
|
};
|
||||||
|
|
||||||
const defaultHandleReason = computed(() => {
|
const defaultHandleReason = computed(() => {
|
||||||
@@ -483,35 +487,6 @@ import { PARTY_COMMITTEE_DEPT_ID, SDW_LEADER_ROLE_ID } from '/@/constant/supervi
|
|||||||
return builder ? builder() : '';
|
return builder ? builder() : '';
|
||||||
});
|
});
|
||||||
|
|
||||||
function buildApproveReason() {
|
|
||||||
return '同意。';
|
|
||||||
}
|
|
||||||
|
|
||||||
function buildDeptHandlerFeedbackReason() {
|
|
||||||
return '已完成反馈,请领导审批。';
|
|
||||||
}
|
|
||||||
|
|
||||||
function buildDeptLeaderAssignReason() {
|
|
||||||
const userNameText = normalizeDeptNames(subApproveUserNameText.value || subApproveUser.value);
|
|
||||||
return userNameText ? `请${userNameText}办理。` : '';
|
|
||||||
}
|
|
||||||
|
|
||||||
function buildDeptLeaderDirectFeedbackReason() {
|
|
||||||
return '已完成反馈。';
|
|
||||||
}
|
|
||||||
|
|
||||||
function buildSuperviseConfirmAllReason() {
|
|
||||||
return '已确认全部反馈事项。';
|
|
||||||
}
|
|
||||||
|
|
||||||
function buildSuperviseCheckReason() {
|
|
||||||
return '已核查。';
|
|
||||||
}
|
|
||||||
|
|
||||||
function buildJiJianCheckReason() {
|
|
||||||
return '已监察。';
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
initFormData();
|
initFormData();
|
||||||
});
|
});
|
||||||
@@ -784,17 +759,6 @@ import { PARTY_COMMITTEE_DEPT_ID, SDW_LEADER_ROLE_ID } from '/@/constant/supervi
|
|||||||
.join(',');
|
.join(',');
|
||||||
}
|
}
|
||||||
|
|
||||||
function normalizeDeptNames(value: any) {
|
|
||||||
return splitDeptNames(value).join('、');
|
|
||||||
}
|
|
||||||
|
|
||||||
function splitDeptNames(value: any) {
|
|
||||||
return String(value || '')
|
|
||||||
.split(/[,,;;、]/)
|
|
||||||
.map((item) => item.trim())
|
|
||||||
.filter(Boolean);
|
|
||||||
}
|
|
||||||
|
|
||||||
async function resolveSubApproveUserName(value: any) {
|
async function resolveSubApproveUserName(value: any) {
|
||||||
const resolveVersion = ++userResolveVersion.value;
|
const resolveVersion = ++userResolveVersion.value;
|
||||||
const usernames = normalizeUsernameList(value);
|
const usernames = normalizeUsernameList(value);
|
||||||
|
|||||||
@@ -245,6 +245,23 @@ import SzDeptUserModal from '/@/components/semri/deptUserComponent/SzDeptUserMod
|
|||||||
import { list as progressList, deleteOne as progressDelete } from '../../inspectProgress/DqInspectProgress.api';
|
import { list as progressList, deleteOne as progressDelete } from '../../inspectProgress/DqInspectProgress.api';
|
||||||
import { usePermission } from '/@/hooks/web/usePermission';
|
import { usePermission } from '/@/hooks/web/usePermission';
|
||||||
import { PARTY_COMMITTEE_DEPT_ID, SDW_LEADER_ROLE_ID } from '/@/constant/supervision';
|
import { PARTY_COMMITTEE_DEPT_ID, SDW_LEADER_ROLE_ID } from '/@/constant/supervision';
|
||||||
|
import {
|
||||||
|
buildApproveReason,
|
||||||
|
buildDeptHandlerFeedbackReason,
|
||||||
|
buildCollectDoneReason,
|
||||||
|
buildSecretaryApprovedReason,
|
||||||
|
buildDisciplineSecretaryApprovedReason,
|
||||||
|
buildDeptLeaderApprovedReason,
|
||||||
|
buildChargeDeptApprovedReason,
|
||||||
|
buildChargeLeaderApprovedReason,
|
||||||
|
buildAlreadyApprovedReason,
|
||||||
|
buildAlreadyReviewedReason,
|
||||||
|
buildPleaseDeptHandleReason,
|
||||||
|
buildLaunchSupervisionReason,
|
||||||
|
buildPartyMassesConfirmedReason,
|
||||||
|
buildAssignProcessReason,
|
||||||
|
buildJiJianCheckedReason,
|
||||||
|
} from '/@/composables/useDefaultApprovalReason';
|
||||||
import TaskHandleInnerContent from '/@/views/super/bpm/process/personalOffice/myHandleTask/content/TaskHandleInnerContent.vue';
|
import TaskHandleInnerContent from '/@/views/super/bpm/process/personalOffice/myHandleTask/content/TaskHandleInnerContent.vue';
|
||||||
import DqInspectTaskBPMFeedbackModal from './DqInspectTaskBPMFeedbackModal.vue';
|
import DqInspectTaskBPMFeedbackModal from './DqInspectTaskBPMFeedbackModal.vue';
|
||||||
import SUploadFile from '/@/components/semri/fileComponent/SUploadFile.vue';
|
import SUploadFile from '/@/components/semri/fileComponent/SUploadFile.vue';
|
||||||
@@ -289,24 +306,24 @@ import { PARTY_COMMITTEE_DEPT_ID, SDW_LEADER_ROLE_ID } from '/@/constant/supervi
|
|||||||
const defaultCcUsers = ref<Array<{ username: string; realname: string }>>([]);
|
const defaultCcUsers = ref<Array<{ username: string; realname: string }>>([]);
|
||||||
|
|
||||||
const handleReasonTemplateMap: Record<string, () => string> = {
|
const handleReasonTemplateMap: Record<string, () => string> = {
|
||||||
Task_0g8sc6n: () => '同意。',
|
Task_0g8sc6n: buildApproveReason,
|
||||||
Task_0ixi1rs: () => '已收集完成,同意。',
|
Task_0ixi1rs: buildCollectDoneReason,
|
||||||
Task_0l5ik22: () => '同意。',
|
Task_0l5ik22: buildApproveReason,
|
||||||
Task_0mbr735: () => '已完成反馈,请领导审批。',
|
Task_0mbr735: buildDeptHandlerFeedbackReason,
|
||||||
Task_0mxtg05: () => '已审批。',
|
Task_0mxtg05: buildAlreadyApprovedReason,
|
||||||
Task_14226iy: () => '已审查。',
|
Task_14226iy: buildAlreadyReviewedReason,
|
||||||
Task_1c64uvl: () => '请相关部门办理。',
|
Task_1c64uvl: buildPleaseDeptHandleReason,
|
||||||
Task_1i99s6v: () => '同意。',
|
Task_1i99s6v: buildApproveReason,
|
||||||
Task_1nj4k7b: () => '已发起督办流程。',
|
Task_1nj4k7b: buildLaunchSupervisionReason,
|
||||||
|
|
||||||
Task_09qxoto: () => '纪委书记已审批。',
|
Task_09qxoto: buildDisciplineSecretaryApprovedReason,
|
||||||
Task_0cfjknn: () => '党委书记已审批。',
|
Task_0cfjknn: buildSecretaryApprovedReason,
|
||||||
Task_0r2vutj: () => '责任经办部门已审批。',
|
Task_0r2vutj: buildChargeDeptApprovedReason,
|
||||||
Task_1azpeqj: () => '纪检经办人已监察。',
|
Task_1azpeqj: buildJiJianCheckedReason,
|
||||||
Task_1cvft2f: () => '党群经办人已确认。',
|
Task_1cvft2f: buildPartyMassesConfirmedReason,
|
||||||
Task_1k1zt37: () => '分管所领导已审批。',
|
Task_1k1zt37: buildChargeLeaderApprovedReason,
|
||||||
Task_1k36lmv: () => '责任部门负责人已审批。',
|
Task_1k36lmv: buildDeptLeaderApprovedReason,
|
||||||
Task_1k6n75g: () => '分配人办理流程。',
|
Task_1k6n75g: buildAssignProcessReason,
|
||||||
};
|
};
|
||||||
|
|
||||||
const defaultHandleReason = computed(() => {
|
const defaultHandleReason = computed(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user