|
|
|
|
@ -25,7 +25,7 @@
|
|
|
|
|
<div class="line">
|
|
|
|
|
<div class="item">
|
|
|
|
|
<div class="key">设备时间</div>
|
|
|
|
|
<el-date-picker value-format="YYYY-MM-DD HH:mm:ss" style="flex: 1;" v-model="formField.deviceTime" type="datetime" placeholder="请选择时间" />
|
|
|
|
|
<el-date-picker value-format="YYYY-MM-DD HH:mm:ss" style="flex: 1;" v-model="deviceTime" type="datetime" placeholder="请选择时间" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="line">
|
|
|
|
|
@ -62,7 +62,7 @@
|
|
|
|
|
<div class="line">
|
|
|
|
|
<div class="item">
|
|
|
|
|
<div class="key">控制回路数</div>
|
|
|
|
|
<div class="value" style="min-width: 100px;"></div>
|
|
|
|
|
<div class="value" style="min-width: 100px;">{{ subLoopParameter.subLoopData?.length || 0 }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="item"></div>
|
|
|
|
|
</div>
|
|
|
|
|
@ -83,8 +83,24 @@
|
|
|
|
|
<div class="main_title">
|
|
|
|
|
稳压分控器
|
|
|
|
|
</div>
|
|
|
|
|
<div class="main_content energy_meter" style="width:235px">
|
|
|
|
|
|
|
|
|
|
<div class="main_content energy_meter subLoopParame" style="width:235px">
|
|
|
|
|
<div class="subLoopParameter_item" v-for="item in subLoopParameter.subLoopData">
|
|
|
|
|
<div class="item">
|
|
|
|
|
<div class="key">回路地址</div>
|
|
|
|
|
<div class="value">{{ item.LoopAddress }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="item">
|
|
|
|
|
<div class="key">子模块数量</div>
|
|
|
|
|
<div class="value">{{ item.Modules?.length || 0 }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="item">
|
|
|
|
|
<div class="key">调光幅度</div>
|
|
|
|
|
<div class="value">{{ item.DimmingValue ? item.DimmingValue + '%' : item.DimmingValue }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="buttonBox" v-if="item.Modules?.length">
|
|
|
|
|
<div class="button save" style="width: 100px;" @click="openDialog(item)">查看子模块</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="main_item">
|
|
|
|
|
@ -101,7 +117,7 @@
|
|
|
|
|
<div class="line">
|
|
|
|
|
<div class="item">
|
|
|
|
|
<div class="key">电能表型号</div>
|
|
|
|
|
<div class="value"> </div>
|
|
|
|
|
<div class="value">ADL400</div>
|
|
|
|
|
<!-- <el-input v-model="formField.g" style="width: 100px" placeholder="请输入" /> -->
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
@ -144,6 +160,7 @@
|
|
|
|
|
</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<TableDialog v-if="isShowDialog" @closed="isShowDialog = false" :tableData="currentTableData" :title="currentTitle"></TableDialog>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
@ -151,11 +168,14 @@
|
|
|
|
|
import { ref, onMounted, onUnmounted } from 'vue'
|
|
|
|
|
import { useRouter } from 'vue-router'
|
|
|
|
|
import RPC from '@/utils/rpc';
|
|
|
|
|
import TableDialog from './TableDialog.vue';
|
|
|
|
|
|
|
|
|
|
const router = useRouter()
|
|
|
|
|
const currentTime = ref('')
|
|
|
|
|
const systemRuntime = ref('38分钟')
|
|
|
|
|
const formField = ref({})
|
|
|
|
|
const deviceTime = ref('')
|
|
|
|
|
const subLoopParameter = ref([])
|
|
|
|
|
const commit_uid = localStorage.getItem('central_control_comm_uid')
|
|
|
|
|
|
|
|
|
|
const RiseSetOption = [
|
|
|
|
|
@ -183,6 +203,303 @@ RPC.post('/m9z/getSunRiseSet', { comm_uid: commit_uid }).then(res => {
|
|
|
|
|
formField.value.rise = res.rise
|
|
|
|
|
formField.value.set = res.set
|
|
|
|
|
})
|
|
|
|
|
RPC.post('/m9z/getDeviceTime', { comm_uid: commit_uid }).then(res => {
|
|
|
|
|
deviceTime.value = res.deviceTime
|
|
|
|
|
})
|
|
|
|
|
RPC.post('/m9z/getAllSubLoopParameter', { comm_uid: commit_uid }).then(res => {
|
|
|
|
|
subLoopParameter.value = res
|
|
|
|
|
// subLoopParameter.value = {
|
|
|
|
|
// "subLoopData": [
|
|
|
|
|
// {
|
|
|
|
|
// "DCVoltage": 0.5,
|
|
|
|
|
// "DCCurrent": 0,
|
|
|
|
|
// "DimmingValue": 70,
|
|
|
|
|
// "AlarmStatus": 9,
|
|
|
|
|
// "AlarmCode": "09 01",
|
|
|
|
|
// "RelayStatus": 1,
|
|
|
|
|
// "LoopAddress": "0x1",
|
|
|
|
|
// "SubModuleCount": 1,
|
|
|
|
|
// "Reserved": [
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0
|
|
|
|
|
// ],
|
|
|
|
|
// "Modules": [
|
|
|
|
|
// {
|
|
|
|
|
// "OutputVoltage": 0,
|
|
|
|
|
// "OutputCurrent": 0,
|
|
|
|
|
// "CurrentPWMDuty": 0,
|
|
|
|
|
// "VoltagePWMDuty": 0,
|
|
|
|
|
// "DeviceAddress": "0x0",
|
|
|
|
|
// "ModuleLoopAddress": "0x0",
|
|
|
|
|
// "CurrentLimitPct": 0,
|
|
|
|
|
// "OperatingMode": 0,
|
|
|
|
|
// "ModuleVersion": 0,
|
|
|
|
|
// "RatedVoltageDuty": 0,
|
|
|
|
|
// "RatedCurrentDuty": 0,
|
|
|
|
|
// "RatedOutputVoltage": 0,
|
|
|
|
|
// "RatedOutputCurrent": 0
|
|
|
|
|
// }
|
|
|
|
|
// ]
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// "DCVoltage": 0,
|
|
|
|
|
// "DCCurrent": 0,
|
|
|
|
|
// "DimmingValue": 0,
|
|
|
|
|
// "AlarmStatus": 0,
|
|
|
|
|
// "AlarmCode": "",
|
|
|
|
|
// "RelayStatus": 0,
|
|
|
|
|
// "LoopAddress": "0x1",
|
|
|
|
|
// "SubModuleCount": 0,
|
|
|
|
|
// "Reserved": [
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0
|
|
|
|
|
// ],
|
|
|
|
|
// "Modules": null
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// "DCVoltage": 0,
|
|
|
|
|
// "DCCurrent": 0,
|
|
|
|
|
// "DimmingValue": 0,
|
|
|
|
|
// "AlarmStatus": 0,
|
|
|
|
|
// "AlarmCode": "",
|
|
|
|
|
// "RelayStatus": 0,
|
|
|
|
|
// "LoopAddress": "0x2",
|
|
|
|
|
// "SubModuleCount": 0,
|
|
|
|
|
// "Reserved": [
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0
|
|
|
|
|
// ],
|
|
|
|
|
// "Modules": null
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// "DCVoltage": 0,
|
|
|
|
|
// "DCCurrent": 0,
|
|
|
|
|
// "DimmingValue": 0,
|
|
|
|
|
// "AlarmStatus": 0,
|
|
|
|
|
// "AlarmCode": "00 00",
|
|
|
|
|
// "RelayStatus": 0,
|
|
|
|
|
// "LoopAddress": "0x0",
|
|
|
|
|
// "SubModuleCount": 0,
|
|
|
|
|
// "Reserved": [
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0
|
|
|
|
|
// ],
|
|
|
|
|
// "Modules": []
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// "DCVoltage": 0,
|
|
|
|
|
// "DCCurrent": 0,
|
|
|
|
|
// "DimmingValue": 0,
|
|
|
|
|
// "AlarmStatus": 0,
|
|
|
|
|
// "AlarmCode": "",
|
|
|
|
|
// "RelayStatus": 0,
|
|
|
|
|
// "LoopAddress": "0x4",
|
|
|
|
|
// "SubModuleCount": 0,
|
|
|
|
|
// "Reserved": [
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0
|
|
|
|
|
// ],
|
|
|
|
|
// "Modules": null
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// "DCVoltage": 0,
|
|
|
|
|
// "DCCurrent": 0,
|
|
|
|
|
// "DimmingValue": 0,
|
|
|
|
|
// "AlarmStatus": 0,
|
|
|
|
|
// "AlarmCode": "00 00",
|
|
|
|
|
// "RelayStatus": 0,
|
|
|
|
|
// "LoopAddress": "0x0",
|
|
|
|
|
// "SubModuleCount": 0,
|
|
|
|
|
// "Reserved": [
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0
|
|
|
|
|
// ],
|
|
|
|
|
// "Modules": []
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// "DCVoltage": 0,
|
|
|
|
|
// "DCCurrent": 0,
|
|
|
|
|
// "DimmingValue": 0,
|
|
|
|
|
// "AlarmStatus": 0,
|
|
|
|
|
// "AlarmCode": "00 00",
|
|
|
|
|
// "RelayStatus": 0,
|
|
|
|
|
// "LoopAddress": "0x0",
|
|
|
|
|
// "SubModuleCount": 0,
|
|
|
|
|
// "Reserved": [
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0
|
|
|
|
|
// ],
|
|
|
|
|
// "Modules": []
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// "DCVoltage": 0,
|
|
|
|
|
// "DCCurrent": 0,
|
|
|
|
|
// "DimmingValue": 0,
|
|
|
|
|
// "AlarmStatus": 0,
|
|
|
|
|
// "AlarmCode": "00 00",
|
|
|
|
|
// "RelayStatus": 0,
|
|
|
|
|
// "LoopAddress": "0x0",
|
|
|
|
|
// "SubModuleCount": 0,
|
|
|
|
|
// "Reserved": [
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0
|
|
|
|
|
// ],
|
|
|
|
|
// "Modules": []
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// "DCVoltage": 0,
|
|
|
|
|
// "DCCurrent": 0,
|
|
|
|
|
// "DimmingValue": 0,
|
|
|
|
|
// "AlarmStatus": 0,
|
|
|
|
|
// "AlarmCode": "00 00",
|
|
|
|
|
// "RelayStatus": 0,
|
|
|
|
|
// "LoopAddress": "0x0",
|
|
|
|
|
// "SubModuleCount": 0,
|
|
|
|
|
// "Reserved": [
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0
|
|
|
|
|
// ],
|
|
|
|
|
// "Modules": []
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// "DCVoltage": 0,
|
|
|
|
|
// "DCCurrent": 0,
|
|
|
|
|
// "DimmingValue": 0,
|
|
|
|
|
// "AlarmStatus": 0,
|
|
|
|
|
// "AlarmCode": "00 00",
|
|
|
|
|
// "RelayStatus": 0,
|
|
|
|
|
// "LoopAddress": "0x0",
|
|
|
|
|
// "SubModuleCount": 0,
|
|
|
|
|
// "Reserved": [
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0,
|
|
|
|
|
// 0
|
|
|
|
|
// ],
|
|
|
|
|
// "Modules": []
|
|
|
|
|
// }
|
|
|
|
|
// ],
|
|
|
|
|
// "totalP": 0
|
|
|
|
|
// }
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
const address = ref('')
|
|
|
|
|
RPC.post('/adl400/getMsgAddress', { comm_uid: commit_uid }).then(res => {
|
|
|
|
|
@ -240,14 +557,19 @@ const save = () => {
|
|
|
|
|
"rise": Number(formField.value.rise),
|
|
|
|
|
"set": Number(formField.value.set)
|
|
|
|
|
}
|
|
|
|
|
console.log(params, formField.value)
|
|
|
|
|
// RPC.post('/m9z/setDeviceLgnLatAndSunRsTime', params).then(res => {
|
|
|
|
|
// ElMessage.success('操作成功')
|
|
|
|
|
// })
|
|
|
|
|
Promise.all(RPC.post('/m9z/setDeviceLgnLatAndSunRsTime', params), RPC.post('/m9z/setDeviceTime', { "comm_uid": commit_uid, device_time: deviceTime.value })).then(res => {
|
|
|
|
|
ElMessage.success('操作成功')
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const currentTableData = ref([])
|
|
|
|
|
const currentTitle = ref('')
|
|
|
|
|
const isShowDialog = ref(false)
|
|
|
|
|
const openDialog = item => {
|
|
|
|
|
isShowDialog.value = true
|
|
|
|
|
currentTableData.value = item.Modules
|
|
|
|
|
currentTitle.value = item.LoopAddress
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 返回主界面
|
|
|
|
|
const goBack = () => {
|
|
|
|
|
@ -327,6 +649,7 @@ onUnmounted(() => {
|
|
|
|
|
border: .5px solid #ddd;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
height: 450px;
|
|
|
|
|
|
|
|
|
|
.main_title {
|
|
|
|
|
display: flex;
|
|
|
|
|
@ -351,6 +674,10 @@ onUnmounted(() => {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&.subLoopParame {
|
|
|
|
|
overflow-y: auto;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.key {
|
|
|
|
|
color: #fff;
|
|
|
|
|
margin-right: 10px;
|
|
|
|
|
@ -368,6 +695,22 @@ onUnmounted(() => {
|
|
|
|
|
// border: 1px solid #ccc;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.subLoopParameter_item {
|
|
|
|
|
border-radius: 10px;
|
|
|
|
|
border: 1px solid #fff;
|
|
|
|
|
padding: 15px;
|
|
|
|
|
margin-bottom: 20px;
|
|
|
|
|
|
|
|
|
|
.item {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
|
|
|
|
&:not(:last-child) {
|
|
|
|
|
margin-bottom: 10px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.line {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
@ -403,7 +746,7 @@ onUnmounted(() => {
|
|
|
|
|
margin: 0 10px;
|
|
|
|
|
|
|
|
|
|
&.save {
|
|
|
|
|
background-color: #7fe669;
|
|
|
|
|
background-color: #61c24b;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&.restart {
|
|
|
|
|
|