|
|
@@ -210,8 +210,8 @@
|
|
|
{{ getConcentratorAttr(props.row.deviceCode, 'deviceModelId', 'Base') || '-' }}
|
|
|
</el-descriptions-item>
|
|
|
<el-descriptions-item label="设备状态">
|
|
|
- <el-tag size="small" :type="getConcentratorAttr(props.row.deviceCode, 'abnormal', 'Base') === '0' ? 'success' : 'danger'">
|
|
|
- {{ getConcentratorAttr(props.row.deviceCode, 'abnormal', 'Base') === '0' ? '正常' : '异常' }}
|
|
|
+ <el-tag size="small" :type="getConcentratorAttr(props.row.deviceCode, 'deviceStatus', 'Base') === '0' ? 'success' : 'danger'">
|
|
|
+ {{ getConcentratorAttr(props.row.deviceCode, 'deviceStatus', 'Base') === '0' ? '正常' : '异常' }}
|
|
|
</el-tag>
|
|
|
</el-descriptions-item>
|
|
|
<el-descriptions-item label="信号强度">
|
|
|
@@ -719,16 +719,16 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="开关状态" width="100" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-tag size="small" :type="getLampGroupAttrValue(scope.row.deviceCode, 'lampOnOff') === '1' ? 'success' : 'info'">
|
|
|
- <i :class="getLampGroupAttrValue(scope.row.deviceCode, 'lampOnOff') === '1' ? 'el-icon-sunny' : 'el-icon-moon'"></i>
|
|
|
- {{ getLampGroupAttrValue(scope.row.deviceCode, 'lampOnOff') === '1' ? '开启' : '关闭' }}
|
|
|
+ <el-tag size="small" :type="getLampGroupAttrValue(scope.row.deviceCode, 'Switch') === '1' ? 'success' : 'info'">
|
|
|
+ <i :class="getLampGroupAttrValue(scope.row.deviceCode, 'Switch') === '1' ? 'el-icon-sunny' : 'el-icon-moon'"></i>
|
|
|
+ {{ getLampGroupAttrValue(scope.row.deviceCode, 'Switch') === '1' ? '开启' : '关闭' }}
|
|
|
</el-tag>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="设备状态" width="100" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-tag size="small" :type="getLampGroupAttrValue(scope.row.deviceCode, 'abnormal') === '0' ? 'success' : 'danger'">
|
|
|
- {{ getLampGroupAttrValue(scope.row.deviceCode, 'abnormal') === '0' ? '正常' : '异常' }}
|
|
|
+ <el-tag size="small" :type="getLampGroupAttrValue(scope.row.deviceCode, 'deviceStatus') === '0' ? 'success' : 'danger'">
|
|
|
+ {{ getLampGroupAttrValue(scope.row.deviceCode, 'deviceStatus') === '0' ? '正常' : '异常' }}
|
|
|
</el-tag>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
@@ -1347,7 +1347,7 @@ export default {
|
|
|
|
|
|
// 获取开关控制按钮的类型(根据当前状态)
|
|
|
getLightControlButtonType(deviceCode, optionValue) {
|
|
|
- const currentState = this.getLampGroupAttrValue(deviceCode, 'lampOnOff')
|
|
|
+ const currentState = this.getLampGroupAttrValue(deviceCode, 'Switch')
|
|
|
|
|
|
// 关灯状态(0):开灯按钮绿色,关灯按钮灰色
|
|
|
// 开灯状态(1):关灯按钮绿色,开灯按钮灰色
|
|
|
@@ -2077,8 +2077,8 @@ export default {
|
|
|
getOnlineLampGroupCount(poleCode) {
|
|
|
const lampGroups = this.getLampGroupList(poleCode)
|
|
|
return lampGroups.filter(lamp => {
|
|
|
- const abnormal = this.getLampGroupAttrValue(lamp.deviceCode, 'abnormal')
|
|
|
- return abnormal === '0'
|
|
|
+ const deviceStatus = this.getLampGroupAttrValue(lamp.deviceCode, 'deviceStatus')
|
|
|
+ return deviceStatus === '0'
|
|
|
}).length
|
|
|
},
|
|
|
|
|
|
@@ -2086,15 +2086,15 @@ export default {
|
|
|
calculateLampGroupStats() {
|
|
|
this.totalLampCount = this.lampGroupList.length
|
|
|
this.onlineLampCount = this.lampGroupList.filter(lamp => {
|
|
|
- const abnormal = this.getLampGroupAttrValue(lamp.deviceCode, 'abnormal')
|
|
|
- return abnormal === '0'
|
|
|
+ const deviceStatus = this.getLampGroupAttrValue(lamp.deviceCode, 'deviceStatus')
|
|
|
+ return deviceStatus === '0'
|
|
|
}).length
|
|
|
|
|
|
// 统计开启的灯组和总功率
|
|
|
let onCount = 0
|
|
|
let totalPower = 0
|
|
|
this.lampGroupList.forEach(lamp => {
|
|
|
- const lampOnOff = this.getLampGroupAttrValue(lamp.deviceCode, 'lampOnOff')
|
|
|
+ const lampOnOff = this.getLampGroupAttrValue(lamp.deviceCode, 'Switch')
|
|
|
if (lampOnOff === '1') {
|
|
|
onCount++
|
|
|
const power = parseFloat(this.getLampGroupAttrValue(lamp.deviceCode, 'power')) || 0
|