@@ -375,6 +375,7 @@ export default { | |||
pamaet.dateType=this.TimetoAhoose | |||
} | |||
this.$api.http.houseData(pamaet).then((res) => { | |||
console.log(res) | |||
let arr=[] | |||
res.data.list.map(item=>{ | |||
let obj={} | |||
@@ -382,6 +383,7 @@ export default { | |||
obj.zxl=item.prohibitedCustomer | |||
arr.push(obj) | |||
}) | |||
console.log(arr) | |||
arr=this.dealData(arr) | |||
this.objList3={ | |||
avg: res.data.avg || 0, | |||
@@ -389,6 +391,7 @@ export default { | |||
sum:res.data.sum || 0, | |||
list:arr || [] | |||
} | |||
console.log(this.objList3) | |||
}) | |||
}, | |||
houseData4(){ | |||
@@ -479,7 +482,7 @@ export default { | |||
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) | |||
item.zxl1=Math.floor(item.zxl/num*100) || 0; | |||
}) | |||
return arr | |||
}, | |||
@@ -88,6 +88,9 @@ | |||
<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> | |||
</el-table-column> | |||
<el-table-column | |||
v-if="tabFlag == 1" | |||
@@ -95,6 +98,9 @@ | |||
label="违禁接待次数" | |||
align="center" | |||
> | |||
<template slot-scope="{ row }"> | |||
{{ row.prohibitedCustomer }}次 | |||
</template> | |||
</el-table-column> | |||
<el-table-column | |||
v-if="tabFlag == 1" | |||
@@ -102,6 +108,9 @@ | |||
label="违禁接待占比" | |||
align="center" | |||
> | |||
<template slot-scope="{ row }"> | |||
{{ row.prohibitedZb }}% | |||
</template> | |||
</el-table-column> | |||
<el-table-column | |||
v-if="tabFlag == 0" | |||
@@ -110,7 +119,7 @@ | |||
align="center" | |||
> | |||
<template slot-scope="{ row }"> | |||
{{ Math.floor(row.sumDuration / 60) }} | |||
{{ Math.floor(row.sumDuration / 60) }}分钟 | |||
</template> | |||
</el-table-column> | |||
<el-table-column | |||
@@ -119,6 +128,9 @@ | |||
label="销讲执行率" | |||
align="center" | |||
> | |||
<template slot-scope="{row}"> | |||
{{row.fraction}}% | |||
</template> | |||
</el-table-column> | |||
<el-table-column | |||
v-for="(item, idx) in tablist" | |||
@@ -127,6 +139,9 @@ | |||
:label="item.label" | |||
align="center" | |||
> | |||
<template slot-scope="{row}"> | |||
{{row[item.props]}}% | |||
</template> | |||
</el-table-column> | |||
</el-table> | |||
<div style="display: flex; justify-content: flex-end; margin-top: 10px"> | |||
@@ -851,9 +851,6 @@ export default { | |||
var myChart = echarts.init(chartDom); | |||
var option; | |||
option = { | |||
tooltip: { | |||
trigger: "axis", | |||
}, | |||
legend: { | |||
data: [this.consultantname,this.Packname], | |||
top: "6", | |||
@@ -881,32 +878,6 @@ export default { | |||
}, | |||
}, | |||
}, | |||
yAxis: { | |||
type: "value", | |||
splitNumber: 4, | |||
axisLabel: { | |||
//重点在这一块,其余可以忽略 | |||
textStyle: { | |||
color: "#212121", //更改坐标轴文字颜色 | |||
}, | |||
}, | |||
axisLine: { | |||
lineStyle: { | |||
ype: "solid", | |||
color: "#DDE1EE", //x线的颜色 | |||
width: "1", //坐标线的宽度 | |||
}, | |||
}, | |||
splitLine: { | |||
lineStyle: { | |||
type: "dashed", // y轴分割线类型 | |||
}, | |||
}, | |||
axisTick: { | |||
//y轴刻度线 | |||
show: false, | |||
}, | |||
}, | |||
series: [ | |||
{ | |||
name: this.consultantname, | |||
@@ -922,6 +893,73 @@ export default { | |||
} | |||
], | |||
}; | |||
if(data1=='data3'){ | |||
option.tooltip={ | |||
trigger: 'axis', | |||
formatter: function (params) { | |||
let src= '<p>'+params[0].seriesName+':'+params[0].data+'%'+'</p>'+'<p>'+params[1].seriesName+':'+ params[1].data+'%'+'</p>'; | |||
return src | |||
} | |||
}; | |||
option.yAxis={ | |||
type: 'value', | |||
splitNumber:5, | |||
max:100, | |||
min:0, | |||
axisLabel: { //重点在这一块,其余可以忽略 | |||
textStyle: { | |||
color: '#212121', //更改坐标轴文字颜色 | |||
} | |||
}, | |||
axisLine: { | |||
lineStyle: { | |||
ype: 'solid', | |||
color: '#DDE1EE',//x线的颜色 | |||
width:'1'//坐标线的宽度 | |||
} | |||
}, | |||
splitLine: { | |||
lineStyle: { | |||
type: 'dashed' // y轴分割线类型 | |||
} | |||
}, | |||
axisTick: { //y轴刻度线 | |||
show: false | |||
}, | |||
} | |||
}else{ | |||
option.tooltip={ | |||
trigger: 'axis', | |||
} | |||
option.yAxis={ | |||
type: 'value', | |||
splitNumber:5, | |||
min:0, | |||
minInterval: 1, | |||
axisLabel: { //重点在这一块,其余可以忽略 | |||
textStyle: { | |||
color: '#212121', //更改坐标轴文字颜色 | |||
} | |||
}, | |||
axisLine: { | |||
lineStyle: { | |||
ype: 'solid', | |||
color: '#DDE1EE',//x线的颜色 | |||
width:'1'//坐标线的宽度 | |||
} | |||
}, | |||
splitLine: { | |||
lineStyle: { | |||
type: 'dashed' // y轴分割线类型 | |||
} | |||
}, | |||
axisTick: { //y轴刻度线 | |||
show: false | |||
}, | |||
}; | |||
} | |||
option && myChart.setOption(option); | |||
window.addEventListener("resize", () => { | |||
myChart.resize(); | |||
@@ -109,10 +109,17 @@ | |||
</template> | |||
</el-table-column> | |||
<el-table-column prop="receptionCount" label="接待量" align="center"> | |||
<template slot-scope="{row}"> | |||
{{row.receptionCount}}次 | |||
</template> | |||
</el-table-column> | |||
<el-table-column prop="accountNum" label="接待顾问" align="center"> | |||
</el-table-column> | |||
<el-table-column prop="activeCustomer" label="有效接待" align="center"> | |||
<template slot-scope="{row}"> | |||
{{row.activeCustomer}}次 | |||
</template> | |||
</el-table-column> | |||
<el-table-column | |||
prop="prohibitedCustomer" | |||
@@ -122,7 +129,7 @@ | |||
</el-table-column> | |||
<el-table-column prop="sumDuration" label="接待时长(分)" align="center"> | |||
<template slot-scope="{ row }"> | |||
{{ Math.floor(row.sumDuration / 60) }} | |||
{{ Math.floor(row.sumDuration / 60) }}分钟 | |||
</template> | |||
</el-table-column> | |||
<el-table-column | |||
@@ -130,8 +137,14 @@ | |||
label="违禁接待占比" | |||
align="center" | |||
> | |||
<template slot-scope="{row}"> | |||
{{row.prohibitedZb}}% | |||
</template> | |||
</el-table-column> | |||
<el-table-column prop="fraction" label="平均执行率" align="center"> | |||
<template slot-scope="{row}"> | |||
{{row.fraction}}% | |||
</template> | |||
</el-table-column> | |||
<el-table-column | |||
v-for="(item, idx) in tablist" | |||
@@ -140,6 +153,9 @@ | |||
:label="item.label" | |||
align="center" | |||
> | |||
<template slot-scope="{row}"> | |||
{{row[item.props]}}% | |||
</template> | |||
</el-table-column> | |||
<el-table-column label="操作" align="center"> | |||
<template slot-scope="scope"> | |||
@@ -798,6 +798,7 @@ export default { | |||
option = { | |||
tooltip: { | |||
trigger: "axis", | |||
formatter: '{b0}: {c0}'+'%' | |||
}, | |||
legend: { | |||
data: ["起始时间"], | |||
@@ -828,7 +829,9 @@ export default { | |||
}, | |||
yAxis: { | |||
type: "value", | |||
splitNumber: 4, | |||
splitNumber:5, | |||
max:100, | |||
min:0, | |||
axisLabel: { | |||
//重点在这一块,其余可以忽略 | |||
textStyle: { | |||
@@ -876,6 +879,10 @@ export default { | |||
option = { | |||
tooltip: { | |||
trigger: "axis", | |||
formatter: function (params) { | |||
let src= '<p>'+params[0].seriesName+':'+params[0].data+'%'+'</p>'+'<p>'+params[1].seriesName+':'+ params[1].data+'%'+'</p>'; | |||
return src | |||
} | |||
}, | |||
legend: { | |||
data: ["起始时间","对比时间"], | |||
@@ -906,7 +913,9 @@ export default { | |||
}, | |||
yAxis: { | |||
type: "value", | |||
splitNumber: 4, | |||
splitNumber:5, | |||
max:100, | |||
min:0, | |||
axisLabel: { | |||
//重点在这一块,其余可以忽略 | |||
textStyle: { | |||
@@ -335,14 +335,20 @@ | |||
<el-table-column prop="time" label="时间" align="center"> | |||
</el-table-column> | |||
<el-table-column prop="data1" label="时段一" align="center"> | |||
<template slot-scope="{row}"> | |||
{{row.data1}}% | |||
</template> | |||
</el-table-column> | |||
<el-table-column prop="data2" label="时段二" align="center"> | |||
<template slot-scope="{row}"> | |||
{{row.data2}}% | |||
</template> | |||
</el-table-column> | |||
<el-table-column prop="data3" label="变化" align="center"> | |||
<template slot-scope="scope"> | |||
<span | |||
:style="scope.row.data3 >= 0 ? 'color:green;' : 'color:red;'" | |||
>{{ scope.row.data3 }}</span | |||
>{{ scope.row.data3 }}%</span | |||
> | |||
</template> | |||
</el-table-column> | |||
@@ -683,15 +689,15 @@ export default { | |||
}, | |||
//卡片下折线图 | |||
SwitchCARDS(arr, str, timeDate, Strname) { | |||
// console.log(arr,str,timeDate,Strname); | |||
echarts.init(document.getElementById(str)).dispose(); // 销毁实例 | |||
var chartDom = document.getElementById(str); | |||
var myChart = echarts.init(chartDom); | |||
var option; | |||
option = { | |||
tooltip: { | |||
trigger: "axis", | |||
}, | |||
// tooltip: { | |||
// trigger: "axis", | |||
// }, | |||
legend: { | |||
data: Strname, | |||
bottom: "10", | |||
@@ -719,7 +725,57 @@ export default { | |||
}, | |||
}, | |||
}, | |||
yAxis: { | |||
series: arr, | |||
}; | |||
if(this.secindex=='fraction'){ | |||
if(this.selectTime1){ | |||
option.tooltip={ | |||
trigger: 'axis', | |||
formatter: function (params) { | |||
let src= '<p>'+params[0].seriesName+':'+params[0].data+'%'+'</p>'+'<p>'+params[1].seriesName+':'+ params[1].data+'%'+'</p>'; | |||
return src | |||
} | |||
}; | |||
}else{ | |||
option.tooltip={ | |||
trigger: 'axis', | |||
formatter: '{b0}:{c0}'+'%' | |||
} | |||
} | |||
option.yAxis={ | |||
type: 'value', | |||
splitNumber:5, | |||
max:100, | |||
min:0, | |||
axisLabel: { //重点在这一块,其余可以忽略 | |||
textStyle: { | |||
color: '#212121', //更改坐标轴文字颜色 | |||
} | |||
}, | |||
axisLine: { | |||
lineStyle: { | |||
ype: 'solid', | |||
color: '#DDE1EE',//x线的颜色 | |||
width:'1'//坐标线的宽度 | |||
} | |||
}, | |||
splitLine: { | |||
lineStyle: { | |||
type: 'dashed' // y轴分割线类型 | |||
} | |||
}, | |||
axisTick: { //y轴刻度线 | |||
show: false | |||
}, | |||
} | |||
}else{ | |||
option.tooltip={ | |||
trigger: "axis", | |||
} | |||
option.yAxis={ | |||
type: "value", | |||
splitNumber: 4, | |||
axisLabel: { | |||
@@ -744,9 +800,11 @@ export default { | |||
//y轴刻度线 | |||
show: false, | |||
}, | |||
}, | |||
series: arr, | |||
}; | |||
} | |||
} | |||
option && myChart.setOption(option); | |||
window.addEventListener("resize", () => { | |||
myChart.resize(); | |||
@@ -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.169:9999' //长龙 | |||
// const url = 'http://39.97.167.65:9999' //测试 | |||
const url = 'http://192.168.31.169:9999' //长龙 | |||
// const url = 'http://192.168.31.134:9999' //嘉豪 | |||
// const url = 'http://192.168.31.100:9999' //王笑 | |||
// const url = 'http://nitu5e.natappfree.cc' //王笑 | |||