|
|
|
|
@ -264,18 +264,18 @@ const EquipmentStateView = () => {
|
|
|
|
|
equipmentRecordApi.getEquipmentStateView().then((res: any) => {
|
|
|
|
|
res.forEach((item: any) => {
|
|
|
|
|
if (item.equipmentType == 'All') {
|
|
|
|
|
All.push(item.run, item.stop, item.alarm);
|
|
|
|
|
All.push(item.run, item.stop, item.alarm, item.maintain);
|
|
|
|
|
} else if (item.equipmentType == 'Homegrown') {
|
|
|
|
|
Homegrown.push(item.run, item.stop, item.alarm);
|
|
|
|
|
Homegrown.push(item.run, item.stop, item.alarm, item.maintain);
|
|
|
|
|
}
|
|
|
|
|
else if (item.equipmentType == 'Import') {
|
|
|
|
|
Import.push(item.run, item.stop, item.alarm);
|
|
|
|
|
Import.push(item.run, item.stop, item.alarm, item.maintain);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let equipmentStateViewOption = {
|
|
|
|
|
color: ['#02ad42', '#7b6a74', '#f60c0f'], //绿 灰 红色 --- 原颜色:橙 ff9800
|
|
|
|
|
color: ['#02ad42', '#7b6a74', '#f60c0f', '#ff9800'], //绿 灰 红色 --- 原颜色:橙 ff9800
|
|
|
|
|
title: [
|
|
|
|
|
{
|
|
|
|
|
text: '设备运行状态总览',
|
|
|
|
|
@ -330,7 +330,7 @@ const EquipmentStateView = () => {
|
|
|
|
|
dataset: {
|
|
|
|
|
source: {
|
|
|
|
|
// product: ['All', 'Homegrown', 'Import'],
|
|
|
|
|
product: ['运行', '停机', '报警'],
|
|
|
|
|
product: ['运行', '停机', '报警', '维护'],
|
|
|
|
|
All,
|
|
|
|
|
Homegrown,
|
|
|
|
|
Import,
|
|
|
|
|
@ -454,7 +454,7 @@ const EquipmentRecordStateMonthTotal = () => {
|
|
|
|
|
// borderWidth: 1,
|
|
|
|
|
// borderColor: '#ccc'
|
|
|
|
|
},
|
|
|
|
|
color: ['#02ad42', '#7b6a74', '#f60c0f'], //绿 灰 红色 --- 原颜色:橙 ff9800
|
|
|
|
|
color: ['#02ad42', '#7b6a74', '#f60c0f', '#ff9800'], //绿 灰 红色 --- 原颜色:橙 ff9800 fc8452
|
|
|
|
|
tooltip: {
|
|
|
|
|
enable: true,
|
|
|
|
|
show: true,
|
|
|
|
|
@ -466,7 +466,6 @@ const EquipmentRecordStateMonthTotal = () => {
|
|
|
|
|
// }
|
|
|
|
|
// },
|
|
|
|
|
// formatter: function (params: any) {
|
|
|
|
|
// debugger
|
|
|
|
|
// let name = params.name // 名称
|
|
|
|
|
// let percent = params.percent // 百分比
|
|
|
|
|
// let value = params.value[params.encode.value[0]] // 当前值
|
|
|
|
|
@ -484,7 +483,7 @@ const EquipmentRecordStateMonthTotal = () => {
|
|
|
|
|
legend: {
|
|
|
|
|
top: 1,
|
|
|
|
|
right: '2%',
|
|
|
|
|
data: ['运行时间', '待机时间', '报警时间']
|
|
|
|
|
data: ['运行时间', '待机时间', '报警时间', '维护时间']
|
|
|
|
|
},
|
|
|
|
|
xAxis: [
|
|
|
|
|
{
|
|
|
|
|
@ -521,7 +520,7 @@ const EquipmentRecordStateMonthTotal = () => {
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
dataset: {
|
|
|
|
|
dimensions: ['product', 'totalRunningTime', 'totalAlarmTime', 'totalStopTime'],
|
|
|
|
|
dimensions: ['product', 'totalRunningTime', 'totalAlarmTime', 'totalStopTime', 'totalMaintainTime'],
|
|
|
|
|
source: result
|
|
|
|
|
},
|
|
|
|
|
series: [
|
|
|
|
|
@ -581,6 +580,25 @@ const EquipmentRecordStateMonthTotal = () => {
|
|
|
|
|
return value + ' 小时';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: '维护时间',
|
|
|
|
|
type: 'bar',
|
|
|
|
|
// data: totalMaintainTime,
|
|
|
|
|
itemStyle: {
|
|
|
|
|
normal: {
|
|
|
|
|
label: {
|
|
|
|
|
color: '#ff9800',
|
|
|
|
|
position: 'top', //在上方显示
|
|
|
|
|
show: true // 在折线拐点上显示数据
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
tooltip: {
|
|
|
|
|
valueFormatter: function (value: any) {
|
|
|
|
|
return value + ' 小时';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
@ -642,7 +660,6 @@ const EquipmentRecordOEEMonthTotal = () => {
|
|
|
|
|
// }
|
|
|
|
|
// },
|
|
|
|
|
// formatter: function (params: any) {
|
|
|
|
|
// debugger
|
|
|
|
|
// let name = params.name // 名称
|
|
|
|
|
// let percent = params.percent // 百分比
|
|
|
|
|
// let value = params.value[params.encode.value[0]] // 当前值
|
|
|
|
|
|