pcs开关机状态判断更新
This commit is contained in:
@ -1,206 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-loading="loading" class="ems">
|
<div v-loading="loading" class="ems">
|
||||||
<!-- <div-->
|
|
||||||
<!-- v-for="(item, index) in list"-->
|
|
||||||
<!-- :key="index + 'PcsHome'"-->
|
|
||||||
<!-- style="margin-bottom: 25px"-->
|
|
||||||
<!-- >-->
|
|
||||||
<!-- <el-card-->
|
|
||||||
<!-- :class="{-->
|
|
||||||
<!-- 'warning-card-container': item.workStatus === '1',-->
|
|
||||||
<!-- 'timing-card-container': item.workStatus === '2',-->
|
|
||||||
<!-- 'running-card-container': !['1', '2'].includes(item.workStatus),-->
|
|
||||||
<!-- }"-->
|
|
||||||
<!-- class="sbjk-card-container common-card-container-body-no-padding common-card-container-no-title-bg"-->
|
|
||||||
<!-- shadow="always"-->
|
|
||||||
<!-- >-->
|
|
||||||
<!-- <!– 标题–>-->
|
|
||||||
<!-- <div slot="header">-->
|
|
||||||
<!-- <span class="large-title"-->
|
|
||||||
<!-- >{{ item.deviceName }}</span-->
|
|
||||||
<!-- >-->
|
|
||||||
<!-- <div class="info">-->
|
|
||||||
<!-- <div>-->
|
|
||||||
<!-- {{-->
|
|
||||||
<!-- $store.state.ems.workStatusOptions[item.workStatus]-->
|
|
||||||
<!-- }}-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!-- <div>数据更新时间:{{ item.dataUpdateTime }}</div>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!-- <div class="alarm">-->
|
|
||||||
<!-- <el-button type="primary" size="small" style="margin-right:20px;" @click="pointDetail(item,'point')">-->
|
|
||||||
<!-- 详细-->
|
|
||||||
<!-- </el-button>-->
|
|
||||||
<!-- <el-badge :value="item.alarmNum || 0" class="item">-->
|
|
||||||
<!-- <i-->
|
|
||||||
<!-- class="el-icon-message-solid alarm-icon"-->
|
|
||||||
<!-- @click="pointDetail(item,'alarmPoint')"-->
|
|
||||||
<!-- ></i>-->
|
|
||||||
<!-- </el-badge>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!-- <!– 工作状态–>-->
|
|
||||||
<!-- <div class="descriptions-main">-->
|
|
||||||
<!-- <el-descriptions :colon="false" :column="5" direction="vertical">-->
|
|
||||||
<!-- <el-descriptions-item-->
|
|
||||||
<!-- :contentClassName="`descriptions-direction ${-->
|
|
||||||
<!-- item.workStatus === '0' ? 'save' : 'danger'-->
|
|
||||||
<!-- }`"-->
|
|
||||||
<!-- :span="1"-->
|
|
||||||
<!-- label="工作状态"-->
|
|
||||||
<!-- labelClassName="descriptions-label"-->
|
|
||||||
<!-- >{{-->
|
|
||||||
<!-- $store.state.ems.workStatusOptions[item.workStatus]-->
|
|
||||||
<!-- }}-->
|
|
||||||
<!-- </el-descriptions-item-->
|
|
||||||
<!-- >-->
|
|
||||||
<!-- <el-descriptions-item-->
|
|
||||||
<!-- :span="1"-->
|
|
||||||
<!-- contentClassName="descriptions-direction"-->
|
|
||||||
<!-- label="工作模式"-->
|
|
||||||
<!-- labelClassName="descriptions-label"-->
|
|
||||||
<!-- >-->
|
|
||||||
<!-- todo 手动/自动-->
|
|
||||||
<!-- {{-->
|
|
||||||
<!-- $store.state.ems.gridStatusOptions[item.gridStatus]-->
|
|
||||||
<!-- }}-->
|
|
||||||
|
|
||||||
<!-- </el-descriptions-item-->
|
|
||||||
<!-- >-->
|
|
||||||
<!-- <el-descriptions-item-->
|
|
||||||
<!-- :span="1"-->
|
|
||||||
<!-- contentClassName="descriptions-direction"-->
|
|
||||||
<!-- label="并网状态"-->
|
|
||||||
<!-- labelClassName="descriptions-label"-->
|
|
||||||
<!-- >{{-->
|
|
||||||
<!-- $store.state.ems.gridStatusOptions[item.gridStatus]-->
|
|
||||||
<!-- }}-->
|
|
||||||
<!-- </el-descriptions-item-->
|
|
||||||
<!-- >-->
|
|
||||||
<!-- <el-descriptions-item-->
|
|
||||||
<!-- :span="1"-->
|
|
||||||
<!-- contentClassName="descriptions-direction"-->
|
|
||||||
<!-- label="告警状态"-->
|
|
||||||
<!-- labelClassName="descriptions-label"-->
|
|
||||||
<!-- >-->
|
|
||||||
<!-- todo-->
|
|
||||||
<!-- <!–-->
|
|
||||||
<!-- {{-->
|
|
||||||
<!-- $store.state.ems.warnOptions[item.warnMode]-->
|
|
||||||
<!-- }}–>-->
|
|
||||||
<!-- </el-descriptions-item-->
|
|
||||||
<!-- >-->
|
|
||||||
<!-- <el-descriptions-item-->
|
|
||||||
<!-- :contentClassName="`descriptions-direction ${-->
|
|
||||||
<!-- item.deviceStatus === '2' ? 'save' : 'danger'-->
|
|
||||||
<!-- }`"-->
|
|
||||||
<!-- :span="1"-->
|
|
||||||
<!-- label="设备状态"-->
|
|
||||||
<!-- labelClassName="descriptions-label"-->
|
|
||||||
<!-- >{{-->
|
|
||||||
<!-- $store.state.ems.deviceStatusOptions[item.deviceStatus]-->
|
|
||||||
<!-- }}-->
|
|
||||||
<!-- </el-descriptions-item-->
|
|
||||||
<!-- >-->
|
|
||||||
<!-- </el-descriptions>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!-- <!– 用电量–>-->
|
|
||||||
<!-- <div class="descriptions-main descriptions-main-bg-color">-->
|
|
||||||
<!-- <el-descriptions :colon="false" :column="5" direction="vertical">-->
|
|
||||||
<!-- <el-descriptions-item-->
|
|
||||||
<!-- :span="5"-->
|
|
||||||
<!-- contentClassName="descriptions-direction"-->
|
|
||||||
<!-- label="当日用电量:"-->
|
|
||||||
<!-- labelClassName="descriptions-label"-->
|
|
||||||
<!-- >-->
|
|
||||||
<!-- </el-descriptions-item-->
|
|
||||||
<!-- >-->
|
|
||||||
<!-- <el-descriptions-item-->
|
|
||||||
<!-- :span="1"-->
|
|
||||||
<!-- contentClassName="descriptions-direction"-->
|
|
||||||
<!-- label="电网用电量"-->
|
|
||||||
<!-- labelClassName="descriptions-label"-->
|
|
||||||
<!-- >-->
|
|
||||||
<!-- </el-descriptions-item-->
|
|
||||||
<!-- >-->
|
|
||||||
<!-- <el-descriptions-item-->
|
|
||||||
<!-- :span="1"-->
|
|
||||||
<!-- contentClassName="descriptions-direction"-->
|
|
||||||
<!-- label="储能放电量"-->
|
|
||||||
<!-- labelClassName="descriptions-label"-->
|
|
||||||
<!-- >-->
|
|
||||||
<!-- </el-descriptions-item-->
|
|
||||||
<!-- >-->
|
|
||||||
<!-- <el-descriptions-item-->
|
|
||||||
<!-- :span="1"-->
|
|
||||||
<!-- contentClassName="descriptions-direction"-->
|
|
||||||
<!-- label="储能充电量"-->
|
|
||||||
<!-- labelClassName="descriptions-label"-->
|
|
||||||
<!-- >-->
|
|
||||||
<!-- </el-descriptions-item-->
|
|
||||||
<!-- >-->
|
|
||||||
|
|
||||||
<!-- <el-descriptions-item-->
|
|
||||||
<!-- :span="1"-->
|
|
||||||
<!-- contentClassName="descriptions-direction"-->
|
|
||||||
<!-- label="负荷用电量"-->
|
|
||||||
<!-- labelClassName="descriptions-label"-->
|
|
||||||
<!-- >-->
|
|
||||||
<!-- </el-descriptions-item-->
|
|
||||||
<!-- >-->
|
|
||||||
<!-- <el-descriptions-item-->
|
|
||||||
<!-- :span="1"-->
|
|
||||||
<!-- contentClassName="descriptions-direction"-->
|
|
||||||
<!-- label="光伏发电量"-->
|
|
||||||
<!-- labelClassName="descriptions-label"-->
|
|
||||||
<!-- >-->
|
|
||||||
<!-- </el-descriptions-item-->
|
|
||||||
<!-- >-->
|
|
||||||
<!-- </el-descriptions>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!-- <!– 表格–>-->
|
|
||||||
<!-- <el-table-->
|
|
||||||
<!-- class="common-table"-->
|
|
||||||
<!-- stripe-->
|
|
||||||
<!-- style="width: 100%;margin-top:25px;">-->
|
|
||||||
<!-- <el-table-column-->
|
|
||||||
<!-- label="功率"-->
|
|
||||||
<!-- prop="type">-->
|
|
||||||
<!-- </el-table-column>-->
|
|
||||||
<!-- <el-table-column-->
|
|
||||||
<!-- label="电网"-->
|
|
||||||
<!-- >-->
|
|
||||||
<!-- <template slot-scope="scope">-->
|
|
||||||
<!-- <span class="pointer"-->
|
|
||||||
<!-- @click="showChart('簇电压',scope.row.clusterId)">{{ scope.row.clusterVoltage }} V</span>-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- </el-table-column>-->
|
|
||||||
<!-- <el-table-column-->
|
|
||||||
<!-- label="储能">-->
|
|
||||||
<!-- <template slot-scope="scope">-->
|
|
||||||
<!-- <span class="pointer"-->
|
|
||||||
<!-- @click="showChart('簇电流',scope.row.clusterId)">{{ scope.row.clusterCurrent }} A</span>-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- </el-table-column>-->
|
|
||||||
<!-- <el-table-column-->
|
|
||||||
<!-- label="负荷">-->
|
|
||||||
<!-- <template slot-scope="scope">-->
|
|
||||||
<!-- <span class="pointer"-->
|
|
||||||
<!-- @click="showChart('簇电流',scope.row.clusterId)">{{ scope.row.clusterCurrent }} A</span>-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- </el-table-column>-->
|
|
||||||
<!-- <el-table-column-->
|
|
||||||
<!-- label="光伏">-->
|
|
||||||
<!-- <template slot-scope="scope">-->
|
|
||||||
<!-- <span class="pointer"-->
|
|
||||||
<!-- @click="showChart('当前SOC',scope.row.clusterId)">{{ scope.row.currentSoc }} %</span>-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- </el-table-column>-->
|
|
||||||
<!-- </el-table>-->
|
|
||||||
<!-- <!– 图表–>-->
|
|
||||||
<!-- <div id="emsChart" style="height: 350px"></div>-->
|
|
||||||
<!-- </el-card>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<el-card
|
<el-card
|
||||||
v-for="(item,index) in list"
|
v-for="(item,index) in list"
|
||||||
:key="index+'emsList'"
|
:key="index+'emsList'"
|
||||||
|
|||||||
@ -40,14 +40,18 @@ export default {
|
|||||||
required: true
|
required: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
runningStatusMap: ['0', '3', '4', '6']
|
||||||
|
}
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
label() {
|
label() {
|
||||||
return this.data.workStatus === '0' ? '关机' : '开机'
|
return this.runningStatusMap.includes(this.data.workStatus) ? '关机' : '开机'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
switchStatus() {
|
switchStatus() {
|
||||||
console.log(this.data, 11111111)
|
|
||||||
const {workStatus, deviceId, deviceName, siteId} = this.data
|
const {workStatus, deviceId, deviceName, siteId} = this.data
|
||||||
this.$confirm(`确认要${this.label}设备${deviceName || ''}吗?`, {
|
this.$confirm(`确认要${this.label}设备${deviceName || ''}吗?`, {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
@ -61,7 +65,7 @@ export default {
|
|||||||
//做开关机操作,更新成功后刷新表格
|
//做开关机操作,更新成功后刷新表格
|
||||||
updateDeviceStatus({
|
updateDeviceStatus({
|
||||||
siteId,
|
siteId,
|
||||||
workStatus: workStatus === '0' ? "1" : '0',
|
workStatus: this.runningStatusMap.includes(workStatus) ? "1" : '0',
|
||||||
deviceId
|
deviceId
|
||||||
})
|
})
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user