|
|
@@ -1,8 +1,7 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
<el-breadcrumb separator-class="el-icon-arrow-right">
|
|
|
- <el-breadcrumb-item>测报系统</el-breadcrumb-item>
|
|
|
- <el-breadcrumb-item :to="{ path: '/index/cbd' }">虫情测报</el-breadcrumb-item>
|
|
|
+ <el-breadcrumb-item :to="{ path: '/index/cbd' }">物联网虫情测报</el-breadcrumb-item>
|
|
|
<el-breadcrumb-item>害虫统计</el-breadcrumb-item>
|
|
|
</el-breadcrumb>
|
|
|
<div class="equipInfo">
|
|
|
@@ -85,7 +84,7 @@
|
|
|
<!-- <el-button type="primary" size="mini" @click.stop="dowonloadFile">导出</el-button> -->
|
|
|
</div>
|
|
|
<el-card class="box-card">
|
|
|
- <el-table :data="tableData" stripe style="width: 100%">
|
|
|
+ <el-table :data="currTableData" stripe style="width: 100%">
|
|
|
<el-table-column
|
|
|
v-for="(item,index) in tableHeadTxt"
|
|
|
:key="index"
|
|
|
@@ -95,6 +94,17 @@
|
|
|
<template slot-scope="scope">{{scope.row[scope.column.property]}}</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
+
|
|
|
+ <el-pagination
|
|
|
+ v-if="currTableData.length"
|
|
|
+ background
|
|
|
+ layout="prev, pager, next"
|
|
|
+ :page='queryInfo.page'
|
|
|
+ :total="total"
|
|
|
+ @prev-click="prevClick"
|
|
|
+ @next-click="nextClick"
|
|
|
+ @current-change="changePage">
|
|
|
+ </el-pagination>
|
|
|
</el-card>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -139,6 +149,7 @@ export default {
|
|
|
],
|
|
|
// 表格数据
|
|
|
tableData: [],
|
|
|
+ currTableData:[],
|
|
|
tableDataA: [],
|
|
|
timeRange: '',
|
|
|
queryInfo: {
|
|
|
@@ -517,15 +528,29 @@ export default {
|
|
|
}
|
|
|
var resultItem = result[j].split(',');
|
|
|
arr.push({
|
|
|
- name:this.allPest[resultItem[1]],
|
|
|
- sum:resultItem[0],
|
|
|
+ name:this.allPest[resultItem[0]],
|
|
|
+ sum:resultItem[1],
|
|
|
time:dat[i].time
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- this.tableData = arr
|
|
|
+ this.tableData = arr;
|
|
|
+ this.total = this.tableData.length;
|
|
|
+ this.currTableData = this.tableData.slice((this.queryInfo.page-1)*10,this.queryInfo.page*10)
|
|
|
},
|
|
|
+ prevClick(val){
|
|
|
+ this.queryInfo.page--;
|
|
|
+ this.currTableData = this.tableData.slice((this.queryInfo.page-1)*10,this.queryInfo.page*10)
|
|
|
+ },
|
|
|
+ nextClick(val){
|
|
|
+ this.queryInfo.page++;
|
|
|
+ this.currTableData = this.tableData.slice((this.queryInfo.page-1)*10,this.queryInfo.page*10)
|
|
|
+ },
|
|
|
+ //改变page
|
|
|
+ changePage(val){
|
|
|
+ this.queryInfo.page=val;
|
|
|
+ this.currTableData = this.tableData.slice((this.queryInfo.page-1)*10,this.queryInfo.page*10)
|
|
|
+ },
|
|
|
|
|
|
// 下拉框筛选害虫名称
|
|
|
screenInsect() {
|