修复支持分页查找-时间金额姓名三组参数联查-筛选
This commit is contained in:
parent
41cae0db07
commit
e408fad84d
|
|
@ -76,18 +76,18 @@
|
|||
<view
|
||||
:class="[
|
||||
'custom-radio-button',
|
||||
filter.orderTime === 'desc' ? 'checked' : '',
|
||||
filter.orderTime === 'asc' ? 'checked' : '',
|
||||
]"
|
||||
@click="changeorderTime('desc')"
|
||||
@click="changeorderTime('asc')"
|
||||
>
|
||||
由远及近
|
||||
</view>
|
||||
<view
|
||||
:class="[
|
||||
'custom-radio-button',
|
||||
filter.orderTime === 'asc' ? 'checked' : '',
|
||||
filter.orderTime === 'desc' ? 'checked' : '',
|
||||
]"
|
||||
@click="changeorderTime('asc')"
|
||||
@click="changeorderTime('desc')"
|
||||
>
|
||||
由近及远
|
||||
</view>
|
||||
|
|
@ -191,10 +191,10 @@ export default {
|
|||
filter: {
|
||||
minAmount: "",
|
||||
maxAmount: "",
|
||||
orderAmount: "desc",
|
||||
orderTime: "desc",
|
||||
sortAmount: "amount",
|
||||
sortTime: "time",
|
||||
orderAmount: "",
|
||||
orderTime: "",
|
||||
sortAmount: "",
|
||||
sortTime: "",
|
||||
},
|
||||
|
||||
CommonEnum,
|
||||
|
|
@ -214,11 +214,18 @@ export default {
|
|||
methods: {
|
||||
changeorderAmount(order) {
|
||||
this.filter.orderAmount = order;
|
||||
|
||||
this.filter.orderTime = "";
|
||||
this.filter.sortTime = "";
|
||||
this.filter.sortAmount = "amount";
|
||||
console.log("当前选择的排序方式:", order);
|
||||
// 触发排序操作
|
||||
},
|
||||
changeorderTime(order) {
|
||||
this.filter.orderTime = order;
|
||||
this.filter.orderAmount = "";
|
||||
this.filter.sortAmount = "";
|
||||
this.filter.sortTime = "time";
|
||||
console.log("当前选择的排序方式:", order);
|
||||
// 触发排序操作
|
||||
},
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ export const dataManagerMixin = {
|
|||
* @param {boolean} options.showError 是否显示错误提示
|
||||
*/
|
||||
async fetchData(options = {}) {
|
||||
console.log("@@@@@@@@@@@@@@@@@", options);
|
||||
const {
|
||||
isLoadMore = false,
|
||||
apiCall,
|
||||
|
|
@ -72,7 +73,7 @@ export const dataManagerMixin = {
|
|||
|
||||
// 构建请求参数
|
||||
const requestParams = {
|
||||
...this.currentParams,
|
||||
// ...this.currentParams,
|
||||
...params,
|
||||
pageNum: this.pageNum,
|
||||
pageSize: this.pageSize,
|
||||
|
|
@ -187,6 +188,9 @@ export const dataManagerMixin = {
|
|||
* @param {Object} options 配置选项
|
||||
*/
|
||||
searchData(searchParams = {}, options = {}) {
|
||||
console.log("@@@@@@@@@@@", searchParams);
|
||||
console.log("@@@@@@@@@@@", options);
|
||||
|
||||
return this.fetchData({
|
||||
// isLoadMore: false,
|
||||
|
||||
|
|
|
|||
|
|
@ -22,8 +22,8 @@ export const donationMixin = {
|
|||
getBaseParams: {
|
||||
minAmount: 0,
|
||||
maxAmount: 10000,
|
||||
sortAmount: "amount",
|
||||
orderAmount: "asc",
|
||||
// sortAmount: "amount",
|
||||
// orderAmount: "asc",
|
||||
sortTime: "time",
|
||||
orderTime: "desc",
|
||||
},
|
||||
|
|
@ -157,9 +157,20 @@ export const donationMixin = {
|
|||
/**
|
||||
* 筛选功能
|
||||
*/
|
||||
async filterSearch(params) {
|
||||
this.getBaseParams = params;
|
||||
|
||||
//过滤空参数
|
||||
filterEmptyParams(obj) {
|
||||
return Object.keys(obj).reduce((acc, key) => {
|
||||
if (obj[key] !== "") {
|
||||
acc[key] = obj[key];
|
||||
}
|
||||
return acc;
|
||||
}, {});
|
||||
},
|
||||
|
||||
async filterSearch(params) {
|
||||
this.getBaseParams = this.filterEmptyParams(params);
|
||||
console.log("@@@@@@@@@@@@@@", this.getBaseParams);
|
||||
console.log("this.searchKeyword", this.searchKeyword);
|
||||
|
||||
await this.searchData(
|
||||
|
|
@ -178,6 +189,7 @@ export const donationMixin = {
|
|||
},
|
||||
},
|
||||
);
|
||||
this.show = false;
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user