后管(四面9分批次): 裸提示 92→0、裸 confirm 24→0 且逐处 await、失败态可见并真能重试
- ElMessage.error 全收进 showAdminFeedback(例外清单 CAP=0,唯一保留的裸调用是出口本体); window.confirm 24 处全部改成 await 的 openAdminConfirm(逐处核过所在函数本就 async, 不存在"点了确认不执行"的异步断层)。 - 新增 load-failure-model + LoadFailureBar:22/23 个取数页有失败态与真重试 (只有"知道了"清条不算过),例外仅登录页。 - DedupeRegistryPage / DuplicateCheckPage 补 onUnmounted,并加全树定时器/监听配对判据。 - 去重页那处"能点但后端 403":读侧认 wholeCompany、写侧只认 groupIds/userIds 的不对称 本轮没动后端(前端拿不到与写侧同集合的 groupIds,按它置灰会误伤同事名下真能改的行=静默删功能); 先修更实在的一半——403 的中文原因此前整段丢失,现在走统一文案到界面。 - 验收:node --test 1,818 例 0 红、npx vue-tsc --noEmit rc=0;5 支新判据 26 例。
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, onMounted, ref, watch } from 'vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
|
||||
import OldPagination from '@/components/OldPagination.vue'
|
||||
import { orderedPair, todayDateInput } from '@/utils/datetime'
|
||||
import {
|
||||
@@ -10,6 +10,8 @@ import {
|
||||
import type { GroupOption } from '@/api/user-secrets'
|
||||
import { useAdminSessionStore } from '@/stores/admin-session'
|
||||
import { useCompanyTabStore } from '@/stores/company-tab'
|
||||
import { showAdminFeedback } from '@/components/admin-feedback-ui'
|
||||
import LoadFailureBar from '@/components/LoadFailureBar.vue'
|
||||
|
||||
const session = useAdminSessionStore()
|
||||
const companyTab = useCompanyTabStore()
|
||||
@@ -17,6 +19,7 @@ const companyTab = useCompanyTabStore()
|
||||
const isSuperAdmin = computed(() => session.isSuperAdmin)
|
||||
|
||||
const loading = ref(false)
|
||||
const loadFailure = ref('')
|
||||
const rows = ref<AdminUserSecretUsageRow[]>([])
|
||||
const total = ref(0)
|
||||
const page = ref(1)
|
||||
@@ -46,6 +49,7 @@ function formatCount(value: number | undefined) {
|
||||
|
||||
async function load() {
|
||||
loading.value = true
|
||||
loadFailure.value = ''
|
||||
try {
|
||||
const result = await fetchUserSecretUsage({
|
||||
startDate: startDate.value || undefined,
|
||||
@@ -66,7 +70,8 @@ async function load() {
|
||||
proxyCalls: Number(result?.proxyCalls || 0),
|
||||
}
|
||||
} catch (error) {
|
||||
ElMessage.error(error instanceof Error ? error.message : '加载失败')
|
||||
loadFailure.value = error instanceof Error ? error.message : '加载失败'
|
||||
showAdminFeedback(loadFailure.value, 'error')
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
@@ -160,6 +165,7 @@ onMounted(load)
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<LoadFailureBar v-if="loadFailure" :message="loadFailure" @retry="load" />
|
||||
<div class="usage-table-scroll">
|
||||
<table>
|
||||
<thead>
|
||||
|
||||
Reference in New Issue
Block a user