feat(plzl):添加分页
Showing
1 changed file
with
28 additions
and
1 deletions
... | @@ -74,6 +74,18 @@ | ... | @@ -74,6 +74,18 @@ |
74 | </span> | 74 | </span> |
75 | <cxlz-query-data :centerDialogVisible="centerDialogVisible" :dylxs="dylxs" @close="close" | 75 | <cxlz-query-data :centerDialogVisible="centerDialogVisible" :dylxs="dylxs" @close="close" |
76 | :zrzbsm="zrzbsm"></cxlz-query-data> | 76 | :zrzbsm="zrzbsm"></cxlz-query-data> |
77 | <div> | ||
78 | <el-pagination | ||
79 | background | ||
80 | @size-change="sizeChange" | ||
81 | @current-change="currentChange" | ||
82 | :current-page.sync="queryData.pageNo" | ||
83 | :page-size="queryData.pageSize" | ||
84 | layout="total, prev, pager, next" | ||
85 | :total="total"> | ||
86 | </el-pagination> | ||
87 | </div> | ||
88 | |||
77 | </div> | 89 | </div> |
78 | </template> | 90 | </template> |
79 | 91 | ||
... | @@ -87,6 +99,7 @@ | ... | @@ -87,6 +99,7 @@ |
87 | props: {}, | 99 | props: {}, |
88 | data() { | 100 | data() { |
89 | return { | 101 | return { |
102 | total: 1, | ||
90 | centerDialogVisible: false, | 103 | centerDialogVisible: false, |
91 | zrzbsm: "", | 104 | zrzbsm: "", |
92 | queryData: { | 105 | queryData: { |
... | @@ -98,6 +111,8 @@ | ... | @@ -98,6 +111,8 @@ |
98 | xmmc: "", | 111 | xmmc: "", |
99 | zddm: "", | 112 | zddm: "", |
100 | zl: "", | 113 | zl: "", |
114 | pageNo: 1, | ||
115 | pageSize: 5 | ||
101 | }, | 116 | }, |
102 | Data: [], | 117 | Data: [], |
103 | dylxs: ['zd'] | 118 | dylxs: ['zd'] |
... | @@ -109,6 +124,15 @@ | ... | @@ -109,6 +124,15 @@ |
109 | this.getData(this.queryData) | 124 | this.getData(this.queryData) |
110 | }, | 125 | }, |
111 | methods: { | 126 | methods: { |
127 | sizeChange: function (val) { | ||
128 | console.log(`每页 ${val} 条`); | ||
129 | this.queryData.pageSize = val | ||
130 | }, | ||
131 | currentChange: function (val) { | ||
132 | console.log(`当前页: ${val}`); | ||
133 | this.queryData.pageNo = val | ||
134 | this.getData(this.queryData) | ||
135 | }, | ||
112 | xzzrz: function (item) { | 136 | xzzrz: function (item) { |
113 | this.centerDialogVisible = true; | 137 | this.centerDialogVisible = true; |
114 | this.zrzbsm = item.glbsm; | 138 | this.zrzbsm = item.glbsm; |
... | @@ -120,18 +144,21 @@ | ... | @@ -120,18 +144,21 @@ |
120 | this.queryData = { | 144 | this.queryData = { |
121 | bdcdyh: "", | 145 | bdcdyh: "", |
122 | bdcqzh: "", | 146 | bdcqzh: "", |
147 | dylxs: ['zrz'], | ||
123 | qlrmc: "", | 148 | qlrmc: "", |
124 | qszt: "", | 149 | qszt: "", |
125 | xmmc: "", | 150 | xmmc: "", |
126 | zddm: "", | 151 | zddm: "", |
127 | zl: "", | 152 | zl: "", |
128 | dylxs: ['zrz'] | 153 | pageNo: 1, |
154 | pageSize: 10 | ||
129 | }; | 155 | }; |
130 | this.getData(this.queryData) | 156 | this.getData(this.queryData) |
131 | }, | 157 | }, |
132 | getData: function (data) { | 158 | getData: function (data) { |
133 | getSearchList(data).then(res => { | 159 | getSearchList(data).then(res => { |
134 | this.Data = res.result.records | 160 | this.Data = res.result.records |
161 | this.total = res.total | ||
135 | }) | 162 | }) |
136 | }, | 163 | }, |
137 | search: function () { | 164 | search: function () { | ... | ... |
-
Please register or sign in to post a comment