Commit f1cd0c02 by yuzhenWang

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

parents a9cca2fa 77e2d6d1
...@@ -161,3 +161,11 @@ export function searchScopeList(data) { ...@@ -161,3 +161,11 @@ export function searchScopeList(data) {
data: data data: data
}) })
} }
// 得到计算值
export function calculateFieldValue(data) {
return request({
url: '/csf/api/common/calculate/fieldValue',
method: 'post',
data: data
})
}
<template>
<div>
<el-affix :offset="affixOffset">
<el-anchor
:direction="direction"
:type="type"
:offset="anchorOffset"
@click="handleAnchorClick"
>
<el-anchor-link
v-for="item in anchorList"
:href="'#' + item.title"
:title="item.name"
@click="e => handleLinkClick(e, item.title)"
/>
</el-anchor>
</el-affix>
</div>
</template>
<script setup>
import { ref, onMounted, getCurrentInstance } from 'vue'
const props = defineProps({
direction: {
type: String,
default: 'vertical'
},
type: {
type: String,
default: 'default'
},
anchorOffset: {
type: Number,
default: 30
},
affixOffset: {
type: Number,
default: 60
},
anchorList: {
type: Array,
default: () => {
return []
}
},
// 新增:滚动容器的选择器
scrollContainerSelector: {
type: String,
default: ''
},
// 新增:滚动到元素时额外的偏移量
scrollOffset: {
type: Number,
default: 0
},
domIndex: {
type: Number,
default: 1
}
})
const emit = defineEmits(['anchor-click'])
// 处理锚点点击
const handleAnchorClick = e => {
// 阻止默认的锚点跳转
e.preventDefault()
}
// 处理链接点击
const handleLinkClick = (e, anchorId) => {
e.preventDefault()
e.stopPropagation()
emit('anchor-click', anchorId)
// 延迟执行滚动,确保 DOM 已经更新
setTimeout(() => {
scrollToAnchor(anchorId)
}, 50)
}
// 滚动到锚点
const scrollToAnchor = anchorId => {
const targetElement = document.getElementById(anchorId)
if (!targetElement) return
let scrollContainer
if (props.scrollContainerSelector) {
scrollContainer = document.querySelectorAll(props.scrollContainerSelector)
}
if (scrollContainer.length > 0) {
// 计算在容器内的相对位置
const containerRect = scrollContainer[props.domIndex].getBoundingClientRect()
const targetRect = targetElement.getBoundingClientRect()
// 计算滚动位置
const scrollTop =
targetRect.top -
containerRect.top +
scrollContainer[props.domIndex].scrollTop -
props.scrollOffset
// 平滑滚动
scrollContainer[props.domIndex].scrollTo({
top: scrollTop,
behavior: 'smooth'
})
} else {
// 如果没有指定容器,使用默认滚动
targetElement.scrollIntoView({
behavior: 'smooth',
block: 'start'
})
}
}
// 暴露方法给父组件
defineExpose({
scrollToAnchor
})
</script>
<template>
<div class="cardOneContainer">
<el-card class="cardStyle">
<template #header>
<div class="cardOneheader">
<div class="cardOneLeft">
<div class="mainTitle">{{ title }}</div>
<slot name="headerRight"></slot>
</div>
<div class="subTitle" v-if="desTitle">{{ desTitle }}</div>
</div>
</template>
<slot name="content"></slot>
</el-card>
</div>
</template>
<script setup>
import { ref, onMounted } from 'vue'
const props = defineProps({
title: {
type: String,
default: ''
},
desTitle: {
type: String,
default: ''
}
})
</script>
<style lang="scss" scoped>
.cardOneContainer {
width: 100%;
box-sizing: border-box;
}
.cardStyle {
width: 100%;
margin-bottom: 10px;
border: none !important;
/* :deep (.el-card__header) {
border: none !important;
} */
}
.headerStyle {
border: none !important;
}
.cardOneheader {
width: 100%;
}
.cardOneLeft {
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
}
.mainTitle {
font-size: 18px;
/* border-left: 4px solid #0052d9; */
padding-left: 5px;
display: flex;
align-items: center;
/* border-top-left-radius: 2px;
border-bottom-left-radius: 2px;
border-bottom-right-radius: 2px; */
}
.mainTitle::before {
content: '';
display: inline-block;
width: 4px;
height: 22px;
background: #0052d9;
margin-right: 5px;
border-radius: 4px;
}
.subTitle {
background: rgba(0, 119, 238, 0.05);
width: 100%;
padding: 10px 10px;
font-size: 14px;
color: rgba(56, 56, 56, 1);
display: flex;
align-items: center;
margin-top: 5px;
border-radius: 3px;
}
</style>
<template> <template>
<div class="app-container"> <div class="app-container">
<!-- <div>
<el-button type="primary" icon="Back" @click="handleBack" style="margin-bottom: 10px"
>返回</el-button
>
</div> -->
<el-card shadow="never"> <el-card shadow="never">
<div class="cardHeader"> <div class="cardHeader">
<div class="left"> <div class="left">
...@@ -25,22 +19,8 @@ ...@@ -25,22 +19,8 @@
</div> </div>
</div> </div>
</div> </div>
<!-- <div class="right">
<el-button
:disabled="!(processInfo.customerBizId && processInfo.fnaFormBizId)"
type="success"
:icon="Check"
>{{ processInfo.appointmentBizId ? '已预约' : '立即预约' }}</el-button
>
<el-button
:disabled="!(processInfo.customerBizId && processInfo.fnaFormBizId)"
type="primary"
plain
>生成副本</el-button
>
</div> -->
</div> </div>
<div class="tabsBox"> <div class="tabsBox" ref="tabPaneRef">
<el-tabs v-model="activeName" class="demo-tabs" :before-leave="beforeTabLeave"> <el-tabs v-model="activeName" 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 in tabsList" :key="tab.name" :label="tab.label" :name="tab.name">
<div :class="{ tabPaneBox: activeName !== 'appointment' }"> <div :class="{ tabPaneBox: activeName !== 'appointment' }">
...@@ -98,6 +78,7 @@ ...@@ -98,6 +78,7 @@
:fearthStatus="route.query.type" :fearthStatus="route.query.type"
:customerBizId="processInfo.customerBizId" :customerBizId="processInfo.customerBizId"
@handleSuccess="handleSuccess" @handleSuccess="handleSuccess"
:tabPaneRef="tabPaneRef"
/> />
<div v-if="tab.name === 'fnaform'"> <div v-if="tab.name === 'fnaform'">
<FanForm <FanForm
...@@ -155,6 +136,7 @@ const processInfo = ref({ ...@@ -155,6 +136,7 @@ const processInfo = ref({
const updateStatus = ref(false) const updateStatus = ref(false)
const dictTypeLists = ref([]) const dictTypeLists = ref([])
const customerInfo = ref({}) const customerInfo = ref({})
const tabPaneRef = ref(null)
const tabsList = ref([ const tabsList = ref([
{ {
label: '总览', label: '总览',
...@@ -181,15 +163,15 @@ const tabsList = ref([ ...@@ -181,15 +163,15 @@ const tabsList = ref([
id: 3, id: 3,
status: '0', status: '0',
key: 'appointmentBizId' key: 'appointmentBizId'
},
{
label: '关联新单',
name: 'newpolicy',
id: 4,
status: '0',
key: 'policyBizld'
} }
// { // {
// label: '关联新单',
// name: 'newpolicy',
// id: 4,
// status: '0',
// key: 'policyBizld'
// }
// {
// label: '关联保单', // label: '关联保单',
// name: 'policy', // name: 'policy',
// id: 5, // id: 5,
...@@ -533,11 +515,40 @@ getDictsData() ...@@ -533,11 +515,40 @@ getDictsData()
} }
} }
} }
/* .tabPaneBox {
height: calc(100vh - 275px);
overflow-y: auto;
padding-right: 10px;
} */
.tabPaneBox { .tabPaneBox {
/* height: calc(100vh - 317px); */
height: calc(100vh - 275px); height: calc(100vh - 275px);
overflow-y: auto; overflow-y: auto;
padding-right: 10px; padding-right: 10px;
position: relative;
}
/* 确保滚动区域有正确的滚动行为 */
.tabPaneBox {
scroll-behavior: smooth;
-webkit-overflow-scrolling: touch;
}
/* 隐藏滚动条但保留功能 */
.tabPaneBox::-webkit-scrollbar {
width: 6px;
}
.tabPaneBox::-webkit-scrollbar-track {
background: #f1f1f1;
}
.tabPaneBox::-webkit-scrollbar-thumb {
background: #c1c1c1;
border-radius: 3px;
}
.tabPaneBox::-webkit-scrollbar-thumb:hover {
background: #a8a8a8;
} }
.overviewBox { .overviewBox {
display: flex; display: flex;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
> >
<!-- 查询条件插槽 --> <!-- 查询条件插槽 -->
<template #searchForm> <template #searchForm>
<el-form :model="queryParams" ref="queryRef" label-width="78px"> <el-form :model="queryParams" ref="queryRef" label-width="78px" label-position="top">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :sm="12" :lg="6" :xs="24"> <el-col :sm="12" :lg="6" :xs="24">
<el-form-item label="创建时间"> <el-form-item label="创建时间">
...@@ -176,15 +176,16 @@ const operationBtnList = ref([ ...@@ -176,15 +176,16 @@ const operationBtnList = ref([
icon: 'Plus', icon: 'Plus',
type: 'primary', type: 'primary',
direction: 'left', direction: 'left',
size: 'small', size: 'large',
click: handleAdd click: handleAdd
}, },
{ {
label: '搜索', label: '搜索',
icon: 'Search', icon: 'Search',
type: 'primary', type: 'primary',
direction: 'right', direction: 'right',
size: 'small', size: 'large',
click: handleQuery click: handleQuery
}, },
{ {
...@@ -192,7 +193,7 @@ const operationBtnList = ref([ ...@@ -192,7 +193,7 @@ const operationBtnList = ref([
icon: 'Refresh', icon: 'Refresh',
type: 'info', type: 'info',
direction: 'right', direction: 'right',
size: 'small', size: 'large',
click: resetQuery click: resetQuery
} }
]) ])
......
...@@ -467,7 +467,7 @@ function resetQuery() { ...@@ -467,7 +467,7 @@ function resetQuery() {
proxy.resetForm('queryRef') proxy.resetForm('queryRef')
queryParams.value = { queryParams.value = {
pageNo: 1, pageNo: 1,
pageSize: 8, pageSize: 10,
startTime: '', startTime: '',
endTime: '' endTime: ''
} }
...@@ -487,21 +487,6 @@ function handleDelete(row) { ...@@ -487,21 +487,6 @@ function handleDelete(row) {
}) })
.catch(() => {}) .catch(() => {})
} }
/** 重置操作表单 */
function reset() {
form.value = {
pageNo: 1,
pageSize: 8
}
proxy.resetForm('tenantRef')
}
/** 新增按钮操作 */
function handleAdd() {
router.push('/sign/FnaList/edit?type=add')
}
/** 修改按钮操作 */ /** 修改按钮操作 */
function handleUpdate(row) { function handleUpdate(row) {
// 对预约status进行转换,到编辑页面在转换会有时机问题 // 对预约status进行转换,到编辑页面在转换会有时机问题
......
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