diff --git a/src/Drama/components/DramaDetail.tsx b/src/Drama/components/DramaDetail.tsx index f50e506..e0b4b52 100644 --- a/src/Drama/components/DramaDetail.tsx +++ b/src/Drama/components/DramaDetail.tsx @@ -1,14 +1,13 @@ import { useEffect, useState } from "react"; import { useNavigate } from "react-router-dom"; -import { Button, Descriptions, Form, Grid, Input, InputNumber, InputTag, Message, Modal, Select, Space, Switch } from "@arco-design/web-react"; +import { Button, Descriptions, Form, InputNumber, Message, Modal, Space } from "@arco-design/web-react"; import { IconArrowLeft, IconRefresh } from "@arco-design/web-react/icon"; import { channelApi, dramaApi, mediaApi } from "../../api"; import { Panel } from "../../components/Panel"; import { toDramaPayload, toEpisodePayload } from "../formPayload"; import type { Channel, Drama, DramaDetailPageProps, Episode } from "../interface"; import { EpisodeTable } from "./EpisodeTable"; - -const { Row, Col } = Grid; +import { DramaFormFields } from "./DramaFormFields"; const STATUS_OPTIONS = [ { value: "draft", label: "草稿" }, @@ -140,7 +139,7 @@ export function DramaDetail({ dramaId }: DramaDetailPageProps) { 上架短剧 - +
{drama.title} @@ -182,7 +181,7 @@ export function DramaDetail({ dramaId }: DramaDetailPageProps) {
{drama && ( - setEditVisible(false)} footer={null} style={{ width: "45rem" }}> + setEditVisible(false)} footer={null} style={{ width: "50rem" }}>
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
+ ); +} + export function DramaList() { const navigate = useNavigate(); const { data, loading, reload, changePage, setFilter } = usePageData(dramaApi.listDramas, INITIAL_QUERY); @@ -39,7 +91,10 @@ export function DramaList() { const defaultChannel = useMemo(() => channels.find((channel) => channel.isDefault) ?? channels[0], [channels]); useEffect(() => { - channelApi.listChannels({ page: 1, pageSize: 100 }).then((page) => setChannels(page.list)).catch(() => setChannels([])); + channelApi + .listChannels({ page: 1, pageSize: 100 }) + .then((page) => setChannels(page.list)) + .catch(() => setChannels([])); }, []); const handleSearch = () => { @@ -80,7 +135,14 @@ export function DramaList() { return (
- } onClick={() => setVisible(true)}>新增短剧}> + } onClick={() => setVisible(true)}> + 新增短剧 + + } + >
短剧标题
@@ -133,30 +195,35 @@ export function DramaList() { { title: "标题", dataIndex: "title" }, { title: "地区", dataIndex: "region", width: 120 }, { title: "类型", dataIndex: "type", width: 140 }, - { title: "已发布 / 总集数", dataIndex: "totalEpisodes", width: 180, render: (_, record) => `${record.publishedEpisodes || 0}(已发布)/共${record.totalEpisodes || 0}集` }, + { + title: "已发布 / 总集数", + dataIndex: "totalEpisodes", + width: 220, + render: (_, record) => , + }, { title: "状态", dataIndex: "status", - width: 120, - render: (status) => {PUBLISH_STATUS_LABEL[String(status)] || String(status)}, + width: 150, + render: (status) => , }, { title: "推荐", dataIndex: "isRecommended", - width: 100, - render: (value) => (value ? : ), + width: 130, + render: (value) => , }, { title: "操作", - width: 180, + width: 220, render: (_, record) => ( - - - + ), }, @@ -164,83 +231,9 @@ export function DramaList() { />
- setVisible(false)} footer={null} style={{ width: "40rem" }}> + setVisible(false)} footer={null} style={{ width: "56rem" }}> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +