|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407 |
- <template>
- <view class="box">
- <view class="boxtittab">
- <view class="tabbox">
- <view :class="{ activecllasscet: activeTotal == 4 }" @click="tabtimetap(4)">近七天</view>
- </view>
- <view class="tabbox">
- <view :class="{ activecllasscet: activeTotal == 5 }" @click="tabtimetap(5)">近15天</view>
- </view>
- <view class="tabbox">
- <view :class="{ activecllasscet: activeTotal == 6 }" @click="tabtimetap(6)">近30天</view>
- </view>
- <view class="tabbox">
- <view :class="{ activecllasscet: activeTotal == 3 }" @click="tabtimetap(3)">自定义</view>
- </view>
- </view>
-
-
- <view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view>
- <view class="single">
- <view class="title">
- <view class="title1">接待量(TOP10)</view>
- </view>
- <view class="hejibox">
- <view class="heji">楼盘:{{newTeam1||0}}</view>
- <view class="heji">均值:{{newAvg1||0}}</view>
- </view>
- <view class="jindu">
-
- <scroll-view style="height: 300rpx;" scroll-y="true" >
- <view class="jindu-box" v-for="(item,index) in newlisttabinfo1" :key="index">
- <view class="jindu-boxche">
- <view class="jindu-name">{{item.name.substring(0, 4)}}</view>
- <view style="width: 440rpx;margin-left: 10rpx;">
- <u-line-progress height="24" :show-percent="false" active-color="#FBA448" :percent="item.zxl"></u-line-progress>
- </view>
- <view class="jindu-zxl">{{item.zxl==null?0:item.zxl}}</view>
- </view>
- </view>
- </scroll-view>
- </view>
- </view>
-
- <view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view>
- <view class="single">
- <view class="title">
- <view class="title1">接待时长(TOP10)</view>
- </view>
- <view class="hejibox">
- <view class="heji">楼盘:{{newTeam2||0}}</view>
- <view class="heji">均值:{{newAvg2||0}}</view>
- </view>
- <view class="jindu">
- <scroll-view style="height: 300rpx;" scroll-y="true" >
- <view class="jindu-box" v-for="(item,index) in newlisttabinfo2" :key="index">
- <view class="jindu-boxche">
- <view class="jindu-name">{{item.name.substring(0, 4)}}</view>
- <view style="width: 440rpx;margin-left: 10rpx;">
- <u-line-progress height="24" :show-percent="false" active-color="#4FC78F" :percent="item.zxl"></u-line-progress>
- </view>
- <view class="jindu-zxl">{{item.zxl==null?0:item.zxl}}</view>
- </view>
- </view>
- </scroll-view>
- </view>
- </view>
-
- <view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view>
- <view class="single">
- <view class="title">
- <view class="title1" style="flex: 1;">销讲排名(TOP10)</view>
- <!-- <view class="title3" style="flex: 1;">
- <view class="title3-box">
- <view style="height: 42rpx;" :class="{ activecltab: activeTotal2 == 0 }">执行率</view>
- </view>
- <view class="title3-box">
- <view style="height: 42rpx;" :class="{ activecltab: activeTotal2 == 1 }">得分</view>
- </view>
- </view> -->
- </view>
-
- <view class="hejibox">
- <view class="heji">楼盘:{{newTeam3||0}}</view>
- <view class="heji">均值:{{newAvg3||0}}</view>
- </view>
- <view class="jindu">
- <scroll-view style="height: 300rpx;" scroll-y="true" >
- <view class="jindu-box" v-for="(item,index) in newlisttabinfo3" :key="index">
- <view class="jindu-boxche">
- <view class="jindu-name">{{item.name.substring(0, 4)}}</view>
- <view style="width: 440rpx;margin-left: 10rpx;">
- <u-line-progress height="24" :show-percent="false" active-color="#9B6BDF" :percent="item.zxl"></u-line-progress>
- </view>
- <view class="jindu-zxl">{{item.zxl==null?0:item.zxl}}</view>
- </view>
- </view>
- </scroll-view>
- </view>
- </view>
-
- <view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view>
- <view class="single">
- <view class="title">
- <view class="title1" style="flex: 1;">顾问排名(TOP10)</view>
- <!-- <view class="title3" style="flex: 1;">
- <view class="title3-box">
- <view style="height: 42rpx;" :class="{ activecltab: activeTotal2 == 0 }">执行率</view>
- </view>
- <view class="title3-box">
- <view style="height: 42rpx;" :class="{ activecltab: activeTotal2 == 1 }">得分</view>
- </view>
- </view> -->
- </view>
-
- <view class="hejibox">
- <view class="heji">楼盘:{{newTeam4||0}}</view>
- <view class="heji">均值:{{newAvg4||0}}</view>
- </view>
- <view class="jindu">
- <scroll-view style="height: 300rpx;" scroll-y="true" >
- <view class="jindu-box" v-for="(item,index) in newlisttabinfo4" :key="index">
- <view class="jindu-boxche">
- <view class="jindu-name">{{item.name.substring(0, 4)}}</view>
- <view style="width: 440rpx;margin-left: 10rpx;">
- <u-line-progress height="24" :show-percent="false" active-color="#9B6BDF" :percent="item.zxl"></u-line-progress>
- </view>
- <view class="jindu-zxl">{{item.zxl==null?0:item.zxl}}</view>
- </view>
- </view>
- </scroll-view>
-
- </view>
- </view>
-
- <view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view>
- <view class="single">
- <view class="title" style="padding-right: 30rpx;">
- <view class="title1" style="flex: 1;">销奖能力(TOP10)</view>
- <view class="title2" style="flex: 1;justify-content: flex-end;" @click="Groupcontrast">
- <view class="title2-che">楼盘
- <image class="righttochoose" src="../../../static/images/righttochoose.png" mode=""></image>
- </view>
- </view>
- </view>
- <!-- <view class="hejibox">
- <view class="heji">楼盘:50</view>
- <view class="heji">均值:25</view>
- </view> -->
- <view class="uchaserbox">
- <qiun-data-charts
- type="radar"
- :chartData="chartData"
- :canvas2d="true"
- canvasId="wangxiaohuaerlingeryilingwuyib88"
- background="none"
- />
- </view>
- </view>
-
-
-
-
- <!-- <view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view>
- <view class="single">
- <view class="title">
- <view class="title1">禁忌执行率(TOP10)</view>
- </view>
- <view class="hejibox">
- <view class="heji">合计:50</view>
- <view class="heji">均值:25</view>
- </view>
- <view class="jindu">
- <view class="jindu-box" v-for="(item,index) in newlisttabinfo" :key="index">
- <view class="jindu-boxche">
- <view class="jindu-name">{{item.name.substring(0, 4)}}</view>
- <view style="width: 440rpx;margin-left: 10rpx;">
- <u-line-progress height="24" :show-percent="false" active-color="#E6625B" :percent="item.zxl"></u-line-progress>
- </view>
- <view class="jindu-zxl">{{item.zxl==null?0:item.zxl}}%</view>
- </view>
- </view>
- </view>
- </view> -->
-
- <view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view>
- <!-- <view class="single">
- <view class="title" style="padding-right: 30rpx;">
- <view class="title1" style="flex: 1;">违禁能力(TOP10)</view>
- <view class="title2" style="flex: 1;justify-content: flex-end;">
- <view class="title2-che">楼盘
- <image class="righttochoose" src="../../../static/images/righttochoose.png" mode=""></image>
- </view>
- </view>
- </view>
- <view class="hejibox">
- <view class="heji">合计:50</view>
- <view class="heji">均值:25</view>
- </view>
- <view class="uchaserbox">
- <qiun-data-charts
- type="radar"
- :chartData="chartData"
- :canvas2d="true"
- canvasId="wangxiaohuaerlingeryilingwuyib89"
- background="none"
- />
- </view>
- </view> -->
-
- <u-calendar v-model="totalTimeShow" mode="range" @change="totalTimeChange"></u-calendar>
- </view>
- </template>
-
- <script>
- var app = getApp();
- var util = require("../../../utils/util.js");
- var config = require("../../../config");
- export default {
- data() {
- return {
- activeTotal: 2,
- activeTotal2: 0,
- bocindex:0,
- totalTimeShow: false,
- // 楼盘id
- houseId:'',
- lastStartDate:'',
- lastEndDate :'',
- newTeam1:'',
- newAvg1:'',
- newTeam2:'',
- newAvg2:'',
- newTeam3:'',
- newAvg3:'',
- newTeam4:'',
- newAvg4:'',
- newlisttabinfo1:[
- {name:'接待量',zxl:'10'},
- {name:'平均执行率',zxl:'50'},
- {name:'接待客户',zxl:'80'},
- ],
- newlisttabinfo2:[
- {name:'接待量',zxl:'10'},
- {name:'平均执行率',zxl:'50'},
- {name:'接待客户',zxl:'80'},
- ],
- newlisttabinfo3:[
- {name:'接待量',zxl:'10'},
- {name:'平均执行率',zxl:'50'},
- {name:'接待客户',zxl:'80'},
- ],
- newlisttabinfo4:[
- {name:'接待量',zxl:'10'},
- {name:'平均执行率',zxl:'50'},
- {name:'接待客户',zxl:'80'},
- ],
- chartData:{
- "categories": ["维度1","维度2","维度3","维度4","维度5","维度6"],
- "series": [
- {
- "name": "成交量",
- "data": [90,110,165,195,187,172]
- }
- ]
- }
-
- };
- },
- onLoad() {
- let that=this
- uni.$on('updateGroup',function(data){
- console.log(data)
- that.houseId=data.arr.join(',')
- // 获取销奖能力
- that.getPowerList()
- })
- this.getdata()
-
- },
- methods: {
- //指标执行率分析tab
- tapspagek2(index) {
- this.bocindex = index;
- },
- getdata(){
- // 请求接口获取接待量
- this.receptionCountList('1','/cusLvStatistics/groupComparisonReception')
- // 接待时长
- this.receptionCountList('2','/cusLvStatistics/groupComparisonReceptionTime')
- // 小将排名
- this.receptionCountList('3','/cusLvStatistics/groupComparisonTalkRank')
- // 顾问牌名
- this.receptionCountList('4','/cusLvStatistics/groupComparisonTalkRankByConsultant')
- // 销奖能力
- this.getPowerList()
- },
- //时间切换
- tabtimetap(index) {
- if (index == 3) {
- this.totalTimeShow = true;
- } else {
- this.activeTotal = index;
- this.lastEndDate=''
- this.lastStartDate=''
- this.getdata()
- // // 获取数据
- // // 团队对比接待量
- // this.receptionCountList(0,1,'/cusLvStatistics/teamAnalysisReception')
- // // 团队对比接待时长
- // this.receptionCountList(0,2,'/cusLvStatistics/teamAnalysisReceptionTime')
- // /* 销奖执行率 */
- // this.receptionCountList(0,3,'/cusLvStatistics/teamAnalysisExecutionRate')
- // // 获取销奖能力
- // this.getPowerList()
- }
- },
- // 接待时长
- receptionCountList(index,url){
- this.$u.post(url,{
- timeType:this.lastEndDate?null:this.activeTotal+'',
- lastEndDate:this.lastEndDate,
- lastStartDate:this.lastStartDate
- })
- .then(res=>{
- // console.log(res)
- let result=res.result
- this['newTeam'+index]=res.avg[0]
- this['newAvg'+index]=res.avg[1]
- // return
- // 处理数据
- // 先处理牌名数据,需要进行判断全部还是单个
- // 当为全部时
- this['newlisttabinfo'+index]=[]
- // 当选择全部时
-
- // 当两个都选择的时候
- result.map(item=>{
- let obj={}
- obj.name=item.houseName
- obj.zxl=item.data
- this['newlisttabinfo'+index].push(obj)
- })
- })
- },
- // 获取销奖能力
- getPowerList(){
- this.$u.post('/cusLvStatistics/groupComparisonMarketingAbility',{
- houseIds:this.houseId,
- timeType:this.lastEndDate?null:this.activeTotal+'',
- lastEndDate:this.lastEndDate,
- lastStartDate:this.lastStartDate
- })
- .then(res=>{
- // console.log(res,123)
- // 处理数据
- // return
- this.chartData={
- categories:[],
- series:[]
- }
- let allobj={
- categories:[],
- series:[]
- }
- res.result.map((item,index)=>{
- let obj={
- name:item[0].houseName,
- data:[]
- }
- item.map(item1=>{
- if(index==0){
- allobj.categories.push(item1.name)
- }
- obj.data.push(item1.avgExecutionRate)
- })
- allobj.series.push(obj)
- })
- // console.log(allobj)
- this.chartData=allobj
- this.$forceUpdate()
- })
- },
- //自定义时间
- totalTimeChange(e) {
- console.log(e.startDate, e.endDate)
- this.activeTotal=3;
- this.lastEndDate=e.endDate
- this.lastStartDate=e.startDate
- this.getdata()
- },
- //集团对比
- Groupcontrast(){
- uni.navigateTo({
- url: `/pages/center/Piabodata/selectGroup?ids=${this.houseId}`
- });
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- .box {
- width: 100%;
- height: 100%;
- background: #FAFAFA;
- padding-bottom: 60rpx;
- }
- </style>
|