!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,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user