设备运行统计接口补充

dev
张群 3 years ago
parent 29f6962ca4
commit cf85ab154d
  1. 26
      src/views/garden/generalizePatternNew.vue

@ -209,13 +209,13 @@
item.warnEvent > 0
? '#1cb2ff'
: 'rgba(255, 255, 255, 0.8)',
}">0</span></span>
}">{{item.warnEvent || 0}}</span></span>
<span class="data"><span class="num" :style="{
color:
item.warnEquip > 0
? '#1cb2ff'
: 'rgba(255, 255, 255, 0.8)',
}">0</span></span>
}">{{ item.warnEquip || 0 }}</span></span>
</div>
</div>
</el-carousel-item>
@ -232,13 +232,13 @@
item.warnEvent > 0
? '#1cb2ff'
: 'rgba(255, 255, 255, 0.8)',
}">999</span></span>
}">{{item.warnEvent || 0}}</span></span>
<span class="data"><span class="num" :style="{
color:
1 > 0
item.warnEquip > 0
? '#1cb2ff'
: 'rgba(255, 255, 255, 0.8)',
}">125</span></span>
}">{{ item.warnEquip || 0 }}</span></span>
</div>
</div>
</el-carousel-item>
@ -335,6 +335,7 @@ import {
getJZAdminByDate,
getAllJJByDate,
getDoorAccCount,
getDeviceRunningAnalyze,
} from "@/api/source/total";
import { dateFormat } from "@/util/date";
export default {
@ -506,6 +507,8 @@ export default {
isHolidays(this.currentDate).then((res) => {
this.isHolidays = res.result;
})
//
this.getDeviceRunningAnalyze();
},
//
getEchartData() {
@ -798,6 +801,19 @@ export default {
})
},
//
getDeviceRunningAnalyze() {
getDeviceRunningAnalyze("", "").then((res) => {
let deviceRunningData = res.data.data;
Object.keys(this.ywDevice).map((key) => {
let obj = deviceRunningData.find(
(item1) => item1.classCode == this.ywDevice[key].code
);
this.ywDevice[key].warnEvent = obj ? obj.warnEvent : 0;
this.ywDevice[key].warnEquip = obj ? obj.warnEquip : 0;
});
});
},
//
getBx() {
getRepair(this.currentDate).then((res) => {

Loading…
Cancel
Save