|
<template>
|
<div id="big-data-container" class="big-data-container">
|
<div class="head">
|
<h1>轴承立体库数据统计分析显示</h1>
|
</div>
|
<div class="data-container">
|
<div class="data-left">
|
|
<!-- <div class="data-left-item">
|
<div class="title">本月商品销量</div>
|
<div id="chart-vleft-3" style="height: calc(100% - 30px)"></div>
|
|
<div class="data-foot-line"></div>
|
</div> -->
|
<!-- <div class="data-left-item" style="height:30% !important;">
|
<div class="title">当日压装轴承数量统计</div>
|
<div id="chart-vleft-2" style="height: calc(100% - 30px)"></div>
|
</div>
|
<div class="data-left-item" style="height:40%;">
|
<div class="title">货位使用率</div>
|
<div id="chart-vleft-1" style="height: calc(100% - 30px)"></div>
|
</div> -->
|
|
<div class="data-left-item left-3">
|
<div class="title" style="font-size:30px">在库轴承统计</div>
|
<br />
|
<div id="chart-vright-3" class="left-item">
|
<el-scrollbar style="height: 90%">
|
<el-table :data="homeData.containerCount1" style="width: 100%;" class="styleTable">
|
<el-table-column prop="materiel_id" label="车型">
|
</el-table-column>
|
<el-table-column prop="containerdtl_type" label="轴承型号">
|
</el-table-column>
|
<el-table-column prop="newCount" label="新品">
|
</el-table-column>
|
<el-table-column prop="oldCount" label="检修">
|
</el-table-column>
|
</el-table>
|
</el-scrollbar>
|
</div>
|
<div class="boxfoot"></div>
|
</div>
|
</div>
|
<div class="data-center">
|
<!-- <div class="title">中间位置</div> -->
|
<div class="center-top-num" style="">
|
<div class="item">
|
<div class="text">总货位</div>
|
<div class="num">800</div>
|
</div>
|
<div class="item">
|
<div class="text">可用货位</div>
|
<div class="num">{{homeData.emptyCount}}</div>
|
</div>
|
<div class="item">
|
<div class="text">异常货位</div>
|
<div class="num">{{homeData.errorCount}}</div>
|
</div>
|
<div class="data-foot-line"></div>
|
</div>
|
<div class="center-top-num" style="">
|
<div class="item">
|
<div class="text">当日入库数量</div>
|
<div class="num">{{homeData.inBoxCount}}</div>
|
</div>
|
<div class="item">
|
<div class="text">当日测量数量</div>
|
<div class="num">{{homeData.measureCount}}</div>
|
</div>
|
</div>
|
<!-- <div class="title">七日出入库统计</div>
|
<div id="chart-vcenter" style="height:400px;" class="chart-vcenter"></div> -->
|
<div class="title" style="font-size:30px">在库轴承合格数统计</div>
|
<div id="chart-vleft-3" style="height: calc(100% - 30px)"></div>
|
<div class="data-foot-line"></div>
|
</div>
|
<div class="data-right">
|
|
<div class="data-right-item right-3">
|
<div class="title" style="font-size:30px">在库轴承统计</div>
|
<br />
|
<div id="chart-vright-3" class="right-item">
|
<el-scrollbar style="height: 90%">
|
<el-table :data="homeData.containerCount2" style="width: 100%;" class="styleTable">
|
<el-table-column prop="materiel_id" label="车型">
|
</el-table-column>
|
<el-table-column prop="containerdtl_type" label="轴承型号">
|
</el-table-column>
|
<el-table-column prop="newCount" label="新品">
|
</el-table-column>
|
<el-table-column prop="oldCount" label="检修">
|
</el-table-column>
|
</el-table>
|
</el-scrollbar>
|
</div>
|
<div class="boxfoot"></div>
|
</div>
|
</div>
|
</div>
|
</div>
|
</template>
|
<script>
|
let _this;
|
var echarts = require('echarts');
|
import http from '@../../../src/api/http.js';
|
let $chartLeft1,
|
$chartLeft2,
|
$chartLeft3,
|
$chartCenter,
|
$chartRight1,
|
$chartGauge1,
|
$chartGauge2;
|
import {
|
chartLeft1,
|
chartLeft2,
|
chartLeft3,
|
chartRight1,
|
gauge,
|
option,
|
} from './bigdata/chart-options';
|
import IviewCircle from './bigdata/IviewCircle';
|
import './bigdata/layout.less';
|
export default {
|
components: {
|
'iview-circle': IviewCircle,
|
},
|
data() {
|
return {
|
homeData: {
|
emptyCount: 0,
|
errorCount: 0,
|
inBoxCount: 0,
|
measureCount: 0,
|
locationCount: [],
|
leftCount: [],
|
rightCount: [],
|
// dateHty: [],
|
// outboundHty: [],
|
// inboundHty: [],
|
// measureHty: [],
|
containerTotol: [],
|
containerCount: [],
|
containerCount1: [],
|
containerCount2: [],
|
},
|
};
|
},
|
created() {
|
// console.log('chart');
|
},
|
methods: {
|
getstartjsondata() {
|
this.http
|
.post('/api/VV_ContainerInfo/QueryHomeInfo', null, false)
|
.then((x) => {
|
if (x.status) {
|
_this.homeData = JSON.parse(JSON.stringify(x.data));
|
|
|
|
$chartLeft3 = echarts.init(
|
document.getElementById('chart-vleft-3')
|
);
|
chartLeft3.series[0].data = _this.homeData.containerTotol;
|
$chartLeft3.setOption(chartLeft3, true);
|
|
_this.homeData.containerCount1 = _this.homeData.containerCount.slice(0,6);
|
_this.homeData.containerCount2 = _this.homeData.containerCount.slice(6,_this.homeData.containerCount.lenght);
|
// $chartCenter = echarts.init(
|
// document.getElementById('chart-vcenter')
|
// );
|
// chartRight1.xAxis[0].data = _this.homeData.dateHty;
|
// chartRight1.series[0].data = _this.homeData.inboundHty;
|
// chartRight1.series[1].data = _this.homeData.outboundHty;
|
// chartRight1.series[2].data = _this.homeData.measureHty;
|
// $chartCenter.setOption(chartRight1, true);
|
}
|
});
|
},
|
},
|
mounted() {
|
_this = this;
|
this.getstartjsondata();
|
this.equipjsondataInterval = setInterval(this.getstartjsondata, 6000);
|
|
if ($chartLeft1) {
|
$chartLeft1.dispose();
|
$chartLeft2.dispose();
|
$chartLeft3.dispose();
|
$chartCenter.dispose();
|
$chartRight1.dispose();
|
$chartGauge1.dispose();
|
$chartGauge2.dispose();
|
}
|
// $chartLeft1 = echarts.init(document.getElementById('chart-vleft-1'));
|
// $chartLeft1.setOption(chartLeft1, true);
|
|
// $chartLeft2 = echarts.init(document.getElementById('chart-vleft-2'));
|
// $chartLeft2.setOption(chartLeft2, true);
|
|
// $chartLeft3 = echarts.init(document.getElementById('chart-vleft-3'));
|
// $chartLeft3.setOption(chartLeft3, true);
|
|
// $chartCenter = echarts.init(document.getElementById('chart-vcenter'));
|
// $chartCenter.setOption(chartRight1, true);
|
|
// $chartRight1 = echarts.init(document.getElementById('chart-vright-1'));
|
// $chartRight1.setOption(chartRight1, true);
|
|
// $chartGauge1 = echarts.init(document.getElementById('chart-vgauge-1'));
|
// $chartGauge1.setOption(option, true);
|
|
// $chartGauge2 = echarts.init(document.getElementById('chart-vgauge-2'));
|
// $chartGauge2.setOption(gauge);
|
},
|
destroyed() {
|
$chartLeft1 = null;
|
$chartLeft2 = null;
|
$chartLeft3 = null;
|
$chartCenter = null;
|
$chartRight1 = null;
|
$chartGauge1 = null;
|
$chartGauge2 = null;
|
clearInterval(this.equipjsondataInterval);
|
},
|
};
|
</script>
|
<style scoped>
|
/* .chart-center {
|
display: flex;
|
border: 1px solid #0000ff;
|
height: 200px;
|
flex-direction: column;
|
margin-top: 20px;
|
}
|
.chart-center .item {
|
text-align: center;
|
border: 1px solid #00c1b3;
|
flex: 1;
|
} */
|
.right-3,
|
.left-3 {
|
display: flex;
|
flex-direction: column;
|
/* margin-top: 20px; */
|
}
|
|
.right-3 .right-item,
|
.left-3 .left-item {
|
flex: 1;
|
display: flex;
|
flex-direction: column;
|
}
|
|
.right-3 .item,
|
.left-3 .item {
|
text-align: left;
|
border-bottom: 1px solid #549069;
|
flex: 1;
|
display: flex;
|
padding: 5px 10px;
|
margin: 0 10px;
|
font-size: 14px;
|
line-height: 30px;
|
}
|
|
.right-3 .item:last-child,
|
.left-3 .item:last-child
|
{
|
border-bottom: 0;
|
}
|
|
.right-3 .item > div,
|
.left-3 .item > div {
|
color: white;
|
}
|
|
.right-3 .top ,
|
.left-3 .top {
|
|
width: 60px;
|
position: relative;
|
}
|
|
.right-3 .top span,
|
.left-3 .top span {
|
position: absolute;
|
width: 20px;
|
line-height: 20px;
|
top: 5px;
|
text-align: center;
|
border-radius: 5px;
|
}
|
|
.right-3 .top-1 span,
|
.left-3 .top-1 span {
|
background: #e80d0d;
|
}
|
|
.right-3 .top-2 span,
|
.left-3 .top-2 span {
|
background: #00c935;
|
}
|
|
.right-3 .top-3 span,
|
.left-3 .top-3 span {
|
background: #0083f4;
|
}
|
|
.right-3 .pro-name,
|
.left-3 .pro-name{
|
flex: 1;
|
}
|
|
.styleTable {
|
background-color: transparent !important;
|
}
|
.styleTable ::v-deep .eltable th.el-table__cell,
|
::v-deep .el-table th,
|
::v-deep .el-table tr,
|
::v-deep .el-table .cell {
|
background-color: transparent !important;
|
color: rgb(171, 185, 182);
|
font-size: 12px;
|
line-height: 15px !important;
|
padding: 0px;
|
margin-top: -2px !important;
|
text-align: center !important;
|
}
|
</style>
|