|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618 |
- <template>
- <view class="box">
-
- <view class="boxtittabs">
- <div class="items" @tap="screenShow = true">{{ showTimeText }}<u-icon name="arrow-down" size="24" style="padding-left: 12rpx"></u-icon></div>
- <div class="items" @tap="showTemplate = true">{{ showBeText }}<u-icon name="arrow-down" size="24" style="padding-left: 12rpx"></u-icon></div>
- </view>
-
- <!-- 接待量排名(TOP10) -->
- <view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view>
- <view class="single">
- <view class="title">
- <view class="title1" style="flex: 1;">接待量排名(TOP10)</view>
- </view>
- <view class="hejisan">
- <view class="sanbox1" style="width: 33.33%;">
- <view class="text1-1">合计</view>
- <view class="text1-2">{{newlisttabinfo1.total}}</view>
- </view>
- <view class="sanbox1" style="width: 33.33%;">
- <view class="text1-1">顾问</view>
- <view class="text1-2">{{newlisttabinfo1.count}}</view>
- </view>
- <view class="sanbox1" style="width: 33.33%;">
- <view class="text1-1">人均接待量</view>
- <view class="text1-2">{{newlisttabinfo1.avg}}</view>
- </view>
- </view>
-
- <view class="jindu" style="min-height: 360rpx;">
- <view v-if="newlisttabinfo1.result.length!=0" class="jindu-box"
- v-for="(item,index) in newlisttabinfo1.result" :key="index">
- <view class="jindu-boxche" v-if="item.zxl != 0">
- <view class="jindu-name" v-if="item.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.zxl1"></u-line-progress>
- </view>
- <view class="jindu-zxl">{{item.zxl==null?0:item.zxl}}</view>
- </view>
- </view>
- <view v-if="newlisttabinfo1.result.length==0" style="width: 100%;text-align: center;margin-top: 60rpx;">
- 暂无数据
- </view>
- </view>
- </view>
-
- <!-- 销讲执行率排行(TOP10) -->
- <view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view>
- <view class="single">
- <view class="title">
- <view class="title1" style="flex: 1;">销讲执行率排行(TOP10)</view>
- </view>
- <view class="hejisan">
- <view class="sanbox1" style="width: 50%;">
- <view class="text1-1">顾问</view>
- <view class="text1-2">{{newlisttabinfo3.count}}</view>
- </view>
- <view class="sanbox1" style="width: 50%;">
- <view class="text1-1">人均执行率</view>
- <view class="text1-2">{{newlisttabinfo3.avg}}</view>
- </view>
- </view>
- <view class="jindu" style="min-height: 360rpx;">
- <view v-if="newlisttabinfo3.result.length!=0" class="jindu-box"
- v-for="(item,index) in newlisttabinfo3.result" :key="index">
- <view class="jindu-boxche" v-if="item.zxl != 0">
- <view class="jindu-name" v-if="item.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.zxl1"></u-line-progress>
- </view>
- <view class="jindu-zxl">{{item.zxl==null?0:item.zxl}}</view>
- </view>
- </view>
- <view v-if="newlisttabinfo3.result.length==0" style="width: 100%;text-align: center;margin-top: 60rpx;">
- 暂无数据
- </view>
- </view>
- </view>
-
- <!-- 录音时长(TOP10) -->
- <view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view>
- <view class="single">
- <view class="title">
- <view class="title1" style="flex: 1;">录音时长(TOP10)</view>
- </view>
- <view class="hejisan">
- <view class="sanbox1" style="width: 33.33%;">
- <view class="text1-1">合计</view>
- <view class="text1-2">{{newlisttabinfo2.total}}</view>
- </view>
- <view class="sanbox1" style="width: 33.33%;">
- <view class="text1-1">顾问</view>
- <view class="text1-2">{{newlisttabinfo2.count}}</view>
- </view>
- <view class="sanbox1" style="width: 33.33%;">
- <view class="text1-1">人均录音时长</view>
- <view class="text1-2">{{newlisttabinfo2.avg}}</view>
- </view>
- </view>
- <view class="jindu" style="min-height: 360rpx;">
- <view v-if="newlisttabinfo2.result.length!=0" class="jindu-box"
- v-for="(item,index) in newlisttabinfo2.result" :key="index">
- <view class="jindu-boxche" v-if="item.zxl != 0">
- <view class="jindu-name" v-if="item.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.zxl1"></u-line-progress>
- </view>
- <view class="jindu-zxl">{{item.zxl==null?0:item.zxl}}</view>
- </view>
- </view>
- <view v-if="newlisttabinfo2.result.length==0" style="width: 100%;text-align: center;margin-top: 60rpx;">
- 暂无数据
- </view>
- </view>
- </view>
-
- <!-- 违禁次数排名(TOP10 -->
- <view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view>
- <view class="single">
- <view class="title">
- <view class="title1" style="flex: 1;">违禁次数排名(TOP10)</view>
- </view>
- <view class="hejisan">
- <view class="sanbox1" style="width: 33.33%;">
- <view class="text1-1">合计</view>
- <view class="text1-2">{{newlisttabinfo4.total}}</view>
- </view>
- <view class="sanbox1" style="width: 33.33%;">
- <view class="text1-1">顾问</view>
- <view class="text1-2">{{newlisttabinfo4.count}}</view>
- </view>
- <view class="sanbox1" style="width: 33.33%;">
- <view class="text1-1">人均违禁次数</view>
- <view class="text1-2">{{newlisttabinfo4.avg}}</view>
- </view>
- </view>
- <view class="jindu" style="min-height: 360rpx;">
- <view v-if="newlisttabinfo4.result.length!=0" class="jindu-box"
- v-for="(item,index) in newlisttabinfo4.result" :key="index">
- <view class="jindu-boxche" v-if="item.zxl != 0">
- <view class="jindu-name" v-if="item.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.zxl1"></u-line-progress>
- </view>
- <view class="jindu-zxl">{{item.zxl==null?0:item.zxl}}</view>
- </view>
- </view>
- <view v-if="newlisttabinfo4.result.length==0" style="width: 100%;text-align: center;margin-top: 60rpx;">
- 暂无数据
- </view>
- </view>
- </view>
-
- <!-- 接待未标顾问(TOP10) -->
- <view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view>
- <view class="single">
- <view class="title">
- <view class="title1" style="flex: 1;">接待未标顾问(TOP10)</view>
- </view>
- <view class="hejisan">
- <view class="sanbox1" style="width: 33.33%;">
- <view class="text1-1">合计</view>
- <view class="text1-2">{{newlisttabinfo5.total}}</view>
- </view>
- <view class="sanbox1" style="width: 33.33%;">
- <view class="text1-1">顾问</view>
- <view class="text1-2">{{newlisttabinfo5.count}}</view>
- </view>
- <view class="sanbox1" style="width: 33.33%;">
- <view class="text1-1">均值</view>
- <view class="text1-2">{{newlisttabinfo5.avg}}</view>
- </view>
- </view>
- <view class="jindu" style="min-height: 360rpx;">
- <view v-if="newlisttabinfo5.result.length!=0" class="jindu-box"
- v-for="(item,index) in newlisttabinfo5.result" :key="index">
- <view class="jindu-boxche" v-if="item.zxl != 0">
- <view class="jindu-name" v-if="item.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.zxl1"></u-line-progress>
- </view>
- <view class="jindu-zxl">{{item.zxl==null?0:item.zxl}}</view>
- </view>
- </view>
- <view v-if="newlisttabinfo5.result.length==0" style="width: 100%;text-align: center;margin-top: 60rpx;">
- 暂无数据
- </view>
- </view>
- </view>
-
- <!--平均需求挖掘率排名(TOP10) -->
- <view style="width: 100%;height: 20rpx;background: #FAFAFA;" v-if="wajue"></view>
- <view class="single" v-if="wajue">
- <view class="title">
- <view class="title1" style="flex: 1;">平均需求挖掘率排名(TOP10)</view>
- </view>
- <view class="hejisan">
- <view class="sanbox1" style="width: 50%;">
- <view class="text1-1">楼盘总数</view>
- <view class="text1-2">{{newlisttabinfo6.total}}</view>
- </view>
- <view class="sanbox1" style="width: 50%;">
- <view class="text1-1">平均挖掘率</view>
- <view class="text1-2">{{newlisttabinfo6.avg}}</view>
- </view>
- </view>
- <view class="jindu" style="min-height: 360rpx;">
- <view v-if="newlisttabinfo6.result.length!=0" class="jindu-box"
- v-for="(item,index) in newlisttabinfo6.result" :key="index">
- <view class="jindu-boxche" v-if="item.zxl != 0">
- <view class="jindu-name" v-if="item.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.zxl1"></u-line-progress>
- </view>
- <view class="jindu-zxl">{{item.zxl==null?0:item.zxl}}</view>
- </view>
- </view>
- <view v-if="newlisttabinfo6.result.length==0" style="width: 100%;text-align: center;margin-top: 60rpx;">
- 暂无数据
- </view>
- </view>
- </view>
-
- <u-calendar v-model="totalTimeShow" mode="range" @change="totalTimeChange"></u-calendar>
-
-
- <!-- 更多筛选 -->
- <u-popup v-model="screenShow" mode="bottom" height="368">
- <view class="screen">
- <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天')">近15天</view>
- </view>
- <view class="tabbox">
- <view :class="{ activecllasscet: activeTotal == 6 }" @click="tabtimetap(6, '近30天')">近30天</view>
- </view>
- <view class="tabbox">
- <view :class="{ activecllasscet: activeTotal == 3 }" @click="tabtimetap(3, '自定义')">自定义</view>
- </view>
- </view>
- </view>
- </u-popup>
-
- <!-- 销讲业务 -->
- <u-select :mask-close-able="false" label-name="templateName" value-name="id" v-model="showTemplate"
- mode="single-column" :list="templateList" @cancel="templateCancel" @confirm="templateConfirm"></u-select>
-
- </view>
- </template>
-
- <script>
- var app = getApp();
- var util = require("../../../utils/util.js");
- var config = require("../../../config");
- export default {
- data() {
- return {
- wajue: false,
- activeTotal: 4,
- totalTimeShow: false,
- // 项目id
- houseId: '',
- lastEndDate: '',
- lastStartDate: '',
- newlisttabinfo1: {
- avg: '',
- count: '',
- total: '',
- result: [],
- },
- newlisttabinfo2: {
- avg: '',
- count: '',
- total: '',
- result: [],
- },
- newlisttabinfo3: {
- avg: '',
- count: '',
- total: '',
- result: [],
- },
- newlisttabinfo4: {
- avg: '',
- count: '',
- total: '',
- result: [],
- },
- newlisttabinfo5: {
- avg: '',
- count: '',
- total: '',
- result: [],
- },
- newlisttabinfo6: {
- avg: '',
- count: '',
- total: '',
- result: [],
- },
-
-
-
- screenShow: false, // 时间筛选弹窗
- showTimeText: '近七天', // 展示文字
- showBeText: '全部业务', //
- templateList: [], // 销讲业务
- showTemplate: false, // 展示选择销讲业务弹窗
- marketingBusiness: '', // 选择的业务id
-
- };
- },
- onLoad(option) {
- // 获取项目id
- this.houseId = uni.getStorageSync('buildingID').id;
- this.init()
- if (option.type == 1) {
- this.totalTimeChange({
- startDate: option.staTime,
- endDate: option.endtime
- })
- }
- this.getMarketingBusiness()
- },
- onPullDownRefresh() {
- this.init()
- this.getMarketingBusiness()
- setTimeout(function() {
- uni.stopPullDownRefresh();
- }, 1000);
- },
- methods: {
-
-
- // 销讲业务方法
- templateCancel() {
- this.showTemplate = false;
- },
-
- // 确认选择销讲业务
- templateConfirm(e) {
- this.showTemplate = false;
- this.marketingBusiness = e[0].value
- this.showBeText = e[0].label
- this.init()
- },
-
-
- // 获取销讲业务
- getMarketingBusiness() {
- this.$u.get('/customer/marketingBusiness', {
- houseId: uni.getStorageSync('buildingID').id,
- }).then(res => {
- this.templateList = res
- this.templateList.unshift({
- templateName: '全部业务',
- id: ''
- })
- })
- },
-
- init() {
- this.newlisttabinfo1 = {
- avg: '',
- count: '',
- total: '',
- result: [],
- }
- this.newlisttabinfo2 = {
- avg: '',
- count: '',
- total: '',
- result: [],
- }
- this.newlisttabinfo3 = {
- avg: '',
- count: '',
- total: '',
- result: [],
- }
- this.newlisttabinfo4 = {
- avg: '',
- count: '',
- total: '',
- result: [],
- }
- this.newlisttabinfo4 = {
- avg: '',
- count: '',
- total: '',
- result: [],
- }
-
- var activeTotal = 0;
- if (this.activeTotal == 3) {
- activeTotal = null;
- } else {
- activeTotal = this.activeTotal;
- this.lastEndDate = '';
- this.lastStartDate = '';
- }
- var promse = {
- timeType: activeTotal,
- lastStartDate: this.lastStartDate,
- lastEndDate: this.lastEndDate,
- houseId: this.houseId,
- marketingBusiness: this.marketingBusiness,
- }
- this.staffStatisticsReceptionTop10(promse)
- this.staffStatisticsRecordingTimTop10(promse)
- this.staffStatisticsExecutionRateTop10(promse)
- this.staffStatisticsProhibitedTop10(promse)
- this.staffStatisticsUnlabeledTop10(promse)
- this.wordlevelTop10(promse)
- },
- //接待量排名
- staffStatisticsReceptionTop10(promse) {
- this.$u.post('/cusLvStatistics/staffStatisticsReceptionTop10', promse).then(res => {
- res.result.forEach(item => {
- item.zxl = item.data
- item.name = item.accountName
- })
- res.result = this.dealData(res.result)
- this.newlisttabinfo1 = res;
- })
- },
- //录音时长
- staffStatisticsRecordingTimTop10(promse) {
- this.$u.post('/cusLvStatistics/staffStatisticsRecordingTimTop10', promse).then(res => {
- res.result.forEach(item => {
- item.zxl = item.data
- item.name = item.accountName
- })
- res.result = this.dealData(res.result)
- this.newlisttabinfo2 = res;
- })
- },
- //销讲
- staffStatisticsExecutionRateTop10(promse) {
- this.$u.post('/cusLvStatistics/staffStatisticsExecutionRateTop10', promse).then(res => {
- res.result.forEach(item => {
- item.zxl = item.data;
- item.zxl1 = item.data;
- item.name = item.accountName
- })
- this.newlisttabinfo3 = res;
- })
- },
- // j禁忌
- staffStatisticsProhibitedTop10(promse) {
- this.$u.post('/cusLvStatistics/staffStatisticsProhibitedTop10', promse).then(res => {
- res.result.forEach(item => {
- item.zxl = item.data
- item.name = item.accountName
- })
- res.result = this.dealData(res.result)
- this.newlisttabinfo4 = res;
- })
- },
-
- // 未标记客户数量排名
- staffStatisticsUnlabeledTop10(promse) {
- this.$u.post('/cusLvStatistics/staffStatisticsUnlabeledTop', promse).then(res => {
- res.result.forEach(item => {
- item.zxl = item.tagCustomer
- item.name = item.accountName
- })
- res.result = this.dealData(res.result)
- this.newlisttabinfo5 = res;
- })
- },
- // 平均需求挖掘率排名
- wordlevelTop10(promse) {
- this.$u.post('/cusLvStatistics/staffStatisticsUnlabeledTop', promse).then(res => {
- res.result.forEach(item => {
- item.zxl = item.tagCustomer
- item.name = item.accountName
- })
- res.result = this.dealData(res.result)
- this.newlisttabinfo6 = res;
- })
- },
-
- //自定义时间
- totalTimeChange(e) {
- console.log(e.startDate, e.endDate)
- this.screenShow = false
- this.showTimeText = `${e.startDate}-${e.endDate}`
- this.activeTotal = 3;
- this.lastEndDate = e.endDate
- this.lastStartDate = e.startDate
- this.init()
- },
- //时间切换
- tabtimetap(index, text) {
- if (index == 3) {
- this.totalTimeShow = true;
- this.screenShow = false
- } else {
- this.screenShow = false
- this.showTimeText = text
- this.activeTotal = index;
- this.lastEndDate = '';
- this.lastStartDate = '';
- this.init()
- }
- },
- // 定义一个公共方法对数据进行处理
- dealData(arr) {
- // 获取最大值
- let num = Math.max.apply(Math, arr.map(function(o) {
- return o.zxl
- })) //结果:3
- // console.log(num)
- // if(num>100){
- // // 获取最大值的下标
- // // let idx=arr.findIndex(item=>item.zxl==num)
- // // console.log(idx,123)
- // arr.map(item=>{
- // item.zxl1=Math.floor(item.zxl/num*100)
- // })
- // // console.log(arr)
- // return arr
- // }else{
- // arr.map(item=>{
- // item.zxl1=item.zxl
- // })
- // return arr
- // }
- arr.map(item => {
- item.zxl1 = Math.floor(item.zxl / num * 100)
- })
- return arr
-
- },
- }
- };
- </script>
- <style lang="scss" scoped>
- .boxtittabs {
- width: 100%;
- height: 92rpx;
- background: #FFFFFF;
- display: flex;
- align-items: center;
-
- .items {
- padding: 0 24rpx;
- width: 50%;
- height: 100%;
- display: flex;
- align-items: center;
- justify-content: center;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- }
- }
-
- .screen {
- width: 100%;
-
- .boxtittab {
- width: 100%;
- flex-direction: column;
- border: none;
- .tabbox {
- width: 100%;
- }
- }
- }
-
-
- .box {
- width: 100%;
- height: 100%;
- background: #FAFAFA;
- }
-
- .single {
- min-height: 500rpx;
-
- .jindu {
- height: auto;
- min-height: 360rpx;
- }
- }
-
- .hejisan {
- width: 92%;
- margin: 0 auto;
- display: flex;
- padding-top: 20rpx;
- padding-bottom: 20rpx;
-
- .sanbox1 {
- text-align: center;
- }
-
- .text1-1 {
- color: #666666;
- }
-
- .text1-2 {
- color: #333333;
- margin-top: 10rpx;
- }
- }
- </style>
|