|
@@ -372,37 +372,42 @@ export default {
|
|
|
searchChange(params, done) {
|
|
|
console.log(params);
|
|
|
this.page.currentPage = 1;
|
|
|
- this.onLoad(this.page, params);
|
|
|
+ this.search = params; // 更新搜索条件
|
|
|
+ this.onLoad(this.page, this.search);
|
|
|
+ console.log("1133311");
|
|
|
+
|
|
|
done();
|
|
|
},
|
|
|
//搜索重置按钮触发
|
|
|
searchReset() {
|
|
|
this.treeDeptId = "";
|
|
|
this.onLoad(this.page);
|
|
|
+ console.log("2222");
|
|
|
},
|
|
|
selectionChange() {
|
|
|
- console.log("1");
|
|
|
+ console.log("1111");
|
|
|
},
|
|
|
- currentChange() {
|
|
|
- console.log("1");
|
|
|
+ currentChange(val) {
|
|
|
+ this.page.currentPage = val;
|
|
|
+ console.log(this.search);
|
|
|
+ this.onLoad(this.page,this.search);
|
|
|
+
|
|
|
},
|
|
|
sizeChange() {
|
|
|
- console.log("1");
|
|
|
+ console.log("3");
|
|
|
},
|
|
|
refreshChange() {
|
|
|
this.onLoad(this.page);
|
|
|
},
|
|
|
- onLoad(page, params = {}) {
|
|
|
- // 将搜索条件与现有参数合并
|
|
|
- const queryParams = {
|
|
|
- ...params,
|
|
|
- parentId: this.treeDeptId,
|
|
|
- size: page.pageSize,
|
|
|
- current: page.currentPage,
|
|
|
- corpsTypeId: this.treeDeptId,
|
|
|
- corpType: customerParameter.code
|
|
|
- };
|
|
|
+ onLoad(page, params = { parentId: 0 }) {
|
|
|
+ let queryParams = Object.assign({}, this.search, {
|
|
|
+ size: page.pageSize,
|
|
|
+ current: page.currentPage,
|
|
|
+ corpsTypeId: this.treeDeptId,
|
|
|
+ corpType: customerParameter.code
|
|
|
+ });
|
|
|
customerList(queryParams).then(res => {
|
|
|
+
|
|
|
this.dataList = res.data.data.records;
|
|
|
this.page.total = res.data.data.total;
|
|
|
if (this.page.total || this.page.total === 0) {
|