2025-09-01 16:55:44 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<div class="monitor">
|
|
|
|
|
|
<div class="search">
|
|
|
|
|
|
<div class="left">
|
|
|
|
|
|
<div class="search-item">
|
|
|
|
|
|
<span>场站切换</span>
|
2025-09-04 13:42:48 +08:00
|
|
|
|
<a-select v-model:value="selectStation" style="width: 220px">
|
|
|
|
|
|
<a-select-option v-for="station in stations" :value="station['station_id']"
|
|
|
|
|
|
>{{ station.name }}
|
|
|
|
|
|
</a-select-option>
|
|
|
|
|
|
</a-select>
|
2025-09-01 16:55:44 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="right">
|
|
|
|
|
|
<div class="search-item">
|
|
|
|
|
|
<span>运行模式</span>
|
2025-09-04 13:42:48 +08:00
|
|
|
|
<a-select v-model:value="value" style="width: 220px">
|
|
|
|
|
|
<a-select-option value="lucy">Lucy</a-select-option>
|
|
|
|
|
|
</a-select>
|
2025-09-01 16:55:44 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
<div class="search-item">
|
2025-09-04 13:42:48 +08:00
|
|
|
|
<a-button type="primary">下发</a-button>
|
2025-09-01 16:55:44 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="content">
|
|
|
|
|
|
<div class="stations">
|
2025-09-04 13:42:48 +08:00
|
|
|
|
<div
|
|
|
|
|
|
class="station-item"
|
|
|
|
|
|
v-for="system in systems"
|
|
|
|
|
|
:key="system.name"
|
|
|
|
|
|
@click="chooseStation(system)"
|
|
|
|
|
|
:class="systemType == system.systemType ? 'active' : ''"
|
|
|
|
|
|
>
|
|
|
|
|
|
<span class="name">{{ system.name }}</span>
|
|
|
|
|
|
<span class="des">边缘网关:{{ system.power }} W</span>
|
|
|
|
|
|
<span class="des">总有功功率(台区):{{ system.num }}</span>
|
2025-09-01 16:55:44 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="container">
|
2025-09-04 13:42:48 +08:00
|
|
|
|
<videos v-if="systemType == 4" />
|
|
|
|
|
|
<device v-else :station-id="selectStation" :system-type="systemType"/>
|
2025-09-01 16:55:44 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
import device from '@/components/monitor/device.vue'
|
|
|
|
|
|
import videos from '@/components/monitor/videos.vue'
|
2025-09-04 13:42:48 +08:00
|
|
|
|
import { postReq, getReq } from '@/request/api'
|
2025-09-01 16:55:44 +08:00
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
|
name: 'MonitorView',
|
|
|
|
|
|
components: {
|
|
|
|
|
|
device,
|
|
|
|
|
|
videos
|
|
|
|
|
|
},
|
|
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
2025-09-04 13:42:48 +08:00
|
|
|
|
// currentKey: '储能系统',
|
|
|
|
|
|
systemType: 1,
|
2025-09-01 16:55:44 +08:00
|
|
|
|
value: [],
|
2025-09-04 13:42:48 +08:00
|
|
|
|
stations: [],
|
|
|
|
|
|
selectStation:'',
|
|
|
|
|
|
systems: [
|
2025-09-01 16:55:44 +08:00
|
|
|
|
{
|
2025-09-04 13:42:48 +08:00
|
|
|
|
name: '储能系统',
|
|
|
|
|
|
power: 60,
|
|
|
|
|
|
num: 62,
|
|
|
|
|
|
systemType: 1
|
2025-09-01 16:55:44 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
2025-09-04 13:42:48 +08:00
|
|
|
|
name: '充电系统',
|
|
|
|
|
|
power: 60,
|
|
|
|
|
|
num: 62,
|
|
|
|
|
|
systemType: 2
|
|
|
|
|
|
},
|
2025-09-01 16:55:44 +08:00
|
|
|
|
{
|
2025-09-04 13:42:48 +08:00
|
|
|
|
name: '光伏系统',
|
2025-09-01 16:55:44 +08:00
|
|
|
|
power: 60,
|
2025-09-04 13:42:48 +08:00
|
|
|
|
num: 62,
|
|
|
|
|
|
systemType: 3
|
2025-09-01 16:55:44 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
2025-09-04 13:42:48 +08:00
|
|
|
|
name: '安防系统',
|
2025-09-01 16:55:44 +08:00
|
|
|
|
power: 60,
|
2025-09-04 13:42:48 +08:00
|
|
|
|
num: 62,
|
|
|
|
|
|
systemType: 4
|
2025-09-01 16:55:44 +08:00
|
|
|
|
}
|
|
|
|
|
|
// {
|
|
|
|
|
|
// name: "储能系统4",
|
|
|
|
|
|
// }
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
2025-09-04 13:42:48 +08:00
|
|
|
|
},
|
|
|
|
|
|
mounted() {
|
|
|
|
|
|
this.getStations()
|
|
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
|
|
|
//查询场站列表
|
|
|
|
|
|
async getStations() {
|
|
|
|
|
|
try {
|
|
|
|
|
|
const res = await getReq('/queryStationList', { page: 0, 'page_size': 10000 })
|
|
|
|
|
|
|
|
|
|
|
|
console.log(res)
|
|
|
|
|
|
this.stations = res.data
|
|
|
|
|
|
this.selectStation=this.stations[0]['station_id']
|
|
|
|
|
|
} catch (error) {
|
|
|
|
|
|
this.stations = []
|
|
|
|
|
|
this.selectStation=''
|
|
|
|
|
|
this.$message.error(error.message)
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
chooseStation(system) {
|
|
|
|
|
|
this.systemType = system.systemType
|
|
|
|
|
|
}
|
2025-09-01 16:55:44 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
|
|
@import url(@/style/color.scss);
|
|
|
|
|
|
.monitor {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
padding: 20px;
|
|
|
|
|
|
background: $bg1-color;
|
|
|
|
|
|
border-radius: 15px;
|
|
|
|
|
|
|
|
|
|
|
|
.search {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
.search-item {
|
|
|
|
|
|
span {
|
|
|
|
|
|
margin-right: 20px;
|
|
|
|
|
|
}
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
margin-left: 30px;
|
|
|
|
|
|
&:first-child {
|
|
|
|
|
|
margin-left: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
.left,
|
|
|
|
|
|
.right {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
.content {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
height: calc(100% - 32px - 20px);
|
|
|
|
|
|
margin-top: 20px;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
.stations {
|
|
|
|
|
|
min-width: 155px;
|
|
|
|
|
|
max-width: 235px;
|
|
|
|
|
|
width: 13%;
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
border-radius: 12px;
|
|
|
|
|
|
background: $bg2-color;
|
|
|
|
|
|
padding: 15px 0;
|
|
|
|
|
|
overflow-y: auto;
|
|
|
|
|
|
.station-item {
|
|
|
|
|
|
width: calc(100% - 30px);
|
|
|
|
|
|
margin: 0 15px 15px 15px;
|
|
|
|
|
|
border-radius: 12px;
|
2025-09-04 13:42:48 +08:00
|
|
|
|
|
2025-09-01 16:55:44 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
padding: 10px 15px;
|
2025-09-04 13:42:48 +08:00
|
|
|
|
cursor: pointer;
|
2025-09-01 16:55:44 +08:00
|
|
|
|
|
|
|
|
|
|
.name {
|
|
|
|
|
|
font-size: 20px;
|
|
|
|
|
|
font-weight: 700;
|
|
|
|
|
|
line-height: 50px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.des {
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
line-height: 40px;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-09-04 13:42:48 +08:00
|
|
|
|
.active {
|
2025-09-01 16:55:44 +08:00
|
|
|
|
background: $bg3-color;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
.container {
|
2025-09-04 13:42:48 +08:00
|
|
|
|
width: 87%;
|
|
|
|
|
|
display: flex;
|
2025-09-01 16:55:44 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</style>
|