import { Popover, Space, Typography } from "antd"; import { AnyObject } from "antd/es/_util/type"; import { ColumnsType } from "antd/es/table"; import style from './index.less' import { QuestionCircleFilled } from '@ant-design/icons'; import { restoreGroupData, restoreMomentData, restoreUserInheritData } from "../create/const"; import PreviewUserInherit from "../create/components/userInherit/previewUserlnherit"; import PreviewMassSendingStrategy from "../create/components/massSending/previewMassSendingStrategy"; import ShowContent from "../create/components/massSending/showContent"; import PreviewWelcome from "../create/components/welcome/previewWelcome"; import PreviewFriendsStrategy from "../create/components/friends/previewFriendsStrategy"; import ShowFriendsContent from "../create/components/friends/showFriendsContent"; const { Text, Paragraph } = Typography; const taskListColumns = ( bookPlatForm: any[], bookList: any[], handleLog: (data: any) => void, ): ColumnsType => { return [ { title: '操作', dataIndex: 'cz', key: 'cz', width: 120, render(_, record) { return handleLog(record)}>详情 }, }, { title: '任务名称', dataIndex: 'projectName', key: 'projectName', width: 120, ellipsis: true }, { title: '基础信息', dataIndex: 'bizType', key: 'bizType', width: 180, render: (_, record) => { return 业务类型:{record?.bizType === 'novel' ? '小说' : '<空>'}-书城:{record?.platformName || '<空>'}-适用产品:{record?.templateProductName || '<空>'} } }, { title: '欢迎语配置', dataIndex: 'welcomeMsgTemplateDTO', key: 'welcomeMsgTemplateDTO', width: 150, ellipsis: true, render: (_, record) => { return record?.welcomeMsgTemplateDTO && Object.keys(record?.welcomeMsgTemplateDTO)?.length > 0 ?
{record?.welcomeMsgTemplateDTO?.welcomeName || '<空>'}
} styles={{ body: { width: 300, overflow: 'hidden', overflowY: 'auto', maxHeight: 400 } }} > : 当前没有欢迎语配置 } }, // { // title: '朋友圈配置', // dataIndex: 'momentCreateDTO', // key: 'momentCreateDTO', // width: 150, // ellipsis: true, // render: (value) => { // if (value && Object.keys(value)?.length > 0) { // const data = restoreMomentData(value) // return
//
// {value?.momentSendName || '<空>'} //
// // //
} // styles={{ body: { width: 360, overflow: 'hidden', overflowY: 'auto', maxHeight: 400 } }} // > // // // // // } // styles={{ body: { width: 360, overflow: 'hidden', overflowY: 'auto', maxHeight: 400 } }} // > // // // // } // return 当前没有朋友圈配置 // } // }, { title: '群发配置', dataIndex: 'groupSendTaskAddDTO', key: 'groupSendTaskAddDTO', width: 170, ellipsis: true, render: (value) => { if (value && Object.keys(value)?.length > 0) { const data = restoreGroupData(value) return
{value?.groupSendName || '<空>'}
} styles={{ body: { width: 360, overflow: 'hidden', overflowY: 'auto', maxHeight: 400 } }} > } styles={{ body: { width: 360, overflow: 'hidden', overflowY: 'auto', maxHeight: 400 } }} > } return 当前没有群发配置 } }, // { // title: '高级群发配置', // dataIndex: 'messageSendTaskAddDTO', // key: 'messageSendTaskAddDTO', // width: 170, // ellipsis: true, // render: (value, record) => { // if (value && Object.keys(value)?.length > 0) { // const data = restoreGroupData(value, 'GROUP_GROUP') // console.log('data', record.projectName, data) // return
//
// {value?.groupSendName || '<空>'} //
// // //
} // styles={{ body: { width: 360, overflow: 'hidden', overflowY: 'auto', maxHeight: 400 } }} // > // // // // // } // styles={{ body: { width: 360, overflow: 'hidden', overflowY: 'auto', maxHeight: 400 } }} // > // // // // } // return 当前没有群发配置 // } // }, { title: '客户继承配置', dataIndex: 'externalUserTransferTasksDTO', key: 'externalUserTransferTasksDTO', width: 150, ellipsis: true, render: (value) => { if (value && Object.keys(value)?.length > 0) { const data = restoreUserInheritData(value) return
{value?.taskName || '<空>'}
} styles={{ body: { width: 360, overflow: 'hidden', overflowY: 'auto', maxHeight: 400 } }} > } return 当前没有客户继承配置 } }, { title: '创建时间', dataIndex: 'createTime', key: 'createTime', align: 'center', width: 125, ellipsis: true }, ] } export default taskListColumns