workStatus、deviceStatus枚举更新,pcs开关机接口参数更新
This commit is contained in:
@ -5,8 +5,8 @@ const ems = {
|
|||||||
dzjkAlarmLighting: false,//单站监控 告警统计红点标志
|
dzjkAlarmLighting: false,//单站监控 告警统计红点标志
|
||||||
zdList: [],
|
zdList: [],
|
||||||
zdDeviceCategoryOptions: {},//站点各个站点包含的设备种类 {021_DDS_01:["BATTERY","CLUSTER","STACK", "DH", "AMMETER", "PCS", "XF"],021_DDS_02:[]...}
|
zdDeviceCategoryOptions: {},//站点各个站点包含的设备种类 {021_DDS_01:["BATTERY","CLUSTER","STACK", "DH", "AMMETER", "PCS", "XF"],021_DDS_02:[]...}
|
||||||
workStatusOptions: {'0': '正常', '1': '异常', '2': '停止'},//工作状态
|
workStatusOptions: {'0': '运行', '1': '停机', '2': '故障'},//工作状态
|
||||||
deviceStatusOptions: {'0': '离线', '1': '待机', '2': '运行', '3': '故障', '4': '停机'},//设备状态
|
deviceStatusOptions: {'0': '离线', '1': '在线'},//设备状态
|
||||||
gridStatusOptions: {'0': '并网', '1': '未并网'},//并网状态
|
gridStatusOptions: {'0': '并网', '1': '未并网'},//并网状态
|
||||||
controlModeOptions: {'0': '远程', '1': '本地'},//控制模式
|
controlModeOptions: {'0': '远程', '1': '本地'},//控制模式
|
||||||
warnOptions: {0: '正常', 1: '中断', 2: '不在线', 3: '异常'},//告警状态
|
warnOptions: {0: '正常', 1: '中断', 2: '不在线', 3: '异常'},//告警状态
|
||||||
|
|||||||
@ -9,8 +9,8 @@
|
|||||||
>
|
>
|
||||||
<el-card
|
<el-card
|
||||||
:class="{
|
:class="{
|
||||||
'warning-card-container': pcsItem.workStatus === '1',
|
'warning-card-container': pcsItem.workStatus === '2',
|
||||||
'timing-card-container': pcsItem.workStatus === '2',
|
'timing-card-container': pcsItem.workStatus === '1',
|
||||||
'running-card-container': !['1', '2'].includes(pcsItem.workStatus),
|
'running-card-container': !['1', '2'].includes(pcsItem.workStatus),
|
||||||
}"
|
}"
|
||||||
class="sbjk-card-container common-card-container-body-no-padding common-card-container-no-title-bg"
|
class="sbjk-card-container common-card-container-body-no-padding common-card-container-no-title-bg"
|
||||||
@ -75,7 +75,7 @@
|
|||||||
>
|
>
|
||||||
<el-descriptions-item
|
<el-descriptions-item
|
||||||
:contentClassName="`descriptions-direction ${
|
:contentClassName="`descriptions-direction ${
|
||||||
pcsItem.deviceStatus === '2' ? 'save' : 'danger'
|
pcsItem.deviceStatus === '1' ? 'save' : 'danger'
|
||||||
}`"
|
}`"
|
||||||
:span="1"
|
:span="1"
|
||||||
label="设备状态"
|
label="设备状态"
|
||||||
|
|||||||
@ -34,7 +34,7 @@
|
|||||||
<div
|
<div
|
||||||
class="status"
|
class="status"
|
||||||
:class="
|
:class="
|
||||||
item.deviceStatus === '2' ? 'status-running' : ''
|
item.deviceStatus === '1' ? 'status-running' : ''
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
{{ deviceStatusOptions[item.deviceStatus] }}
|
{{ deviceStatusOptions[item.deviceStatus] }}
|
||||||
@ -68,7 +68,7 @@
|
|||||||
<div
|
<div
|
||||||
class="status"
|
class="status"
|
||||||
:class="
|
:class="
|
||||||
item.deviceStatus === '2' ? 'status-running' : ''
|
item.deviceStatus === '1' ? 'status-running' : ''
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
{{ deviceStatusOptions[item.deviceStatus] }}
|
{{ deviceStatusOptions[item.deviceStatus] }}
|
||||||
@ -107,7 +107,7 @@
|
|||||||
<div
|
<div
|
||||||
class="status"
|
class="status"
|
||||||
:class="
|
:class="
|
||||||
item.deviceStatus === '2' ? 'status-running' : ''
|
item.deviceStatus === '1' ? 'status-running' : ''
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
{{ deviceStatusOptions[item.deviceStatus] }}
|
{{ deviceStatusOptions[item.deviceStatus] }}
|
||||||
@ -150,7 +150,7 @@
|
|||||||
<div
|
<div
|
||||||
class="status"
|
class="status"
|
||||||
:class="
|
:class="
|
||||||
item.deviceStatus === '2' ? 'status-running' : ''
|
item.deviceStatus === '1' ? 'status-running' : ''
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
{{ deviceStatusOptions[item.deviceStatus] }}
|
{{ deviceStatusOptions[item.deviceStatus] }}
|
||||||
@ -171,7 +171,7 @@
|
|||||||
<div
|
<div
|
||||||
class="status"
|
class="status"
|
||||||
:class="
|
:class="
|
||||||
item.children[0].deviceStatus === '2'
|
item.children[0].deviceStatus === '1'
|
||||||
? 'status-running'
|
? 'status-running'
|
||||||
: ''
|
: ''
|
||||||
"
|
"
|
||||||
|
|||||||
@ -32,7 +32,7 @@ export default {
|
|||||||
type: Object,
|
type: Object,
|
||||||
default: () => {
|
default: () => {
|
||||||
return {
|
return {
|
||||||
deviceStatus: null,
|
workStatus: null,
|
||||||
deviceId: null,
|
deviceId: null,
|
||||||
deviceName: null,
|
deviceName: null,
|
||||||
}
|
}
|
||||||
@ -42,13 +42,13 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
label() {
|
label() {
|
||||||
return this.data.deviceStatus === '4' ? '开机' : '关机'
|
return this.data.workStatus === '0' ? '关机' : '开机'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
switchStatus() {
|
switchStatus() {
|
||||||
console.log(this.data, 11111111)
|
console.log(this.data, 11111111)
|
||||||
const {deviceStatus, deviceId, deviceName, siteId} = this.data
|
const {workStatus, deviceId, deviceName, siteId} = this.data
|
||||||
this.$confirm(`确认要${this.label}设备${deviceName || ''}吗?`, {
|
this.$confirm(`确认要${this.label}设备${deviceName || ''}吗?`, {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
@ -61,7 +61,7 @@ export default {
|
|||||||
//做开关机操作,更新成功后刷新表格
|
//做开关机操作,更新成功后刷新表格
|
||||||
updateDeviceStatus({
|
updateDeviceStatus({
|
||||||
siteId,
|
siteId,
|
||||||
deviceStatus,
|
workStatus: workStatus === '0' ? "1" : '0',
|
||||||
deviceId
|
deviceId
|
||||||
})
|
})
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user