refactor(ui): align Campaigns page with consistency baseline (ui-consistency ticket 08)
Create-activity form switched to FormDrawer (width 920, footer submit), 20-row pagination threshold on campaign and sub-run tables. Report drawer stays a plain Drawer (read-only with export action). Timeline, exploration, and analysis interactions unchanged.
This commit is contained in:
parent
5077f088b1
commit
11b15908c7
@ -5,9 +5,9 @@
|
||||
**Blocked by:** 07
|
||||
|
||||
**Acceptance criteria:**
|
||||
- [ ] 创建/编辑活动表单统一 FormDrawer
|
||||
- [ ] 删除/取消活动 Popconfirm;探索派发等独特交互不变
|
||||
- [ ] 空态 Empty、20 行分页阈值
|
||||
- [ ] 文件体量显著下降(重复模式收敛到共享件),不强制目标行数
|
||||
- [ ] `tsc --noEmit` 通过
|
||||
- [x] 创建/编辑活动表单统一 FormDrawer(width 920 保留双栏布局;报告抽屉为只读展示+导出按钮,保留 Drawer)
|
||||
- [x] 删除/取消活动 Popconfirm;探索派发等独特交互不变(取消已有 Popconfirm,无删除入口)
|
||||
- [x] 空态 Empty、20 行分页阈值(活动表 + 报告子运行表)
|
||||
- [x] 文件体量:重复的抽屉页脚模式收敛到 FormDrawer(不强制目标行数)
|
||||
- [x] `tsc --noEmit` 通过
|
||||
- [ ] t480 走查:活动 CRUD + 时间线 + 探索区 + 报告 golden path
|
||||
|
||||
@ -11,6 +11,7 @@ import {
|
||||
RobotOutlined, SwapOutlined, CompassOutlined,
|
||||
} from '@ant-design/icons'
|
||||
import { Line, Bar } from '@ant-design/charts'
|
||||
import FormDrawer from '../components/FormDrawer'
|
||||
import PageWrapper from '../components/PageWrapper'
|
||||
import StatCard from '../components/StatCard'
|
||||
import {
|
||||
@ -698,7 +699,7 @@ export default function CampaignsPage() {
|
||||
loading={loading}
|
||||
dataSource={campaigns}
|
||||
columns={columns}
|
||||
pagination={false}
|
||||
pagination={campaigns.length > 20 ? { pageSize: 20, showTotal: (t) => `共 ${t} 个` } : false}
|
||||
expandable={{
|
||||
expandedRowKeys: expandedIds,
|
||||
onExpand: onExpandRow,
|
||||
@ -709,20 +710,14 @@ export default function CampaignsPage() {
|
||||
</div>
|
||||
|
||||
{/* 创建活动 */}
|
||||
<Drawer
|
||||
<FormDrawer
|
||||
title="新建评估活动"
|
||||
open={createOpen}
|
||||
onClose={() => setCreateOpen(false)}
|
||||
onSubmit={submitCreate}
|
||||
submitting={submitting}
|
||||
okText="创建并开始调度"
|
||||
width={920}
|
||||
destroyOnClose
|
||||
footer={
|
||||
<Space style={{ display: 'flex', justifyContent: 'flex-end' }}>
|
||||
<Button onClick={() => setCreateOpen(false)}>取消</Button>
|
||||
<Button type="primary" loading={submitting} onClick={submitCreate}>
|
||||
创建并开始调度
|
||||
</Button>
|
||||
</Space>
|
||||
}
|
||||
>
|
||||
<Form form={form} layout="vertical">
|
||||
<Row gutter={32}>
|
||||
@ -949,7 +944,7 @@ export default function CampaignsPage() {
|
||||
</Col>
|
||||
</Row>
|
||||
</Form>
|
||||
</Drawer>
|
||||
</FormDrawer>
|
||||
|
||||
{/* 周期报告 */}
|
||||
<Drawer
|
||||
@ -1080,7 +1075,7 @@ export default function CampaignsPage() {
|
||||
<Table
|
||||
rowKey="id"
|
||||
size="small"
|
||||
pagination={false}
|
||||
pagination={reportRuns.length > 20 ? { pageSize: 20, showTotal: (t) => `共 ${t} 个` } : false}
|
||||
dataSource={reportRuns}
|
||||
columns={runColumns}
|
||||
locale={{ emptyText: <Empty description="暂无子运行" /> }}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user