1e6a684d by weimo934

feat(plzl):添加分页

1 parent f106adca
......@@ -74,6 +74,18 @@
</span>
<cxlz-query-data :centerDialogVisible="centerDialogVisible" :dylxs="dylxs" @close="close"
:zrzbsm="zrzbsm"></cxlz-query-data>
<div>
<el-pagination
background
@size-change="sizeChange"
@current-change="currentChange"
:current-page.sync="queryData.pageNo"
:page-size="queryData.pageSize"
layout="total, prev, pager, next"
:total="total">
</el-pagination>
</div>
</div>
</template>
......@@ -87,6 +99,7 @@
props: {},
data() {
return {
total: 1,
centerDialogVisible: false,
zrzbsm: "",
queryData: {
......@@ -98,6 +111,8 @@
xmmc: "",
zddm: "",
zl: "",
pageNo: 1,
pageSize: 5
},
Data: [],
dylxs: ['zd']
......@@ -109,6 +124,15 @@
this.getData(this.queryData)
},
methods: {
sizeChange: function (val) {
console.log(`每页 ${val} 条`);
this.queryData.pageSize = val
},
currentChange: function (val) {
console.log(`当前页: ${val}`);
this.queryData.pageNo = val
this.getData(this.queryData)
},
xzzrz: function (item) {
this.centerDialogVisible = true;
this.zrzbsm = item.glbsm;
......@@ -120,18 +144,21 @@
this.queryData = {
bdcdyh: "",
bdcqzh: "",
dylxs: ['zrz'],
qlrmc: "",
qszt: "",
xmmc: "",
zddm: "",
zl: "",
dylxs: ['zrz']
pageNo: 1,
pageSize: 10
};
this.getData(this.queryData)
},
getData: function (data) {
getSearchList(data).then(res => {
this.Data = res.result.records
this.total = res.total
})
},
search: function () {
......