From 04b4e2ca4bbbc147036a0bf15ce0b8b1c45cc74b Mon Sep 17 00:00:00 2001
From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com>
Date: 星期六, 11 十月 2025 16:26:22 +0800
Subject: [PATCH] 新增设备状态上传与包装站台换型功能在CommonConveyorLine_BZJob.cs和CommonConveyorLine_GWJob.cs中新增对信号状态判断逻辑。 在 ConfigConst.cs`中新增常量 EqptRun,用于设备状态上传。新增 EqptRunDTO类,支持设备运行状态的数据传输。在 IAgingInOrOutInputService.cs中定义 Change方法接口,并在AgingInOrOutInputService.cs中实现设备型号修改逻辑。优化 Dt_TaskService.cs中的异常电芯处理、组盘信息获取、库存查询逻辑,并新增包装站台换型功能。 - 增强日志记录,便于问题排查。
---
CodeManagement/BigScreenVue/src/views/indexs/left-bottom.vue | 102 +++++++++++++++++++++++++--------------------------
1 files changed, 50 insertions(+), 52 deletions(-)
diff --git a/CodeManagement/BigScreenVue/src/views/indexs/left-bottom.vue b/CodeManagement/BigScreenVue/src/views/indexs/left-bottom.vue
index c5bff26..012dc73 100644
--- a/CodeManagement/BigScreenVue/src/views/indexs/left-bottom.vue
+++ b/CodeManagement/BigScreenVue/src/views/indexs/left-bottom.vue
@@ -13,11 +13,12 @@
<script>
import { currentGET } from "api/modules";
-import { ProLocationStatistics } from "@/api/http.js";
+import { Getproductionvolume } from "@/api/http.js";
import * as echarts from 'echarts';
let style = {
fontSize: 24,
};
+
export default {
data() {
return {
@@ -201,7 +202,7 @@
itemStyle: {
color: '#feb01e'
},
- data: [43, 50, 41, 18, 28, 25, 26, 40],
+ data: [99, 50, 41, 18, 28, 25, 26, 0],
}, {
name: 'CO2',
type: 'line',
@@ -300,40 +301,37 @@
clearData() {
if (this.timer) {
clearInterval(this.timer);
- this.timer = null;
+ this.timer = 3000;
}
},
async getData() {
- this.pageflag = true;
- // currentGET("big2").then((res) => {
- // if (!this.timer) {
- // console.log("璁惧鎬昏2", res);
- // }
- // if (res.success) {
- // this.userOverview = res.data;
- // this.onlineconfig = {
- // ...this.onlineconfig,
- // number: [1]
- // }
- // this.config = {
- // ...this.config,
- // number: [7]
- // }
- // this.offlineconfig = {
- // ...this.offlineconfig,
- // number: [4]
- // }
- // this.laramnumconfig = {
- // ...this.laramnumconfig,
- // number: [10]
- // }
- // this.switper();
- // } else {
- // this.pageflag = false;
- // this.$Message.warning(res.msg);
- // }
- // });
- var rep = await ProLocationStatistics();
+ var rep1=await Getproductionvolume()
+ console.log(rep1)
+ var rep=rep1.filter(it=>it.roadway.includes("CW"))
+
+
+ // (1) 鎸夋棩鏈熷垎缁勬牳蹇冪畻娉�
+ const groupedData = rep.reduce((acc, item) => {
+ // 鎻愬彇鏃ユ湡閮ㄥ垎锛堟牸寮忥細YYYY-MM-DD锛�
+ const dateKey = item.createDate.split(' ')[0]; // 鎴� item.createDate.substring(0,10)
+
+ // 鍒涘缓鏃ユ湡鍒嗙粍瀹瑰櫒锛堝鏋滀笉瀛樺湪锛�
+ if (!acc[dateKey]) {
+ acc[dateKey] = {
+ date: dateKey,
+ tasks: []
+ };
+ }
+
+ // 灏嗗綋鍓嶉」鍔犲叆瀵瑰簲鍒嗙粍
+ acc[dateKey].tasks.push(item);
+ return acc;
+}, {});
+
+// (2) 杞崲涓烘帓搴忓悗鐨勬暟缁�
+const sortedGroups = Object.values(groupedData)
+ .sort((a, b) => new Date(b.date) - new Date(a.date)); // 闄嶅簭鎺掑垪// 闄嶅簭鎺掑垪
+
this.options = {
backgroundColor: '#0a1256',
//娴姩妗�
@@ -350,7 +348,7 @@
itemWidth: 10,
itemHeight: 10,
icon: 'circle',
- data: ['鎴愬搧鍏ュ簱', '鎴愬搧鍑哄簱', '鎴愬搧鍥炴']
+ data: ['瀹炴鍏ュ簱', '瀹炴鍑哄簱', '绌烘鍏ュ簱']
},
grid: {
left: '8%',
@@ -369,7 +367,7 @@
gte: 60,
color: '#e5421b'
}],
- seriesName: '鎴愬搧鍏ュ簱',
+ seriesName: '瀹炴鍏ュ簱',
seriesIndex: 2
}, {
type: 'piecewise',
@@ -382,7 +380,7 @@
gte: 60,
color: '#e5421b'
}],
- seriesName: '鎴愬搧鍑哄簱',
+ seriesName: '瀹炴鍑哄簱',
seriesIndex: 1
}, {
type: 'piecewise',
@@ -395,7 +393,7 @@
gte: 60,
color: '#e5421b'
}],
- seriesName: '鎴愬搧鍥炴',
+ seriesName: '绌烘鍏ュ簱',
seriesIndex: 0
}],
//x杞�
@@ -416,7 +414,7 @@
show: false
},
//鍧愭爣杞存樉绀哄��
- data: ["04/19", "04/20", "04/21", "04/22", "04/23", "04/24", "04/25"]
+ data: [sortedGroups[6].date, sortedGroups[5].date, sortedGroups[4].date, sortedGroups[3].date,sortedGroups[2].date,sortedGroups[1].date,sortedGroups[0].date ]
},
//y杞�
yAxis: {
@@ -446,31 +444,31 @@
//
series: [{
- name: '鎴愬搧鍏ュ簱',
+ name: '瀹炴鍏ュ簱',
type: 'line',
symbolSize: [0, 0],
itemStyle: {
color: '#feb01e'
},
- data: [160, 156, 150, 180, 170, 200, 20],
+ data: [sortedGroups[6].tasks.filter(it=>it.taskType==200).length, sortedGroups[5].tasks.filter(it=>it.taskType==200).length, sortedGroups[4].tasks.filter(it=>it.taskType==200).length, sortedGroups[3].tasks.filter(it=>it.taskType==200).length, sortedGroups[2].tasks.filter(it=>it.taskType==200).length, sortedGroups[1].tasks.filter(it=>it.taskType==200).length, sortedGroups[0].tasks.filter(it=>it.taskType==200).length],
}, {
- name: '鎴愬搧鍑哄簱',
+ name: '瀹炴鍑哄簱',
type: 'line',
symbolSize: [0, 0],
itemStyle: {
color: '#1be57a'
},
- data: [80, 115, 120, 130, 91, 99, 20]
+ data: [sortedGroups[6].tasks.filter(it=>it.taskType==100).length, sortedGroups[5].tasks.filter(it=>it.taskType==100).length, sortedGroups[4].tasks.filter(it=>it.taskType==100).length, sortedGroups[3].tasks.filter(it=>it.taskType==100).length, sortedGroups[2].tasks.filter(it=>it.taskType==100).length, sortedGroups[1].tasks.filter(it=>it.taskType==100).length, sortedGroups[0].tasks.filter(it=>it.taskType==100).length]
}, {
- name: '鎴愬搧鍥炴',
+ name: '绌烘鍏ュ簱',
type: 'line',
symbolSize: [0, 0],
itemStyle: {
color: '#69dbf7'
},
- data: [70, 113, 118, 111, 89, 99, 32]
+ data: [sortedGroups[6].tasks.filter(it=>it.taskType==204).length, sortedGroups[5].tasks.filter(it=>it.taskType==204).length, sortedGroups[4].tasks.filter(it=>it.taskType==204).length, sortedGroups[3].tasks.filter(it=>it.taskType==204).length, sortedGroups[2].tasks.filter(it=>it.taskType==204).length, sortedGroups[1].tasks.filter(it=>it.taskType==204).length, sortedGroups[0].tasks.filter(it=>it.taskType==204).length]
}, { //姘存尝绾圭偣
- name: '鎴愬搧鍏ュ簱',
+ name: '瀹炴鍏ュ簱',
type: 'effectScatter',
symbolSize: [5, 5],
rippleEffect: {
@@ -487,10 +485,9 @@
color: 'rgba(254,176,30,.3)'
}])
},
- data: [160, 156, 150, 180, 170, 200, 20]
-
+ data: [sortedGroups[6].tasks.filter(it=>it.taskType==200).length, sortedGroups[5].tasks.filter(it=>it.taskType==200).length, sortedGroups[4].tasks.filter(it=>it.taskType==200).length, sortedGroups[3].tasks.filter(it=>it.taskType==200).length, sortedGroups[2].tasks.filter(it=>it.taskType==200).length, sortedGroups[1].tasks.filter(it=>it.taskType==200).length, sortedGroups[0].tasks.filter(it=>it.taskType==200).length],
}, { //姘存尝绾圭偣
- name: '鎴愬搧鍑哄簱',
+ name: '瀹炴鍑哄簱',
type: 'effectScatter',
symbolSize: [5, 5],
rippleEffect: {
@@ -507,10 +504,10 @@
color: 'rgba(27,229,122,.3)'
}])
},
- data: [80, 115, 120, 130, 91, 99, 20]
+ data:[sortedGroups[6].tasks.filter(it=>it.taskType==100).length, sortedGroups[5].tasks.filter(it=>it.taskType==100).length, sortedGroups[4].tasks.filter(it=>it.taskType==100).length, sortedGroups[3].tasks.filter(it=>it.taskType==100).length, sortedGroups[2].tasks.filter(it=>it.taskType==100).length, sortedGroups[1].tasks.filter(it=>it.taskType==100).length, sortedGroups[0].tasks.filter(it=>it.taskType==100).length]
}, { //姘存尝绾圭偣
- name: '鎴愬搧鍥炴',
+ name: '绌烘鍏ュ簱',
type: 'effectScatter',
symbolSize: [5, 5],
rippleEffect: {
@@ -531,7 +528,7 @@
symbol: "none",
label: {
normal: {
- show: false,
+ show: true,
}
},
lineStyle: {
@@ -543,7 +540,7 @@
yAxis: 60
}]
},
- data: [70, 113, 118, 111, 89, 99, 32]
+ data: [sortedGroups[6].tasks.filter(it=>it.taskType==204).length, sortedGroups[5].tasks.filter(it=>it.taskType==204).length, sortedGroups[4].tasks.filter(it=>it.taskType==204).length, sortedGroups[3].tasks.filter(it=>it.taskType==204).length, sortedGroups[2].tasks.filter(it=>it.taskType==204).length, sortedGroups[1].tasks.filter(it=>it.taskType==204).length, sortedGroups[0].tasks.filter(it=>it.taskType==204).length]
}]
};
@@ -551,6 +548,7 @@
},
//杞
switper() {
+
if (this.timer) {
return;
}
--
Gitblit v1.9.3