所有页面没有数据时显示内容修改

This commit is contained in:
2026-10-08 14:12:54 +08:00
parent 4ab213e396
commit a26075d61b
12 changed files with 60 additions and 24 deletions
+3 -1
View File
@@ -527,7 +527,9 @@ onMounted(async () => {
</div>
</div>
</div>
<div v-if="list.length === 0" class="rounded-lg border border-dashed bg-white py-12 text-center text-sm text-slate-400">当前筛选条件下暂无变更记录</div>
<div v-if="list.length === 0" class="h-100% flex items-center justify-center">
<NEmpty description="暂无数据"></NEmpty>
</div>
</div>
<div class="flex justify-end mt-3">
<NPagination
+3
View File
@@ -295,6 +295,9 @@ onMounted(() => {
<div class="h-full rounded-full" :style="{ width: `${(a.avg_days / a.total) * 100}%`, background: a.avg_days > 2 ? themeStore.otherColor.error : themeStore.themeColor }"></div>
</div>
</div>
<div v-if="deptStatistics?.approver_time?.length === 0" class="h-100% flex items-center justify-center">
<NEmpty description="暂无数据" class="!text-xs"></NEmpty>
</div>
</div>
</NCard>
</NGi>
+5 -3
View File
@@ -214,7 +214,7 @@ onMounted(async () => {
</NButton>
</div>
<div class="scroll">
<div class="space-y-3 px-4 pb-3">
<div v-if="list.length" class="space-y-3 px-4 pb-3">
<div v-for="(s, i) in list" :key="`${s.cid ?? 'x'}-${i}`" class="flex flex-wrap items-center gap-3 rounded-lg border px-4 py-3">
<div class="min-w-0 flex-1">
<div class="flex flex-wrap items-center gap-2">
@@ -345,8 +345,10 @@ onMounted(async () => {
<NButton ghost size="small" class="text-xs" @click="jumpTo(s)">查看变更</NButton>
<NButton size="small" type="primary" class="text-xs" @click="viewAnalysis(s)">查看分析记录</NButton>
</div>
<div v-if="list.length === 0" class="py-6 text-center text-xs text-slate-400">当前筛选条件下无新增高风险场景</div>
</div>
</div>
<div v-else class="h-100% flex items-center justify-center">
<NEmpty description="暂无数据"></NEmpty>
</div>
</div>
<div class="flex justify-end mt-3 px-4 py-2 border-t">
<NPagination
+4 -4
View File
@@ -286,10 +286,7 @@ onMounted(() => {
</span>
</div>
<div class="space-y-2 scroll">
<div class="flex flex-col gap-3">
<div v-if="list.length===0" class="text-center text-slate-400">
暂无数据
</div>
<div v-if="list.length" class="flex flex-col gap-3">
<div
class="border border-slate-200 p-4"
:style="{ borderRadius: themeStore.themeRadius + 'px' }"
@@ -430,6 +427,9 @@ onMounted(() => {
</div>
</div>
</div>
<div v-else class="h-100% flex items-center justify-center">
<NEmpty description="暂无数据"></NEmpty>
</div>
</div>
<!-- 进度弹框 -->
<NDrawer v-model:show="progressDrawer" :width="502" placement="right">
+3 -1
View File
@@ -197,7 +197,9 @@ onMounted(() => {
<NEmpty description="暂无数据"></NEmpty>
</div>
</div>
<div v-else class="text-xs text-slate-400 text-center border rounded-md py-5">暂无数据</div>
<div v-else class="h-100% flex items-center justify-center">
<NEmpty description="暂无数据"></NEmpty>
</div>
</div>
<div class="flex justify-end mt-3">
<NPagination
+6 -2
View File
@@ -161,7 +161,9 @@ onMounted(() => {
<div class="h-full rounded-full" :class="e.avg_days > hourToDay(homeData?.my_stats?.sign_timely_hours || 0) ? 'bg-[var(--error-color)]' : 'bg-[var(--theme-color)]'" :style="{ width: `${Math.min(100, (e.avg_days / e.total) * 100)}%` }"></div>
</div>
</div>
<p v-if="homeData?.approver_time?.length===0" class="text-xs text-slate-400 text-center py-3">暂无数据</p>
<div v-if="homeData?.approver_time?.length === 0" class="h-100% flex items-center justify-center">
<NEmpty description="暂无数据" class="!text-xs"></NEmpty>
</div>
<div>
<div class="mb-1 flex items-center justify-between text-xs">
<span class="text-slate-600">考核目标</span>
@@ -208,7 +210,9 @@ onMounted(() => {
</div>
<p class="text-[11px] text-slate-400">更多高风险场景与分析记录见「高风险」页</p>
</div>
<p v-else class="text-center text-xs text-slate-400">暂无高风险在办</p>
<div v-else class="h-100% flex items-center justify-center">
<NEmpty description="暂无数据" class="!text-xs"></NEmpty>
</div>
</div>
</NCard>
</NGi>
+15 -3
View File
@@ -170,7 +170,7 @@ onMounted(() => {
<NCard :bordered="true" size="small" :content-style="{padding: 0}" :style="{ borderRadius: themeStore.themeRadius + 'px', height: '100%' }">
<p class=" text-base font-semibold border-b border-slate-100 p-3">各车间变更数量({{dateLabel}})</p>
<div class="py-3 px-4">
<ColumnChart v-if="homeData" :data="homeData?.workshop_counts?.items || []" />
<ColumnChart v-if="homeData" :data="homeData?.workshop_counts?.items || []" />
</div>
</NCard>
</NGi>
@@ -214,7 +214,11 @@ onMounted(() => {
</thead>
<tbody>
<tr v-if="homeData?.approver_eff?.rows?.length===0">
<td colspan="4" class="text-center text-xs text-slate-400 py-3">暂无数据</td>
<td colspan="4">
<div class="h-100% flex items-center justify-center py-3">
<NEmpty description="暂无数据" class="!text-xs"></NEmpty>
</div>
</td>
</tr>
<tr v-for="r in homeData?.approver_eff?.rows || []" :key="r.p" class="border-b last:border-0">
<td class="py-2">
@@ -296,6 +300,9 @@ onMounted(() => {
<NButton size="small" class="text-[11px]" @click="jumpTo('details_index',r.change_id)">查看</NButton>
</span>
</div>
<div v-if="homeData?.accept_detail?.length===0" class="h-100% flex items-center justify-center py-3">
<NEmpty description="暂无数据" class="!text-xs"></NEmpty>
</div>
</div>
</div>
</div>
@@ -440,6 +447,9 @@ onMounted(() => {
<span class="w-12 shrink-0 text-right text-xs font-bold text-slate-800">{{ e.days }} 天</span>
</NProgress>
</div>
<div v-if="homeData?.dept_approval_days?.length===0" class="h-100% flex items-center justify-center py-3">
<NEmpty description="暂无数据" class="!text-xs"></NEmpty>
</div>
</div>
</div>
</NCard>
@@ -536,7 +546,9 @@ onMounted(() => {
<span class="w-12 shrink-0 text-right text-xs font-bold text-slate-800">{{ r.count }} 起</span>
</NProgress>
</div>
<div class="text-[11px] text-slate-400">可用于申请端填报质量改进:TOP2 理由已纳入 AI 预识别检查项</div>
<div v-if="!homeData?.reject?.reasons || homeData?.reject?.reasons?.length===0" class="h-100% flex items-center justify-center py-3">
<NEmpty description="暂无数据" class="!text-xs"></NEmpty>
</div>
</div>
</div>
</NCard>
+3
View File
@@ -239,6 +239,9 @@ onMounted(() => {
<NTag size="small" type="error">超期 {{ o.overdue_days }} 天</NTag>
<NButton size="small" ghost class="text-xs" :disabled="btnLoading" @click="handleReminder(o.change_id)">催办</NButton>
</div>
<div v-if="homeData?.overdue_list?.length===0" class="h-100% flex items-center justify-center py-3">
<NEmpty description="暂无数据" class="!text-xs"></NEmpty>
</div>
</div>
</NCard>
</NGi>
+6 -2
View File
@@ -161,7 +161,9 @@ onMounted(() => {
<div class="h-full rounded-full" :class="e.avg_days > hourToDay(homeData?.my_stats?.sign_timely_hours || 0) ? 'bg-[var(--error-color)]' : 'bg-[var(--theme-color)]'" :style="{ width: `${Math.min(100, (e.avg_days / e.total) * 100)}%` }"></div>
</div>
</div>
<p v-if="homeData?.approver_time?.length===0" class="text-xs text-slate-400 text-center py-3">暂无数据</p>
<div v-if="homeData?.approver_time?.length === 0" class="h-100% flex items-center justify-center">
<NEmpty description="暂无数据" class="!text-xs"></NEmpty>
</div>
<div>
<div class="mb-1 flex items-center justify-between text-xs">
<span class="text-slate-600">考核目标</span>
@@ -208,7 +210,9 @@ onMounted(() => {
</div>
<p class="text-[11px] text-slate-400">更多高风险场景与分析记录见「高风险」页</p>
</div>
<p v-else class="text-center text-xs text-slate-400">暂无高风险在办</p>
<div v-else class="h-100% flex items-center justify-center">
<NEmpty description="暂无数据" class="!text-xs"></NEmpty>
</div>
</div>
</NCard>
</NGi>
+5 -1
View File
@@ -308,7 +308,11 @@ onMounted(() => {
</thead>
<tbody>
<tr v-if="homeData?.invest?.items?.length===0">
<td colspan="6" class="text-center text-xs !text-slate-400">暂无数据</td>
<td colspan="6">
<div class="h-100% flex items-center justify-center py-3">
<NEmpty description="暂无数据" class="!text-xs"></NEmpty>
</div>
</td>
</tr>
<tr v-for="row in homeData?.invest?.items || []" :key="row.change_id">
<td>