完善测试建表并统一前端格式

This commit is contained in:
yml2213
2026-07-14 01:32:14 +08:00
parent 2efcede800
commit 2ca6fd9306
36 changed files with 714 additions and 478 deletions
+15 -4
View File
@@ -13,7 +13,12 @@ export const AUDIT_ACTION_OPTIONS: AuditOption[] = [
// 用户
{ value: 'admin_user.freeze', label: '冻结用户', group: '用户', highRisk: true },
{ value: 'admin_user.unfreeze', label: '解冻用户', group: '用户' },
{ value: 'admin_user.set_deposit_free_quota', label: '设置免押额度', group: '用户', highRisk: true },
{
value: 'admin_user.set_deposit_free_quota',
label: '设置免押额度',
group: '用户',
highRisk: true,
},
{ value: 'admin_user.manual_realname', label: '人工实名', group: '用户', highRisk: true },
{ value: 'admin_user.revoke_realname', label: '撤销实名', group: '用户', highRisk: true },
{ value: 'admin_user.wallet_adjust', label: '调整用户余额', group: '用户', highRisk: true },
@@ -67,9 +72,15 @@ export const AUDIT_BIZ_TYPE_OPTIONS: AuditOption[] = [
{ value: 'admin_pickup', label: '提号' },
]
const actionLabelMap = Object.fromEntries(AUDIT_ACTION_OPTIONS.map(item => [item.value, item.label]))
const bizTypeLabelMap = Object.fromEntries(AUDIT_BIZ_TYPE_OPTIONS.map(item => [item.value, item.label]))
const highRiskActions = new Set(AUDIT_ACTION_OPTIONS.filter(item => item.highRisk).map(item => item.value))
const actionLabelMap = Object.fromEntries(
AUDIT_ACTION_OPTIONS.map(item => [item.value, item.label])
)
const bizTypeLabelMap = Object.fromEntries(
AUDIT_BIZ_TYPE_OPTIONS.map(item => [item.value, item.label])
)
const highRiskActions = new Set(
AUDIT_ACTION_OPTIONS.filter(item => item.highRisk).map(item => item.value)
)
/** 动作 code → 中文;未知 code 原样返回 */
export function auditActionLabel(action: string | undefined | null): string {
+3 -1
View File
@@ -161,7 +161,9 @@ export function readFinalSaleRatio(
export function hasAcceleratedSaleRatioInput(value: number | '' | null | undefined) {
const ratio = Number(value)
return value !== '' && value !== null && value !== undefined && Number.isFinite(ratio) && ratio > 0
return (
value !== '' && value !== null && value !== undefined && Number.isFinite(ratio) && ratio > 0
)
}
export function calculatePlatformPricing(options: {
@@ -58,9 +58,7 @@ export const systemConfigSelectOptions: Record<string, SystemConfigOption[]> = {
{ label: '5 天', value: '5' },
{ label: '7 天', value: '7' },
],
'integration.paddle_ocr_model': [
{ label: 'PaddleOCR-VL-1.6', value: 'PaddleOCR-VL-1.6' },
],
'integration.paddle_ocr_model': [{ label: 'PaddleOCR-VL-1.6', value: 'PaddleOCR-VL-1.6' }],
}
export function getSystemConfigSelectOptions(key: string) {