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,6 +427,7 @@ export default { ...@@ -391,6 +427,7 @@ 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') {
//风冷热泵机组 //风冷热泵机组
if (this.flrbList.length > 0) {
this.flrbList.forEach((e) => { this.flrbList.forEach((e) => {
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)
...@@ -440,16 +477,26 @@ export default { ...@@ -440,16 +477,26 @@ export default {
'hot_air_stop_temperature', 'hot_air_stop_temperature',
e.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'
) { ) {
//室内机风柜 //室内机风柜
if (this.sljfgList.length > 0) {
this.sljfgList.forEach((e) => { this.sljfgList.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.$set(
this.tableData[i], this.tableData[i],
'current_frequency', 'current_frequency',
...@@ -457,10 +504,12 @@ export default { ...@@ -457,10 +504,12 @@ export default {
) )
} }
}) })
}
} else if ( } else if (
this.tableData[i].type === 'f4c840711eae4bcb9536a890cdfda493' this.tableData[i].type === 'f4c840711eae4bcb9536a890cdfda493'
) { ) {
//水泵 //水泵
if (this.sbList.length > 0) {
this.sbList.forEach((e) => { this.sbList.forEach((e) => {
if (this.tableData[i].id === e.resource_id) { if (this.tableData[i].id === e.resource_id) {
this.$set( this.$set(
...@@ -470,6 +519,7 @@ export default { ...@@ -470,6 +519,7 @@ export default {
) )
} }
}) })
}
} 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