|
|
@@ -1,25 +1,5 @@ |
|
|
|
<template> |
|
|
|
<div class="box-center"> |
|
|
|
<!-- 头 --> |
|
|
|
<div class="app-titel" v-if="orgType != 3"> |
|
|
|
<div class="titel-text"> |
|
|
|
楼盘选择: |
|
|
|
<el-select |
|
|
|
v-model="houseId" |
|
|
|
@change="houseChange" |
|
|
|
filterable |
|
|
|
placeholder="请选择" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="item in houseList" |
|
|
|
:key="item.id" |
|
|
|
:label="item.propertyName" |
|
|
|
:value="item.id" |
|
|
|
> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="app-titel"> |
|
|
|
<div class="toptimeqhuan"> |
|
|
|
<div :class="{ tophove: dateType == 4 }" @click="tabtimetap(4)"> |
|
|
@@ -77,76 +57,6 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<!-- <el-table :data="tableData" stripe style="width: 100%"> |
|
|
|
<el-table-column prop="batchId" label="序号" align="center"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="name" label="顾问" align="center"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="name" label="归属团队" align="center"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="name" label="接待量" align="center"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
v-if="tabFlag == 1" |
|
|
|
prop="realityEquipmentCount" |
|
|
|
label="违禁接待次数" |
|
|
|
align="center" |
|
|
|
> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
v-if="tabFlag == 1" |
|
|
|
prop="receivableEquipmentCount" |
|
|
|
label="违禁接待占比" |
|
|
|
align="center" |
|
|
|
> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
v-if="tabFlag == 0" |
|
|
|
prop="realityEquipmentCount" |
|
|
|
label="接待时长" |
|
|
|
align="center" |
|
|
|
> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
v-if="tabFlag == 1" |
|
|
|
prop="acceptanceNum" |
|
|
|
label="返现次数" |
|
|
|
align="center" |
|
|
|
> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
v-if="tabFlag == 1" |
|
|
|
prop="acceptanceNum" |
|
|
|
label="过度保证次数" |
|
|
|
align="center" |
|
|
|
> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
v-if="tabFlag == 1" |
|
|
|
prop="acceptanceNum" |
|
|
|
label="次数" |
|
|
|
align="center" |
|
|
|
> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="createTime" |
|
|
|
v-if="tabFlag == 0" |
|
|
|
label="品牌介绍执行率" |
|
|
|
align="center" |
|
|
|
> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="createTime" |
|
|
|
v-if="tabFlag == 0" |
|
|
|
label="沙盘介绍执行率" |
|
|
|
align="center" |
|
|
|
> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="remark" label="执行性率" align="center"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column v-if="tabFlag == 0" label="销奖执行率" align="center"> |
|
|
|
</el-table-column> |
|
|
|
</el-table> --> |
|
|
|
<el-table max-height="300" :data="tableData" stripe style="width: 100%"> |
|
|
|
<el-table-column prop="batchId" label="序号" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
@@ -161,11 +71,6 @@ |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="deptName" label="归属团队" align="center"> |
|
|
|
</el-table-column> |
|
|
|
<!-- <el-table-column prop="statDate" label="日期" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
{{scope.$index==tableData.length-1?'合计/平均':scope.row.statDate.substring(0,10)}} |
|
|
|
</template> |
|
|
|
</el-table-column> --> |
|
|
|
<el-table-column prop="activeCustomer" label="接待量" align="center"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
@@ -229,15 +134,15 @@ |
|
|
|
</div> |
|
|
|
<div class="hejisan"> |
|
|
|
<div class="sanbox1" style="width: 35%"> |
|
|
|
<div class="text1-1">合计</div> |
|
|
|
<div class="text1-1">接待合计</div> |
|
|
|
<div class="text1-2">{{sum1}}</div> |
|
|
|
</div> |
|
|
|
<div class="sanbox1" style="width: 40%"> |
|
|
|
<div class="text1-1">顾问</div> |
|
|
|
<div class="text1-1">顾问人数</div> |
|
|
|
<div class="text1-2">{{num1}}</div> |
|
|
|
</div> |
|
|
|
<div class="sanbox1" style="width: 25%"> |
|
|
|
<div class="text1-1">人均接待量</div> |
|
|
|
<div class="text1-1">人均接待</div> |
|
|
|
<div class="text1-2">{{avg1}}</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@@ -245,99 +150,97 @@ |
|
|
|
style="overflow-y: auto; height: 258px; width: 94%; margin: 0 auto" |
|
|
|
> |
|
|
|
<div class="jinbox" v-for="(item, i) in echarlist" :key="i"> |
|
|
|
<div class="jinboxtit">{{ item.accountName }}</div> |
|
|
|
<div class="jinboxtit">{{ item.name }}</div> |
|
|
|
<div class="jinbox-box"> |
|
|
|
<div |
|
|
|
class="boxbaifenbi" |
|
|
|
:style="'width:' + item.activeCustomer + '%;'" |
|
|
|
:style="'width:' + item.zxl1 + '%;'" |
|
|
|
></div> |
|
|
|
</div> |
|
|
|
<div class="jinboxbott">{{ item.activeCustomer }}</div> |
|
|
|
<div class="jinboxbott">{{ item.zxl }}</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="you"> |
|
|
|
<div class="title"> |
|
|
|
<div class="text1">销讲执行率排名(TOP10))</div> |
|
|
|
<div class="text2"> |
|
|
|
<el-select |
|
|
|
@change="teamAllLevelidtap()" |
|
|
|
style="width: 90%; margin: 0 auto" |
|
|
|
v-model="teamAllLevelid" |
|
|
|
placeholder="请选择" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="item in teamAllLevel" |
|
|
|
:key="item.value" |
|
|
|
:label="item.name" |
|
|
|
:value="item.value" |
|
|
|
> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</div> |
|
|
|
<div class="text1">接待时长排名(TOP10)</div> |
|
|
|
</div> |
|
|
|
<div class="hejisan"> |
|
|
|
|
|
|
|
<div class="hejisan"> |
|
|
|
<div class="sanbox1" style="width: 35%"> |
|
|
|
<div class="text1-1">合计</div> |
|
|
|
<div class="text1-2">{{sum2}}</div> |
|
|
|
<div class="text1-1">接待时长合计</div> |
|
|
|
<div class="text1-2">{{Math.floor(sum2/60)}}</div> |
|
|
|
</div> |
|
|
|
<div class="sanbox1" style="width: 40%"> |
|
|
|
<div class="text1-1">顾问</div> |
|
|
|
<div class="text1-1">顾问人数</div> |
|
|
|
<div class="text1-2">{{num2}}</div> |
|
|
|
</div> |
|
|
|
<div class="sanbox1" style="width: 25%"> |
|
|
|
<div class="text1-1">人均接待量</div> |
|
|
|
<div class="text1-2">{{avg2}}</div> |
|
|
|
<div class="text1-1">均值</div> |
|
|
|
<div class="text1-2">{{Math.floor(avg2/60)}}</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div |
|
|
|
style="overflow-y: auto; height: 258px; width: 94%; margin: 0 auto" |
|
|
|
> |
|
|
|
<div class="jinbox" v-for="(item, i) in echarlist1" :key="i"> |
|
|
|
<div class="jinboxtit">{{ item.accountName }}</div> |
|
|
|
<div class="jinbox" v-for="(item, i) in echarlist2" :key="i"> |
|
|
|
<div class="jinboxtit">{{ item.name }}</div> |
|
|
|
<div class="jinbox-box"> |
|
|
|
<div |
|
|
|
class="boxbaifenbi" |
|
|
|
:style="'width:' + item.fraction + '%;'" |
|
|
|
:style="'width:' + item.zxl1 + '%;'" |
|
|
|
></div> |
|
|
|
</div> |
|
|
|
<div class="jinboxbott">{{ item.fraction }}%</div> |
|
|
|
<div class="jinboxbott">{{ item.zxl }}</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="app-box-san"> |
|
|
|
<div class="zuo"> |
|
|
|
<div class="title"> |
|
|
|
<div class="text1">接待时长排名(TOP10)</div> |
|
|
|
</div> |
|
|
|
<div class="hejisan"> |
|
|
|
<div class="sanbox1" style="width: 35%"> |
|
|
|
<div class="text1-1">合计</div> |
|
|
|
<div class="text1-2">{{sum3}}</div> |
|
|
|
<div class="title"> |
|
|
|
<div class="text1">销讲执行率排名(TOP10))</div> |
|
|
|
<div class="text2"> |
|
|
|
<el-select |
|
|
|
@change="teamAllLevelidtap()" |
|
|
|
style="width: 90%; margin: 0 auto" |
|
|
|
v-model="teamAllLevelid" |
|
|
|
placeholder="请选择" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="item in teamAllLevel" |
|
|
|
:key="item.value" |
|
|
|
:label="item.name" |
|
|
|
:value="item.value" |
|
|
|
> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</div> |
|
|
|
<div class="sanbox1" style="width: 40%"> |
|
|
|
<div class="text1-1">顾问</div> |
|
|
|
</div> |
|
|
|
<div class="hejisan"> |
|
|
|
<div class="sanbox1" style="width: 50%"> |
|
|
|
<div class="text1-1">顾问人数</div> |
|
|
|
<div class="text1-2">{{num3}}</div> |
|
|
|
</div> |
|
|
|
<div class="sanbox1" style="width: 25%"> |
|
|
|
<div class="text1-1">人均接待量</div> |
|
|
|
<div class="sanbox1" style="width: 50%"> |
|
|
|
<div class="text1-1">平均执行</div> |
|
|
|
<div class="text1-2">{{avg3}}</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div |
|
|
|
style="overflow-y: auto; height: 258px; width: 94%; margin: 0 auto" |
|
|
|
> |
|
|
|
<div class="jinbox" v-for="(item, i) in echarlist2" :key="i"> |
|
|
|
<div class="jinboxtit">{{ item.accountName }}</div> |
|
|
|
<div class="jinbox" v-for="(item, i) in echarlist1" :key="i"> |
|
|
|
<div class="jinboxtit">{{ item.name }}</div> |
|
|
|
<div class="jinbox-box"> |
|
|
|
<div |
|
|
|
class="boxbaifenbi" |
|
|
|
:style="'width:' + item.sumDuration + '%;'" |
|
|
|
:style="'width:' + item.zxl + '%;'" |
|
|
|
></div> |
|
|
|
</div> |
|
|
|
<div class="jinboxbott">{{ item.sumDuration }}</div> |
|
|
|
<div class="jinboxbott">{{ item.zxl }}%</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@@ -363,15 +266,15 @@ |
|
|
|
</div> |
|
|
|
<div class="hejisan"> |
|
|
|
<div class="sanbox1" style="width: 35%"> |
|
|
|
<div class="text1-1">合计</div> |
|
|
|
<div class="text1-1">违禁合计</div> |
|
|
|
<div class="text1-2">{{sum4}}</div> |
|
|
|
</div> |
|
|
|
<div class="sanbox1" style="width: 40%"> |
|
|
|
<div class="text1-1">顾问</div> |
|
|
|
<div class="text1-1">顾问人数</div> |
|
|
|
<div class="text1-2">{{num4}}</div> |
|
|
|
</div> |
|
|
|
<div class="sanbox1" style="width: 25%"> |
|
|
|
<div class="text1-1">人均接待量</div> |
|
|
|
<div class="text1-1">均值</div> |
|
|
|
<div class="text1-2">{{avg4}}</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@@ -379,14 +282,14 @@ |
|
|
|
style="overflow-y: auto; height: 258px; width: 94%; margin: 0 auto" |
|
|
|
> |
|
|
|
<div class="jinbox" v-for="(item, i) in echarlist3" :key="i"> |
|
|
|
<div class="jinboxtit">{{ item.accountName }}</div> |
|
|
|
<div class="jinboxtit">{{ item.name }}</div> |
|
|
|
<div class="jinbox-box"> |
|
|
|
<div |
|
|
|
class="boxbaifenbi" |
|
|
|
:style="'width:' + item.prohibitedCustomer + '%;'" |
|
|
|
:style="'width:' + item.zxl1 + '%;'" |
|
|
|
></div> |
|
|
|
</div> |
|
|
|
<div class="jinboxbott">{{ item.prohibitedCustomer }}</div> |
|
|
|
<div class="jinboxbott">{{ item.zxl }}</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@@ -427,41 +330,27 @@ export default { |
|
|
|
sum1:'', |
|
|
|
avg1:'', |
|
|
|
num1:'', |
|
|
|
|
|
|
|
sum2:'', |
|
|
|
avg2:'', |
|
|
|
num2:'', |
|
|
|
|
|
|
|
sum3:'', |
|
|
|
avg3:'', |
|
|
|
num3:'', |
|
|
|
|
|
|
|
sum4:'', |
|
|
|
avg4:'', |
|
|
|
num4:'', |
|
|
|
}; |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
this.houseId = localStorage.getItem("houseId"); |
|
|
|
this.tabtimetap(4); |
|
|
|
this.zkhousePage(); |
|
|
|
// this.echarCreat(); |
|
|
|
|
|
|
|
this.deptFindList(); |
|
|
|
this.teamAllLeve() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
zkhousePage() { |
|
|
|
this.$api.api |
|
|
|
.findHouseByUser({ |
|
|
|
orgType: localStorage.getItem("orgType"), |
|
|
|
}) |
|
|
|
.then((res) => { |
|
|
|
this.houseList = res.data; |
|
|
|
if (localStorage.getItem("orgType") == 3) { |
|
|
|
this.houseId = localStorage.getItem("houseId"); |
|
|
|
} else { |
|
|
|
this.houseId = res.data[0].id; |
|
|
|
} |
|
|
|
// this.houseId = res.data[0].id; |
|
|
|
this.deptFindList(); |
|
|
|
this.teamAllLeve() |
|
|
|
}); |
|
|
|
}, |
|
|
|
deptChange() { |
|
|
|
this.init(); |
|
|
|
}, |
|
|
@@ -506,7 +395,6 @@ export default { |
|
|
|
houseId: this.houseId, |
|
|
|
}) |
|
|
|
.then((res) => { |
|
|
|
console.log(res); |
|
|
|
this.options = [ |
|
|
|
{ |
|
|
|
name: "全部", |
|
|
@@ -520,13 +408,9 @@ export default { |
|
|
|
async init() { |
|
|
|
this.accountRank(); |
|
|
|
this.echarlist=await this.accountRankTOP10(1); |
|
|
|
this.echarlist1=await this.accountRankTOP10(2,this.teamAllLevelid,''); |
|
|
|
this.echarlist2=await this.accountRankTOP10(3); |
|
|
|
this.echarlist1=await this.accountRankTOP10(3,this.teamAllLevelid,''); |
|
|
|
this.echarlist2=await this.accountRankTOP10(2); |
|
|
|
this.echarlist3=await this.accountRankTOP10(4,'',this.teamAllLeve2id); |
|
|
|
console.log(this.echarlist); |
|
|
|
}, |
|
|
|
houseChange(e) { |
|
|
|
console.log(e); |
|
|
|
}, |
|
|
|
// 获取图标 |
|
|
|
async accountRankTOP10(type,marketingId='',words='') { |
|
|
@@ -542,10 +426,38 @@ export default { |
|
|
|
marketingId, |
|
|
|
words, |
|
|
|
}); |
|
|
|
this['sum'+type]=res.data.sum |
|
|
|
this['num'+type]=res.data.num |
|
|
|
this['avg'+type]=res.data.avg |
|
|
|
return res.data.list; |
|
|
|
this['sum'+type]=res.data.sum || 0; |
|
|
|
this['num'+type]=res.data.num || 0; |
|
|
|
this['avg'+type]=res.data.avg || 0; |
|
|
|
let arr=[] |
|
|
|
res.data.list.map(item=>{ |
|
|
|
let obj={} |
|
|
|
if(type==1){ |
|
|
|
obj.name=item.accountName |
|
|
|
obj.zxl=item.activeCustomer |
|
|
|
arr.push(obj) |
|
|
|
}else if(type==2){ |
|
|
|
obj.name=item.accountName |
|
|
|
obj.zxl=Math.floor(item.sumDuration/60) |
|
|
|
arr.push(obj) |
|
|
|
}else if(type==3){ |
|
|
|
obj.name=item.accountName |
|
|
|
obj.zxl=item.fraction |
|
|
|
arr.push(obj) |
|
|
|
}else{ |
|
|
|
obj.name=item.accountName |
|
|
|
obj.zxl=item.prohibitedCustomer |
|
|
|
arr.push(obj) |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
if(type==3){ |
|
|
|
arr=arr |
|
|
|
console.log(this.avg3) |
|
|
|
}else{ |
|
|
|
arr=this.dealData(arr) |
|
|
|
} |
|
|
|
return arr; |
|
|
|
}, |
|
|
|
accountRank() { |
|
|
|
this.$api.api |
|
|
@@ -602,13 +514,11 @@ export default { |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
// console.log(this.tableData); |
|
|
|
}, |
|
|
|
//销讲执行率切换一级 |
|
|
|
async teamAllLevelidtap() { |
|
|
|
// this.teamData3(); |
|
|
|
this.echarlist1=await this.accountRankTOP10(2,this.teamAllLevelid,''); |
|
|
|
this.echarlist1=await this.accountRankTOP10(3,this.teamAllLevelid,''); |
|
|
|
}, |
|
|
|
//违禁接待次数一级切换 |
|
|
|
async teamAllLeve2tap() { |
|
|
@@ -683,57 +593,20 @@ export default { |
|
|
|
tabtimetap(index) { |
|
|
|
this.statDateStart = ""; |
|
|
|
this.statDateEnd = ""; |
|
|
|
//给时间选择器赋值 |
|
|
|
let num = 24 * 3600 * 1000; |
|
|
|
// 获取当前时间戳转换为日期格式 |
|
|
|
if (this.dateType == 4) { |
|
|
|
num = 24 * 3600 * 1000 * 6; |
|
|
|
} |
|
|
|
if (this.dateType == 5) { |
|
|
|
num = 24 * 3600 * 1000 * 14; |
|
|
|
} |
|
|
|
if (this.dateType == 6) { |
|
|
|
num = 24 * 3600 * 1000 * 29; |
|
|
|
} |
|
|
|
|
|
|
|
this.customtime = [ |
|
|
|
this.timestampToTime(new Date().getTime() - num), |
|
|
|
this.timestampToTime(new Date().getTime()), |
|
|
|
]; |
|
|
|
this.dateType = index; |
|
|
|
this.init(); |
|
|
|
}, |
|
|
|
timestampToTime(timestamp) { |
|
|
|
var date = new Date(timestamp); //时间戳为10位需*1000,时间戳为13位的话不需乘1000 |
|
|
|
// var date = new Date(timestamp * 1000);//时间戳为10位需*1000,时间戳为13位的话不需乘1000 |
|
|
|
|
|
|
|
var yyyy = date.getFullYear() + "-"; |
|
|
|
|
|
|
|
var MM = |
|
|
|
(date.getMonth() + 1 < 10 |
|
|
|
? "0" + (date.getMonth() + 1) |
|
|
|
: date.getMonth() + 1) + "-"; |
|
|
|
|
|
|
|
// var dd = date.getDate() + ' '; |
|
|
|
var dd = |
|
|
|
(date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + " "; |
|
|
|
|
|
|
|
// var HH = date.getHours() + ':'; |
|
|
|
// var HH = (date.getHours() < 10 ? '0'+(date.getHours()) : date.getHours()) + ':'; |
|
|
|
// |
|
|
|
// // var mm = date.getMinutes() + ':'; |
|
|
|
// var mm = (date.getMinutes() < 10 ? '0'+(date.getMinutes()) : date.getMinutes()) + ':'; |
|
|
|
// |
|
|
|
// // var ss = date.getSeconds(); |
|
|
|
// var ss = (date.getSeconds() < 10 ? '0'+(date.getSeconds()) : date.getSeconds()); |
|
|
|
|
|
|
|
// return yyyy+MM+dd+HH+mm+ss; |
|
|
|
return yyyy + MM + dd; |
|
|
|
}, |
|
|
|
tabFlagChange(idx) { |
|
|
|
this.tabFlag = idx; |
|
|
|
this.deailDate(); |
|
|
|
}, |
|
|
|
dealData(arr){ |
|
|
|
let num=Math.max.apply(Math, arr.map(function (o) { return o.zxl })) //结果:3 |
|
|
|
arr.map(item=>{ |
|
|
|
item.zxl1=Math.floor(item.zxl/num*100) |
|
|
|
}) |
|
|
|
return arr |
|
|
|
}, |
|
|
|
}, |
|
|
|
}; |
|
|
|
</script> |
|
|
|