Files
zkxw/web-admin/src/views/pilot-service/pilot-application/index.vue
T
zlwuandCursor e85645a649 refactor: 将基础实验展示名统一改为临床科研
保留 basic_experiment 等内部编码与业务逻辑,全量替换用户可见及源码中文;新增 sys_menu REPLACE 迁移(不改 perms/path)。Gitea 工单因凭据 401 待补关联。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-20 13:51:27 +08:00

88 lines
2.8 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!-- 中试/临床/临床科研申请单页:Tab 由 bizType 策略配置驱动 -->
<template>
<div class="page-container">
<section class="panel">
<div v-if="tabCards.length > 1" class="panel-pill-tabs panel-pill-tabs--lg">
<div class="panel-pill-tabs__track" role="tablist" aria-label="视图类型">
<button
v-for="item in tabCards"
:key="item.key"
type="button"
role="tab"
class="panel-pill-tabs__btn"
:class="{ 'is-active': activeTab === item.key }"
:aria-selected="activeTab === item.key"
@click="activeTab = item.key"
>
{{ item.title }}
</button>
</div>
</div>
<PilotApplicationTab v-if="activeTab === 'application'" :biz-type="effectiveBizType" />
<CheckupManagementTab v-else-if="activeTab === 'checkup'" :biz-type="effectiveBizType" />
<InfusionScheduleTab v-else-if="activeTab === 'infusion'" :biz-type="effectiveBizType" />
<ClinicalPaymentTab v-else-if="activeTab === 'payment'" :biz-type="effectiveBizType" />
</section>
</div>
</template>
<script setup lang="ts">
import PilotApplicationTab from './PilotApplicationTab.vue'
import CheckupManagementTab from './CheckupManagementTab.vue'
import InfusionScheduleTab from './InfusionScheduleTab.vue'
import ClinicalPaymentTab from './ClinicalPaymentTab.vue'
import {
getPilotBizConfig,
resolvePilotBizType,
type PilotBizType
} from '@/config/pilot-biz-type'
defineOptions({ name: 'PilotApplicationManagement' })
const props = defineProps<{ bizType?: string }>()
const bizConfig = computed(() => getPilotBizConfig(props.bizType))
const effectiveBizType = computed<PilotBizType>(() => resolvePilotBizType(props.bizType))
type TabKey = 'application' | 'checkup' | 'infusion' | 'payment'
const tabCards = computed(() => {
const cfg = bizConfig.value
const cards: Array<{ key: TabKey; title: string }> = [
{
key: 'application',
title: effectiveBizType.value === 'basic_experiment' ? '申请单' : `${cfg.label}申请单`
}
]
if (cfg.showCheckup) {
cards.push({
key: 'checkup',
title: '体检管理'
})
}
cards.push({
key: 'infusion',
title: `${cfg.scheduleLabel}管理`
})
if (cfg.showPayment) {
cards.push({
key: 'payment',
title: '缴费信息'
})
}
return cards
})
const validTabKeys = computed(() => tabCards.value.map((c) => c.key))
const route = useRoute()
const activeTab = ref<TabKey>('application')
onMounted(() => {
const tab = String(route.query.tab || '')
if (validTabKeys.value.includes(tab as TabKey)) {
activeTab.value = tab as TabKey
}
})
</script>