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
|
**Blocked by:** 07
|
||||||
|
|
||||||
**Acceptance criteria:**
|
**Acceptance criteria:**
|
||||||
- [ ] 创建/编辑活动表单统一 FormDrawer
|
- [x] 创建/编辑活动表单统一 FormDrawer(width 920 保留双栏布局;报告抽屉为只读展示+导出按钮,保留 Drawer)
|
||||||
- [ ] 删除/取消活动 Popconfirm;探索派发等独特交互不变
|
- [x] 删除/取消活动 Popconfirm;探索派发等独特交互不变(取消已有 Popconfirm,无删除入口)
|
||||||
- [ ] 空态 Empty、20 行分页阈值
|
- [x] 空态 Empty、20 行分页阈值(活动表 + 报告子运行表)
|
||||||
- [ ] 文件体量显著下降(重复模式收敛到共享件),不强制目标行数
|
- [x] 文件体量:重复的抽屉页脚模式收敛到 FormDrawer(不强制目标行数)
|
||||||
- [ ] `tsc --noEmit` 通过
|
- [x] `tsc --noEmit` 通过
|
||||||
- [ ] t480 走查:活动 CRUD + 时间线 + 探索区 + 报告 golden path
|
- [ ] t480 走查:活动 CRUD + 时间线 + 探索区 + 报告 golden path
|
||||||
|
|||||||
@ -11,6 +11,7 @@ import {
|
|||||||
RobotOutlined, SwapOutlined, CompassOutlined,
|
RobotOutlined, SwapOutlined, CompassOutlined,
|
||||||
} from '@ant-design/icons'
|
} from '@ant-design/icons'
|
||||||
import { Line, Bar } from '@ant-design/charts'
|
import { Line, Bar } from '@ant-design/charts'
|
||||||
|
import FormDrawer from '../components/FormDrawer'
|
||||||
import PageWrapper from '../components/PageWrapper'
|
import PageWrapper from '../components/PageWrapper'
|
||||||
import StatCard from '../components/StatCard'
|
import StatCard from '../components/StatCard'
|
||||||
import {
|
import {
|
||||||
@ -698,7 +699,7 @@ export default function CampaignsPage() {
|
|||||||
loading={loading}
|
loading={loading}
|
||||||
dataSource={campaigns}
|
dataSource={campaigns}
|
||||||
columns={columns}
|
columns={columns}
|
||||||
pagination={false}
|
pagination={campaigns.length > 20 ? { pageSize: 20, showTotal: (t) => `共 ${t} 个` } : false}
|
||||||
expandable={{
|
expandable={{
|
||||||
expandedRowKeys: expandedIds,
|
expandedRowKeys: expandedIds,
|
||||||
onExpand: onExpandRow,
|
onExpand: onExpandRow,
|
||||||
@ -709,20 +710,14 @@ export default function CampaignsPage() {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* 创建活动 */}
|
{/* 创建活动 */}
|
||||||
<Drawer
|
<FormDrawer
|
||||||
title="新建评估活动"
|
title="新建评估活动"
|
||||||
open={createOpen}
|
open={createOpen}
|
||||||
onClose={() => setCreateOpen(false)}
|
onClose={() => setCreateOpen(false)}
|
||||||
|
onSubmit={submitCreate}
|
||||||
|
submitting={submitting}
|
||||||
|
okText="创建并开始调度"
|
||||||
width={920}
|
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">
|
<Form form={form} layout="vertical">
|
||||||
<Row gutter={32}>
|
<Row gutter={32}>
|
||||||
@ -949,7 +944,7 @@ export default function CampaignsPage() {
|
|||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
</Form>
|
</Form>
|
||||||
</Drawer>
|
</FormDrawer>
|
||||||
|
|
||||||
{/* 周期报告 */}
|
{/* 周期报告 */}
|
||||||
<Drawer
|
<Drawer
|
||||||
@ -1080,7 +1075,7 @@ export default function CampaignsPage() {
|
|||||||
<Table
|
<Table
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
size="small"
|
size="small"
|
||||||
pagination={false}
|
pagination={reportRuns.length > 20 ? { pageSize: 20, showTotal: (t) => `共 ${t} 个` } : false}
|
||||||
dataSource={reportRuns}
|
dataSource={reportRuns}
|
||||||
columns={runColumns}
|
columns={runColumns}
|
||||||
locale={{ emptyText: <Empty description="暂无子运行" /> }}
|
locale={{ emptyText: <Empty description="暂无子运行" /> }}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user