Commit 2f2cd7c1 by nningxx

oee report update -2

parent b02cc4a6
...@@ -177,8 +177,8 @@ ...@@ -177,8 +177,8 @@
return { return {
loading: false, loading: false,
currentDate: moment().format("YYYY/MM/DD"), currentDate: moment().format("YYYY/MM/DD"),
// dwsURL: "https://workstation.rokeris.com", // 基地址 dwsURL: "https://workstation.rokeris.com", // 基地址
dwsURL: "", // 基地址 // dwsURL: "", // 基地址
baseURL: "https://dws-platform.xbg.rokeris.com/dev-api", // 基地址 baseURL: "https://dws-platform.xbg.rokeris.com/dev-api", // 基地址
factory_code: "", // 工厂编码 factory_code: "", // 工厂编码
// 产线数据 // 产线数据
...@@ -1094,20 +1094,21 @@ ...@@ -1094,20 +1094,21 @@
containLabel: true, containLabel: true,
}, },
dataZoom: [{ dataZoom: [{
type: 'slider', // type: 'slider',
xAxisIndex: 0, // 指定控制X轴‌:ml-citation{ref="4" data="citationList"} // xAxisIndex: 0, // 指定控制X轴‌:ml-citation{ref="4" data="citationList"}
start: 0, // 初始显示起点‌:ml-citation{ref="1" data="citationList"} // start: 0, // 初始显示起点‌:ml-citation{ref="1" data="citationList"}
end: 60, // 初始显示终点(示例值,按需计算) // end: 60, // 初始显示终点(示例值,按需计算)
height: 1, // 滚动条高度‌:ml-citation{ref="1" data="citationList"} height: 0, // 滚动条高度‌:ml-citation{ref="1" data="citationList"}
bottom: 1, // 滚动条位置‌:ml-citation{ref="1" data="citationList"} bottom: 0, // 滚动条位置‌:ml-citation{ref="1" data="citationList"}
fillerColor: 'rgba(84,112,198,0.6)', // 选中区域颜色‌:ml-citation{ref="1" data="citationList"} // fillerColor: 'rgba(84,112,198,0.6)', // 选中区域颜色‌:ml-citation{ref="1" data="citationList"}
zoomLock: true // 禁止缩放‌:ml-citation{ref="5" data="citationList"} // zoomLock: true // 禁止缩放‌:ml-citation{ref="5" data="citationList"}
}, { }, {
type: 'inside', // 内置滚动控制‌:ml-citation{ref="2" data="citationList"} type: 'inside', // 内置滚动控制‌:ml-citation{ref="2" data="citationList"}
xAxisIndex: 0, xAxisIndex: 0,
zoomOnMouseWheel: false, // 禁用滚轮缩放‌:ml-citation{ref="5" data="citationList"} zoomOnMouseWheel: false, // 禁用滚轮缩放‌:ml-citation{ref="5" data="citationList"}
moveOnMouseWheel: true // 启用滚轮平移‌:ml-citation{ref="5" data="citationList"} moveOnMouseWheel: true // 启用滚轮平移‌:ml-citation{ref="5" data="citationList"}
}], }
],
xAxis: { xAxis: {
type: "category", type: "category",
axisLine: { lineStyle: { color: "#fff" } }, axisLine: { lineStyle: { color: "#fff" } },
...@@ -1194,11 +1195,11 @@ ...@@ -1194,11 +1195,11 @@
// 转换为百分比并保留一位小数 // 转换为百分比并保留一位小数
const value = parseFloat(item.utilization_rate.toFixed(1)); const value = parseFloat(item.utilization_rate.toFixed(1));
const truncateBasic = (str) => str.slice(0, 12); const truncateBasic = (str) => str.slice(0, 12);
deviceNames.push(truncateBasic(name)); deviceNames.push(truncateBasic(name));
deviceValues.push(value); deviceValues.push(value);
}); });
// 如果有真实数据,设置标志 // 如果有真实数据,设置标志
...@@ -2097,18 +2098,7 @@ ...@@ -2097,18 +2098,7 @@
// 存储OEE排名数据 // 存储OEE排名数据
this.apiData.oeeRankData = oeeRankData; this.apiData.oeeRankData = oeeRankData;
if (this.devices && this.devices.length > 0) {
this.devices.forEach(equipment => {
oeeRank = this.apiData.oeeRankData.find(
(device) => device.code === equipment.id
);
equipment.utilization_rate = oeeRank ? oeeRank.utilization_rate : 0;
});
this.devices.sort((a, b) => b.utilization_rate - a.utilization_rate);
this.selectedDevice = this.devices[0].id;
console.log("排序后的设备数据:", JSON.stringify(this.devices));
this.updateOEETrendChart();
}
// 更新OEE排名图表 // 更新OEE排名图表
this.updateOEERankChart(); this.updateOEERankChart();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment