|
|
|
@ -1,8 +1,8 @@
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<div class="app-container">
|
|
|
|
<div class="app-container">
|
|
|
|
<div class="headTitle">注塑车间设备运行监控平台</div>
|
|
|
|
<div class="headTitle">注塑车间设备运行监控平台</div>
|
|
|
|
<div class="subTitle" style="top: 20%;left: 88%;">设备OEE</div>
|
|
|
|
<!-- <div class="subTitle" style="top: 20%;left: 88%;">设备OEE</div>-->
|
|
|
|
<div class="subTitle" style="top: 60%;left: 88%;">设备能耗</div>
|
|
|
|
<!-- <div class="subTitle" style="top: 60%;left: 88%;">设备能耗</div>-->
|
|
|
|
<div class="top" style="top: 8%;left: 4%"></div>
|
|
|
|
<div class="top" style="top: 8%;left: 4%"></div>
|
|
|
|
<div class="top" style="top: 8%;left: 20%"></div>
|
|
|
|
<div class="top" style="top: 8%;left: 20%"></div>
|
|
|
|
<div class="top" style="top: 8%;left: 36%"></div>
|
|
|
|
<div class="top" style="top: 8%;left: 36%"></div>
|
|
|
|
@ -243,140 +243,140 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
async mounted() {
|
|
|
|
async mounted() {
|
|
|
|
await this.getData()
|
|
|
|
await this.getData()
|
|
|
|
this.$refs.chart1.setData({
|
|
|
|
// this.$refs.chart1.setData({
|
|
|
|
title: [
|
|
|
|
// title: [
|
|
|
|
{
|
|
|
|
// {
|
|
|
|
text: "75%",
|
|
|
|
// text: "75%",
|
|
|
|
x: "center",
|
|
|
|
// x: "center",
|
|
|
|
y: "center",
|
|
|
|
// y: "center",
|
|
|
|
textStyle: {
|
|
|
|
// textStyle: {
|
|
|
|
fontSize: 2 * vw,
|
|
|
|
// fontSize: 2 * vw,
|
|
|
|
color: "#FFFFFF",
|
|
|
|
// color: "#FFFFFF",
|
|
|
|
fontFamily: "DINAlternate-Bold, DINAlternate",
|
|
|
|
// fontFamily: "DINAlternate-Bold, DINAlternate",
|
|
|
|
foontWeight: "600",
|
|
|
|
// foontWeight: "600",
|
|
|
|
},
|
|
|
|
// },
|
|
|
|
},
|
|
|
|
// },
|
|
|
|
],
|
|
|
|
// ],
|
|
|
|
polar: {
|
|
|
|
// polar: {
|
|
|
|
radius: ["58%", "68%"],
|
|
|
|
// radius: ["58%", "68%"],
|
|
|
|
center: ["50%", "50%"],
|
|
|
|
// center: ["50%", "50%"],
|
|
|
|
},
|
|
|
|
// },
|
|
|
|
angleAxis: {
|
|
|
|
// angleAxis: {
|
|
|
|
max: 133,
|
|
|
|
// max: 133,
|
|
|
|
// startAngle: 225,
|
|
|
|
// // startAngle: 225,
|
|
|
|
// endAngle: -180,
|
|
|
|
// // endAngle: -180,
|
|
|
|
clockwise: true,
|
|
|
|
// clockwise: true,
|
|
|
|
show: false
|
|
|
|
// show: false
|
|
|
|
},
|
|
|
|
// },
|
|
|
|
radiusAxis: {
|
|
|
|
// radiusAxis: {
|
|
|
|
type: "category",
|
|
|
|
// type: "category",
|
|
|
|
show: true,
|
|
|
|
// show: true,
|
|
|
|
axisLabel: {
|
|
|
|
// axisLabel: {
|
|
|
|
show: false,
|
|
|
|
// show: false,
|
|
|
|
},
|
|
|
|
// },
|
|
|
|
axisLine: {
|
|
|
|
// axisLine: {
|
|
|
|
show: false,
|
|
|
|
// show: false,
|
|
|
|
},
|
|
|
|
// },
|
|
|
|
axisTick: {
|
|
|
|
// axisTick: {
|
|
|
|
show: false,
|
|
|
|
// show: false,
|
|
|
|
},
|
|
|
|
// },
|
|
|
|
},
|
|
|
|
// },
|
|
|
|
series: [
|
|
|
|
// series: [
|
|
|
|
{
|
|
|
|
// {
|
|
|
|
name: "",
|
|
|
|
// name: "",
|
|
|
|
type: "bar",
|
|
|
|
// type: "bar",
|
|
|
|
roundCap: false,
|
|
|
|
// roundCap: false,
|
|
|
|
barWidth: 30,
|
|
|
|
// barWidth: 30,
|
|
|
|
showBackground: true,
|
|
|
|
// showBackground: true,
|
|
|
|
backgroundStyle: {
|
|
|
|
// backgroundStyle: {
|
|
|
|
color: "rgba(66, 66, 66, .3)",
|
|
|
|
// color: "rgba(66, 66, 66, .3)",
|
|
|
|
},
|
|
|
|
// },
|
|
|
|
data: [100],
|
|
|
|
// data: [100],
|
|
|
|
coordinateSystem: "polar",
|
|
|
|
// coordinateSystem: "polar",
|
|
|
|
itemStyle: {
|
|
|
|
// itemStyle: {
|
|
|
|
normal: {
|
|
|
|
// normal: {
|
|
|
|
color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
|
|
|
|
// color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
|
|
|
|
{
|
|
|
|
// {
|
|
|
|
offset: 0,
|
|
|
|
// offset: 0,
|
|
|
|
color: "#16CEB9",
|
|
|
|
// color: "#16CEB9",
|
|
|
|
},
|
|
|
|
// },
|
|
|
|
{
|
|
|
|
// {
|
|
|
|
offset: 1,
|
|
|
|
// offset: 1,
|
|
|
|
color: "#6648FF",
|
|
|
|
// color: "#6648FF",
|
|
|
|
},
|
|
|
|
// },
|
|
|
|
]),
|
|
|
|
// ]),
|
|
|
|
},
|
|
|
|
// },
|
|
|
|
},
|
|
|
|
// },
|
|
|
|
},
|
|
|
|
// },
|
|
|
|
],
|
|
|
|
// ],
|
|
|
|
})
|
|
|
|
// })
|
|
|
|
this.$refs.chart2.setData({
|
|
|
|
// this.$refs.chart2.setData({
|
|
|
|
title: [
|
|
|
|
// title: [
|
|
|
|
{
|
|
|
|
// {
|
|
|
|
text: "75%",
|
|
|
|
// text: "75%",
|
|
|
|
x: "center",
|
|
|
|
// x: "center",
|
|
|
|
y: "center",
|
|
|
|
// y: "center",
|
|
|
|
textStyle: {
|
|
|
|
// textStyle: {
|
|
|
|
fontSize: 2 * vw,
|
|
|
|
// fontSize: 2 * vw,
|
|
|
|
color: "#FFFFFF",
|
|
|
|
// color: "#FFFFFF",
|
|
|
|
fontFamily: "DINAlternate-Bold, DINAlternate",
|
|
|
|
// fontFamily: "DINAlternate-Bold, DINAlternate",
|
|
|
|
fontWeight: "600",
|
|
|
|
// fontWeight: "600",
|
|
|
|
},
|
|
|
|
// },
|
|
|
|
},
|
|
|
|
// },
|
|
|
|
],
|
|
|
|
// ],
|
|
|
|
polar: {
|
|
|
|
// polar: {
|
|
|
|
radius: ["58%", "68%"],
|
|
|
|
// radius: ["58%", "68%"],
|
|
|
|
center: ["50%", "50%"],
|
|
|
|
// center: ["50%", "50%"],
|
|
|
|
},
|
|
|
|
// },
|
|
|
|
angleAxis: {
|
|
|
|
// angleAxis: {
|
|
|
|
max: 133,
|
|
|
|
// max: 133,
|
|
|
|
// startAngle: 225,
|
|
|
|
// // startAngle: 225,
|
|
|
|
// endAngle: -180,
|
|
|
|
// // endAngle: -180,
|
|
|
|
clockwise: true,
|
|
|
|
// clockwise: true,
|
|
|
|
show: false
|
|
|
|
// show: false
|
|
|
|
},
|
|
|
|
// },
|
|
|
|
radiusAxis: {
|
|
|
|
// radiusAxis: {
|
|
|
|
type: "category",
|
|
|
|
// type: "category",
|
|
|
|
show: true,
|
|
|
|
// show: true,
|
|
|
|
axisLabel: {
|
|
|
|
// axisLabel: {
|
|
|
|
show: false,
|
|
|
|
// show: false,
|
|
|
|
},
|
|
|
|
// },
|
|
|
|
axisLine: {
|
|
|
|
// axisLine: {
|
|
|
|
show: false,
|
|
|
|
// show: false,
|
|
|
|
},
|
|
|
|
// },
|
|
|
|
axisTick: {
|
|
|
|
// axisTick: {
|
|
|
|
show: false,
|
|
|
|
// show: false,
|
|
|
|
},
|
|
|
|
// },
|
|
|
|
},
|
|
|
|
// },
|
|
|
|
series: [
|
|
|
|
// series: [
|
|
|
|
{
|
|
|
|
// {
|
|
|
|
name: "",
|
|
|
|
// name: "",
|
|
|
|
type: "bar",
|
|
|
|
// type: "bar",
|
|
|
|
roundCap: false,
|
|
|
|
// roundCap: false,
|
|
|
|
barWidth: 30,
|
|
|
|
// barWidth: 30,
|
|
|
|
showBackground: true,
|
|
|
|
// showBackground: true,
|
|
|
|
backgroundStyle: {
|
|
|
|
// backgroundStyle: {
|
|
|
|
color: "rgba(66, 66, 66, .3)",
|
|
|
|
// color: "rgba(66, 66, 66, .3)",
|
|
|
|
},
|
|
|
|
// },
|
|
|
|
data: [100],
|
|
|
|
// data: [100],
|
|
|
|
coordinateSystem: "polar",
|
|
|
|
// coordinateSystem: "polar",
|
|
|
|
itemStyle: {
|
|
|
|
// itemStyle: {
|
|
|
|
normal: {
|
|
|
|
// normal: {
|
|
|
|
color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
|
|
|
|
// color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
|
|
|
|
{
|
|
|
|
// {
|
|
|
|
offset: 0,
|
|
|
|
// offset: 0,
|
|
|
|
color: "#16CEB9",
|
|
|
|
// color: "#16CEB9",
|
|
|
|
},
|
|
|
|
// },
|
|
|
|
{
|
|
|
|
// {
|
|
|
|
offset: 1,
|
|
|
|
// offset: 1,
|
|
|
|
color: "#6648FF",
|
|
|
|
// color: "#6648FF",
|
|
|
|
},
|
|
|
|
// },
|
|
|
|
]),
|
|
|
|
// ]),
|
|
|
|
},
|
|
|
|
// },
|
|
|
|
},
|
|
|
|
// },
|
|
|
|
},
|
|
|
|
// },
|
|
|
|
],
|
|
|
|
// ],
|
|
|
|
})
|
|
|
|
// })
|
|
|
|
timer = setInterval(() => {
|
|
|
|
timer = setInterval(() => {
|
|
|
|
this.getData()
|
|
|
|
this.getData()
|
|
|
|
}, 1000 * 60 * 2)
|
|
|
|
}, 1000 * 60 * 2)
|
|
|
|
@ -386,14 +386,14 @@ export default {
|
|
|
|
await getDeviceStatusStatistics().then(e => {
|
|
|
|
await getDeviceStatusStatistics().then(e => {
|
|
|
|
this.runningData = e.data
|
|
|
|
this.runningData = e.data
|
|
|
|
})
|
|
|
|
})
|
|
|
|
await getDeviceStatusList().then(res => {
|
|
|
|
await getDeviceStartTimeList().then(res => {
|
|
|
|
this.deviceData = res.data.filter(e => !(e.DEVICENAME === "5#" || e.DEVICENAME === "10#" || e.DEVICENAME === "12#" || e.DEVICENAME === "17#" || e.DEVICENAME === "18#"))
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
getDeviceStartTimeList().then(res => {
|
|
|
|
|
|
|
|
res.data.forEach(e => {
|
|
|
|
res.data.forEach(e => {
|
|
|
|
this.timeData[e.DEVICECODE] = ((e.STARTTIME / 60 / 60) || 0).toFixed(1)
|
|
|
|
this.timeData[e.DEVICECODE] = ((e.STARTTIME / 60 / 60) || 0).toFixed(1)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
await getDeviceStatusList().then(res => {
|
|
|
|
|
|
|
|
this.deviceData = res.data.filter(e => !(e.DEVICENAME === "5#" || e.DEVICENAME === "10#" || e.DEVICENAME === "12#" || e.DEVICENAME === "17#" || e.DEVICENAME === "18#"))
|
|
|
|
|
|
|
|
})
|
|
|
|
getSimulateData({customCode: 'board-3' || '', customType: 1}).then(val => {
|
|
|
|
getSimulateData({customCode: 'board-3' || '', customType: 1}).then(val => {
|
|
|
|
this.row = val.rows[0]
|
|
|
|
this.row = val.rows[0]
|
|
|
|
this.form = JSON.parse(val.rows[0].customData);
|
|
|
|
this.form = JSON.parse(val.rows[0].customData);
|
|
|
|
|