|
@@ -66,7 +66,10 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="el-pagination-wrap">
|
|
|
- <el-pagination small layout="prev, pager, next" :total="50" />
|
|
|
+ <el-pagination small layout="prev, pager, next"
|
|
|
+ :total="total"
|
|
|
+ @size-change="handleSizeChange"
|
|
|
+ @current-change="handleCurrentChange" />
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -104,6 +107,7 @@
|
|
|
<script>
|
|
|
import AlertChart from './components/AlertChart.vue'
|
|
|
import WarnChart from './components/WarnChart.vue'
|
|
|
+import { getSensorByPage } from '@/api/goaf/sensor'
|
|
|
export default {
|
|
|
name:"sensor",
|
|
|
components:{
|
|
@@ -114,6 +118,11 @@ import WarnChart from './components/WarnChart.vue'
|
|
|
return{
|
|
|
activeId:'1',
|
|
|
activetab:'1',
|
|
|
+ conditions: {
|
|
|
+ page: 1,
|
|
|
+ limit: 8,
|
|
|
+ goafName:""
|
|
|
+ },
|
|
|
items:[
|
|
|
{name:"首页",id:"1",path:"/particulars/sensor"},
|
|
|
{name:"压力传感器",id:"2",path:"/particulars/check"},
|
|
@@ -142,7 +151,9 @@ import WarnChart from './components/WarnChart.vue'
|
|
|
{label:1,value:2},
|
|
|
{label:2,value:3},
|
|
|
{label:3,value:4}
|
|
|
- ]
|
|
|
+ ],
|
|
|
+ dataList:[],
|
|
|
+ total:0
|
|
|
}
|
|
|
},
|
|
|
created(){
|
|
@@ -155,6 +166,14 @@ import WarnChart from './components/WarnChart.vue'
|
|
|
this.$refs['warn-chart'].init();
|
|
|
})
|
|
|
},
|
|
|
+ getData(){
|
|
|
+ getSensorByPage(this.conditions).then((resp) => {
|
|
|
+ this.listLoading = false
|
|
|
+ const {data, total } = resp
|
|
|
+ this.dataList = data
|
|
|
+ this.total = total
|
|
|
+ })
|
|
|
+ },
|
|
|
changeHead(item){
|
|
|
this.activeId=item.id
|
|
|
if(item.id==='5'){
|
|
@@ -176,6 +195,13 @@ import WarnChart from './components/WarnChart.vue'
|
|
|
range:0
|
|
|
}
|
|
|
},
|
|
|
+ handleSizeChange(limit){
|
|
|
+ this.conditions.limit=limit
|
|
|
+ this.getData()
|
|
|
+ },
|
|
|
+ handleCurrentChange(pageNumber){
|
|
|
+ this.conditions.page=pageNumber
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|