|
@@ -54,6 +54,9 @@
|
|
|
:operation='operation'
|
|
:operation='operation'
|
|
|
:discolor='discolor'
|
|
:discolor='discolor'
|
|
|
:totalPage='totalPage'
|
|
:totalPage='totalPage'
|
|
|
|
|
+ :currentPage='currentPage'
|
|
|
|
|
+ @change_page='changePage'
|
|
|
|
|
+ @jump_page='jumpPage'
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
<button @click="submit" class="submitBtn">提交</button>
|
|
<button @click="submit" class="submitBtn">提交</button>
|
|
@@ -80,9 +83,10 @@ export default {
|
|
|
range: '',
|
|
range: '',
|
|
|
addByCustomize: '',
|
|
addByCustomize: '',
|
|
|
// 表格配置
|
|
// 表格配置
|
|
|
- sum: 100, // 一共有多少条数据
|
|
|
|
|
|
|
+ sum: 240, // 一共有多少条数据
|
|
|
pageSize: 20, // 每页展示的数据
|
|
pageSize: 20, // 每页展示的数据
|
|
|
discolor: false, // 是否隔行变色
|
|
discolor: false, // 是否隔行变色
|
|
|
|
|
+ currentPage: 1,
|
|
|
areaList: ['全区', '北区', '南区', '东区', '自定义分组'],
|
|
areaList: ['全区', '北区', '南区', '东区', '自定义分组'],
|
|
|
materialTimeList: ['2020-03', '2020-04'],
|
|
materialTimeList: ['2020-03', '2020-04'],
|
|
|
rangeList: ['1', '2', '3'],
|
|
rangeList: ['1', '2', '3'],
|
|
@@ -117,6 +121,29 @@ export default {
|
|
|
showDetail: () => {
|
|
showDetail: () => {
|
|
|
alert('展示详情');
|
|
alert('展示详情');
|
|
|
},
|
|
},
|
|
|
|
|
+ // 获取某一页面的数据,展示在表格
|
|
|
|
|
+ changePage: function(page) {
|
|
|
|
|
+ this.currentPage = page;
|
|
|
|
|
+ console.log(page);
|
|
|
|
|
+ },
|
|
|
|
|
+ // 点击上一页,下一页,首页,尾页
|
|
|
|
|
+ jumpPage: function(item) {
|
|
|
|
|
+ switch(item) {
|
|
|
|
|
+ case 1:
|
|
|
|
|
+ this.currentPage = 1;
|
|
|
|
|
+ break;
|
|
|
|
|
+ case 2:
|
|
|
|
|
+ this.currentPage = this.currentPage - 1;
|
|
|
|
|
+ break;
|
|
|
|
|
+ case 3:
|
|
|
|
|
+ this.currentPage = this.currentPage + 1;
|
|
|
|
|
+ break;
|
|
|
|
|
+ case 4:
|
|
|
|
|
+ this.currentPage = this.totalPage;
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ console.log(this.currentPage);
|
|
|
|
|
+ },
|
|
|
submit: function() {
|
|
submit: function() {
|
|
|
console.log(this.totalPage);
|
|
console.log(this.totalPage);
|
|
|
this.sum = this.sum + 1;
|
|
this.sum = this.sum + 1;
|