|
@@ -17,7 +17,18 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<el-empty description="暂无数据" v-else></el-empty>
|
|
|
-
|
|
|
+ <div style="margin-top:16px;text-align:center">
|
|
|
+ <el-pagination
|
|
|
+ background
|
|
|
+ small
|
|
|
+ @size-change="handleSizeChange"
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
+ :current-page="currentPage"
|
|
|
+ :page-size="params.content.pageSize"
|
|
|
+ layout="total, prev, pager, next, jumper"
|
|
|
+ :total="total">
|
|
|
+ </el-pagination>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -45,6 +56,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
total:0,
|
|
|
+ currentPage:0
|
|
|
};
|
|
|
},
|
|
|
components:{selectClass},
|
|
@@ -82,7 +94,7 @@ export default {
|
|
|
let res = await this.$api.requested(this.params)
|
|
|
this.productGroup = res.data
|
|
|
this.total = res.total
|
|
|
- console.log(this.productGroup);
|
|
|
+ this.currentPage = res.pageNumber
|
|
|
},
|
|
|
itemClick(id) {
|
|
|
this.$router.push({
|
|
@@ -118,7 +130,17 @@ export default {
|
|
|
clickField (item) {
|
|
|
this.params.content.tradefield = item.tradefield
|
|
|
this.getProductGroup()
|
|
|
- }
|
|
|
+ },
|
|
|
+ handleSizeChange(val) {
|
|
|
+ // console.log(`每页 ${val} 条`);
|
|
|
+ this.params.content.pageSize = val
|
|
|
+ this.listData()
|
|
|
+ },
|
|
|
+ handleCurrentChange(val) {
|
|
|
+ // console.log(`当前页: ${val}`);
|
|
|
+ this.params.content.pageNumber = val
|
|
|
+ this.listData()
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|