From ac87ac70593870d720c3b50bbcee6fa91cfe5b3c Mon Sep 17 00:00:00 2001 From: Lrd <13001933075@sina.cn> Date: Thu, 2 Jul 2026 15:13:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=89=8D=E6=B5=8B=E6=A8=A1=E6=9D=BF=E9=80=89?= =?UTF-8?q?=E5=A1=AB=E6=B7=BB=E5=8A=A0=E6=94=B6=E8=B5=B7=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- video-gen-app/src/pages/PreTest.tsx | 500 ++++++++++++++-------------- 1 file changed, 256 insertions(+), 244 deletions(-) diff --git a/video-gen-app/src/pages/PreTest.tsx b/video-gen-app/src/pages/PreTest.tsx index 089328b0..6f0c1509 100644 --- a/video-gen-app/src/pages/PreTest.tsx +++ b/video-gen-app/src/pages/PreTest.tsx @@ -1,5 +1,5 @@ import React, { useState, useEffect } from 'react'; -import { Table, Tag, Button, Typography, Space, Modal, Form, Input, Select, Cascader, App, Pagination } from 'antd'; +import { Table, Tag, Button, Typography, Space, Modal, Form, Input, Select, Cascader, App, Pagination, Collapse } from 'antd'; import { PlusOutlined, EditOutlined, FileTextOutlined, DeleteOutlined, EyeOutlined } from '@ant-design/icons'; import { getPreTestList, createPreTest, getArea, getPreTestDetail, updatePreTest, deletePreTest } from '../api'; @@ -143,6 +143,7 @@ const PreTest: React.FC = () => { const [modalMode, setModalMode] = useState<'create' | 'edit' | 'detail'>('create'); const [currentRecord, setCurrentRecord] = useState(null); const [form] = Form.useForm(); + const [expandOptional, setExpandOptional] = useState(false); const [submitLoading, setSubmitLoading] = useState(false); const [currentPage, setCurrentPage] = useState(1); const [pageSize, setPageSize] = useState(10); @@ -692,7 +693,7 @@ const PreTest: React.FC = () => { {modalMode === 'create' ? '新增前测模板' : modalMode === 'edit' ? '编辑前测模板' : '前测模板详情'}} + title={{modalMode === 'create' ? '新增前测模板(选填项如填写需准确填写)' : modalMode === 'edit' ? '编辑前测模板(选填项如填写需准确填写)' : '前测模板详情'}} open={modalOpen} onCancel={handleCloseModal} onOk={handleSubmit} @@ -743,257 +744,268 @@ const PreTest: React.FC = () => { /> - {platform !== 'LOCAL' && ( - - - - - - - - - - - - { + if (platform === 'AD') { + return field.name.startsWith('AD_'); + } else if (platform === 'QIANCHUAN') { + return field.name.startsWith('QC_'); + } else if (platform === 'LOCAL') { + return field.name.startsWith('LOCAL_'); + } + return true; + }).map(field => ({ + value: field.name, + label: ( + + {field.label} + {field.description && ( + + ({field.description}) + + )} + + ), + }))} + /> + + )} + +
+ parseFloat(e.target.value) || undefined} + > + + + + + + + + + + + + + + + + +
+ )} +
+ parseFloat(e.target.value) || undefined} + > + + + + parseFloat(e.target.value) || undefined} + > + + +
+ + + + - - - - - - - parseFloat(e.target.value) || undefined} - > - - - - - - - -