Commit f32969b6 authored by co_dengxiongwen's avatar co_dengxiongwen

状态调整

parent 086d310a
...@@ -124,7 +124,7 @@ export default { ...@@ -124,7 +124,7 @@ export default {
// label: '室内机风柜' // label: '室内机风柜'
// }, // },
{ {
value: '173466a2cf9a42a6a17b2bdfbeae36d5', value: '8f5530fee2484e8eb107c0ca672132b2',
label: '多联新风室外机' label: '多联新风室外机'
} }
] ]
......
...@@ -11,13 +11,14 @@ ...@@ -11,13 +11,14 @@
}, },
{ {
align: 'center', align: 'center',
prop: 'statusName', prop: 'status',
label: '设备状态' label: '设备状态',
slot: true
}, },
{ {
align: 'center', align: 'center',
prop: 'electric_energy', prop: 'electric_energy',
label: '今日用电量(kwh)' label: '用电量(kwh)'
}, },
// { // {
// align: 'center', // align: 'center',
...@@ -61,8 +62,9 @@ ...@@ -61,8 +62,9 @@
}, },
{ {
align: 'center', align: 'center',
prop: 'statusName', prop: 'status',
label: '设备状态' label: '设备状态',
slot: true
}, },
{ {
align: 'center', align: 'center',
......
...@@ -19,16 +19,31 @@ ...@@ -19,16 +19,31 @@
:showStateColor="true" :showStateColor="true"
:currentMode="currentModel" :currentMode="currentModel"
> >
<template v-slot:operation="scope" v-if="activeTab=='b6af764f2a6e454490a6b1b3c9057e57'||activeTab == '173466a2cf9a42a6a17b2bdfbeae36d5'"> <template
v-slot:operation="scope"
v-if="
activeTab == 'b6af764f2a6e454490a6b1b3c9057e57' ||
activeTab == '173466a2cf9a42a6a17b2bdfbeae36d5'
"
>
<!-- (1运行,2停止,3离线,4故障) --> <!-- (1运行,2停止,3离线,4故障) -->
<el-button v-if='scope.scope.status==2' type="text" @click="statusHandle(scope.scope, 1)" <el-button
v-if="scope.scope.status == 2"
type="text"
@click="statusHandle(scope.scope, 1)"
>开启</el-button >开启</el-button
> >
<el-button v-if='scope.scope.status==1' type="text" @click="statusHandle(scope.scope, 0)" <el-button
v-if="scope.scope.status == 1"
type="text"
@click="statusHandle(scope.scope, 0)"
>关闭</el-button >关闭</el-button
> >
<el-button <el-button
v-if="activeTab != 'b6af764f2a6e454490a6b1b3c9057e57'&&scope.scope.status==1" v-if="
activeTab != 'b6af764f2a6e454490a6b1b3c9057e57' &&
scope.scope.status == 1
"
type="text" type="text"
@click="settingJfkt(scope.scope, 3)" @click="settingJfkt(scope.scope, 3)"
>设置</el-button >设置</el-button
...@@ -38,18 +53,24 @@ ...@@ -38,18 +53,24 @@
<span>--</span> <span>--</span>
</template> </template>
<template #setting_mode='data'> <template #setting_mode="data">
<span v-if="data.scope.setting_mode==0"></span> <span v-if="data.scope.setting_mode == 0"></span>
<span v-if="data.scope.setting_mode==2">制冷模式</span> <span v-if="data.scope.setting_mode == 2">制冷模式</span>
<span v-if="data.scope.setting_mode==4">除湿模式</span> <span v-if="data.scope.setting_mode == 4">除湿模式</span>
<span v-if="data.scope.setting_mode==8">送分模式</span> <span v-if="data.scope.setting_mode == 8">送分模式</span>
<span v-if="data.scope.setting_mode==16">制热模式</span> <span v-if="data.scope.setting_mode == 16">制热模式</span>
</template> </template>
<template #setting_wind_speed='data'> <template #setting_wind_speed="data">
<span v-if="data.scope.setting_wind_speed==0"></span> <span v-if="data.scope.setting_wind_speed == 0"></span>
<span v-if="data.scope.setting_wind_speed==2">高风</span> <span v-if="data.scope.setting_wind_speed == 2">高风</span>
<span v-if="data.scope.setting_wind_speed==4">中风</span> <span v-if="data.scope.setting_wind_speed == 4">中风</span>
<span v-if="data.scope.setting_wind_speed==8">低风</span> <span v-if="data.scope.setting_wind_speed == 8">低风</span>
</template>
<template #status="data">
<span v-if="data.scope.status == 1">运行</span>
<span v-if="data.scope.status == 2">停止</span>
<span v-if="data.scope.status == 3">离线</span>
<span v-if="data.scope.status == 4">故障</span>
</template> </template>
</table-list> </table-list>
<el-dialog <el-dialog
...@@ -90,7 +111,11 @@ ...@@ -90,7 +111,11 @@
</el-row> </el-row>
<el-row> <el-row>
<el-form-item label="选择模式:" prop="xzms"> <el-form-item label="选择模式:" prop="xzms">
<el-select v-model="formData.xzms" placeholder="请选择" size="mini"> <el-select
v-model="formData.xzms"
placeholder="请选择"
size="mini"
>
<el-option <el-option
v-for="item in options1" v-for="item in options1"
:key="item.value" :key="item.value"
...@@ -110,7 +135,11 @@ ...@@ -110,7 +135,11 @@
</el-row> </el-row>
<el-row> <el-row>
<el-form-item label="选择风速:" prop="xzfs"> <el-form-item label="选择风速:" prop="xzfs">
<el-select v-model="formData.xzfs" placeholder="请选择" size="mini"> <el-select
v-model="formData.xzfs"
placeholder="请选择"
size="mini"
>
<el-option <el-option
v-for="item in options2" v-for="item in options2"
:key="item.value" :key="item.value"
...@@ -353,6 +382,7 @@ export default { ...@@ -353,6 +382,7 @@ export default {
this.pfjList.forEach((e) => { this.pfjList.forEach((e) => {
if (this.tableData[i].id === e.resource_id) { if (this.tableData[i].id === e.resource_id) {
this.$set(this.tableData[i], 'electric_energy', e.electric_energy) this.$set(this.tableData[i], 'electric_energy', e.electric_energy)
this.$set(this.tableData[i], 'status', e.status)
} }
}) })
} else if ( } else if (
...@@ -362,6 +392,7 @@ export default { ...@@ -362,6 +392,7 @@ export default {
this.jfktpList.forEach((e) => { this.jfktpList.forEach((e) => {
if (this.tableData[i].id === e.resource_id) { if (this.tableData[i].id === e.resource_id) {
this.$set(this.tableData[i], 'electric_energy', e.electric_energy) this.$set(this.tableData[i], 'electric_energy', e.electric_energy)
this.$set(this.tableData[i], 'status', e.status)
} }
}) })
} else if ( } else if (
...@@ -371,6 +402,7 @@ export default { ...@@ -371,6 +402,7 @@ export default {
this.dlswjList.forEach((e) => { this.dlswjList.forEach((e) => {
if (this.tableData[i].id === e.resource_id) { if (this.tableData[i].id === e.resource_id) {
this.$set(this.tableData[i], 'electric_energy', e.electric_energy) this.$set(this.tableData[i], 'electric_energy', e.electric_energy)
this.$set(this.tableData[i], 'status', e.status)
} }
}) })
} else if ( } else if (
...@@ -390,6 +422,7 @@ export default { ...@@ -390,6 +422,7 @@ export default {
'setting_wind_speed', 'setting_wind_speed',
e.setting_wind_speed e.setting_wind_speed
) )
this.$set(this.tableData[i], 'status', e.status)
} }
}) })
} else if ( } else if (
...@@ -409,6 +442,7 @@ export default { ...@@ -409,6 +442,7 @@ export default {
'setting_wind_speed', 'setting_wind_speed',
e.setting_wind_speed e.setting_wind_speed
) )
this.$set(this.tableData[i], 'status', e.status)
} }
}) })
} }
...@@ -545,7 +579,7 @@ export default { ...@@ -545,7 +579,7 @@ export default {
} }
</script> </script>
<style scoped> <style scoped>
/* /deep/ .el-input__inner{ /* /deep/ .el-input__inner{
height: 28px !important; height: 28px !important;
line-height: 28px !important; line-height: 28px !important;
width: 200px !important; width: 200px !important;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment