Commit c8356564 authored by co_dengxiongwen's avatar co_dengxiongwen

页面调整

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