Commit 5689716a authored by co_dengxiongwen's avatar co_dengxiongwen

页面调整

parent 6a6da91b
......@@ -19,7 +19,7 @@
},
{
align: 'center',
prop: 'D',
prop: 'electric_energy',
label: '今日用电量',
width: 182
},
......@@ -52,7 +52,7 @@
},
{
align: 'center',
prop: 'C',
prop: 'current_frequency',
label: '当前频率',
width: 182
},
......@@ -64,7 +64,7 @@
},
{
align: 'center',
prop: 'E',
prop: 'electric_energy',
label: '今日用电量',
width: 182
},
......
......@@ -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 } 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
......@@ -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,47 @@ 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], '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], 'electric_energy', e.electric_energy)
this.$set(
this.tableData[i],
'current_frequency',
e.current_frequency
)
}
})
}
}
},
getAllHcdt() {
this.dataListLoading = true
this.$http({
......
......@@ -19,7 +19,7 @@
},
{
align: 'center',
prop: 'D',
prop: 'electric_energy',
label: '今日用电量',
width: 182
},
......@@ -36,3 +36,30 @@
width: 132
}
]
export const tableColumsTwo = [
{
align: 'center',
prop: 'name',
label: '设备名称'
// width: 132
},
{
align: 'center',
prop: 'deployLocation',
label: '设备位置'
// width: 150
},
{
align: 'center',
prop: 'status',
label: '设备状态'
// width: 182
},
{
align: 'center',
prop: 'code',
label: '设备编号'
// width: 132
}
]
......@@ -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,20 @@ 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
}
},
watch: {
activeTab(val) {
this.activeTab = val
......@@ -127,7 +141,7 @@ export default {
this.tableColums = tableColumsOne
break
case '173466a2cf9a42a6a17b2bdfbeae36d5':
this.tableColums = tableColumsOne
this.tableColums = tableColumsTwo
break
case '8f5530fee2484e8eb107c0ca672132b2':
this.tableColums = tableColumsOne
......@@ -157,6 +171,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 +179,58 @@ 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 === '173466a2cf9a42a6a17b2bdfbeae36d5'
) {
//多联室内机
} else if (
this.tableData[i].type === '49f5921a6d7f43cfa222c09f0223ae04'
) {
//换气扇
} 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)
}
})
}
}
},
statusHandle() {}
}
}
......
......@@ -234,7 +234,6 @@ export default {
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 (
......
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