You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
756 lines
19 KiB
Vue
756 lines
19 KiB
Vue
<template>
|
|
<div class="app-container">
|
|
<div class="headTitle">内胆生产数据监控平台</div>
|
|
<div class="topNum team">{{ team }}</div>
|
|
<div class="topNum planNum">{{ planNum }}</div>
|
|
<div class="topNum practicalNum">{{ practicalNum }}</div>
|
|
<div class="topNum differenceValue">{{ planNum - practicalNum }}</div>
|
|
<div class="title" v-for="(i,k) in title"
|
|
:style="'top:'+(titlePosition[k]&&titlePosition[k].top||0)+'%;left:'+(titlePosition[k]&&titlePosition[k].left||0)+'%'">
|
|
{{ i }}
|
|
</div>
|
|
<div class="inventoryInfo">内胆库剩余:{{ linerNum }}% 箱壳库剩余:{{ caseNum }}%</div>
|
|
<div class="centerBg"></div>
|
|
|
|
<div class="scrollTable">
|
|
<div style="background-color: #09417066">
|
|
<div class="scrollTableItem" style="font-weight: bold;">
|
|
计划编号
|
|
</div>
|
|
<div class="scrollTableItem" style="font-weight: bold;">
|
|
产品型号
|
|
</div>
|
|
<div class="scrollTableItem" style="font-weight: bold;">
|
|
计划数量
|
|
</div>
|
|
<div class="scrollTableItem" style="font-weight: bold;">
|
|
完成数量
|
|
</div>
|
|
<div class="scrollTableItem" style="font-weight: bold;">
|
|
生产进度
|
|
</div>
|
|
<div class="scrollTableItem" style="font-weight: bold;">
|
|
计划时间
|
|
</div>
|
|
</div>
|
|
<vue-seamless-scroll
|
|
:class-option="scrollTableOption"
|
|
:data="scrollTableData"
|
|
class="case-item"
|
|
style="height: 84%;overflow: hidden;"
|
|
>
|
|
<div
|
|
v-for="(item, index) in scrollTableData"
|
|
:key="index"
|
|
style="height: 3vh;"
|
|
>
|
|
<div :style='"height:100%;line-height:3vh;background-color:" + ((index % 2 === 0)? "#05346066":"#032d5766") '>
|
|
<div
|
|
class="scrollTableItem">
|
|
{{ item.COLUMN_A }}
|
|
</div>
|
|
<div
|
|
class="scrollTableItem">
|
|
{{ item.COLUMN_B }}
|
|
</div>
|
|
<div
|
|
class="scrollTableItem">
|
|
{{ item.COLUMN_C }}
|
|
</div>
|
|
<div
|
|
class="scrollTableItem">
|
|
{{ item.COLUMN_D }}
|
|
</div>
|
|
<div
|
|
class="scrollTableItem">
|
|
{{ item.COLUMN_E }}
|
|
</div>
|
|
<div
|
|
class="scrollTableItem">
|
|
{{ item.COLUMN_F }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</vue-seamless-scroll>
|
|
</div>
|
|
<div class="meter">平均节拍:{{ meter }} 秒/件</div>
|
|
<div class="chart1">
|
|
<Chart ref="chart1"></Chart>
|
|
</div>
|
|
<div class="chart2">
|
|
<Chart ref="chart2"></Chart>
|
|
</div>
|
|
<div class="chart3">
|
|
<Chart ref="chart3"></Chart>
|
|
</div>
|
|
<div class="chart4">
|
|
<Chart ref="chart4"></Chart>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import vueSeamlessScroll from "vue-seamless-scroll";
|
|
import Chart from "../../../components/board/Chart";
|
|
import * as echarts from 'echarts'
|
|
import {getData, generalInterfaceList, getSimulateData} from '@/api/board/getData'
|
|
import {mixData} from '@/api/board/mixData'
|
|
|
|
const vw = (document.documentElement.clientWidth || document.body.clientWidth) / 100
|
|
let intervalFun = null
|
|
export default {
|
|
components: {
|
|
vueSeamlessScroll,
|
|
Chart
|
|
},
|
|
name: "Liner",
|
|
data() {
|
|
return {
|
|
title: [
|
|
'箱壳生产计划',
|
|
'内胆入库统计',
|
|
'胆壳库存统计',
|
|
'泡前库存统计',
|
|
'箱体发泡实时状态',
|
|
],
|
|
meter: 0,
|
|
linerNum: 0,
|
|
caseNum: 0,
|
|
titlePosition: [
|
|
{
|
|
top: 19.8,
|
|
left: 5.5
|
|
},
|
|
{
|
|
top: 19.8,
|
|
left: 53
|
|
},
|
|
{
|
|
top: 70.5,
|
|
left: 5.5
|
|
},
|
|
{
|
|
top: 70.5,
|
|
left: 36.7
|
|
},
|
|
{
|
|
top: 70.5,
|
|
left: 68.5
|
|
},
|
|
],
|
|
team: '',
|
|
planNum: 0,
|
|
practicalNum: 0,
|
|
scrollTableOption: {
|
|
step: 0.5,
|
|
limitMoveNum: 9999999999,
|
|
hoverStop: true,
|
|
direction: 1,
|
|
openWatch: true,
|
|
singleHeight: 0,
|
|
singleWidth: 0,
|
|
waitTime: 0,
|
|
},
|
|
scrollTableData: [],
|
|
RequestDataSet: [
|
|
{
|
|
e: 'nd-01',
|
|
i: "scada_xk_bz_pro_01('')",
|
|
f: (e) => {
|
|
this.team = e[0].COLUMN_A
|
|
this.planNum = e[0].COLUMN_B
|
|
this.practicalNum = e[0].COLUMN_C
|
|
}
|
|
},
|
|
{
|
|
e: 'nd-04',
|
|
i: "scada_xk_pro_01('')",
|
|
f: (e) => {
|
|
this.scrollTableData = e
|
|
}
|
|
},
|
|
{
|
|
e: 'nd-05',
|
|
i: "scada_in_store_01('')",
|
|
f: (e) => {
|
|
this.$refs.chart1.setData({
|
|
tooltip: {
|
|
trigger: "axis",
|
|
axisPointer: {
|
|
// 坐标轴指示器,坐标轴触发有效
|
|
type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
|
|
},
|
|
},
|
|
grid: {
|
|
left: "0",
|
|
right: "4%",
|
|
bottom: "0",
|
|
top: 20,
|
|
containLabel: true,
|
|
},
|
|
xAxis: {
|
|
type: "category",
|
|
data: e.map(val => val.X_VALUE),
|
|
axisLine: {
|
|
lineStyle: {
|
|
color: "white",
|
|
},
|
|
},
|
|
axisLabel: {
|
|
// interval: 0,
|
|
// rotate: 40,
|
|
textStyle: {
|
|
fontFamily: "Microsoft YaHei",
|
|
},
|
|
},
|
|
},
|
|
|
|
yAxis: {
|
|
type: "value",
|
|
axisLine: {
|
|
show: false,
|
|
lineStyle: {
|
|
color: "white",
|
|
},
|
|
},
|
|
splitLine: {
|
|
show: false,
|
|
},
|
|
axisLabel: {},
|
|
},
|
|
series: [
|
|
{
|
|
name: '数量',
|
|
label: {
|
|
normal: {
|
|
show: true,
|
|
position: "top",
|
|
textStyle: {
|
|
color: "#a8aab0",
|
|
fontStyle: "normal",
|
|
fontFamily: "微软雅黑",
|
|
fontSize: 0.75 * vw,
|
|
},
|
|
},
|
|
},
|
|
type: "bar",
|
|
barWidth: "30%",
|
|
barMaxWidth: 50,
|
|
itemStyle: {
|
|
normal: {
|
|
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
|
{
|
|
offset: 0,
|
|
color: "#39ffff",
|
|
},
|
|
{
|
|
offset: 1,
|
|
color: "#5affa6",
|
|
},
|
|
]),
|
|
},
|
|
},
|
|
data: e.map(val => val.Y_VALUE),
|
|
},
|
|
],
|
|
})
|
|
}
|
|
},
|
|
{
|
|
e: 'nd-06',
|
|
i: "scada_nd_rk_jp_01('')",
|
|
f: (e) => {
|
|
this.meter = e[0].Y_VALUE
|
|
}
|
|
},
|
|
{
|
|
e: 'nd-07',
|
|
i: "SCADA_INV_STATS_01('')",
|
|
f: (e) => {
|
|
this.$refs.chart2.setData({
|
|
tooltip: {
|
|
trigger: "axis",
|
|
axisPointer: {
|
|
// 坐标轴指示器,坐标轴触发有效
|
|
type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
|
|
},
|
|
},
|
|
grid: {
|
|
left: "0",
|
|
right: "4%",
|
|
bottom: "0",
|
|
top: 20,
|
|
containLabel: true,
|
|
},
|
|
legend: {
|
|
data: ['内胆', '箱壳'],
|
|
right: 'center',
|
|
top: 0,
|
|
textStyle: {
|
|
color: "#fff",
|
|
},
|
|
itemWidth: 12,
|
|
itemHeight: 10,
|
|
// itemGap: 35
|
|
},
|
|
xAxis: {
|
|
type: "category",
|
|
data: e.map(val => val.X_VALUE),
|
|
axisLine: {
|
|
lineStyle: {
|
|
color: "white",
|
|
},
|
|
},
|
|
axisLabel: {
|
|
// interval: 0,
|
|
// rotate: 40,
|
|
textStyle: {
|
|
fontFamily: "Microsoft YaHei",
|
|
},
|
|
},
|
|
},
|
|
|
|
yAxis: {
|
|
type: "value",
|
|
axisLine: {
|
|
show: false,
|
|
lineStyle: {
|
|
color: "white",
|
|
},
|
|
},
|
|
splitLine: {
|
|
show: false,
|
|
},
|
|
axisLabel: {},
|
|
},
|
|
series: [
|
|
{
|
|
name: '内胆',
|
|
type: "bar",
|
|
barWidth: "30%",
|
|
barMaxWidth: 50,
|
|
label: {
|
|
normal: {
|
|
show: true,
|
|
position: "top",
|
|
textStyle: {
|
|
color: "#a8aab0",
|
|
fontStyle: "normal",
|
|
fontFamily: "微软雅黑",
|
|
fontSize: 0.75 * vw,
|
|
},
|
|
},
|
|
},
|
|
itemStyle: {
|
|
normal: {
|
|
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
|
{
|
|
offset: 0,
|
|
color: "#39ffff",
|
|
},
|
|
{
|
|
offset: 1,
|
|
color: "#5affa6",
|
|
},
|
|
]),
|
|
},
|
|
},
|
|
data: e.map(val => val.Y_VALUE_ONE),
|
|
},
|
|
{
|
|
name: '箱壳',
|
|
type: "bar",
|
|
barWidth: "30%",
|
|
barMaxWidth: 50,
|
|
label: {
|
|
normal: {
|
|
show: true,
|
|
position: "top",
|
|
textStyle: {
|
|
color: "#a8aab0",
|
|
fontStyle: "normal",
|
|
fontFamily: "微软雅黑",
|
|
fontSize: 0.75 * vw,
|
|
},
|
|
},
|
|
},
|
|
itemStyle: {
|
|
normal: {
|
|
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
|
{
|
|
offset: 0,
|
|
color: "#4adfff",
|
|
},
|
|
{
|
|
offset: 1,
|
|
color: "#3d7aff",
|
|
},
|
|
]),
|
|
},
|
|
},
|
|
data: e.map(val => val.Y_VALUE_TWO),
|
|
},
|
|
],
|
|
})
|
|
}
|
|
},
|
|
{
|
|
e: 'nd-08',
|
|
i: "SCADA_INV_STATS_SUM('')",
|
|
f: (e) => {
|
|
this.linerNum = e[0]?.Y_VALUE_ONE || 0
|
|
this.caseNum = e[0]?.Y_VALUE_TWO || 0
|
|
}
|
|
},
|
|
{
|
|
e: 'nd-10',
|
|
i: "scada_inv_stats_02('')",
|
|
f: (e) => {
|
|
this.$refs.chart3.setData({
|
|
tooltip: {
|
|
trigger: "axis",
|
|
axisPointer: {
|
|
// 坐标轴指示器,坐标轴触发有效
|
|
type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
|
|
},
|
|
},
|
|
grid: {
|
|
left: "0",
|
|
right: "4%",
|
|
bottom: "0",
|
|
top: 20,
|
|
containLabel: true,
|
|
},
|
|
xAxis: {
|
|
type: "category",
|
|
data: e.map(val => val.X_VALUE),
|
|
axisLine: {
|
|
lineStyle: {
|
|
color: "white",
|
|
},
|
|
},
|
|
axisLabel: {
|
|
// interval: 0,
|
|
// rotate: 40,
|
|
textStyle: {
|
|
fontFamily: "Microsoft YaHei",
|
|
},
|
|
},
|
|
},
|
|
|
|
yAxis: {
|
|
type: "value",
|
|
axisLine: {
|
|
show: false,
|
|
lineStyle: {
|
|
color: "white",
|
|
},
|
|
},
|
|
splitLine: {
|
|
show: false,
|
|
},
|
|
axisLabel: {},
|
|
},
|
|
series: [
|
|
{
|
|
name: '数量',
|
|
type: "bar",
|
|
barWidth: "30%",
|
|
label: {
|
|
normal: {
|
|
show: true,
|
|
position: "top",
|
|
textStyle: {
|
|
color: "#a8aab0",
|
|
fontStyle: "normal",
|
|
fontFamily: "微软雅黑",
|
|
fontSize: 0.75 * vw,
|
|
},
|
|
},
|
|
},
|
|
barMaxWidth: 50,
|
|
itemStyle: {
|
|
normal: {
|
|
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
|
{
|
|
offset: 0,
|
|
color: "#4adfff",
|
|
},
|
|
{
|
|
offset: 1,
|
|
color: "#3d7aff",
|
|
},
|
|
]),
|
|
},
|
|
},
|
|
data: e.map(val => val.Y_VALUE),
|
|
},
|
|
],
|
|
})
|
|
}
|
|
},
|
|
{
|
|
e: 'nd-11',
|
|
i: "scada_xk_fp_01('')",
|
|
f: (e) => {
|
|
this.$refs.chart4.setData({
|
|
legend: {
|
|
data: ['运行中夹具数量'],
|
|
right: 'center',
|
|
top: 0,
|
|
textStyle: {
|
|
color: "#fff",
|
|
},
|
|
itemWidth: 12,
|
|
itemHeight: 10,
|
|
// itemGap: 35
|
|
},
|
|
tooltip: {
|
|
trigger: "axis",
|
|
axisPointer: {
|
|
// 坐标轴指示器,坐标轴触发有效
|
|
type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
|
|
},
|
|
},
|
|
grid: {
|
|
left: "0",
|
|
right: "4%",
|
|
bottom: "0",
|
|
top: 20,
|
|
containLabel: true,
|
|
},
|
|
xAxis: {
|
|
type: "category",
|
|
data: e.map(val => val.X_VALUE),
|
|
axisLine: {
|
|
lineStyle: {
|
|
color: "white",
|
|
},
|
|
},
|
|
axisLabel: {
|
|
// interval: 0,
|
|
// rotate: 40,
|
|
textStyle: {
|
|
fontFamily: "Microsoft YaHei",
|
|
},
|
|
},
|
|
},
|
|
|
|
yAxis: {
|
|
type: "value",
|
|
axisLine: {
|
|
show: false,
|
|
lineStyle: {
|
|
color: "white",
|
|
},
|
|
},
|
|
splitLine: {
|
|
show: false,
|
|
},
|
|
axisLabel: {},
|
|
},
|
|
series: [
|
|
{
|
|
name: '运行中夹具数量',
|
|
type: "bar",
|
|
barWidth: '30%',
|
|
barMaxWidth: 50,
|
|
label: {
|
|
normal: {
|
|
show: true,
|
|
position: "top",
|
|
textStyle: {
|
|
color: "#a8aab0",
|
|
fontStyle: "normal",
|
|
fontFamily: "微软雅黑",
|
|
fontSize: 0.75 * vw,
|
|
},
|
|
},
|
|
},
|
|
itemStyle: {
|
|
normal: {
|
|
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
|
{
|
|
offset: 0,
|
|
color: "#4adfff",
|
|
},
|
|
{
|
|
offset: 1,
|
|
color: "#3d7aff",
|
|
},
|
|
]),
|
|
},
|
|
},
|
|
data: e.map(val => val.Y_VALUE),
|
|
}
|
|
]
|
|
})
|
|
}
|
|
},
|
|
]
|
|
|
|
}
|
|
},
|
|
mounted() {
|
|
this.RequestDataSet.forEach(val => {
|
|
mixData(val)
|
|
})
|
|
intervalFun = setInterval(() => {
|
|
this.RequestDataSet.forEach(val => {
|
|
mixData(val)
|
|
})
|
|
}, 1000 * 10)
|
|
},
|
|
methods: {},
|
|
beforeDestroy() {
|
|
console.log(1)
|
|
if(intervalFun){
|
|
clearInterval(intervalFun)
|
|
intervalFun = null
|
|
}
|
|
}
|
|
};
|
|
</script>
|
|
<style scoped>
|
|
.app-container {
|
|
background-image: url("../../../assets/board/liner.jpg");
|
|
background-repeat: no-repeat;
|
|
background-size: 100% 100%;
|
|
width: 100%;
|
|
height: 100%;
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
}
|
|
|
|
.centerBg {
|
|
background-image: url("../../../assets/board/model1.png");
|
|
background-repeat: no-repeat;
|
|
background-size: 100% 100%;
|
|
position: absolute;
|
|
transform: translate(-50%, -50%);
|
|
top: 54.5%;
|
|
left: 50%;
|
|
width: 93%;
|
|
height: 10.34vw;
|
|
}
|
|
|
|
.headTitle {
|
|
position: absolute;
|
|
top: 5%;
|
|
left: 50%;
|
|
transform: translate(-50%, -100%);
|
|
font-size: 1.5vw;
|
|
color: #d6eaed;
|
|
letter-spacing: 10px;
|
|
}
|
|
|
|
.title {
|
|
position: absolute;
|
|
transform: translateY(-50%);
|
|
color: #dddddd;
|
|
font-size: 1vw;
|
|
letter-spacing: 2px;
|
|
}
|
|
|
|
.topNum {
|
|
position: absolute;
|
|
transform: translate(-50%, -50%);
|
|
color: #5db9e8;
|
|
top: 11.7%;
|
|
letter-spacing: 0.5vw;
|
|
}
|
|
|
|
.team {
|
|
font-size: 1.5vw;
|
|
left: 16.8%;
|
|
}
|
|
|
|
.planNum {
|
|
font-size: 1.7vw;
|
|
left: 41.2%;
|
|
}
|
|
|
|
.practicalNum {
|
|
left: 66.2%;
|
|
font-size: 1.7vw;
|
|
}
|
|
|
|
.differenceValue {
|
|
font-size: 1.7vw;
|
|
left: 90.7%;
|
|
}
|
|
|
|
.scrollTable {
|
|
position: absolute;
|
|
top: 23%;
|
|
left: 4%;
|
|
width: 45%;
|
|
height: 18%;
|
|
}
|
|
|
|
|
|
.scrollTableItem {
|
|
color: rgb(185, 186, 192);
|
|
margin: auto 0px;
|
|
padding: 4px 0;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
text-align: center;
|
|
display: inline-block;
|
|
width: calc(100% / 6);
|
|
}
|
|
|
|
.chart1 {
|
|
position: absolute;
|
|
top: 23%;
|
|
left: 51%;
|
|
width: 45%;
|
|
height: 18.5%;
|
|
}
|
|
|
|
.chart2 {
|
|
position: absolute;
|
|
top: 74%;
|
|
left: 3.6%;
|
|
width: 29.8%;
|
|
height: 20.7%;
|
|
}
|
|
|
|
.chart3 {
|
|
position: absolute;
|
|
top: 74%;
|
|
left: 35%;
|
|
width: 30%;
|
|
height: 20.7%;
|
|
}
|
|
|
|
.chart4 {
|
|
position: absolute;
|
|
top: 74%;
|
|
left: 66.5%;
|
|
width: 30%;
|
|
height: 20.7%;
|
|
}
|
|
|
|
.inventoryInfo {
|
|
position: absolute;
|
|
transform: translateY(-50%);
|
|
font-size: 0.9vw;
|
|
top: 70.4%;
|
|
left: 13.7%;
|
|
color: #fff;
|
|
letter-spacing: 1px;
|
|
}
|
|
|
|
.meter {
|
|
position: absolute;
|
|
top: 19.7%;
|
|
left: 62.5%;
|
|
transform: translateY(-50%);
|
|
font-size: 0.9vw;
|
|
color: #fff;
|
|
}
|
|
</style>
|