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-15 14:23:28 +08:00
|
|
|
|
<a-select v-model:value="selectStationId" style="width: 300px" @change="getStationChange">
|
2025-09-04 13:42:48 +08:00
|
|
|
|
<a-select-option v-for="station in stations" :value="station['station_id']"
|
|
|
|
|
|
>{{ station.name }}
|
|
|
|
|
|
</a-select-option>
|
|
|
|
|
|
</a-select>
|
2026-01-05 16:13:13 +08:00
|
|
|
|
<a-button type="primary" @click="handleMessage" style="margin-left: 20px">运行参数查看</a-button>
|
|
|
|
|
|
<a-button type="primary" @click="openDispatchModeModal" style="margin-left: 20px">运行模式设置</a-button>
|
|
|
|
|
|
<a-button type="primary" @click="openDispatchParamModal" style="margin-left: 20px">运行参数设置</a-button>
|
2025-09-01 16:55:44 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2025-10-11 19:36:42 +08:00
|
|
|
|
<!-- <div class="right">
|
2025-09-01 16:55:44 +08:00
|
|
|
|
<div class="search-item">
|
|
|
|
|
|
<span>运行模式</span>
|
2025-09-09 09:39:15 +08:00
|
|
|
|
<a-select v-model:value="workMode" style="width: 220px">
|
2025-09-10 09:23:47 +08:00
|
|
|
|
<a-select-option :value="item.value" v-for="item in workModes">{{
|
|
|
|
|
|
item.label
|
|
|
|
|
|
}}</a-select-option>
|
2025-09-04 13:42:48 +08:00
|
|
|
|
</a-select>
|
2025-09-01 16:55:44 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
<div class="search-item">
|
2025-10-11 19:36:42 +08:00
|
|
|
|
<a-button type="primary" @click="openDispatchModeModal">模式设置</a-button>
|
2025-09-01 16:55:44 +08:00
|
|
|
|
</div>
|
2025-10-11 19:36:42 +08:00
|
|
|
|
<div class="search-item">
|
|
|
|
|
|
<a-button type="primary" @click="openDispatchParamModal">参数设置</a-button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div> -->
|
2025-09-01 16:55:44 +08:00
|
|
|
|
</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>
|
2025-09-10 09:23:47 +08:00
|
|
|
|
<span class="des" v-for="title in system.titles" :key="title.v"
|
|
|
|
|
|
>{{ title.v }}:{{ system[title.key] }}{{ title.sufix }}
|
|
|
|
|
|
</span>
|
2025-09-01 16:55:44 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="container">
|
2025-09-30 09:47:40 +08:00
|
|
|
|
<videos
|
|
|
|
|
|
v-if="systemType == 4"
|
|
|
|
|
|
:station-id="selectStationId"
|
|
|
|
|
|
@updateGatewayData="updateGatewayData"
|
|
|
|
|
|
/>
|
|
|
|
|
|
<device
|
|
|
|
|
|
v-else
|
|
|
|
|
|
:station-id="selectStationId"
|
|
|
|
|
|
:system-type="systemType"
|
|
|
|
|
|
@updateGatewayData="updateGatewayData"
|
|
|
|
|
|
/>
|
2025-09-01 16:55:44 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2025-09-26 11:31:32 +08:00
|
|
|
|
<a-modal
|
|
|
|
|
|
v-model:open="msgModal"
|
|
|
|
|
|
width="700px"
|
|
|
|
|
|
style="top: 80px"
|
|
|
|
|
|
:footer="null"
|
|
|
|
|
|
:destroy-on-close="true"
|
|
|
|
|
|
>
|
2025-09-30 09:47:40 +08:00
|
|
|
|
<div style="color: #fff; padding: 20px" v-html="message"></div>
|
|
|
|
|
|
</a-modal>
|
2025-10-11 19:36:42 +08:00
|
|
|
|
<a-modal
|
|
|
|
|
|
v-model:open="dispatchModeModal"
|
|
|
|
|
|
width="900px"
|
|
|
|
|
|
style="top: 80px"
|
|
|
|
|
|
:footer="null"
|
|
|
|
|
|
:destroy-on-close="true"
|
|
|
|
|
|
>
|
|
|
|
|
|
<DetailInfo
|
|
|
|
|
|
:items="detailInfoMode"
|
|
|
|
|
|
:rule-form="ruleForm"
|
|
|
|
|
|
ref="detailInfo"
|
|
|
|
|
|
>
|
|
|
|
|
|
</DetailInfo>
|
|
|
|
|
|
<div style="display: flex; justify-content: center; gap: 20px">
|
|
|
|
|
|
<a-button @click="handlebackMode">取消</a-button>
|
|
|
|
|
|
<a-button @click="handleConfirmMode" type="primary" >确认下发</a-button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</a-modal>
|
2025-09-30 09:47:40 +08:00
|
|
|
|
<a-modal
|
|
|
|
|
|
v-model:open="dispatchModal"
|
|
|
|
|
|
width="900px"
|
|
|
|
|
|
style="top: 80px"
|
|
|
|
|
|
:footer="null"
|
|
|
|
|
|
:destroy-on-close="true"
|
|
|
|
|
|
>
|
|
|
|
|
|
<DetailInfo
|
|
|
|
|
|
:items="detailInfo"
|
|
|
|
|
|
:rule-form="ruleForm"
|
|
|
|
|
|
:form-rules="formRules"
|
|
|
|
|
|
ref="detailInfo"
|
|
|
|
|
|
>
|
|
|
|
|
|
</DetailInfo>
|
|
|
|
|
|
<div style="display: flex; justify-content: center; gap: 20px">
|
|
|
|
|
|
<a-button @click="handleback">取消</a-button>
|
|
|
|
|
|
<a-button @click="handleConfirm" type="primary" >确认下发</a-button>
|
|
|
|
|
|
</div>
|
2025-09-26 11:31:32 +08:00
|
|
|
|
</a-modal>
|
2025-09-01 16:55:44 +08:00
|
|
|
|
</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: '储能系统',
|
2025-09-30 09:47:40 +08:00
|
|
|
|
dispatchModal: false,
|
2025-10-11 19:36:42 +08:00
|
|
|
|
dispatchModeModal: false,
|
2025-09-04 13:42:48 +08:00
|
|
|
|
systemType: 1,
|
2025-09-01 16:55:44 +08:00
|
|
|
|
value: [],
|
2025-09-04 13:42:48 +08:00
|
|
|
|
stations: [],
|
2025-09-10 09:23:47 +08:00
|
|
|
|
selectStationId: '',
|
2025-09-30 09:47:40 +08:00
|
|
|
|
message: '',
|
|
|
|
|
|
msgModal: false,
|
2025-09-04 13:42:48 +08:00
|
|
|
|
systems: [
|
2025-09-01 16:55:44 +08:00
|
|
|
|
{
|
2026-01-05 16:13:13 +08:00
|
|
|
|
name: '储能设备',
|
2025-09-10 09:23:47 +08:00
|
|
|
|
titles: [
|
2026-01-05 16:13:13 +08:00
|
|
|
|
// { v: '运行模式', key: 'workmode' },
|
|
|
|
|
|
// { v: '储能EMU状态', key: 'emu' },
|
|
|
|
|
|
// { v: '充电桩状态', key: 'cdz' }
|
2025-09-26 16:54:37 +08:00
|
|
|
|
//{ v: '总有功功率(台区)', key: 'power', sufix: 'kW' }
|
2025-09-10 09:23:47 +08:00
|
|
|
|
],
|
2025-09-04 13:42:48 +08:00
|
|
|
|
power: 60,
|
|
|
|
|
|
num: 62,
|
|
|
|
|
|
systemType: 1
|
2025-09-01 16:55:44 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
2026-01-05 16:13:13 +08:00
|
|
|
|
name: '充电设备',
|
2025-09-04 13:42:48 +08:00
|
|
|
|
power: 60,
|
|
|
|
|
|
num: 62,
|
2025-09-10 09:23:47 +08:00
|
|
|
|
systemType: 2,
|
|
|
|
|
|
titles: [
|
2025-09-28 11:33:51 +08:00
|
|
|
|
//{ v: '总功率', key: 'power', sufix: 'kW' },
|
2026-01-05 16:13:13 +08:00
|
|
|
|
// { v: '数量', key: 'num' }
|
2025-09-10 09:23:47 +08:00
|
|
|
|
]
|
2025-09-04 13:42:48 +08:00
|
|
|
|
},
|
2025-09-01 16:55:44 +08:00
|
|
|
|
{
|
2026-01-05 16:13:13 +08:00
|
|
|
|
name: '光伏设备',
|
2025-09-01 16:55:44 +08:00
|
|
|
|
power: 60,
|
2025-09-04 13:42:48 +08:00
|
|
|
|
num: 62,
|
2025-09-10 09:23:47 +08:00
|
|
|
|
systemType: 3,
|
|
|
|
|
|
titles: [
|
2025-09-28 11:33:51 +08:00
|
|
|
|
//{ v: '总功率', key: 'power', sufix: 'kW' },
|
2026-01-05 16:13:13 +08:00
|
|
|
|
// { v: '数量', key: 'num' }
|
2025-09-10 09:23:47 +08:00
|
|
|
|
]
|
2025-09-01 16:55:44 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
2026-01-05 16:13:13 +08:00
|
|
|
|
name: '辅助设备',
|
2025-09-01 16:55:44 +08:00
|
|
|
|
power: 60,
|
2025-09-04 13:42:48 +08:00
|
|
|
|
num: 62,
|
2025-09-10 09:23:47 +08:00
|
|
|
|
systemType: 4,
|
|
|
|
|
|
titles: [
|
2025-09-26 11:31:32 +08:00
|
|
|
|
// { v: '总功率', key: 'power', sufix: 'kW' },
|
2026-01-05 16:13:13 +08:00
|
|
|
|
// { v: '数量', key: 'num' }
|
2025-09-10 09:23:47 +08:00
|
|
|
|
]
|
2025-09-01 16:55:44 +08:00
|
|
|
|
}
|
|
|
|
|
|
// {
|
|
|
|
|
|
// name: "储能系统4",
|
|
|
|
|
|
// }
|
2025-09-09 09:39:15 +08:00
|
|
|
|
],
|
2025-09-10 09:23:47 +08:00
|
|
|
|
workMode: '',
|
|
|
|
|
|
workModes: [
|
2026-01-09 17:17:09 +08:00
|
|
|
|
// 0:手动,1:峰谷套利,2:配网增容,3:应急供电,4:并网保电,5:运营支撑
|
2025-09-25 19:20:25 +08:00
|
|
|
|
{
|
|
|
|
|
|
value: 0,
|
|
|
|
|
|
label: '手动'
|
|
|
|
|
|
},
|
2025-09-09 09:39:15 +08:00
|
|
|
|
{
|
2025-09-10 09:23:47 +08:00
|
|
|
|
value: 1,
|
|
|
|
|
|
label: '峰谷套利'
|
2025-09-09 09:39:15 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
2025-09-10 09:23:47 +08:00
|
|
|
|
value: 2,
|
2025-11-27 16:10:32 +08:00
|
|
|
|
label: '配网增容'
|
2025-09-09 09:39:15 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
2025-09-10 09:23:47 +08:00
|
|
|
|
value: 3,
|
|
|
|
|
|
label: '应急供电'
|
2025-09-09 09:39:15 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
2025-09-10 09:23:47 +08:00
|
|
|
|
value: 4,
|
|
|
|
|
|
label: '并网保电'
|
2025-09-09 09:39:15 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
2025-09-10 09:23:47 +08:00
|
|
|
|
value: 5,
|
2026-01-05 16:13:13 +08:00
|
|
|
|
label: '运营支撑'
|
2025-09-09 09:39:15 +08:00
|
|
|
|
}
|
|
|
|
|
|
],
|
2025-09-30 09:47:40 +08:00
|
|
|
|
deviceGroup: [],
|
2025-10-11 19:36:42 +08:00
|
|
|
|
detailInfoMode: {
|
|
|
|
|
|
title: '预制舱模式设置',
|
|
|
|
|
|
icon: 'icon-xinxi',
|
|
|
|
|
|
list: [
|
|
|
|
|
|
{
|
|
|
|
|
|
label: '预制舱运行模式',
|
|
|
|
|
|
value: '0',
|
|
|
|
|
|
key: 'work_mode',
|
|
|
|
|
|
type: 'select',
|
|
|
|
|
|
// addonAfter: '%',
|
|
|
|
|
|
// inputType:'number'
|
|
|
|
|
|
list: [
|
|
|
|
|
|
{ value: '0', label: '手动' },
|
|
|
|
|
|
{ value: '1', label: '峰谷套利' },
|
2025-11-27 16:10:32 +08:00
|
|
|
|
{ value: '2', label: '配网增容' },
|
2025-10-11 19:36:42 +08:00
|
|
|
|
{ value: '3', label: '应急供电' },
|
|
|
|
|
|
{ value: '4', label: '并网保电' },
|
2026-01-05 16:13:13 +08:00
|
|
|
|
{ value: '5', label: '运营支撑' }
|
2025-10-11 19:36:42 +08:00
|
|
|
|
],
|
|
|
|
|
|
options: { label: 'label', value: 'value' }
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
ruleForm: {}
|
|
|
|
|
|
},
|
2025-09-30 09:47:40 +08:00
|
|
|
|
detailInfo: {
|
|
|
|
|
|
title: '预制舱参数设置',
|
|
|
|
|
|
icon: 'icon-xinxi',
|
|
|
|
|
|
list: [
|
|
|
|
|
|
{
|
|
|
|
|
|
label: '储能放电下限值(0-99)',
|
|
|
|
|
|
value: '',
|
|
|
|
|
|
key: 'soc_min',
|
|
|
|
|
|
type: 'input',
|
|
|
|
|
|
addonAfter: '%',
|
|
|
|
|
|
inputType:'number'
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
label: '储能充电上限值(1-100)',
|
|
|
|
|
|
value: '',
|
|
|
|
|
|
key: 'soc_max',
|
|
|
|
|
|
type: 'input',
|
|
|
|
|
|
addonAfter: '%',
|
|
|
|
|
|
inputType:'number'
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
label: '台区变压器容量(160-1600)',
|
|
|
|
|
|
value: undefined,
|
|
|
|
|
|
key: 'capacity',
|
|
|
|
|
|
type: 'input',
|
|
|
|
|
|
addonAfter: 'kVA',
|
|
|
|
|
|
inputType:'number'
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
label: '安全输入功率(0-400)',
|
|
|
|
|
|
value: '',
|
|
|
|
|
|
key: 'power_safe',
|
|
|
|
|
|
type: 'input',
|
|
|
|
|
|
addonAfter: 'kW',
|
|
|
|
|
|
inputType:'number'
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
label: '储能最大放电功率(0-150)',
|
|
|
|
|
|
value: '',
|
|
|
|
|
|
key: 'power_discharge',
|
|
|
|
|
|
type: 'input',
|
|
|
|
|
|
addonAfter: 'kW',
|
|
|
|
|
|
inputType:'number'
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
label: '储能最大充电功率(0-150)',
|
|
|
|
|
|
value: '',
|
|
|
|
|
|
key: 'power_charge',
|
|
|
|
|
|
type: 'input',
|
|
|
|
|
|
addonAfter: 'kW',
|
|
|
|
|
|
inputType:'number'
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
label: '防逆流回差(10-300)',
|
|
|
|
|
|
value: '',
|
|
|
|
|
|
key: 'backflow',
|
|
|
|
|
|
type: 'input',
|
|
|
|
|
|
addonAfter: 'kW',
|
|
|
|
|
|
inputType:'number'
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
label: '防过载回差(10-300)',
|
|
|
|
|
|
value: '',
|
|
|
|
|
|
key: 'overload',
|
|
|
|
|
|
type: 'input',
|
|
|
|
|
|
addonAfter: 'kW',
|
|
|
|
|
|
inputType:'number'
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
ruleForm: {}
|
|
|
|
|
|
},
|
|
|
|
|
|
formRules: {
|
|
|
|
|
|
soc_min: [
|
|
|
|
|
|
{
|
|
|
|
|
|
trigger: 'blur',
|
|
|
|
|
|
required: true,
|
|
|
|
|
|
message: '请输入储能放电下限值'
|
|
|
|
|
|
},
|
|
|
|
|
|
{ pattern: /^([0-9]|[1-9][0-9])$/, message: '请输入0-99 的整数' }
|
|
|
|
|
|
],
|
|
|
|
|
|
soc_max: [
|
|
|
|
|
|
{
|
|
|
|
|
|
trigger: 'blur',
|
|
|
|
|
|
required: true,
|
|
|
|
|
|
message: '请输入储能充电上限值'
|
|
|
|
|
|
},
|
2025-10-11 19:36:42 +08:00
|
|
|
|
{ pattern: /^(100|[1-9][0-9]?)$/, message: '请输入1-100的整数' }
|
2025-09-30 09:47:40 +08:00
|
|
|
|
],
|
|
|
|
|
|
capacity: [
|
|
|
|
|
|
{
|
|
|
|
|
|
trigger: 'blur',
|
|
|
|
|
|
required: true,
|
|
|
|
|
|
message: '请输入台区变压器容量'
|
|
|
|
|
|
},
|
2025-10-11 19:36:42 +08:00
|
|
|
|
{ pattern: /^(1600|1[6-9][0-9]|[2-9][0-9]{2}|1[0-5][0-9]{2})$/, message: '请输入160-1600的整数' }
|
2025-09-30 09:47:40 +08:00
|
|
|
|
],
|
|
|
|
|
|
power_safe: [
|
|
|
|
|
|
{
|
|
|
|
|
|
trigger: 'blur',
|
|
|
|
|
|
required: true,
|
|
|
|
|
|
message: '请输入安全输入功率'
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
2025-10-11 19:36:42 +08:00
|
|
|
|
pattern: /^(400|[1-3][0-9]{2}|[1-9][0-9]|[0-9])$/, message: '请输入0-400的整数',
|
2025-09-30 09:47:40 +08:00
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
power_discharge: [
|
|
|
|
|
|
{
|
|
|
|
|
|
trigger: 'blur',
|
|
|
|
|
|
required: true,
|
|
|
|
|
|
message: '请输入储能最大放电功率'
|
|
|
|
|
|
},
|
2025-10-11 19:36:42 +08:00
|
|
|
|
{ pattern: /^(150|1[0-4][0-9]|[1-9][0-9]|[0-9])$/, message: '请输入0-150的整数' }
|
2025-09-30 09:47:40 +08:00
|
|
|
|
],
|
|
|
|
|
|
power_charge: [
|
|
|
|
|
|
{
|
|
|
|
|
|
trigger: 'blur',
|
|
|
|
|
|
required: true,
|
|
|
|
|
|
message: '请输入储能最大充电功率'
|
|
|
|
|
|
},
|
2025-10-11 19:36:42 +08:00
|
|
|
|
{ pattern: /^(150|1[0-4][0-9]|[1-9][0-9]|[0-9])$/, message: '请输入0-150的整数' }
|
2025-09-30 09:47:40 +08:00
|
|
|
|
],
|
|
|
|
|
|
backflow: [
|
|
|
|
|
|
{
|
|
|
|
|
|
trigger: 'blur',
|
|
|
|
|
|
required: true,
|
|
|
|
|
|
message: '请输入防逆流回差'
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
2025-10-11 19:36:42 +08:00
|
|
|
|
pattern: /^(300|[1-2][0-9]{2}|[1-9][0-9])$/, message: '请输入10-300的整数' }
|
2025-09-30 09:47:40 +08:00
|
|
|
|
],
|
|
|
|
|
|
overload: [
|
|
|
|
|
|
{
|
|
|
|
|
|
trigger: 'blur',
|
|
|
|
|
|
required: true,
|
|
|
|
|
|
message: '请输入防过载回差'
|
|
|
|
|
|
},
|
2025-10-11 19:36:42 +08:00
|
|
|
|
{ pattern: /^(300|[1-2][0-9]{2}|[1-9][0-9])$/, message: '请输入10-300的整数' }
|
2025-09-30 09:47:40 +08:00
|
|
|
|
]
|
|
|
|
|
|
},
|
|
|
|
|
|
ruleForm:{},
|
|
|
|
|
|
gatewayData1:{}
|
2025-09-01 16:55:44 +08:00
|
|
|
|
}
|
2025-09-04 13:42:48 +08:00
|
|
|
|
},
|
|
|
|
|
|
mounted() {
|
|
|
|
|
|
this.getStations()
|
|
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
2025-10-11 19:36:42 +08:00
|
|
|
|
handlebackMode() {
|
|
|
|
|
|
this.dispatchModeModal = false
|
|
|
|
|
|
},
|
|
|
|
|
|
async handleConfirmMode() {
|
|
|
|
|
|
const res = await this.$refs.detailInfo.confirm()
|
|
|
|
|
|
if (!res) return
|
|
|
|
|
|
if (this.ruleForm.work_mode) {
|
|
|
|
|
|
this.handleSubmitMode()
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
async handleSubmitMode() {
|
|
|
|
|
|
try {
|
|
|
|
|
|
const res = await postReq('/updateStation', {
|
|
|
|
|
|
station_id: this.selectStationId,
|
|
|
|
|
|
work_mode: this.ruleForm.work_mode,
|
|
|
|
|
|
...this.ruleForm
|
|
|
|
|
|
})
|
|
|
|
|
|
if (res.errcode == 0) {
|
|
|
|
|
|
this.$message.success('下发成功')
|
|
|
|
|
|
this.dispatchModeModal=false
|
|
|
|
|
|
}
|
|
|
|
|
|
} catch (error) {
|
|
|
|
|
|
this.$message.error('下发失败')
|
|
|
|
|
|
this.dispatchModeModal=false
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-09-30 09:47:40 +08:00
|
|
|
|
handleback() {
|
|
|
|
|
|
this.dispatchModal = false
|
|
|
|
|
|
},
|
|
|
|
|
|
async handleConfirm() {
|
|
|
|
|
|
const res = await this.$refs.detailInfo.confirm()
|
|
|
|
|
|
if (!res) return
|
|
|
|
|
|
this.handleSubmit()
|
|
|
|
|
|
},
|
|
|
|
|
|
async handleSubmit() {
|
|
|
|
|
|
try {
|
|
|
|
|
|
const res = await postReq('/updateGatewayParams', {
|
|
|
|
|
|
station_id: this.selectStationId,
|
|
|
|
|
|
work_mode: this.workMode,
|
|
|
|
|
|
...this.ruleForm
|
|
|
|
|
|
})
|
|
|
|
|
|
if (res.errcode == 0) {
|
|
|
|
|
|
this.$message.success('下发成功')
|
|
|
|
|
|
this.dispatchModal=false
|
|
|
|
|
|
}
|
|
|
|
|
|
} catch (error) {
|
|
|
|
|
|
this.$message.error('下发失败')
|
|
|
|
|
|
this.dispatchModal=false
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-09-26 16:54:37 +08:00
|
|
|
|
updateGatewayData(gatewayData) {
|
|
|
|
|
|
this.systems[0].workmode = gatewayData.workmode
|
|
|
|
|
|
this.systems[0].emu = gatewayData.emu
|
|
|
|
|
|
this.systems[0].cdz = gatewayData.cdz
|
|
|
|
|
|
this.message = gatewayData.msg
|
|
|
|
|
|
},
|
|
|
|
|
|
|
2025-09-30 09:47:40 +08:00
|
|
|
|
handleMessage() {
|
|
|
|
|
|
this.msgModal = true
|
2025-09-26 11:31:32 +08:00
|
|
|
|
},
|
2025-09-10 09:23:47 +08:00
|
|
|
|
//下发
|
2025-09-30 09:47:40 +08:00
|
|
|
|
// handleDispatch
|
2025-10-11 19:36:42 +08:00
|
|
|
|
async openDispatchModeModal() {
|
|
|
|
|
|
this.dispatchModeModal = true;
|
|
|
|
|
|
},
|
|
|
|
|
|
async openDispatchParamModal() {
|
2025-09-30 09:47:40 +08:00
|
|
|
|
|
2025-09-10 09:23:47 +08:00
|
|
|
|
try {
|
2025-09-30 09:47:40 +08:00
|
|
|
|
const res = await getReq('/queryDevicByCategory', {
|
2025-09-10 09:23:47 +08:00
|
|
|
|
station_id: this.selectStationId,
|
2025-09-30 09:47:40 +08:00
|
|
|
|
category: 0
|
2025-09-10 09:23:47 +08:00
|
|
|
|
})
|
2025-09-30 09:47:40 +08:00
|
|
|
|
|
|
|
|
|
|
this.ruleForm=Object.keys(res.gateway).reduce((acc, key) => {
|
|
|
|
|
|
const value = res.gateway[key];
|
|
|
|
|
|
acc[key] = typeof value === 'number' ? String(value) : value;
|
|
|
|
|
|
return acc;
|
|
|
|
|
|
}, {});
|
|
|
|
|
|
this.dispatchModal = true
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-09-10 09:23:47 +08:00
|
|
|
|
} catch (error) {
|
2025-09-30 09:47:40 +08:00
|
|
|
|
this.ruleForm = {}
|
2025-09-10 09:23:47 +08:00
|
|
|
|
}
|
2025-09-30 09:47:40 +08:00
|
|
|
|
|
2025-09-10 09:23:47 +08:00
|
|
|
|
},
|
2025-09-09 09:39:15 +08:00
|
|
|
|
//场站切换
|
2025-09-10 09:23:47 +08:00
|
|
|
|
getStationChange(val) {
|
|
|
|
|
|
console.log(val)
|
2025-09-09 09:39:15 +08:00
|
|
|
|
this.getStationAttr()
|
|
|
|
|
|
},
|
2025-09-04 13:42:48 +08:00
|
|
|
|
//查询场站列表
|
|
|
|
|
|
async getStations() {
|
|
|
|
|
|
try {
|
2025-09-10 09:23:47 +08:00
|
|
|
|
const res = await getReq('/queryStationList', { page: 0, page_size: 10000 })
|
2025-09-04 13:42:48 +08:00
|
|
|
|
|
|
|
|
|
|
this.stations = res.data
|
2025-09-10 09:23:47 +08:00
|
|
|
|
this.selectStationId = this.stations[0]['station_id']
|
2025-09-09 09:39:15 +08:00
|
|
|
|
this.getStationAttr()
|
2025-09-04 13:42:48 +08:00
|
|
|
|
} catch (error) {
|
|
|
|
|
|
this.stations = []
|
2025-09-10 09:23:47 +08:00
|
|
|
|
this.selectStationId = ''
|
2025-09-04 13:42:48 +08:00
|
|
|
|
this.$message.error(error.message)
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-09-09 09:39:15 +08:00
|
|
|
|
// 查询场站的参数
|
2025-09-10 09:23:47 +08:00
|
|
|
|
async getStationAttr() {
|
2025-09-09 09:39:15 +08:00
|
|
|
|
try {
|
|
|
|
|
|
const res = await getReq('/queryStationOverview', { station_id: this.selectStationId })
|
|
|
|
|
|
|
2025-09-10 09:23:47 +08:00
|
|
|
|
res.data.device_group.forEach((Element, index) => {
|
|
|
|
|
|
this.systems[index].num = Element.count
|
|
|
|
|
|
this.systems[index].power = Element.power
|
2025-10-09 18:37:18 +08:00
|
|
|
|
// workmode 和 msg 数据通过 queryDevicByCategory 接口返回
|
|
|
|
|
|
//this.systems[index].workmode = Element.workmode
|
|
|
|
|
|
// if (Element.category == 1) {
|
|
|
|
|
|
// this.message = Element.msg
|
|
|
|
|
|
// }
|
2025-09-10 09:23:47 +08:00
|
|
|
|
})
|
|
|
|
|
|
this.workMode = res.data.work_mode
|
2025-09-09 09:39:15 +08:00
|
|
|
|
} catch (error) {
|
|
|
|
|
|
this.deviceGroup = []
|
2025-09-10 09:23:47 +08:00
|
|
|
|
this.workMode = ''
|
2025-09-09 09:39:15 +08:00
|
|
|
|
// this.$message.error(error.errmsg)
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
|
2025-09-04 13:42:48 +08:00
|
|
|
|
chooseStation(system) {
|
2025-09-10 09:23:47 +08:00
|
|
|
|
console.log(system, 'system')
|
2025-09-04 13:42:48 +08:00
|
|
|
|
this.systemType = system.systemType
|
|
|
|
|
|
}
|
2025-09-01 16:55:44 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
|
|
@import url(@/style/color.scss);
|
|
|
|
|
|
.monitor {
|
2025-09-10 09:23:47 +08:00
|
|
|
|
// width: 100%;
|
2025-09-11 16:14:55 +08:00
|
|
|
|
// height: calc(100% - 40px);
|
|
|
|
|
|
height: 100%;
|
2025-09-01 16:55:44 +08:00
|
|
|
|
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 {
|
2026-01-05 16:13:13 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
//grid-template-rows: repeat(auto-fit, minmax(140px, 4fr));
|
2025-09-01 16:55:44 +08:00
|
|
|
|
border-radius: 12px;
|
|
|
|
|
|
background: $bg2-color;
|
2025-09-11 16:14:55 +08:00
|
|
|
|
padding-top: 15px;
|
2025-09-01 16:55:44 +08:00
|
|
|
|
.station-item {
|
2026-01-05 16:13:13 +08:00
|
|
|
|
// flex: 1;
|
2025-09-11 16:14:55 +08:00
|
|
|
|
margin: 0 15px 15px 15px;
|
2026-01-05 16:13:13 +08:00
|
|
|
|
border-radius: 10px;
|
2025-09-11 16:14:55 +08:00
|
|
|
|
width: 180px;
|
2026-01-05 16:13:13 +08:00
|
|
|
|
height: 50px;
|
2025-09-01 16:55:44 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
2026-01-05 16:13:13 +08:00
|
|
|
|
// color: #fff;
|
|
|
|
|
|
// padding: 10px 10px;
|
2025-09-04 13:42:48 +08:00
|
|
|
|
cursor: pointer;
|
2025-09-30 09:47:40 +08:00
|
|
|
|
&:hover {
|
2025-09-12 16:34:29 +08:00
|
|
|
|
background: $table-bg;
|
|
|
|
|
|
}
|
2025-09-01 16:55:44 +08:00
|
|
|
|
|
|
|
|
|
|
.name {
|
2026-01-05 16:13:13 +08:00
|
|
|
|
padding-left: 20px;
|
2025-09-01 16:55:44 +08:00
|
|
|
|
font-size: 20px;
|
|
|
|
|
|
font-weight: 700;
|
|
|
|
|
|
line-height: 50px;
|
|
|
|
|
|
}
|
2026-01-05 16:13:13 +08:00
|
|
|
|
// .des {
|
|
|
|
|
|
// font-size: 14px;
|
|
|
|
|
|
// font-weight: 600;
|
|
|
|
|
|
// line-height: 30px;
|
|
|
|
|
|
// display: inline-block;
|
|
|
|
|
|
// max-width: 160px;
|
|
|
|
|
|
// white-space: nowrap;
|
|
|
|
|
|
// overflow: hidden;
|
|
|
|
|
|
// text-overflow: ellipsis;
|
|
|
|
|
|
// }
|
2025-09-01 16:55:44 +08:00
|
|
|
|
}
|
2025-09-04 13:42:48 +08:00
|
|
|
|
.active {
|
2025-09-01 16:55:44 +08:00
|
|
|
|
background: $bg3-color;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
.container {
|
2025-09-10 09:23:47 +08:00
|
|
|
|
width: calc(100% - 200px);
|
2025-09-04 13:42:48 +08:00
|
|
|
|
display: flex;
|
2025-09-09 09:39:15 +08:00
|
|
|
|
justify-content: space-between;
|
2025-09-01 16:55:44 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-09-30 09:47:40 +08:00
|
|
|
|
:deep(.ant-input-group-addon) {
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
border: 1px solid $border-color;
|
|
|
|
|
|
}
|
|
|
|
|
|
:deep(.ant-form-item-label) {
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
font-size: 16px !important;
|
|
|
|
|
|
width: 180px !important;
|
|
|
|
|
|
}
|
2025-09-01 16:55:44 +08:00
|
|
|
|
</style>
|