|
@@ -221,31 +221,31 @@
|
|
|
<div class="case-title">今日报警</div>
|
|
|
<div class="case-content">
|
|
|
<div class="case-two">
|
|
|
- <span><strong class="sign">9</strong>次</span>
|
|
|
+ <span><strong class="sign">{{alarm.todayAlarm ? alarm.todayAlarm : '暂无报警数据'}}</strong></span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="case-center">
|
|
|
- <div class="case-title">平均相应时间</div>
|
|
|
+ <div class="case-title">故障率</div>
|
|
|
<div class="case-content">
|
|
|
<div class="case-two">
|
|
|
- <span><strong class="sign">34</strong>分钟</span>
|
|
|
+ <span><strong class="sign">{{alarm.failureRate ? alarm.failureRate : '暂无数据'}}</strong></span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="case-center">
|
|
|
- <div class="case-title">今日时间提醒</div>
|
|
|
+ <div class="case-title">三级报警数量</div>
|
|
|
<div class="case-content">
|
|
|
<div class="case-two">
|
|
|
- <span><strong class="sign">27</strong>次</span>
|
|
|
+ <span><strong class="sign">{{alarm.warningQuantity ? alarm.warningQuantity : '暂无数据'}}</strong></span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="case-box case-right">
|
|
|
- <div class="case-title">未处理事件</div>
|
|
|
+ <div class="case-title">事件提醒</div>
|
|
|
<div class="case-content">
|
|
|
<div class="case-two">
|
|
|
- <span><strong class="sign">7</strong>件</span>
|
|
|
+ <span><strong class="sign">{{alarm.todayEventTotal ? alarm.todayEventTotal : '暂无数据'}}</strong></span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -255,13 +255,13 @@
|
|
|
<div class="home-footer-blue"></div>
|
|
|
<div class="home-footer-map"></div>
|
|
|
<div class="home-footer-scatter"></div>
|
|
|
- <div :class="['home-footer-flash', isFlash ? 'flash1': '']"></div>
|
|
|
+ <div :class="['home-footer-flash']"></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import {getScreen, getListLargeScreen, getEnvList, getAlarmAndPig} from "@/utils/api";
|
|
|
+import {getScreen, getListLargeScreen, getEnvList, getAlarmAndPig, alarmHome} from "@/utils/api";
|
|
|
|
|
|
export default {
|
|
|
name: "Home",
|
|
@@ -326,7 +326,8 @@ export default {
|
|
|
personPassSuccess: "",
|
|
|
tadaySiZhu: "",
|
|
|
tadayXiXiao: "",
|
|
|
- }
|
|
|
+ },
|
|
|
+ alarm: {}
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -356,6 +357,11 @@ export default {
|
|
|
this.pig = res.data;
|
|
|
}
|
|
|
})
|
|
|
+ alarmHome({}).then(res => {
|
|
|
+ if(res.code === 10000) {
|
|
|
+ this.alarm = res.data;
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
prev() {
|
|
|
if(this.num > 0) {
|
|
@@ -406,14 +412,6 @@ export default {
|
|
|
})
|
|
|
}, 3000)
|
|
|
},
|
|
|
- initFalsh() {
|
|
|
- let that = this;
|
|
|
- this.timer3 = setInterval(() => {
|
|
|
- setTimeout(() => {
|
|
|
- that.isFlash = !that.isFlash
|
|
|
- })
|
|
|
- }, 500)
|
|
|
- },
|
|
|
jump(url) {
|
|
|
this.$router.push(url);
|
|
|
},
|
|
@@ -428,7 +426,6 @@ export default {
|
|
|
beforeDestroy() {
|
|
|
clearInterval(this.timer);
|
|
|
clearInterval(this.timer2);
|
|
|
- clearInterval(this.timer3);
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
@@ -722,10 +719,15 @@ export default {
|
|
|
top: -80%;
|
|
|
left: 50%;
|
|
|
transform: translate(-50%, -50%);
|
|
|
- background: linear-gradient(to bottom, rgba(4, 5, 26, .1), rgba(4, 5, 26, .3));
|
|
|
- }
|
|
|
- .flash1 {
|
|
|
background: linear-gradient(to bottom, rgba(102, 255, 255, .1), rgba(102, 255, 255, .3));
|
|
|
- /*background-color: rgba(102, 255, 255, .2);*/
|
|
|
+ animation: breathLamp 1.5s alternate infinite;
|
|
|
+ }
|
|
|
+ @keyframes breathLamp {
|
|
|
+ 0% {
|
|
|
+ opacity: .1;
|
|
|
+ }
|
|
|
+ 100% {
|
|
|
+ opacity: 1;
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|