Commit c8356564 authored by co_dengxiongwen's avatar co_dengxiongwen

页面调整

parent b3734185
...@@ -173,6 +173,8 @@ export default { ...@@ -173,6 +173,8 @@ export default {
this.initWebSocket() this.initWebSocket()
this.initWebSocket2() this.initWebSocket2()
this.getDateList() this.getDateList()
let paramsList = JSON.parse(sessionStorage.getItem('paramsList'))
this.$store.dispatch('d2admin/paramsList/set', paramsList)
}, },
destroyed: function () { destroyed: function () {
this.websocketclose() this.websocketclose()
...@@ -228,6 +230,7 @@ export default { ...@@ -228,6 +230,7 @@ export default {
) { ) {
var paramsInfo = JSON.parse(e.data) var paramsInfo = JSON.parse(e.data)
console.log('paramsInfo:', paramsInfo) console.log('paramsInfo:', paramsInfo)
sessionStorage.setItem('paramsList', JSON.stringify(paramsInfo))
this.$store.dispatch('d2admin/paramsList/set', paramsInfo) this.$store.dispatch('d2admin/paramsList/set', paramsInfo)
} }
}, },
...@@ -419,6 +422,7 @@ export default { ...@@ -419,6 +422,7 @@ export default {
}).then((data) => { }).then((data) => {
if (data && data.code === 0) { if (data && data.code === 0) {
console.log('paramsList:', data.bean) console.log('paramsList:', data.bean)
sessionStorage.setItem('paramsList', JSON.stringify(data.bean))
this.$store.dispatch('d2admin/paramsList/set', data.bean) this.$store.dispatch('d2admin/paramsList/set', data.bean)
} }
}) })
......
...@@ -236,7 +236,7 @@ export default { ...@@ -236,7 +236,7 @@ export default {
} }
}, },
setData() { setData() {
// console.log('list:', this.list) console.log('list:', this.list)
if (this.list) { if (this.list) {
if (this.list.snqxzList.length > 0) { if (this.list.snqxzList.length > 0) {
this.snqxzBean = this.list.snqxzList[0] this.snqxzBean = this.list.snqxzList[0]
...@@ -245,8 +245,8 @@ export default { ...@@ -245,8 +245,8 @@ export default {
this.swqxzBean = this.list.swqxzList[0] this.swqxzBean = this.list.swqxzList[0]
} }
} }
// console.log('snqxzBean:', this.snqxzBean) console.log('snqxzBean:', this.snqxzBean)
// console.log('swqxzBean:', this.swqxzBean) console.log('swqxzBean:', this.swqxzBean)
}, },
setSwqxzData() {} setSwqxzData() {}
} }
......
...@@ -149,7 +149,7 @@ ...@@ -149,7 +149,7 @@
:showOpr="true" :showOpr="true"
:opNum="3" :opNum="3"
:showStateColor="true" :showStateColor="true"
:currentMode="currentModel" :currentMode="curModel"
> >
<template v-slot:operation="scope"> <template v-slot:operation="scope">
<el-button <el-button
...@@ -272,6 +272,7 @@ export default { ...@@ -272,6 +272,7 @@ export default {
} }
], ],
currentId: null, currentId: null,
curModel: 0,
activeTab: 'b45827c068254695864ee3c1d42573cb', //tab默认选中 activeTab: 'b45827c068254695864ee3c1d42573cb', //tab默认选中
tableData: [], tableData: [],
tableColums: tableColumsOne, tableColums: tableColumsOne,
...@@ -356,6 +357,38 @@ export default { ...@@ -356,6 +357,38 @@ export default {
this.tableColums = tableColumsFour this.tableColums = tableColumsFour
break break
} }
},
flrbList: {
handler(n, o) {
if (n) {
this.setDataList()
}
},
deep: true
},
sljfgList: {
handler(n, o) {
if (n) {
this.setDataList()
}
},
deep: true
},
sbList: {
handler(n, o) {
if (n) {
this.setDataList()
}
},
deep: true
},
currentModel: {
handler(n, o) {
if (n) {
this.setModel()
}
},
deep: true
} }
}, },
mounted() { mounted() {
...@@ -363,6 +396,9 @@ export default { ...@@ -363,6 +396,9 @@ export default {
this.getAllHcdt() this.getAllHcdt()
}, },
methods: { methods: {
setModel() {
this.curModel = this.currentModel
},
// 获取数据列表 // 获取数据列表
getDataList(page, size) { getDataList(page, size) {
this.$http({ this.$http({
...@@ -391,85 +427,99 @@ export default { ...@@ -391,85 +427,99 @@ export default {
for (var i = 0; i < this.tableData.length; i++) { for (var i = 0; i < this.tableData.length; i++) {
if (this.tableData[i].type === 'b45827c068254695864ee3c1d42573cb') { if (this.tableData[i].type === 'b45827c068254695864ee3c1d42573cb') {
//风冷热泵机组 //风冷热泵机组
this.flrbList.forEach((e) => { if (this.flrbList.length > 0) {
if (this.tableData[i].id === e.resource_id) { this.flrbList.forEach((e) => {
this.$set(this.tableData[i], 'feng_shui_mode', e.feng_shui_mode) if (this.tableData[i].id === e.resource_id) {
this.$set(this.tableData[i], 'hot_water_mode', e.hot_water_mode) this.$set(this.tableData[i], 'feng_shui_mode', e.feng_shui_mode)
this.$set( this.$set(this.tableData[i], 'hot_water_mode', e.hot_water_mode)
this.tableData[i], this.$set(
'water_supply_temperature', this.tableData[i],
e.water_supply_temperature 'water_supply_temperature',
) e.water_supply_temperature
this.$set( )
this.tableData[i], this.$set(
'return_water_temperature', this.tableData[i],
e.return_water_temperature 'return_water_temperature',
) e.return_water_temperature
this.$set( )
this.tableData[i], this.$set(
'heating_start_temperature', this.tableData[i],
e.heating_start_temperature 'heating_start_temperature',
) e.heating_start_temperature
this.$set( )
this.tableData[i], this.$set(
'heating_stop_temperature', this.tableData[i],
e.heating_stop_temperature 'heating_stop_temperature',
) e.heating_stop_temperature
this.$set( )
this.tableData[i], this.$set(
'indoor_ambient_temperature', this.tableData[i],
e.indoor_ambient_temperature 'indoor_ambient_temperature',
) e.indoor_ambient_temperature
this.$set( )
this.tableData[i], this.$set(
'outlet_temperature', this.tableData[i],
e.outlet_temperature 'outlet_temperature',
) e.outlet_temperature
this.$set( )
this.tableData[i], this.$set(
'return_air_temperature', this.tableData[i],
e.return_air_temperature 'return_air_temperature',
) e.return_air_temperature
this.$set( )
this.tableData[i], this.$set(
'hot_air_start_temperature', this.tableData[i],
e.hot_air_start_temperature 'hot_air_start_temperature',
) e.hot_air_start_temperature
this.$set( )
this.tableData[i], this.$set(
'hot_air_stop_temperature', this.tableData[i],
e.hot_air_stop_temperature 'hot_air_stop_temperature',
) e.hot_air_stop_temperature
this.$set(this.tableData[i], 'electric_energy', e.electric_energy) )
} this.$set(
}) this.tableData[i],
'electric_energy',
e.electric_energy
)
}
})
}
} else if ( } else if (
this.tableData[i].type === '303310efddb34a2e9bf269bdff8a7dc5' this.tableData[i].type === '303310efddb34a2e9bf269bdff8a7dc5'
) { ) {
//室内机风柜 //室内机风柜
this.sljfgList.forEach((e) => { if (this.sljfgList.length > 0) {
if (this.tableData[i].id === e.resource_id) { this.sljfgList.forEach((e) => {
this.$set(this.tableData[i], 'electric_energy', e.electric_energy) if (this.tableData[i].id === e.resource_id) {
this.$set( this.$set(
this.tableData[i], this.tableData[i],
'current_frequency', 'electric_energy',
e.current_frequency e.electric_energy
) )
} this.$set(
}) this.tableData[i],
'current_frequency',
e.current_frequency
)
}
})
}
} else if ( } else if (
this.tableData[i].type === 'f4c840711eae4bcb9536a890cdfda493' this.tableData[i].type === 'f4c840711eae4bcb9536a890cdfda493'
) { ) {
//水泵 //水泵
this.sbList.forEach((e) => { if (this.sbList.length > 0) {
if (this.tableData[i].id === e.resource_id) { this.sbList.forEach((e) => {
this.$set( if (this.tableData[i].id === e.resource_id) {
this.tableData[i], this.$set(
'current_frequency', this.tableData[i],
e.current_frequency 'current_frequency',
) e.current_frequency
} )
}) }
})
}
} else if ( } else if (
this.tableData[i].type === 'c788ce98c1f248f590434394da485ce4' this.tableData[i].type === 'c788ce98c1f248f590434394da485ce4'
) { ) {
......
...@@ -12,7 +12,14 @@ ...@@ -12,7 +12,14 @@
></el-tab-pane> ></el-tab-pane>
</el-tabs> </el-tabs>
<div style="margin-top: 20px"></div> <div style="margin-top: 20px"></div>
<table-list :tableColums='tableColums' :tableData='tableData' :showOpr='true' :opNum='3' :showStateColor='true' :currentMode='currentModel'> <table-list
:tableColums="tableColums"
:tableData="tableData"
:showOpr="true"
:opNum="3"
:showStateColor="true"
:currentMode="curModel"
>
<template v-slot:operation="scope"> <template v-slot:operation="scope">
<el-button type="text" @click="statusHandle">开启</el-button> <el-button type="text" @click="statusHandle">开启</el-button>
<el-button type="text" @click="statusHandle">关闭</el-button> <el-button type="text" @click="statusHandle">关闭</el-button>
...@@ -53,7 +60,7 @@ export default { ...@@ -53,7 +60,7 @@ export default {
enTabs, enTabs,
enTable, enTable,
tablePagination, tablePagination,
tableList, tableList
}, },
data() { data() {
...@@ -61,6 +68,7 @@ export default { ...@@ -61,6 +68,7 @@ export default {
pageIndex: 1, pageIndex: 1,
pageSize: 10, pageSize: 10,
totalSize: 0, totalSize: 0,
curModel: 0,
activeTab: 'b6af764f2a6e454490a6b1b3c9057e57', activeTab: 'b6af764f2a6e454490a6b1b3c9057e57',
tableData: [], tableData: [],
tableColums: tableColumsOne, tableColums: tableColumsOne,
...@@ -129,12 +137,63 @@ export default { ...@@ -129,12 +137,63 @@ export default {
this.tableColums = tableColumsTwo this.tableColums = tableColumsTwo
break break
} }
},
pfjList: {
handler(n, o) {
if (n) {
this.setDataList()
}
},
deep: true
},
jfktpList: {
handler(n, o) {
if (n) {
this.setDataList()
}
},
deep: true
},
dlswjList: {
handler(n, o) {
if (n) {
this.setDataList()
}
},
deep: true
},
dlsnjList: {
handler(n, o) {
if (n) {
this.setDataList()
}
},
deep: true
},
dlxfsnjList: {
handler(n, o) {
if (n) {
this.setDataList()
}
},
deep: true
},
currentModel: {
handler(n, o) {
if (n) {
this.setModel()
}
},
deep: true
} }
}, },
mounted() { mounted() {
this.getDataList() this.getDataList()
}, },
methods: { methods: {
setModel() {
this.curModel = this.currentModel
},
// 获取数据列表 // 获取数据列表
getDataList(page, size) { getDataList(page, size) {
this.$http({ this.$http({
......
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