Commit fa260c12 authored by 沈良进's avatar 沈良进

搜索页优化

parent 5582ce4c
......@@ -386,7 +386,7 @@ export default {
},
created() {
this.msg = this.qMsg;
this.msg.teamType = [];
// this.msg.teamType = [];
this.initAreaList();
this.initGoods();
this.msg.priceRange = {
......@@ -431,14 +431,14 @@ export default {
if (x.SubList) {
}
},
changeGoodTypeHandler(x) {
if (x.checked && this.msg.teamType.indexOf(x.Id) == -1) {
this.msg.teamType.push(x.Id);
} else if (!x.checked && this.msg.teamType.indexOf(x.Id) != -1) {
let i = this.msg.teamType.findIndex(item => item == x.Id);
this.msg.teamType.splice(i, 1);
}
},
// changeGoodTypeHandler(x) {
// if (x.checked && this.msg.teamType.indexOf(x.Id) == -1) {
// this.msg.teamType.push(x.Id);
// } else if (!x.checked && this.msg.teamType.indexOf(x.Id) != -1) {
// let i = this.msg.teamType.findIndex(item => item == x.Id);
// this.msg.teamType.splice(i, 1);
// }
// },
chosenSortHandler(x) {
this.sortNum = x.value;
this.msg.orderByDate = this.sortNum == 4 ? 1 : this.sortNum == 5 ? 2 : 0;
......@@ -484,20 +484,27 @@ export default {
},
changeTripDayHandler() {
this.$forceUpdate();
this.msg.minTripDay = "0";
this.msg.maxTripDay = "0";
this.dayArray.forEach(x => {
if (x.checked) {
this.msg.minPrice =
this.msg.minPrice > x.min ? x.min : this.msg.minPrice;
this.msg.maxPrice =
this.msg.maxPrice < x.max ? x.max : this.msg.maxPrice;
// this.msg.minTripDay = "0";
// this.msg.maxTripDay = "0";
// this.dayArray.forEach(x => {
// if (x.checked) {
// this.msg.minPrice =
// this.msg.minPrice > x.min ? x.min : this.msg.minPrice;
// this.msg.maxPrice =
// this.msg.maxPrice < x.max ? x.max : this.msg.maxPrice;
// }
// });
// this.msg.minTripDay =
// this.msg.minTripDay == "0" ? "" : this.msg.minTripDay;
// this.msg.maxTripDay =
// this.msg.maxTripDay == "0" ? "" : this.msg.maxTripDay;
let arr = []
this.dayArray.forEach(item => {
if(item.checked) {
arr.push(item.id)
}
});
this.msg.minTripDay =
this.msg.minTripDay == "0" ? "" : this.msg.minTripDay;
this.msg.maxTripDay =
this.msg.maxTripDay == "0" ? "" : this.msg.maxTripDay;
})
this.msg.dayNumList = arr
},
optionsFn(cd) {
return (
......@@ -554,6 +561,7 @@ export default {
});
},
goSearchHandler() {
this.msg.webSiteCategoryIds = this.ticked
this.$q.loading.show();
this.DataList = [];
let minTripDay = -1,
......
......@@ -1172,26 +1172,29 @@
},
//查询参数
qMsg: {
cityId: 0,
companyId: 0,
startDate: "", //开始日期
endDate: "", //结束日期
lineId: 0, //线路编号
lineTeamId: 0, //系列编号
// lineId: 0, //线路编号
// lineTeamId: 0, //系列编号
minPrice: "", //最低价格
maxPrice: "", //最高价格
minTripDay: "", //最低行程条数
maxTripDay: "", //最高行程天数
orderByDate: 0,
orderByPrice: 0,
orderBySales: 0,
pageIndex: 1,
pageSize: 10,
priceOrderByField: 4,
searchKey: "",
startCityId: 0,
PageCount: 0,
TotalCount: 0,
// minTripDay: "", //最低行程条数
// maxTripDay: "", //最高行程天数
// orderByDate: 0,
// orderByPrice: 0,
// orderBySales: 0,
// pageIndex: 1,
// pageSize: 10,
// priceOrderByField: 4,
searchKey: "", // 搜索词
// startCityId: 0,
// PageCount: 0,
// TotalCount: 0,
dayNumList: [], // 天数
webSiteCategoryIds: [], // 分类Id
placeIds: [], // 目的地城市Id
orderBy: 0, // 排序 0默认 1价格升序 2价格降序
},
ShowType: 0, //显示样式(0-豆腐格,1-列表)
//行程列表
......@@ -1237,26 +1240,29 @@
//清除所有条件
clearAll(){
let msg={
cityId: 0,
companyId: 0,
startDate: "", //开始日期
endDate: "", //结束日期
lineId: 0, //线路编号
lineTeamId: 0, //系列编号
// lineId: 0, //线路编号
// lineTeamId: 0, //系列编号
minPrice: "", //最低价格
maxPrice: "", //最高价格
minTripDay: "", //最低行程条数
maxTripDay: "", //最高行程天数
orderByDate: 0,
orderByPrice: 0,
orderBySales: 0,
pageIndex: 1,
pageSize: 10,
priceOrderByField: 4,
searchKey: "",
startCityId: 0,
PageCount: 0,
TotalCount: 0,
// minTripDay: "", //最低行程条数
// maxTripDay: "", //最高行程天数
// orderByDate: 0,
// orderByPrice: 0,
// orderBySales: 0,
// pageIndex: 1,
// pageSize: 10,
// priceOrderByField: 4,
searchKey: "", // 搜索词
// startCityId: 0,
// PageCount: 0,
// TotalCount: 0,
dayNumList: [], // 天数
webSiteCategoryIds: [], // 分类Id
placeIds: [], // 目的地城市Id
orderBy: 0, // 排序 0默认 1价格升序 2价格降序
}
this.qMsg = msg;
this.goSearchHandler();
......@@ -1361,7 +1367,6 @@
pageIndex: this.qMsg.pageIndex,
pageSize: this.qMsg.pageSize,
searchKey: this.qMsg.searchKey,
cityId: this.qMsg.cityId,
lineId: this.qMsg.lineId,
lineTeamId: this.qMsg.lineTeamId,
minTripDay: minTripDay,
......
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