!69 refactor(bpm): 抽取默认审批意见到共享composable,按层级统一管理
* refactor(bpm): 抽取默认审批意见到共享composable,按层级统一管理
This commit is contained in:
@@ -285,6 +285,16 @@
|
||||
import SUploadFile from '/@/components/semri/fileComponent/SUploadFile.vue';
|
||||
import DeptRoleUserSelectRadioGroup from '/@/components/semri/userComponent/DeptRoleUserSelectRadioGroup.vue';
|
||||
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 userStore = useUserStore();
|
||||
@@ -437,45 +447,39 @@ import { PARTY_COMMITTEE_DEPT_ID, SDW_LEADER_ROLE_ID } from '/@/constant/supervi
|
||||
|
||||
// ==================== 默认审批意见 ====================
|
||||
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_00i7rrp: buildApproveReason,
|
||||
Task_00v3pcv: buildDeptHandlerFeedbackReason,
|
||||
Task_04bazej: buildApproveReason,
|
||||
Task_08zb04x: buildDeptHandlerFeedbackReason,
|
||||
Task_0bj578x: buildApproveReason,
|
||||
Task_0jrgrzs: buildDeptHandlerFeedbackReason,
|
||||
Task_0mf32ge: buildApproveReason,
|
||||
Task_0zmn6ik: buildApproveReason,
|
||||
Task_133caii: buildApproveReason,
|
||||
Task_15sm4w5: buildApproveReason,
|
||||
Task_175afz2: buildApproveReason,
|
||||
Task_1ogk921: buildApproveReason,
|
||||
Task_1v9ce78: buildDeptLeaderAssignReason,
|
||||
Task_1w4vxgc: buildApproveReason,
|
||||
Task_1wfkrvj: buildApproveReason,
|
||||
// 反馈流程节点
|
||||
Task_005iiwi: buildApproveReason,
|
||||
Task_06di2wf: buildApproveReason,
|
||||
Task_0bahwr8: buildJiJianCheckReason,
|
||||
Task_0sialna: buildDeptLeaderDirectFeedbackReason,
|
||||
Task_12vdqzv: buildDeptHandlerFeedbackReason,
|
||||
Task_13olnz1: buildSuperviseCheckReason,
|
||||
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(() => {
|
||||
@@ -483,35 +487,6 @@ import { PARTY_COMMITTEE_DEPT_ID, SDW_LEADER_ROLE_ID } from '/@/constant/supervi
|
||||
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(() => {
|
||||
initFormData();
|
||||
});
|
||||
@@ -784,17 +759,6 @@ import { PARTY_COMMITTEE_DEPT_ID, SDW_LEADER_ROLE_ID } from '/@/constant/supervi
|
||||
.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) {
|
||||
const resolveVersion = ++userResolveVersion.value;
|
||||
const usernames = normalizeUsernameList(value);
|
||||
|
||||
Reference in New Issue
Block a user