Browse Source

提交表格修改bug

newStyle
douzhuo 2 years ago
parent
commit
a2ab7e4418
3 changed files with 296 additions and 260 deletions
  1. +2
    -2
      package.json
  2. +292
    -256
      src/views/Statistics/ConsultantBrand.vue
  3. +2
    -2
      vue.config.js

+ 2
- 2
package.json View File

@@ -52,13 +52,13 @@
"devDependencies": {
"@vue/cli-plugin-babel": "^3.12.0",
"@vue/cli-service": "^3.12.0",
"benz-amr-recorder": "^1.0.14",
"chai": "^4.1.2",
"compression-webpack-plugin": "^3.1.0",
"node-sass": "^4.9.0",
"sass-loader": "^7.0.1",
"vue-template-compiler": "^2.6.10",
"vue-video-player": "^5.0.2",
"benz-amr-recorder": "^1.0.14"
"vue-video-player": "^5.0.2"
},
"lint-staged": {
"*.js": [


+ 292
- 256
src/views/Statistics/ConsultantBrand.vue View File

@@ -1,66 +1,70 @@
<template>
<div class="box-center">

<div class="app-top">
<div class="app-titel" v-if="role!=3" style="margin-bottom:10px;">
<div class="app-titel" v-if="role != 3" style="margin-bottom: 10px">
<div class="titel-text">楼盘选择:</div>
<div style="margin-left: 26px">
<el-select v-model="houseId" placeholder="请选择" @change="houseChange">
<el-select
v-model="houseId"
placeholder="请选择"
@change="houseChange"
>
<el-option
v-for="item in houseList"
:key="item.id"
:label="item.propertyName"
:value="item.id">
:value="item.id"
>
</el-option>
</el-select>
</div>
</div>
<div class="app-titel">
<div style="text-indent: 30px;">接待时间:</div>
<div class="toptimeqhuan">
<div :class="{ tophove: dateType == 4 }" @click="tabtimetap(4)">
近7天
</div>
<div :class="{ tophove: dateType == 5 }" @click="tabtimetap(5)">
近15天
<div class="app-titel">
<div style="text-indent: 30px">接待时间:</div>
<div class="toptimeqhuan">
<div :class="{ tophove: dateType == 4 }" @click="tabtimetap(4)">
近7天
</div>
<div :class="{ tophove: dateType == 5 }" @click="tabtimetap(5)">
近15天
</div>
<div :class="{ tophove: dateType == 6 }" @click="tabtimetap(6)">
近30天
</div>
</div>
<div :class="{ tophove: dateType == 6 }" @click="tabtimetap(6)">
近30天
<div style="margin-left: 26px">
<el-date-picker
v-model="customtime"
@change="confirmtime()"
type="daterange"
range-separator="-"
:default-time="['00:00:00', '23:59:59']"
value-format="yyyy-MM-dd"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</div>
</div>
<div style="margin-left: 26px">
<el-date-picker
v-model="customtime"
@change="confirmtime()"
type="daterange"
range-separator="-"
:default-time="['00:00:00', '23:59:59']"
value-format="yyyy-MM-dd"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</div>
<div style="margin-left: 26px" class="div-lab">
<div class="label">团队</div>
<el-select
v-model="deptId"
filterable
@change="deptChange"
placeholder="请选择"
class="div-inp"
>
<el-option
v-for="item in options"
:key="item.deptId"
:label="item.name"
:value="item.deptId"
<div style="margin-left: 26px" class="div-lab">
<div class="label">团队</div>
<el-select
v-model="deptId"
filterable
@change="deptChange"
placeholder="请选择"
class="div-inp"
>
</el-option>
</el-select>
<el-option
v-for="item in options"
:key="item.deptId"
:label="item.name"
:value="item.deptId"
>
</el-option>
</el-select>
</div>
</div>
</div>
</div>
<!-- 表格 -->
<div class="cen-tab">
<div class="app-titel1">
@@ -72,7 +76,10 @@
违禁统计
</div>
</div>
<div style="margin-left: auto;margin-right:10px;" v-if="sta_men_downLoad">
<div
style="margin-left: auto; margin-right: 10px"
v-if="sta_men_downLoad"
>
<el-button @click="downLoad">导出</el-button>
</div>
</div>
@@ -91,9 +98,7 @@
<el-table-column prop="deptName" label="归属团队" align="center">
</el-table-column>
<el-table-column prop="activeCustomer" label="接待量" align="center">
<template slot-scope="{ row }">
{{ row.activeCustomer }}次
</template>
<template slot-scope="{ row }"> {{ row.activeCustomer }}次 </template>
</el-table-column>
<el-table-column
v-if="tabFlag == 1"
@@ -101,7 +106,7 @@
label="违禁接待次数"
align="center"
>
<template slot-scope="{ row }">
<template slot-scope="{ row }">
{{ row.prohibitedCustomer }}次
</template>
</el-table-column>
@@ -111,9 +116,7 @@
label="违禁接待占比"
align="center"
>
<template slot-scope="{ row }">
{{ row.prohibitedZb }}%
</template>
<template slot-scope="{ row }"> {{ row.prohibitedZb }}% </template>
</el-table-column>
<el-table-column
v-if="tabFlag == 0"
@@ -131,9 +134,7 @@
label="销讲执行率"
align="center"
>
<template slot-scope="{row}">
{{row.fraction}}%
</template>
<template slot-scope="{ row }"> {{ row.fraction }}% </template>
</el-table-column>
<el-table-column
v-for="(item, idx) in tablist"
@@ -142,9 +143,7 @@
:label="item.label"
align="center"
>
<template slot-scope="{row}">
{{row[item.props]}}%
</template>
<template slot-scope="{ row }"> {{ row[item.props] }}% </template>
</el-table-column>
</el-table>
<div style="display: flex; justify-content: flex-end; margin-top: 10px">
@@ -169,18 +168,19 @@
<div class="hejisan">
<div class="sanbox1" style="width: 35%">
<div class="text1-1">接待合计</div>
<div class="text1-2">{{sum1}}次</div>
<div class="text1-2">{{ sum1 }}次</div>
</div>
<div class="sanbox1" style="width: 40%">
<div class="text1-1">顾问人数</div>
<div class="text1-2">{{num1}}个</div>
<div class="text1-2">{{ num1 }}个</div>
</div>
<div class="sanbox1" style="width: 25%">
<div class="text1-1">人均接待</div>
<div class="text1-2">{{avg1}}次</div>
<div class="text1-2">{{ avg1 }}次</div>
</div>
</div>
<div v-if="echarlist.length!=0"
<div
v-if="echarlist.length != 0"
style="overflow-y: auto; height: 258px; width: 94%; margin: 0 auto"
>
<div class="jinbox" v-for="(item, i) in echarlist" :key="i">
@@ -194,33 +194,38 @@
<div class="jinboxbott">{{ item.zxl }}</div>
</div>
</div>
<div class="nulllist" style="height:250px" v-if="echarlist.length==0">
<div class="imgboxc">
<img class="imgboxc-img" src="/img/nullnull.png" alt="">
<div class="nulltext">暂无数据</div>
</div>
</div>
<div
class="nulllist"
style="height: 250px"
v-if="echarlist.length == 0"
>
<div class="imgboxc">
<img class="imgboxc-img" src="/img/nullnull.png" alt="" />
<div class="nulltext">暂无数据</div>
</div>
</div>
</div>
<div class="you">
<div class="title">
<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">{{Math.floor(sum2/60)}}分钟</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-2">{{num2}}个</div>
<div class="text1-2">{{ num2 }}个</div>
</div>
<div class="sanbox1" style="width: 25%">
<div class="text1-1">均值</div>
<div class="text1-2">{{Math.floor(avg2/60)}}分钟</div>
<div class="text1-2">{{ Math.floor(avg2 / 60) }}分钟</div>
</div>
</div>
<div v-if="echarlist2.length!=0"
<div
v-if="echarlist2.length != 0"
style="overflow-y: auto; height: 258px; width: 94%; margin: 0 auto"
>
<div class="jinbox" v-for="(item, i) in echarlist2" :key="i">
@@ -234,19 +239,23 @@
<div class="jinboxbott">{{ item.zxl }}</div>
</div>
</div>
<div class="nulllist" style="height:250px" v-if="echarlist2.length==0">
<div class="imgboxc">
<img class="imgboxc-img" src="/img/nullnull.png" alt="">
<div class="nulltext">暂无数据</div>
</div>
</div>
<div
class="nulllist"
style="height: 250px"
v-if="echarlist2.length == 0"
>
<div class="imgboxc">
<img class="imgboxc-img" src="/img/nullnull.png" alt="" />
<div class="nulltext">暂无数据</div>
</div>
</div>
</div>
</div>

<div class="app-box-san">
<div class="zuo">
<div class="title">
<div class="text1">平均执行率排名(TOP10)</div>
<div class="title">
<div class="text1">平均执行率排名(TOP10)</div>
<div class="text2">
<el-select
@change="teamAllLevelidtap()"
@@ -264,17 +273,18 @@
</el-select>
</div>
</div>
<div class="hejisan">
<div class="hejisan">
<div class="sanbox1" style="width: 50%">
<div class="text1-1">顾问人数</div>
<div class="text1-2">{{num3}}个</div>
<div class="text1-2">{{ num3 }}个</div>
</div>
<div class="sanbox1" style="width: 50%">
<div class="text1-1">平均执行</div>
<div class="text1-2">{{avg3}}%</div>
<div class="text1-2">{{ avg3 }}%</div>
</div>
</div>
<div v-if="echarlist1.length!=0"
<div
v-if="echarlist1.length != 0"
style="overflow-y: auto; height: 258px; width: 94%; margin: 0 auto"
>
<div class="jinbox" v-for="(item, i) in echarlist1" :key="i">
@@ -288,12 +298,16 @@
<div class="jinboxbott">{{ item.zxl }}%</div>
</div>
</div>
<div class="nulllist" style="height:250px" v-if="echarlist1.length==0">
<div class="imgboxc">
<img class="imgboxc-img" src="/img/nullnull.png" alt="">
<div class="nulltext">暂无数据</div>
</div>
</div>
<div
class="nulllist"
style="height: 250px"
v-if="echarlist1.length == 0"
>
<div class="imgboxc">
<img class="imgboxc-img" src="/img/nullnull.png" alt="" />
<div class="nulltext">暂无数据</div>
</div>
</div>
</div>
<div class="you">
<div class="title">
@@ -318,18 +332,19 @@
<div class="hejisan">
<div class="sanbox1" style="width: 35%">
<div class="text1-1">违禁合计</div>
<div class="text1-2">{{sum4}}次</div>
<div class="text1-2">{{ sum4 }}次</div>
</div>
<div class="sanbox1" style="width: 40%">
<div class="text1-1">顾问人数</div>
<div class="text1-2">{{num4}}个</div>
<div class="text1-2">{{ num4 }}个</div>
</div>
<div class="sanbox1" style="width: 25%">
<div class="text1-1">均值</div>
<div class="text1-2">{{avg4}}次</div>
<div class="text1-2">{{ avg4 }}次</div>
</div>
</div>
<div v-if="echarlist3.length!=0"
<div
v-if="echarlist3.length != 0"
style="overflow-y: auto; height: 258px; width: 94%; margin: 0 auto"
>
<div class="jinbox" v-for="(item, i) in echarlist3" :key="i">
@@ -340,15 +355,19 @@
:style="'width:' + item.zxl1 + '%;'"
></div>
</div>
<div class="jinboxbott">{{ item.zxl }}</div>
<div class="jinboxbott">{{ item.zxl1 }}</div>
</div>
</div>
<div
class="nulllist"
style="height: 250px"
v-if="echarlist3.length == 0"
>
<div class="imgboxc">
<img class="imgboxc-img" src="/img/nullnull.png" alt="" />
<div class="nulltext">暂无数据</div>
</div>
</div>
<div class="nulllist" style="height:250px" v-if="echarlist3.length==0">
<div class="imgboxc">
<img class="imgboxc-img" src="/img/nullnull.png" alt="">
<div class="nulltext">暂无数据</div>
</div>
</div>
</div>
</div>
</div>
@@ -357,7 +376,7 @@
<script>
import * as echarts from "echarts";
import { mapGetters } from "vuex";
import { exportMethodPost} from "@/util/util";
import { exportMethodPost } from "@/util/util";
export default {
data() {
return {
@@ -384,25 +403,25 @@ export default {
echarlist3: [],
teamAllLevel: [],
teamAllLevelid: "",
teamAllLeve2id:"",
teamAllLeve2id: "",
teamAllLeve2: [],
sum1:'',
avg1:'',
num1:'',
sum1: "",
avg1: "",
num1: "",

sum2:'',
avg2:'',
num2:'',
sum2: "",
avg2: "",
num2: "",

sum3:'',
avg3:'',
num3:'',
sum3: "",
avg3: "",
num3: "",

sum4:'',
avg4:'',
num4:'',
houseList:[],
role:''
sum4: "",
avg4: "",
num4: "",
houseList: [],
role: "",
};
},
computed: {
@@ -412,58 +431,61 @@ export default {
this.sta_men_downLoad = this.permissions["sta_men_downLoad"];
},
mounted() {
this.role=localStorage.getItem("orgType");
if(this.role==3){
this.role = localStorage.getItem("orgType");
if (this.role == 3) {
this.houseId = localStorage.getItem("houseId");
this.tabtimetap(4);
this.deptFindList();
this.teamAllLeve()
}else{
this.zkhousePage()
this.tabtimetap(4);
this.deptFindList();
this.teamAllLeve();
} else {
this.zkhousePage();
}

},
methods: {
downLoad(){
let obj={
houseId: this.houseId,
statDateStart: this.statDateStart,
statDateEnd: this.statDateEnd,
deptId: this.deptId,
dateType: this.dateType == 7 ? null : this.dateType,
}
downLoad() {
let obj = {
houseId: this.houseId,
statDateStart: this.statDateStart,
statDateEnd: this.statDateEnd,
deptId: this.deptId,
dateType: this.dateType == 7 ? null : this.dateType,
};
// exportMethodPost()
exportMethodPost('autoSR/cusStageStatistics/accountRankExport','顾问排名',obj)
exportMethodPost(
"autoSR/cusStageStatistics/accountRankExport",
"顾问排名",
obj
);
},
houseChange(){
this.customtime=[];
this.TimetoAhoose=4;
this.statDateStart= '';
this.statDateEnd= '';
this.sum1='';
this.avg1='';
this.num1='';
houseChange() {
this.customtime = [];
this.TimetoAhoose = 4;
this.statDateStart = "";
this.statDateEnd = "";
this.sum1 = "";
this.avg1 = "";
this.num1 = "";

this.sum2='';
this.avg2='';
this.num2='';
this.sum2 = "";
this.avg2 = "";
this.num2 = "";

this.sum3='';
this.avg3='';
this.num3='';
this.sum3 = "";
this.avg3 = "";
this.num3 = "";

this.sum4='';
this.avg4='';
this.num4='';
this.tableData=[];
this.tabFlag=0;
this.echarlist= [];
this.echarlist1= [];
this.echarlist2=[];
this.echarlist3=[];
this.sum4 = "";
this.avg4 = "";
this.num4 = "";
this.tableData = [];
this.tabFlag = 0;
this.echarlist = [];
this.echarlist1 = [];
this.echarlist2 = [];
this.echarlist3 = [];
this.tabtimetap(4);
this.deptFindList();
this.teamAllLeve()
this.deptFindList();
this.teamAllLeve();
},
zkhousePage() {
this.$api.api
@@ -473,13 +495,13 @@ export default {
.then((res) => {
this.houseList = res.data;
this.houseId = res.data[0].id;
this.tabtimetap(4);
this.deptFindList();
this.teamAllLeve()
this.tabtimetap(4);
this.deptFindList();
this.teamAllLeve();
});
},
deptChange() {
this.init();
async deptChange() {
await this.init();
},
// 获取一级
teamAllLeve() {
@@ -516,25 +538,26 @@ export default {
});
},
deptFindList() {
this.options=[];
this.options = [];
// 获取团队
this.$api.http.overviewfindList({
this.$api.http
.overviewfindList({
houseId: this.houseId,
})
.then((res) => {
let userinfo=JSON.parse(sessionStorage.getItem("zk-userInfo"))
if(userinfo.content.deptType==1){
this.options.push(...res.data);
this.deptId= this.options[0].deptId
}else{
this.options = [
{
name: "全部",
deptId: "",
},
];
this.deptId='';
this.options.push(...res.data);
let userinfo = JSON.parse(sessionStorage.getItem("zk-userInfo"));
if (userinfo.content.deptType == 1) {
this.options.push(...res.data);
this.deptId = this.options[0].deptId;
} else {
this.options = [
{
name: "全部",
deptId: "",
},
];
this.deptId = "";
this.options.push(...res.data);
}

this.accountRank();
@@ -542,13 +565,13 @@ export default {
},
async init() {
this.accountRank();
this.echarlist=await this.accountRankTOP10(1);
this.echarlist1=await this.accountRankTOP10(3,this.teamAllLevelid,'');
this.echarlist2=await this.accountRankTOP10(2);
this.echarlist3=await this.accountRankTOP10(4,'',this.teamAllLeve2id);
this.echarlist = await this.accountRankTOP10(1);
this.echarlist1 = await this.accountRankTOP10(3, this.teamAllLevelid, "");
this.echarlist2 = await this.accountRankTOP10(2);
this.echarlist3 = await this.accountRankTOP10(4, "", this.teamAllLeve2id);
},
// 获取图标
async accountRankTOP10(type,marketingId='',words='') {
async accountRankTOP10(type, marketingId = "", words = "") {
let res = await this.$api.api.accountRankTOP10({
houseId: this.houseId,
statDateStart: this.statDateStart,
@@ -560,41 +583,44 @@ export default {
marketingId,
words,
});
this['sum'+type]=res.data.sum || 0;
this['num'+type]=res.data.num || 0;
this['avg'+type]=res.data.avg || 0;
let arr=[]
let newarr=res.data.list||[]
if(newarr.length!=0){
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)
this["sum" + type] = res.data.sum || 0;
this["num" + type] = res.data.num || 0;
this["avg" + type] = res.data.avg || 0;
let arr = [];
let newarr = res.data.list || [];
if (newarr.length != 0) {
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;
}

if (type == 4) {
arr = this.dealData(arr);
console.log(type);
}
return arr;
},

accountRank() {
this.$api.api
.accountRank({
@@ -624,7 +650,6 @@ export default {
this.tablist = [];
// 当他是第一个 小将
if (this.tabFlag == 0) {
// console.log("第一个");
this.tableData[0].resultsList.map((item, idx) => {
let obj = {};
obj.label = item.name;
@@ -637,7 +662,6 @@ export default {
});
});
} else {
// console.log("第二个");
this.tableData[0].sensitiveWordsList.map((item, idx) => {
let obj = {};
obj.label = item.words;
@@ -654,12 +678,12 @@ export default {
//平均执行率切换一级
async teamAllLevelidtap() {
// this.teamData3();
this.echarlist1=await this.accountRankTOP10(3,this.teamAllLevelid,'');
this.echarlist1 = await this.accountRankTOP10(3, this.teamAllLevelid, "");
},
//违禁接待次数一级切换
async teamAllLeve2tap() {
// this.teamData5();
this.echarlist3=await this.accountRankTOP10(4,'',this.teamAllLeve2id);
this.echarlist3 = await this.accountRankTOP10(4, "", this.teamAllLeve2id);
},
echarCreat() {
let myChart = echarts.init(document.getElementById("echar"));
@@ -736,13 +760,25 @@ export default {
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
},
dealData(arr) {
console.log(arr, "arr");
let num = Math.max.apply(
Math,
arr.map(function (o) {
return o.zxl;
})
); //结果:3
console.log(num, "nums");
arr.map((item) => {
if (num != 0) {
item.zxl1 = Math.floor((item.zxl / num) * 100);
} else {
item.zxl1 = 0
}
});
console.log(arr, "arr2");
return arr;
},
},
};
</script>
@@ -801,7 +837,7 @@ export default {
}
}

.app-top{
.app-top {
width: 100%;
background: #ffffff;
box-shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.04);
@@ -809,36 +845,36 @@ export default {
padding-top: 15px;
padding-bottom: 15px;
.app-titel {
width: 100%;
display: flex;
align-items: center;
.titel-text {
height: 100%;
font-size: 16px;
font-weight: 600;
color: #32363d;
text-indent: 30px;
}
.toptimeqhuan {
width: 190px;
height: 32px;
background: #ffffff;
border-radius: 4px;
border: 1px solid #e0e0e0;
width: 100%;
display: flex;
align-items: center;
overflow: hidden;
margin-left: 20px;
cursor: pointer;
}
.toptimeqhuan div {
flex: 1;
text-align: center;
line-height: 32px;
font-size: 14px;
.titel-text {
height: 100%;
font-size: 16px;
font-weight: 600;
color: #32363d;
text-indent: 30px;
}
.toptimeqhuan {
width: 190px;
height: 32px;
background: #ffffff;
border-radius: 4px;
border: 1px solid #e0e0e0;
display: flex;
align-items: center;
overflow: hidden;
margin-left: 20px;
cursor: pointer;
}
.toptimeqhuan div {
flex: 1;
text-align: center;
line-height: 32px;
font-size: 14px;
}
}
}
}

.app-box-san {
width: 100%;


+ 2
- 2
vue.config.js View File

@@ -3,8 +3,8 @@
* https://cli.vuejs.org/zh/config/
*/
// const url = 'http://pigx-gateway'
// const url = 'http://39.97.167.65:9999' //测试
const url = 'http://192.168.31.167:9999' //长龙
const url = 'http://39.97.167.65:9999' //测试
// const url = 'http://192.168.31.167:9999' //长龙
// const url = 'http://192.168.31.134:9999' //嘉豪
// const url = 'http://192.168.31.100:9999' //王笑
// const url = 'http://62.234.122.43:9999' //正式


Loading…
Cancel
Save