Commit 48634421 authored by dxw's avatar dxw

热泵、水泵

parent 8f5c3dcb
...@@ -115,10 +115,14 @@ export default { ...@@ -115,10 +115,14 @@ export default {
value: 'ece0b8b2db27411886254e81134988a3', value: 'ece0b8b2db27411886254e81134988a3',
label: '空调' label: '空调'
}, },
// { {
// value: 'b45827c068254695864ee3c1d42573cb', value: 'b45827c068254695864ee3c1d42573cb',
// label: '风冷热泵机组' label: '风冷热泵机组'
// }, },
{
value: 'f4c840711eae4bcb9536a890cdfda493',
label: '水泵'
},
// { // {
// value: '303310efddb34a2e9bf269bdff8a7dc5', // value: '303310efddb34a2e9bf269bdff8a7dc5',
// label: '室内机风柜' // label: '室内机风柜'
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
align: 'center', align: 'center',
prop: 'name', prop: 'name',
label: '设备名称', label: '设备名称',
width: 180 width: 210
}, },
{ {
align: 'center', align: 'center',
...@@ -18,12 +18,12 @@ ...@@ -18,12 +18,12 @@
}, },
{ {
align: 'center', align: 'center',
prop: 'feng_shui_mode', prop: 'feng_shui_mode_n',
label: '风水模式' label: '风水模式'
}, },
{ {
align: 'center', align: 'center',
prop: 'hot_water_mode', prop: 'hot_water_mode_n',
label: '热水模式' label: '热水模式'
}, },
{ {
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
{ {
align: 'center', align: 'center',
prop: 'electric_energy', prop: 'electric_energy',
label: '今日用电量(kwh)', label: '用电量(kwh)',
width: 120 width: 120
}, },
{ {
...@@ -106,7 +106,12 @@ ...@@ -106,7 +106,12 @@
{ {
align: 'center', align: 'center',
prop: 'current_frequency', prop: 'current_frequency',
label: '当前频率' label: '运转频率'
},
{
align: 'center',
prop: 'set_frequency',
label: '设定频率'
}, },
{ {
align: 'center', align: 'center',
...@@ -118,11 +123,6 @@ ...@@ -118,11 +123,6 @@
prop: 'electric_energy', prop: 'electric_energy',
label: '用电量(kwh)' label: '用电量(kwh)'
}, },
// {
// align: 'center',
// prop: 'F',
// label: '本月用电量'
// },
{ {
align: 'center', align: 'center',
prop: 'code', prop: 'code',
...@@ -144,7 +144,12 @@ ...@@ -144,7 +144,12 @@
{ {
align: 'center', align: 'center',
prop: 'current_frequency', prop: 'current_frequency',
label: '当前频率' label: '运转频率'
},
{
align: 'center',
prop: 'set_frequency',
label: '设定频率'
}, },
{ {
align: 'center', align: 'center',
......
...@@ -152,32 +152,30 @@ ...@@ -152,32 +152,30 @@
:showStateColor="true" :showStateColor="true"
:currentMode="currentModel" :currentMode="currentModel"
> >
<!-- (1运行,2停止,3离线,4故障) -->
<template v-slot:operation="scope"> <template v-slot:operation="scope">
<el-button disabled <el-button
type="text" type="text"
v-if="activeTab != 'c788ce98c1f248f590434394da485ce4'" v-if="activeTab != 'c788ce98c1f248f590434394da485ce4' && activeTab != '49f5921a6d7f43cfa222c09f0223ae04' && scope.scope.status == 2"
@click="statusHandle" @click="statusHandle(scope.scope, 1)"
>开启</el-button >开启</el-button
> >
<el-button disabled <el-button
type="text" type="text"
v-if="activeTab != 'c788ce98c1f248f590434394da485ce4'" v-if="activeTab != 'c788ce98c1f248f590434394da485ce4' && activeTab != '49f5921a6d7f43cfa222c09f0223ae04' && scope.scope.status == 1"
@click="statusHandle" @click="statusHandle(scope.scope, 0)"
>关闭</el-button >关闭</el-button
> >
<el-button disabled <el-button
type="text" type="text"
@click="statusHandle" @click="statusHandle"
v-if="activeTab == 'b45827c068254695864ee3c1d42573cb'" v-if="activeTab == 'b45827c068254695864ee3c1d42573cb' && scope.scope.status == 4"
>故障复位</el-button >故障复位</el-button
> >
<el-button disabled <el-button
type="text" type="text"
@click="handleBtnClick(scope.scope.row)" @click="handleBtnClick(scope.scope.row)"
v-if=" v-if="activeTab == 'f4c840711eae4bcb9536a890cdfda493' && (scope.scope.status == 1 || scope.scope.status == 2)"
activeTab == '303310efddb34a2e9bf269bdff8a7dc5' ||
activeTab == 'f4c840711eae4bcb9536a890cdfda493'
"
>设置频率</el-button >设置频率</el-button
> >
<el-button disabled <el-button disabled
...@@ -274,9 +272,9 @@ export default { ...@@ -274,9 +272,9 @@ export default {
], ],
currentId: null, currentId: null,
curModel: 0, curModel: 0,
activeTab: 'c788ce98c1f248f590434394da485ce4', //tab默认选中 activeTab: 'b45827c068254695864ee3c1d42573cb', //tab默认选中
tableData: [], tableData: [],
tableColums: tableColumsFour, tableColums: tableColumsOne,
isSaving: 1, //节能 isSaving: 1, //节能
isOpen: 2, //定时开关 isOpen: 2, //定时开关
formData: { formData: {
...@@ -286,21 +284,19 @@ export default { ...@@ -286,21 +284,19 @@ export default {
endTime: '' endTime: ''
}, },
tabList: [ tabList: [
// { {
// value: '01', label: '风冷热泵机组',
// label: '风冷热泵机组', id: 'b45827c068254695864ee3c1d42573cb'
// id: 'b45827c068254695864ee3c1d42573cb' },
// },
// { // {
// value: '02', // value: '02',
// label: '室内机风柜', // label: '室内机风柜',
// id: '303310efddb34a2e9bf269bdff8a7dc5' // id: '303310efddb34a2e9bf269bdff8a7dc5'
// }, // },
// { {
// value: '03', label: ' 水泵',
// label: ' 水泵', id: 'f4c840711eae4bcb9536a890cdfda493'
// id: 'f4c840711eae4bcb9536a890cdfda493' },
// },
{ {
id: 'c788ce98c1f248f590434394da485ce4', id: 'c788ce98c1f248f590434394da485ce4',
label: '电动门帘' label: '电动门帘'
...@@ -349,7 +345,7 @@ export default { ...@@ -349,7 +345,7 @@ export default {
this.tableColums = tableColumsTwo this.tableColums = tableColumsTwo
break break
case 'f4c840711eae4bcb9536a890cdfda493': case 'f4c840711eae4bcb9536a890cdfda493':
this.tableColums = tableColumsThree this.tableColums = tableColumsTwo
break break
case 'c788ce98c1f248f590434394da485ce4': case 'c788ce98c1f248f590434394da485ce4':
this.tableColums = tableColumsFour this.tableColums = tableColumsFour
...@@ -435,6 +431,8 @@ export default { ...@@ -435,6 +431,8 @@ export default {
if (this.tableData[i].id === e.resource_id) { if (this.tableData[i].id === e.resource_id) {
this.$set(this.tableData[i], 'feng_shui_mode', e.feng_shui_mode) this.$set(this.tableData[i], 'feng_shui_mode', e.feng_shui_mode)
this.$set(this.tableData[i], 'hot_water_mode', e.hot_water_mode) this.$set(this.tableData[i], 'hot_water_mode', e.hot_water_mode)
this.$set(this.tableData[i], 'feng_shui_mode_n', e.feng_shui_mode == 0 ? "关闭" : "开启")
this.$set(this.tableData[i], 'hot_water_mode_n', e.hot_water_mode == 0 ? "关闭" : "开启")
this.$set( this.$set(
this.tableData[i], this.tableData[i],
'water_supply_temperature', 'water_supply_temperature',
...@@ -520,6 +518,16 @@ export default { ...@@ -520,6 +518,16 @@ export default {
'current_frequency', 'current_frequency',
e.current_frequency e.current_frequency
) )
this.$set(
this.tableData[i],
'set_frequency',
e.set_frequency
)
this.$set(
this.tableData[i],
'electric_energy',
e.electric_energy
)
} }
}) })
} }
...@@ -629,7 +637,25 @@ export default { ...@@ -629,7 +637,25 @@ export default {
} }
}) })
}, },
statusHandle() {}, statusHandle(row, status) {
this.$http({
url: this.$http.adornUrl('/equipment/onOrOff'),
method: 'post',
data: {
id: row.id,
status: status,
actionName: row.name + (status == 0 ? '关闭' : '开启'),
actionType: 1
}
}).then((data) => {
if (data && data.code === 0) {
this.$message.success(data.msg)
this.getDataList(this.pageIndex, this.pageSize)
} else {
this.$message.error(data.msg)
}
})
},
// 人工节能 // 人工节能
handleSwitch(state) { handleSwitch(state) {
this.isSaving = state this.isSaving = state
......
...@@ -159,10 +159,14 @@ export default { ...@@ -159,10 +159,14 @@ export default {
value: 'ece0b8b2db27411886254e81134988a3', value: 'ece0b8b2db27411886254e81134988a3',
label: '空调' label: '空调'
}, },
// { {
// value: 'b45827c068254695864ee3c1d42573cb', value: 'b45827c068254695864ee3c1d42573cb',
// label: '风冷热泵机组' label: '风冷热泵机组'
// }, },
{
value: 'f4c840711eae4bcb9536a890cdfda493',
label: '水泵'
},
// { // {
// value: '303310efddb34a2e9bf269bdff8a7dc5', // value: '303310efddb34a2e9bf269bdff8a7dc5',
// label: '室内机风柜' // label: '室内机风柜'
...@@ -187,6 +191,9 @@ export default { ...@@ -187,6 +191,9 @@ export default {
sljfgList() { sljfgList() {
return this.$store.state.d2admin.paramsList.list.sljfgList return this.$store.state.d2admin.paramsList.list.sljfgList
}, },
sbList() {
return this.$store.state.d2admin.paramsList.list.sbList
},
dlswjList() { dlswjList() {
return this.$store.state.d2admin.paramsList.list.dlswjList return this.$store.state.d2admin.paramsList.list.dlswjList
} }
...@@ -227,6 +234,14 @@ export default { ...@@ -227,6 +234,14 @@ export default {
}, },
deep: true deep: true
}, },
sbList: {
handler(n, o) {
if (n) {
this.setDataList()
}
},
deep: true
},
dlswjList: { dlswjList: {
handler(n, o) { handler(n, o) {
if (n) { if (n) {
...@@ -315,6 +330,15 @@ export default { ...@@ -315,6 +330,15 @@ export default {
this.$set(this.tableData[i], 'electric_energy', e.electric_energy) this.$set(this.tableData[i], 'electric_energy', e.electric_energy)
} }
}) })
} else if (
this.tableData[i].type === 'f4c840711eae4bcb9536a890cdfda493'
) {
//水泵
this.sbList.forEach((e) => {
if (this.tableData[i].id === e.resource_id) {
this.$set(this.tableData[i], 'electric_energy', e.electric_energy)
}
})
} else if ( } else if (
this.tableData[i].type === '8f5530fee2484e8eb107c0ca672132b2' this.tableData[i].type === '8f5530fee2484e8eb107c0ca672132b2'
) { ) {
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<el-button type="text" size="mini" :disabled="index == fileList.length-1" icon="el-icon-right" @click='rightClick(index,item)'></el-button> <el-button type="text" size="mini" :disabled="index == fileList.length-1" icon="el-icon-right" @click='rightClick(index,item)'></el-button>
</div> </div>
</div> </div>
<div class="shangchuan" @click="fileClick" v-if="fileList.length < 5"> <div class="shangchuan" @click="fileClick" v-if="fileList.length < 7">
<span class="el-icon-plus"></span> <span class="el-icon-plus"></span>
</div> </div>
<div> <div>
......
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