fix more
This commit is contained in:
1 parent
5734cfa534
commit
1609f19b9c
14 files changed
+2481
-433
No files matched your search
@@ -0,0 +1,54 @@
|
||||
<template>
|
||||
<TypeLine
|
||||
scene="zxfw-pricing-tab"
|
||||
title="咨询服务计算"
|
||||
storage-key="zxfw-pricing-active-cat"
|
||||
default-category="investment-scale-method"
|
||||
:categories="pricingCategories"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { defineAsyncComponent, defineComponent, h, markRaw, type Component } from 'vue'
|
||||
import TypeLine from '@/layout/typeLine.vue'
|
||||
|
||||
const props = defineProps<{
|
||||
contractId: string
|
||||
contractName?: string
|
||||
}>()
|
||||
|
||||
interface PricingCategoryItem {
|
||||
key: string
|
||||
label: string
|
||||
component: Component
|
||||
}
|
||||
|
||||
const createPricingPane = (name: string) =>
|
||||
markRaw(
|
||||
defineComponent({
|
||||
name,
|
||||
setup() {
|
||||
const AsyncPricingView = defineAsyncComponent({
|
||||
loader: () => import(`@/components/views/pricingView/${name}.vue`),
|
||||
onError: err => {
|
||||
console.error('加载 PricingMethodView 组件失败:', err)
|
||||
}
|
||||
})
|
||||
|
||||
return () => h(AsyncPricingView, { contractId: props.contractId })
|
||||
}
|
||||
})
|
||||
)
|
||||
|
||||
const investmentScaleView = createPricingPane('InvestmentScalePricingPane')
|
||||
const landScaleView = createPricingPane('LandScalePricingPane')
|
||||
const workloadView = createPricingPane('WorkloadPricingPane')
|
||||
const hourlyView = createPricingPane('HourlyPricingPane')
|
||||
|
||||
const pricingCategories: PricingCategoryItem[] = [
|
||||
{ key: 'investment-scale-method', label: '投资规模法', component: investmentScaleView },
|
||||
{ key: 'land-scale-method', label: '用地规模法', component: landScaleView },
|
||||
{ key: 'workload-method', label: '工作量法', component: workloadView },
|
||||
{ key: 'hourly-method', label: '工时法', component: hourlyView }
|
||||
]
|
||||
</script>
|
||||
Reference in new issue
Block a user