@@ -2,9 +2,9 @@ | |||
* 小程序配置文件 | |||
*/ | |||
// 此处主机域名修改成腾讯云解决方案分配的域名 | |||
// var host = 'http://121.42.63.138:9091/autoSR/api'; // 测试站 | |||
var host = 'http://121.42.63.138:9091/autoSR/api'; // 测试站 | |||
// var host = 'http://192.168.31.163:8080/autoSR/api'; // 长龙 | |||
var host = 'http://192.168.31.128:8080/autoSR/api'; // 佳豪 | |||
// var host = 'http://192.168.31.128:8080/autoSR/api'; // 佳豪 | |||
// var host = 'http://10.2.1.104:8081/autoSR/api'; // 刘敏 | |||
// var host = 'https://zkgj.quhouse.com/api'; // 质控正式 | |||
// var host = 'https://hfju.com/api'; // 数智正式 | |||
@@ -91,7 +91,7 @@ | |||
}, | |||
"quickapp" : {}, | |||
"mp-weixin" : { | |||
"appid" : "wxb6493c296350b9db", | |||
"appid" : "wx8f883dca5ecc5510", | |||
"setting" : { | |||
"urlCheck" : false, | |||
"es6" : true, | |||
@@ -2,13 +2,13 @@ | |||
<view class="box"> | |||
<view class="boxtittab"> | |||
<view class="tabbox"> | |||
<view :class="{ activecllasscet: activeTotal == 0 }" @click="tabtimetap(0)">今日</view> | |||
<view :class="{ activecllasscet: activeTotal == 4 }" @click="tabtimetap(4)">近七天</view> | |||
</view> | |||
<view class="tabbox"> | |||
<view :class="{ activecllasscet: activeTotal == 1 }" @click="tabtimetap(1)">昨日</view> | |||
<view :class="{ activecllasscet: activeTotal == 5 }" @click="tabtimetap(5)">近15天</view> | |||
</view> | |||
<view class="tabbox"> | |||
<view :class="{ activecllasscet: activeTotal == 2 }" @click="tabtimetap(2)">近一周</view> | |||
<view :class="{ activecllasscet: activeTotal == 6 }" @click="tabtimetap(6)">近30天</view> | |||
</view> | |||
<view class="tabbox"> | |||
<view :class="{ activecllasscet: activeTotal == 3 }" @click="tabtimetap(3)">自定义</view> | |||
@@ -26,7 +26,7 @@ | |||
<view class="heji">均值:25</view> | |||
</view> | |||
<view class="jindu"> | |||
<view class="jindu-box" v-for="(item,index) in newlisttabinfo" :key="index"> | |||
<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;"> | |||
@@ -48,7 +48,7 @@ | |||
<view class="heji">均值:25</view> | |||
</view> | |||
<view class="jindu"> | |||
<view class="jindu-box" v-for="(item,index) in newlisttabinfo" :key="index"> | |||
<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;"> | |||
@@ -79,7 +79,7 @@ | |||
<view class="heji">均值:25</view> | |||
</view> | |||
<view class="jindu"> | |||
<view class="jindu-box" v-for="(item,index) in newlisttabinfo" :key="index"> | |||
<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;"> | |||
@@ -110,7 +110,7 @@ | |||
<view class="heji">均值:25</view> | |||
</view> | |||
<view class="jindu"> | |||
<view class="jindu-box" v-for="(item,index) in newlisttabinfo" :key="index"> | |||
<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;"> | |||
@@ -125,7 +125,7 @@ | |||
<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="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> | |||
@@ -150,7 +150,7 @@ | |||
<view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view> | |||
<!-- <view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view> | |||
<view class="single"> | |||
<view class="title"> | |||
<view class="title1">禁忌执行率(TOP10)</view> | |||
@@ -170,10 +170,10 @@ | |||
</view> | |||
</view> | |||
</view> | |||
</view> | |||
</view> --> | |||
<view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view> | |||
<view class="single"> | |||
<!-- <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;"> | |||
@@ -195,7 +195,7 @@ | |||
background="none" | |||
/> | |||
</view> | |||
</view> | |||
</view> --> | |||
<u-calendar v-model="totalTimeShow" mode="range" @change="totalTimeChange"></u-calendar> | |||
</view> | |||
@@ -212,7 +212,26 @@ | |||
activeTotal2: 0, | |||
bocindex:0, | |||
totalTimeShow: false, | |||
newlisttabinfo:[ | |||
// 楼盘id | |||
houseId:'', | |||
lastStartDate:'', | |||
lastEndDate :'', | |||
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'}, | |||
@@ -230,7 +249,16 @@ | |||
}; | |||
}, | |||
onLoad() { | |||
let that=this | |||
uni.$on('updateGroup',function(data){ | |||
// console.log(data) | |||
that.deptids=data.arr.join(',') | |||
// 获取销奖能力 | |||
that.getPowerList() | |||
}) | |||
// this.buildingname = uni.getStorageSync('buildingID').name; | |||
// 请求接口获取接待量 | |||
this.receptionCountList('1','/cusLvStatistics/groupComparisonReception') | |||
}, | |||
methods: { | |||
//指标执行率分析tab | |||
@@ -238,13 +266,53 @@ | |||
this.bocindex = index; | |||
}, | |||
//时间切换 | |||
//时间切换 | |||
tabtimetap(index) { | |||
if (index == 3) { | |||
this.totalTimeShow = true; | |||
} else { | |||
this.activeTotal = index; | |||
this.lastEndDate='' | |||
this.lastStartDate='' | |||
// // 获取数据 | |||
// // 团队对比接待量 | |||
// 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) | |||
}) | |||
}) | |||
}, | |||
//自定义时间 | |||
totalTimeChange(e) { | |||
console.log(e.startDate, e.endDate) | |||
@@ -57,7 +57,7 @@ | |||
<view class="heji">{{!staff2.value?'均值':staff2.label}}:{{newAvg1||0}}</view> | |||
</view> | |||
<view class="" v-if=" eharTab.active1 == 1 "> | |||
<view class="danwei">来访(人)</view> | |||
<view class="danwei">接待量</view> | |||
<view class="uchaserbox"> | |||
<qiun-data-charts | |||
type="line" | |||
@@ -103,7 +103,7 @@ | |||
<view class="heji">{{!staff2.value?'均值':staff2.label}}:{{newAvg2||0}}</view> | |||
</view> | |||
<view class="" v-if=" eharTab.active2 == 1 "> | |||
<view class="danwei">来访(人)</view> | |||
<view class="danwei">录音时长</view> | |||
<view class="uchaserbox"> | |||
<qiun-data-charts | |||
type="line" | |||
@@ -149,11 +149,11 @@ | |||
<view class="heji">{{!staff2.value?'均值':staff2.label}}:{{newAvg3||0}}</view> | |||
</view> | |||
<view class="" v-if=" eharTab.active3 == 1 "> | |||
<view class="danwei">来访(人)</view> | |||
<view class="danwei">执行率</view> | |||
<view class="uchaserbox"> | |||
<qiun-data-charts | |||
type="line" | |||
:chartData="lineOptsect4" | |||
:chartData="lineOptsect3" | |||
background="none" | |||
:ontouch="true" | |||
canvasId="wangxiaohuaerlingeryilingwuyib" | |||
@@ -208,21 +208,18 @@ | |||
<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="title1" style="flex: 1;">销奖能力</view> | |||
<view class="title2" style="flex: 1;justify-content: flex-end;" @click="goTeam"> | |||
<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" | |||
:chartData="chartData1" | |||
:canvas2d="true" | |||
canvasId="wangxiaohuaerlingeryilingwuyib88" | |||
background="none" | |||
@@ -234,7 +231,7 @@ | |||
<view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view> | |||
<view class="single"> | |||
<!-- <view class="single"> | |||
<view class="title"> | |||
<view class="title1" style="flex: 1;">禁忌执行率</view> | |||
<view class="title3" style="flex: 1;"> | |||
@@ -244,9 +241,9 @@ | |||
<view class="title3-box" @click="tabtimetap4(1)"> | |||
<view style="height: 42rpx;" :class="{ activecltab: eharTab.active4 == 1 }">趋势</view> | |||
</view> | |||
<!-- <view class="title3-box"> | |||
<view class="title3-box"> | |||
<view style="height: 42rpx;" :class="{ activecltab: activeTotal2 == 2 }">表格</view> | |||
</view> --> | |||
</view> | |||
</view> | |||
</view> | |||
<view class="hejibox"> | |||
@@ -277,10 +274,10 @@ | |||
</view> | |||
</view> | |||
</view> | |||
</view> | |||
</view> --> | |||
<view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view> | |||
<view class="single"> | |||
<!-- <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;"> | |||
@@ -302,7 +299,7 @@ | |||
background="none" | |||
/> | |||
</view> | |||
</view> | |||
</view> --> | |||
<u-calendar v-model="totalTimeShow" mode="range" @change="totalTimeChange"></u-calendar> | |||
@@ -326,6 +323,7 @@ | |||
active3:0, | |||
active4:0, | |||
}, | |||
deptids:'', | |||
bocindex:0, | |||
timepickpickisshow:false, | |||
totalTimeShow: false, | |||
@@ -427,7 +425,7 @@ | |||
newAvg3:'', | |||
newTeam4:'', | |||
newAvg4:'', | |||
chartData:{ | |||
chartData1:{ | |||
"categories": ["维度1","维度2","维度3","维度4","维度5","维度6"], | |||
"series": [ | |||
{ | |||
@@ -449,11 +447,19 @@ | |||
}; | |||
}, | |||
onLoad() { | |||
let that=this | |||
uni.$on('update',function(data){ | |||
// console.log(data) | |||
that.deptids=data.arr.join(',') | |||
// 获取销奖能力 | |||
that.getPowerList() | |||
}) | |||
// 获取楼盘id | |||
this.houseId = uni.getStorageSync('buildingID').id; | |||
// this.buildingname = uni.getStorageSync('buildingID').name; | |||
// 请求接口获取所有置业顾问员工的列表 | |||
this.getSectionList() | |||
}, | |||
methods: { | |||
//是否对比 | |||
@@ -461,15 +467,19 @@ | |||
this.timepickpickisshow=!this.timepickpickisshow; | |||
this.staff2.label='平均' | |||
this.staff2.value='' | |||
// this.getreception() | |||
// this.getRecordList() | |||
// this.getAwardList() | |||
// 团队对比接待量 | |||
this.receptionCountList(0,1,'/cusLvStatistics/teamAnalysisReception') | |||
// 团队对比接待时长 | |||
this.receptionCountList(0,2,'/cusLvStatistics/teamAnalysisReceptionTime') | |||
/* 销奖执行率 */ | |||
this.receptionCountList(0,3,'/cusLvStatistics/teamAnalysisExecutionRate') | |||
// 获取销奖能力 | |||
this.getPowerList() | |||
}, | |||
// 获取部门列表 | |||
getSectionList(){ | |||
this.$u.post('/cusLvStatistics/findAllDeptIdByHouseId',{houseId:this.houseId}) | |||
.then(res=>{ | |||
// console.log(res,'123') | |||
this.staffList=[] | |||
this.staffList1=[] | |||
res.map(item=>{ | |||
@@ -489,7 +499,14 @@ | |||
}) | |||
this.staff1=this.staffList[0] | |||
// 团队对比接待量 | |||
this.receptionCountList(0,1) | |||
this.receptionCountList(0,1,'/cusLvStatistics/teamAnalysisReception') | |||
// 团队对比接待时长 | |||
this.receptionCountList(0,2,'/cusLvStatistics/teamAnalysisReceptionTime') | |||
/* 销奖执行率 */ | |||
this.receptionCountList(0,3,'/cusLvStatistics/teamAnalysisExecutionRate') | |||
// 获取销奖能力 | |||
this.getPowerList() | |||
}) | |||
}, | |||
// 点击部门对比 | |||
@@ -513,33 +530,34 @@ | |||
this.lastEndDate='' | |||
this.lastStartDate='' | |||
// 获取数据 | |||
// this.getreception() | |||
// this.getRecordList() | |||
// this.getAwardList() | |||
// 团队对比接待量 | |||
this.receptionCountList(0,1,'/cusLvStatistics/teamAnalysisReception') | |||
// 团队对比接待时长 | |||
this.receptionCountList(0,2,'/cusLvStatistics/teamAnalysisReceptionTime') | |||
/* 销奖执行率 */ | |||
this.receptionCountList(0,3,'/cusLvStatistics/teamAnalysisExecutionRate') | |||
// 获取销奖能力 | |||
this.getPowerList() | |||
} | |||
}, | |||
// 接待量 | |||
tabtimetap1(idx){ | |||
this.eharTab.active1=idx | |||
// 调用方法 | |||
this.receptionCountList(idx,1) | |||
// this.getRecordList() | |||
this.receptionCountList(idx,1,'/cusLvStatistics/teamAnalysisReception') | |||
}, | |||
// 接待时长 | |||
tabtimetap2(idx){ | |||
this.eharTab.active2=idx | |||
console.log(2,idx) | |||
// 调用方法 | |||
// this.getRecordList() | |||
this.receptionCountList(idx,2,'/cusLvStatistics/teamAnalysisReceptionTime') | |||
}, | |||
tabtimetap3(idx){ | |||
this.eharTab.active3=idx | |||
console.log(3,idx) | |||
// 调用方法 | |||
// this.getRecordList() | |||
this.receptionCountList(idx,3,'/cusLvStatistics/teamAnalysisExecutionRate') | |||
}, | |||
tabtimetap4(idx){ | |||
console.log(4,idx) | |||
this.eharTab.active4=idx | |||
// 调用方法 | |||
// this.getRecordList() | |||
@@ -551,9 +569,14 @@ | |||
this.lastEndDate=e.endDate | |||
this.lastStartDate=e.startDate | |||
// 获取数据 | |||
// this.getreception() | |||
// this.getRecordList() | |||
// this.getAwardList() | |||
// 团队对比接待量 | |||
this.receptionCountList(0,1,'/cusLvStatistics/teamAnalysisReception') | |||
// 团队对比接待时长 | |||
this.receptionCountList(0,2,'/cusLvStatistics/teamAnalysisReceptionTime') | |||
/* 销奖执行率 */ | |||
this.receptionCountList(0,3,'/cusLvStatistics/teamAnalysisExecutionRate') | |||
// 获取销奖能力 | |||
this.getPowerList() | |||
}, | |||
//指标执行率分析tab | |||
tapspagek2(index) { | |||
@@ -568,7 +591,7 @@ | |||
// 去选择团队 | |||
goTeam(){ | |||
uni.navigateTo({ | |||
url:'/pages/center/Piabodata/selectTeam' | |||
url:`/pages/center/Piabodata/selectTeam?ids=${this.deptids}` | |||
}) | |||
}, | |||
staffSelectCallback(e){ | |||
@@ -598,9 +621,14 @@ | |||
return | |||
}else{ | |||
// 获取数据 | |||
// this.getreception() | |||
// this.getRecordList() | |||
// this.getAwardList() | |||
// 团队对比接待量 | |||
this.receptionCountList(0,1,'/cusLvStatistics/teamAnalysisReception') | |||
// 团队对比接待时长 | |||
this.receptionCountList(0,2,'/cusLvStatistics/teamAnalysisReceptionTime') | |||
/* 销奖执行率 */ | |||
this.receptionCountList(0,3,'/cusLvStatistics/teamAnalysisExecutionRate') | |||
// 获取销奖能力 | |||
this.getPowerList() | |||
} | |||
}, | |||
// 团队对比接待量 | |||
@@ -745,8 +773,8 @@ | |||
// }) | |||
// }, | |||
// 接待时长 | |||
receptionCountList(idx,index){ | |||
this.$u.post('/cusLvStatistics/teamAnalysisReception',{ | |||
receptionCountList(idx,index,url){ | |||
this.$u.post(url,{ | |||
// userA:this.staff1.value, | |||
// userB:this.staff2.value, | |||
deptIds:[this.staff1.value,this.staff2.value].filter(item=>item).join(','), | |||
@@ -815,10 +843,6 @@ | |||
}else{ | |||
// 当选择趋势时 | |||
this['lineOptsect'+index]={} | |||
// this.lineOptsect={ | |||
// categories:[], | |||
// series:[] | |||
// } | |||
let allobj={ | |||
categories:[], | |||
series:[] | |||
@@ -826,7 +850,6 @@ | |||
// 先处理时间 | |||
// 当选择全部时 | |||
if(!this.staff1.value&&!this.staff2.value){ | |||
// console.log(1) | |||
result.map((item,idx)=>{ | |||
let obj={} | |||
obj.name=item[0].deptName | |||
@@ -836,7 +859,7 @@ | |||
if(idx==0){ | |||
allobj.categories.push(item1.statDate.slice(5,10)) | |||
} | |||
obj.data.push(item1.receptionCount) | |||
obj.data.push(item1.data) | |||
}) | |||
allobj.series.push(obj) | |||
}) | |||
@@ -849,7 +872,7 @@ | |||
obj.name=result[0][0].deptName | |||
result[0].map(item=>{ | |||
allobj.categories.push(item.statDate.slice(5,10)) | |||
obj.data.push(item.receptionCount) | |||
obj.data.push(item.data) | |||
}) | |||
allobj.series.push(obj) | |||
// 判断是否显示平均 | |||
@@ -859,7 +882,7 @@ | |||
obj.data=[] | |||
obj.name='平均' | |||
result[1].map(item=>{ | |||
obj.data.push(item.receptionCount) | |||
obj.data.push(item.data) | |||
}) | |||
allobj.series.push(obj) | |||
} | |||
@@ -874,21 +897,112 @@ | |||
obj1.name=result[1][0].deptName | |||
result[0].map(item=>{ | |||
allobj.categories.push(item.statDate.slice(5,10)) | |||
obj.data.push(item.receptionCount) | |||
obj.data.push(item.data) | |||
}) | |||
result[1].map(item=>{ | |||
obj1.data.push(item.receptionCount) | |||
obj1.data.push(item.data) | |||
}) | |||
allobj.series.push(obj) | |||
allobj.series.push(obj1) | |||
} | |||
console.log(allobj) | |||
// console.log(allobj) | |||
// return | |||
this['lineOptsect'+index].series=allobj.series | |||
this['lineOptsect'+index].categories=allobj.categories | |||
// this.lineOptsect1=allobj | |||
this['lineOptsect'+index]=allobj | |||
// this['lineOptsect'+index].series=allobj.series | |||
// this['lineOptsect'+index].categories=allobj.categories | |||
} | |||
}) | |||
}, | |||
// 获取销奖能力 | |||
getPowerList(){ | |||
this.$u.post('/cusLvStatistics/teamAnalysisMarketingAbility',{ | |||
deptIds:this.deptids||[this.staff1.value,this.staff2.value].filter(item=>item).join(','), | |||
houseId:this.houseId, | |||
timeType:this.lastEndDate?null:this.activeTotal+'', | |||
lastEndDate:this.lastEndDate, | |||
lastStartDate:this.lastStartDate | |||
}) | |||
.then(res=>{ | |||
// console.log(res) | |||
// 处理数据 | |||
this.chartData1={ | |||
categories:[], | |||
series:[] | |||
} | |||
let allobj={ | |||
categories:[], | |||
series:[] | |||
} | |||
// 当选择全部时 | |||
if(!this.staff1.value&&!this.staff2.value){ | |||
// let first=res.first | |||
res.first.map((item,index)=>{ | |||
let obj={ | |||
name:item[0].deptName, | |||
data:[] | |||
} | |||
item.map((item1)=>{ | |||
if(index==0){ | |||
allobj.categories.push(item1.name) | |||
} | |||
obj.data.push(item1.avgExecutionRate) | |||
}) | |||
allobj.series.push(obj) | |||
}) | |||
} | |||
// 当选择只有一个时 | |||
else if(this.staff1.value&&!this.staff2.value){ | |||
res.first.map((item,index)=>{ | |||
let obj={ | |||
name:item[0].deptName, | |||
data:[] | |||
} | |||
item.map((item1)=>{ | |||
if(index==0){ | |||
allobj.categories.push(item1.name) | |||
} | |||
obj.data.push(item1.avgExecutionRate) | |||
}) | |||
allobj.series.push(obj) | |||
}) | |||
// 判断是否显示平均 | |||
// 如果显示对比 | |||
if(this.timepickpickisshow){ | |||
res.second.map((item,index)=>{ | |||
let obj={ | |||
name:'平均', | |||
data:[] | |||
} | |||
item.map((item1)=>{ | |||
obj.data.push(item1.avgExecutionRate) | |||
}) | |||
allobj.series.push(obj) | |||
}) | |||
} | |||
}else{ | |||
// console.log(3) | |||
// 当两个都选择的时候 | |||
res.first.map((item,index)=>{ | |||
let obj={ | |||
name:item[0].deptName, | |||
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.chartData1=allobj | |||
this.$forceUpdate() | |||
}) | |||
}, | |||
} | |||
}; | |||
</script> | |||
@@ -0,0 +1,150 @@ | |||
<template> | |||
<view class="box"> | |||
<!-- 顾问选择 --> | |||
<view class="nextcon"> | |||
最多选择五项 | |||
</view> | |||
<view class="content"> | |||
<scroll-view style="height: 1170rpx;" scroll-y="true" > | |||
<checkbox-group v-model="value" @change="checkboxChange"> | |||
<view v-for="(item,index) in items" :key="index"> | |||
<view class="content-tips"> | |||
<view class="left"> | |||
{{item.deptName}} | |||
</view> | |||
<view class="right"> | |||
<radio :value="item.deptId" style="transform:scale(0.8)" color="#2671E2" :checked="item.checked" @click="addclick(index)"></radio> | |||
</view> | |||
</view> | |||
</view> | |||
</checkbox-group> | |||
</scroll-view> | |||
<view class="zhedang"></view> | |||
<view class="btn" @click="goback"> | |||
确定 | |||
</view> | |||
</view> | |||
</view> | |||
</template> | |||
<script> | |||
export default { | |||
data(){ | |||
return{ | |||
value:[], | |||
items:[], | |||
ids:'' | |||
} | |||
}, | |||
onLoad(e) { | |||
// 获取楼盘id | |||
// console.log(e) | |||
this.ids=e.ids | |||
this.houseId = uni.getStorageSync('buildingID').id; | |||
this.getSectionList() | |||
}, | |||
methods:{ | |||
checkboxChange (e) { | |||
// console.log(e) | |||
}, | |||
// 获取部门列表 | |||
getSectionList(){ | |||
this.$u.post('/cusLvStatistics/findAllDeptIdByHouseId',{houseId:this.houseId}) | |||
.then(res=>{ | |||
console.log(res) | |||
res.map((item,index)=>{ | |||
if(index<5){ | |||
item.checked=true | |||
}else{ | |||
item.checked=false | |||
} | |||
}) | |||
this.items=res | |||
if(this.ids){ | |||
let arr=this.ids.split(',') | |||
this.items.map((item,index)=>{ | |||
let idx=arr.findIndex(item1=>item1==item.deptId) | |||
if(idx!=-1){ | |||
item.checked=true | |||
}else{ | |||
item.checked=false | |||
} | |||
}) | |||
} | |||
}) | |||
}, | |||
addclick(index){ | |||
this.items[index].checked=!this.items[index].checked | |||
}, | |||
goback(){ | |||
// 循环遍历所有选定的内容 | |||
let arr=[] | |||
this.items.map(item=>{ | |||
if(item.checked){ | |||
arr.push(item.deptId) | |||
} | |||
}) | |||
uni.$emit('updateGroup',{arr}) | |||
uni.navigateBack() | |||
}, | |||
} | |||
} | |||
</script> | |||
<style lang="scss" scoped> | |||
.box{ | |||
background: #F8F8F8; | |||
width: 100%; | |||
height: 100%; | |||
font-size: 30rpx; | |||
font-weight: 400; | |||
// line-height: 30px; | |||
.nextcon{ | |||
height: 78rpx; | |||
background: #F4F8FD; | |||
color: #2671E2; | |||
text-align: center; | |||
line-height: 78rpx; | |||
} | |||
.content-tips{ | |||
display: flex; | |||
justify-content: space-between; | |||
background: #fff; | |||
padding: 0 30rpx; | |||
height: 92rpx; | |||
margin-bottom: 20rpx; | |||
.left{ | |||
display: flex; | |||
// margin-top: 30rpx; | |||
font-weight: 500; | |||
color: #303030; | |||
line-height: 92rpx; | |||
font-size: 30rpx; | |||
} | |||
.right{ | |||
margin: 24rpx 0; | |||
} | |||
} | |||
.btn{ | |||
width: 690rpx; | |||
height: 88rpx; | |||
background: #2671E2; | |||
border-radius: 8rpx; | |||
font-size: 32rpx; | |||
font-weight: 400; | |||
color: #FFFFFF; | |||
line-height: 88rpx; | |||
text-align: center; | |||
position: fixed; | |||
left: 30rpx; | |||
bottom: 80rpx; | |||
} | |||
.zhedang{ | |||
height: 168rpx; | |||
opacity: 0; | |||
} | |||
} | |||
</style> |
@@ -5,19 +5,25 @@ | |||
最多选择五项 | |||
</view> | |||
<view class="content"> | |||
<scroll-view style="height: 1170rpx;" scroll-y="true" > | |||
<checkbox-group v-model="value" @change="checkboxChange"> | |||
<view v-for="(item,index) in items" :key="index"> | |||
<view class="content-tips"> | |||
<view class="left"> | |||
{{item.name}} | |||
{{item.deptName}} | |||
</view> | |||
<view class="right"> | |||
<radio :value="item.value" style="transform:scale(0.8)" color="#2671E2" :checked="item.checked" @click="addclick(index)"></radio> | |||
<radio :value="item.deptId" style="transform:scale(0.8)" color="#2671E2" :checked="item.checked" @click="addclick(index)"></radio> | |||
</view> | |||
</view> | |||
</view> | |||
</checkbox-group> | |||
</scroll-view> | |||
<view class="zhedang"></view> | |||
<view class="btn" @click="goback"> | |||
确定 | |||
</view> | |||
</view> | |||
</view> | |||
</template> | |||
@@ -27,28 +33,62 @@ | |||
data(){ | |||
return{ | |||
value:[], | |||
items:[ | |||
{ | |||
name:'销售一部', | |||
value:'0', | |||
checked:false | |||
}, | |||
{ | |||
name:'销售二部', | |||
value:'1', | |||
checked:false | |||
}, | |||
] | |||
items:[], | |||
ids:'' | |||
} | |||
}, | |||
onLoad(e) { | |||
// 获取楼盘id | |||
// console.log(e) | |||
this.ids=e.ids | |||
this.houseId = uni.getStorageSync('buildingID').id; | |||
this.getSectionList() | |||
}, | |||
methods:{ | |||
checkboxChange (e) { | |||
console.log(e) | |||
// console.log(e) | |||
}, | |||
addclick(index){ | |||
// 获取部门列表 | |||
getSectionList(){ | |||
this.$u.post('/cusLvStatistics/findAllDeptIdByHouseId',{houseId:this.houseId}) | |||
.then(res=>{ | |||
console.log(res) | |||
res.map((item,index)=>{ | |||
if(index<5){ | |||
item.checked=true | |||
}else{ | |||
item.checked=false | |||
} | |||
}) | |||
this.items=res | |||
if(this.ids){ | |||
let arr=this.ids.split(',') | |||
this.items.map((item,index)=>{ | |||
let idx=arr.findIndex(item1=>item1==item.deptId) | |||
if(idx!=-1){ | |||
item.checked=true | |||
}else{ | |||
item.checked=false | |||
} | |||
}) | |||
} | |||
}) | |||
}, | |||
addclick(index){ | |||
this.items[index].checked=!this.items[index].checked | |||
} | |||
}, | |||
goback(){ | |||
// 循环遍历所有选定的内容 | |||
let arr=[] | |||
this.items.map(item=>{ | |||
if(item.checked){ | |||
arr.push(item.deptId) | |||
} | |||
}) | |||
uni.$emit('update',{arr}) | |||
uni.navigateBack() | |||
}, | |||
} | |||
} | |||
@@ -88,5 +128,23 @@ | |||
margin: 24rpx 0; | |||
} | |||
} | |||
.btn{ | |||
width: 690rpx; | |||
height: 88rpx; | |||
background: #2671E2; | |||
border-radius: 8rpx; | |||
font-size: 32rpx; | |||
font-weight: 400; | |||
color: #FFFFFF; | |||
line-height: 88rpx; | |||
text-align: center; | |||
position: fixed; | |||
left: 30rpx; | |||
bottom: 80rpx; | |||
} | |||
.zhedang{ | |||
height: 168rpx; | |||
opacity: 0; | |||
} | |||
} | |||
</style> |
@@ -2,12 +2,12 @@ | |||
<view class="box"> | |||
<!-- 顾问选择 --> | |||
<view class="nextcon"> | |||
下一位接待顾问:毛丫丫 | |||
下一位接待顾问:{{agentList[0].name||'没有下一位了'}} | |||
</view> | |||
<view class="tab"> | |||
<view class="tabbox"> | |||
<!-- <view class="tabbox"> | |||
<view :class="{ activecllasscet: activeTotal == 0 }" @click="tabtimetap(0)">全部</view> | |||
</view> | |||
</view> --> | |||
<view class="tabbox"> | |||
<view :class="{ activecllasscet: activeTotal == 1 }" @click="tabtimetap(1)">正在接待</view> | |||
</view> | |||
@@ -16,53 +16,36 @@ | |||
</view> | |||
</view> | |||
<view class="content"> | |||
<view class="content-tips"> | |||
<view class="top"> | |||
<view class="tit"> | |||
<view class="img"> | |||
宋 | |||
<view v-if="activeAgentList.length>0"> | |||
<view v-for="(item,index) in activeAgentList" :key="index"> | |||
<view class="content-tips"> | |||
<view class="top"> | |||
<view class="tit"> | |||
<view class="img"> | |||
{{item.name.slice(0,1)}} | |||
</view> | |||
<view class="test"> | |||
{{item.name}} | |||
</view> | |||
</view> | |||
<view class="state"> | |||
<view class="point" v-if="activeTotal==1"></view> | |||
{{activeTotal==1?'接待中':'空闲'}} | |||
</view> | |||
</view> | |||
<view class="test"> | |||
宋幸运 | |||
<view class="reception"> | |||
<view class=""> | |||
今日接待:<test class="num">{{item.receiveNum||0}}</test> | |||
</view> | |||
<view class="btn" @click="changeAgentStatus(item.agentId)"> | |||
{{activeTotal==1?'暂停':'恢复'}} | |||
</view> | |||
</view> | |||
</view> | |||
<view class="state"> | |||
<view class="point"></view> | |||
接待中 | |||
</view> | |||
</view> | |||
<view class="reception"> | |||
<view class=""> | |||
今日接待:<test class="num">4</test> | |||
</view> | |||
<view class="btn"> | |||
暂停 | |||
</view> | |||
</view> | |||
</view> | |||
<view class="content-tips"> | |||
<view class="top"> | |||
<view class="tit"> | |||
<view class="img"> | |||
宋 | |||
</view> | |||
<view class="test"> | |||
宋幸运 | |||
</view> | |||
</view> | |||
<view class="state"> | |||
<!-- <view class="point"></view> --> | |||
<text style="color: #666666;">暂停接待</text> | |||
</view> | |||
</view> | |||
<view class="reception"> | |||
<view class=""> | |||
今日接待:<test class="num">4</test> | |||
</view> | |||
<view class="btn"> | |||
恢复 | |||
</view> | |||
</view> | |||
<view class="nolist" v-else> | |||
暂无数据 | |||
</view> | |||
</view> | |||
</view> | |||
@@ -73,14 +56,66 @@ | |||
data(){ | |||
return{ | |||
value:"", | |||
activeTotal: 0, | |||
activeTotal: 1, | |||
agentList:[], | |||
pausedAgentList:[], | |||
houseId:'' | |||
} | |||
}, | |||
onLoad() { | |||
this.houseId = uni.getStorageSync('buildingID').id; | |||
this.changeAgentListShow() | |||
this.changePausedAgentListShow() | |||
}, | |||
computed: { | |||
activeAgentList() { | |||
return this.activeTotal == 1 ? this.agentList : this.pausedAgentList | |||
}, | |||
}, | |||
methods:{ | |||
tabtimetap(idx){ | |||
console.log(idx) | |||
// console.log(idx) | |||
this.activeTotal=idx | |||
} | |||
}, | |||
changeAgentListShow() { | |||
this.$u.get("/zkAgentPool/nextFreeAgent?itemId="+this.houseId).then(res => { | |||
this.agentList = res; | |||
}) | |||
}, | |||
// 获取暂停的经纪人列表 | |||
changePausedAgentListShow() { | |||
this.$u.get("/zkAgentPool/stopAgentList?itemId="+this.houseId).then(res => { | |||
this.pausedAgentList = res; | |||
}) | |||
}, | |||
changeAgentStatus(id) { | |||
let content = ""; | |||
if (this.activeTotal == 1) { | |||
content = "确定当前顾问暂停接待?"; | |||
} else { | |||
content = "确定取消暂停?"; | |||
} | |||
uni.showModal({ | |||
content, | |||
cancelColor: "#999999", | |||
success: res => { | |||
if (res.confirm) { | |||
this.$u.get("/zkAgentPool/update", { | |||
agentId: id, | |||
status: this.activeTotal == 1 ? 2 : 0 | |||
}).then(res => { | |||
uni.showToast({ | |||
icon: "none", | |||
title: "操作成功", | |||
}) | |||
this.changeAgentListShow() | |||
this.changePausedAgentListShow() | |||
}) | |||
} | |||
}, | |||
}) | |||
}, | |||
} | |||
} | |||
</script> | |||
@@ -188,4 +223,10 @@ | |||
} | |||
} | |||
.nolist{ | |||
text-align: center; | |||
height: 300rpx; | |||
color: #CCCCCC; | |||
line-height: 300rpx; | |||
} | |||
</style> |
@@ -1,6 +1,6 @@ | |||
// const baseUrl = 'http://121.42.63.138:9091/autoSR/api';// 测试站 | |||
// const baseUrl = 'http://192.168.31.161:8080/autoSR/api'; // 长龙 | |||
const baseUrl = 'http://192.168.31.128:8080/autoSR/api'; // 佳豪 | |||
const baseUrl = 'http://192.168.31.161:8080/autoSR/api'; // 长龙 | |||
// const baseUrl = 'http://192.168.31.128:8080/autoSR/api'; // 佳豪 | |||
// const baseUrl = 'http://10.2.1.104:8081/autoSR/api'; // 刘敏 | |||
// const baseUrl = 'https://zkgj.quhouse.com/api'; // 质控正式 | |||
// const baseUrl = 'https://hfju.com/api'; // 数智正式 | |||