智慧园区前端大屏
shuishen
2024-12-18 9a37c5e1b2190c3f6ec71483923922189091dd52
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
<!--
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2023-03-10 15:28:07
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2023-03-14 14:47:23
 * @FilePath: \forest-fire\src\views\fireWarning\components\leftContainer.vue
 * @Description: 防火预警
 * 
 * Copyright (c) 2023 by ${git_name_email}, All Rights Reserved. 
-->
<script setup>
import { ref } from 'vue'
import { Search } from '@element-plus/icons-vue'
import tabsTable from './box/tabsTable.vue'
 
const standingBook = ref('')
 
const activeName = ref('all')
 
const handleClick = (tab, event) => {
}
 
const tableData = [
    {
        ind: 1,
        address: '南昌市东湖区',
        fireGrade: '一级',
        fireAddress: '公园',
    }
]
</script>
 
<template>
    <div class="left-container">
        <div class="title"></div>
        <div class="search">
            <el-input v-model="standingBook" class="w-50 m-2" size="samll" placeholder="请输入搜索内容" :prefix-icon="Search" />
        </div>
        <div class="table">
            <el-tabs v-model="activeName" class="table-tabs" @tab-click="handleClick">
                <el-tab-pane label="全部" name="all">
                    <tabs-table v-if="activeName == 'all'" :tableData="tableData"></tabs-table>
                </el-tab-pane>
 
                <el-tab-pane label="一级" name="one">
                    <tabs-table v-if="activeName == 'one'" :tableData="tableData"></tabs-table>
                </el-tab-pane>
 
                <el-tab-pane label="二级" name="two">
                    <tabs-table v-if="activeName == 'two'" :tableData="tableData"></tabs-table>
                </el-tab-pane>
 
                <el-tab-pane label="三级" name="three">
                    <tabs-table v-if="activeName == 'three'" :tableData="tableData"></tabs-table>
                </el-tab-pane>
 
                <el-tab-pane label="四级" name="four">
                    <tabs-table v-if="activeName == 'four'" :tableData="tableData"></tabs-table>
                </el-tab-pane>
 
                <el-tab-pane label="五级" name="five">
                    <tabs-table v-if="activeName == 'five'" :tableData="tableData"></tabs-table>
                </el-tab-pane>
            </el-tabs>
        </div>
    </div>
</template>
 
<style lang="scss" scoped>
.left-container {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 20px;
    left: 20px;
    bottom: 120px;
    width: 400px;
    pointer-events: auto;
 
    .title {
        height: 32px;
        background: url(/img/bg/sub-title.png) no-repeat;
    }
 
    .search {
        margin: 15px 0;
    }
 
    .table {
        flex: 1;
 
        .table-tabs {
            display: flex;
            flex-direction: column;
            height: 100%;
 
            :deep(.el-tabs__active-bar) {
                background-color: #46C7F3;
            }
 
            :deep(.el-tabs__item) {
                color: #D8EBEE;
 
                &:hover {
                    color: #46C7F3;
                }
 
                &.is-active {
                    color: #46C7F3;
                }
            }
 
            :deep(.el-tabs__content) {
                flex: 1;
 
                .el-tab-pane {
                    height: 100%;
                }
            }
        }
    }
}
</style>