wjx преди 1 месец
родител
ревизия
6e0b76b8fe
променени са 1 файла, в които са добавени 13 реда и са изтрити 8 реда
  1. 13 8
      src/pages/weComTask/page/businessPlan/create/const.tsx

+ 13 - 8
src/pages/weComTask/page/businessPlan/create/const.tsx

@@ -292,11 +292,11 @@ export const restoreGroupData = (groupSendTaskAddDTO: { [x: string]: any }, conf
     const type = configType || 'USER_GROUP'
     const { groupSendName, strategyList } = groupSendTaskAddDTO
     const massSendingContentDTO: { [x: string]: any }[] = []
-    const strategySettings = strategyList.map(item => {
+    const nowTime = Date.now()
+    const strategySettings = strategyList.map((item, index) => {
         const { taskDetail, ...strategy } = item
-
         const sendContentDto = []
-        const sendData = taskDetail.map(item1 => {
+        const sendData = taskDetail.map((item1, index1) => {
             const { sendMode, externalUserFilterName, contentDTO, externalUserFilter } = item1
             sendContentDto.push({
                 sendMode,
@@ -349,7 +349,8 @@ export const restoreGroupData = (groupSendTaskAddDTO: { [x: string]: any }, conf
                         msgType,
                         content
                     }
-                })
+                }),
+                id: nowTime + (index * 1000) + (index1 * 100)
             })
             if (externalUserFilter) {
                 const { configName, ...configContent } = externalUserFilter
@@ -359,22 +360,26 @@ export const restoreGroupData = (groupSendTaskAddDTO: { [x: string]: any }, conf
                         configName,
                         configContent
                     },
-                    externalUserFilterName
+                    externalUserFilterName,
+                    id: nowTime + (index * 1000) + (index1 * 100)
                 }
             }
             return {
                 externalUserType: 'all',
-                externalUserFilterName
+                externalUserFilterName,
+                id: nowTime + (index * 1000) + (index1 * 100)
             }
         })
 
         massSendingContentDTO.push({
-            sendContentDto
+            sendContentDto,
+            id: nowTime + (index * 1000)
         })
 
         return {
             ...strategy,
-            sendData
+            sendData,
+            id: nowTime + (index * 1000)
         }
     })