import React, { useState } from 'react'; import { Space, Table, Button, Input, Select, Tabs } from 'antd'; import type { TableProps } from 'antd'; import styles from './index.module.css'; import PunlishPlanModal from '../weGZH/components/publishPlanModal'; import { wxPlanType } from './type'; const WeGZHContent: React.FC = () => { // 状态管理 const [videoTitle, setVideoTitle] = useState(''); const [selectedPublisher, setSelectedPublisher] = useState(); const [isShowAddPunlishPlan, setIsShowAddPunlishPlan] = useState(false); const [actionType, setActionType] = useState<'add' | 'edit'>('add'); const [editPlanData, setEditPlanData] = useState(); const [activeKey, setActiveKey] = useState('1'); // 表格列配置 const columns: TableProps['columns'] = [ { title: '公众号名称', dataIndex: 'officialAccount', key: 'officialAccount', }, { title: '场景', dataIndex: 'scene', key: 'scene', }, { title: '视频数量', dataIndex: 'videoCount', key: 'videoCount', }, { title: '视频标题', dataIndex: 'videoTitle', key: 'videoTitle', ellipsis: true, }, { title: '计划创建时间', dataIndex: 'planPublishTime', key: 'planPublishTime', }, { title: '发布方', dataIndex: 'publisher', key: 'publisher', }, { title: '操作', key: 'action', render: (_, record) => ( ), }, ]; const editPlan = (record: wxPlanType) => { console.log(editPlanData) setEditPlanData(record); setActionType('edit'); setIsShowAddPunlishPlan(true); }; // 模拟数据 const data: wxPlanType[] = [ { officialAccount: '小慧爱厨房', scene: 1, videoCount: 3, videoTitle: '养老金最新规定,快来看看...', planPublishTime: '2024-08-13 13:32:07', publisher: '平台发布', videoList: [], }, { officialAccount: '小阳看天下', scene: 1, videoCount: 1, videoTitle: '养老金最新规定,快来看看...', planPublishTime: '2024-08-13 13:32:07', publisher: '用户发布', videoList: [], }, ]; const addPunlishPlan = () => { setActionType('add'); setIsShowAddPunlishPlan(true); } return (
公众号内容
{/* 搜索区域 */}
视频标题: setVideoTitle(e.target.value)} />
发布方: