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

搜索页优化

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