Commit 4870dee0 authored by youjie's avatar youjie

no message

parent 3283e02d
......@@ -61,7 +61,13 @@ export const spotListConfig = {
label: '使用时间',
prop: 'UseDate',
minWidth: 90,
slotName: 'UseDate',
emptyText: '-',
filter: {
type: 'rangeDate',
key: 'DatelistUse',
startplaceholder: '开始日期',
endplaceholder: '结束日期',
}
},
{
label: '旅客名单',
......@@ -255,10 +261,10 @@ export const spotListConfig = {
},
{
key: 'Datelist',
label: '邮轮时间',
label: '使用时间',
type: 'date',
dateType: 'daterange',
placeholder: '选择邮轮时间',
placeholder: '选择使用时间',
span: 8,
}
]
......
......@@ -429,6 +429,7 @@ export default {
// 重写 mixin 中的筛选处理方法
handleFilterChange({ key, value }) {
// 映射列筛选器 key 到查询参数 key
const keyMapping = {
StatusFilter: "OrderStatus"
......@@ -438,18 +439,30 @@ export default {
if (value === null || value === undefined) {
delete this.queryParams[actualKey];
} else {
} else {
// 处理不同类型的筛选值
let newValue = value;
// 如果是数组类型的多选筛选,转换为逗号分隔的字符串
if (Array.isArray(value)) {
if (Array.isArray(value)&&(key!='DatelistUse'||key!='Datelist')) {
newValue = value.join(",");
}
this.queryParams[actualKey] = newValue;
}
if(this.queryParams.DatelistUse&&this.queryParams.DatelistUse.length>0){
this.queryParams.UseSTime = this.queryParams.DatelistUse[0]
this.queryParams.UseETime = this.queryParams.DatelistUse[1]
}else{
this.queryParams.UseSTime = ''
this.queryParams.UseETime = ''
}
if(this.queryParams.Datelist&&this.queryParams.Datelist.length>0){
this.queryParams.StartTime = this.queryParams.Datelist[0]
this.queryParams.EndTime = this.queryParams.Datelist[1]
}else{
this.queryParams.StartTime = ''
this.queryParams.EndTime = ''
}
// 重置分页并重新加载数据
this.resetPageIndex();
this.loadListData();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment