|
|
@@ -179,6 +179,20 @@ function parseWorkflowCopyIds(multi: unknown, legacySingle: unknown): string[] {
|
|
|
return [];
|
|
|
}
|
|
|
|
|
|
+/** 流程保存到后端时,抄送部门/人员 ID 必须为逗号分隔字符串 */
|
|
|
+function toWorkflowCopyIdsCommaString(value: unknown): string {
|
|
|
+ if (Array.isArray(value)) {
|
|
|
+ return value
|
|
|
+ .map((item) => String(item).trim())
|
|
|
+ .filter((item) => item !== '')
|
|
|
+ .join(',');
|
|
|
+ }
|
|
|
+ if (value === undefined || value === null || value === '') {
|
|
|
+ return '';
|
|
|
+ }
|
|
|
+ return String(value).trim();
|
|
|
+}
|
|
|
+
|
|
|
// 节点配置
|
|
|
const nodeConfigs = [
|
|
|
{
|
|
|
@@ -1195,6 +1209,8 @@ export default function ProcessDesigner() {
|
|
|
workerUserId: responsible !== undefined && responsible !== null && responsible !== ''
|
|
|
? String(responsible)
|
|
|
: '',
|
|
|
+ copyDeptIds: toWorkflowCopyIdsCommaString((restData as any).copyDeptIds),
|
|
|
+ copyUserIds: toWorkflowCopyIdsCommaString((restData as any).copyUserIds),
|
|
|
};
|
|
|
|
|
|
const nodeObj: any = {
|
|
|
@@ -2481,6 +2497,8 @@ export default function ProcessDesigner() {
|
|
|
workerUserId: responsible !== undefined && responsible !== null && responsible !== ''
|
|
|
? String(responsible)
|
|
|
: '',
|
|
|
+ copyDeptIds: toWorkflowCopyIdsCommaString((restData as any).copyDeptIds),
|
|
|
+ copyUserIds: toWorkflowCopyIdsCommaString((restData as any).copyUserIds),
|
|
|
};
|
|
|
|
|
|
const nodeObj: any = {
|
|
|
@@ -2733,6 +2751,8 @@ export default function ProcessDesigner() {
|
|
|
workerUserId: responsible !== undefined && responsible !== null && responsible !== ''
|
|
|
? String(responsible)
|
|
|
: '',
|
|
|
+ copyDeptIds: toWorkflowCopyIdsCommaString((restData as any).copyDeptIds),
|
|
|
+ copyUserIds: toWorkflowCopyIdsCommaString((restData as any).copyUserIds),
|
|
|
};
|
|
|
|
|
|
const nodeObj: any = {
|