diff --git a/pages/center/Piabodata/Customerportrait/Receivedetailabout.vue b/pages/center/Piabodata/Customerportrait/Receivedetailabout.vue
index b875930..aaca173 100644
--- a/pages/center/Piabodata/Customerportrait/Receivedetailabout.vue
+++ b/pages/center/Piabodata/Customerportrait/Receivedetailabout.vue
@@ -1475,7 +1475,7 @@
clickaudeopal(item){
if(item.selected==0){
uni.navigateTo({
- url: '/pages/mine/ScoringPlaylist?customerId='+this.customerId +"&id="+item.marketingId
+ url: '/pages/mine/ScoringPlaylist?customerId='+this.customerId +"&id="+item.marketingId + '&type=0'
})
}
},
diff --git a/pages/center/Piabodata/Theteamcompared.vue b/pages/center/Piabodata/Theteamcompared.vue
index 616e528..df7bc64 100644
--- a/pages/center/Piabodata/Theteamcompared.vue
+++ b/pages/center/Piabodata/Theteamcompared.vue
@@ -14,7 +14,7 @@
自定义
-
+
{{staff1.label}}
@@ -23,10 +23,11 @@
-
-
-
- 对比
+
+
+
+ 对比
{{staff2.label}}
@@ -35,11 +36,11 @@
-
+
- 接待量
+ 接待量
排名
@@ -47,9 +48,6 @@
趋势
-
@@ -58,15 +56,11 @@
接待量
-
-
+
+
+
+
@@ -74,137 +68,93 @@
{{item.name.substring(0, 4)}}
-
+
{{item.zxl==null?0:item.zxl}}
-
+
-
- 接待时长
-
-
- 排名
-
-
- 趋势
-
-
-
-
-
- {{!staff1.value?'团队总数':staff1.label}}:{{newTeam2||0}}
- {{!staff2.value?'团队平均':staff2.label}}:{{newAvg2||0}}
+
+ 接待时长
+
+
+ 排名
-
- 录音时长
-
-
-
-
-
-
-
- {{item.name.substring(0, 4)}}
-
-
-
- {{item.zxl==null?0:item.zxl}}
-
-
+
+ 趋势
-
-
-
-
- 销讲执行率
-
-
- 排名
-
-
- 趋势
-
-
-
-
-
-
- 执行率
-
-
-
-
-
-
-
- {{item.name.substring(0, 4)}}
-
-
-
- {{item.zxl==null?0:item.zxl}}%
-
+
+
+ {{!staff1.value?'团队总数':staff1.label}}:{{newTeam2||0}}
+ {{!staff2.value?'团队平均':staff2.label}}:{{newAvg2||0}}
+
+
+ 录音时长
+
+
+
+
+
+
+
+
+
+ {{item.name.substring(0, 4)}}
+
+
+ {{item.zxl==null?0:item.zxl}}
-
+
+
+
-
-
+
+
+
+
@@ -215,22 +165,18 @@
-
+
-
+
+
+
-
-
-
-
+
+
+
+
-
+
-
+
-
+
-
-
+
+
+
+
@@ -318,133 +266,157 @@
data() {
return {
activeTotal: 4,
- eharTab:{
+ eharTab: {
active1: 0,
- active2:0,
- active3:0,
- active4:0,
+ active2: 0,
+ active3: 0,
+ active4: 0,
},
- deptids:'',
- bocindex:0,
- timepickpickisshow:false,
+ deptids: '',
+ bocindex: 0,
+ timepickpickisshow: false,
totalTimeShow: false,
- // 客户id
- houseId:'',
- staffList:[],
- staffList1:[],
- staffShow:false,
- staffShow1:false,
- staff1:{
- value:'',
- label:''
+ // 项目id
+ houseId: '',
+ staffList: [],
+ staffList1: [],
+ staffShow: false,
+ staffShow1: false,
+ staff1: {
+ value: '',
+ label: ''
},
- staff2:{
- value:'',
- label:'平均'
+ staff2: {
+ value: '',
+ label: '平均'
},
- lastStartDate:'',
- lastEndDate :'',
- selindex:[0],
- choseStaffFlag:false,
- lineOptsect1:{
- "categories": ["2016","2017","2018","2019","2020","2021"],
- "series": [
- {
+ lastStartDate: '',
+ lastEndDate: '',
+ selindex: [0],
+ choseStaffFlag: false,
+ lineOptsect1: {
+ "categories": ["2016", "2017", "2018", "2019", "2020", "2021"],
+ "series": [{
"name": "成交量1",
- "data": [35,8,25,37,4,20]
+ "data": [35, 8, 25, 37, 4, 20]
},
{
"name": "成交量2",
- "data": [40,18,45,44,10,60]
+ "data": [40, 18, 45, 44, 10, 60]
}
]
},
- lineOptsect2:{
- "categories": ["2016","2017","2018","2019","2020","2021"],
- "series": [
- {
+ lineOptsect2: {
+ "categories": ["2016", "2017", "2018", "2019", "2020", "2021"],
+ "series": [{
"name": "成交量1",
- "data": [35,8,25,37,4,20]
+ "data": [35, 8, 25, 37, 4, 20]
},
{
"name": "成交量2",
- "data": [40,18,45,44,10,60]
+ "data": [40, 18, 45, 44, 10, 60]
}
]
},
- lineOptsect3:{
- "categories": ["2016","2017","2018","2019","2020","2021"],
- "series": [
- {
+ lineOptsect3: {
+ "categories": ["2016", "2017", "2018", "2019", "2020", "2021"],
+ "series": [{
"name": "成交量1",
- "data": [35,8,25,37,4,20]
+ "data": [35, 8, 25, 37, 4, 20]
},
{
"name": "成交量2",
- "data": [40,18,45,44,10,60]
+ "data": [40, 18, 45, 44, 10, 60]
}
]
},
- lineOptsect4:{
- "categories": ["2016","2017","2018","2019","2020","2021"],
- "series": [
- {
+ lineOptsect4: {
+ "categories": ["2016", "2017", "2018", "2019", "2020", "2021"],
+ "series": [{
"name": "成交量1",
- "data": [35,8,25,37,4,20]
+ "data": [35, 8, 25, 37, 4, 20]
},
{
"name": "成交量2",
- "data": [40,18,45,44,10,60]
+ "data": [40, 18, 45, 44, 10, 60]
}
]
},
- newlisttabinfo1:[
- {name:'接待量',zxl:'10'},
- {name:'平均执行率',zxl:'50'},
- {name:'接待客户',zxl:'80'},
+ newlisttabinfo1: [{
+ name: '接待量',
+ zxl: '10'
+ },
+ {
+ name: '平均执行率',
+ zxl: '50'
+ },
+ {
+ name: '接待客户',
+ zxl: '80'
+ },
],
- newlisttabinfo2:[
- {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'},
+ newlisttabinfo3: [{
+ name: '接待量',
+ zxl: '10'
+ },
+ {
+ name: '平均执行率',
+ zxl: '50'
+ },
+ {
+ name: '接待客户',
+ zxl: '80'
+ },
],
- newlisttabinfo4:[
- {name:'接待量',zxl:'10'},
- {name:'平均执行率',zxl:'50'},
- {name:'接待客户',zxl:'80'},
+ newlisttabinfo4: [{
+ name: '接待量',
+ zxl: '10'
+ },
+ {
+ name: '平均执行率',
+ zxl: '50'
+ },
+ {
+ name: '接待客户',
+ zxl: '80'
+ },
],
- newTeam1:'',
- newAvg1:'',
- newTeam2:'',
- newAvg2:'',
- newTeam3:'',
- newAvg3:'',
- newTeam4:'',
- newAvg4:'',
- chartData1:{
- "categories": ["维度1","维度2","维度3","维度4","维度5","维度6"],
- "series": [
- {
- "name": "成交量",
- "data": [90,110,165,195,187,172]
- }
- ]
+ newTeam1: '',
+ newAvg1: '',
+ newTeam2: '',
+ newAvg2: '',
+ newTeam3: '',
+ newAvg3: '',
+ newTeam4: '',
+ newAvg4: '',
+ chartData1: {
+ "categories": ["维度1", "维度2", "维度3", "维度4", "维度5", "维度6"],
+ "series": [{
+ "name": "成交量",
+ "data": [90, 110, 165, 195, 187, 172]
+ }]
},
- chartData2:{
- "categories": ["维度1","维度2","维度3","维度4","维度5","维度6"],
- "series": [
- {
- "name": "成交量",
- "data": [90,110,165,195,187,172]
- }
- ]
+ chartData2: {
+ "categories": ["维度1", "维度2", "维度3", "维度4", "维度5", "维度6"],
+ "series": [{
+ "name": "成交量",
+ "data": [90, 110, 165, 195, 187, 172]
+ }]
},
-
+
opts: {
fontSize: 10,
extra: {
@@ -452,99 +424,130 @@
max: ''
}
}
- }
+ },
+ lineOpts: {
+ yAxis: {
+ data: [
+ {
+ max: 100,
+ min: 0,
+ }
+ ]
+ }
+ },
+
};
},
+
+ computed: {
+ showLineOptsect1() {
+ return this.lineOptsect1.series.length > 0
+ },
+ showLineOptsect2() {
+ return this.lineOptsect2.series.length > 0
+ },
+ showLineOptsect3() {
+ return this.lineOptsect3.series.length > 0
+ },
+ showChartData1() {
+ return this.chartData1.series.length > 0
+ },
+ },
+
onLoad() {
- let that=this
- uni.$on('update',function(data){
+ let that = this
+ uni.$on('update', function(data) {
// console.log(data)
- that.deptids=data.arr.join(',')
+ that.deptids = data.arr.join(',')
// 获取销奖能力
that.getPowerList()
})
- // 获取客户id
+ // 获取项目id
this.houseId = uni.getStorageSync('buildingID').id;
// this.buildingname = uni.getStorageSync('buildingID').name;
// 请求接口获取所有置业顾问员工的列表
this.getSectionList()
},
- onPullDownRefresh(){
- let that=this
- uni.$on('update',function(data){
+ onPullDownRefresh() {
+ let that = this
+ uni.$on('update', function(data) {
// console.log(data)
- that.deptids=data.arr.join(',')
+ that.deptids = data.arr.join(',')
// 获取销奖能力
that.getPowerList()
})
+ // 获取项目id
+ this.houseId = uni.getStorageSync('buildingID').id;
// this.buildingname = uni.getStorageSync('buildingID').name;
// 请求接口获取所有置业顾问员工的列表
this.getSectionList()
- setTimeout(function () {
- uni.stopPullDownRefresh();
+ setTimeout(function() {
+ uni.stopPullDownRefresh();
}, 1000);
},
methods: {
//是否对比
- checkboxChange(){
- this.timepickpickisshow=!this.timepickpickisshow;
- this.staff2.label='平均'
- this.staff2.value=''
+ checkboxChange() {
+ this.timepickpickisshow = !this.timepickpickisshow;
+ this.staff2.label = '平均'
+ this.staff2.value = ''
// 团队对比接待量
- this.receptionCountList(this.eharTab.active1,1,'/cusLvStatistics/teamAnalysisReception')
+ this.receptionCountList(this.eharTab.active1, 1, '/cusLvStatistics/teamAnalysisReception')
// 团队对比接待时长
- this.receptionCountList(this.eharTab.active2,2,'/cusLvStatistics/teamAnalysisReceptionTime')
+ this.receptionCountList(this.eharTab.active2, 2, '/cusLvStatistics/teamAnalysisReceptionTime')
/* 销奖执行率 */
- this.receptionCountList(this.eharTab.active3,3,'/cusLvStatistics/teamAnalysisExecutionRate')
+ this.receptionCountList(this.eharTab.active3, 3, '/cusLvStatistics/teamAnalysisExecutionRate')
// 获取销奖能力
this.getPowerList()
},
// 获取部门列表
- getSectionList(){
- this.$u.post('/cusLvStatistics/findAllDeptIdByHouseId',{houseId:this.houseId})
- .then(res=>{
- this.staffList=[]
- this.staffList1=[]
- res.map(item=>{
- let obj={}
- obj.value=item.deptId
- obj.label=item.deptName
- this.staffList.push(obj)
+ getSectionList() {
+ this.$u.post('/cusLvStatistics/findAllDeptIdByHouseId', {
+ houseId: this.houseId
})
- this.staffList1=[...this.staffList]
- this.staffList.unshift({
- value:'',
- label:'全部'
+ .then(res => {
+ this.staffList = []
+ this.staffList1 = []
+ res.map(item => {
+ let obj = {}
+ obj.value = item.deptId
+ obj.label = item.deptName
+ this.staffList.push(obj)
})
- this.staffList1.unshift({
- value:'',
- label:'平均'
+ this.staffList1 = [...this.staffList]
+ this.staffList.unshift({
+ value: '',
+ label: '全部'
})
- this.staff1=this.staffList[0]
- // 团队对比接待量
- this.receptionCountList(0,1,'/cusLvStatistics/teamAnalysisReception')
- // 团队对比接待时长
- this.receptionCountList(0,2,'/cusLvStatistics/teamAnalysisReceptionTime')
- /* 销奖执行率 */
- this.receptionCountList(0,3,'/cusLvStatistics/teamAnalysisExecutionRate')
- // 获取销奖能力
- this.getPowerList()
-
- })
+ this.staffList1.unshift({
+ value: '',
+ label: '平均'
+ })
+ this.staff1 = this.staffList[0]
+ // 团队对比接待量
+ this.receptionCountList(0, 1, '/cusLvStatistics/teamAnalysisReception')
+ // 团队对比接待时长
+ this.receptionCountList(0, 2, '/cusLvStatistics/teamAnalysisReceptionTime')
+ /* 销奖执行率 */
+ this.receptionCountList(0, 3, '/cusLvStatistics/teamAnalysisExecutionRate')
+ // 获取销奖能力
+ this.getPowerList()
+
+ })
},
// 点击部门对比
- chiocStaff(idx){
- if(idx==0){
+ chiocStaff(idx) {
+ if (idx == 0) {
// 当选择了第一个的时候
- this.choseStaffFlag=false
- this.staffShow=true
- }else{
- this.choseStaffFlag=true
- this.staffShow1=true
+ this.choseStaffFlag = false
+ this.staffShow = true
+ } else {
+ this.choseStaffFlag = true
+ this.staffShow1 = true
}
-
+
},
//时间切换
tabtimetap(index) {
@@ -552,54 +555,54 @@
this.totalTimeShow = true;
} else {
this.activeTotal = index;
- this.lastEndDate=''
- this.lastStartDate=''
+ this.lastEndDate = ''
+ this.lastStartDate = ''
// 获取数据
// 团队对比接待量
- this.receptionCountList(this.eharTab.active1,1,'/cusLvStatistics/teamAnalysisReception')
+ this.receptionCountList(this.eharTab.active1, 1, '/cusLvStatistics/teamAnalysisReception')
// 团队对比接待时长
- this.receptionCountList(this.eharTab.active2,2,'/cusLvStatistics/teamAnalysisReceptionTime')
+ this.receptionCountList(this.eharTab.active2, 2, '/cusLvStatistics/teamAnalysisReceptionTime')
/* 销奖执行率 */
- this.receptionCountList(this.eharTab.active3,3,'/cusLvStatistics/teamAnalysisExecutionRate')
+ this.receptionCountList(this.eharTab.active3, 3, '/cusLvStatistics/teamAnalysisExecutionRate')
// 获取销奖能力
this.getPowerList()
}
},
// 接待量
- tabtimetap1(idx){
- this.eharTab.active1=idx
+ tabtimetap1(idx) {
+ this.eharTab.active1 = idx
// 调用方法
- this.receptionCountList(idx,1,'/cusLvStatistics/teamAnalysisReception')
+ this.receptionCountList(idx, 1, '/cusLvStatistics/teamAnalysisReception')
},
// 接待时长
- tabtimetap2(idx){
- this.eharTab.active2=idx
+ tabtimetap2(idx) {
+ this.eharTab.active2 = idx
// 调用方法
- this.receptionCountList(idx,2,'/cusLvStatistics/teamAnalysisReceptionTime')
+ this.receptionCountList(idx, 2, '/cusLvStatistics/teamAnalysisReceptionTime')
},
- tabtimetap3(idx){
- this.eharTab.active3=idx
+ tabtimetap3(idx) {
+ this.eharTab.active3 = idx
// 调用方法
- this.receptionCountList(idx,3,'/cusLvStatistics/teamAnalysisExecutionRate')
+ this.receptionCountList(idx, 3, '/cusLvStatistics/teamAnalysisExecutionRate')
},
- tabtimetap4(idx){
- this.eharTab.active4=idx
+ tabtimetap4(idx) {
+ this.eharTab.active4 = idx
// 调用方法
// this.getRecordList()
},
//自定义时间
totalTimeChange(e) {
console.log(e.startDate, e.endDate)
- this.activeTotal=3;
- this.lastEndDate=e.endDate
- this.lastStartDate=e.startDate
+ this.activeTotal = 3;
+ this.lastEndDate = e.endDate
+ this.lastStartDate = e.startDate
// 获取数据
// 团队对比接待量
- this.receptionCountList(this.eharTab.active1,1,'/cusLvStatistics/teamAnalysisReception')
+ this.receptionCountList(this.eharTab.active1, 1, '/cusLvStatistics/teamAnalysisReception')
// 团队对比接待时长
- this.receptionCountList(this.eharTab.active2,2,'/cusLvStatistics/teamAnalysisReceptionTime')
+ this.receptionCountList(this.eharTab.active2, 2, '/cusLvStatistics/teamAnalysisReceptionTime')
/* 销奖执行率 */
- this.receptionCountList(this.eharTab.active3,3,'/cusLvStatistics/teamAnalysisExecutionRate')
+ this.receptionCountList(this.eharTab.active3, 3, '/cusLvStatistics/teamAnalysisExecutionRate')
// 获取销奖能力
this.getPowerList()
},
@@ -608,50 +611,50 @@
this.bocindex = index;
},
//集团对比
- Groupcontrast(){
+ Groupcontrast() {
uni.navigateTo({
- url: '/pages/center/Piabodata/Groupcontrast'
+ url: '/pages/center/Piabodata/Groupcontrast'
});
},
// 去选择团队
- goTeam(){
+ goTeam() {
uni.navigateTo({
- url:`/pages/center/Piabodata/selectTeam?ids=${this.deptids}`
+ url: `/pages/center/Piabodata/selectTeam?ids=${this.deptids}`
})
},
- staffSelectCallback(e){
- if(this.choseStaffFlag){
+ staffSelectCallback(e) {
+ if (this.choseStaffFlag) {
// 第二个客户
// console.log(e,'第二个')
- this.staff2=e[0]
- }else{
+ this.staff2 = e[0]
+ } else {
// 第一个客户
// console.log(e,'第一个')
// 当选择全部时
- if(!e.value){
- this.timepickpickisshow=false
- this.staff2.label='平均'
- this.staff2.value=''
+ if (!e.value) {
+ this.timepickpickisshow = false
+ this.staff2.label = '平均'
+ this.staff2.value = ''
}
- this.staff1=e[0]
+ this.staff1 = e[0]
}
- if(this.staff1.label==this.staff2.label){
+ if (this.staff1.label == this.staff2.label) {
uni.showToast({
- title:'请勿选择重复',
- icon:'none'
+ title: '请勿选择重复',
+ icon: 'none'
})
- this.staff2.label='请选择'
+ this.staff2.label = '请选择'
// this.staff2.label='平均'
// this.staff2.value=''
return
- }else{
+ } else {
// 获取数据
// 团队对比接待量
- this.receptionCountList(this.eharTab.active1,1,'/cusLvStatistics/teamAnalysisReception')
+ this.receptionCountList(this.eharTab.active1, 1, '/cusLvStatistics/teamAnalysisReception')
// 团队对比接待时长
- this.receptionCountList(this.eharTab.active2,2,'/cusLvStatistics/teamAnalysisReceptionTime')
+ this.receptionCountList(this.eharTab.active2, 2, '/cusLvStatistics/teamAnalysisReceptionTime')
/* 销奖执行率 */
- this.receptionCountList(this.eharTab.active3,3,'/cusLvStatistics/teamAnalysisExecutionRate')
+ this.receptionCountList(this.eharTab.active3, 3, '/cusLvStatistics/teamAnalysisExecutionRate')
// 获取销奖能力
this.getPowerList()
}
@@ -798,265 +801,267 @@
// })
// },
// 接待时长
- 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(','),
- showRank:idx,
- houseId:this.houseId,
- 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]
- if(idx==0){
- // 当选择的是牌名时
- // 处理数据
- // 先处理牌名数据,需要进行判断全部还是单个
- // 当为全部时
- this['newlisttabinfo'+index]=[]
- let arr=[]
- // 当选择全部时
- if(!this.staff1.value&&!this.staff2.value){
- // console.log(1)
- result[0].map(item=>{
- let obj={}
- obj.name=item.deptName
- obj.zxl=item.data
- arr.push(obj)
-
- })
- arr=this.dealData(arr)
- this['newlisttabinfo'+index]=arr
- }
- // 当选择只有一个时
- else if(this.staff1.value&&!this.staff2.value){
- // console.log(2)
- result[0].map(item=>{
- let obj={}
- obj.name=item.deptName
- obj.zxl=item.data
- arr.push(obj)
- })
- // 判断是否显示平均
- // 如果显示对比
- if(this.timepickpickisshow){
- result[1].map(item=>{
- let obj={}
- obj.name='平均'
- obj.zxl=item.data
+ 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(','),
+ showRank: idx,
+ houseId: this.houseId,
+ 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]
+ if (idx == 0) {
+ // 当选择的是牌名时
+ // 处理数据
+ // 先处理牌名数据,需要进行判断全部还是单个
+ // 当为全部时
+ this['newlisttabinfo' + index] = []
+ let arr = []
+ // 当选择全部时
+ if (!this.staff1.value && !this.staff2.value) {
+ // console.log(1)
+ result[0].map(item => {
+ let obj = {}
+ obj.name = item.deptName
+ obj.zxl = item.data
arr.push(obj)
+
})
+ arr = this.dealData(arr)
+ this['newlisttabinfo' + index] = arr
}
- arr=this.dealData(arr)
- this['newlisttabinfo'+index]=arr
- }else{
- // console.log(3)
- // 当两个都选择的时候
- result[0].map(item=>{
- let obj={}
- obj.name=item.deptName
- obj.zxl=item.data
- arr.push(obj)
- })
- result[1].map(item=>{
- let obj={}
- obj.name=item.deptName
- obj.zxl=item.data
- arr.push(obj)
- })
- arr=this.dealData(arr)
- this['newlisttabinfo'+index]=arr
+ // 当选择只有一个时
+ else if (this.staff1.value && !this.staff2.value) {
+ // console.log(2)
+ result[0].map(item => {
+ let obj = {}
+ obj.name = item.deptName
+ obj.zxl = item.data
+ arr.push(obj)
+ })
+ // 判断是否显示平均
+ // 如果显示对比
+ if (this.timepickpickisshow) {
+ result[1].map(item => {
+ let obj = {}
+ obj.name = '平均'
+ obj.zxl = item.data
+ arr.push(obj)
+ })
+ }
+ arr = this.dealData(arr)
+ this['newlisttabinfo' + index] = arr
+ } else {
+ // console.log(3)
+ // 当两个都选择的时候
+ result[0].map(item => {
+ let obj = {}
+ obj.name = item.deptName
+ obj.zxl = item.data
+ arr.push(obj)
+ })
+ result[1].map(item => {
+ let obj = {}
+ obj.name = item.deptName
+ obj.zxl = item.data
+ arr.push(obj)
+ })
+ arr = this.dealData(arr)
+ this['newlisttabinfo' + index] = arr
+ }
+ } else {
+ // 当选择趋势时
+ this['lineOptsect' + index] = {}
+ let allobj = {
+ categories: [],
+ series: []
+ }
+ // 先处理时间
+ // 当选择全部时
+ if (!this.staff1.value && !this.staff2.value) {
+ result.map((item, idx) => {
+ let obj = {}
+ obj.name = item[0].deptName
+ obj.data = []
+ item.map(item1 => {
+ // 时间的处理
+ if (idx == 0) {
+ allobj.categories.push(item1.statDate.slice(5, 10))
+ }
+ obj.data.push(item1.data)
+ })
+ allobj.series.push(obj)
+ })
+ }
+ // 当选择只有一个时
+ else if (this.staff1.value && !this.staff2.value) {
+ // console.log(2)
+ let obj = {}
+ obj.data = []
+ obj.name = result[0][0].deptName
+ result[0].map(item => {
+ allobj.categories.push(item.statDate.slice(5, 10))
+ obj.data.push(item.data)
+ })
+ allobj.series.push(obj)
+ // 判断是否显示平均
+ // 如果显示对比
+ if (this.timepickpickisshow) {
+ let obj = {}
+ obj.data = []
+ obj.name = '平均'
+ result[1].map(item => {
+ obj.data.push(item.data)
+ })
+ allobj.series.push(obj)
+ }
+ } else {
+ // console.log(3)
+ // 当两个都选择的时候
+ let obj = {}
+ let obj1 = {}
+ obj.data = []
+ obj1.data = []
+ obj.name = result[0][0].deptName
+ obj1.name = result[1][0].deptName
+ result[0].map(item => {
+ allobj.categories.push(item.statDate.slice(5, 10))
+ obj.data.push(item.data)
+ })
+ result[1].map(item => {
+ obj1.data.push(item.data)
+ })
+ allobj.series.push(obj)
+ allobj.series.push(obj1)
+ }
+ // console.log(allobj)
+ // return
+ // this.lineOptsect1=allobj
+ this['lineOptsect' + index] = allobj
+ // this['lineOptsect'+index].series=allobj.series
+ // this['lineOptsect'+index].categories=allobj.categories
}
- }else{
- // 当选择趋势时
- this['lineOptsect'+index]={}
- let allobj={
- categories:[],
- series:[]
+ })
+ },
+ // 获取销奖能力
+ 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: []
+ }
+ let max = 0;
// 当选择全部时
- if(!this.staff1.value&&!this.staff2.value){
- result.map((item,idx)=>{
- let obj={}
- obj.name=item[0].deptName
- obj.data=[]
- item.map(item1=>{
- // 时间的处理
- if(idx==0){
- allobj.categories.push(item1.statDate.slice(5,10))
+ 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.data)
+ obj.data.push(item1.avgExecutionRate)
+ if (max < item1.avgExecutionRate) max = item1.avgExecutionRate;
})
allobj.series.push(obj)
})
}
// 当选择只有一个时
- else if(this.staff1.value&&!this.staff2.value){
- // console.log(2)
- let obj={}
- obj.data=[]
- obj.name=result[0][0].deptName
- result[0].map(item=>{
- allobj.categories.push(item.statDate.slice(5,10))
- obj.data.push(item.data)
+ 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)
+ if (max < item1.avgExecutionRate) max = item1.avgExecutionRate;
+ })
+ allobj.series.push(obj)
})
- allobj.series.push(obj)
// 判断是否显示平均
// 如果显示对比
- if(this.timepickpickisshow){
- let obj={}
- obj.data=[]
- obj.name='平均'
- result[1].map(item=>{
- obj.data.push(item.data)
+ if (this.timepickpickisshow) {
+ res.second.map((item, index) => {
+ let obj = {
+ name: '平均',
+ data: []
+ }
+ item.map((item1) => {
+ obj.data.push(item1.avgExecutionRate)
+ })
+ allobj.series.push(obj)
})
- allobj.series.push(obj)
}
- }else{
+ } else {
// console.log(3)
// 当两个都选择的时候
- let obj={}
- let obj1={}
- obj.data=[]
- obj1.data=[]
- obj.name=result[0][0].deptName
- obj1.name=result[1][0].deptName
- result[0].map(item=>{
- allobj.categories.push(item.statDate.slice(5,10))
- obj.data.push(item.data)
- })
- result[1].map(item=>{
- obj1.data.push(item.data)
- })
- allobj.series.push(obj)
- allobj.series.push(obj1)
- }
- // console.log(allobj)
- // return
- // 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:[]
- }
- let max = 0;
- // 当选择全部时
- 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)
- if (max < item1.avgExecutionRate) max = 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)
+ res.first.map((item, index) => {
+ let obj = {
+ name: item[0].deptName,
+ data: []
}
- obj.data.push(item1.avgExecutionRate)
- if (max < item1.avgExecutionRate) max = item1.avgExecutionRate;
- })
- allobj.series.push(obj)
- })
- // 判断是否显示平均
- // 如果显示对比
- if(this.timepickpickisshow){
- res.second.map((item,index)=>{
- let obj={
- name:'平均',
- data:[]
- }
- item.map((item1)=>{
+ item.map((item1) => {
+ if (index == 0) {
+ allobj.categories.push(item1.name)
+ }
obj.data.push(item1.avgExecutionRate)
+ if (max < item1.avgExecutionRate) max = 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)
- if (max < item1.avgExecutionRate) max = item1.avgExecutionRate;
- })
- allobj.series.push(obj)
- })
- }
- this.opts.extra.radar.max = max +25
- // console.log(allobj)
- this.chartData1=allobj
- this.$forceUpdate()
- })
+ this.opts.extra.radar.max = max + 25
+ // console.log(allobj)
+ this.chartData1 = allobj
+ this.$forceUpdate()
+ })
},
// 定义一个公共方法对数据进行处理
- dealData(arr){
+ dealData(arr) {
// 获取最大值
- let num=Math.max.apply(Math, arr.map(function (o) { return o.zxl })) //结果:3
+ let num = Math.max.apply(Math, arr.map(function(o) {
+ return o.zxl
+ })) //结果:3
// console.log(num)
- if(num>100){
+ 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)
+ arr.map(item => {
+ item.zxl1 = Math.floor(item.zxl / num * 100)
})
// console.log(arr)
return arr
- }else{
- arr.map(item=>{
- item.zxl1=item.zxl
+ } else {
+ arr.map(item => {
+ item.zxl1 = item.zxl
})
return arr
}
@@ -1065,26 +1070,28 @@
};
+
\ No newline at end of file
diff --git a/pages/center/Piabodata/index.vue b/pages/center/Piabodata/index.vue
index f65bdf3..509c602 100644
--- a/pages/center/Piabodata/index.vue
+++ b/pages/center/Piabodata/index.vue
@@ -77,9 +77,15 @@
均值:25
-->
{{danwei}}
-
-
+
+
+
+
+
+
+
@@ -93,13 +99,13 @@
{{team.label}}
-
+
单位(%)
+ canvasId="wangxiaohuaerlineryiliwuyibao" :canvas2d="true" :opts="lineOpts" />
@@ -124,8 +130,8 @@
-->
单位(%)
-
+
@@ -147,7 +153,8 @@
合计:50
均值:25
-->
- 暂无数据
+ 暂无数据
@@ -175,7 +182,8 @@
:is-scroll="true">
- 暂无数据
+ 暂无数据
@@ -242,23 +250,29 @@
danwei: '单位(次)',
totalTimeShow: false,
activeTab: 0,
- numlist: [{
- name: '接待客户',
- num: ''
- },
+
+ numlist: [
{
name: '接待量',
- num: ''
+ num: '',
+ setName: 'sumCustomer'
+ },{
+ name: '有效接待',
+ num: '',
+ setName: 'receptionCount'
},
{
name: '平均执行率',
- num: ''
+ num: '',
+ setName: 'fraction'
},
{
- name: '录音时长',
- num: ''
+ name: '平均接待时长',
+ num: '',
+ setName: 'sumDuration'
},
],
+
lineOptsect: {
"categories": ["2016", "2017", "2018", "2019", "2020", "2021"],
"series": [{
@@ -278,21 +292,31 @@
}]
},
newlistoj: [],
- newlistoj1: [{
+
+ newlistoj1: [
+ {
name: "接待量",
- id: 1
+ id: 3,
+ title: '单位(个)',
+ setName: 'sumCustomer'
},
{
- name: "平均执行率",
- id: 2
+ name: "有效接待",
+ id: 1,
+ title: '单位(次)',
+ setName: 'receptionCount'
},
{
- name: "接待客户",
- id: 3
+ name: "平均执行率",
+ id: 2,
+ title: '单位(%)',
+ setName: 'fraction'
},
{
- name: "录音时长",
- id: 5
+ name: "平均接待时长",
+ id: 5,
+ title: '单位(min)',
+ setName: 'sumDuration'
},
],
bocindex: 0,
@@ -314,11 +338,19 @@
Groupcontrastisshow: false,
allechar: [],
allList: [],
- optionsobj:{}
+
+ lineOpts: {
+ yAxis: {
+ data: [{
+ max: 100,
+ min: 0,
+ }]
+ }
+ },
};
},
onShow() {
- // 获取客户id
+ // 获取项目id
this.houseId = uni.getStorageSync('buildingID').id;
// 获取数据看板
@@ -336,22 +368,21 @@
// 获取维度
this.getindexZxl()
},
- onPullDownRefresh(){
+ onPullDownRefresh() {
// 获取员工
this.getStaffList()
// 获取团队
this.getSectionList()
// 获取团队是否显示权限
-
- this.queryHaveDept()
+
// 获取简报
this.getReport()
// 获取接待趋势
this.getRtrent()
// 获取维度
this.getindexZxl()
- setTimeout(function () {
- uni.stopPullDownRefresh();
+ setTimeout(function() {
+ uni.stopPullDownRefresh();
}, 1000);
},
methods: {
@@ -449,16 +480,11 @@
lastStartDate: this.lastStartDate
})
.then(res => {
- // 接待量
- this.numlist[0].num = res.receptionCount || 0
- // 接待客户
- this.numlist[1].num = res.sumCustomer || 0
- // 执行率
- this.numlist[2].num = (res.fraction || 0) + '%'
- // 录音时长
- this.numlist[3].num = Math.floor(res.sumDuration / 60) || 0
- // util.formatSecond()||0
-
+ res.sumDuration = Math.floor(res.sumDuration / 60) || 0
+ res.fraction = (res.fraction || 0) + '%'
+ this.numlist.map(item => {
+ item.num = res[item.setName]
+ })
})
},
// 获取团队列表
@@ -590,7 +616,7 @@
},
//指标执行率分析tab
tapspagek2(index) {
- // console.log(index)
+ console.log(index)
// 对数据进行分析和处理
// 先处理日期
let allobj = {
@@ -600,41 +626,17 @@
data: []
}]
}
- if (index == 0) {
- // 接待量
- this.danwei = '单位(次)'
- allobj.series[0].name = '接待量'
- this.allechar.map(item => {
- allobj.categories.push(item.statDate.slice(5, 10))
- allobj.series[0].data.push(item.receptionCount)
- })
- } else if (index == 1) {
- // 平均执行率
- this.danwei = '单位(%)'
- allobj.series[0].name = '平均执行率'
- this.allechar.map(item => {
- allobj.categories.push(item.statDate.slice(5, 10))
- allobj.series[0].data.push(item.fraction)
- })
- } else if (index == 2) {
- // 接待客户
- this.danwei = '单位(个)'
- allobj.series[0].name = '接待客户'
- this.allechar.map(item => {
- allobj.categories.push(item.statDate.slice(5, 10))
- allobj.series[0].data.push(item.sumCustomer)
- })
- } else {
- // 录音时长
- this.danwei = '单位(min)'
- allobj.series[0].name = '录音时长'
- this.allechar.map(item => {
- allobj.categories.push(item.statDate.slice(5, 10))
- allobj.series[0].data.push(item.sumDuration)
- })
- }
+
+ this.danwei = this.newlistoj1[index].title
+ allobj.series[0].name = this.newlistoj1[index].name
+ this.allechar.map(item => {
+ allobj.categories.push(item.statDate.slice(5, 10))
+ allobj.series[0].data.push(item[this.newlistoj1[index].setName])
+ })
+
this.bocindex = index;
this.lineOptsect = allobj
+ this.$forceUpdate()
},
tapspagek3(index) {
let arr = []
@@ -747,4 +749,4 @@
.grid:nth-child(3) {
border-right: none;
}
-
+
\ No newline at end of file
diff --git a/pages/center/consumer/consumerDetail.vue b/pages/center/consumer/consumerDetail.vue
index ff77b04..7a2708e 100644
--- a/pages/center/consumer/consumerDetail.vue
+++ b/pages/center/consumer/consumerDetail.vue
@@ -393,7 +393,7 @@
clickaudeopal(item){
if(item.selected==0){
uni.navigateTo({
- url: '/pages/mine/ScoringPlaylist?customerId='+this.customerId +"&id="+item.marketingId
+ url: '/pages/mine/ScoringPlaylist?customerId='+this.customerId +"&id="+item.marketingId + '&type=0'
})
}
},
diff --git a/pages/index/customer.vue b/pages/index/customer.vue
index 6ed9efa..f90705c 100644
--- a/pages/index/customer.vue
+++ b/pages/index/customer.vue
@@ -39,7 +39,9 @@
@@ -64,6 +66,7 @@
isAdd:'',
dataCode:'',
addAccount:'',
+ endReception: true,
};
},
components: {},
@@ -74,6 +77,9 @@
addAccount,
dataCode
} = uni.getStorageSync("weapp_session_userInfo_data");
+
+ let menulist = uni.getStorageSync('weapp_session_Menu_data')
+ this.endReception = menulist.findIndex(item => { return item.name == '结束接待' }) != -1
this.addAccount=addAccount;
this.dataCode=dataCode;
this.init()
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 45e3bc6..46351e5 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -187,7 +187,7 @@
常用功能
-
+
@@ -204,8 +204,7 @@
-
- {{item.name}}
+ {{item.name}}
@@ -269,6 +268,19 @@
statDateEnd:'',
};
},
+
+ computed: {
+ showMenu() {
+ return name => {
+ if (name == '标记有效无效接待' || name == '结束接待' || name == '客户编辑') {
+ return false
+ } else {
+ return true
+ }
+ }
+ }
+ },
+
components: {},
onShow() {
this.getMenu()