添加时间
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<div style="flex: 1;">
|
||||
<Container name="设备报警" size="middle" style="">
|
||||
<TimePrompt class="timeShow" :timestr="timestr" />
|
||||
<div style="padding: 5px 10px;">
|
||||
<dv-scroll-board :config="config" style="width:575px;height:380px" ref='eqScrollBoard'/>
|
||||
</div>
|
||||
@@ -9,9 +10,11 @@
|
||||
</template>
|
||||
<script>
|
||||
import Container from '../components/Container.vue';
|
||||
import TimePrompt from '../components/TimePrompt';
|
||||
import { switchShowTime } from '../utils'
|
||||
export default {
|
||||
name: 'EqAlarm',
|
||||
components: { Container },
|
||||
components: { Container, TimePrompt },
|
||||
computed: {
|
||||
sjgEquipment() {
|
||||
return this.$store.state.websocket.sjgEquipment
|
||||
@@ -19,6 +22,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
timestr: '',
|
||||
config: {
|
||||
header: ['序号', '设备名称', '设备编码','设备状态','是否故障'],
|
||||
headerBGC: 'rgba(32, 55, 96, 0.8)',
|
||||
@@ -44,6 +48,7 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
this.timestr = switchShowTime('日')
|
||||
},
|
||||
watch:{
|
||||
sjgEquipment: {
|
||||
@@ -57,8 +62,16 @@ export default {
|
||||
]);
|
||||
this.config.data = outArr
|
||||
this.$refs['eqScrollBoard'].updateRows(outArr)
|
||||
this.timestr = switchShowTime('日')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
<style lang='scss' scoped>
|
||||
.timeShow {
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
left: 170px;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user