设备运行统计接口补充

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

@ -209,13 +209,13 @@
item.warnEvent > 0 item.warnEvent > 0
? '#1cb2ff' ? '#1cb2ff'
: 'rgba(255, 255, 255, 0.8)', : 'rgba(255, 255, 255, 0.8)',
}">0</span></span> }">{{item.warnEvent || 0}}</span></span>
<span class="data"><span class="num" :style="{ <span class="data"><span class="num" :style="{
color: color:
item.warnEquip > 0 item.warnEquip > 0
? '#1cb2ff' ? '#1cb2ff'
: 'rgba(255, 255, 255, 0.8)', : 'rgba(255, 255, 255, 0.8)',
}">0</span></span> }">{{ item.warnEquip || 0 }}</span></span>
</div> </div>
</div> </div>
</el-carousel-item> </el-carousel-item>
@ -232,13 +232,13 @@
item.warnEvent > 0 item.warnEvent > 0
? '#1cb2ff' ? '#1cb2ff'
: 'rgba(255, 255, 255, 0.8)', : 'rgba(255, 255, 255, 0.8)',
}">999</span></span> }">{{item.warnEvent || 0}}</span></span>
<span class="data"><span class="num" :style="{ <span class="data"><span class="num" :style="{
color: color:
1 > 0 item.warnEquip > 0
? '#1cb2ff' ? '#1cb2ff'
: 'rgba(255, 255, 255, 0.8)', : 'rgba(255, 255, 255, 0.8)',
}">125</span></span> }">{{ item.warnEquip || 0 }}</span></span>
</div> </div>
</div> </div>
</el-carousel-item> </el-carousel-item>
@ -335,6 +335,7 @@ import {
getJZAdminByDate, getJZAdminByDate,
getAllJJByDate, getAllJJByDate,
getDoorAccCount, getDoorAccCount,
getDeviceRunningAnalyze,
} from "@/api/source/total"; } from "@/api/source/total";
import { dateFormat } from "@/util/date"; import { dateFormat } from "@/util/date";
export default { export default {
@ -506,6 +507,8 @@ export default {
isHolidays(this.currentDate).then((res) => { isHolidays(this.currentDate).then((res) => {
this.isHolidays = res.result; this.isHolidays = res.result;
}) })
//
this.getDeviceRunningAnalyze();
}, },
// //
getEchartData() { 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() { getBx() {
getRepair(this.currentDate).then((res) => { getRepair(this.currentDate).then((res) => {

Loading…
Cancel
Save