feat(qaops): 增加个人自然月用量与零记录人员明细

This commit is contained in:
姚章浩
2026-10-17 19:59:33 +08:00
parent 56b8cabed9
commit 9556db1ef0
18 changed files with 1248 additions and 10 deletions
+15 -1
View File
@@ -6,6 +6,7 @@ import type { QAQuery, QARecord, QARecordPage, QAStatus } from './qaOps'
import './qaOps.css'
import { QARegions } from './QARegions'
import { QAUsage } from './QAUsage'
import { QAMonthly } from './QAMonthly'
import { usageLabels } from './qaUsage'
interface ViewProps {
@@ -276,6 +277,7 @@ function initialDraft() {
export function QAOperations() {
const [view, setView] = useState<'records' | 'regions' | 'usage'>('records')
const [usageMode, setUsageMode] = useState<'regions' | 'monthly'>('regions')
const auth = useOptionalAuth()
const canRead = auth?.identity?.role === 'admin'
const [draft, setDraft] = useState(initialDraft)
@@ -427,7 +429,19 @@ export function QAOperations() {
区域使用
</button>
</nav>
{view === 'regions' ? (
{view === 'usage' ? (
<nav className="qa-region-tabs" aria-label="使用统计视图">
<button type="button" aria-pressed={usageMode === 'regions'} onClick={() => setUsageMode('regions')}>
区域汇总
</button>
<button type="button" aria-pressed={usageMode === 'monthly'} onClick={() => setUsageMode('monthly')}>
个人月明细
</button>
</nav>
) : null}
{view === 'usage' && usageMode === 'monthly' ? (
<QAMonthly />
) : view === 'regions' ? (
<QARegions />
) : (
<>