资料管理空数据状态显示修改

This commit is contained in:
2026-10-10 09:58:22 +08:00
parent 16a18a49b9
commit 6d1a3c048b
2 changed files with 69 additions and 43 deletions
+12 -3
View File
@@ -532,6 +532,7 @@ onMounted(() => {
<div class="w-300px border rounded-md p-2">
<div class="scroll-left">
<NTree
class="h-100% flex flex-col"
block-line
:data="docList"
label-field="label"
@@ -544,7 +545,13 @@ onMounted(() => {
:on-update:expanded-keys="handleExpandKeys"
:on-update:selected-keys="handleSelectKeys"
:node-props="treeProps"
/>
>
<template #empty>
<div class="h-100% flex items-center justify-center">
<NEmpty description="暂无数据" class="text-xs"></NEmpty>
</div>
</template>
</NTree>
<NDropdown
:show="menuVisible"
:options="menuOptions"
@@ -574,7 +581,7 @@ onMounted(() => {
</div>
<NSpin :show="fileLoading" size="small">
<div class="scroll-right">
<div class="divide-y rounded-md border bg-white">
<div class="divide-y rounded-md border bg-white h-100%">
<div v-for="d in fileList" :key="d.name" class="flex flex-wrap items-center gap-3 px-2 py-2.5">
<Icon icon="akar-icons:file" class="size-16px" />
<div class="min-w-0 flex-1">
@@ -591,7 +598,9 @@ onMounted(() => {
<NButton type="primary" text class="hover:underline text-xs" @click="download(d)">下载</NButton>
</div>
</div>
<p v-if="fileList.length===0" class="text-xs text-slate-400 text-center py-5">暂无资料数据</p>
<div v-if="fileList.length===0" class="h-100% flex items-center justify-center">
<NEmpty description="暂无资料数据" class="text-xs"></NEmpty>
</div>
</div>
</div>
</NSpin>
+20 -3
View File
@@ -403,6 +403,7 @@ onMounted(async () => {
<div class="w-300px border rounded-md p-2">
<div class="scroll-left">
<NTree
class="h-100% flex flex-col"
block-line
:data="treeList"
label-field="label"
@@ -414,13 +415,20 @@ onMounted(async () => {
:cancelable="false"
:on-update:expanded-keys="handleExpandKeys"
:on-update:selected-keys="handleSelectKeys"
/>
>
<template #empty>
<div class="h-100% flex items-center justify-center">
<NEmpty description="暂无数据" class="text-xs"></NEmpty>
</div>
</template>
</NTree>
</div>
</div>
<!-- 右:归档包详情 -->
<div class="min-w-0 flex-1">
<NSpin :show="rightLoading" size="small">
<div v-if="rightDetails" class="rounded-md border col-span-2">
<template v-if="rightDetails">
<div class="rounded-md border col-span-2">
<div class="border-b p-3">
<div class="flex flex-wrap items-center gap-2">
<span class="text-sm font-semibold">{{ rightDetails.change_no }}</span>
@@ -463,7 +471,12 @@ onMounted(async () => {
</div>
</div>
</div>
<div v-else class="rounded-md border text-center text-xs text-slate-400 py-5">暂无归档包详情数据</div>
</template>
<div v-else class="h-100% rounded-md border scroll-empty">
<div class="h-100% flex items-center justify-center">
<NEmpty description="暂无归档包详情数据" class="text-xs"></NEmpty>
</div>
</div>
</NSpin>
</div>
</div>
@@ -508,4 +521,8 @@ onMounted(async () => {
height: calc(100vh - 416px);
overflow-y: auto;
}
.scroll-empty {
height: calc(100vh - 281px);
overflow-y: auto;
}
</style>