|
@@ -19,6 +19,7 @@ import HighMassSending from './components/highMassSending';
|
|
import { toJS } from 'mobx';
|
|
import { toJS } from 'mobx';
|
|
import Friends from './components/friends';
|
|
import Friends from './components/friends';
|
|
import SelectCwTag from '@/pages/weComTask/components/selectCwTag';
|
|
import SelectCwTag from '@/pages/weComTask/components/selectCwTag';
|
|
|
|
+import SelectCorpUserGroup from '../../corpUserManage/selectCorpUserGroup';
|
|
|
|
|
|
export const DispatchTaskCreate = React.createContext<TASK_CREATE.DispatchTaskCreate | null>(null);
|
|
export const DispatchTaskCreate = React.createContext<TASK_CREATE.DispatchTaskCreate | null>(null);
|
|
/**
|
|
/**
|
|
@@ -41,6 +42,7 @@ const Create: React.FC<{ weComTaskStore: { data: { bookList: TASK_CREATE.BookLis
|
|
const [subVisible, setSubVisible] = useState<boolean>(false) // 选择设置名称弹窗控制
|
|
const [subVisible, setSubVisible] = useState<boolean>(false) // 选择设置名称弹窗控制
|
|
const [eaVisible, setEaVisible] = useState<boolean>(false)
|
|
const [eaVisible, setEaVisible] = useState<boolean>(false)
|
|
const [qwVisible, setQwVisible] = useState<boolean>(false)
|
|
const [qwVisible, setQwVisible] = useState<boolean>(false)
|
|
|
|
+ const [previewContent, setPreviewContent] = useState<{ groupMsgContent?: any[], welcomeMsgContent?: any[] }>({})
|
|
|
|
|
|
const welcomeMsgJobType = useAjax(() => welcomeMsgJobTypeApi())//获取欢迎语类型
|
|
const welcomeMsgJobType = useAjax(() => welcomeMsgJobTypeApi())//获取欢迎语类型
|
|
|
|
|
|
@@ -65,7 +67,7 @@ const Create: React.FC<{ weComTaskStore: { data: { bookList: TASK_CREATE.BookLis
|
|
// 预览
|
|
// 预览
|
|
const preview = () => {
|
|
const preview = () => {
|
|
const newPreviewData: TASK_CREATE.previewDataProps = {}
|
|
const newPreviewData: TASK_CREATE.previewDataProps = {}
|
|
- if (!settings?.corpUsers || settings?.corpUsers?.length === 0) {
|
|
|
|
|
|
+ if (!settings?.corpUserGroups || settings?.corpUserGroups?.length === 0) {
|
|
message.error('请先选择客服号')
|
|
message.error('请先选择客服号')
|
|
return
|
|
return
|
|
}
|
|
}
|
|
@@ -128,22 +130,17 @@ const Create: React.FC<{ weComTaskStore: { data: { bookList: TASK_CREATE.BookLis
|
|
|
|
|
|
// 群发
|
|
// 群发
|
|
if ((settings?.massSendingContent && Object.keys(settings?.massSendingContent).length) && (settings?.massSendingStrategy && Object.keys(settings?.massSendingStrategy).length)) {
|
|
if ((settings?.massSendingContent && Object.keys(settings?.massSendingContent).length) && (settings?.massSendingStrategy && Object.keys(settings?.massSendingStrategy).length)) {
|
|
- if (settings?.massSendingContent?.massSendingContentDTO?.some(item => item?.sendContentDto?.some(si => si?.contentDTO?.some(i => i?.attachmentList?.some(a => ['TASK_CONTENT_LINK', 'TASK_STATUS_MINIPROGRAM'].includes(a?.msgType))))) && settings?.corpUsers?.every(item => !item?.groupMsgContent?.length)) {
|
|
|
|
- message.error('需要配置小程序、链接,请上传配置好的群发Excel文件')
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
|
|
+ // if (settings?.massSendingContent?.massSendingContentDTO?.some(item => item?.sendContentDto?.some(si => si?.contentDTO?.some(i => i?.attachmentList?.some(a => ['TASK_CONTENT_LINK', 'TASK_STATUS_MINIPROGRAM'].includes(a?.msgType))))) && settings?.corpUsers?.every(item => !item?.groupMsgContent?.length)) {
|
|
|
|
+ // message.error('需要配置小程序、链接,请上传配置好的群发Excel文件')
|
|
|
|
+ // return
|
|
|
|
+ // }
|
|
const massSendingData = getGroupData(settings)
|
|
const massSendingData = getGroupData(settings)
|
|
const massSending = []
|
|
const massSending = []
|
|
- if (!settings?.corpUsers?.every((item, i) => {
|
|
|
|
|
|
+ if (!settings?.corpUserGroups?.every((item, i) => {
|
|
|
|
|
|
let strategyIndex = 0
|
|
let strategyIndex = 0
|
|
|
|
|
|
return massSendingData.every((dataItem, li, row) => {
|
|
return massSendingData.every((dataItem, li, row) => {
|
|
- const groupMsgContent = item.groupMsgContent?.[dataItem.strategyIndex - 1]?.[dataItem.sendDataIndex - 1]?.[dataItem.contentIndex - 1]
|
|
|
|
- if (dataItem?.content?.attachmentList?.length && dataItem?.content?.attachmentList?.some(item => (item?.msgType === 'TASK_CONTENT_LINK' ? !groupMsgContent?.linkUrl : item?.msgType === 'TASK_STATUS_MINIPROGRAM' ? (!groupMsgContent?.miniprogramAppid || !groupMsgContent?.miniprogramPage) : false))) {
|
|
|
|
- message.error('群发内容配置错误,请检查')
|
|
|
|
- return false
|
|
|
|
- }
|
|
|
|
|
|
|
|
const mediaItem = JSON.parse(JSON.stringify(dataItem?.content?.attachmentList || []))
|
|
const mediaItem = JSON.parse(JSON.stringify(dataItem?.content?.attachmentList || []))
|
|
if (dataItem?.content?.text?.content) {
|
|
if (dataItem?.content?.text?.content) {
|
|
@@ -152,11 +149,15 @@ const Create: React.FC<{ weComTaskStore: { data: { bookList: TASK_CREATE.BookLis
|
|
textContent: dataItem?.content?.text?.content
|
|
textContent: dataItem?.content?.text?.content
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
+ let isLink = false
|
|
|
|
+ let isMiniProgram = false
|
|
const contentReactNode = mediaItem.map(item => {
|
|
const contentReactNode = mediaItem.map(item => {
|
|
switch (item.msgType) {
|
|
switch (item.msgType) {
|
|
case 'TASK_CONTENT_LINK':
|
|
case 'TASK_CONTENT_LINK':
|
|
|
|
+ isLink = true
|
|
return `<span style="color: red">链接</span>`
|
|
return `<span style="color: red">链接</span>`
|
|
case 'TASK_STATUS_MINIPROGRAM':
|
|
case 'TASK_STATUS_MINIPROGRAM':
|
|
|
|
+ isMiniProgram = true
|
|
return `<span style="color: red">小程序</span>`
|
|
return `<span style="color: red">小程序</span>`
|
|
case 'TASK_STATUS_FILE':
|
|
case 'TASK_STATUS_FILE':
|
|
return `<span>文件</span>`
|
|
return `<span>文件</span>`
|
|
@@ -173,15 +174,17 @@ const Create: React.FC<{ weComTaskStore: { data: { bookList: TASK_CREATE.BookLis
|
|
|
|
|
|
massSending.push({
|
|
massSending.push({
|
|
...dataItem,
|
|
...dataItem,
|
|
- groupMsgContent,
|
|
|
|
contentReactNode,
|
|
contentReactNode,
|
|
- corpUserId: item.corpUserId,
|
|
|
|
- corpUserName: item.name,
|
|
|
|
|
|
+ corpUsergroupIndex: i,
|
|
|
|
+ corpUserGroupName: `客服组${i + 1}`,
|
|
|
|
+ corpUserList: item.corpUsers,
|
|
bizType: settings?.bizType,
|
|
bizType: settings?.bizType,
|
|
channel: settings?.channel,
|
|
channel: settings?.channel,
|
|
platform: settings?.platform,
|
|
platform: settings?.platform,
|
|
templateProductId: settings?.templateProductId,
|
|
templateProductId: settings?.templateProductId,
|
|
id: i * row.length + (li + 1),
|
|
id: i * row.length + (li + 1),
|
|
|
|
+ isLink,
|
|
|
|
+ isMiniProgram,
|
|
userRowSpan: li % row.length === 0 ? row.length : 0,
|
|
userRowSpan: li % row.length === 0 ? row.length : 0,
|
|
strategyRowSpan: strategyIndex !== dataItem.strategyIndex ? dataItem.strategyDataCount : 0
|
|
strategyRowSpan: strategyIndex !== dataItem.strategyIndex ? dataItem.strategyDataCount : 0
|
|
})
|
|
})
|
|
@@ -196,115 +199,116 @@ const Create: React.FC<{ weComTaskStore: { data: { bookList: TASK_CREATE.BookLis
|
|
}
|
|
}
|
|
|
|
|
|
// 是否有客户继承配置
|
|
// 是否有客户继承配置
|
|
- if (settings?.userInherit && Object.keys(settings?.userInherit).length) {
|
|
|
|
- if (settings?.corpUsers?.every(item => !item?.externalUserTransferContent?.length)) {
|
|
|
|
- message.error('请上传配置好的客户继承Excel文件')
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- const userInData = getUserInDataData(settings?.userInherit?.schedulingStrategyDTO, settings?.userInherit?.taskName)
|
|
|
|
-
|
|
|
|
- const userInherit = []
|
|
|
|
- // 数据内容
|
|
|
|
- if (!settings?.corpUsers?.every((item, i) => {
|
|
|
|
- return userInData.every((dataItem, ii, row) => {
|
|
|
|
- const externalUser = item.externalUserTransferContent?.[dataItem.strategyIndex - 1]?.[dataItem.inheritIndex - 1]
|
|
|
|
- if (!externalUser || !externalUser?.corpUserName || !externalUser?.corpUserId) {
|
|
|
|
- message.error('Excel配置错误,' + JSON.stringify(dataItem) + ',' + JSON.stringify(item.externalUserTransferContent))
|
|
|
|
- return false
|
|
|
|
- }
|
|
|
|
- userInherit.push({
|
|
|
|
- ...dataItem,
|
|
|
|
- externalUser,
|
|
|
|
- taskName: dataItem?.taskName,
|
|
|
|
- corpUserId: item.corpUserId,
|
|
|
|
- corpUserName: item.name,
|
|
|
|
- bizType: settings?.bizType,
|
|
|
|
- channel: settings?.channel,
|
|
|
|
- platform: settings?.platform,
|
|
|
|
- templateProductId: settings?.templateProductId,
|
|
|
|
- id: i * row.length + (ii + 1)
|
|
|
|
- })
|
|
|
|
- return true
|
|
|
|
- })
|
|
|
|
- })) {
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- console.log('userInherit-->', userInherit)
|
|
|
|
- newPreviewData.userInherit = userInherit
|
|
|
|
- }
|
|
|
|
|
|
+ // if (settings?.userInherit && Object.keys(settings?.userInherit).length) {
|
|
|
|
+ // if (settings?.corpUsers?.every(item => !item?.externalUserTransferContent?.length)) {
|
|
|
|
+ // message.error('请上传配置好的客户继承Excel文件')
|
|
|
|
+ // return
|
|
|
|
+ // }
|
|
|
|
+ // const userInData = getUserInDataData(settings?.userInherit?.schedulingStrategyDTO, settings?.userInherit?.taskName)
|
|
|
|
+
|
|
|
|
+ // const userInherit = []
|
|
|
|
+ // // 数据内容
|
|
|
|
+ // if (!settings?.corpUsers?.every((item, i) => {
|
|
|
|
+ // return userInData.every((dataItem, ii, row) => {
|
|
|
|
+ // const externalUser = item.externalUserTransferContent?.[dataItem.strategyIndex - 1]?.[dataItem.inheritIndex - 1]
|
|
|
|
+ // if (!externalUser || !externalUser?.corpUserName || !externalUser?.corpUserId) {
|
|
|
|
+ // message.error('Excel配置错误,' + JSON.stringify(dataItem) + ',' + JSON.stringify(item.externalUserTransferContent))
|
|
|
|
+ // return false
|
|
|
|
+ // }
|
|
|
|
+ // userInherit.push({
|
|
|
|
+ // ...dataItem,
|
|
|
|
+ // externalUser,
|
|
|
|
+ // taskName: dataItem?.taskName,
|
|
|
|
+ // corpUserId: item.corpUserId,
|
|
|
|
+ // corpUserName: item.name,
|
|
|
|
+ // bizType: settings?.bizType,
|
|
|
|
+ // channel: settings?.channel,
|
|
|
|
+ // platform: settings?.platform,
|
|
|
|
+ // templateProductId: settings?.templateProductId,
|
|
|
|
+ // id: i * row.length + (ii + 1)
|
|
|
|
+ // })
|
|
|
|
+ // return true
|
|
|
|
+ // })
|
|
|
|
+ // })) {
|
|
|
|
+ // return
|
|
|
|
+ // }
|
|
|
|
+ // console.log('userInherit-->', userInherit)
|
|
|
|
+ // newPreviewData.userInherit = userInherit
|
|
|
|
+ // }
|
|
|
|
|
|
// 是否有高级群发
|
|
// 是否有高级群发
|
|
- if ((settings?.highMassSendingContent && Object.keys(settings?.highMassSendingContent).length) && (settings?.highMassSendingStrategy && Object.keys(settings?.highMassSendingStrategy).length)) {
|
|
|
|
- if (settings?.highMassSendingContent?.massSendingContentDTO?.some(item => item?.sendContentDto?.some(si => si?.contentDTO?.some(i => i?.some(a => ["miniprogram", 'link'].includes(a?.mediaType))))) && settings?.corpUsers?.every(item => !item?.highGroupMsgContent?.length)) {
|
|
|
|
- message.error('需要配置小程序、链接,请上传配置好的高级群发Excel文件')
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- const massSendingData = getHighGroupData(settings)
|
|
|
|
- console.log('massSendingData---->', massSendingData)
|
|
|
|
- const highMassSending = []
|
|
|
|
- let rowLength = 0
|
|
|
|
- if (!settings?.corpUsers?.every((item, i) => {
|
|
|
|
-
|
|
|
|
- let strategyIndex = 0
|
|
|
|
- let corpUserCount = 0
|
|
|
|
- return massSendingData.every((dataItem, li, row) => {
|
|
|
|
-
|
|
|
|
- const mediaItem = JSON.parse(JSON.stringify(dataItem?.content || []))
|
|
|
|
- const contentReactNode = mediaItem.map(item => {
|
|
|
|
- switch (item.mediaType) {
|
|
|
|
- case 'link':
|
|
|
|
- return `<span style="color: red">链接</span>`
|
|
|
|
- case 'miniprogram':
|
|
|
|
- return `<span style="color: red">小程序</span>`
|
|
|
|
- case 'file':
|
|
|
|
- return `<span>文件</span>`
|
|
|
|
- case 'video':
|
|
|
|
- return `<span>视频</span>`
|
|
|
|
- case 'image':
|
|
|
|
- return `<span>图片</span>`
|
|
|
|
- case 'text':
|
|
|
|
- return `<span>文本</span>`
|
|
|
|
- default:
|
|
|
|
- return `<span style="color: red">请联系管理员</span>`
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- const externalUserListLength = item.externalUserList.length
|
|
|
|
- return item.externalUserList?.every((externalUser, ii) => {
|
|
|
|
- const layer3 = externalUser.corpId + '-' + externalUser.externalUserId
|
|
|
|
- const externalUserMsg = item.highGroupMsgContent?.[dataItem.strategyIndex - 1]?.[dataItem.sendDataIndex - 1]?.[layer3]?.[dataItem.contentIndex - 1]
|
|
|
|
- if (mediaItem?.some(media => media?.mediaType === 'link' ? !externalUserMsg?.linkUrl : media?.mediaType === 'miniprogram' ? (!externalUserMsg?.miniprogramAppid || !externalUserMsg?.miniprogramPage) : false)) {
|
|
|
|
- message.error('高级群发配置错误,请检查')
|
|
|
|
- return false
|
|
|
|
- }
|
|
|
|
- rowLength++;
|
|
|
|
- highMassSending.push({
|
|
|
|
- ...dataItem,
|
|
|
|
- groupMsgContent: externalUserMsg,
|
|
|
|
- contentReactNode,
|
|
|
|
- externalUser,
|
|
|
|
- corpUserId: item.corpUserId,
|
|
|
|
- corpUserName: item.name,
|
|
|
|
- bizType: settings?.bizType,
|
|
|
|
- channel: settings?.channel,
|
|
|
|
- platform: settings?.platform,
|
|
|
|
- templateProductId: settings?.templateProductId,
|
|
|
|
- id: rowLength,
|
|
|
|
- userRowSpan: corpUserCount === 0 ? (massSendingData.length * externalUserListLength) : 0,
|
|
|
|
- strategyRowSpan: strategyIndex !== dataItem.strategyIndex ? dataItem.sendDataRowSpan * externalUserListLength * dataItem.strategyItemSendDataCount : 0,
|
|
|
|
- sendDataRowSpan: ii === 0 ? externalUserListLength * dataItem.sendDataRowSpan : 0
|
|
|
|
- })
|
|
|
|
- corpUserCount++;
|
|
|
|
- strategyIndex = dataItem.strategyIndex
|
|
|
|
-
|
|
|
|
- return true
|
|
|
|
- })
|
|
|
|
- })
|
|
|
|
- })) {
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- newPreviewData.highMassSending = highMassSending
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
|
|
+ // if ((settings?.highMassSendingContent && Object.keys(settings?.highMassSendingContent).length) && (settings?.highMassSendingStrategy && Object.keys(settings?.highMassSendingStrategy).length)) {
|
|
|
|
+ // if (settings?.highMassSendingContent?.massSendingContentDTO?.some(item => item?.sendContentDto?.some(si => si?.contentDTO?.some(i => i?.some(a => ["miniprogram", 'link'].includes(a?.mediaType))))) && settings?.corpUsers?.every(item => !item?.highGroupMsgContent?.length)) {
|
|
|
|
+ // message.error('需要配置小程序、链接,请上传配置好的高级群发Excel文件')
|
|
|
|
+ // return
|
|
|
|
+ // }
|
|
|
|
+ // const massSendingData = getHighGroupData(settings)
|
|
|
|
+ // console.log('massSendingData---->', massSendingData)
|
|
|
|
+ // const highMassSending = []
|
|
|
|
+ // let rowLength = 0
|
|
|
|
+ // if (!settings?.corpUsers?.every((item, i) => {
|
|
|
|
+
|
|
|
|
+ // let strategyIndex = 0
|
|
|
|
+ // let corpUserCount = 0
|
|
|
|
+ // return massSendingData.every((dataItem, li, row) => {
|
|
|
|
+
|
|
|
|
+ // const mediaItem = JSON.parse(JSON.stringify(dataItem?.content || []))
|
|
|
|
+ // const contentReactNode = mediaItem.map(item => {
|
|
|
|
+ // switch (item.mediaType) {
|
|
|
|
+ // case 'link':
|
|
|
|
+ // return `<span style="color: red">链接</span>`
|
|
|
|
+ // case 'miniprogram':
|
|
|
|
+ // return `<span style="color: red">小程序</span>`
|
|
|
|
+ // case 'file':
|
|
|
|
+ // return `<span>文件</span>`
|
|
|
|
+ // case 'video':
|
|
|
|
+ // return `<span>视频</span>`
|
|
|
|
+ // case 'image':
|
|
|
|
+ // return `<span>图片</span>`
|
|
|
|
+ // case 'text':
|
|
|
|
+ // return `<span>文本</span>`
|
|
|
|
+ // default:
|
|
|
|
+ // return `<span style="color: red">请联系管理员</span>`
|
|
|
|
+ // }
|
|
|
|
+ // })
|
|
|
|
+ // const externalUserListLength = item.externalUserList.length
|
|
|
|
+ // return item.externalUserList?.every((externalUser, ii) => {
|
|
|
|
+ // const layer3 = externalUser.corpId + '-' + externalUser.externalUserId
|
|
|
|
+ // const externalUserMsg = item.highGroupMsgContent?.[dataItem.strategyIndex - 1]?.[dataItem.sendDataIndex - 1]?.[layer3]?.[dataItem.contentIndex - 1]
|
|
|
|
+ // if (mediaItem?.some(media => media?.mediaType === 'link' ? !externalUserMsg?.linkUrl : media?.mediaType === 'miniprogram' ? (!externalUserMsg?.miniprogramAppid || !externalUserMsg?.miniprogramPage) : false)) {
|
|
|
|
+ // message.error('高级群发配置错误,请检查')
|
|
|
|
+ // return false
|
|
|
|
+ // }
|
|
|
|
+ // rowLength++;
|
|
|
|
+ // highMassSending.push({
|
|
|
|
+ // ...dataItem,
|
|
|
|
+ // groupMsgContent: externalUserMsg,
|
|
|
|
+ // contentReactNode,
|
|
|
|
+ // externalUser,
|
|
|
|
+ // corpUserId: item.corpUserId,
|
|
|
|
+ // corpUserName: item.name,
|
|
|
|
+ // bizType: settings?.bizType,
|
|
|
|
+ // channel: settings?.channel,
|
|
|
|
+ // platform: settings?.platform,
|
|
|
|
+ // templateProductId: settings?.templateProductId,
|
|
|
|
+ // id: rowLength,
|
|
|
|
+ // userRowSpan: corpUserCount === 0 ? (massSendingData.length * externalUserListLength) : 0,
|
|
|
|
+ // strategyRowSpan: strategyIndex !== dataItem.strategyIndex ? dataItem.sendDataRowSpan * externalUserListLength * dataItem.strategyItemSendDataCount : 0,
|
|
|
|
+ // sendDataRowSpan: ii === 0 ? externalUserListLength * dataItem.sendDataRowSpan : 0
|
|
|
|
+ // })
|
|
|
|
+ // corpUserCount++;
|
|
|
|
+ // strategyIndex = dataItem.strategyIndex
|
|
|
|
+
|
|
|
|
+ // return true
|
|
|
|
+ // })
|
|
|
|
+ // })
|
|
|
|
+ // })) {
|
|
|
|
+ // return
|
|
|
|
+ // }
|
|
|
|
+ // newPreviewData.highMassSending = highMassSending
|
|
|
|
+ // }
|
|
|
|
+
|
|
|
|
+ // 是否有朋友圈任务
|
|
if ((settings?.friendsContent && Object.keys(settings?.friendsContent).length) && (settings?.friendsStrategy && Object.keys(settings?.friendsStrategy).length)) {
|
|
if ((settings?.friendsContent && Object.keys(settings?.friendsContent).length) && (settings?.friendsStrategy && Object.keys(settings?.friendsStrategy).length)) {
|
|
if (settings?.friendsContent?.friendsContentDTO?.some(item => item?.contentDTO?.some(i => i?.attachmentList?.some(a => ['link', 'miniprogram'].includes(a?.mediaType)))) && settings?.corpUsers?.every(item => !item?.friendsMsgContent?.length)) {
|
|
if (settings?.friendsContent?.friendsContentDTO?.some(item => item?.contentDTO?.some(i => i?.attachmentList?.some(a => ['link', 'miniprogram'].includes(a?.mediaType)))) && settings?.corpUsers?.every(item => !item?.friendsMsgContent?.length)) {
|
|
message.error('朋友圈需要配置小程序、链接,请上传配置好的群发Excel文件')
|
|
message.error('朋友圈需要配置小程序、链接,请上传配置好的群发Excel文件')
|
|
@@ -391,6 +395,7 @@ const Create: React.FC<{ weComTaskStore: { data: { bookList: TASK_CREATE.BookLis
|
|
|
|
|
|
const onSubmit = (values: any) => {
|
|
const onSubmit = (values: any) => {
|
|
const { bizType, platform, templateProductId, corpUsers, welcomeMsgTemplateDTO, massSendingContent, massSendingStrategy, highMassSendingContent, highMassSendingStrategy, userInherit, friendsContent, friendsStrategy } = settings
|
|
const { bizType, platform, templateProductId, corpUsers, welcomeMsgTemplateDTO, massSendingContent, massSendingStrategy, highMassSendingContent, highMassSendingStrategy, userInherit, friendsContent, friendsStrategy } = settings
|
|
|
|
+
|
|
const params = {
|
|
const params = {
|
|
...values,
|
|
...values,
|
|
bizType,
|
|
bizType,
|
|
@@ -440,6 +445,10 @@ const Create: React.FC<{ weComTaskStore: { data: { bookList: TASK_CREATE.BookLis
|
|
}
|
|
}
|
|
// 群发
|
|
// 群发
|
|
if (massSendingStrategy && Object.keys(massSendingStrategy).length) {
|
|
if (massSendingStrategy && Object.keys(massSendingStrategy).length) {
|
|
|
|
+ if (massSendingContent?.massSendingContentDTO?.some(item => item?.sendContentDto?.some(si => si?.contentDTO?.some(i => i?.attachmentList?.some(a => ['TASK_CONTENT_LINK', 'TASK_STATUS_MINIPROGRAM'].includes(a?.msgType))))) && settings?.corpUsers?.every(item => !item?.groupMsgContent?.length)) {
|
|
|
|
+ message.error('需要配置小程序、链接,请上传配置好的群发Excel文件')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
params.groupSendTaskAddDTO = {
|
|
params.groupSendTaskAddDTO = {
|
|
groupSendName: massSendingStrategy.groupSendName,
|
|
groupSendName: massSendingStrategy.groupSendName,
|
|
strategyList: massSendingStrategy?.strategySettings?.map((settingsItem, settingsIndex) => {
|
|
strategyList: massSendingStrategy?.strategySettings?.map((settingsItem, settingsIndex) => {
|
|
@@ -471,189 +480,189 @@ const Create: React.FC<{ weComTaskStore: { data: { bookList: TASK_CREATE.BookLis
|
|
}
|
|
}
|
|
}
|
|
}
|
|
// 高级群发
|
|
// 高级群发
|
|
- if (highMassSendingStrategy && Object.keys(highMassSendingStrategy).length) {
|
|
|
|
- params.messageSendTaskAddDTO = {
|
|
|
|
- groupSendName: highMassSendingStrategy.groupSendName,
|
|
|
|
- strategyList: highMassSendingStrategy?.strategySettings?.map((settingsItem, settingsIndex) => {
|
|
|
|
- const {
|
|
|
|
- // 发送对象
|
|
|
|
- sendData,
|
|
|
|
- // 策略
|
|
|
|
- ...strategy
|
|
|
|
- } = settingsItem
|
|
|
|
- return {
|
|
|
|
- ...strategy,
|
|
|
|
- taskDetail: sendData.map((sendItem, sendIndex) => {
|
|
|
|
- // 发送内容
|
|
|
|
- const { contentDTO, sendMode } = highMassSendingContent.massSendingContentDTO[settingsIndex]['sendContentDto'][sendIndex]
|
|
|
|
- const detail: { [x: string]: any } = {
|
|
|
|
- sendMode,
|
|
|
|
- contentDTO: contentDTO.map(item => {
|
|
|
|
-
|
|
|
|
- let newContentDTO: { [x: string]: any } = {}
|
|
|
|
- item.forEach((item: MediaContentProps) => {
|
|
|
|
- switch (item.mediaType) {
|
|
|
|
- case "text":
|
|
|
|
- newContentDTO = {
|
|
|
|
- text: {
|
|
|
|
- content: item?.textContent
|
|
|
|
- },
|
|
|
|
- msgType: 'TASK_CONTENT_TEXT'
|
|
|
|
- }
|
|
|
|
- break
|
|
|
|
- case "miniprogram":
|
|
|
|
- newContentDTO = {
|
|
|
|
- miniprogram: {
|
|
|
|
- appId: item?.miniprogramAppid,
|
|
|
|
- page: item?.miniprogramPage,
|
|
|
|
- title: item?.miniprogramTitle,
|
|
|
|
- picUrl: item?.miniprogramPicurl
|
|
|
|
- },
|
|
|
|
- msgType: 'TASK_STATUS_MINIPROGRAM'
|
|
|
|
- }
|
|
|
|
- break
|
|
|
|
- case "link":
|
|
|
|
- newContentDTO = {
|
|
|
|
- link: {
|
|
|
|
- desc: item?.linkDesc,
|
|
|
|
- picUrl: item?.linkPicurl,
|
|
|
|
- title: item?.linkTitle,
|
|
|
|
- url: item?.linkUrl
|
|
|
|
- },
|
|
|
|
- msgType: 'TASK_CONTENT_LINK'
|
|
|
|
- }
|
|
|
|
- break
|
|
|
|
- case "image":
|
|
|
|
- newContentDTO = {
|
|
|
|
- image: {
|
|
|
|
- picUrl: item?.imageUrl
|
|
|
|
- },
|
|
|
|
- msgType: 'TASK_CONTENT_IMAGE'
|
|
|
|
- }
|
|
|
|
- break
|
|
|
|
- case "video":
|
|
|
|
- newContentDTO = {
|
|
|
|
- video: {
|
|
|
|
- videoUrl: item?.videoUrl
|
|
|
|
- },
|
|
|
|
- msgType: 'TASK_STATUS_VIDEO'
|
|
|
|
- }
|
|
|
|
- break
|
|
|
|
- case "file":
|
|
|
|
- newContentDTO = {
|
|
|
|
- file: {
|
|
|
|
- fileUrl: item?.fileUrl
|
|
|
|
- },
|
|
|
|
- msgType: 'TASK_STATUS_FILE'
|
|
|
|
- }
|
|
|
|
- break
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
-
|
|
|
|
- return newContentDTO
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- if (sendItem.externalUserType === 'specify') {
|
|
|
|
- detail.externalUserFilter = {
|
|
|
|
- configName: sendItem.externalUserFilter.configName,
|
|
|
|
- ...sendItem.externalUserFilter.configContent
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- return detail
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- if (userInherit && Object.keys(userInherit).length) {
|
|
|
|
- params.externalUserTransferTasksDTO = {
|
|
|
|
- taskName: userInherit.taskName,
|
|
|
|
- schedulingStrategyDTO: userInherit.schedulingStrategyDTO.map(strategyItem => {
|
|
|
|
- const {
|
|
|
|
- inheritDto,
|
|
|
|
- ...strategy
|
|
|
|
- } = strategyItem
|
|
|
|
- return {
|
|
|
|
- ...strategy,
|
|
|
|
- transferStrategyContentDTOS: inheritDto.map(inheritItem => {
|
|
|
|
- const inherit: { [x: string]: any } = {
|
|
|
|
- transferSuccessMsg: inheritItem.transferSuccessMsg
|
|
|
|
- }
|
|
|
|
- if (inheritItem.transferType === 'specify') {
|
|
|
|
- inherit.externalUserFilter = {
|
|
|
|
- configName: inheritItem.transferUserDto.configName,
|
|
|
|
- ...inheritItem.transferUserDto.configContent
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- return inherit
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ // if (highMassSendingStrategy && Object.keys(highMassSendingStrategy).length) {
|
|
|
|
+ // params.messageSendTaskAddDTO = {
|
|
|
|
+ // groupSendName: highMassSendingStrategy.groupSendName,
|
|
|
|
+ // strategyList: highMassSendingStrategy?.strategySettings?.map((settingsItem, settingsIndex) => {
|
|
|
|
+ // const {
|
|
|
|
+ // // 发送对象
|
|
|
|
+ // sendData,
|
|
|
|
+ // // 策略
|
|
|
|
+ // ...strategy
|
|
|
|
+ // } = settingsItem
|
|
|
|
+ // return {
|
|
|
|
+ // ...strategy,
|
|
|
|
+ // taskDetail: sendData.map((sendItem, sendIndex) => {
|
|
|
|
+ // // 发送内容
|
|
|
|
+ // const { contentDTO, sendMode } = highMassSendingContent.massSendingContentDTO[settingsIndex]['sendContentDto'][sendIndex]
|
|
|
|
+ // const detail: { [x: string]: any } = {
|
|
|
|
+ // sendMode,
|
|
|
|
+ // contentDTO: contentDTO.map(item => {
|
|
|
|
+
|
|
|
|
+ // let newContentDTO: { [x: string]: any } = {}
|
|
|
|
+ // item.forEach((item: MediaContentProps) => {
|
|
|
|
+ // switch (item.mediaType) {
|
|
|
|
+ // case "text":
|
|
|
|
+ // newContentDTO = {
|
|
|
|
+ // text: {
|
|
|
|
+ // content: item?.textContent
|
|
|
|
+ // },
|
|
|
|
+ // msgType: 'TASK_CONTENT_TEXT'
|
|
|
|
+ // }
|
|
|
|
+ // break
|
|
|
|
+ // case "miniprogram":
|
|
|
|
+ // newContentDTO = {
|
|
|
|
+ // miniprogram: {
|
|
|
|
+ // appId: item?.miniprogramAppid,
|
|
|
|
+ // page: item?.miniprogramPage,
|
|
|
|
+ // title: item?.miniprogramTitle,
|
|
|
|
+ // picUrl: item?.miniprogramPicurl
|
|
|
|
+ // },
|
|
|
|
+ // msgType: 'TASK_STATUS_MINIPROGRAM'
|
|
|
|
+ // }
|
|
|
|
+ // break
|
|
|
|
+ // case "link":
|
|
|
|
+ // newContentDTO = {
|
|
|
|
+ // link: {
|
|
|
|
+ // desc: item?.linkDesc,
|
|
|
|
+ // picUrl: item?.linkPicurl,
|
|
|
|
+ // title: item?.linkTitle,
|
|
|
|
+ // url: item?.linkUrl
|
|
|
|
+ // },
|
|
|
|
+ // msgType: 'TASK_CONTENT_LINK'
|
|
|
|
+ // }
|
|
|
|
+ // break
|
|
|
|
+ // case "image":
|
|
|
|
+ // newContentDTO = {
|
|
|
|
+ // image: {
|
|
|
|
+ // picUrl: item?.imageUrl
|
|
|
|
+ // },
|
|
|
|
+ // msgType: 'TASK_CONTENT_IMAGE'
|
|
|
|
+ // }
|
|
|
|
+ // break
|
|
|
|
+ // case "video":
|
|
|
|
+ // newContentDTO = {
|
|
|
|
+ // video: {
|
|
|
|
+ // videoUrl: item?.videoUrl
|
|
|
|
+ // },
|
|
|
|
+ // msgType: 'TASK_STATUS_VIDEO'
|
|
|
|
+ // }
|
|
|
|
+ // break
|
|
|
|
+ // case "file":
|
|
|
|
+ // newContentDTO = {
|
|
|
|
+ // file: {
|
|
|
|
+ // fileUrl: item?.fileUrl
|
|
|
|
+ // },
|
|
|
|
+ // msgType: 'TASK_STATUS_FILE'
|
|
|
|
+ // }
|
|
|
|
+ // break
|
|
|
|
+ // }
|
|
|
|
+ // })
|
|
|
|
+
|
|
|
|
+ // return newContentDTO
|
|
|
|
+ // })
|
|
|
|
+ // }
|
|
|
|
+ // if (sendItem.externalUserType === 'specify') {
|
|
|
|
+ // detail.externalUserFilter = {
|
|
|
|
+ // configName: sendItem.externalUserFilter.configName,
|
|
|
|
+ // ...sendItem.externalUserFilter.configContent
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ // return detail
|
|
|
|
+ // })
|
|
|
|
+ // }
|
|
|
|
+ // })
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ // if (userInherit && Object.keys(userInherit).length) {
|
|
|
|
+ // params.externalUserTransferTasksDTO = {
|
|
|
|
+ // taskName: userInherit.taskName,
|
|
|
|
+ // schedulingStrategyDTO: userInherit.schedulingStrategyDTO.map(strategyItem => {
|
|
|
|
+ // const {
|
|
|
|
+ // inheritDto,
|
|
|
|
+ // ...strategy
|
|
|
|
+ // } = strategyItem
|
|
|
|
+ // return {
|
|
|
|
+ // ...strategy,
|
|
|
|
+ // transferStrategyContentDTOS: inheritDto.map(inheritItem => {
|
|
|
|
+ // const inherit: { [x: string]: any } = {
|
|
|
|
+ // transferSuccessMsg: inheritItem.transferSuccessMsg
|
|
|
|
+ // }
|
|
|
|
+ // if (inheritItem.transferType === 'specify') {
|
|
|
|
+ // inherit.externalUserFilter = {
|
|
|
|
+ // configName: inheritItem.transferUserDto.configName,
|
|
|
|
+ // ...inheritItem.transferUserDto.configContent
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ // return inherit
|
|
|
|
+ // })
|
|
|
|
+ // }
|
|
|
|
+ // })
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
// 朋友圈
|
|
// 朋友圈
|
|
- if (friendsStrategy && Object.keys(friendsStrategy).length) {
|
|
|
|
- params.momentCreateDTO = {
|
|
|
|
- momentSendName: friendsStrategy.momentSendName,
|
|
|
|
- strategyList: friendsStrategy.strategySettings.map((item, index) => {
|
|
|
|
- const { sendMode, contentDTO } = settings?.friendsContent?.friendsContentDTO?.[index]
|
|
|
|
|
|
+ // if (friendsStrategy && Object.keys(friendsStrategy).length) {
|
|
|
|
+ // params.momentCreateDTO = {
|
|
|
|
+ // momentSendName: friendsStrategy.momentSendName,
|
|
|
|
+ // strategyList: friendsStrategy.strategySettings.map((item, index) => {
|
|
|
|
+ // const { sendMode, contentDTO } = settings?.friendsContent?.friendsContentDTO?.[index]
|
|
|
|
+
|
|
|
|
+ // return {
|
|
|
|
+ // ...item,
|
|
|
|
+ // taskDetail: {
|
|
|
|
+ // sendMode,
|
|
|
|
+ // contentDTO: contentDTO.map(item => {
|
|
|
|
+
|
|
|
|
+ // return {
|
|
|
|
+ // text: item.text,
|
|
|
|
+ // attachmentList: item.attachmentList.map((item: any) => {
|
|
|
|
+ // switch (item.mediaType) {
|
|
|
|
+ // case 'image':
|
|
|
|
+ // return {
|
|
|
|
+ // image: {
|
|
|
|
+ // picUrl: item.imageUrl,
|
|
|
|
+ // mediaFormat: item.mediaFormat,
|
|
|
|
+ // mediaSize: item.mediaSize,
|
|
|
|
+ // mediaPlayTime: item.mediaPlayTime,
|
|
|
|
+ // mediaWidth: item.mediaWidth,
|
|
|
|
+ // mediaHeight: item.mediaHeight
|
|
|
|
+ // }, msgType: 'TASK_CONTENT_IMAGE'
|
|
|
|
+ // }
|
|
|
|
+ // case 'video':
|
|
|
|
+ // return {
|
|
|
|
+ // video: {
|
|
|
|
+ // videoUrl: item.videoUrl,
|
|
|
|
+ // mediaFormat: item.mediaFormat,
|
|
|
|
+ // mediaSize: item.mediaSize,
|
|
|
|
+ // mediaPlayTime: item.mediaPlayTime,
|
|
|
|
+ // mediaWidth: item.mediaWidth,
|
|
|
|
+ // mediaHeight: item.mediaHeight
|
|
|
|
+ // }, msgType: 'TASK_STATUS_VIDEO'
|
|
|
|
+ // }
|
|
|
|
+ // case 'file':
|
|
|
|
+ // return { file: { fileUrl: item.fileUrl }, msgType: 'TASK_STATUS_FILE' }
|
|
|
|
+ // case 'link':
|
|
|
|
+ // return { link: { desc: item.linkDesc, picUrl: item.linkPicurl, title: item.linkTitle, url: item.linkUrl }, msgType: 'TASK_CONTENT_LINK' }
|
|
|
|
+ // case 'miniprogram':
|
|
|
|
+ // return {
|
|
|
|
+ // miniprogram: {
|
|
|
|
+ // appId: item.miniprogramAppid,
|
|
|
|
+ // page: item.miniprogramPage,
|
|
|
|
+ // picUrl: item.miniprogramPicurl,
|
|
|
|
+ // title: item.miniprogramTitle
|
|
|
|
+ // },
|
|
|
|
+ // msgType: 'TASK_STATUS_MINIPROGRAM'
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ // })
|
|
|
|
+ // }
|
|
|
|
+ // })
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ // })
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
|
|
- return {
|
|
|
|
- ...item,
|
|
|
|
- taskDetail: {
|
|
|
|
- sendMode,
|
|
|
|
- contentDTO: contentDTO.map(item => {
|
|
|
|
-
|
|
|
|
- return {
|
|
|
|
- text: item.text,
|
|
|
|
- attachmentList: item.attachmentList.map((item: any) => {
|
|
|
|
- switch (item.mediaType) {
|
|
|
|
- case 'image':
|
|
|
|
- return {
|
|
|
|
- image: {
|
|
|
|
- picUrl: item.imageUrl,
|
|
|
|
- mediaFormat: item.mediaFormat,
|
|
|
|
- mediaSize: item.mediaSize,
|
|
|
|
- mediaPlayTime: item.mediaPlayTime,
|
|
|
|
- mediaWidth: item.mediaWidth,
|
|
|
|
- mediaHeight: item.mediaHeight
|
|
|
|
- }, msgType: 'TASK_CONTENT_IMAGE'
|
|
|
|
- }
|
|
|
|
- case 'video':
|
|
|
|
- return {
|
|
|
|
- video: {
|
|
|
|
- videoUrl: item.videoUrl,
|
|
|
|
- mediaFormat: item.mediaFormat,
|
|
|
|
- mediaSize: item.mediaSize,
|
|
|
|
- mediaPlayTime: item.mediaPlayTime,
|
|
|
|
- mediaWidth: item.mediaWidth,
|
|
|
|
- mediaHeight: item.mediaHeight
|
|
|
|
- }, msgType: 'TASK_STATUS_VIDEO'
|
|
|
|
- }
|
|
|
|
- case 'file':
|
|
|
|
- return { file: { fileUrl: item.fileUrl }, msgType: 'TASK_STATUS_FILE' }
|
|
|
|
- case 'link':
|
|
|
|
- return { link: { desc: item.linkDesc, picUrl: item.linkPicurl, title: item.linkTitle, url: item.linkUrl }, msgType: 'TASK_CONTENT_LINK' }
|
|
|
|
- case 'miniprogram':
|
|
|
|
- return {
|
|
|
|
- miniprogram: {
|
|
|
|
- appId: item.miniprogramAppid,
|
|
|
|
- page: item.miniprogramPage,
|
|
|
|
- picUrl: item.miniprogramPicurl,
|
|
|
|
- title: item.miniprogramTitle
|
|
|
|
- },
|
|
|
|
- msgType: 'TASK_STATUS_MINIPROGRAM'
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
addTask.run(params).then(res => {
|
|
addTask.run(params).then(res => {
|
|
console.log(res)
|
|
console.log(res)
|
|
if (res?.data) {
|
|
if (res?.data) {
|
|
@@ -676,6 +685,7 @@ const Create: React.FC<{ weComTaskStore: { data: { bookList: TASK_CREATE.BookLis
|
|
|
|
|
|
const onPreviewReset = () => {
|
|
const onPreviewReset = () => {
|
|
setPreviewData({})
|
|
setPreviewData({})
|
|
|
|
+ setPreviewContent({})
|
|
}
|
|
}
|
|
|
|
|
|
const severBd = () => {
|
|
const severBd = () => {
|
|
@@ -683,20 +693,44 @@ const Create: React.FC<{ weComTaskStore: { data: { bookList: TASK_CREATE.BookLis
|
|
message.success('存储成功')
|
|
message.success('存储成功')
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ const setContent = (data: TASK_CREATE.SetContentProps) => {
|
|
|
|
+ const { msg, index, type } = data
|
|
|
|
+ const newPreviewContent = JSON.parse(JSON.stringify(previewContent))
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ switch (type) {
|
|
|
|
+ case 'welcome':
|
|
|
|
+ break
|
|
|
|
+ case 'massSending':
|
|
|
|
+ newPreviewContent.groupMsgContent = newPreviewContent?.groupMsgContent || {}
|
|
|
|
+ if (!newPreviewContent.groupMsgContent?.[index[0]]) newPreviewContent.groupMsgContent[index[0]] = [];
|
|
|
|
+ if (!newPreviewContent.groupMsgContent[index[0]][index[1]]) newPreviewContent.groupMsgContent[index[0]][index[1]] = [];
|
|
|
|
+ if (!newPreviewContent.groupMsgContent[index[0]][index[1]][index[2]]) newPreviewContent.groupMsgContent[index[0]][index[1]][index[2]] = [];
|
|
|
|
+ if (!newPreviewContent.groupMsgContent[index[0]][index[1]][index[2]][index[3]]) newPreviewContent.groupMsgContent[index[0]][index[1]][index[2]][index[3]] = {};
|
|
|
|
+ newPreviewContent.groupMsgContent[index[0]][index[1]][index[2]][index[3]] = { ...newPreviewContent.groupMsgContent[index[0]][index[1]][index[2]][index[3]], ...msg }
|
|
|
|
+ break
|
|
|
|
+ }
|
|
|
|
+ setPreviewContent(newPreviewContent)
|
|
|
|
+ }
|
|
|
|
+
|
|
return <div className={style.create}>
|
|
return <div className={style.create}>
|
|
<Spin spinning={false}>
|
|
<Spin spinning={false}>
|
|
<Card title={<strong>配置区</strong>} className={`${style.card} ${style.config}`}>
|
|
<Card title={<strong>配置区</strong>} className={`${style.card} ${style.config}`}>
|
|
<Space wrap>
|
|
<Space wrap>
|
|
<Space.Compact>
|
|
<Space.Compact>
|
|
- <Button>客服号</Button>
|
|
|
|
- <SelectCorpUser
|
|
|
|
- value={settings?.corpUsers}
|
|
|
|
- onChange={(corpUsers) => {
|
|
|
|
- console.log(corpUsers)
|
|
|
|
|
|
+ <Button>客服组</Button>
|
|
|
|
+ <SelectCorpUserGroup
|
|
|
|
+ value={settings?.corpUserGroups}
|
|
|
|
+ onChange={(corpUserGroups) => {
|
|
|
|
+ console.log(corpUserGroups)
|
|
setSettings({
|
|
setSettings({
|
|
- ...settings, corpUsers: corpUsers.map(item => {
|
|
|
|
- const { corpUserId, name, corpName, corpId } = item
|
|
|
|
- return { corpUserId, name, corpName, corpId }
|
|
|
|
|
|
+ ...settings, corpUserGroups: corpUserGroups.map(item => {
|
|
|
|
+ return {
|
|
|
|
+ ...item, corpUsers: item.corpUsers.map(item => {
|
|
|
|
+ const { corpUserId, name, corpName, corpId } = item
|
|
|
|
+ return { corpUserId, name, corpName, corpId }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
})
|
|
})
|
|
})
|
|
})
|
|
onPreviewReset()
|
|
onPreviewReset()
|
|
@@ -813,11 +847,11 @@ const Create: React.FC<{ weComTaskStore: { data: { bookList: TASK_CREATE.BookLis
|
|
{/* 群发设置 */}
|
|
{/* 群发设置 */}
|
|
<MassSending />
|
|
<MassSending />
|
|
{/* 高级群发 */}
|
|
{/* 高级群发 */}
|
|
- <HighMassSending />
|
|
|
|
|
|
+ {/* <HighMassSending /> */}
|
|
{/* 朋友圈 */}
|
|
{/* 朋友圈 */}
|
|
- <Friends />
|
|
|
|
|
|
+ {/* <Friends /> */}
|
|
{/* 客户继承 */}
|
|
{/* 客户继承 */}
|
|
- <UserInherit />
|
|
|
|
|
|
+ {/* <UserInherit /> */}
|
|
</div>
|
|
</div>
|
|
</DispatchTaskCreate.Provider>
|
|
</DispatchTaskCreate.Provider>
|
|
</div>
|
|
</div>
|
|
@@ -835,7 +869,7 @@ const Create: React.FC<{ weComTaskStore: { data: { bookList: TASK_CREATE.BookLis
|
|
>
|
|
>
|
|
<Button icon={<RedoOutlined />} danger>清空配置/预设</Button>
|
|
<Button icon={<RedoOutlined />} danger>清空配置/预设</Button>
|
|
</Popconfirm>
|
|
</Popconfirm>
|
|
- <Button type='primary' onClick={preview}><SearchOutlined />预览广告</Button>
|
|
|
|
|
|
+ <Button type='primary' onClick={preview}><SearchOutlined />预览任务/配置内容</Button>
|
|
</Space>
|
|
</Space>
|
|
</Card>
|
|
</Card>
|
|
</Spin>
|
|
</Spin>
|
|
@@ -859,7 +893,7 @@ const Create: React.FC<{ weComTaskStore: { data: { bookList: TASK_CREATE.BookLis
|
|
</> : key === 'massSending' ? <>
|
|
</> : key === 'massSending' ? <>
|
|
<Table
|
|
<Table
|
|
dataSource={previewData[key]}
|
|
dataSource={previewData[key]}
|
|
- columns={massSendingColumns()}
|
|
|
|
|
|
+ columns={massSendingColumns(setContent)}
|
|
rowKey={'id'}
|
|
rowKey={'id'}
|
|
bordered={true}
|
|
bordered={true}
|
|
scroll={{ y: 550 }}
|
|
scroll={{ y: 550 }}
|