decc474c by zhaoqian

综合查询分页!接口联调

1 parent 8a41d1bf
......@@ -2,9 +2,10 @@ import request from '@/plugin/axios'
/**
* 查询所有行政区
*/
export function getSearchList() {
export function getSearchList(data) {
return request({
url: '/system/basiccommon/query',
method: 'get',
params : data,
})
}
\ No newline at end of file
......
......@@ -34,7 +34,9 @@
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background layout="prev, pager, next" :total="1000">
<el-pagination background layout="prev, pager, next" :total="1000"
@current-change="handleCurrentChange"
:current-page.sync="currentPage">
</el-pagination>
</div>
</div>
......@@ -50,48 +52,27 @@ export default {
props: {},
data() {
return {
pageNo:1,
pageSize:10,
zddm:'',
zl:'',
bdcdyh:'',
dylx:'',
qlrmc:'',
xmmc:'',
bdcqzh:'',
formData: {
user: "",
region: "",
type: [],
},
tableData: [
// {
// bdcdyh: "610101001001GB00001W",
// xmmc: "万科集团万科城",
// bdcqzh: "陕(2017)西安市不动产权第00000",
// lx: "宗地",
// qlr: "李子新",
// zl: "灞桥-田家湾-咸宁东路,近浐河西路",
// zrsj: "2020.09.07 ",
// cjr: "李子新",
// },
],
tableData: [],
tableHeight: "",
};
},
created() {},
mounted() {
getSearchList().then((res)=>{
console.log(res)
if(res.code===200){
this.tableData=res.result.records;
console.log(this.tableData)
}
})
// for (let i = 0; i < 11; i++) {
// let obj = {
// bdcdyh: "610101001001GB00001W",
// xmmc: "万科集团万科城",
// bdcqzh: "陕(2017)西安市不动产权第00000",
// lx: "自然幢",
// qlr: "李子新",
// zl: "灞桥-田家湾-咸宁东路,近浐河西路",
// zrsj: "2020.09.07 ",
// cjr: "李子新",
// };
// this.tableData.push(obj);
// }
this.loadList();
this.tableHeight = this.$refs.dataGrid.offsetHeight - 68;
},
methods: {
......@@ -103,7 +84,11 @@ export default {
return "";
}
},
handleCurrentChange(val){
console.log(`当前页: ${val}`);
this.pageNo=val;
this.loadList();
},
//获取子组件点击查询触发的事件
getData(obj) {
console.log(obj);
......@@ -130,6 +115,26 @@ export default {
}
});
},
loadList(){
let params={
zddm:this.zddm,
zl:this.zl,
bdcdyh:this.bdcdyh,
dylx:this.dylx,
qlrmc:this.qlrmc,
xmmc:this.xmmc,
bdcqzh:this.bdcqzh,
pageNo:this.pageNo,
pageSize:this.pageSize,
}
getSearchList(params).then((res)=>{
console.log(res)
if(res.code===200){
this.tableData=res.result.records;
console.log(this.tableData)
}
})
}
},
computed: {},
watch: {},
......