From fb0e273cd64f3a03f110fb70753ff0b94adb3451 Mon Sep 17 00:00:00 2001 From: liuhr Date: Tue, 2 Jul 2024 09:20:48 +0800 Subject: [PATCH] =?UTF-8?q?[FEAT]:=201.=E9=A6=96=E9=A1=B5=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E8=BF=90=E8=A1=8C=E6=80=BB=E8=A7=88=E3=80=81=E6=9C=88?= =?UTF-8?q?=E5=BA=A6=E6=97=B6=E9=95=BF=E7=BB=9F=E8=AE=A1=E6=8A=A5=E8=A1=A8?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20=E2=80=9C=E7=BB=B4=E6=8A=A4=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E2=80=9D=20=E5=AD=97=E6=AE=B5=202.=E8=BF=90=E8=A1=8C?= =?UTF-8?q?=E6=8A=A5=E8=A1=A8=20=E6=9F=A5=E8=AF=A2=E4=BA=8C=20=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=20=E2=80=9D=E6=80=BB=E7=BB=B4=E6=8A=A4=E6=97=B6?= =?UTF-8?q?=E9=95=BF=EF=BC=88=E5=B0=8F=E6=97=B6=EF=BC=89=E2=80=9C=20?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=203.=E8=AE=BE=E5=A4=87=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E5=88=97=E8=A1=A8=20=E6=9F=A5=E7=9C=8B=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E6=A8=A1=E6=80=81=E7=AA=97=E5=86=85=E6=B7=BB=E5=8A=A0=20?= =?UTF-8?q?=E2=80=9C=E6=80=BB=E7=BB=B4=E6=8A=A4=E6=97=B6=E9=97=B4=EF=BC=88?= =?UTF-8?q?=E5=B0=8F=E6=97=B6=EF=BC=89=E2=80=9D=20=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../equipmentRecord/model/equipmentRecord.ts | 1 + src/pages/screen/screen1/index.vue | 37 ++++++++++++++----- .../screen/screen3/components/viewDialog.vue | 18 ++++++--- src/pages/screen/screen3/index.vue | 2 - src/pages/screen/screen4/index.vue | 7 +++- 5 files changed, 46 insertions(+), 19 deletions(-) diff --git a/src/api/equipmentRecord/model/equipmentRecord.ts b/src/api/equipmentRecord/model/equipmentRecord.ts index 63dade4..0981af8 100644 --- a/src/api/equipmentRecord/model/equipmentRecord.ts +++ b/src/api/equipmentRecord/model/equipmentRecord.ts @@ -25,5 +25,6 @@ export class EquipmentOEEEntity { totalRunningTime!: string; // 总运行时间 totalAlarmTime!: string; // 总报警时间 totalStopTime!: string; // 总待机时间 + totalMaintainTime!:string; // 总维护时间 oee!: string;// OEE时序 } diff --git a/src/pages/screen/screen1/index.vue b/src/pages/screen/screen1/index.vue index e9c6cc6..3bbcf06 100644 --- a/src/pages/screen/screen1/index.vue +++ b/src/pages/screen/screen1/index.vue @@ -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]] // 当前值 diff --git a/src/pages/screen/screen3/components/viewDialog.vue b/src/pages/screen/screen3/components/viewDialog.vue index af10ecc..8d259fc 100644 --- a/src/pages/screen/screen3/components/viewDialog.vue +++ b/src/pages/screen/screen3/components/viewDialog.vue @@ -19,7 +19,8 @@ 选择日期范围 - +
@@ -28,8 +29,8 @@ color="orange" flat />
- +
@@ -55,10 +56,16 @@
- +
- + +
+
+
@@ -117,6 +124,7 @@ const getPage = () => { formData.value.totalRunningTime = res.totalRunningTime; //(Math.random() * 100).toFixed(1) formData.value.totalAlarmTime = res.totalAlarmTime; // (Math.random() * 100).toFixed(1) formData.value.totalStopTime = res.totalStopTime; // (Math.random() * 100).toFixed(1) + formData.value.totalMaintainTime = res.totalMaintainTime; // (Math.random() * 100).toFixed(1) formData.value.oee = res.oee; // (res.totalRunningTime / 24).toFixed(2) + '%' // (Math.random() * 24).toFixed(1) }) } diff --git a/src/pages/screen/screen3/index.vue b/src/pages/screen/screen3/index.vue index d8c43a8..f4b746e 100644 --- a/src/pages/screen/screen3/index.vue +++ b/src/pages/screen/screen3/index.vue @@ -248,9 +248,7 @@ const EquipmentList = () => { // obj3.splice(7, 0, templateJSON); // obj3.splice(10, 0, templateJSON); // obj3.splice(11, 0, templateJSON); - debugger for (let i = 1; Coating2Val.length < 22; i++) { - debugger Coating2Val.push(templateJSON) } list2.value = Coating2Val //obj3 diff --git a/src/pages/screen/screen4/index.vue b/src/pages/screen/screen4/index.vue index 3107db1..a1cf31c 100644 --- a/src/pages/screen/screen4/index.vue +++ b/src/pages/screen/screen4/index.vue @@ -78,14 +78,16 @@ props.row.equipmentName }} {{ helper.getEquipmentType(props.row.equipmentType) - }} + }} {{ props.row.furnaceNum - }} + }} {{ props.row.totalRunningTime }} {{ props.row.totalAlarmTime }} + {{ + props.row.totalMaintainTime }} {{ props.row.totalStopTime }} @@ -150,6 +152,7 @@ const columns = ref([ { name: 'furnaceNum', align: 'center', label: '开炉次数', field: 'furnaceNum', headerStyle: 'background-color: #5186ec;color: white;font-weight: bold;font-size:20px;' }, { name: 'totalRunningTime', align: 'center', label: '总运行时长(小时)', field: 'totalRunningTime', headerStyle: 'background-color: #5186ec;color: white;font-weight: bold;font-size:20px;' }, { name: 'totalAlarmTime', align: 'center', label: '总报警时长(小时)', field: 'totalAlarmTime', headerStyle: 'background-color: #5186ec;color: white;font-weight: bold;font-size:20px;' }, + { name: 'totalMaintainTime', align: 'center', label: '总维护时长(小时)', field: 'totalMaintainTime', headerStyle: 'background-color: #5186ec;color: white;font-weight: bold;font-size:20px;' }, { name: 'totalStopTime', align: 'center', label: '总待机时长(小时)', field: 'totalStopTime', headerStyle: 'background-color: #5186ec;color: white;font-weight: bold;font-size:20px;' }, ])