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 @@
style="width: 100%"
:header-cell-style="{
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">
{{ scope.$index + 1 }}
</template>
......@@ -23,12 +23,16 @@
:width="item.width"
:align="item.align"
>
</el-table-column>
</template>
<el-table-column v-if='isShowOp' align="center" label="操作" :width="opNum*80" >
<template slot-scope="scope" >
<slot name='operation' :scope='scope'></slot>
<el-table-column
v-if="isShowOp"
align="center"
label="操作"
:width="opNum * 65"
>
<template slot-scope="scope">
<slot name="operation" :scope="scope"></slot>
</template>
</el-table-column>
</el-table>
......@@ -51,7 +55,7 @@
</div>
</template>
<script >
<script>
export default {
name: 'enTable',
props: {
......@@ -71,13 +75,11 @@ export default {
default: 3
},
isShowPage: {
default: true
},
isEdit: {
default: true
}
},
data() {
return {}
......@@ -99,13 +101,15 @@ export default {
.marg_r_8 {
margin-right: 8px;
}
.en-table{
.el-pagination.is-background .btn-next, .el-pagination.is-background .btn-prev, .el-pagination.is-background .el-pager li{
.en-table {
.el-pagination.is-background .btn-next,
.el-pagination.is-background .btn-prev,
.el-pagination.is-background .el-pager li {
margin: 0 !important;
}
/deep/.el-pagination.is-background .el-pager li:not(.disabled).active {
color: #32a5ea !important;
background-color: red !important;
}
}
}
</style>
......@@ -2,38 +2,82 @@
{
align: 'center',
prop: 'name',
label: '设备名称',
width: 132
label: '设备名称'
},
{
align: 'center',
prop: 'deployLocation',
label: '设备位置'
// width: 112,
},
{
align: 'center',
prop: 'status',
label: '设备状态',
width: 182
prop: 'statusName',
label: '设备状态'
},
{
align: 'center',
prop: 'D',
label: '今日用电量',
width: 182
prop: 'feng_shui_mode',
label: '风水模式'
},
{
align: 'center',
prop: 'E',
label: '本月用电量',
width: 182
prop: 'hot_water_mode',
label: '热水模式'
},
{
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',
prop: 'code',
label: '设备编号',
width: 132
label: '设备编号'
}
]
......@@ -41,43 +85,64 @@
{
align: 'center',
prop: 'name',
label: '设备名称',
width: 132
label: '设备名称'
},
{
align: 'center',
prop: 'deployLocation',
label: '设备位置'
// width: 112,
},
{
align: 'center',
prop: 'C',
label: '当前频率',
width: 182
prop: 'current_frequency',
label: '当前频率'
},
{
align: 'center',
prop: 'statusName',
label: '设备状态'
},
{
align: 'center',
prop: 'electric_energy',
label: '用电量'
},
// {
// align: 'center',
// prop: 'F',
// label: '本月用电量'
// },
{
align: 'center',
prop: 'status',
label: '设备状态',
width: 182
prop: 'code',
label: '设备编号'
}
]
export const tableColumsThree = [
{
align: 'center',
prop: 'name',
label: '设备名称'
},
{
align: 'center',
prop: 'deployLocation',
label: '设备位置'
},
{
align: 'center',
prop: 'E',
label: '今日用电量',
width: 182
prop: 'current_frequency',
label: '当前频率'
},
{
align: 'center',
prop: 'F',
label: '本月用电量',
width: 182
prop: 'statusName',
label: '设备状态'
},
{
align: 'center',
prop: 'code',
label: '设备编号',
width: 132
label: '设备编号'
}
]
......@@ -120,13 +120,13 @@
<el-button
type="text"
@click="statusHandle"
v-if="activeTab == '01'"
v-if="activeTab == 'b45827c068254695864ee3c1d42573cb'"
>故障复位</el-button
>
<el-button
type="text"
@click="handleBtnClick"
v-if="activeTab != '01'"
v-if="activeTab != 'b45827c068254695864ee3c1d42573cb'"
>设置频率</el-button
>
</template>
......@@ -151,13 +151,7 @@ import enTabs from '../../components/enTabs'
import hallModal from './components/hallModal'
import tablePagination from '@/pages/components/tablePagination'
import {
tableDataOne,
tableColumsOne,
tableColumsTwo,
tableDataTwo,
tableDataThree
} from './config'
import { tableColumsOne, tableColumsTwo, tableColumsThree } from './config'
export default {
components: {
......@@ -219,6 +213,17 @@ export default {
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: {
activeTab(val) {
this.activeTab = val
......@@ -233,7 +238,7 @@ export default {
// this.tableData = tableDataTwo
break
case 'f4c840711eae4bcb9536a890cdfda493':
this.tableColums = tableColumsTwo
this.tableColums = tableColumsThree
// this.tableData = tableDataThree
break
}
......@@ -259,7 +264,7 @@ export default {
if (data && data.code === 0) {
console.log('数据', data)
this.tableData = data.page.rows
// this.tableColums = crecords
this.setDataList()
this.totalSize = data.page.total
} else {
this.dataList = []
......@@ -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() {
this.dataListLoading = true
this.$http({
......
......@@ -2,37 +2,69 @@
{
align: 'center',
prop: 'name',
label: '设备名称',
width: 132
label: '设备名称'
},
{
align: 'center',
prop: 'deployLocation',
label: '设备位置'
// width: 150
},
{
align: 'center',
prop: 'status',
label: '设备状态',
width: 182
prop: 'statusName',
label: '设备状态'
},
{
align: 'center',
prop: 'D',
label: '今日用电量',
width: 182
prop: 'electric_energy',
label: '用电量'
},
// {
// align: 'center',
// prop: 'E',
// label: '本月用电量'
// },
{
align: 'center',
prop: 'E',
label: '本月用电量',
width: 182
prop: 'code',
label: '设备编号'
}
]
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',
prop: 'code',
label: '设备编号',
width: 132
label: '设备编号'
}
]
......@@ -22,31 +22,31 @@
<el-button
type="text"
@click="statusHandle"
v-if="activeTab != '04'"
v-if="activeTab != 'c788ce98c1f248f590434394da485ce4'"
>开启</el-button
>
<el-button
type="text"
@click="statusHandle"
v-if="activeTab != '04'"
v-if="activeTab != 'c788ce98c1f248f590434394da485ce4'"
>关闭</el-button
>
<el-button
type="text"
@click="statusHandle"
v-if="activeTab == '04'"
v-if="activeTab == 'c788ce98c1f248f590434394da485ce4'"
>上升</el-button
>
<el-button
type="text"
@click="statusHandle"
v-if="activeTab == '04'"
v-if="activeTab == 'c788ce98c1f248f590434394da485ce4'"
>下降</el-button
>
<el-button
type="text"
@click="statusHandle"
v-if="activeTab == '04'"
v-if="activeTab == 'c788ce98c1f248f590434394da485ce4'"
>停止</el-button
>
</template>
......@@ -59,7 +59,7 @@
import cardList from '../../components/cardList'
import enTabs from '../../components/enTabs'
import enTable from '../../components/enTable'
import { tableColumsOne } from './config'
import { tableColumsOne, tableColumsTwo } from './config'
export default {
name: 'officeAreaControl',
......@@ -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: {
activeTab(val) {
this.activeTab = val
......@@ -127,7 +144,7 @@ export default {
this.tableColums = tableColumsOne
break
case '173466a2cf9a42a6a17b2bdfbeae36d5':
this.tableColums = tableColumsOne
this.tableColums = tableColumsTwo
break
case '8f5530fee2484e8eb107c0ca672132b2':
this.tableColums = tableColumsOne
......@@ -157,6 +174,7 @@ export default {
if (data && data.code === 0) {
console.log('数据', data)
this.tableData = data.page.rows
this.setDataList()
this.totalSize = data.page.total
} else {
this.dataList = []
......@@ -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() {}
}
}
......
......@@ -28,8 +28,8 @@ card-warp(title="室内气象数据", height="45px", showBackground)
.data-item
.type CO2
.color-green
span.num(v-if="activeName == 1") {{ hcdtSnqx.carbonDioxide }}
span.num(v-else) {{ bgqySnqx.carbonDioxide }}
span.num(v-if="activeName == 1") {{ hcdtSnqx.carbon_dioxide }}
span.num(v-else) {{ bgqySnqx.carbon_dioxide }}
span.unit PPM
el-table(
size="mini",
......@@ -90,7 +90,7 @@ card-warp(title="室内气象数据", height="45px", showBackground)
span ( PPM )
el-table-column(
:resizable="false",
prop="status",
prop="statusName",
header-align="center",
align="center",
label="设备状态"
......@@ -160,11 +160,9 @@ export default {
watch: {},
mounted() {
this.getDataList()
// this.hcdtSnqx.temperature = this.$store.state.d2admin.paramsList.list.hcdtSnqx.temperature
},
methods: {
tabClick(tab, event) {
// console.log(tab, event)
this.getDataList()
},
// 获取数据列表
......@@ -196,8 +194,8 @@ export default {
//修改列表数据
setDataList() {
for (var i = 0; i < this.snqxzList.length; i++) {
this.dataList.forEach(e => {
if (this.snqxzList[i].resource_id == e.id) {
this.dataList.forEach((e) => {
if (this.snqxzList[i].resource_id === e.id) {
this.$set(e, 'temperature', this.snqxzList[i].temperature)
this.$set(e, 'humidity', this.snqxzList[i].humidity)
this.$set(e, 'carbonDioxide', this.snqxzList[i].carbon_dioxide)
......
......@@ -105,7 +105,7 @@ card-warp(title="室外气象数据", height="45px", showBackground)
)
el-table-column(
:resizable="false",
prop="status",
prop="statusName",
header-align="center",
align="center",
label="设备状态"
......@@ -236,8 +236,16 @@ export default {
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], 'Illuminance', this.socketData.Illuminance)
this.$set(this.dataList[i], 'carbon_dioxide', this.socketData.carbon_dioxide)
this.$set(this.dataList[i], 'fine_particles', this.socketData.fine_particles)
this.$set(
this.dataList[i],
'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)
}
},
......
......@@ -13,19 +13,19 @@ export const tableColums = [
},
{
align: 'center',
prop: 'C',
label: '当日功耗',
prop: 'electric_energy',
label: '当日用电量',
width: 162
},
// {
// align: 'center',
// prop: 'D',
// label: '当月用电量',
// width: 162
// },
{
align: 'center',
prop: 'D',
label: '当月功耗',
width: 162
},
{
align: 'center',
prop: 'status',
prop: 'statusName',
label: '设备状态',
width: 152
},
......
......@@ -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: {
activeTab() {
this.getDataList()
......@@ -197,6 +217,7 @@ export default {
if (data && data.code === 0) {
console.log('数据', data)
this.tableData = data.page.rows
this.setDataList()
this.tableColums = tableColums
this.totalSize = data.page.total
} else {
......@@ -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) {
console.log('用电:', data)
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