From fcd2b922e1ef5b95bbce8891a43049a23110c43c Mon Sep 17 00:00:00 2001 From: hzz Date: Mon, 26 Jun 2023 16:43:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=A8=BC=E5=8A=A8=E7=8E=87?= =?UTF-8?q?=E8=AE=A1=E7=AE=97=20=20=E4=BF=AE=E6=94=B9=E5=9C=BA=E5=A4=96?= =?UTF-8?q?=E5=9C=A8=E7=BA=BF=E6=95=B0=E9=87=8F=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Mechanics/child/son/index.vue | 2 +- src/views/Offsite/content/center.vue | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/views/Mechanics/child/son/index.vue b/src/views/Mechanics/child/son/index.vue index d461783..2fc40ed 100644 --- a/src/views/Mechanics/child/son/index.vue +++ b/src/views/Mechanics/child/son/index.vue @@ -129,7 +129,7 @@ let data={ stoptime:val.stoptime,//急停时长 data:'2020-05-06',//采购日期 src:imgurlAddXhr(val.data),//设备图片 - timeguagu:+Math.abs((val.ontime)/(val.ontime+val.offtime+val.stoptime)*100).toFixed(1)||0,//时间稼动率 + timeguagu: Math.round(Math.abs((val.ontime)/(val.ontime+val.offtime+val.stoptime)*100)) ||0,//时间稼动率 MTBF:2724,//MTBF MTTR:169,//MTTR MTTF:2555,//MTTF diff --git a/src/views/Offsite/content/center.vue b/src/views/Offsite/content/center.vue index b6f0e1f..7c5c970 100644 --- a/src/views/Offsite/content/center.vue +++ b/src/views/Offsite/content/center.vue @@ -35,7 +35,7 @@ import mapEcharts from "./chart/mapEchart.vue"; import topTitle from "./chart/topTitle.vue"; import { Offsite } from "@/store/module/offsite"; import { useI18n } from 'vue-i18n' -let {t} = useI18n(); +let { t } = useI18n(); const store = Offsite(); let props = defineProps<{ width: number; @@ -81,20 +81,19 @@ const box = (width: any, height: any) => { watch( () => store.devlist, (newVal, oldVal) => { - - store.devlist.forEach(res => { + newVal.forEach(res => { if (res.city == '广东省') { if (res.deviceStatus == "true") { - city1['on'] += res.counts + city1['on'] += 1 } else { - city1['off'] += res.counts + city1['off'] += 1 } } if (res.city == '浙江省') { if (res.deviceStatus == "true") { - city2['on'] += res.counts + city2['on'] += 1 } else { - city2['off'] += res.counts + city2['off'] += 1 } } }) @@ -138,4 +137,5 @@ onMounted(() => { }); display: flex; width: 100%; height: 100%; -} +} +