diff --git a/src/views/bg/xispeak/components/BgXiSpeakBPMForm.vue b/src/views/bg/xispeak/components/BgXiSpeakBPMForm.vue
index 21bf17e..86ff6d6 100644
--- a/src/views/bg/xispeak/components/BgXiSpeakBPMForm.vue
+++ b/src/views/bg/xispeak/components/BgXiSpeakBPMForm.vue
@@ -58,7 +58,7 @@
-
+
@@ -213,7 +213,7 @@
-
- {{ showJiJianFields ? '监察' : '编辑' }}
+ {{ showJiJianFields && nonJiJianFieldsReadonly ? '监察' : '编辑' }}
删除
@@ -246,7 +246,7 @@
-
+
@@ -256,7 +256,6 @@
:claim="claim"
:showSelnextUser="showSelnextUser"
:beforeHandle="saveMainFormBeforeProcessHandle"
- :defaultReason="defaultHandleReason"
@success="handleProcessSuccess"
@claimSuccess="handleClaimSuccess"
/>
@@ -285,16 +284,8 @@
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';
+import { normalizeDeptNames } from '/@/composables/useDefaultApprovalReason';
+import { useSelectNameResolver } from '/@/composables/useSelectNameResolver';
const { isDisabledAuth, hasPermission, initBpmFormData } = usePermission();
const userStore = useUserStore();
@@ -329,7 +320,7 @@ import {
const showFeedbackDetail = ref(true);
const feedbackList = ref([]);
const subApproveUser = ref('');
- const subApproveUserNameText = ref('');
+ const subApproveUserNames = ref('');
const userResolveVersion = ref(0);
const isEnd = ref(0);
@@ -342,8 +333,10 @@ import {
status: '',
secretLevel: '',
responsiblePerson: '',
+ responsiblePersonNames: '',
needSdwApproval: 0,
sdwLeaderList: '',
+ sdwLeaderListNames: '',
implPlan: '',
implMeasures: '',
numberOfResolutions: undefined,
@@ -356,12 +349,19 @@ import {
completionStatus: undefined,
deadline: '',
implDept: '',
+ implDeptNames: '',
treeDepth: undefined,
sortOrder: undefined,
bpmStatus: '',
supervisionCount: undefined,
});
+ const { resolveAll, selectHandler } = useSelectNameResolver(mainForm, [
+ { field: 'responsiblePerson', type: 'user' },
+ { field: 'implDept', type: 'dept' },
+ { field: 'sdwLeaderList', type: 'user' },
+ ]);
+
const feedbackColumns = computed(() => {
const cols: any[] = [
{ title: '序号', key: 'seq', align: 'center', width: 60 },
@@ -445,59 +445,19 @@ import {
processTableName: props.formData?.processTableName,
}));
- // ==================== 默认审批意见 ====================
- const handleReasonTemplateMap: Record string> = {
- // 部门负责人审批 / 所党委审批 / 督办部门负责人审批 / 纪检负责人审批
- Task_15sm4w5: buildApproveReason,
- Task_00i7rrp: buildApproveReason,
- Task_04bazej: buildApproveReason,
- Task_0bj578x: buildApproveReason,
- Task_0mf32ge: buildApproveReason,
- Task_0zmn6ik: buildApproveReason,
- Task_133caii: buildApproveReason,
- Task_175afz2: buildApproveReason,
- Task_1ogk921: buildApproveReason,
- Task_1w4vxgc: buildApproveReason,
- Task_1wfkrvj: buildApproveReason,
- // 反馈流程节点
- Task_005iiwi: buildApproveReason,
- Task_06di2wf: 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 builder = handleReasonTemplateMap[String(processInfo.value.taskDefKey || '')];
- return builder ? builder() : '';
- });
-
// 合并 mainForm + 表单局部变量,供占位符 ${变量名} 解析
const formScope = computed(() => ({
...mainForm,
isEnd: isEnd.value,
subApproveUser: subApproveUser.value,
- subApproveUserNameText: subApproveUserNameText.value,
+ subApproveUserNames: subApproveUserNames.value,
+ responsiblePersonNames: mainForm.responsiblePersonNames,
+ implDeptNames: mainForm.implDeptNames,
+ sdwLeaderListNames: mainForm.sdwLeaderListNames,
}));
provide('extraVars', formScope);
provide('flowVars', computed(() => props.formData?.vars || {}));
- provide('formDefaultReason', defaultHandleReason);
onMounted(() => {
initFormData();
@@ -525,6 +485,14 @@ import {
},
{ immediate: true }
);
+ // 反向同步:本地切换 isEnd 时更新 formData.vars,使 conditionalDefaultOpinion 响应
+ watch(isEnd, (val) => {
+ const vars = props.formData?.vars;
+ if (vars) {
+ vars.is_end = String(val);
+ vars.isEnd = String(val);
+ }
+ });
watch(
subApproveUser,
@@ -544,6 +512,7 @@ import {
try {
const data = await defHttp.get({ url: queryByIdUrl, params: { id: dataId } });
setMainForm(data || {});
+ await resolveAll();
await loadFeedbackList();
} finally {
loading.value = false;
@@ -771,15 +740,19 @@ import {
.join(',');
}
+ function onSubApproveUserConfirm(userIds: string, realnames: string) {
+ subApproveUserNames.value = normalizeDeptNames(realnames || '');
+ }
+
async function resolveSubApproveUserName(value: any) {
const resolveVersion = ++userResolveVersion.value;
const usernames = normalizeUsernameList(value);
if (!usernames) {
- subApproveUserNameText.value = '';
+ subApproveUserNames.value = '';
return;
}
- subApproveUserNameText.value = normalizeDeptNames(usernames);
+ subApproveUserNames.value = normalizeDeptNames(usernames);
try {
const res = await getUserList({ username: usernames, isMultiTranslate: 'true', pageNo: 1, pageSize: 999 });
if (resolveVersion !== userResolveVersion.value) {
@@ -800,10 +773,10 @@ import {
.split(',')
.map((username) => userNameMap[username] || username)
.filter(Boolean);
- subApproveUserNameText.value = normalizeDeptNames(names.join(','));
+ subApproveUserNames.value = normalizeDeptNames(names.join(','));
} catch {
if (resolveVersion === userResolveVersion.value) {
- subApproveUserNameText.value = normalizeDeptNames(usernames);
+ subApproveUserNames.value = normalizeDeptNames(usernames);
}
}
}