fix(xispeak): BgXiSpeakBPMForm 补全 defaultCc 默认抄送机制
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -257,6 +257,7 @@
|
|||||||
:showSelnextUser="showSelnextUser"
|
:showSelnextUser="showSelnextUser"
|
||||||
:beforeHandle="saveMainFormBeforeProcessHandle"
|
:beforeHandle="saveMainFormBeforeProcessHandle"
|
||||||
:defaultReason="defaultHandleReason"
|
:defaultReason="defaultHandleReason"
|
||||||
|
:defaultCc="defaultCcUsers"
|
||||||
@success="handleProcessSuccess"
|
@success="handleProcessSuccess"
|
||||||
@claimSuccess="handleClaimSuccess"
|
@claimSuccess="handleClaimSuccess"
|
||||||
/>
|
/>
|
||||||
@@ -330,6 +331,7 @@ import {
|
|||||||
const feedbackList = ref<any[]>([]);
|
const feedbackList = ref<any[]>([]);
|
||||||
const { usernames: subApproveUser, displayNames: subApproveUserNameText, setDisplayNames, initFromData } = useSubApproveUserResolver();
|
const { usernames: subApproveUser, displayNames: subApproveUserNameText, setDisplayNames, initFromData } = useSubApproveUserResolver();
|
||||||
const isEnd = ref(0);
|
const isEnd = ref(0);
|
||||||
|
const defaultCcUsers = ref<Array<{ username: string; realname: string }>>([]);
|
||||||
|
|
||||||
const mainForm = reactive<Record<string, any>>({
|
const mainForm = reactive<Record<string, any>>({
|
||||||
id: '',
|
id: '',
|
||||||
@@ -427,6 +429,7 @@ import {
|
|||||||
() => String(props.formData?.extendUrlParams?.showSubApproveUser ?? props.formData?.extendUrlParams?.selectuser ?? '') === '1'
|
() => String(props.formData?.extendUrlParams?.showSubApproveUser ?? props.formData?.extendUrlParams?.selectuser ?? '') === '1'
|
||||||
);
|
);
|
||||||
const showSubApproveUserSelector = computed(() => showSubApproveUser.value && String(isEnd.value) !== '1');
|
const showSubApproveUserSelector = computed(() => showSubApproveUser.value && String(isEnd.value) !== '1');
|
||||||
|
const showDefaultCc = computed(() => String(props.formData?.extendUrlParams?.defaultCc ?? '') === '1');
|
||||||
|
|
||||||
const processInfo = computed(() => ({
|
const processInfo = computed(() => ({
|
||||||
taskId: props.formData?.taskId,
|
taskId: props.formData?.taskId,
|
||||||
@@ -532,6 +535,31 @@ import {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
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.sort((a, b) => (a.sortno ?? Infinity) - (b.sortno ?? Infinity));
|
||||||
|
} catch {
|
||||||
|
defaultCcUsers.value = [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => showDefaultCc.value,
|
||||||
|
() => {
|
||||||
|
if (showDefaultCc.value) {
|
||||||
|
fetchDefaultCcUsers();
|
||||||
|
} else {
|
||||||
|
defaultCcUsers.value = [];
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ immediate: true }
|
||||||
|
);
|
||||||
|
|
||||||
async function initFormData() {
|
async function initFormData() {
|
||||||
const dataId = props.formData?.dataId;
|
const dataId = props.formData?.dataId;
|
||||||
if (!dataId) {
|
if (!dataId) {
|
||||||
|
|||||||
Reference in New Issue
Block a user