2022-07-29 18:41:53 +08:00
|
|
|
<template>
|
|
|
|
|
<section class="box">
|
|
|
|
|
<Monitoring-Screen v-if="page === 'two'"></Monitoring-Screen>
|
|
|
|
|
<Device-Screen v-if="page === 'one'"></Device-Screen>
|
|
|
|
|
</section>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import MonitoringScreen from './MonitoringScreen.vue'
|
|
|
|
|
import DeviceScreen from './DeviceScreen.vue'
|
|
|
|
|
export default {
|
|
|
|
|
name: 'HomeScreen',
|
|
|
|
|
components: {
|
|
|
|
|
MonitoringScreen,
|
|
|
|
|
DeviceScreen
|
|
|
|
|
},
|
|
|
|
|
data () {
|
|
|
|
|
return {
|
|
|
|
|
page: 'one',
|
2022-07-29 18:45:27 +08:00
|
|
|
timer: null,
|
|
|
|
|
iTime: this.$store.getters.setTime1
|
2022-07-29 18:41:53 +08:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
mounted () {
|
|
|
|
|
this.swipePage()
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
swipePage () {
|
|
|
|
|
this.timer = setInterval(() => {
|
|
|
|
|
this.page = this.page === 'one' ? 'two' : 'one'
|
2022-07-29 18:45:27 +08:00
|
|
|
}, this.iTime)
|
2022-07-29 18:41:53 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="stylus" scoped>
|
|
|
|
|
@import '~@css/mixin'
|
|
|
|
|
.box
|
|
|
|
|
_wh(100%, 100%)
|
|
|
|
|
overflow hidden
|
|
|
|
|
</style>
|