数据看板接口对接

This commit is contained in:
liu.xiaofeng@ebiz-digits.com
2024-05-25 17:09:43 +08:00
parent 96aca1c83a
commit c099d82230
2 changed files with 97 additions and 71 deletions

View File

@@ -116,3 +116,12 @@ export function saveOrUpdateGbc(data) {
data
})
}
// GBC数据看板
export function dataShow(data) {
return request({
url: getUrl('/sale/gbc/data/show', 1),
method: 'post',
data
})
}

View File

@@ -52,14 +52,14 @@
</div>
<div v-if="tabActive == 'dataBoard'">
<div style="margin: 10px;padding: 10px;background: #fff;border-radius: 5px;">
<p style="font-size: 18px;line-height: 35px;font-weight: bold;">项目名称国富人寿北京协和医院AA项目</p>
<p style="color: #a7a7a7;font-size: 14px;">数据截止日期2024-03-30</p>
<p style="font-size: 18px;line-height: 35px;font-weight: bold;">项目名称{{calGbcProject.projectName}}</p>
<p style="color: #a7a7a7;font-size: 14px;">数据截止日期{{calGbcProject.endDate}}</p>
<div style="display: flex;justify-content: center;margin-top: 20px;">
<van-circle v-model="currentRate" color="#E9332E" :stroke-width="60" size="80px" :rate="85" :speed="100" :text="text" />
<van-circle v-model="currentRate" color="#E9332E" :stroke-width="60" size="80px" :rate="interviewConversionRate" :speed="100" :text="text" />
</div>
<p style="display: flex;justify-content: center;font-weight: bold;font-size: 14px;margin: 10px;">面谈转化率</p>
<div style="padding: 10px;background: rgba(251, 235, 230, 0.5);border-radius: 5px;display: flex;justify-content: flex-start;flex-wrap:wrap;">
<div v-for="(item,index) in dataList1" style="width: 33%;display: flex;justify-content: space-around;align-items: center;">
<div v-for="(item,index) in calGbcProjectDataList" style="width: 33%;display: flex;justify-content: space-around;align-items: center;">
<div>
<div style="font-size: 12px;line-height: 22px;margin: 7px 0px;">
<p style="display: flex;justify-content: center;font-size: 14px;">{{item.value}}</p>
@@ -76,7 +76,7 @@
<div style="margin: 10px;padding: 10px;background: #fff;border-radius: 5px;">
<div style="border-bottom: 1px dashed #666;padding-bottom: 15px;">
<p style="font-size: 18px;line-height: 35px;font-weight: bold;">项目成员分配</p>
<p style="color: #a7a7a7;font-size: 14px;">数据截止日期2024-03-30</p>
<p style="color: #a7a7a7;font-size: 14px;">数据截止日期{{calGbcPersonList[0].endDate}}</p>
</div>
<div style="margin-top: 10px;margin-bottom: 3px;background: rgba(255, 87, 83, 0.7);line-height: 30px;display: flex;align-items: center;color: #fff;font-size: 14px;">
<span style="width: 18%;display: flex;justify-content: center;">成员</span>
@@ -85,11 +85,11 @@
<span style="width: 30%;display: flex;justify-content: center;">受理标保()</span>
</div>
<div>
<div v-for="item in dataList2" style="background: rgba(251, 235, 230, 0.44);margin-bottom: 1px;line-height: 30px;display: flex;align-items: center;color: #333;font-size: 13px;">
<span style="width: 18%;display: flex;justify-content: center;">{{item.name}}</span>
<span style="width: 22%;display: flex;justify-content: center;">{{item.role}}</span>
<span style="width: 30%;display: flex;justify-content: center;">{{item.value1}}</span>
<span style="width: 30%;display: flex;justify-content: center;">{{item.value2}}</span>
<div v-for="item in calGbcPersonList" style="background: rgba(251, 235, 230, 0.44);margin-bottom: 1px;line-height: 30px;display: flex;align-items: center;color: #333;font-size: 13px;">
<span style="width: 18%;display: flex;justify-content: center;">{{item.personName}}</span>
<span style="width: 22%;display: flex;justify-content: center;">{{item.roleName}}</span>
<span style="width: 30%;display: flex;justify-content: center;">{{item.sumStandardPrem}}</span>
<span style="width: 30%;display: flex;justify-content: center;">{{item.sumAcceptedPrem}}</span>
</div>
</div>
</div>
@@ -103,7 +103,7 @@
<table cellspacing=0 style="margin-top: 10px;">
<thead style="background: rgba(255, 87, 83, 0.7);color: #fff;">
<tr class="theadClass">
<th>小组</th>
<th style="padding: 0px 40px;">小组</th>
<th>组长</th>
<th>获客人数</th>
<th>获客率</th>
@@ -125,40 +125,40 @@
<tbody>
<tr class="tbodyClass">
<td colspan="2">项目合并</td>
<td>.00</td>
<td>.00</td>
<td>.00</td>
<td>.00</td>
<td>.00</td>
<td>.00</td>
<td>.00</td>
<td>.00</td>
<td>.00</td>
<td>.00</td>
<td>.00</td>
<td>.00</td>
<td>.00</td>
<td>.00</td>
<td>.00</td>
<td>{{calGbcTeamTotalDTO.guestNum}}</td>
<td>{{calGbcTeamTotalDTO.guestRate}}</td>
<td>{{calGbcTeamTotalDTO.guestSelectNum}}</td>
<td>{{calGbcTeamTotalDTO.guestSelectRate}}</td>
<td>{{calGbcTeamTotalDTO.sumStandardPrem}}</td>
<td>{{calGbcTeamTotalDTO.sumInsuredNum}}</td>
<td>{{calGbcTeamTotalDTO.sumInsuredCases}}</td>
<td>{{calGbcTeamTotalDTO.averagePrem}}</td>
<td>{{calGbcTeamTotalDTO.interviewConversionRate}}</td>
<td>{{calGbcTeamTotalDTO.acceptedRate}}</td>
<td>{{calGbcTeamTotalDTO.sumAcceptedPrem}}</td>
<td>{{calGbcTeamTotalDTO.sumAcceptedCases}}</td>
<td>{{calGbcTeamTotalDTO.sumMajorDiseaseCases}}</td>
<td>{{calGbcTeamTotalDTO.sumMajorDiseasePrem}}</td>
<td>{{calGbcTeamTotalDTO.averageMajorDiseasePrem}}</td>
</tr>
<tr v-for="(item,index) in dataList3" :key="index" class="tbodyClass">
<td>{{item.name}}</td>
<td>{{item.name}}</td>
<td>{{item.name}}</td>
<td>{{item.name}}</td>
<td>{{item.name}}</td>
<td>{{item.name}}</td>
<td>{{item.name}}</td>
<td>{{item.name}}</td>
<td>{{item.name}}</td>
<td>{{item.name}}</td>
<td>{{item.name}}</td>
<td>{{item.name}}</td>
<td>{{item.name}}</td>
<td>{{item.name}}</td>
<td>{{item.name}}</td>
<td>{{item.name}}</td>
<td>{{item.name}}</td>
<tr v-for="(item,index) in calGbcTeamList" :key="index" class="tbodyClass">
<td class="teamNameTdClass">{{item.teamName}}</td>
<td>{{item.leaderName}}</td>
<td>{{item.guestNum}}</td>
<td>{{item.guestRate}}</td>
<td>{{item.guestSelectNum}}</td>
<td>{{item.guestSelectRate}}</td>
<td>{{item.sumStandardPrem}}</td>
<td>{{item.sumInsuredNum}}</td>
<td>{{item.sumInsuredCases}}</td>
<td>{{item.averagePrem}}</td>
<td>{{item.interviewConversionRate}}</td>
<td>{{item.acceptedRate}}</td>
<td>{{item.sumAcceptedPrem}}</td>
<td>{{item.sumAcceptedCases}}</td>
<td>{{item.sumMajorDiseaseCases}}</td>
<td>{{item.sumMajorDiseasePrem}}</td>
<td>{{item.averageMajorDiseasePrem}}</td>
</tr>
</tbody>
</table>
@@ -185,7 +185,7 @@
<script>
import { Tab, Tabs, Search, DropdownMenu, DropdownItem, Circle } from 'vant'
import { getList } from '@/api/ebiz/product/product.js'
import { getGBCappntlist } from '@/api/GBC/GBC.js'
import { getGBCappntlist, dataShow } from '@/api/GBC/GBC.js'
export default {
components: {
[Tab.name]: Tab,
@@ -217,33 +217,20 @@ export default {
customerList:[],
currentRate: 0,
colorList:['#E9332E','#CB9BFF','#54C6FA','#FF9B39','#60D64D','#4045F3','#FF59D9','#E8C0A2','#FCD338','#7584A2'],
dataList1:[
{name:'累计受理保费(元)',value:'150,000.00'},
{name:'累计标保(元)',value:'250,000.00'},
{name:'件均保费(元)',value:'130,000.00'},
{name:'件均保费(元)',value:'10856'},
{name:'累计受理件数(件)',value:'356'},
{name:'累计承保人数(人)',value:'9569'},
{name:'累计承保件数(件)',value:'262'},
],
dataList2:[
{name:'张大大',role:'项目经理',value1:'15,000.00',value2:'15,000.00'},
{name:'张大大',role:'项目经理',value1:'15,000.00',value2:'15,000.00'},
{name:'张大大',role:'项目经理',value1:'15,000.00',value2:'15,000.00'},
{name:'张大大',role:'项目经理',value1:'15,000.00',value2:'15,000.00'},
{name:'张大大',role:'项目经理',value1:'15,000.00',value2:'15,000.00'},
{name:'张大大',role:'项目经理',value1:'15,000.00',value2:'15,000.00'},
{name:'张大大',role:'项目经理',value1:'15,000.00',value2:'15,000.00'},
],
dataList3:[
{name:'A组',role:'李艾',value1:'600',value2:'60'},
{name:'A组',role:'李艾',value1:'600',value2:'60'},
{name:'A组',role:'李艾',value1:'600',value2:'60'},
{name:'A组',role:'李艾',value1:'600',value2:'60'},
{name:'A组',role:'李艾',value1:'600',value2:'60'},
{name:'A组',role:'李艾',value1:'600',value2:'60'},
{name:'A组',role:'李艾',value1:'600',value2:'60'},
calGbcProject: {},
interviewConversionRate: 0,
calGbcProjectDataList:[
{name:'累计受理保费(元)',value:'150,000.00', code: 'sumAcceptedPrem'},
{name:'累计标保(元)',value:'250,000.00', code: 'sumStandardPrem'},
{name:'件均保费(元)',value:'130,000.00', code: 'averagePrem'},
{name:'累计受理人数(人)',value:'10856', code: 'sumAcceptedNum'},
{name:'累计受理件数(件)',value:'356', code: 'sumAcceptedCases'},
{name:'累计承保人数(人)',value:'9569', code: 'sumInsuredNum'},
{name:'累计承保件数(件)',value:'262', code: 'sumInsuredCases'},
],
calGbcPersonList:[],
calGbcTeamList:[],
calGbcTeamTotalDTO: {},
dataList4:[],
}
},
@@ -254,8 +241,34 @@ export default {
document.title = this.$route.query.projectName
this.getGBCappntlist()
this.getProductList()
this.getDataShow()
},
methods: {
getDataShow() {
let params = {
projectCode: this.$route.query.projectCode
}
dataShow(params).then(res => {
this.calGbcPersonList = []
this.calGbcTeamList = []
if(res.result == '0') {
this.calGbcProject = res.content.calGbcProject
this.interviewConversionRate = Number(res.content.calGbcProject.interviewConversionRate)
for(let key in res.content.calGbcProject) {
this.calGbcProjectDataList.forEach(item => {
if(item.code == key) {
item.value = res.content.calGbcProject[key]
}
})
}
this.calGbcPersonList = res.content.calGbcPersonList
this.calGbcTeamList = res.content.calGbcTeamList
this.calGbcTeamTotalDTO = res.content.calGbcTeamTotalDTO
} else {
this.$toast(res.resultMessage)
}
})
},
dropdownMenuChange(value){
this.filterType = value
this.searchvalue = ''
@@ -439,4 +452,8 @@ export default {
border-bottom:1px solid #fff;
}
}
.teamNameTdClass{
display: block;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;
//width: 105px;
}
</style>