资料档案库右侧文件列表完成
This commit is contained in:
@@ -123,7 +123,7 @@ const LIB_ORGS: { org: string; groups: LibGroup[] }[] = [
|
||||
];
|
||||
const openOrgs = ref<Record<string, boolean>>({ 一车间: true });
|
||||
const libSel = ref({ org: "一车间", cat: "工艺", label: "操作规程" });
|
||||
const libCur = computed(() => LIB_ORGS.find((o) => o.org === libSel.value.org)?.groups.find((g) => g.cat === libSel.value.cat)?.folders.find((f) => f.label === libSel.value.label));
|
||||
const libCur = computed(() => docList.value.find((o) => o.org_name === libSel.value.org)?.categories.find((g) => g.category === libSel.value.cat)?.folders.find((f) => f.folder === libSel.value.label));
|
||||
|
||||
const loading = ref<boolean>(false);
|
||||
const rightLoading = ref<boolean>(false);
|
||||
@@ -234,17 +234,17 @@ onMounted(() => {
|
||||
{{ libSel.cat }}
|
||||
<Icon icon="formkit:right" class="size-12px" />
|
||||
<span class="font-medium text-slate-600">{{ libSel.label }}</span>
|
||||
<span class="ml-auto">共 {{ libCur?.docs.length ?? 0 }} 份 · 版本受控</span>
|
||||
<span class="ml-auto">共 {{ libCur?.count ?? 0 }} 份 · 版本受控</span>
|
||||
</div>
|
||||
<div class="scroll-right">
|
||||
<div class="divide-y rounded-lg border bg-white">
|
||||
<div v-for="d in libCur?.docs ?? []" :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">
|
||||
<div class="truncate text-sm">{{ d.name }}</div>
|
||||
<div class="truncate text-sm">{{ d.doc_name }}</div>
|
||||
<div class="mt-0.5 flex flex-wrap items-center gap-x-2 text-xs text-slate-500">
|
||||
<NTag size="small" type="info" class="text-[10px]">版本 {{ d.ver }}</NTag>
|
||||
<span>更新 {{ d.date }}</span>
|
||||
<NTag size="small" type="info" class="text-[10px]">版本 {{ d.version }}</NTag>
|
||||
<span>更新 {{ d?.updated_at?.slice(0, 10) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex shrink-0 gap-3 text-xs">
|
||||
|
||||
Reference in New Issue
Block a user