c22ff144 by weimo934

style(plzl):增加分页显示

1 parent c4599391
1 <template> 1 <template>
2 <div> 2 <div class="main">
3 <el-dialog 3 <el-dialog
4 title="选择宗地" 4 title="选择宗地"
5 :visible.sync="isVisible" 5 :visible.sync="isVisible"
...@@ -74,9 +74,18 @@ ...@@ -74,9 +74,18 @@
74 <td>{{item.qlr}}</td> 74 <td>{{item.qlr}}</td>
75 <td>{{item.zl}}</td> 75 <td>{{item.zl}}</td>
76 </tr> 76 </tr>
77
78 </table> 77 </table>
79 </div> 78 </div>
79 <div class="page">
80 <el-pagination
81 background
82 layout="prev, pager, next,total"
83 :page-size="queryData.pageSize"
84 :total="total"
85 @current-change="currentChange"
86 >
87 </el-pagination>
88 </div>
80 <div class="footer-button"> 89 <div class="footer-button">
81 <el-button type="primary" @click="save">确认</el-button> 90 <el-button type="primary" @click="save">确认</el-button>
82 <el-button type="primary" @click="close">取消</el-button> 91 <el-button type="primary" @click="close">取消</el-button>
...@@ -94,6 +103,7 @@ ...@@ -94,6 +103,7 @@
94 name: "cxlzQueryData", 103 name: "cxlzQueryData",
95 data() { 104 data() {
96 return { 105 return {
106 total: 1,
97 queryData: { 107 queryData: {
98 bdcdyh: "", 108 bdcdyh: "",
99 bdcqzh: "", 109 bdcqzh: "",
...@@ -102,11 +112,13 @@ ...@@ -102,11 +112,13 @@
102 qszt: "2", 112 qszt: "2",
103 xmmc: "", 113 xmmc: "",
104 zddm: "", 114 zddm: "",
105 zl: "" 115 zl: "",
116 pageNo: 1,
117 pageSize: 10,
106 }, 118 },
107 Data: [], 119 Data: [],
108 isVisible: false, 120 isVisible: false,
109 zdbsm:'' 121 zdbsm: ''
110 } 122 }
111 }, 123 },
112 props: { 124 props: {
...@@ -132,12 +144,14 @@ ...@@ -132,12 +144,14 @@
132 created() { 144 created() {
133 }, 145 },
134 methods: { 146 methods: {
147 currentChange: function (val) {
148 this.queryData.pageNo = val;
149 this.getData(this.queryData);
150 },
135 select: function (val) { 151 select: function (val) {
136 this.zdbsm = val.glbsm 152 this.zdbsm = val.glbsm
137 }, 153 },
138 save: function () { 154 save: function () {
139
140
141 zrzcxlz({ 155 zrzcxlz({
142 zdBsm: this.zdbsm, 156 zdBsm: this.zdbsm,
143 zrzBsm: this.zrzbsm 157 zrzBsm: this.zrzbsm
...@@ -157,7 +171,9 @@ ...@@ -157,7 +171,9 @@
157 qszt: "2", 171 qszt: "2",
158 xmmc: "", 172 xmmc: "",
159 zddm: "", 173 zddm: "",
160 zl: "" 174 zl: "",
175 pageNo: 1,
176 pageSize: 10,
161 }; 177 };
162 this.getData(this.queryData) 178 this.getData(this.queryData)
163 }, 179 },
...@@ -165,6 +181,7 @@ ...@@ -165,6 +181,7 @@
165 data['dylxs'] = this.dylxs; 181 data['dylxs'] = this.dylxs;
166 getSearchList(data).then(res => { 182 getSearchList(data).then(res => {
167 this.Data = res.result.records 183 this.Data = res.result.records
184 this.total = res.result.total;
168 }) 185 })
169 }, 186 },
170 search: function () { 187 search: function () {
...@@ -187,10 +204,11 @@ ...@@ -187,10 +204,11 @@
187 <style scoped lang="less"> 204 <style scoped lang="less">
188 205
189 .main { 206 .main {
190 box-sizing: border-box; 207 /*box-sizing: border-box;*/
191 padding: 18px; 208 padding: 18px;
192 height: auto; 209 height: 800px;
193 width: 80%; 210 width: 80%;
211 position: absolute;
194 } 212 }
195 213
196 table { 214 table {
...@@ -226,9 +244,12 @@ ...@@ -226,9 +244,12 @@
226 color: #b2b2b2; 244 color: #b2b2b2;
227 } 245 }
228 246
247 .search {
248 height: 650px;
249 }
250
229 .footer-button { 251 .footer-button {
230 text-align: center; 252 text-align: center;
231 margin-top: 20px; 253 margin-top: 20px;
232 } 254 }
233
234 </style> 255 </style>
......
...@@ -76,10 +76,11 @@ ...@@ -76,10 +76,11 @@
76 @close="close" 76 @close="close"
77 :zrzbsm="zrzbsm" 77 :zrzbsm="zrzbsm"
78 ></cxlz-query-data> 78 ></cxlz-query-data>
79 <div> 79 <div class="page">
80 <el-pagination 80 <el-pagination
81 background 81 background
82 layout="prev, pager, next,total" 82 layout="prev, pager, next,total"
83 :page-size="queryData.pageSize"
83 :total="total" 84 :total="total"
84 @current-change="currentChange" 85 @current-change="currentChange"
85 > 86 >
...@@ -89,12 +90,12 @@ ...@@ -89,12 +90,12 @@
89 </template> 90 </template>
90 91
91 <script> 92 <script>
92 import { getSearchList } from "./../../../../api/search"; 93 import {getSearchList} from "./../../../../api/search";
93 import cxlzQueryData from "../../../../components/cxlxQueryData/cxlzQueryData"; 94 import cxlzQueryData from "../../../../components/cxlxQueryData/cxlzQueryData";
94 95
95 export default { 96 export default {
96 name: "", 97 name: "",
97 components: { cxlzQueryData }, 98 components: {cxlzQueryData},
98 props: {}, 99 props: {},
99 data() { 100 data() {
100 return { 101 return {
...@@ -111,34 +112,31 @@ export default { ...@@ -111,34 +112,31 @@ export default {
111 zddm: "", 112 zddm: "",
112 zl: "", 113 zl: "",
113 pageNo: 1, 114 pageNo: 1,
114 pageSize: 5, 115 pageSize: 12,
115 }, 116 },
116 Data: [], 117 Data: [],
117 dylxs: ["zd"], 118 dylxs: ["zd"],
118 }; 119 };
119 }, 120 },
120 created() {}, 121 created() {
122 },
121 mounted() { 123 mounted() {
122 this.getData(this.queryData); 124 this.getData(this.queryData);
123 }, 125 },
124 methods: { 126 methods: {
125 sizeChange: function(val) { 127 currentChange: function (val) {
126 console.log(`每页 ${val} 条`);
127 this.queryData.pageSize = val;
128 },
129 currentChange: function(val) {
130 console.log(`当前页: ${val}`); 128 console.log(`当前页: ${val}`);
131 this.queryData.pageNo = val; 129 this.queryData.pageNo = val;
132 this.getData(this.queryData); 130 this.getData(this.queryData);
133 }, 131 },
134 xzzrz: function(item) { 132 xzzrz: function (item) {
135 this.centerDialogVisible = true; 133 this.centerDialogVisible = true;
136 this.zrzbsm = item.glbsm; 134 this.zrzbsm = item.glbsm;
137 }, 135 },
138 close: function() { 136 close: function () {
139 this.centerDialogVisible = false; 137 this.centerDialogVisible = false;
140 }, 138 },
141 result: function() { 139 result: function () {
142 this.queryData = { 140 this.queryData = {
143 bdcdyh: "", 141 bdcdyh: "",
144 bdcqzh: "", 142 bdcqzh: "",
...@@ -149,62 +147,69 @@ export default { ...@@ -149,62 +147,69 @@ export default {
149 zddm: "", 147 zddm: "",
150 zl: "", 148 zl: "",
151 pageNo: 1, 149 pageNo: 1,
152 pageSize: 10, 150 pageSize: 12,
153 }; 151 };
154 this.getData(this.queryData); 152 this.getData(this.queryData);
155 }, 153 },
156 getData: function(data) { 154 getData: function (data) {
157 getSearchList(data).then((res) => { 155 getSearchList(data).then((res) => {
158 this.Data = res.result.records; 156 this.Data = res.result.records;
159 this.total = res.result.total; 157 this.total = res.result.total;
160 }); 158 });
161 }, 159 },
162 search: function() { 160 search: function () {
163 this.getData(this.queryData); 161 this.getData(this.queryData);
164 }, 162 },
165 }, 163 },
166 computed: {}, 164 computed: {},
167 watch: {}, 165 watch: {},
168 }; 166 };
169 </script> 167 </script>
170 <style scoped lang="less"> 168 <style scoped lang="less">
171 .main { 169 .main {
172 box-sizing: border-box; 170 box-sizing: border-box;
173 padding: 18px; 171 padding: 18px;
174 height: auto; 172 height: auto;
175 width: 80%; 173 width: 80%;
176 } 174 }
177 175
178 table { 176 table {
179 margin-top: 10px; 177 margin-top: 10px;
180 background-color: #fff; 178 background-color: #fff;
181 font-size: 14px; 179 font-size: 14px;
182 width: 100%; 180 width: 100%;
183 } 181 }
184 182
185 td { 183 td {
186 text-align: center; 184 text-align: center;
187 height: 36px; 185 height: 36px;
188 min-width: 50px; 186 min-width: 50px;
189 } 187 }
190 188
191 table:hover { 189 table:hover {
192 cursor: pointer; 190 cursor: pointer;
193 } 191 }
194 192
195 .inputtitle { 193 .inputtitle {
196 line-height: 40px; 194 line-height: 40px;
197 } 195 }
198 196
199 .shop { 197 .shop {
200 margin-top: 20px; 198 margin-top: 20px;
201 } 199 }
202 200
203 .xz { 201 .xz {
204 color: blue; 202 color: blue;
205 } 203 }
206 204
207 .noData { 205 .noData {
208 color: #b2b2b2; 206 color: #b2b2b2;
209 } 207 }
208
209 .page {
210 position: fixed;
211 bottom: 20px;
212 width: auto;
213 height: auto;
214 }
210 </style> 215 </style>
......