feat(bpm): 默认抄送改为extendUrlParams配置驱动,优化fetchDefaultCcUsers并发请求
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,14 @@
|
||||
<template>
|
||||
<a-spin :spinning="loading">
|
||||
<div class="bg-partymatter-bpm-form">
|
||||
<a-form class="main-form" :class="{ 'main-form-readonly': mainDisabled }" labelAlign="left" :labelCol="labelCol" :wrapperCol="wrapperCol" :model="mainForm">
|
||||
<a-form
|
||||
class="main-form"
|
||||
:class="{ 'main-form-readonly': mainDisabled }"
|
||||
labelAlign="left"
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
:model="mainForm"
|
||||
>
|
||||
<div class="base-info-header section-toolbar">
|
||||
<div class="section-title">基础信息</div>
|
||||
<a-space class="section-actions">
|
||||
@@ -9,7 +16,12 @@
|
||||
<Icon icon="ant-design:save-outlined" />
|
||||
保存
|
||||
</a-button>
|
||||
<a-button class="section-action-button" :type="showBaseInfoDetail ? 'default' : 'link'" size="small" @click="showBaseInfoDetail = !showBaseInfoDetail">
|
||||
<a-button
|
||||
class="section-action-button"
|
||||
:type="showBaseInfoDetail ? 'default' : 'link'"
|
||||
size="small"
|
||||
@click="showBaseInfoDetail = !showBaseInfoDetail"
|
||||
>
|
||||
<Icon :icon="showBaseInfoDetail ? 'ant-design:up-outlined' : 'ant-design:down-outlined'" />
|
||||
{{ showBaseInfoDetail ? '收起基础信息' : '展开全部信息' }}
|
||||
</a-button>
|
||||
@@ -30,7 +42,13 @@
|
||||
<a-divider />
|
||||
<a-col :span="12">
|
||||
<a-form-item label="年份" name="year">
|
||||
<j-dict-select-tag v-model:value="mainForm.year" :disabled="mainDisabled" dictCode="super_year" placeholder="请选择年份" allow-clear />
|
||||
<j-dict-select-tag
|
||||
v-model:value="mainForm.year"
|
||||
:disabled="mainDisabled"
|
||||
dictCode="super_year"
|
||||
placeholder="请选择年份"
|
||||
allow-clear
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
@@ -50,7 +68,13 @@
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="会议时间" name="matterTime">
|
||||
<a-date-picker v-model:value="mainForm.matterTime" value-format="YYYY-MM-DD" :disabled="mainDisabled" style="width: 100%" allow-clear />
|
||||
<a-date-picker
|
||||
v-model:value="mainForm.matterTime"
|
||||
value-format="YYYY-MM-DD"
|
||||
:disabled="mainDisabled"
|
||||
style="width: 100%"
|
||||
allow-clear
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
@@ -113,7 +137,13 @@
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="是否急件" name="urgencyLevel">
|
||||
<j-dict-select-tag v-model:value="mainForm.urgencyLevel" :disabled="mainDisabled" dictCode="yn" placeholder="请选择是否急件" allow-clear />
|
||||
<j-dict-select-tag
|
||||
v-model:value="mainForm.urgencyLevel"
|
||||
:disabled="mainDisabled"
|
||||
dictCode="yn"
|
||||
placeholder="请选择是否急件"
|
||||
allow-clear
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
@@ -207,17 +237,14 @@
|
||||
</a-col>
|
||||
<a-col v-if="showSubApproveUserSelector" :span="12">
|
||||
<a-form-item label="部门经办人" :labelCol="wideLabelCol" :wrapperCol="wideWrapperCol">
|
||||
<sz-dept-user-modal
|
||||
v-model:value="subApproveUser"
|
||||
:disabled="savingSubApproveUser"
|
||||
/>
|
||||
<sz-dept-user-modal v-model:value="subApproveUser" :disabled="savingSubApproveUser" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!-- <a-col :span="24">-->
|
||||
<!-- <a-form-item :wrapperCol="wideActionWrapperCol">-->
|
||||
<!-- <a-button type="primary" :loading="savingSubApproveUser" @click="saveSubApproveUserVariable()">保存</a-button>-->
|
||||
<!-- </a-form-item>-->
|
||||
<!-- </a-col>-->
|
||||
<!-- <a-col :span="24">-->
|
||||
<!-- <a-form-item :wrapperCol="wideActionWrapperCol">-->
|
||||
<!-- <a-button type="primary" :loading="savingSubApproveUser" @click="saveSubApproveUserVariable()">保存</a-button>-->
|
||||
<!-- </a-form-item>-->
|
||||
<!-- </a-col>-->
|
||||
</a-row>
|
||||
</a-form>
|
||||
<a-form v-if="showFinishSelector" class="process-variable-form" labelAlign="left" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
@@ -256,7 +283,7 @@
|
||||
import { bgPartymatterFeedbackDelete, bgPartymatterFeedbackList, saveBpmForm, setBpmVariableLocal } from '../BgPartymatter.api';
|
||||
import { usePermission } from '/@/hooks/web/usePermission';
|
||||
import TaskHandleInnerContent from '/@/views/super/bpm/process/personalOffice/myHandleTask/content/TaskHandleInnerContent.vue';
|
||||
import JDictSelectTag from "../../../../components/Form/src/jeecg/components/JDictSelectTag.vue";
|
||||
import JDictSelectTag from '../../../../components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||
import BgPartymatterBPMFeedbackModal from './BgPartymatterBPMFeedbackModal.vue';
|
||||
import SUploadFile from '/@/components/semri/fileComponent/SUploadFile.vue';
|
||||
import SzDeptUserModal from '/@/components/semri/deptUserComponent/SzDeptUserModal.vue';
|
||||
@@ -266,8 +293,10 @@
|
||||
PARTY_COMMITTEE_DEPT_ID as CHARGE_LEADER_DEPT_ID,
|
||||
CHARGE_LEADER_ROLE_ID,
|
||||
SDW_LEADER_ROLE_ID,
|
||||
SUOBAN_DEPT_ID,
|
||||
MEASURE_RES_LEADER_ROLE_ID,
|
||||
} from '/@/constant/supervision';
|
||||
const { isDisabledAuth, hasPermission, initBpmFormData} = usePermission();
|
||||
const { isDisabledAuth, hasPermission, initBpmFormData } = usePermission();
|
||||
|
||||
const props = defineProps({
|
||||
formDisabled: { type: Boolean, default: false },
|
||||
@@ -277,8 +306,8 @@
|
||||
});
|
||||
|
||||
initBpmFormData(props.formData);
|
||||
console.log("@props.formData", props.formData);
|
||||
console.log("@props", props);
|
||||
console.log('@props.formData', props.formData);
|
||||
console.log('@props', props);
|
||||
|
||||
const emit = defineEmits(['ok', 'success', 'claimSuccess']);
|
||||
const { createMessage } = useMessage();
|
||||
@@ -361,8 +390,20 @@
|
||||
customRender: ({ text }) => (!text ? '' : String(text).slice(0, 10)),
|
||||
},
|
||||
{ title: '实际执行情况', dataIndex: 'actualExect', align: 'center', width: 280 },
|
||||
{ title: '实际完成日期', dataIndex: 'actualTime', align: 'center', width: 180, customRender: ({ text }) => (!text ? '' : String(text).slice(0, 10)) },
|
||||
{ title: '完成状态', dataIndex: 'bpmStatus', align: 'center', width: 120, customRender: ({ record }) => record?.bpmStatus_dictText || record?.bpmStatus },
|
||||
{
|
||||
title: '实际完成日期',
|
||||
dataIndex: 'actualTime',
|
||||
align: 'center',
|
||||
width: 180,
|
||||
customRender: ({ text }) => (!text ? '' : String(text).slice(0, 10)),
|
||||
},
|
||||
{
|
||||
title: '完成状态',
|
||||
dataIndex: 'bpmStatus',
|
||||
align: 'center',
|
||||
width: 120,
|
||||
customRender: ({ record }) => record?.bpmStatus_dictText || record?.bpmStatus,
|
||||
},
|
||||
{ title: '附件', dataIndex: 'id', key: 'attachments', align: 'left', width: 340 },
|
||||
];
|
||||
const feedbackActionColumn = { title: '操作', dataIndex: 'action', key: 'action', align: 'center', width: 120, fixed: 'right' };
|
||||
@@ -418,10 +459,7 @@
|
||||
initFormData();
|
||||
});
|
||||
|
||||
watch(
|
||||
[() => props.formData?.dataId, () => processInfo.value.processInstanceId],
|
||||
() => initFormData()
|
||||
);
|
||||
watch([() => props.formData?.dataId, () => processInfo.value.processInstanceId], () => initFormData());
|
||||
|
||||
watch(
|
||||
() => props.formData?.vars?.isEnd,
|
||||
@@ -455,29 +493,32 @@
|
||||
}
|
||||
);
|
||||
|
||||
const showDefaultCc = computed(() => String(props.formData?.extendUrlParams?.defaultCc ?? '') === '1');
|
||||
|
||||
async function fetchDefaultCcUsers() {
|
||||
try {
|
||||
const res = await defHttp.get({
|
||||
url: '/sys/user/queryUserRoleComponentData',
|
||||
params: {
|
||||
departId: PARTY_COMMITTEE_DEPT_ID,
|
||||
roleId: SDW_LEADER_ROLE_ID,
|
||||
searchSecurityLevel: 5,
|
||||
pageNo: 1,
|
||||
pageSize: 999,
|
||||
},
|
||||
});
|
||||
const records = res?.records || res?.result?.records || [];
|
||||
defaultCcUsers.value = records;
|
||||
const [res1, res2] = await Promise.all([
|
||||
defHttp.get({
|
||||
url: '/sys/user/queryUserRoleComponentData',
|
||||
params: { departId: PARTY_COMMITTEE_DEPT_ID, roleId: SDW_LEADER_ROLE_ID, searchSecurityLevel: 5, pageNo: 1, pageSize: 999 },
|
||||
}),
|
||||
defHttp.get({
|
||||
url: '/sys/user/queryUserRoleComponentData',
|
||||
params: { departId: SUOBAN_DEPT_ID, roleId: MEASURE_RES_LEADER_ROLE_ID, searchSecurityLevel: 5, pageNo: 1, pageSize: 999 },
|
||||
}),
|
||||
]);
|
||||
const records1 = res1?.records || res1?.result?.records || [];
|
||||
const records2 = res2?.records || res2?.result?.records || [];
|
||||
defaultCcUsers.value = [...records1, ...records2];
|
||||
} catch {
|
||||
defaultCcUsers.value = [];
|
||||
}
|
||||
}
|
||||
|
||||
watch(
|
||||
() => processInfo.value.taskDefKey,
|
||||
(key) => {
|
||||
if (key === 'Task_137y5vq') {
|
||||
() => showDefaultCc.value,
|
||||
() => {
|
||||
if (showDefaultCc.value) {
|
||||
fetchDefaultCcUsers();
|
||||
} else {
|
||||
defaultCcUsers.value = [];
|
||||
|
||||
@@ -293,6 +293,8 @@
|
||||
PARTY_COMMITTEE_DEPT_ID as CHARGE_LEADER_DEPT_ID,
|
||||
CHARGE_LEADER_ROLE_ID,
|
||||
SDW_LEADER_ROLE_ID,
|
||||
SUOBAN_DEPT_ID,
|
||||
MEASURE_RES_LEADER_ROLE_ID,
|
||||
} from '/@/constant/supervision';
|
||||
|
||||
const { initBpmFormData } = usePermission();
|
||||
@@ -446,29 +448,32 @@
|
||||
|
||||
watch([() => props.formData?.dataId, () => processInfo.value.processInstanceId], () => initFormData());
|
||||
|
||||
const showDefaultCc = computed(() => String(props.formData?.extendUrlParams?.defaultCc ?? '') === '1');
|
||||
|
||||
async function fetchDefaultCcUsers() {
|
||||
try {
|
||||
const res = await defHttp.get({
|
||||
url: '/sys/user/queryUserRoleComponentData',
|
||||
params: {
|
||||
departId: PARTY_COMMITTEE_DEPT_ID,
|
||||
roleId: SDW_LEADER_ROLE_ID,
|
||||
searchSecurityLevel: 5,
|
||||
pageNo: 1,
|
||||
pageSize: 999,
|
||||
},
|
||||
});
|
||||
const records = res?.records || res?.result?.records || [];
|
||||
defaultCcUsers.value = records;
|
||||
const [res1, res2] = await Promise.all([
|
||||
defHttp.get({
|
||||
url: '/sys/user/queryUserRoleComponentData',
|
||||
params: { departId: PARTY_COMMITTEE_DEPT_ID, roleId: SDW_LEADER_ROLE_ID, searchSecurityLevel: 5, pageNo: 1, pageSize: 999 },
|
||||
}),
|
||||
defHttp.get({
|
||||
url: '/sys/user/queryUserRoleComponentData',
|
||||
params: { departId: SUOBAN_DEPT_ID, roleId: MEASURE_RES_LEADER_ROLE_ID, searchSecurityLevel: 5, pageNo: 1, pageSize: 999 },
|
||||
}),
|
||||
]);
|
||||
const records1 = res1?.records || res1?.result?.records || [];
|
||||
const records2 = res2?.records || res2?.result?.records || [];
|
||||
defaultCcUsers.value = [...records1, ...records2];
|
||||
} catch {
|
||||
defaultCcUsers.value = [];
|
||||
}
|
||||
}
|
||||
|
||||
watch(
|
||||
() => processInfo.value.taskDefKey,
|
||||
(key) => {
|
||||
if (key === 'Task_137y5vq') {
|
||||
() => showDefaultCc.value,
|
||||
() => {
|
||||
if (showDefaultCc.value) {
|
||||
fetchDefaultCcUsers();
|
||||
} else {
|
||||
defaultCcUsers.value = [];
|
||||
|
||||
@@ -243,8 +243,8 @@ import SzDeptUserModal from '/@/components/semri/deptUserComponent/SzDeptUserMod
|
||||
import { saveBpmForm, setProcessVariable, specificProblemOptions } from '../DqInspectTask.api';
|
||||
import { list as progressList, deleteOne as progressDelete } from '../../inspectProgress/DqInspectProgress.api';
|
||||
import { usePermission } from '/@/hooks/web/usePermission';
|
||||
import { PARTY_COMMITTEE_DEPT_ID, SDW_LEADER_ROLE_ID } from '/@/constant/supervision';
|
||||
import { useSelectNameResolver } from '/@/composables/useSelectNameResolver';
|
||||
import { PARTY_COMMITTEE_DEPT_ID, SDW_LEADER_ROLE_ID } from '/@/constant/supervision';
|
||||
import { useSelectNameResolver } from '/@/composables/useSelectNameResolver';
|
||||
import TaskHandleInnerContent from '/@/views/super/bpm/process/personalOffice/myHandleTask/content/TaskHandleInnerContent.vue';
|
||||
import DqInspectTaskBPMFeedbackModal from './DqInspectTaskBPMFeedbackModal.vue';
|
||||
import SUploadFile from '/@/components/semri/fileComponent/SUploadFile.vue';
|
||||
@@ -453,17 +453,13 @@ import { PARTY_COMMITTEE_DEPT_ID, SDW_LEADER_ROLE_ID } from '/@/constant/supervi
|
||||
}
|
||||
});
|
||||
|
||||
const showDefaultCc = computed(() => String(props.formData?.extendUrlParams?.defaultCc ?? '') === '1');
|
||||
|
||||
async function fetchDefaultCcUsers() {
|
||||
try {
|
||||
const res = await defHttp.get({
|
||||
url: '/sys/user/queryUserRoleComponentData',
|
||||
params: {
|
||||
departId: PARTY_COMMITTEE_DEPT_ID,
|
||||
roleId: SDW_LEADER_ROLE_ID,
|
||||
searchSecurityLevel: 5,
|
||||
pageNo: 1,
|
||||
pageSize: 999,
|
||||
},
|
||||
params: { departId: PARTY_COMMITTEE_DEPT_ID, roleId: SDW_LEADER_ROLE_ID, searchSecurityLevel: 5, pageNo: 1, pageSize: 999 },
|
||||
});
|
||||
const records = res?.records || res?.result?.records || [];
|
||||
defaultCcUsers.value = records.sort((a, b) => (a.sortno ?? Infinity) - (b.sortno ?? Infinity));
|
||||
@@ -473,9 +469,9 @@ import { PARTY_COMMITTEE_DEPT_ID, SDW_LEADER_ROLE_ID } from '/@/constant/supervi
|
||||
}
|
||||
|
||||
watch(
|
||||
() => processInfo.value.taskDefKey,
|
||||
(key) => {
|
||||
if (key === 'Task_0ixi1rs') {
|
||||
() => showDefaultCc.value,
|
||||
() => {
|
||||
if (showDefaultCc.value) {
|
||||
fetchDefaultCcUsers();
|
||||
} else {
|
||||
defaultCcUsers.value = [];
|
||||
|
||||
Reference in New Issue
Block a user