综合查询分页!接口联调
Showing
2 changed files
with
41 additions
and
35 deletions
... | @@ -2,9 +2,10 @@ import request from '@/plugin/axios' | ... | @@ -2,9 +2,10 @@ import request from '@/plugin/axios' |
2 | /** | 2 | /** |
3 | * 查询所有行政区 | 3 | * 查询所有行政区 |
4 | */ | 4 | */ |
5 | export function getSearchList() { | 5 | export function getSearchList(data) { |
6 | return request({ | 6 | return request({ |
7 | url: '/system/basiccommon/query', | 7 | url: '/system/basiccommon/query', |
8 | method: 'get', | 8 | method: 'get', |
9 | params : data, | ||
9 | }) | 10 | }) |
10 | } | 11 | } |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -34,7 +34,9 @@ | ... | @@ -34,7 +34,9 @@ |
34 | </el-table-column> | 34 | </el-table-column> |
35 | </el-table> | 35 | </el-table> |
36 | <div class="pagination"> | 36 | <div class="pagination"> |
37 | <el-pagination background layout="prev, pager, next" :total="1000"> | 37 | <el-pagination background layout="prev, pager, next" :total="1000" |
38 | @current-change="handleCurrentChange" | ||
39 | :current-page.sync="currentPage"> | ||
38 | </el-pagination> | 40 | </el-pagination> |
39 | </div> | 41 | </div> |
40 | </div> | 42 | </div> |
... | @@ -50,48 +52,27 @@ export default { | ... | @@ -50,48 +52,27 @@ export default { |
50 | props: {}, | 52 | props: {}, |
51 | data() { | 53 | data() { |
52 | return { | 54 | return { |
55 | pageNo:1, | ||
56 | pageSize:10, | ||
57 | zddm:'', | ||
58 | zl:'', | ||
59 | bdcdyh:'', | ||
60 | dylx:'', | ||
61 | qlrmc:'', | ||
62 | xmmc:'', | ||
63 | bdcqzh:'', | ||
53 | formData: { | 64 | formData: { |
54 | user: "", | 65 | user: "", |
55 | region: "", | 66 | region: "", |
56 | type: [], | 67 | type: [], |
57 | }, | 68 | }, |
58 | tableData: [ | 69 | tableData: [], |
59 | // { | ||
60 | // bdcdyh: "610101001001GB00001W", | ||
61 | // xmmc: "万科集团万科城", | ||
62 | // bdcqzh: "陕(2017)西安市不动产权第00000", | ||
63 | // lx: "宗地", | ||
64 | // qlr: "李子新", | ||
65 | // zl: "灞桥-田家湾-咸宁东路,近浐河西路", | ||
66 | // zrsj: "2020.09.07 ", | ||
67 | // cjr: "李子新", | ||
68 | // }, | ||
69 | ], | ||
70 | tableHeight: "", | 70 | tableHeight: "", |
71 | }; | 71 | }; |
72 | }, | 72 | }, |
73 | created() {}, | 73 | created() {}, |
74 | mounted() { | 74 | mounted() { |
75 | getSearchList().then((res)=>{ | 75 | this.loadList(); |
76 | console.log(res) | ||
77 | if(res.code===200){ | ||
78 | this.tableData=res.result.records; | ||
79 | console.log(this.tableData) | ||
80 | } | ||
81 | }) | ||
82 | // for (let i = 0; i < 11; i++) { | ||
83 | // let obj = { | ||
84 | // bdcdyh: "610101001001GB00001W", | ||
85 | // xmmc: "万科集团万科城", | ||
86 | // bdcqzh: "陕(2017)西安市不动产权第00000", | ||
87 | // lx: "自然幢", | ||
88 | // qlr: "李子新", | ||
89 | // zl: "灞桥-田家湾-咸宁东路,近浐河西路", | ||
90 | // zrsj: "2020.09.07 ", | ||
91 | // cjr: "李子新", | ||
92 | // }; | ||
93 | // this.tableData.push(obj); | ||
94 | // } | ||
95 | this.tableHeight = this.$refs.dataGrid.offsetHeight - 68; | 76 | this.tableHeight = this.$refs.dataGrid.offsetHeight - 68; |
96 | }, | 77 | }, |
97 | methods: { | 78 | methods: { |
... | @@ -103,7 +84,11 @@ export default { | ... | @@ -103,7 +84,11 @@ export default { |
103 | return ""; | 84 | return ""; |
104 | } | 85 | } |
105 | }, | 86 | }, |
106 | 87 | handleCurrentChange(val){ | |
88 | console.log(`当前页: ${val}`); | ||
89 | this.pageNo=val; | ||
90 | this.loadList(); | ||
91 | }, | ||
107 | //获取子组件点击查询触发的事件 | 92 | //获取子组件点击查询触发的事件 |
108 | getData(obj) { | 93 | getData(obj) { |
109 | console.log(obj); | 94 | console.log(obj); |
... | @@ -130,6 +115,26 @@ export default { | ... | @@ -130,6 +115,26 @@ export default { |
130 | } | 115 | } |
131 | }); | 116 | }); |
132 | }, | 117 | }, |
118 | loadList(){ | ||
119 | let params={ | ||
120 | zddm:this.zddm, | ||
121 | zl:this.zl, | ||
122 | bdcdyh:this.bdcdyh, | ||
123 | dylx:this.dylx, | ||
124 | qlrmc:this.qlrmc, | ||
125 | xmmc:this.xmmc, | ||
126 | bdcqzh:this.bdcqzh, | ||
127 | pageNo:this.pageNo, | ||
128 | pageSize:this.pageSize, | ||
129 | } | ||
130 | getSearchList(params).then((res)=>{ | ||
131 | console.log(res) | ||
132 | if(res.code===200){ | ||
133 | this.tableData=res.result.records; | ||
134 | console.log(this.tableData) | ||
135 | } | ||
136 | }) | ||
137 | } | ||
133 | }, | 138 | }, |
134 | computed: {}, | 139 | computed: {}, |
135 | watch: {}, | 140 | watch: {}, | ... | ... |
-
Please register or sign in to post a comment