feat(bgpartymatter,bqtakepulse): 新增默认抄送人功能
所领导审批分配任务节点(Task_137y5vq)自动查询所党委领导作为默认抄送人。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -237,6 +237,7 @@
|
||||
:claim="claim"
|
||||
:beforeHandle="saveMainFormBeforeProcessHandle"
|
||||
:defaultReason="defaultHandleReason"
|
||||
:defaultCc="defaultCcUsers"
|
||||
@success="handleProcessSuccess"
|
||||
@claimSuccess="handleClaimSuccess"
|
||||
/>
|
||||
@@ -261,8 +262,10 @@
|
||||
import SzDeptUserModal from '/@/components/semri/deptUserComponent/SzDeptUserModal.vue';
|
||||
import DeptRoleUserSelectDropDown from '/@/components/semri/userComponent/DeptRoleUserSelectDropDown.vue';
|
||||
import {
|
||||
PARTY_COMMITTEE_DEPT_ID,
|
||||
PARTY_COMMITTEE_DEPT_ID as CHARGE_LEADER_DEPT_ID,
|
||||
CHARGE_LEADER_ROLE_ID,
|
||||
SDW_LEADER_ROLE_ID,
|
||||
} from '/@/constant/supervision';
|
||||
const { isDisabledAuth, hasPermission, initBpmFormData} = usePermission();
|
||||
|
||||
@@ -312,6 +315,7 @@
|
||||
const userResolveVersion = ref(0);
|
||||
const isEnd = ref(0);
|
||||
const isFinish = ref('0');
|
||||
const defaultCcUsers = ref<Array<{ username: string; realname: string }>>([]);
|
||||
const lastGeneratedNumber = ref('');
|
||||
|
||||
const mainForm = reactive<Record<string, any>>({
|
||||
@@ -451,6 +455,37 @@
|
||||
}
|
||||
);
|
||||
|
||||
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;
|
||||
} catch {
|
||||
defaultCcUsers.value = [];
|
||||
}
|
||||
}
|
||||
|
||||
watch(
|
||||
() => processInfo.value.taskDefKey,
|
||||
(key) => {
|
||||
if (key === 'Task_137y5vq') {
|
||||
fetchDefaultCcUsers();
|
||||
} else {
|
||||
defaultCcUsers.value = [];
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
async function initFormData() {
|
||||
const dataId = props.formData?.dataId;
|
||||
if (!dataId) {
|
||||
|
||||
@@ -262,6 +262,7 @@
|
||||
:claim="claim"
|
||||
:beforeHandle="saveMainFormBeforeProcessHandle"
|
||||
:defaultReason="defaultHandleReason"
|
||||
:defaultCc="defaultCcUsers"
|
||||
@success="handleProcessSuccess"
|
||||
@claimSuccess="handleClaimSuccess"
|
||||
/>
|
||||
@@ -288,8 +289,10 @@
|
||||
import SzDeptUserModal from "@/components/semri/deptUserComponent/SzDeptUserModal.vue";
|
||||
import DeptRoleUserSelectDropDown from '/@/components/semri/userComponent/DeptRoleUserSelectDropDown.vue';
|
||||
import {
|
||||
PARTY_COMMITTEE_DEPT_ID,
|
||||
PARTY_COMMITTEE_DEPT_ID as CHARGE_LEADER_DEPT_ID,
|
||||
CHARGE_LEADER_ROLE_ID,
|
||||
SDW_LEADER_ROLE_ID,
|
||||
} from '/@/constant/supervision';
|
||||
|
||||
const { initBpmFormData } = usePermission();
|
||||
@@ -337,6 +340,7 @@
|
||||
const userResolveVersion = ref(0);
|
||||
const isEnd = ref(0);
|
||||
const isFinish = ref('0');
|
||||
const defaultCcUsers = ref<Array<{ username: string; realname: string }>>([]);
|
||||
|
||||
const mainForm = reactive<Record<string, any>>({
|
||||
id: '',
|
||||
@@ -442,6 +446,37 @@
|
||||
|
||||
watch([() => props.formData?.dataId, () => processInfo.value.processInstanceId], () => initFormData());
|
||||
|
||||
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;
|
||||
} catch {
|
||||
defaultCcUsers.value = [];
|
||||
}
|
||||
}
|
||||
|
||||
watch(
|
||||
() => processInfo.value.taskDefKey,
|
||||
(key) => {
|
||||
if (key === 'Task_137y5vq') {
|
||||
fetchDefaultCcUsers();
|
||||
} else {
|
||||
defaultCcUsers.value = [];
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
watch(
|
||||
() => props.formData?.vars?.isEnd,
|
||||
(value) => {
|
||||
|
||||
Reference in New Issue
Block a user