ustcyc
2025-01-08 e58b27d9b5b6b3d63267ca89d28ebe9d3363f94b
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
134
135
136
137
138
139
140
<template>
    <div class="page">
        <div class="page-container">
            <div class="page-container-left">
                <LeftTree ref="leftTreeRef" @handleNodeClick="handleNodeClick" />
            </div>
            <div class="page-container-right">
                <div class="page-container-right">
                    <div class="mb20 mt20 ml20 tab-box">
                        <div class="tab-li" :class="tab == 1 ? 'is-tab' : ''" @click="handleTab('1')">
                            采集点管理
                        </div>
                        <div class="tab-li" :class="tab == 2 ? 'is-tab' : ''" @click="handleTab('2')">
                            统计指标管理
                        </div>
                    </div>
                    <BaseCard :title="currentNode ? currentNode.label + '--节点配置' : '暂无节点配置'">
                        <div>
                            <div class="content-box" v-if="tab == '1'">
                                <CollectionPointManage ref="collectionPointManageRef" />
                            </div>
                            <div class="content-box" v-if="tab == '2'">
                                <StatisticalIndicatorsManage ref="statisticalIndicatorsManageRef" />
                            </div>
                        </div>
                    </BaseCard>
                </div>
            </div>
 
        </div>
    </div>
</template>
<script setup name="preAlarmManage">
import CollectionPointManage from './components/collectionpointmanage/CollectionPointManage.vue'
import StatisticalIndicatorsManage from './components/statisticalindicatorsmanage/StatisticalIndicatorsManage.vue'
 
let currentNode = ref()
let tab = ref('1')
let collectionPointManageRef = ref()
let statisticalIndicatorsManageRef = ref('1')
 
function handleTab(value) {
    tab.value = value
    nextTick(() => {
        if (value == 1 && collectionPointManageRef.value) {
            collectionPointManageRef.value.getList(currentNode.value)
        }
        if (value == 2 && statisticalIndicatorsManageRef.value) {
            statisticalIndicatorsManageRef.value.getList(currentNode.value)
        }
    });
 
}
 
function handleNodeClick(data) {
    currentNode.value = data
    handleTab(tab.value)
    // handleQuery();
}
 
</script>
<style scoped lang="scss">
@import "@/assets/styles/page.scss";
 
 
.page-box {
    height: calc(100vh - 145px);
 
    .tree-box {
        height: calc(100% - 70px);
        overflow-y: auto !important;
    }
 
    .select-box {
        display: flex;
        align-items: center;
 
        :deep .el-icon {
            color: #fff;
            margin: 0 10px 0 15px;
            font-size: 20px;
            // &:hover{
            //     color: #3371EB;
            // }
        }
    }
 
    .node-opt {
        flex: 1;
        text-align: right;
        margin-right: 5px;
 
        :deep .el-icon {
            color: #fff;
            margin-right: 5px;
        }
    }
 
 
}
 
:deep .el-tabs__nav-wrap:after {
    background: transparent;
}
 
:deep .el-tabs__item {
    color: #fff;
    font-size: 20px;
    padding: 0 20px;
 
    &.is-active,
    &:hover {
        color: #999 !important;
    }
}
 
.tab-box {
    display: flex;
    align-items: center;
    color: #fff;
    border-bottom: 1px solid #3371EB;
    margin-right: 20px;
 
    .tab-li {
        cursor: pointer;
        border: 1px solid #3371EB;
        padding: 10px 25px;
        border-radius: 5px 5px 0 0;
    }
 
    .is-tab {
        background: #3371EB;
    }
}
 
.content-box {
    height: calc(100vh - 317px) !important;
 
}
</style>