Commit f1e81e99 by yuzhenWang

Merge branch 'feature-20250827wyz-写业务' into 'test'

发布测试

See merge request !45
parents 6ae4c2de 48ce4bc3
<template>
<div class="cardOneContainer">
<el-card class="cardStyle">
<template #header>
<template #header v-if="showTitle">
<div class="cardOneheader">
<div class="cardOneLeft">
<div class="mainTitle">
......@@ -25,6 +25,10 @@ const props = defineProps({
type: String,
default: ''
},
showTitle: {
type: Boolean,
default: true
},
desTitle: {
type: String,
default: ''
......
const beneficiary = [
{
fatherTitle: '是否法定受益人',
fatherTitle: '',
showTitle: false,
keyType: 'Object', //用于表单收集值时,判断是数组还是对象
key: 'isLegalBeneficiary',
anchorKey: 'isLegalBeneficiary',
......
......@@ -2,6 +2,7 @@ const customer = [
// 与投保人关系-在受保人中显示
{
fatherTitle: '与投保人关系',
showTitle: false,
type: 'object',
key: 'policyholderRel',
anchorKey: 'policyholderRel',
......
const secondHolder = [
{
fatherTitle: '是否有第二持有人',
fatherTitle: '',
showTitle: false,
keyType: 'Object', //用于表单收集值时,判断是数组还是对象
key: 'isSecond',
anchorKey: 'isSecond',
......
......@@ -101,6 +101,7 @@ const handleLinkClick = (e, anchorId) => {
// 滚动到锚点
const scrollToAnchor = anchorId => {
const targetElement = document.getElementById(anchorId)
if (!targetElement) return
let scrollContainer
......@@ -132,7 +133,43 @@ const scrollToAnchor = anchorId => {
})
}
}
// 预留备用
// const scrollToAnchor = async (anchorId: string) => {
// // 确保 DOM 更新完成(尤其在 tab 切换后)
// await nextTick()
// const target = document.getElementById(anchorId)
// if (!target) {
// console.warn(`[Anchor Scroll] Target element not found: #${anchorId}`)
// return
// }
// // 关键:从目标元素向上查找最近的 .appointmentTabPaneBox
// let scrollContainer: HTMLElement | null = target
// while (scrollContainer && !scrollContainer.classList.contains('appointmentTabPaneBox')) {
// scrollContainer = scrollContainer.parentElement
// }
// if (!scrollContainer) {
// // 如果没找到,回退到全局滚动
// target.scrollIntoView({ behavior: 'smooth', block: 'start' })
// return
// }
// // 计算相对滚动位置
// const containerRect = scrollContainer.getBoundingClientRect()
// const targetRect = target.getBoundingClientRect()
// const scrollTop =
// scrollContainer.scrollTop +
// (targetRect.top - containerRect.top) -
// props.scrollOffset
// scrollContainer.scrollTo({
// top: scrollTop,
// behavior: 'smooth'
// })
// }
// 暴露方法给父组件
defineExpose({
scrollToAnchor
......
<template>
<div class="customerContainer">
<div class="customerContainer" style="padding-top: 10px">
<div ref="customerRightRef">
<div class="editBtn">
<el-button
......@@ -24,7 +24,11 @@
<el-form :model="form" :rules="rules" label-width="120px" ref="customerFormRef">
<el-row v-for="(father, fIndex) in processedCustomerData" :id="father.anchorKey">
<div class="formBox">
<CardOne :title="father.fatherTitle" v-if="father.showMoudle">
<CardOne
:showTitle="father.showTitle"
:title="father.fatherTitle"
v-if="father.showMoudle"
>
<template #content>
<el-row :gutter="20" v-if="!father.showTable">
<template v-for="child in father.data" :key="child.key">
......
<template>
<div v-if="processedFanFormData.length > 0">
<div v-if="processedFanFormData.length > 0" style="padding-top: 10px">
<div ref="fanContainerRef">
<div class="editBtn">
<el-button
......
......@@ -122,7 +122,12 @@
</el-col>
</el-row>
<el-tabs v-model="activeName" type="card" class="demo-tabs" :before-leave="beforeTabLeave">
<el-tab-pane v-for="tab in tabsList" :key="tab.name" :label="tab.label" :name="tab.name">
<el-tab-pane
v-for="(tab, index) in tabsList"
:key="tab.name"
:label="tab.label"
:name="tab.name"
>
<div
class="appointmentTabPaneBox"
:style="{
......@@ -181,7 +186,9 @@
:customerBizId="props.processDetail.customerBizId"
/>
</div>
<!-- 受保人 -->
<div v-if="tab.name === 'insurantInfo'">
<!-- anchorContainer=".appointmentTabPaneBox" -->
<Customer
:activeName="activeName"
:fatherTabName="tabName"
......@@ -194,6 +201,7 @@
:fatherEditStatus="editStatus"
:idsObj="idsObj"
:customerBizId="props.processDetail.customerBizId"
:customerInfo="customerInfo"
:apiInsurantInfoDto="appointmentSummeryInfo.apiInsurantInfoDto"
/>
</div>
......@@ -819,37 +827,37 @@ const getDictsData = async () => {
})
dictStore.setSignPeopleList(response7.data.records)
}
// proxy.useDictLists([
// 'csf_employment',
// 'sys_no_yes',
// 'bx_currency_type',
// 'csf_liquid_asset_type',
// 'csf_premium_funding_source',
// 'csf_customer_type',
// 'csf_customer_title',
// 'sys_gender',
// 'csf_marriage',
// 'csf_education',
// 'csf_id_type',
// 'csf_ap_apply_type',
// 'csf_ap_meeting_point',
// 'csf_ap_first_issue',
// 'csf_ap_dividend',
// 'csf_ap_frequency',
// 'csf_ap_rel',
// 'csf_ap_registration',
// 'csf_ap_exercise',
// 'csf_ap_risk',
// 'csf_ap_movie',
// 'csf_ap_game',
// 'csf_ap_policy_transfer',
// 'wj_question_first_category',
// 'wj_question_second_category',
// 'csf_ap_status',
// 'md_bank',
// 'oss_data_type',
// 'oss_data_person'
// ])
proxy.useDictLists([
'csf_employment',
'sys_no_yes',
'bx_currency_type',
'csf_liquid_asset_type',
'csf_premium_funding_source',
'csf_customer_type',
'csf_customer_title',
'sys_gender',
'csf_marriage',
'csf_education',
'csf_id_type',
'csf_ap_apply_type',
'csf_ap_meeting_point',
'csf_ap_first_issue',
'csf_ap_dividend',
'csf_ap_frequency',
'csf_ap_rel',
'csf_ap_registration',
'csf_ap_exercise',
'csf_ap_risk',
'csf_ap_movie',
'csf_ap_game',
'csf_ap_policy_transfer',
'wj_question_first_category',
'wj_question_second_category',
'csf_ap_status',
'md_bank',
'oss_data_type',
'oss_data_person'
])
}
// Tab切换前的验证
const beforeTabLeave = async (activeTabName, oldTabName) => {
......
......@@ -2,7 +2,9 @@
<div v-if="processedAppointmentData.length > 0">
<div ref="appointmentRef">
<!-- 预约为父组件得第一个tab,初次渲染得时候锚点没正常显示,先这样解决有空再解决 -->
<div style="position: relative; top: -100%; left: -100%">{{ appointmentRef }}</div>
<div style="position: relative; top: -100%; left: -1100%">
{{ appointmentRef }}
</div>
<CommonForm
:anchorList="anchorList"
:affixOffset="affixOffset"
......
<template>
<!-- v-if="processedBeneficiaryData.length > 0" -->
<div>
<div style="padding-top: 10px">
<div ref="beneficiaryRef">
<CommonForm :showAnchor="false">
<template #form-right>
<el-form ref="beneficiaryInfoFormRef" :model="form" :rules="rules">
<el-row v-for="father in processedBeneficiaryData" style="margin-bottom: 10px">
<div class="formBox formFna">
<CardOne :title="father.fatherTitle" v-if="father.showMoudle">
<CardOne
:showTitle="father.showTitle"
:title="father.fatherTitle"
v-if="father.showMoudle"
>
<template #content>
<el-row v-if="!father.showTable" :gutter="20">
<template v-for="child in father.data" :key="child.key">
......
<template>
<div>
<div style="padding-top: 10px">
<div v-if="questionnairesDom.length > 0" ref="questionRef">
<CommonForm
:anchorList="anchorList"
......
<template>
<!-- v-if="processedProductData.length > 0" -->
<div>
<div style="padding-top: 10px">
<div ref="productRef">
<CommonForm
:anchorList="anchorList"
......
<template>
<!-- v-if="processedSecondHolderData.length > 0" -->
<div>
<div style="padding-top: 10px">
<div>
<CommonForm :showAnchor="false">
<template #form-right>
<el-form ref="secondHolderFormRef" :model="form" :rules="rules">
<el-row v-for="father in processedSecondHolderData" style="margin-bottom: 10px">
<div class="formBox formFna">
<CardOne :title="father.fatherTitle" v-if="father.showMoudle">
<CardOne
:title="father.fatherTitle"
v-if="father.showMoudle"
:showTitle="father.showTitle"
>
<template #content>
<el-row v-if="!father.showTable" :gutter="20">
<template v-for="child in father.data" :key="child.key">
......
......@@ -36,7 +36,7 @@
? '首期保费对账'
: '续期保费对账'
}}
<!-- {{ getDictLabel('reconciliation_type', row.reconciliationType) }} -->
</template>
</el-table-column>
<el-table-column prop="insuranceCompany" label="保险公司" width="150" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment