yxk-20260519-YHJY004-党委会增加协办部门字段
发起流程的时候,合并主办部门和协办部门字段,去重后合并为被督办部门供用户确认
This commit is contained in:
@@ -139,7 +139,7 @@
|
||||
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl, bgPartymatterFeedbackList, saveOrUpdate } from './BgPartymatter.api';
|
||||
|
||||
const FLOW_CODE = 'dev_task_task_001';
|
||||
const FLOW_NAME = '党委会决议事项';
|
||||
const FLOW_NAME = '党委会决议事项督办';
|
||||
const BUSINESS_TABLE_NAME = 'bg_partymatter';
|
||||
const FORM_URL = 'bg/bgpartymatter/components/BgPartymatterBPMForm';
|
||||
|
||||
@@ -449,12 +449,34 @@
|
||||
}
|
||||
|
||||
function getResponsibleDeptOptions(record): DeptOption[] {
|
||||
const deptIds = splitDeptValue(record?.responDeptid);
|
||||
const deptNames = splitDeptValue(record?.responDeptid_dictText || record?.responDeptname);
|
||||
return deptIds.map((deptId, index) => ({
|
||||
value: deptId,
|
||||
label: deptNames[index] || deptId,
|
||||
}));
|
||||
const optionMap = new Map<string, DeptOption>();
|
||||
[
|
||||
{
|
||||
ids: splitDeptValue(record?.responDeptid),
|
||||
names: splitDeptValue(record?.responDeptid_dictText || record?.responDeptname),
|
||||
},
|
||||
{
|
||||
ids: splitDeptValue(record?.assistDeptid),
|
||||
names: splitDeptValue(record?.assistDeptid_dictText || record?.assistDeptname),
|
||||
},
|
||||
].forEach(({ ids, names }) => {
|
||||
ids.forEach((deptId, index) => {
|
||||
if (optionMap.has(deptId)) {
|
||||
return;
|
||||
}
|
||||
optionMap.set(deptId, {
|
||||
value: deptId,
|
||||
label: names[index] || deptId,
|
||||
});
|
||||
});
|
||||
});
|
||||
return Array.from(optionMap.values());
|
||||
}
|
||||
|
||||
function getResponsibleDeptIds(record) {
|
||||
return getResponsibleDeptOptions(record)
|
||||
.map((item) => item.value)
|
||||
.join(',');
|
||||
}
|
||||
|
||||
function getNextSuperviseCount(value) {
|
||||
@@ -482,6 +504,7 @@
|
||||
};
|
||||
const nextSuperviseCount = getNextSuperviseCount(record.superviseCount);
|
||||
const selectedDeadline = options.deadline || record.deadline;
|
||||
const defaultDeptIds = getResponsibleDeptIds(record);
|
||||
const flowJsonData = {
|
||||
...record,
|
||||
isNeedAppro: options.isNeedAppro ?? record.isNeedAppro ?? '',
|
||||
@@ -508,7 +531,7 @@
|
||||
title: record.title,
|
||||
content: record.content,
|
||||
urgencyLevel: record.urgencyLevel,
|
||||
deptId: options.deptId || record.responDeptid,
|
||||
deptId: options.deptId || defaultDeptIds,
|
||||
deptLeaderId: record.responDeptid,
|
||||
requireFinishDate: formatDate(selectedDeadline, 'YYYY-MM-DD'),
|
||||
deadline: formatDeadlineDateTime(selectedDeadline),
|
||||
|
||||
Reference in New Issue
Block a user