Commit 6a6da91b authored by co_dengxiongwen's avatar co_dengxiongwen

页面调整

parent 410fab54
...@@ -196,8 +196,8 @@ export default { ...@@ -196,8 +196,8 @@ export default {
//修改列表数据 //修改列表数据
setDataList() { setDataList() {
for (var i = 0; i < this.snqxzList.length; i++) { for (var i = 0; i < this.snqxzList.length; i++) {
this.dataList.forEach(e => { this.dataList.forEach((e) => {
if (this.snqxzList[i].resource_id == e.id) { if (this.snqxzList[i].resource_id === e.id) {
this.$set(e, 'temperature', this.snqxzList[i].temperature) this.$set(e, 'temperature', this.snqxzList[i].temperature)
this.$set(e, 'humidity', this.snqxzList[i].humidity) this.$set(e, 'humidity', this.snqxzList[i].humidity)
this.$set(e, 'carbonDioxide', this.snqxzList[i].carbon_dioxide) this.$set(e, 'carbonDioxide', this.snqxzList[i].carbon_dioxide)
......
...@@ -13,14 +13,14 @@ export const tableColums = [ ...@@ -13,14 +13,14 @@ export const tableColums = [
}, },
{ {
align: 'center', align: 'center',
prop: 'C', prop: 'electric_energy',
label: '当日功耗', label: '当日用电量',
width: 162 width: 162
}, },
{ {
align: 'center', align: 'center',
prop: 'D', prop: 'D',
label: '当月功耗', label: '当月用电量',
width: 162 width: 162
}, },
{ {
......
...@@ -159,6 +159,26 @@ export default { ...@@ -159,6 +159,26 @@ export default {
] ]
} }
}, },
computed: {
pfjList() {
return this.$store.state.d2admin.paramsList.list.pfjList
},
jfktpList() {
return this.$store.state.d2admin.paramsList.list.jfktpList
},
jfktgList() {
return this.$store.state.d2admin.paramsList.list.jfktgList
},
flrbList() {
return this.$store.state.d2admin.paramsList.list.flrbList
},
sljfgList() {
return this.$store.state.d2admin.paramsList.list.sljfgList
},
dlswjList() {
return this.$store.state.d2admin.paramsList.list.dlswjList
}
},
watch: { watch: {
activeTab() { activeTab() {
this.getDataList() this.getDataList()
...@@ -197,6 +217,7 @@ export default { ...@@ -197,6 +217,7 @@ export default {
if (data && data.code === 0) { if (data && data.code === 0) {
console.log('数据', data) console.log('数据', data)
this.tableData = data.page.rows this.tableData = data.page.rows
this.setDataList()
this.tableColums = tableColums this.tableColums = tableColums
this.totalSize = data.page.total this.totalSize = data.page.total
} else { } else {
...@@ -205,6 +226,69 @@ export default { ...@@ -205,6 +226,69 @@ export default {
} }
}) })
}, },
//修改列表数据
setDataList() {
for (var i = 0; i < this.tableData.length; i++) {
if (this.tableData[i].type === 'b6af764f2a6e454490a6b1b3c9057e57') {
//排风机
this.pfjList.forEach((e) => {
if (this.tableData[i].id === e.resource_id) {
this.$set(this.tableData[i], 'electric_energy', e.electric_energy)
return false
}
})
} else if (
this.tableData[i].type === 'ece0b8b2db27411886254e81134988a3'
) {
//机房空调(220V)
this.jfktpList.forEach((e) => {
if (this.tableData[i].id === e.resource_id) {
this.$set(this.tableData[i], 'electric_energy', e.electric_energy)
}
})
} else if (
this.tableData[i].type === 'b47661ca1d454f9792ba5369f3cb2bc5'
) {
//机房空调(380V)
this.jfktgList.forEach((e) => {
if (this.tableData[i].id === e.resource_id) {
this.$set(this.tableData[i], 'electric_energy', e.electric_energy)
}
})
} else if (
this.tableData[i].type === 'c788ce98c1f248f590434394da485ce4'
) {
//防火卷帘门
} else if (
this.tableData[i].type === 'b45827c068254695864ee3c1d42573cb'
) {
//风冷热泵机组
this.flrbList.forEach((e) => {
if (this.tableData[i].id === e.resource_id) {
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)
}
})
} else if (
this.tableData[i].type === '173466a2cf9a42a6a17b2bdfbeae36d5'
) {
//多联室外机
this.dlswjList.forEach((e) => {
if (this.tableData[i].id === e.resource_id) {
this.$set(this.tableData[i], 'electric_energy', e.electric_energy)
}
})
}
}
},
openHistoryHandle(data) { openHistoryHandle(data) {
console.log('用电:', data) console.log('用电:', data)
this.historyDataModalVisible = true this.historyDataModalVisible = true
......
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