看板参数修改

master
suixy 3 days ago
parent d93d37f5aa
commit c31433fa0b

@ -27,10 +27,11 @@ export function getOrderStatistics() {
/** /**
* 获取今日工单进度列表 * 获取今日工单进度列表
*/ */
export function getOrderProgressList() { export function getOrderProgressList(query) {
return request({ return request({
url: '/board4/orderProgressList', url: '/board4/orderProgressList',
method: 'get' method: 'get',
params: query
}) })
} }

@ -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);

@ -2,7 +2,7 @@
<div class="app-container"> <div class="app-container">
<div class="headTitle">数字化注塑车间管控中心</div> <div class="headTitle">数字化注塑车间管控中心</div>
<div class="centerDevice"></div> <div class="centerDevice"></div>
<div class="text1" style="top: 14.7%;left: 5.5%;">计划数: <span <div class="text1" style="top: 14.7%;left: 5.5%;">计划数: <span
style="color: #6ACBFD">{{ form.isSimulate ? form.text1 : orderStatisticsData.planCount }}</span> style="color: #6ACBFD">{{ form.isSimulate ? form.text1 : orderStatisticsData.planCount }}</span>
</div> </div>
<div class="text1" style="top: 14.7%;left: 16.8%;">今日完成数: <span style="color: #68FD82">{{ <div class="text1" style="top: 14.7%;left: 16.8%;">今日完成数: <span style="color: #68FD82">{{
@ -577,6 +577,28 @@ import {listShutDown} from "@/api/dms/shutDown";
import {parseTime} from "@/utils/ruoyi"; import {parseTime} from "@/utils/ruoyi";
const now = new Date() const now = new Date()
const getWeekRange = () => {
const now = new Date();
const day = now.getDay(); // 0-6 (0=)
//
const diffToMonday = day === 0 ? -6 : 1 - day;
//
const monday = new Date(now);
monday.setDate(now.getDate() + diffToMonday);
monday.setHours(0, 0, 0, 0);
//
const sunday = new Date(monday);
sunday.setDate(monday.getDate() + 6);
sunday.setHours(23, 59, 59, 999);
return {
beginTime: parseTime(monday),
endTime: parseTime(sunday)
};
}
const vw = (document.documentElement.clientWidth || document.body.clientWidth) / 100 const vw = (document.documentElement.clientWidth || document.body.clientWidth) / 100
export default { export default {
components: { components: {
@ -708,7 +730,7 @@ export default {
}).then(res => { }).then(res => {
this.shutDownList = res.rows this.shutDownList = res.rows
}) })
listQualityInspection({pageSize: 99999999}).then(res => { listQualityInspection({...getWeekRange(),pageSize: 99999999}).then(res => {
this.qualityInspectionList = res.rows this.qualityInspectionList = res.rows
}) })
getDeviceStatusStatistics().then(e => { getDeviceStatusStatistics().then(e => {
@ -720,7 +742,7 @@ export default {
getOrderStatistics().then(val => { getOrderStatistics().then(val => {
this.orderStatisticsData = val.data this.orderStatisticsData = val.data
}) })
getOrderProgressList().then(val => { getOrderProgressList({...getWeekRange(),pageSize: 99999999}).then(val => {
this.orderProgressList = val.data this.orderProgressList = val.data
}) })
getDeviceStatus().then(val => { getDeviceStatus().then(val => {

Loading…
Cancel
Save