电位列表
This commit is contained in:
@ -64,9 +64,9 @@ export function getDeviceList(siteId) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//获取设备点位table
|
//获取设备点位table
|
||||||
export function getDevicePointList({siteId,deviceCategory,pageNum,pageSize}) {
|
export function getDevicePointList({siteId,deviceId,deviceCategory,pageNum,pageSize}) {
|
||||||
return request({
|
return request({
|
||||||
url: `/ems/siteConfig/getDevicePointList?siteId=${siteId}&pageNum=${pageNum}&pageSize=${pageSize}&deviceCategory=${deviceCategory}`,
|
url: `/ems/siteConfig/getDevicePointList?siteId=${siteId}&deviceId=${deviceId}&pageNum=${pageNum}&pageSize=${pageSize}&deviceCategory=${deviceCategory}`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -2,52 +2,52 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
:visible.sync="show"
|
|
||||||
title="点位列表"
|
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
show-close
|
:visible.sync="show"
|
||||||
|
append-to-body
|
||||||
|
class="ems-dialog"
|
||||||
destroy-on-close
|
destroy-on-close
|
||||||
lock-scroll
|
lock-scroll
|
||||||
append-to-body
|
show-close
|
||||||
|
title="点位列表"
|
||||||
width="800px"
|
width="800px"
|
||||||
class="ems-dialog"
|
|
||||||
>
|
>
|
||||||
<el-table
|
<el-table
|
||||||
class="common-table"
|
|
||||||
:data="tableData"
|
:data="tableData"
|
||||||
stripe
|
class="common-table"
|
||||||
max-height="400px"
|
max-height="400px"
|
||||||
|
stripe
|
||||||
style="width: 100%;">
|
style="width: 100%;">
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="dataPoint"
|
label="数据点位"
|
||||||
label="数据点位">
|
prop="dataPoint">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="dataPointName"
|
label="数据点位名称"
|
||||||
label="数据点位名称">
|
prop="dataPointName">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="pointValue"
|
label="最新值"
|
||||||
label="最新值">
|
prop="pointValue">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="updateTime"
|
label="更新时间"
|
||||||
label="更新时间">
|
prop="updateTime">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<el-pagination
|
<el-pagination
|
||||||
v-show="tableData.length>0"
|
v-show="tableData.length>0"
|
||||||
small
|
|
||||||
background
|
|
||||||
@size-change="handleSizeChange"
|
|
||||||
@current-change="handleCurrentChange"
|
|
||||||
:pager-count="5"
|
|
||||||
:current-page="pageNum"
|
:current-page="pageNum"
|
||||||
:page-size="pageSize"
|
:page-size="pageSize"
|
||||||
:page-sizes="[10, 20, 30, 40]"
|
:page-sizes="[10, 20, 30, 40]"
|
||||||
layout="total, sizes, prev, pager, next, jumper"
|
:pager-count="5"
|
||||||
:total="totalSize"
|
:total="totalSize"
|
||||||
|
background
|
||||||
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
small
|
||||||
style="margin-top:15px;text-align: center"
|
style="margin-top:15px;text-align: center"
|
||||||
|
@size-change="handleSizeChange"
|
||||||
|
@current-change="handleCurrentChange"
|
||||||
>
|
>
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@ -82,16 +82,21 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
showTable({deviceCategory,siteId}){
|
showTable({deviceCategory,siteId,deviceId}){
|
||||||
this.deviceCategory =deviceCategory
|
this.deviceCategory =deviceCategory
|
||||||
this.siteId=siteId
|
this.siteId=siteId
|
||||||
|
this.deviceId=deviceId
|
||||||
|
this.tableData=[]
|
||||||
|
this.pageSize=10//分页栏当前每个数据总数
|
||||||
|
this.pageNum=1//分页栏当前页数
|
||||||
|
this.totalSize=0//table表格数据总数
|
||||||
this.show=true
|
this.show=true
|
||||||
this.getData()
|
this.getData()
|
||||||
},
|
},
|
||||||
getData(){
|
getData(){
|
||||||
this.loading=true
|
this.loading=true
|
||||||
const {siteId,deviceCategory,pageNum,pageSize} =this
|
const {siteId,deviceId,deviceCategory,pageNum,pageSize} =this
|
||||||
getDevicePointList({siteId,deviceCategory,pageNum,pageSize}).then(response => {
|
getDevicePointList({siteId,deviceId,deviceCategory,pageNum,pageSize}).then(response => {
|
||||||
this.tableData=response?.rows || [];
|
this.tableData=response?.rows || [];
|
||||||
this.totalSize = response?.total || 0
|
this.totalSize = response?.total || 0
|
||||||
}).finally(() => {this.loading=false})
|
}).finally(() => {this.loading=false})
|
||||||
@ -112,7 +117,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style lang="scss" scoped>
|
||||||
::v-deep {
|
::v-deep {
|
||||||
.card-title .el-radio{
|
.card-title .el-radio{
|
||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
|
|||||||
@ -152,7 +152,7 @@ export default {
|
|||||||
methods:{
|
methods:{
|
||||||
// 查看设备电位表格
|
// 查看设备电位表格
|
||||||
pointDetail(row){
|
pointDetail(row){
|
||||||
this.$refs.pointTable.showTable({deviceCategory:row.deviceCategory,siteId:row.siteId})
|
this.$refs.pointTable.showTable({deviceCategory:row.deviceCategory,siteId:row.siteId,deviceId:row.deviceId})
|
||||||
},
|
},
|
||||||
clearEditDeviceData(){
|
clearEditDeviceData(){
|
||||||
this.mode = '';
|
this.mode = '';
|
||||||
|
|||||||
Reference in New Issue
Block a user