This commit is contained in:
xvv 2024-10-26 15:41:28 +08:00
parent 086fc02199
commit 56e545edf5
8 changed files with 548 additions and 212 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 549 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 KiB

After

Width:  |  Height:  |  Size: 133 KiB

View File

@ -1,7 +1,8 @@
<template>
<div class="cont">
<div class="top_">
<div>车辆检测数据大屏</div>
<!-- <div>车辆检测数据大屏</div>-->
</div>
<!-- -->
<div class="content_">
@ -66,78 +67,38 @@
</el-date-picker>
</div>
<div class="five_box">
<div class="f_box">
<div class="img_left">
<!-- <img src="./imgs/1.png" style="width: 60px;height: 60px">-->
订单数量
</div>
<div>
<div class="f_size">{{ data2.allNum || 0 }}</div>
<!-- <div class="f_size">2</div>-->
<!-- <div class="f_num">{{ statusTickets[3].value }}</div>-->
</div>
<div class="three_box">
<div class="three_title">订单数量</div>
<div class="three_size">{{ data2.allNum || 0 }}</div>
</div>
<div class="f_box">
<div class="img_left">
<!-- <img src="./imgs/2.png" style="width: 60px;height: 60px">-->
完成数量
</div>
<div>
<div class="f_size">{{ data2.ywcNum || 0 }}</div>
<!-- <div class="f_num">{{ statusTickets[4].value }}</div>-->
</div>
<div class="three_box">
<div class="three_title">完成数量</div>
<div class="three_size">{{ data2.ywcNum || 0 }}</div>
</div>
<div class="f_box">
<div class="img_left">
<!-- <img src="./imgs/3.png" style="width: 60px;height: 60px">-->
检测中数量
</div>
<div>
<div class="f_size">{{ data2.jxzNum || 0 }}</div>
<!-- <div class="f_num">{{ statusTickets[0].value }}</div>-->
</div>
<div class="three_box">
<div class="three_title">检测中</div>
<div class="three_size">{{ data2.jxzNum || 0 }}</div>
</div>
</div>
<div class="five_box">
<div class="f_box">
<div class="img_left">
<!-- <img src="./imgs/1.png" style="width: 60px;height: 60px">-->
公示价格
</div>
<div>
<!-- <div class="f_size">1</div>-->
<div class="f_size">{{ data1.gsAmount || 0 }}</div>
<!-- <div class="f_num">{{ statusTickets[3].value }}</div>-->
</div>
<div class="fv_box">
<div class="b-b">
<div>公示价格</div>
<div class="b_box">4090</div>
</div>
<div class="f_box">
<div class="img_left">
<!-- <img src="./imgs/2.png" style="width: 60px;height: 60px">-->
应收款
</div>
<div>
<div class="f_size">{{ data1.ysAmount || 0 }}</div>
<!-- <div class="f_num">{{ statusTickets[4].value }}</div>-->
</div>
<div class="b-b">
<div>应收</div>
<div class="b_box">4090</div>
</div>
<div class="f_box">
<div class="img_left">
已收款
</div>
<div>
<div class="f_size">{{ data1.yjsAmount || 0 }}</div>
</div>
<div class="b-b">
<div>已收</div>
<div class="b_box">4090</div>
</div>
<div class="f_box">
<div class="img_left">
<!-- <img src="./imgs/4.png" style="width: 60px;height: 60px">-->
待收款
</div>
<div>
<div class="f_size">{{ data1.ysAmount - data1.yjsAmount || 0 }}</div>
<!-- <div class="f_num">{{ statusTickets[1].value }}</div>-->
</div>
<div class="b-b">
<div>待收</div>
<div class="b_box">4090</div>
</div>
</div>
<div class="co_title">
客户来源统计
@ -179,16 +140,69 @@
</div>
</div>
</div>
<div class="echaets_box">
<div id="jchgl" style="width: 400px; height: 267px;"></div>
<div class="echaets_box" style="padding-top: 15px" >
<!-- gdt-->
<div class="jd_box">
<div class="jd_bt">
<div>重型货车</div>
<div>{{Progress1}}%</div>
</div>
<div class="jd_k">
<div class="jd_v" :style=" 'width:' + Progress1+'%' " ></div>
</div>
</div>
<div class="jd_box">
<div class="jd_bt">
<div>3.5以上 轻型货车</div>
<div>{{Progress1}}%</div>
</div>
<div class="jd_k">
<div class="jd_v" :style=" 'width:' + Progress1+'%' " ></div>
</div>
</div>
<div class="jd_box">
<div class="jd_bt">
<div>3.5以下 轻型货车</div>
<div>{{Progress1}}%</div>
</div>
<div class="jd_k">
<div class="jd_v" :style=" 'width:' + Progress1+'%' " ></div>
</div>
</div>
</div>
</div>
<div class="six_box">
<div class="s_title">
检测商品统计
</div>
<div class="echaets_box">
<div id="jcsptj" style="width: 400px; height: 267px;"></div>
<div class="echaets_box" style="display: flex;align-items: center;justify-content: space-around">
<div id="jcsptj" style="width: 170px; height: 170px;"></div>
<div>
<div class="hang_box">
<div>
<div class="jt_"></div>
<div class="jt_size" style="color: #0174F6">双燃料机油</div>
</div>
<div>278</div>
</div>
<div class="hang_box" >
<div>
<div class="jt_" style="background: #40CC97"></div>
<div class="jt_size" style="color: #40CC97">双燃料机油</div>
</div>
<div>278</div>
</div>
<div class="hang_box">
<div>
<div class="jt_" style="background: #FFB323"></div>
<div class="jt_size" style="color: #FFB323">双燃料机油</div>
</div>
<div>278</div>
</div>
</div>
</div>
</div>
</div>
@ -217,6 +231,7 @@ export default {
};
return {
Amount: [],
Progress1:60,
unit: 'day',
unit1: 'day',
unit2: 'day',
@ -242,6 +257,10 @@ export default {
}
},
created() {
},
mounted() {
this.customerSource()
this.getServerData1()
this.chartInfoNum()
@ -251,10 +270,6 @@ export default {
this.getfive1()
this.getfive3()
this.getProduct()
},
mounted() {
},
methods: {
handleChange() {
@ -285,27 +300,113 @@ export default {
* @returns {Promise<void>}
*/
async getServerData1() {
const params = {
unit: this.unit,
}
let res = await jcBigScreen.getServerData1(params)
console.log('已收款金额', res)
res.data.series.forEach(item => {
item.type = 'bar'
})
var chartDom = document.getElementById('yskje');
var myChart = echarts.init(chartDom);
var option;
option = {
let option = {
tooltip: {
trigger: 'axis'
},
xAxis: {
type: 'category',
data: res.data.categories
data: ['小型汽车', '中型汽车', '大型汽车'],
//
axisLine: {
lineStyle: {
color: '#fff'
},
onZero:false
},
// x
axisLabel: {
interval: 0,
textStyle: {
color: '#fff', //
fontSize: 14, //
fontFamily: 'MicrosoftYaHei'
},
formatter:function(params) {
return params.split(" ").join("\n")
// console.log(' formatter',params);
},
},
},
yAxis: {
type: 'value'
type: 'value',
axisLabel: {
formatter: '{value}',
textStyle: {
color: '#fff', //
fontSize: 16, //
fontFamily: 'MicrosoftYaHei'
}
},
//
axisLine: {
lineStyle: {
color: '#657CA8'
}
},
//线
splitLine: {
show: true,
lineStyle: {
color: '#294a88',
width: 2,
opacity: 0.2
}
},
},
series: res.data.series
};
series: [{
data: [6,6,6],//this.PLAN_COUNT, this.ACTUAL_COUNT,this.GAP
type: 'bar',
barWidth:40,
itemStyle: {
normal: {
color: function (params) {
// build a color map as your need.
var colorList = [
new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
offset: 0,
color: '#4DA9FF' // 0%
}, {
offset: 1,
color: '#1D92FF' // 100%
}], false),
new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
offset: 0,
color: '#FF5C00' // 0%
}, {
offset: 1,
color: '#FF9F0A' // 100%
}], false),
new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
offset: 0,
color: '#D7FF39' // 0%
}, {
offset: 1,
color: '#32D74B' // 100%
}], false)
];
return colorList[params.dataIndex]
},
//
label: {
show: true,
position: 'top',
formatter: '{c}',
fontSize: 20,
color:'#B8CBF7'
}
}
},
}]
}
//
option && myChart.setOption(option);
},
/**
@ -313,75 +414,169 @@ export default {
* @returns {Promise<void>}
*/
async getProduct() {
let res = await jcBigScreen.hotGoodsList()
console.log('检测商品统计', res)
res.data.forEach(item => {
item.name = item.goodsName
item.value = item.salesNum
})
setTimeout(() => {
var chartDom = document.getElementById('jcsptj');
var myChart = echarts.init(chartDom);
var option;
option = {
title: {
// text: 'Referer of a Website',
// subtext: 'Fake Data',
left: 'center'
},
tooltip: {
trigger: 'item'
},
legend: {
orient: 'vertical',
left: 'left'
},
series: [
{
// name: 'Access From',
type: 'pie',
radius: '50%',
data: res.data,
emphasis: {
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
}
}
]
};
option && myChart.setOption(option);
}, 2000)
var myChart = echarts.init(chartDom);
var option;
option = {
color: ['#0174F6', '#40CC97', '#FFB323'],
title: {
text: '33%',
left: 'center',
top: '40%',
textStyle: {
fontSize: 30,
color: '#017fff',
align: 'center'
}
},
tooltip: {
trigger: 'item'
},
series: [
{
name: '',
type: 'pie',
radius: ['60%', '70%'],
avoidLabelOverlap: false,
label: {
show: false,
position: 'center'
},
emphasis: {
label: {
show: false,
fontSize: 40,
fontWeight: 'bold'
}
},
labelLine: {
show: false
},
data: [
{ value: 1048, name: '单燃料机油' },
{ value: 735, name: '双燃料机油' },
{ value: 580, name: '三燃料机油' }
]
}
]
};
option && myChart.setOption(option);
},
/**
* 数量统计
* @returns {Promise<void>}
*/
async chartInfoNum() {
const params = {
unit: this.unit1,
}
let res = await jcBigScreen.chartInfoNum(params)
console.log('数量统计', res)
res.data.series.forEach(item => {
item.type = 'bar'
})
var chartDom = document.getElementById('sltj');
var myChart = echarts.init(chartDom);
var option;
option = {
let option = {
tooltip: {
trigger: 'axis'
},
xAxis: {
type: 'category',
data: res.data.categories
data: ['小型汽车', '中型汽车', '大型汽车'],
//
axisLine: {
lineStyle: {
color: '#fff'
},
onZero:false
},
// x
axisLabel: {
interval: 0,
textStyle: {
color: '#fff', //
fontSize: 14, //
fontFamily: 'MicrosoftYaHei'
},
formatter:function(params) {
return params.split(" ").join("\n")
// console.log(' formatter',params);
},
},
},
yAxis: {
type: 'value'
type: 'value',
axisLabel: {
formatter: '{value}',
textStyle: {
color: '#fff', //
fontSize: 16, //
fontFamily: 'MicrosoftYaHei'
}
},
//
axisLine: {
lineStyle: {
color: '#657CA8'
}
},
//线
splitLine: {
show: true,
lineStyle: {
color: '#294a88',
width: 2,
opacity: 0.2
}
},
},
series: res.data.series
};
series: [{
data: [6,6,6],//this.PLAN_COUNT, this.ACTUAL_COUNT,this.GAP
type: 'bar',
barWidth:40,
itemStyle: {
normal: {
color: function (params) {
// build a color map as your need.
var colorList = [
new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
offset: 0,
color: '#4DA9FF' // 0%
}, {
offset: 1,
color: '#1D92FF' // 100%
}], false),
new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
offset: 0,
color: '#FF5C00' // 0%
}, {
offset: 1,
color: '#FF9F0A' // 100%
}], false),
new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
offset: 0,
color: '#D7FF39' // 0%
}, {
offset: 1,
color: '#32D74B' // 100%
}], false)
];
return colorList[params.dataIndex]
},
//
label: {
show: true,
position: 'top',
formatter: '{c}',
fontSize: 20,
color:'#B8CBF7'
}
}
},
}]
}
//
option && myChart.setOption(option);
},
/**
@ -406,7 +601,15 @@ export default {
data: res.data.categories
},
yAxis: {
type: 'value'
type: 'value',
axisLabel: {
formatter: '{value}',
textStyle: {
color: '#fff', //
fontSize: 16, //
fontFamily: 'MicrosoftYaHei'
}
},
},
series: res.data.series
};
@ -417,49 +620,76 @@ export default {
* @returns {Promise<void>}
*/
async chartLineInspectionNum() {
const params = {
unit: this.unit,
}
let res = await jcBigScreen.chartLineInspectionNum(params)
console.log('检测数量', res)
res.data.series.forEach(item => {
item.type = 'bar'
})
const names = res.data.series.map(item => item.name)
var chartDom = document.getElementById('jcsl');
var myChart = echarts.init(chartDom);
var option;
option = {
title: {
text: '最近七天'
},
tooltip: {
trigger: 'axis'
},
color: ['#0663f0', '#FFD78B'],
legend: {
data: names
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
toolbox: {
feature: {
saveAsImage: {}
}
top: '5%',
left: 'center'
},
xAxis: {
type: 'category',
boundaryGap: false,
data: res.data.categories
data: ['01', '02', '03', '04', '05', '06', '07'],
axisLine: {
lineStyle: {
color: '#fff'
},
onZero:false
},
axisLabel: {
formatter: '{value}',
textStyle: {
color: '#fff',
fontSize: 12,
}
},
},
yAxis: {
type: 'value'
type: 'value',
axisLabel: {
formatter: '{value}',
textStyle: {
color: '#fff', //
fontSize: 12, //
}
},
},
series: res.data.series
series: [
{
data: [820, 932, 901, 934, 1290, 1330, 1320],
type: 'line',
symbolSize: 0,
smooth: true,
areaStyle: {
opacity: 0.4,
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{ offset: 1, color: '#0663f0' },
{ offset: 0, color: '#0663f0' }
])
}
},
{
data: [220, 182, 191, 234, 290, 330, 310],
type: 'line',
symbolSize: 0,
smooth: true,
areaStyle: {
opacity: 0.4,
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{ offset: 1, color: '#FFD78B' },
{ offset: 0, color: '#FFD78B' }
])
}
}
]
};
option && myChart.setOption(option);
},
@ -467,47 +697,61 @@ export default {
* 客户来源分析饼图
*/
async customerSource() {
const params = {
unit: this.unit,
}
const res = await jcBigScreen.chartLineInspectionAmount(params);
res.data.series.forEach(item => {
// console.log( '475'+ JSON.stringify(res.data.series[0].data))
item.type = 'line'
})
var chartDom = document.getElementById('khly');
var myChart = echarts.init(chartDom);
var option;
const color = ['#31daf0', '#3367e6', '#d9458d', ];
option = {
legend: {
top: 'bottom'
tooltip: {
trigger: 'axis'
},
toolbox: {
show: true,
feature: {
mark: { show: true },
dataView: { show: true, readOnly: false },
restore: { show: traue },
saveAsImage: { show: true }
}
xAxis: {
type: 'category',
data: ['01', '02', '03', '04', '05', '06', '07'],
axisLine: {
lineStyle: {
color: '#fff'
},
onZero:false
},
axisLabel: {
formatter: '{value}',
textStyle: {
color: '#fff',
fontSize: 16,
}
},
},
yAxis: {
type: 'value',
lineStyle: {
color: '#fff'
},
axisLabel: {
formatter: '{value}',
textStyle: {
color: '#fff',
fontSize: 16,
}
},
},
series: [
{
name: 'Nightingale Chart',
type: 'pie',
radius: [20, 50],
center: ['50%', '50%'],
roseType: 'area',
itemStyle: {
borderRadius: 8
data: [120, 200, 150, 80, 70, 110, 130],
type: 'line',
symbolSize: 10,
lineStyle: {
color: '#009EDA',
width: 2
},
data: [
{ value: 40, name: 'rose 1' },
{ value: 38, name: 'rose 2' },
{ value: 32, name: 'rose 3' }
]
itemStyle: {
borderWidth: 3,
borderColor: '#009EDA',
color: '#009EDA'
}
}
]
};
@ -557,7 +801,7 @@ export default {
<style lang="scss" scoped>
.cont {
background: #020F32;
//background: url("./imgs/back.png") no-repeat;
background: url("./imgs/bcke.png") no-repeat;
background-size: 100% 100%;
width: 100%;
height: 100vh;
@ -627,9 +871,9 @@ export default {
align-items: center;
justify-content: center;
width: 100%;
border-bottom: 4px solid #0174F6;
//border-bottom: 4px solid #0174F6;
box-sizing: border-box;
padding-bottom: 20px;
}
.tab_buttom {
@ -684,6 +928,35 @@ yb_title {
justify-content: space-around;
margin: 30px auto;
}
.fv_box{
width: 100%;
height: 142px;
background: url("./imgs/top-bj.png") no-repeat;
background-size: 100% 100%;
display: flex;
justify-content: space-around;
margin-bottom: 20px;
align-items: center;
}
.three_box{
width: 190px;
height: 80px;
background: url("./imgs/kuang.png") no-repeat;
background-size: 100% 100%;
text-align: center;
box-sizing: border-box;
padding-top: 15px;
}
.three_title{
font-weight: 500;
font-size: 14px;
color: #FFFFFF;
}
.three_size{
font-weight: 500;
font-size: 30px;
color: #FFFFFF;
}
.f_size {
font-size: 14px;
@ -710,13 +983,30 @@ yb_title {
.co_title {
width: 100%;
height: 32px;
background: url("./imgs/c_title.png") no-repeat;
background: url("./imgs/c-title.png") no-repeat;
background-size: 100% 100%;
font-weight: 500;
font-size: 20px;
font-size: 18px;
color: #FFFFFF;
box-sizing: border-box;
padding-left: 40px;
padding-left: 10px;
padding-top: 5px;
}
.b-b{
font-weight: 500;
font-size: 16px;
color: #FFFFFF;
text-align: center;
}
.b_box{
text-align: center;
font-weight: 500;
font-size: 30px;
color: #FFFFFF;
width: 105px;
height: 80px;
background: url("./imgs/box.png") no-repeat;
background-size: 100% 100%;
}
.s_title {
@ -725,10 +1015,11 @@ yb_title {
background: url("./imgs/title.png") no-repeat;
background-size: 100% 100%;
font-weight: 500;
font-size: 20px;
font-size: 18px;
color: #FFFFFF;
box-sizing: border-box;
padding-left: 40px;
padding-left: 10px;
padding-top: 5px;
margin: 0px auto;
}
@ -737,6 +1028,7 @@ yb_title {
height: 267px;
margin: 0px auto;
border-bottom: 1px solid #0174F6;
background: rgba(82,125,243,0.1);
}
.list_long {
@ -817,5 +1109,49 @@ yb_title {
.c_right {
width: 25%;
}
.jd_k{
height: 20px;
width: 100%;
background: rgba(1,116,246,0.3);
border: 1px solid rgba(1,116,246,0.3);
box-shadow: inset 0px 1px 3px 0px rgba(116,129,163,0.5);
}
.jd_v{
width: 70%;
height: 100%;
background: linear-gradient( 90deg, rgba(77,241,227,0) 0%, rgba(77,241,227,0.5) 50%, #4DF1E3 100%);
border-right: 4px solid #fff;
}
.jd_bt{
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
font-weight: 500;
font-size: 16px;
color: #FFFFFF;
margin-bottom: 5px;
}
.jd_box{
box-sizing: border-box;
padding: 10px;
margin: 10px auto;
}
.hang_box{
display: flex;
align-items: center;
font-weight: bold;
font-size: 16px;
color: #FFFFFF;
margin: 15px auto;
}
.jt_{
width: 100px;
height: 2px;
border-radius: 2px 2px 2px 2px;
background: #0174F6;
}
.jt_size{
font-size: 14px;
}
</style>