!101 feat(bpm): 默认抄送改为extendUrlParams配置驱动,优化fetchDefaultCcUsers并发请求
Merge pull request !101 from wsm/feature/cc_comp
This commit is contained in:
@@ -1,7 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<a-spin :spinning="loading">
|
<a-spin :spinning="loading">
|
||||||
<div class="bg-partymatter-bpm-form">
|
<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="base-info-header section-toolbar">
|
||||||
<div class="section-title">基础信息</div>
|
<div class="section-title">基础信息</div>
|
||||||
<a-space class="section-actions">
|
<a-space class="section-actions">
|
||||||
@@ -9,7 +16,12 @@
|
|||||||
<Icon icon="ant-design:save-outlined" />
|
<Icon icon="ant-design:save-outlined" />
|
||||||
保存
|
保存
|
||||||
</a-button>
|
</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'" />
|
<Icon :icon="showBaseInfoDetail ? 'ant-design:up-outlined' : 'ant-design:down-outlined'" />
|
||||||
{{ showBaseInfoDetail ? '收起基础信息' : '展开全部信息' }}
|
{{ showBaseInfoDetail ? '收起基础信息' : '展开全部信息' }}
|
||||||
</a-button>
|
</a-button>
|
||||||
@@ -30,7 +42,13 @@
|
|||||||
<a-divider />
|
<a-divider />
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<a-form-item label="年份" name="year">
|
<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-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
@@ -50,7 +68,13 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<a-form-item label="会议时间" name="matterTime">
|
<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-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
|
||||||
@@ -113,7 +137,13 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<a-form-item label="是否急件" name="urgencyLevel">
|
<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-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
@@ -207,17 +237,14 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<a-col v-if="showSubApproveUserSelector" :span="12">
|
<a-col v-if="showSubApproveUserSelector" :span="12">
|
||||||
<a-form-item label="部门经办人" :labelCol="wideLabelCol" :wrapperCol="wideWrapperCol">
|
<a-form-item label="部门经办人" :labelCol="wideLabelCol" :wrapperCol="wideWrapperCol">
|
||||||
<sz-dept-user-modal
|
<sz-dept-user-modal v-model:value="subApproveUser" :disabled="savingSubApproveUser" />
|
||||||
v-model:value="subApproveUser"
|
|
||||||
:disabled="savingSubApproveUser"
|
|
||||||
/>
|
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<!-- <a-col :span="24">-->
|
<!-- <a-col :span="24">-->
|
||||||
<!-- <a-form-item :wrapperCol="wideActionWrapperCol">-->
|
<!-- <a-form-item :wrapperCol="wideActionWrapperCol">-->
|
||||||
<!-- <a-button type="primary" :loading="savingSubApproveUser" @click="saveSubApproveUserVariable()">保存</a-button>-->
|
<!-- <a-button type="primary" :loading="savingSubApproveUser" @click="saveSubApproveUserVariable()">保存</a-button>-->
|
||||||
<!-- </a-form-item>-->
|
<!-- </a-form-item>-->
|
||||||
<!-- </a-col>-->
|
<!-- </a-col>-->
|
||||||
</a-row>
|
</a-row>
|
||||||
</a-form>
|
</a-form>
|
||||||
<a-form v-if="showFinishSelector" class="process-variable-form" labelAlign="left" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<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 { bgPartymatterFeedbackDelete, bgPartymatterFeedbackList, saveBpmForm, setBpmVariableLocal } from '../BgPartymatter.api';
|
||||||
import { usePermission } from '/@/hooks/web/usePermission';
|
import { usePermission } from '/@/hooks/web/usePermission';
|
||||||
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 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 BgPartymatterBPMFeedbackModal from './BgPartymatterBPMFeedbackModal.vue';
|
||||||
import SUploadFile from '/@/components/semri/fileComponent/SUploadFile.vue';
|
import SUploadFile from '/@/components/semri/fileComponent/SUploadFile.vue';
|
||||||
import SzDeptUserModal from '/@/components/semri/deptUserComponent/SzDeptUserModal.vue';
|
import SzDeptUserModal from '/@/components/semri/deptUserComponent/SzDeptUserModal.vue';
|
||||||
@@ -266,8 +293,10 @@
|
|||||||
PARTY_COMMITTEE_DEPT_ID as CHARGE_LEADER_DEPT_ID,
|
PARTY_COMMITTEE_DEPT_ID as CHARGE_LEADER_DEPT_ID,
|
||||||
CHARGE_LEADER_ROLE_ID,
|
CHARGE_LEADER_ROLE_ID,
|
||||||
SDW_LEADER_ROLE_ID,
|
SDW_LEADER_ROLE_ID,
|
||||||
|
SUOBAN_DEPT_ID,
|
||||||
|
MEASURE_RES_LEADER_ROLE_ID,
|
||||||
} from '/@/constant/supervision';
|
} from '/@/constant/supervision';
|
||||||
const { isDisabledAuth, hasPermission, initBpmFormData} = usePermission();
|
const { isDisabledAuth, hasPermission, initBpmFormData } = usePermission();
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
formDisabled: { type: Boolean, default: false },
|
formDisabled: { type: Boolean, default: false },
|
||||||
@@ -277,8 +306,8 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
initBpmFormData(props.formData);
|
initBpmFormData(props.formData);
|
||||||
console.log("@props.formData", props.formData);
|
console.log('@props.formData', props.formData);
|
||||||
console.log("@props", props);
|
console.log('@props', props);
|
||||||
|
|
||||||
const emit = defineEmits(['ok', 'success', 'claimSuccess']);
|
const emit = defineEmits(['ok', 'success', 'claimSuccess']);
|
||||||
const { createMessage } = useMessage();
|
const { createMessage } = useMessage();
|
||||||
@@ -361,8 +390,20 @@
|
|||||||
customRender: ({ text }) => (!text ? '' : String(text).slice(0, 10)),
|
customRender: ({ text }) => (!text ? '' : String(text).slice(0, 10)),
|
||||||
},
|
},
|
||||||
{ title: '实际执行情况', dataIndex: 'actualExect', align: 'center', width: 280 },
|
{ 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 },
|
{ title: '附件', dataIndex: 'id', key: 'attachments', align: 'left', width: 340 },
|
||||||
];
|
];
|
||||||
const feedbackActionColumn = { title: '操作', dataIndex: 'action', key: 'action', align: 'center', width: 120, fixed: 'right' };
|
const feedbackActionColumn = { title: '操作', dataIndex: 'action', key: 'action', align: 'center', width: 120, fixed: 'right' };
|
||||||
@@ -418,10 +459,7 @@
|
|||||||
initFormData();
|
initFormData();
|
||||||
});
|
});
|
||||||
|
|
||||||
watch(
|
watch([() => props.formData?.dataId, () => processInfo.value.processInstanceId], () => initFormData());
|
||||||
[() => props.formData?.dataId, () => processInfo.value.processInstanceId],
|
|
||||||
() => initFormData()
|
|
||||||
);
|
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => props.formData?.vars?.isEnd,
|
() => props.formData?.vars?.isEnd,
|
||||||
@@ -455,29 +493,32 @@
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const showDefaultCc = computed(() => String(props.formData?.extendUrlParams?.defaultCc ?? '') === '1');
|
||||||
|
|
||||||
async function fetchDefaultCcUsers() {
|
async function fetchDefaultCcUsers() {
|
||||||
try {
|
try {
|
||||||
const res = await defHttp.get({
|
const [res1, res2] = await Promise.all([
|
||||||
url: '/sys/user/queryUserRoleComponentData',
|
defHttp.get({
|
||||||
params: {
|
url: '/sys/user/queryUserRoleComponentData',
|
||||||
departId: PARTY_COMMITTEE_DEPT_ID,
|
params: { departId: PARTY_COMMITTEE_DEPT_ID, roleId: SDW_LEADER_ROLE_ID, searchSecurityLevel: 5, pageNo: 1, pageSize: 999 },
|
||||||
roleId: SDW_LEADER_ROLE_ID,
|
}),
|
||||||
searchSecurityLevel: 5,
|
defHttp.get({
|
||||||
pageNo: 1,
|
url: '/sys/user/queryUserRoleComponentData',
|
||||||
pageSize: 999,
|
params: { departId: SUOBAN_DEPT_ID, roleId: MEASURE_RES_LEADER_ROLE_ID, searchSecurityLevel: 5, pageNo: 1, pageSize: 999 },
|
||||||
},
|
}),
|
||||||
});
|
]);
|
||||||
const records = res?.records || res?.result?.records || [];
|
const records1 = res1?.records || res1?.result?.records || [];
|
||||||
defaultCcUsers.value = records;
|
const records2 = res2?.records || res2?.result?.records || [];
|
||||||
|
defaultCcUsers.value = [...records1, ...records2];
|
||||||
} catch {
|
} catch {
|
||||||
defaultCcUsers.value = [];
|
defaultCcUsers.value = [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => processInfo.value.taskDefKey,
|
() => showDefaultCc.value,
|
||||||
(key) => {
|
() => {
|
||||||
if (key === 'Task_137y5vq') {
|
if (showDefaultCc.value) {
|
||||||
fetchDefaultCcUsers();
|
fetchDefaultCcUsers();
|
||||||
} else {
|
} else {
|
||||||
defaultCcUsers.value = [];
|
defaultCcUsers.value = [];
|
||||||
|
|||||||
@@ -293,6 +293,8 @@
|
|||||||
PARTY_COMMITTEE_DEPT_ID as CHARGE_LEADER_DEPT_ID,
|
PARTY_COMMITTEE_DEPT_ID as CHARGE_LEADER_DEPT_ID,
|
||||||
CHARGE_LEADER_ROLE_ID,
|
CHARGE_LEADER_ROLE_ID,
|
||||||
SDW_LEADER_ROLE_ID,
|
SDW_LEADER_ROLE_ID,
|
||||||
|
SUOBAN_DEPT_ID,
|
||||||
|
MEASURE_RES_LEADER_ROLE_ID,
|
||||||
} from '/@/constant/supervision';
|
} from '/@/constant/supervision';
|
||||||
|
|
||||||
const { initBpmFormData } = usePermission();
|
const { initBpmFormData } = usePermission();
|
||||||
@@ -446,29 +448,32 @@
|
|||||||
|
|
||||||
watch([() => props.formData?.dataId, () => processInfo.value.processInstanceId], () => initFormData());
|
watch([() => props.formData?.dataId, () => processInfo.value.processInstanceId], () => initFormData());
|
||||||
|
|
||||||
|
const showDefaultCc = computed(() => String(props.formData?.extendUrlParams?.defaultCc ?? '') === '1');
|
||||||
|
|
||||||
async function fetchDefaultCcUsers() {
|
async function fetchDefaultCcUsers() {
|
||||||
try {
|
try {
|
||||||
const res = await defHttp.get({
|
const [res1, res2] = await Promise.all([
|
||||||
url: '/sys/user/queryUserRoleComponentData',
|
defHttp.get({
|
||||||
params: {
|
url: '/sys/user/queryUserRoleComponentData',
|
||||||
departId: PARTY_COMMITTEE_DEPT_ID,
|
params: { departId: PARTY_COMMITTEE_DEPT_ID, roleId: SDW_LEADER_ROLE_ID, searchSecurityLevel: 5, pageNo: 1, pageSize: 999 },
|
||||||
roleId: SDW_LEADER_ROLE_ID,
|
}),
|
||||||
searchSecurityLevel: 5,
|
defHttp.get({
|
||||||
pageNo: 1,
|
url: '/sys/user/queryUserRoleComponentData',
|
||||||
pageSize: 999,
|
params: { departId: SUOBAN_DEPT_ID, roleId: MEASURE_RES_LEADER_ROLE_ID, searchSecurityLevel: 5, pageNo: 1, pageSize: 999 },
|
||||||
},
|
}),
|
||||||
});
|
]);
|
||||||
const records = res?.records || res?.result?.records || [];
|
const records1 = res1?.records || res1?.result?.records || [];
|
||||||
defaultCcUsers.value = records;
|
const records2 = res2?.records || res2?.result?.records || [];
|
||||||
|
defaultCcUsers.value = [...records1, ...records2];
|
||||||
} catch {
|
} catch {
|
||||||
defaultCcUsers.value = [];
|
defaultCcUsers.value = [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => processInfo.value.taskDefKey,
|
() => showDefaultCc.value,
|
||||||
(key) => {
|
() => {
|
||||||
if (key === 'Task_137y5vq') {
|
if (showDefaultCc.value) {
|
||||||
fetchDefaultCcUsers();
|
fetchDefaultCcUsers();
|
||||||
} else {
|
} else {
|
||||||
defaultCcUsers.value = [];
|
defaultCcUsers.value = [];
|
||||||
|
|||||||
@@ -243,8 +243,8 @@ import SzDeptUserModal from '/@/components/semri/deptUserComponent/SzDeptUserMod
|
|||||||
import { saveBpmForm, setProcessVariable, specificProblemOptions } from '../DqInspectTask.api';
|
import { saveBpmForm, setProcessVariable, specificProblemOptions } from '../DqInspectTask.api';
|
||||||
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 { useSelectNameResolver } from '/@/composables/useSelectNameResolver';
|
import { useSelectNameResolver } from '/@/composables/useSelectNameResolver';
|
||||||
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';
|
||||||
@@ -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() {
|
async function fetchDefaultCcUsers() {
|
||||||
try {
|
try {
|
||||||
const res = await defHttp.get({
|
const res = await defHttp.get({
|
||||||
url: '/sys/user/queryUserRoleComponentData',
|
url: '/sys/user/queryUserRoleComponentData',
|
||||||
params: {
|
params: { departId: PARTY_COMMITTEE_DEPT_ID, roleId: SDW_LEADER_ROLE_ID, searchSecurityLevel: 5, pageNo: 1, pageSize: 999 },
|
||||||
departId: PARTY_COMMITTEE_DEPT_ID,
|
|
||||||
roleId: SDW_LEADER_ROLE_ID,
|
|
||||||
searchSecurityLevel: 5,
|
|
||||||
pageNo: 1,
|
|
||||||
pageSize: 999,
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
const records = res?.records || res?.result?.records || [];
|
const records = res?.records || res?.result?.records || [];
|
||||||
defaultCcUsers.value = records.sort((a, b) => (a.sortno ?? Infinity) - (b.sortno ?? Infinity));
|
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(
|
watch(
|
||||||
() => processInfo.value.taskDefKey,
|
() => showDefaultCc.value,
|
||||||
(key) => {
|
() => {
|
||||||
if (key === 'Task_0ixi1rs') {
|
if (showDefaultCc.value) {
|
||||||
fetchDefaultCcUsers();
|
fetchDefaultCcUsers();
|
||||||
} else {
|
} else {
|
||||||
defaultCcUsers.value = [];
|
defaultCcUsers.value = [];
|
||||||
|
|||||||
Reference in New Issue
Block a user