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.

543 lines
13 KiB
Vue

2 years ago
<template>
<div class="app-container">
<div class="headTitle">总装生产可视化平台</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="title1">班组</div>
<div class="title2">上线数量</div>
2 years ago
<div class="nowClass">{{ info.bz }}</div>
<div class="num">{{ info.sxsl }}</div>
2 years ago
<div class="info1Title">产品条码 <span style="color: #697bbb"> {{ info.tm }} </span></div>
<div class="info2Title">扫描时间 <span style="color: #697bbb"> {{ info.sj }} </span></div>
<div class="info3Title">产品型号 <span style="color: #697bbb"> {{ info.xh }} </span></div>
<div class="info4Title">订单编号 <span style="color: #697bbb"> {{ info.bh }} </span></div>
<div class="info5Title">订单数量 <span style="color: #697bbb"> {{ info.ddsl }} </span></div>
<div class="info6Title">上线数量 <span style="color: #697bbb"> {{ info.sxsl2 }} </span></div>
<div class="info7Title">提示信息 <span style="color: #0fbc7b"> {{ info.tsxx }} </span></div>
2 years ago
<div class="scrollTable">
<div style="background-color: #094170">
2 years ago
<div class="scrollTableItem" style="font-weight: bold;width:5%">
2 years ago
序号
</div>
2 years ago
<div class="scrollTableItem" style="font-weight: bold;width:15%">
2 years ago
订单号
2 years ago
</div>
2 years ago
<div class="scrollTableItem" style="font-weight: bold;width:17.5%">
2 years ago
产品型号
2 years ago
</div>
2 years ago
<div class="scrollTableItem" style="font-weight: bold;width:12.5%">
订单数量
2 years ago
</div>
2 years ago
<div class="scrollTableItem" style="font-weight: bold;width:12.5%">
2 years ago
订单上线数量
2 years ago
</div>
2 years ago
<div class="scrollTableItem" style="font-weight: bold;width:12.5%">
当日上线数量
</div>
<div class="scrollTableItem" style="font-weight: bold;width:12.5%">
2 years ago
上线进度
2 years ago
</div>
2 years ago
<div class="scrollTableItem" style="font-weight: bold;width:12.5%">
2 years ago
计划时间
2 years ago
</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"
>
<div :style='"background-color:" + ((index % 2 === 0)? "#053460":"#032d57") '>
<div
2 years ago
class="scrollTableItem" style="width:5%">
{{ index + 1 }}
2 years ago
</div>
2 years ago
<div
2 years ago
class="scrollTableItem" style="width:15%">
2 years ago
{{ item.value1 }}
</div>
2 years ago
<div
2 years ago
class="scrollTableItem" style="width:17.5%">
2 years ago
{{ item.value2 }}
2 years ago
</div>
<div
2 years ago
class="scrollTableItem" style="width:12.5%">
2 years ago
{{ item.value3 }}
2 years ago
</div>
<div
2 years ago
class="scrollTableItem" style="width:12.5%">
2 years ago
{{ item.value4 }}
2 years ago
</div>
2 years ago
<div
2 years ago
class="scrollTableItem" style="width:12.5%">
{{ item.value7 }}
2 years ago
</div>
2 years ago
<div
2 years ago
class="scrollTableItem" style="width:12.5%">
2 years ago
{{ item.value5 }}
2 years ago
</div>
<div
2 years ago
class="scrollTableItem" style="width:12.5%">
2 years ago
{{ item.value6 }}
2 years ago
</div>
</div>
</div>
</vue-seamless-scroll>
</div>
<div class="chart1">
<Chart ref="chart1"></Chart>
</div>
<div class="chart2">
<Chart ref="chart2"></Chart>
</div>
</div>
</template>
<script>
import vueSeamlessScroll from "vue-seamless-scroll";
import Chart from "../../../components/board/Chart";
import * as echarts from 'echarts'
2 years ago
import {getData} from "@/api/board/getData";
2 years ago
import {mixData} from "@/api/board/mixData";
2 years ago
export default {
components: {
vueSeamlessScroll,
Chart
},
name: "Liner",
data() {
return {
title: [
2 years ago
'总装上线小时统计',
'总装上线型号统计',
2 years ago
'生产统计',
2 years ago
],
titlePosition: [
{
top: 31.3,
2 years ago
left: 5.5
},
{
top: 31.3,
left: 52.8
2 years ago
},
{
top: 62.2,
left: 5.5
2 years ago
},
],
2 years ago
info: {},
2 years ago
scrollTableOption: {
step: 0.5, // 数值越大速度滚动越快
2 years ago
limitMoveNum: 10, // 开始无缝滚动的数据量 this.dataList.length
2 years ago
hoverStop: true, // 是否开启鼠标悬停stop
direction: 1, // 0向下 1向上 2向左 3向右
openWatch: true, // 开启数据实时监控刷新dom
singleHeight: 0, // 单步运动停止的高度(默认值0是无缝不停止的滚动) direction => 0/1
singleWidth: 0, // 单步运动停止的宽度(默认值0是无缝不停止的滚动) direction => 2/3
waitTime: 0,
},
2 years ago
scrollTableData: [],
2 years ago
RequestDataSet: [
{
e: 'zzsc-01',
i: "",
f: (e) => {
this.info = e
}
2 years ago
},
2 years ago
{
e: 'zzsc-02',
i: "",
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.x,
axisLine: {
lineStyle: {
color: "white",
},
},
axisLabel: {
// interval: 0,
// rotate: 40,
textStyle: {
fontFamily: "Microsoft YaHei",
},
},
},
2 years ago
2 years ago
yAxis: {
type: "value",
axisLine: {
show: false,
lineStyle: {
color: "white",
},
},
splitLine: {
show: false,
},
axisLabel: {},
},
series: [
{
name: "数量",
type: "bar",
2 years ago
label: {
normal: {
show: true,
formatter: (e) => {
if (e.data === 0) {
return ''
} else {
return e.data
}
},
fontSize: 12,
fontWeight: "bold",
color: "#ffffff",
position: "top",
},
},
2 years ago
barWidth: "30%",
barMaxWidth: 50,
itemStyle: {
normal: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: "#0bca98",
},
{
offset: 1,
color: "#16a144",
},
]),
},
},
data: e.y.data,
},
],
})
}
2 years ago
},
2 years ago
{
e: 'zzsc-03',
i: "",
f: (e) => {
this.$refs.chart2.setData({
grid: {
left: "0",
right: "4%",
bottom: '2%',
top: "10%",
containLabel: true,
},
xAxis: {
data: e.x,
axisLine: {
lineStyle: {
color: "#3d5269",
2 years ago
},
2 years ago
},
axisLabel: {
interval: 0,
color: "#fff",
fontSize: 14,
},
},
yAxis: {
nameTextStyle: {
color: "#fff",
fontSize: 16,
},
axisLine: {
lineStyle: {
color: "#3d5269",
},
},
axisLabel: {
color: "#fff",
fontSize: 10,
},
splitLine: {
2 years ago
show: false,
2 years ago
lineStyle: {
color: "#2d3d53",
2 years ago
},
2 years ago
},
interval: 500,
2 years ago
},
2 years ago
series: [
{
type: "bar",
barWidth: '40%',
2 years ago
barMaxWidth: 50,
2 years ago
itemStyle: {
normal: {
color: new echarts.graphic.LinearGradient(
0,
0,
0,
1,
[
{
offset: 0,
color: "#5ef3ff",
},
{
offset: 1,
color: "#06a4f4",
},
],
false
),
2 years ago
},
2 years ago
},
label: {
normal: {
show: true,
fontSize: 12,
fontWeight: "bold",
color: "#ffffff",
position: "top",
2 years ago
},
2 years ago
},
data: e.y.data,
},
],
})
}
},
{
e: 'zzsc-04',
i: "",
f: (e) => {
this.scrollTableData = e
}
},
]
}
},
mounted() {
this.RequestDataSet.forEach(val => {
mixData(val)
2 years ago
})
},
methods: {}
};
</script>
<style scoped>
.app-container {
background-image: url("../../../assets/board/finalAssembly.jpg");
2 years ago
background-repeat: no-repeat;
background-size: 100% 100%;
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
}
.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;
}
.scrollTable {
position: absolute;
top: 66%;
left: 3.7%;
width: 92.5%;
height: 30%;
2 years ago
}
.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;
2 years ago
width: calc(100% / 8);
2 years ago
}
.chart1 {
position: absolute;
top: 34.5%;
2 years ago
left: 3.6%;
width: 45.5%;
height: 22.5%;
2 years ago
}
.chart2 {
position: absolute;
top: 34.5%;
2 years ago
left: 51%;
width: 45.5%;
height: 22.5%;
2 years ago
}
.title1 {
2 years ago
position: absolute;
2 years ago
top: 12.1%;
left: 11.3%;
transform: translate(-50%, -50%);
font-size: 1.2vw;
color: #d6eaed;
}
.title2 {
position: absolute;
2 years ago
top: 12.1%;
left: 88.5%;
transform: translate(-50%, -50%);
font-size: 1.2vw;
color: #d6eaed;
2 years ago
white-space: nowrap;
}
.nowClass {
position: absolute;
2 years ago
top: 21%;
left: 11.3%;
font-size: 1.8vw;
letter-spacing: 4px;
transform: translate(-50%, -50%);
color: #d6eaed;
}
.num {
position: absolute;
2 years ago
top: 21%;
left: 88.5%;
transform: translate(-50%, -50%);
2 years ago
font-size: 3.6vw;
2 years ago
letter-spacing: 4px;
color: #d6eaed;
2 years ago
font-weight: 600;
}
.info1Title {
position: absolute;
2 years ago
top: 11.1%;
left: 23%;
width: 24%;
2 years ago
font-size: 1.2vw;
2 years ago
color: #fff9;
text-align: left;
}
.info2Title {
position: absolute;
2 years ago
top: 11.1%;
left: 52.7%;
width: 24%;
2 years ago
font-size: 1.2vw;
2 years ago
color: #fff9;
text-align: left;
}
.info3Title {
position: absolute;
2 years ago
top: 14.8%;
left: 23%;
width: 24%;
2 years ago
font-size: 1.2vw;
2 years ago
color: #fff9;
text-align: left;
}
.info4Title {
position: absolute;
2 years ago
top: 14.8%;
left: 52.7%;
width: 24%;
2 years ago
font-size: 1.2vw;
2 years ago
color: #fff9;
text-align: left;
}
.info5Title {
position: absolute;
2 years ago
top: 18.4%;
left: 23%;
width: 24%;
2 years ago
font-size: 1.2vw;
2 years ago
color: #fff9;
text-align: left;
}
.info6Title {
position: absolute;
2 years ago
top: 18.3%;
left: 52.7%;
width: 24%;
2 years ago
font-size: 1.2vw;
2 years ago
color: #fff9;
text-align: left;
}
.info7Title {
position: absolute;
2 years ago
top: 22%;
left: 23%;
width: 24%;
2 years ago
font-size: 1.2vw;
2 years ago
color: #fff9;
text-align: left;
}
2 years ago
</style>