diff --git a/openspec/changes/remove-legacy-asset-operation-logs/specs/asset-audit-log-navigation/spec.md b/openspec/changes/remove-legacy-asset-operation-logs/specs/asset-audit-log-navigation/spec.md index 7b5190b..88b24eb 100644 --- a/openspec/changes/remove-legacy-asset-operation-logs/specs/asset-audit-log-navigation/spec.md +++ b/openspec/changes/remove-legacy-asset-operation-logs/specs/asset-audit-log-navigation/spec.md @@ -2,8 +2,7 @@ ### Requirement: 旧资产操作审计日志入口 -**Reason**: 旧资产操作审计日志交互已由当前审计调查能力替代,页面不再提供重复入口。 -**Migration**: 需要审计调查的用户通过当前审计中心和资源审计时间线访问记录。 +**Reason**: 旧资产操作审计日志交互已由当前审计调查能力替代,页面不再提供重复入口。 **Migration**: 需要审计调查的用户通过当前审计中心和资源审计时间线访问记录。 #### Scenario: 查看 IoT 卡、设备或资产信息 diff --git a/openspec/changes/update-export-task-scene-pages/design.md b/openspec/changes/update-export-task-scene-pages/design.md index be66852..c1ea89e 100644 --- a/openspec/changes/update-export-task-scene-pages/design.md +++ b/openspec/changes/update-export-task-scene-pages/design.md @@ -32,11 +32,11 @@ - Decision: 业务列表创建导出任务按钮继续使用来源业务权限,默认建议如下。 - Rationale: 创建导出任务属于来源业务列表能力,不应因为拥有某个导出任务管理页面权限就获得业务列表导出入口。 -| 入口 | 创建导出任务权限 | scene | -| --- | --- | --- | -| 设备管理 | `devices:export` | `device` | +| 入口 | 创建导出任务权限 | scene | +| ---------- | ----------------- | ---------- | +| 设备管理 | `devices:export` | `device` | | IOT 卡管理 | `iot_card:export` | `iot_card` | -| 订单列表 | `orders:export` | `order` | +| 订单列表 | `orders:export` | `order` | - Decision: 详情页可继续复用同一组件,但必须根据任务场景或来源页面使用对应场景的详情、下载、取消权限。 - Rationale: 详情页面本身也包含下载和取消按钮,若继续使用通用权限会绕过三个列表页面的按钮隔离要求。 diff --git a/scripts/tests/agentRechargeService.test.mjs b/scripts/tests/agentRechargeService.test.mjs index 6010096..425f053 100644 --- a/scripts/tests/agentRechargeService.test.mjs +++ b/scripts/tests/agentRechargeService.test.mjs @@ -27,7 +27,7 @@ test('agent recharge rejection posts the rejection reason to the order rejection code: 0, data: { methods: ['wechat', 'alipay'], - min_amount: 10000, + min_amount: 10, max_amount: 100000000 } }) diff --git a/src/components/business/SeriesGrantPackageDialog.vue b/src/components/business/SeriesGrantPackageDialog.vue index 9a22a53..5c11d0b 100644 --- a/src/components/business/SeriesGrantPackageDialog.vue +++ b/src/components/business/SeriesGrantPackageDialog.vue @@ -279,8 +279,8 @@ } .package-config-field-label { - color: var(--el-text-color-secondary); font-size: 13px; + color: var(--el-text-color-secondary); white-space: nowrap; } diff --git a/src/components/business/VoucherUpload.vue b/src/components/business/VoucherUpload.vue index 0634682..f08d34c 100644 --- a/src/components/business/VoucherUpload.vue +++ b/src/components/business/VoucherUpload.vue @@ -57,8 +57,8 @@ import { Close, Document, UploadFilled } from '@element-plus/icons-vue' import type { UploadFile, UploadInstance, UploadRawFile } from 'element-plus' import { StorageService } from '@/api/modules' - import type { RefundAttachment } from '@/types/api/refund' - import type { FilePurpose } from '@/api/modules/storage' + import type { RefundAttachment } from '@/types/api/refund' + import type { FilePurpose } from '@/api/modules/storage' interface Props { modelValue?: string[] | string @@ -202,7 +202,10 @@ if (props.singleColumnCsv) { const content = await file.text() - const rows = content.replace(/^\uFEFF/, '').split(/\r?\n/).filter(Boolean) + const rows = content + .replace(/^\uFEFF/, '') + .split(/\r?\n/) + .filter(Boolean) if (props.maxCsvRows > 0 && Math.max(rows.length - 1, 0) > props.maxCsvRows) { ElMessage.warning(`CSV 数据行不能超过 ${props.maxCsvRows} 行`) removeUploadFile(uploadFile) @@ -250,7 +253,7 @@ const uploadUrlRes = await StorageService.getUploadUrl({ file_name: file.name, content_type: contentType, - purpose: props.purpose + purpose: props.purpose }) if (uploadUrlRes.code !== 0) { diff --git a/src/components/business/audit/AuditInvestigationDrawer.vue b/src/components/business/audit/AuditInvestigationDrawer.vue index 254e94b..f2fc7ff 100644 --- a/src/components/business/audit/AuditInvestigationDrawer.vue +++ b/src/components/business/audit/AuditInvestigationDrawer.vue @@ -928,8 +928,8 @@ .integration-hero__result { display: grid; - justify-items: end; gap: 5px; + justify-items: end; text-align: right; } @@ -1008,8 +1008,8 @@ } .integration-hero { - align-items: flex-start; flex-direction: column; + align-items: flex-start; } .integration-hero__result { diff --git a/src/components/core/layouts/art-header-bar/index.vue b/src/components/core/layouts/art-header-bar/index.vue index 0f4c68c..c51350b 100644 --- a/src/components/core/layouts/art-header-bar/index.vue +++ b/src/components/core/layouts/art-header-bar/index.vue @@ -65,10 +65,7 @@ -
+
{{ formattedUnreadCount }} diff --git a/src/types/auto-imports.d.ts b/src/types/auto-imports.d.ts index 5d1eb79..66ef040 100644 --- a/src/types/auto-imports.d.ts +++ b/src/types/auto-imports.d.ts @@ -8,8 +8,8 @@ export {} declare global { const EffectScope: typeof import('vue')['EffectScope'] const ElButton: (typeof import('element-plus/es'))['ElButton'] - const ElMessage: typeof import('element-plus/es')['ElMessage'] - const ElMessageBox: typeof import('element-plus/es')['ElMessageBox'] + const ElMessage: (typeof import('element-plus/es'))['ElMessage'] + const ElMessageBox: (typeof import('element-plus/es'))['ElMessageBox'] const acceptHMRUpdate: typeof import('pinia')['acceptHMRUpdate'] const asyncComputed: typeof import('@vueuse/core')['asyncComputed'] const autoResetRef: typeof import('@vueuse/core')['autoResetRef'] diff --git a/src/utils/business/apiError.ts b/src/utils/business/apiError.ts index bbb0129..3e3a27c 100644 --- a/src/utils/business/apiError.ts +++ b/src/utils/business/apiError.ts @@ -1,6 +1,13 @@ import axios from 'axios' -export type ApiErrorKind = 'auth' | 'forbidden' | 'validation' | 'conflict' | 'timeout' | 'server' | 'unknown' +export type ApiErrorKind = + | 'auth' + | 'forbidden' + | 'validation' + | 'conflict' + | 'timeout' + | 'server' + | 'unknown' export interface NormalizedApiError { kind: ApiErrorKind @@ -20,12 +27,59 @@ export const normalizeApiError = (error: unknown): NormalizedApiError => { const timeout = axios.isAxiosError(error) && error.code === 'ECONNABORTED' if (timeout) { - return { kind: 'timeout', status, code, message: '请求超时,结果可能未知,请刷新确认', unknownResult: true } + return { + kind: 'timeout', + status, + code, + message: '请求超时,结果可能未知,请刷新确认', + unknownResult: true + } + } + if (status === 401 || code === 401) + return { + kind: 'auth', + status, + code, + message: '登录状态已失效,请重新登录', + unknownResult: false + } + if (status === 403) + return { + kind: 'forbidden', + status, + code, + message: '没有执行此操作的权限', + unknownResult: false + } + if (status === 400) + return { + kind: 'validation', + status, + code, + message: backendMessage || '请求参数或业务条件不符合要求', + unknownResult: false + } + if (status === 409) + return { + kind: 'conflict', + status, + code, + message: backendMessage || '数据已发生变化,请刷新后重试', + unknownResult: false + } + if (status && status >= 500) + return { + kind: 'server', + status, + code, + message: '服务器处理失败,请稍后重试', + unknownResult: false + } + return { + kind: 'unknown', + status, + code, + message: backendMessage || '操作失败,请稍后重试', + unknownResult: false } - if (status === 401 || code === 401) return { kind: 'auth', status, code, message: '登录状态已失效,请重新登录', unknownResult: false } - if (status === 403) return { kind: 'forbidden', status, code, message: '没有执行此操作的权限', unknownResult: false } - if (status === 400) return { kind: 'validation', status, code, message: backendMessage || '请求参数或业务条件不符合要求', unknownResult: false } - if (status === 409) return { kind: 'conflict', status, code, message: backendMessage || '数据已发生变化,请刷新后重试', unknownResult: false } - if (status && status >= 500) return { kind: 'server', status, code, message: '服务器处理失败,请稍后重试', unknownResult: false } - return { kind: 'unknown', status, code, message: backendMessage || '操作失败,请稍后重试', unknownResult: false } } diff --git a/src/utils/business/approvalSummary.ts b/src/utils/business/approvalSummary.ts index 075bc29..97f8711 100644 --- a/src/utils/business/approvalSummary.ts +++ b/src/utils/business/approvalSummary.ts @@ -17,7 +17,9 @@ export const getApprovalStatusText = (summary: ApprovalSummary): string => { summary.approval_provider === 'wecom' || summary.approval_instance_id ) { - return summary.approval_status_name || approvalStatusNames[Number(summary.approval_status)] || '-' + return ( + summary.approval_status_name || approvalStatusNames[Number(summary.approval_status)] || '-' + ) } return '-' } @@ -27,7 +29,8 @@ export const getCurrentApproverSummaryText = (summary: ApprovalSummary): string summary.approval_source !== 'wecom' && summary.approval_provider !== 'wecom' && !summary.approval_instance_id - ) return '-' + ) + return '-' return summary.current_approver_summary || '-' } diff --git a/src/utils/business/paymentConfig.ts b/src/utils/business/paymentConfig.ts index 8ef49f2..31a664f 100644 --- a/src/utils/business/paymentConfig.ts +++ b/src/utils/business/paymentConfig.ts @@ -25,7 +25,10 @@ export const getPaymentMerchantId = ( } export const getPaymentNotifyUrl = ( - config: Pick + config: Pick< + PaymentSettings, + 'provider_type' | 'wx_notify_url' | 'fy_notify_url' | 'ali_notify_url' + > ): string => { if (config.provider_type === 'wechat' || config.provider_type === 'wechat_v2') { return config.wx_notify_url || '-' diff --git a/src/views/account-management/account/index.vue b/src/views/account-management/account/index.vue index b9294d2..f0841c4 100644 --- a/src/views/account-management/account/index.vue +++ b/src/views/account-management/account/index.vue @@ -1,3 +1,4 @@ +