32a95d09f0
CI/CD Pipeline / Check if frontend-only change (push) Has been skipped
CI/CD Pipeline / PR Build API Image (push) Has been skipped
CI/CD Pipeline / PR Build Web Image (push) Has been skipped
CI/CD Pipeline / PR Build Worker Image (push) Has been skipped
CI/CD Pipeline / Validate - Migration (alembic) (push) Successful in 1m49s
CI/CD Pipeline / Validate - Type Check (mypy) (push) Successful in 2m10s
CI/CD Pipeline / Build Production API Image (push) Has been skipped
CI/CD Pipeline / Build Production Web Image (push) Has been skipped
CI/CD Pipeline / Build Production Worker Image (push) Has been skipped
CI/CD Pipeline / Frontend Lint (push) Successful in 2m40s
CI/CD Pipeline / Build Staging Web Image (push) Successful in 2m48s
CI/CD Pipeline / Frontend Unit Tests (push) Successful in 1m17s
CI/CD Pipeline / Validate - Code Quality (push) Successful in 5m1s
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 5m10s
CI/CD Pipeline / Unit Tests (push) Failing after 5m58s
CI/CD Pipeline / Deploy Production (push) Has been skipped
CI/CD Pipeline / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Integration Tests (push) Successful in 2m33s
CI/CD Pipeline / Build Staging API Image (push) Successful in 17m18s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Has been cancelled
CI/CD Pipeline / Staging E2E Tests (push) Has been cancelled
CI/CD Pipeline / Staging API Integration Tests (push) Has been cancelled
CI/CD Pipeline / ACR Image Cleanup (push) Has been cancelled
CI/CD Pipeline / Canary Release to Production (push) Has been cancelled
68 lines
2.0 KiB
TypeScript
68 lines
2.0 KiB
TypeScript
import React from "react"
|
|
import { Modal as AntModal, Tag, Radio } from "antd"
|
|
|
|
/* ============================================================
|
|
* BatchMarkModal — 批量智能标记弹窗
|
|
* ============================================================ */
|
|
export type SmartViewType = "recommended" | "caution" | "high_risk"
|
|
|
|
export interface BatchMarkModalProps {
|
|
open: boolean
|
|
selectedCount: number
|
|
onCancel: () => void
|
|
onOk: () => void
|
|
smartView: SmartViewType
|
|
onSmartViewChange: (value: SmartViewType) => void
|
|
confirmLoading?: boolean
|
|
}
|
|
|
|
const BatchMarkModal: React.FC<BatchMarkModalProps> = ({
|
|
open,
|
|
selectedCount,
|
|
onCancel,
|
|
onOk,
|
|
smartView,
|
|
onSmartViewChange,
|
|
confirmLoading,
|
|
}) => (
|
|
<AntModal
|
|
title={`批量智能标记(${selectedCount} 个素材)`}
|
|
open={open}
|
|
onCancel={onCancel}
|
|
onOk={onOk}
|
|
confirmLoading={confirmLoading}
|
|
okText="确认标记"
|
|
cancelText="取消"
|
|
>
|
|
<div className="xx-batch-mark-modal">
|
|
<p className="xx-batch-mark-hint">将选中的 {selectedCount} 个素材标记为:</p>
|
|
<Radio.Group
|
|
value={smartView}
|
|
onChange={(e) => onSmartViewChange(e.target.value)}
|
|
className="xx-batch-mark-options"
|
|
>
|
|
<div className="xx-batch-mark-option">
|
|
<Radio value="recommended">
|
|
<Tag color="success">推荐</Tag>
|
|
<span className="xx-batch-mark-desc">质量优良,可直接用于生产</span>
|
|
</Radio>
|
|
</div>
|
|
<div className="xx-batch-mark-option">
|
|
<Radio value="caution">
|
|
<Tag color="warning">慎用</Tag>
|
|
<span className="xx-batch-mark-desc">存在一定问题,需人工审核后再使用</span>
|
|
</Radio>
|
|
</div>
|
|
<div className="xx-batch-mark-option">
|
|
<Radio value="high_risk">
|
|
<Tag color="error">高风险</Tag>
|
|
<span className="xx-batch-mark-desc">存在严重问题,不建议使用</span>
|
|
</Radio>
|
|
</div>
|
|
</Radio.Group>
|
|
</div>
|
|
</AntModal>
|
|
)
|
|
|
|
export default BatchMarkModal
|