suerprisePlus
2024-05-30 d4c810f9803aa13d806724a5f4f71fe85abac38e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<template>
<div id="index" ref="appRef" class="index_home" :class="{ pageisScale: true }">
    <div class="bg">
        <dv-loading v-if="loading">Loading...</dv-loading>
        <div v-else class="host-body">
            <!-- 头部 s -->
            <div class="d-flex jc-center title_wrap">
                <div class="zuojuxing"></div>
                <div class="youjuxing"></div>
                <div class="guang"></div>
                <div class="d-flex jc-center">
                    <div class="title">
                        <span class="title-text">FastBee物联网平台</span>
                    </div>
                </div>
                <div class="timers ">
                    {{ dateYear }} {{ dateWeek }} {{ dateDay }}
                    <i class=" blq-icon-shezhi02" style="margin-left:10px" @click="showSetting"></i>
                </div>
            </div>
            <!-- 头部 e-->
            <!-- 内容  s-->
            <index></index>
            <!-- 内容 e -->
        </div>
    </div>
    <Setting ref="setting" />
</div>
</template>
 
<script>
import drawMixin from "../../utils/bigScreen/drawMixin";
import {
    formatTime
} from "../../utils/bigScreen/index.js";
import Setting from './setting.vue'
import index from './indexs/index.vue'
export default {
    mixins: [drawMixin],
    components: {
        Setting,
        index
    },
    data() {
        return {
            timing: null,
            loading: true,
            dateDay: null,
            dateYear: null,
            dateWeek: null,
            weekday: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"],
        };
    },
    filters: {
        numsFilter(msg) {
            return msg || 0;
        },
    },
    computed: {
 
    },
    created() {
 
    },
    mounted() {
        this.timeFn();
        this.cancelLoading();
    },
    beforeDestroy() {
        clearInterval(this.timing);
    },
    methods: {
        showSetting() {
            this.$refs.setting.init()
        },
        timeFn() {
            this.timing = setInterval(() => {
                this.dateDay = formatTime(new Date(), "HH: mm: ss");
                this.dateYear = formatTime(new Date(), "yyyy-MM-dd");
                this.dateWeek = this.weekday[new Date().getDay()];
            }, 1000);
        },
        cancelLoading() {
            setTimeout(() => {
                this.loading = false;
            }, 500);
        },
    },
};
</script>
 
<style lang="scss">
@import "./home.scss";
@import '../../assets/bigScreen/css/theme/index.css';
@import "../../assets/bigScreen/css/index.scss"
</style>