|
|
@@ -162,7 +162,7 @@
|
|
|
class="protection-device-table">
|
|
|
<el-table-column type="expand">
|
|
|
<template slot-scope="props">
|
|
|
- <div class="device-detail">
|
|
|
+ <div class="device-detail" @click.stop>
|
|
|
<el-tabs v-model="props.row.detailTab">
|
|
|
<!-- 设备属性(合并基础属性和电力属性) -->
|
|
|
<el-tab-pane label="设备属性" name="deviceAttrs">
|
|
|
@@ -307,7 +307,7 @@
|
|
|
class="sub-device-table">
|
|
|
<el-table-column type="expand">
|
|
|
<template slot-scope="subProps">
|
|
|
- <div class="sub-device-detail">
|
|
|
+ <div class="sub-device-detail" @click.stop>
|
|
|
<el-tabs v-model="subProps.row.detailTab || 'deviceAttrs'">
|
|
|
<!-- 设备属性(合并测点基础属性和电力属性) -->
|
|
|
<el-tab-pane label="设备属性" name="deviceAttrs">
|
|
|
@@ -508,7 +508,7 @@
|
|
|
trigger="click"
|
|
|
@command="handleSubDeviceCommand"
|
|
|
@visible-change="(visible) => handleAbilityLoad(visible, scope.row)">
|
|
|
- <el-button type="text" size="mini">
|
|
|
+ <el-button type="text" size="mini" @click.stop>
|
|
|
操作<i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
</el-button>
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
@@ -583,7 +583,7 @@
|
|
|
trigger="click"
|
|
|
@command="handleDeviceCommand"
|
|
|
@visible-change="(visible) => handleAbilityLoad(visible, scope.row)">
|
|
|
- <el-button type="text" size="mini">
|
|
|
+ <el-button type="text" size="mini" @click.stop>
|
|
|
操作<i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
</el-button>
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
@@ -744,8 +744,8 @@
|
|
|
class="meter-device-table">
|
|
|
<el-table-column type="expand">
|
|
|
<template slot-scope="props">
|
|
|
- <div class="device-detail">
|
|
|
- <el-tabs v-model="props.row.detailTab || 'deviceAttrs'">
|
|
|
+ <div class="device-detail" @click.stop>
|
|
|
+ <el-tabs v-model="props.row.detailTab">
|
|
|
<!-- 设备属性(合并基础属性和电力属性) -->
|
|
|
<el-tab-pane label="设备属性" name="deviceAttrs">
|
|
|
<div class="merged-attrs-container">
|
|
|
@@ -950,7 +950,7 @@
|
|
|
</div>
|
|
|
<el-tooltip :content="getUpdateTimeTooltip(props.row.deviceCode, 'P')" placement="top">
|
|
|
<div class="param-value">
|
|
|
- <span class="value">{{ getDeviceAttr(props.row.deviceCode, 'P') || '0.0' }}</span>
|
|
|
+ <span class="value">{{ getDeviceAttr(props.row.deviceCode, 'power') || '0.0' }}</span>
|
|
|
<span class="unit">kW</span>
|
|
|
<span class="update-indicator" :class="getUpdateStatusClass(props.row.deviceCode, 'P')"></span>
|
|
|
</div>
|
|
|
@@ -1180,8 +1180,8 @@
|
|
|
class="sub-device-table">
|
|
|
<el-table-column type="expand">
|
|
|
<template slot-scope="subProps">
|
|
|
- <div class="sub-device-detail">
|
|
|
- <el-tabs v-model="subProps.row.detailTab || 'deviceAttrs'">
|
|
|
+ <div class="sub-device-detail" @click.stop>
|
|
|
+ <el-tabs v-model="subProps.row.detailTab">
|
|
|
<!-- 设备属性(合并测点基础属性和电力属性) -->
|
|
|
<el-tab-pane label="设备属性" name="deviceAttrs">
|
|
|
<div class="merged-attrs-container">
|
|
|
@@ -1440,7 +1440,7 @@
|
|
|
</div>
|
|
|
<el-tooltip :content="getUpdateTimeTooltip(subProps.row.deviceCode, 'P')" placement="top">
|
|
|
<div class="param-value">
|
|
|
- <span class="value">{{ getDeviceAttr(subProps.row.deviceCode, 'P') || '0.0' }}</span>
|
|
|
+ <span class="value">{{ getDeviceAttr(subProps.row.deviceCode, 'power') || '0.0' }}</span>
|
|
|
<span class="unit">kW</span>
|
|
|
<span class="update-indicator" :class="getUpdateStatusClass(subProps.row.deviceCode, 'P')"></span>
|
|
|
</div>
|
|
|
@@ -1781,7 +1781,7 @@
|
|
|
trigger="click"
|
|
|
@command="handleSubDeviceCommand"
|
|
|
@visible-change="(visible) => handleAbilityLoad(visible, scope.row)">
|
|
|
- <el-button type="text" size="mini">
|
|
|
+ <el-button type="text" size="mini" @click.stop>
|
|
|
操作<i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
</el-button>
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
@@ -1917,7 +1917,7 @@
|
|
|
trigger="click"
|
|
|
@command="handleDeviceCommand"
|
|
|
@visible-change="(visible) => handleAbilityLoad(visible, scope.row)">
|
|
|
- <el-button type="text" size="mini">
|
|
|
+ <el-button type="text" size="mini" @click.stop>
|
|
|
操作<i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
</el-button>
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
@@ -2709,31 +2709,27 @@ export default {
|
|
|
let totalReactivePower = 0
|
|
|
let totalApparentPower = 0
|
|
|
|
|
|
- // 遍历每个智能电表主节点
|
|
|
this.smartMeterDeviceList.forEach(device => {
|
|
|
- // 获取该主节点下的所有子节点
|
|
|
const subDevices = this.getSubDevices(device.deviceCode)
|
|
|
|
|
|
if (subDevices && subDevices.length > 0) {
|
|
|
- // 如果有子节点,累加子节点的功率
|
|
|
subDevices.forEach(subDevice => {
|
|
|
- const Pt = parseFloat(this.getDeviceAttr(subDevice.deviceCode, 'Pt')) || 0
|
|
|
- const Qt = parseFloat(this.getDeviceAttr(subDevice.deviceCode, 'Qt')) || 0
|
|
|
- const St = parseFloat(this.getDeviceAttr(subDevice.deviceCode, 'St')) || 0
|
|
|
+ const power = parseFloat(this.getDeviceAttr(subDevice.deviceCode, 'power')) || 0
|
|
|
+ const Q = parseFloat(this.getDeviceAttr(subDevice.deviceCode, 'Q')) || 0
|
|
|
+ const S = parseFloat(this.getDeviceAttr(subDevice.deviceCode, 'S')) || 0
|
|
|
|
|
|
- totalActivePower += Pt
|
|
|
- totalReactivePower += Qt
|
|
|
- totalApparentPower += St
|
|
|
+ totalActivePower += power
|
|
|
+ totalReactivePower += Q
|
|
|
+ totalApparentPower += S
|
|
|
})
|
|
|
} else {
|
|
|
- // 如果没有子节点,使用主节点的功率(兼容没有子节点的情况)
|
|
|
- const Pt = parseFloat(this.getDeviceAttr(device.deviceCode, 'Pt')) || 0
|
|
|
- const Qt = parseFloat(this.getDeviceAttr(device.deviceCode, 'Qt')) || 0
|
|
|
- const St = parseFloat(this.getDeviceAttr(device.deviceCode, 'St')) || 0
|
|
|
-
|
|
|
- totalActivePower += Pt
|
|
|
- totalReactivePower += Qt
|
|
|
- totalApparentPower += St
|
|
|
+ const power = parseFloat(this.getDeviceAttr(device.deviceCode, 'power')) || 0
|
|
|
+ const Q = parseFloat(this.getDeviceAttr(device.deviceCode, 'Q')) || 0
|
|
|
+ const S = parseFloat(this.getDeviceAttr(device.deviceCode, 'S')) || 0
|
|
|
+
|
|
|
+ totalActivePower += power
|
|
|
+ totalReactivePower += Q
|
|
|
+ totalApparentPower += S
|
|
|
}
|
|
|
})
|
|
|
|
|
|
@@ -3024,15 +3020,42 @@ export default {
|
|
|
// ==================== 表格行点击 ====================
|
|
|
|
|
|
// 保护装置设备行点击
|
|
|
- handleProtectionDeviceClick(row) {
|
|
|
+ handleProtectionDeviceClick(row, column, event) {
|
|
|
+ // 如果点击的是展开列本身(箭头),让默认行为处理
|
|
|
+ if (column && column.type === 'expand') {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ // 手动切换展开状态
|
|
|
this.$refs.protectionTable?.toggleRowExpansion(row)
|
|
|
},
|
|
|
|
|
|
// 智能电表设备行点击
|
|
|
- handleMeterDeviceClick(row) {
|
|
|
+ handleMeterDeviceClick(row, column, event) {
|
|
|
+ // 如果点击的是展开列本身(箭头),让默认行为处理
|
|
|
+ if (column && column.type === 'expand') {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ // 手动切换展开状态
|
|
|
this.$refs.meterTable?.toggleRowExpansion(row)
|
|
|
},
|
|
|
|
|
|
+ handleSubDeviceRowClick(row, column, event) {
|
|
|
+ // 如果点击的是展开列本身(箭头),让默认行为处理
|
|
|
+ if (column && column.type === 'expand') {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ // 子表格没有ref,这里不做额外处理,由 @click.stop 阻止冒泡
|
|
|
+ },
|
|
|
+
|
|
|
+ // 处理智能电表子设备行点击 ★★★
|
|
|
+ handleMeterSubDeviceRowClick(row, column, event) {
|
|
|
+ // 如果点击的是展开列本身(箭头),让默认行为处理
|
|
|
+ if (column && column.type === 'expand') {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ // 子表格没有ref,这里不做额外处理,由 @click.stop 阻止冒泡
|
|
|
+ },
|
|
|
+
|
|
|
// ==================== 日志查询 ====================
|
|
|
|
|
|
// 标签页切换
|
|
|
@@ -3936,4 +3959,62 @@ pre {
|
|
|
white-space: pre-line;
|
|
|
max-width: 200px;
|
|
|
}
|
|
|
+
|
|
|
+.device-detail {
|
|
|
+ padding: 20px;
|
|
|
+ background: #f9fafc;
|
|
|
+ border-radius: 4px;
|
|
|
+
|
|
|
+ /* Tab样式优化 */
|
|
|
+ ::v-deep .el-tabs__header {
|
|
|
+ margin-bottom: 15px;
|
|
|
+ background: #fff;
|
|
|
+ padding: 0 15px;
|
|
|
+ border-radius: 4px;
|
|
|
+ border: 1px solid #e4e7ed;
|
|
|
+ }
|
|
|
+
|
|
|
+ ::v-deep .el-tabs__nav-wrap::after {
|
|
|
+ height: 1px;
|
|
|
+ background-color: #e4e7ed;
|
|
|
+ }
|
|
|
+
|
|
|
+ ::v-deep .el-tabs__item {
|
|
|
+ height: 40px;
|
|
|
+ line-height: 40px;
|
|
|
+ font-size: 14px;
|
|
|
+
|
|
|
+ &.is-active {
|
|
|
+ color: #409EFF;
|
|
|
+ font-weight: 600;
|
|
|
+ }
|
|
|
+
|
|
|
+ &:hover {
|
|
|
+ color: #409EFF;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ ::v-deep .el-tabs__active-bar {
|
|
|
+ background-color: #409EFF;
|
|
|
+ }
|
|
|
+
|
|
|
+ ::v-deep .el-tabs__content {
|
|
|
+ padding: 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ /* 描述列表样式 */
|
|
|
+ ::v-deep .el-descriptions {
|
|
|
+ .el-descriptions__label {
|
|
|
+ background: #fafafa;
|
|
|
+ color: #606266;
|
|
|
+ font-weight: 500;
|
|
|
+ width: 120px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .el-descriptions__content {
|
|
|
+ background: #fff;
|
|
|
+ color: #303133;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|