226 lines
5.4 KiB
Vue
226 lines
5.4 KiB
Vue
<!-- 采集协议单管理(协议单 / 缴费 / 样本接收 / 入库 / 储存证 / 满月待办) -->
|
||
<template>
|
||
<div class="page-container">
|
||
<section class="panel">
|
||
<div
|
||
class="panel-entity-switch panel-entity-switch--multi"
|
||
role="tablist"
|
||
aria-label="视图类型"
|
||
>
|
||
<button
|
||
v-for="item in entityTabs"
|
||
:key="item.key"
|
||
type="button"
|
||
class="entity-switch-card"
|
||
:class="{ 'is-active': activeTab === item.key }"
|
||
role="tab"
|
||
:aria-selected="activeTab === item.key"
|
||
@click="activeTab = item.key"
|
||
>
|
||
<span class="entity-switch-card__icon"
|
||
><el-icon><component :is="item.icon" /></el-icon
|
||
></span>
|
||
<span class="entity-switch-card__main">
|
||
<span class="entity-switch-card__title">{{ item.title }}</span>
|
||
<span class="entity-switch-card__desc">{{ item.desc }}</span>
|
||
</span>
|
||
</button>
|
||
</div>
|
||
|
||
<ProtocolAuditTab v-if="activeTab === 'protocol'" />
|
||
<PaymentInfoTab v-else-if="activeTab === 'payment-info'" />
|
||
<SampleReceptionInfoTab v-else-if="activeTab === 'sample-reception'" />
|
||
<StorageEntryInfoTab v-else-if="activeTab === 'storage-entry'" />
|
||
<StorageCertTab v-else-if="activeTab === 'storage-cert'" />
|
||
<FullmoonTodoTab v-else-if="activeTab === 'fullmoon-todo'" />
|
||
</section>
|
||
</div>
|
||
</template>
|
||
|
||
<script setup lang="ts">
|
||
import type { Component } from 'vue'
|
||
import { Document, Wallet, Box, FolderOpened, Medal, Calendar } from '@element-plus/icons-vue'
|
||
import ProtocolAuditTab from './ProtocolAuditTab.vue'
|
||
import PaymentInfoTab from './PaymentInfoTab.vue'
|
||
import SampleReceptionInfoTab from './SampleReceptionInfoTab.vue'
|
||
import StorageEntryInfoTab from './StorageEntryInfoTab.vue'
|
||
import StorageCertTab from './StorageCertTab.vue'
|
||
import FullmoonTodoTab from './FullmoonTodoTab.vue'
|
||
|
||
defineOptions({ name: 'CellStorageProtocolAudit' })
|
||
|
||
const VALID_TABS = [
|
||
'protocol',
|
||
'payment-info',
|
||
'sample-reception',
|
||
'storage-entry',
|
||
'storage-cert',
|
||
'fullmoon-todo'
|
||
] as const
|
||
|
||
type EntityTabKey = (typeof VALID_TABS)[number]
|
||
|
||
const entityTabs: Array<{
|
||
key: EntityTabKey
|
||
title: string
|
||
desc: string
|
||
icon: Component
|
||
}> = [
|
||
{
|
||
key: 'protocol',
|
||
title: '协议单管理',
|
||
desc: '协议审核与状态维护',
|
||
icon: Document
|
||
},
|
||
{
|
||
key: 'payment-info',
|
||
title: '缴费信息',
|
||
desc: '缴费计划与到账查询',
|
||
icon: Wallet
|
||
},
|
||
{
|
||
key: 'sample-reception',
|
||
title: '样本接收信息',
|
||
desc: '接收结论与短信通知',
|
||
icon: Box
|
||
},
|
||
{
|
||
key: 'storage-entry',
|
||
title: '样本入库信息',
|
||
desc: '样本入库记录查询',
|
||
icon: FolderOpened
|
||
},
|
||
{
|
||
key: 'storage-cert',
|
||
title: '储存证管理',
|
||
desc: '储存证开具与管理',
|
||
icon: Medal
|
||
},
|
||
{
|
||
key: 'fullmoon-todo',
|
||
title: '满月待办管理',
|
||
desc: '满月保险待办办理',
|
||
icon: Calendar
|
||
}
|
||
]
|
||
|
||
const route = useRoute()
|
||
const activeTab = ref<EntityTabKey>('protocol')
|
||
|
||
onMounted(() => {
|
||
const tab = String(route.query.tab || '')
|
||
if (VALID_TABS.includes(tab as EntityTabKey)) {
|
||
activeTab.value = tab as EntityTabKey
|
||
}
|
||
})
|
||
</script>
|
||
|
||
<style scoped lang="scss">
|
||
.panel-entity-switch {
|
||
display: flex;
|
||
justify-content: center;
|
||
gap: 12px;
|
||
padding: 16px 16px 12px;
|
||
}
|
||
|
||
.panel-entity-switch--multi {
|
||
flex-wrap: wrap;
|
||
gap: 10px;
|
||
|
||
.entity-switch-card {
|
||
flex: 0 1 168px;
|
||
min-width: 152px;
|
||
max-width: 180px;
|
||
padding: 10px 12px;
|
||
gap: 8px;
|
||
}
|
||
|
||
.entity-switch-card__icon {
|
||
width: 32px;
|
||
height: 32px;
|
||
font-size: 17px;
|
||
}
|
||
|
||
.entity-switch-card__title {
|
||
font-size: 13px;
|
||
}
|
||
|
||
.entity-switch-card__desc {
|
||
font-size: 11px;
|
||
line-height: 1.35;
|
||
}
|
||
}
|
||
|
||
.entity-switch-card {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 12px;
|
||
min-width: 220px;
|
||
max-width: 280px;
|
||
flex: 1;
|
||
padding: 14px 18px;
|
||
border: 1px solid var(--mint-border, #d9e8e2);
|
||
border-radius: 10px;
|
||
background: var(--surface, #fff);
|
||
cursor: pointer;
|
||
text-align: left;
|
||
transition:
|
||
border-color 0.2s ease,
|
||
background-color 0.2s ease,
|
||
box-shadow 0.2s ease;
|
||
|
||
&:hover:not(.is-active) {
|
||
border-color: #a7f3d0;
|
||
background: #f8fafc;
|
||
}
|
||
|
||
&.is-active {
|
||
border-color: var(--primary, #10b981);
|
||
background: var(--primary-bg, #ecfdf5);
|
||
box-shadow: 0 0 0 1px rgb(16 185 129 / 12%);
|
||
}
|
||
}
|
||
|
||
.entity-switch-card__icon {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
width: 40px;
|
||
height: 40px;
|
||
flex-shrink: 0;
|
||
border-radius: 8px;
|
||
background: #f1f5f9;
|
||
color: #64748b;
|
||
font-size: 20px;
|
||
|
||
.entity-switch-card.is-active & {
|
||
background: #fff;
|
||
color: var(--primary-dark, #059669);
|
||
}
|
||
}
|
||
|
||
.entity-switch-card__main {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 2px;
|
||
min-width: 0;
|
||
}
|
||
|
||
.entity-switch-card__title {
|
||
font-size: 14px;
|
||
font-weight: 600;
|
||
color: var(--text, #1e293b);
|
||
line-height: 1.4;
|
||
|
||
.entity-switch-card.is-active & {
|
||
color: var(--primary-dark, #059669);
|
||
}
|
||
}
|
||
|
||
.entity-switch-card__desc {
|
||
font-size: 12px;
|
||
color: var(--mint-text-muted, #64748b);
|
||
line-height: 1.4;
|
||
}
|
||
</style>
|