2023西安数博会CIM演示-【前端】-Web
AdaKing88
2023-08-21 bc03b832caa49bbcd2674fe4cae3701b5059bf95
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<template>
    <div class="wulianbox">
        <el-card class="box">
            <div style="margin:5px">当前时间</div>
            <div style="margin:2px">
                <span>{{ syear }}</span>年<span>{{ smonth }}</span>月<span>{{ sday }}</span>日<span
                    style="margin-left:50px">{{ shour }} : {{ smi }}: {{ sec }}</span>
            </div>
        </el-card>
        <el-collapse v-model="activeName" accordion style="margin-top:5px;height:100%">
            <el-collapse-item title="交通监测" name="1">
                <el-row style="width:100%;padding:5px">
                    <el-col :span="8">
                        11
                    </el-col>
                    <el-col :span="8">11
                    </el-col>
                    <el-col :span="8">
                        <el-button @click="showData(scope.row, scope.$index)" size="small">添加摄像头</el-button>
                    </el-col>
                </el-row>
                <el-table :data="tabledata" border size="mini"
                    style="width: 100%;background-color: transparent;margin-top:10px" rowKey="gid">
                    <el-table-column prop="xzq" header-align="center" align="center" label="监控名称">
                    </el-table-column>
                    <el-table-column prop="ydmj" header-align="center" align="center" label="监控类型">
                    </el-table-column>
                    <el-table-column prop="ssgm" header-align="center" align="center" label="监测点">
                    </el-table-column>
                    <el-table-column header-align="center" align="center" width="60" label="状态"><template
                            slot-scope="scope">
                            <el-switch v-model="scope.row.status"> </el-switch>
                        </template>
                    </el-table-column>
                </el-table>
            </el-collapse-item>
            <el-collapse-item title="气象监测" name="2">
                <el-row style="width:100%;padding:5px">
                    <el-col :span="12">
                        11
                    </el-col>
                    <el-col :span="12">11
                    </el-col>
                </el-row>
 
                <el-table :data="tabledata2" border size="mini"
                    style="width: 100%;background-color: transparent;margin-top:10px" rowKey="gid">
                    <el-table-column prop="xzq" header-align="center" align="center" label="监测点">
                    </el-table-column>
                    <el-table-column prop="ydmj" header-align="center" width="60" align="center" label="气温">
                    </el-table-column>
                    <el-table-column prop="ssgm" header-align="center" width="60" align="center" label="气压">
                    </el-table-column>
                    <el-table-column prop="ssgm" header-align="center" width="60" align="center" label="湿度">
                    </el-table-column>
                    <el-table-column header-align="center" align="center" width="60" label="状态"><template
                            slot-scope="scope">
                            <el-switch v-model="scope.row.status"> </el-switch>
                        </template>
                    </el-table-column>
                </el-table>
            </el-collapse-item>
            <el-collapse-item title="市政设施监测" name="3"></el-collapse-item>
        </el-collapse>
    </div>
</template>
<script>
export default {
    data() {
        return {
            tabledata: [],
            tabledata2: [],
            timer: null,
 
            activeName: "1",
            syear: "2022",
            smonth: "7",
            sday: "13",
            shour: "13",
            smi: "20",
            sec: "00"
        }
    },
    mounted() {
        let that = this;
        this.timer = setInterval(res => {
            let date = new Date();
            that.syear = date.getFullYear();
            that.smonth = date.getMonth() + 1;
            that.sday = date.getDate();
            that.shour = date.getHours() > 9 ? date.getHours() : '0' + date.getHours();
            that.smi = date.getMinutes() > 9 ? date.getMinutes() : '0' + date.getMinutes();
            that.sec = date.getSeconds() > 9 ? date.getSeconds() : '0' + date.getSeconds();
        }, 1000);
    }
}
</script>
<style lang="less" scoped>
.box {
    background: rgba(121, 121, 121, 0.5) !important;
    border: 0px;
    margin: 2px;
    padding: 5px;
    color: white;
    font-size: large;
    font-weight: bold;
 
 
 
    span {
        color: rgb(233, 178, 0);
        margin: 0px 5px
    }
}
 
.wulianbox {
 
    .el-table /deep/ tr {
        background-color: transparent;
        color: rgba(240, 250, 254, 0.65);
    }
 
    .el-table /deep/ tr th {
        background-color: rgba(99, 99, 99, 1);
        color: rgba(240, 250, 254, 0.85);
    }
 
    .el-table /deep/ tr:hover>td {
        background-color: rgba(0, 166, 226, 0.4) !important;
    }
 
}
</style>