修改稼动率计算 修改场外在线数量显示

This commit is contained in:
hzz 2023-06-26 16:43:54 +08:00
parent 7d4dab8429
commit fcd2b922e1
2 changed files with 9 additions and 9 deletions

View File

@ -129,7 +129,7 @@ let data={
stoptime:val.stoptime,// stoptime:val.stoptime,//
data:'2020-05-06',// data:'2020-05-06',//
src:imgurlAddXhr(val.data),// 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 MTBF:2724,//MTBF
MTTR:169,//MTTR MTTR:169,//MTTR
MTTF:2555,//MTTF MTTF:2555,//MTTF

View File

@ -35,7 +35,7 @@ import mapEcharts from "./chart/mapEchart.vue";
import topTitle from "./chart/topTitle.vue"; import topTitle from "./chart/topTitle.vue";
import { Offsite } from "@/store/module/offsite"; import { Offsite } from "@/store/module/offsite";
import { useI18n } from 'vue-i18n' import { useI18n } from 'vue-i18n'
let {t} = useI18n(); let { t } = useI18n();
const store = Offsite(); const store = Offsite();
let props = defineProps<{ let props = defineProps<{
width: number; width: number;
@ -81,20 +81,19 @@ const box = (width: any, height: any) => {
watch( watch(
() => store.devlist, () => store.devlist,
(newVal, oldVal) => { (newVal, oldVal) => {
newVal.forEach(res => {
store.devlist.forEach(res => {
if (res.city == '广东省') { if (res.city == '广东省') {
if (res.deviceStatus == "true") { if (res.deviceStatus == "true") {
city1['on'] += res.counts city1['on'] += 1
} else { } else {
city1['off'] += res.counts city1['off'] += 1
} }
} }
if (res.city == '浙江省') { if (res.city == '浙江省') {
if (res.deviceStatus == "true") { if (res.deviceStatus == "true") {
city2['on'] += res.counts city2['on'] += 1
} else { } else {
city2['off'] += res.counts city2['off'] += 1
} }
} }
}) })
@ -138,4 +137,5 @@ onMounted(() => { });
display: flex; display: flex;
width: 100%; width: 100%;
height: 100%; height: 100%;
}</style> }
</style>