Commit 92fedc75 authored by xiexingan's avatar xiexingan

Merge branch 'dev' of gitlab.suntrayoa.com:geqilin/energyai_vue into dev

parents 30d0b36a c3c493cd
...@@ -7,10 +7,10 @@ ...@@ -7,10 +7,10 @@
style="width: 100%" style="width: 100%"
:header-cell-style="{ :header-cell-style="{
background: 'rgba(0, 151, 255, 0.08)', background: 'rgba(0, 151, 255, 0.08)',
color: '#333333', color: '#333333'
}" }"
> >
<el-table-column align="center" label="序号" width="100"> <el-table-column align="center" label="序号" width="50">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.$index + 1 }} {{ scope.$index + 1 }}
</template> </template>
...@@ -23,17 +23,21 @@ ...@@ -23,17 +23,21 @@
:width="item.width" :width="item.width"
:align="item.align" :align="item.align"
> >
</el-table-column> </el-table-column>
</template> </template>
<el-table-column v-if='isShowOp' align="center" label="操作" :width="opNum*80" > <el-table-column
<template slot-scope="scope" > v-if="isShowOp"
<slot name='operation' :scope='scope'></slot> align="center"
label="操作"
:width="opNum * 65"
>
<template slot-scope="scope">
<slot name="operation" :scope="scope"></slot>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div <div
v-if="isShowPage" v-if="isShowPage"
style=" style="
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
...@@ -51,7 +55,7 @@ ...@@ -51,7 +55,7 @@
</div> </div>
</template> </template>
<script > <script>
export default { export default {
name: 'enTable', name: 'enTable',
props: { props: {
...@@ -71,13 +75,11 @@ export default { ...@@ -71,13 +75,11 @@ export default {
default: 3 default: 3
}, },
isShowPage: { isShowPage: {
default: true default: true
}, },
isEdit: { isEdit: {
default: true default: true
} }
}, },
data() { data() {
return {} return {}
...@@ -89,7 +91,7 @@ export default { ...@@ -89,7 +91,7 @@ export default {
} }
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.record-color { .record-color {
color: #0097ff; color: #0097ff;
} }
...@@ -99,13 +101,15 @@ export default { ...@@ -99,13 +101,15 @@ export default {
.marg_r_8 { .marg_r_8 {
margin-right: 8px; margin-right: 8px;
} }
.en-table{ .en-table {
.el-pagination.is-background .btn-next, .el-pagination.is-background .btn-prev, .el-pagination.is-background .el-pager li{ .el-pagination.is-background .btn-next,
.el-pagination.is-background .btn-prev,
.el-pagination.is-background .el-pager li {
margin: 0 !important; margin: 0 !important;
} }
/deep/.el-pagination.is-background .el-pager li:not(.disabled).active { /deep/.el-pagination.is-background .el-pager li:not(.disabled).active {
color: #32a5ea !important; color: #32a5ea !important;
background-color: red !important; background-color: red !important;
} }
} }
</style> </style>
...@@ -2,38 +2,82 @@ ...@@ -2,38 +2,82 @@
{ {
align: 'center', align: 'center',
prop: 'name', prop: 'name',
label: '设备名称', label: '设备名称'
width: 132
}, },
{ {
align: 'center', align: 'center',
prop: 'deployLocation', prop: 'deployLocation',
label: '设备位置' label: '设备位置'
// width: 112,
}, },
{ {
align: 'center', align: 'center',
prop: 'status', prop: 'statusName',
label: '设备状态', label: '设备状态'
width: 182
}, },
{ {
align: 'center', align: 'center',
prop: 'D', prop: 'feng_shui_mode',
label: '今日用电量', label: '风水模式'
width: 182
}, },
{ {
align: 'center', align: 'center',
prop: 'E', prop: 'hot_water_mode',
label: '本月用电量', label: '热水模式'
width: 182 },
{
align: 'center',
prop: 'water_supply_temperature',
label: '供水温度'
},
{
align: 'center',
prop: 'return_water_temperature',
label: '回水温度'
},
{
align: 'center',
prop: 'heating_start_temperature',
label: '制热启动温度'
},
{
align: 'center',
prop: 'heating_stop_temperature',
label: '制热停止温度'
},
{
align: 'center',
prop: 'indoor_ambient_temperature',
label: '室内环境温度'
},
{
align: 'center',
prop: 'outlet_temperature',
label: '出风温度'
},
{
align: 'center',
prop: 'return_air_temperature',
label: '回风温度'
},
{
align: 'center',
prop: 'hot_air_start_temperature',
label: '热风启动温度'
},
{
align: 'center',
prop: 'hot_air_stop_temperature',
label: '热风停止温度'
},
{
align: 'center',
prop: 'electric_energy',
label: '用电量'
}, },
{ {
align: 'center', align: 'center',
prop: 'code', prop: 'code',
label: '设备编号', label: '设备编号'
width: 132
} }
] ]
...@@ -41,43 +85,64 @@ ...@@ -41,43 +85,64 @@
{ {
align: 'center', align: 'center',
prop: 'name', prop: 'name',
label: '设备名称', label: '设备名称'
width: 132
}, },
{ {
align: 'center', align: 'center',
prop: 'deployLocation', prop: 'deployLocation',
label: '设备位置' label: '设备位置'
// width: 112,
}, },
{ {
align: 'center', align: 'center',
prop: 'C', prop: 'current_frequency',
label: '当前频率', label: '当前频率'
width: 182 },
{
align: 'center',
prop: 'statusName',
label: '设备状态'
},
{
align: 'center',
prop: 'electric_energy',
label: '用电量'
}, },
// {
// align: 'center',
// prop: 'F',
// label: '本月用电量'
// },
{ {
align: 'center', align: 'center',
prop: 'status', prop: 'code',
label: '设备状态', label: '设备编号'
width: 182 }
]
export const tableColumsThree = [
{
align: 'center',
prop: 'name',
label: '设备名称'
},
{
align: 'center',
prop: 'deployLocation',
label: '设备位置'
}, },
{ {
align: 'center', align: 'center',
prop: 'E', prop: 'current_frequency',
label: '今日用电量', label: '当前频率'
width: 182
}, },
{ {
align: 'center', align: 'center',
prop: 'F', prop: 'statusName',
label: '本月用电量', label: '设备状态'
width: 182
}, },
{ {
align: 'center', align: 'center',
prop: 'code', prop: 'code',
label: '设备编号', label: '设备编号'
width: 132
} }
] ]
...@@ -120,13 +120,13 @@ ...@@ -120,13 +120,13 @@
<el-button <el-button
type="text" type="text"
@click="statusHandle" @click="statusHandle"
v-if="activeTab == '01'" v-if="activeTab == 'b45827c068254695864ee3c1d42573cb'"
>故障复位</el-button >故障复位</el-button
> >
<el-button <el-button
type="text" type="text"
@click="handleBtnClick" @click="handleBtnClick"
v-if="activeTab != '01'" v-if="activeTab != 'b45827c068254695864ee3c1d42573cb'"
>设置频率</el-button >设置频率</el-button
> >
</template> </template>
...@@ -151,13 +151,7 @@ import enTabs from '../../components/enTabs' ...@@ -151,13 +151,7 @@ import enTabs from '../../components/enTabs'
import hallModal from './components/hallModal' import hallModal from './components/hallModal'
import tablePagination from '@/pages/components/tablePagination' import tablePagination from '@/pages/components/tablePagination'
import { import { tableColumsOne, tableColumsTwo, tableColumsThree } from './config'
tableDataOne,
tableColumsOne,
tableColumsTwo,
tableDataTwo,
tableDataThree
} from './config'
export default { export default {
components: { components: {
...@@ -219,6 +213,17 @@ export default { ...@@ -219,6 +213,17 @@ export default {
hallModalVisible: false hallModalVisible: false
} }
}, },
computed: {
flrbList() {
return this.$store.state.d2admin.paramsList.list.flrbList
},
sljfgList() {
return this.$store.state.d2admin.paramsList.list.sljfgList
},
sbList() {
return this.$store.state.d2admin.paramsList.list.sbList
}
},
watch: { watch: {
activeTab(val) { activeTab(val) {
this.activeTab = val this.activeTab = val
...@@ -233,7 +238,7 @@ export default { ...@@ -233,7 +238,7 @@ export default {
// this.tableData = tableDataTwo // this.tableData = tableDataTwo
break break
case 'f4c840711eae4bcb9536a890cdfda493': case 'f4c840711eae4bcb9536a890cdfda493':
this.tableColums = tableColumsTwo this.tableColums = tableColumsThree
// this.tableData = tableDataThree // this.tableData = tableDataThree
break break
} }
...@@ -259,7 +264,7 @@ export default { ...@@ -259,7 +264,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.tableColums = crecords this.setDataList()
this.totalSize = data.page.total this.totalSize = data.page.total
} else { } else {
this.dataList = [] this.dataList = []
...@@ -267,6 +272,93 @@ export default { ...@@ -267,6 +272,93 @@ export default {
} }
}) })
}, },
//修改列表数据
setDataList() {
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)
}
})
} 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
)
}
})
} 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
)
}
})
}
}
},
getAllHcdt() { getAllHcdt() {
this.dataListLoading = true this.dataListLoading = true
this.$http({ this.$http({
......
...@@ -2,37 +2,69 @@ ...@@ -2,37 +2,69 @@
{ {
align: 'center', align: 'center',
prop: 'name', prop: 'name',
label: '设备名称', label: '设备名称'
width: 132
}, },
{ {
align: 'center', align: 'center',
prop: 'deployLocation', prop: 'deployLocation',
label: '设备位置' label: '设备位置'
// width: 150
}, },
{ {
align: 'center', align: 'center',
prop: 'status', prop: 'statusName',
label: '设备状态', label: '设备状态'
width: 182
}, },
{ {
align: 'center', align: 'center',
prop: 'D', prop: 'electric_energy',
label: '今日用电量', label: '用电量'
width: 182
}, },
// {
// align: 'center',
// prop: 'E',
// label: '本月用电量'
// },
{ {
align: 'center', align: 'center',
prop: 'E', prop: 'code',
label: '本月用电量', label: '设备编号'
width: 182 }
]
export const tableColumsTwo = [
{
align: 'center',
prop: 'name',
label: '设备名称'
},
{
align: 'center',
prop: 'deployLocation',
label: '设备位置'
},
{
align: 'center',
prop: 'setting_temperature',
label: '设定温度'
},
{
align: 'center',
prop: 'setting_mode',
label: '设定模式'
},
{
align: 'center',
prop: 'setting_wind_speed',
label: '设定风速'
},
{
align: 'center',
prop: 'statusName',
label: '设备状态'
}, },
{ {
align: 'center', align: 'center',
prop: 'code', prop: 'code',
label: '设备编号', label: '设备编号'
width: 132
} }
] ]
...@@ -22,31 +22,31 @@ ...@@ -22,31 +22,31 @@
<el-button <el-button
type="text" type="text"
@click="statusHandle" @click="statusHandle"
v-if="activeTab != '04'" v-if="activeTab != 'c788ce98c1f248f590434394da485ce4'"
>开启</el-button >开启</el-button
> >
<el-button <el-button
type="text" type="text"
@click="statusHandle" @click="statusHandle"
v-if="activeTab != '04'" v-if="activeTab != 'c788ce98c1f248f590434394da485ce4'"
>关闭</el-button >关闭</el-button
> >
<el-button <el-button
type="text" type="text"
@click="statusHandle" @click="statusHandle"
v-if="activeTab == '04'" v-if="activeTab == 'c788ce98c1f248f590434394da485ce4'"
>上升</el-button >上升</el-button
> >
<el-button <el-button
type="text" type="text"
@click="statusHandle" @click="statusHandle"
v-if="activeTab == '04'" v-if="activeTab == 'c788ce98c1f248f590434394da485ce4'"
>下降</el-button >下降</el-button
> >
<el-button <el-button
type="text" type="text"
@click="statusHandle" @click="statusHandle"
v-if="activeTab == '04'" v-if="activeTab == 'c788ce98c1f248f590434394da485ce4'"
>停止</el-button >停止</el-button
> >
</template> </template>
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
import cardList from '../../components/cardList' import cardList from '../../components/cardList'
import enTabs from '../../components/enTabs' import enTabs from '../../components/enTabs'
import enTable from '../../components/enTable' import enTable from '../../components/enTable'
import { tableColumsOne } from './config' import { tableColumsOne, tableColumsTwo } from './config'
export default { export default {
name: 'officeAreaControl', name: 'officeAreaControl',
...@@ -109,6 +109,23 @@ export default { ...@@ -109,6 +109,23 @@ 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
},
dlswjList() {
return this.$store.state.d2admin.paramsList.list.dlswjList
},
dlsnjList() {
return this.$store.state.d2admin.paramsList.list.dlsnjList
}
},
watch: { watch: {
activeTab(val) { activeTab(val) {
this.activeTab = val this.activeTab = val
...@@ -127,7 +144,7 @@ export default { ...@@ -127,7 +144,7 @@ export default {
this.tableColums = tableColumsOne this.tableColums = tableColumsOne
break break
case '173466a2cf9a42a6a17b2bdfbeae36d5': case '173466a2cf9a42a6a17b2bdfbeae36d5':
this.tableColums = tableColumsOne this.tableColums = tableColumsTwo
break break
case '8f5530fee2484e8eb107c0ca672132b2': case '8f5530fee2484e8eb107c0ca672132b2':
this.tableColums = tableColumsOne this.tableColums = tableColumsOne
...@@ -157,6 +174,7 @@ export default { ...@@ -157,6 +174,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.totalSize = data.page.total this.totalSize = data.page.total
} else { } else {
this.dataList = [] this.dataList = []
...@@ -164,6 +182,73 @@ export default { ...@@ -164,6 +182,73 @@ 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)
}
})
} 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 === '49f5921a6d7f43cfa222c09f0223ae04'
) {
//换气扇
} else if (
this.tableData[i].type === '8f5530fee2484e8eb107c0ca672132b2'
) {
//多联室外机
this.dlswjList.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.dlsnjList.forEach((e) => {
if (this.tableData[i].id === e.resource_id) {
this.$set(
this.tableData[i],
'setting_temperature',
e.setting_temperature
)
this.$set(this.tableData[i], 'setting_mode', e.setting_mode)
this.$set(
this.tableData[i],
'setting_wind_speed',
e.setting_wind_speed
)
}
})
}
}
},
statusHandle() {} statusHandle() {}
} }
} }
......
...@@ -28,8 +28,8 @@ card-warp(title="室内气象数据", height="45px", showBackground) ...@@ -28,8 +28,8 @@ card-warp(title="室内气象数据", height="45px", showBackground)
.data-item .data-item
.type CO2 .type CO2
.color-green .color-green
span.num(v-if="activeName == 1") {{ hcdtSnqx.carbonDioxide }} span.num(v-if="activeName == 1") {{ hcdtSnqx.carbon_dioxide }}
span.num(v-else) {{ bgqySnqx.carbonDioxide }} span.num(v-else) {{ bgqySnqx.carbon_dioxide }}
span.unit PPM span.unit PPM
el-table( el-table(
size="mini", size="mini",
...@@ -90,7 +90,7 @@ card-warp(title="室内气象数据", height="45px", showBackground) ...@@ -90,7 +90,7 @@ card-warp(title="室内气象数据", height="45px", showBackground)
span ( PPM ) span ( PPM )
el-table-column( el-table-column(
:resizable="false", :resizable="false",
prop="status", prop="statusName",
header-align="center", header-align="center",
align="center", align="center",
label="设备状态" label="设备状态"
...@@ -160,11 +160,9 @@ export default { ...@@ -160,11 +160,9 @@ export default {
watch: {}, watch: {},
mounted() { mounted() {
this.getDataList() this.getDataList()
// this.hcdtSnqx.temperature = this.$store.state.d2admin.paramsList.list.hcdtSnqx.temperature
}, },
methods: { methods: {
tabClick(tab, event) { tabClick(tab, event) {
// console.log(tab, event)
this.getDataList() this.getDataList()
}, },
// 获取数据列表 // 获取数据列表
...@@ -195,15 +193,15 @@ export default { ...@@ -195,15 +193,15 @@ 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)
}
})
} }
})
}
}, },
showParams(data, type) { showParams(data, type) {
console.log(111) console.log(111)
......
...@@ -105,7 +105,7 @@ card-warp(title="室外气象数据", height="45px", showBackground) ...@@ -105,7 +105,7 @@ card-warp(title="室外气象数据", height="45px", showBackground)
) )
el-table-column( el-table-column(
:resizable="false", :resizable="false",
prop="status", prop="statusName",
header-align="center", header-align="center",
align="center", align="center",
label="设备状态" label="设备状态"
...@@ -231,15 +231,23 @@ export default { ...@@ -231,15 +231,23 @@ export default {
this.typeList[7].num = this.socketData.radiation this.typeList[7].num = this.socketData.radiation
this.typeList[8].num = this.socketData.region this.typeList[8].num = this.socketData.region
//列表 //列表
for (var i = 0; i < this.dataList.length; i++) { for (var i = 0; i < this.dataList.length; i++) {
this.$set(this.dataList[i], 'temperature', this.socketData.temperature) this.$set(this.dataList[i], 'temperature', this.socketData.temperature)
this.$set(this.dataList[i], 'humidity', this.socketData.humidity) this.$set(this.dataList[i], 'humidity', this.socketData.humidity)
this.$set(this.dataList[i], 'wind_speed', this.socketData.wind_speed) this.$set(this.dataList[i], 'wind_speed', this.socketData.wind_speed)
this.$set(this.dataList[i], 'Illuminance', this.socketData.Illuminance) this.$set(this.dataList[i], 'Illuminance', this.socketData.Illuminance)
this.$set(this.dataList[i], 'carbon_dioxide', this.socketData.carbon_dioxide) this.$set(
this.$set(this.dataList[i], 'fine_particles', this.socketData.fine_particles) this.dataList[i],
this.$set(this.dataList[i], 'radiation', this.socketData.radiation) 'carbon_dioxide',
} this.socketData.carbon_dioxide
)
this.$set(
this.dataList[i],
'fine_particles',
this.socketData.fine_particles
)
this.$set(this.dataList[i], 'radiation', this.socketData.radiation)
}
}, },
csHandle() { csHandle() {
this.$http({ this.$http({
......
...@@ -13,19 +13,19 @@ export const tableColums = [ ...@@ -13,19 +13,19 @@ export const tableColums = [
}, },
{ {
align: 'center', align: 'center',
prop: 'C', prop: 'electric_energy',
label: '当日功耗', label: '当日用电量',
width: 162 width: 162
}, },
// {
// align: 'center',
// prop: 'D',
// label: '当月用电量',
// width: 162
// },
{ {
align: 'center', align: 'center',
prop: 'D', prop: 'statusName',
label: '当月功耗',
width: 162
},
{
align: 'center',
prop: 'status',
label: '设备状态', label: '设备状态',
width: 152 width: 152
}, },
......
...@@ -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,68 @@ export default { ...@@ -205,6 +226,68 @@ 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)
}
})
} 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