Commit df81710f authored by youjie's avatar youjie

no message

parent 38697b98
......@@ -36,7 +36,7 @@
elevated
transition-hide="scale"
style="z-index: 9;">
<div v-for="item in KeyCityListAll" :key="item.Id"
<div v-for="item in KeyCityList" :key="item.Id"
class="cursor-pointer"
@click="selectCity(item)"
>{{ item.Name }}</div>
......@@ -169,14 +169,14 @@
@input="changeAddrSearchHandler"
@keyup.enter="searchCity"
/>
<div class="KeyCityBox absolute bg-white showbox column q-ml-md w-full q-pa-sm"
<div class="KeyCityBox absolute bg-white showbox column q-ml-md w-full q-pa-sm"
v-show="showCity"
id="sb"
transition-show="fade"
elevated
transition-hide="scale"
style="z-index: 9;">
<div v-for="item in KeyCityListAll" :key="item.Id"
<div v-for="item in KeyCityList" :key="item.Id"
class="cursor-pointer"
@click="selectCity(item)"
>{{ item.Name }}</div>
......@@ -208,32 +208,6 @@
no-nodes-label=" "
no-results-label=" "
/>
<!-- <q-tree
ref="area"
:nodes="KeyCityList"
no-connectors
node-key="Id"
label-key="Name"
tick-strategy="leaf-filtered"
@update:ticked="handleKeyCityTicked"
:ticked="KeyCityTicked"
text-color="#666"
no-nodes-label=" "
no-results-label=" "
/> -->
<!-- <q-tree
ref="province"
:nodes="provinceList"
no-connectors
node-key="Id"
label-key="Name"
tick-strategy="leaf"
@update:ticked="handleProvTicked"
:ticked="provTicked"
text-color="#666"
no-nodes-label=" "
no-results-label=" "
/> -->
</q-card>
......@@ -580,10 +554,6 @@ export default {
min: 1,
max: 100000,
},
expandedCountry: true,
expandedProvince: false,
provinceList: [],
provTicked: [],
CitiesList: [],
CitiesTicked: [],
CitiesListAll: [],
......@@ -592,7 +562,6 @@ export default {
regionList: [],// 区域
regionTicked: [],
KeyCityList: [],// 搜索城市
KeyCityListAll: [],// 搜索城市
KeyCityTicked: [],
showCity: false,
StarList: [],
......@@ -637,7 +606,6 @@ export default {
},
mounted() {
this.areaTicked = this.msg.Country ? [this.msg.Country] : (this.msg.Countrys ? this.msg.Countrys : []);
this.msg.placeIds = this.getChoseAddressCity().join(",");
var CategoryName = this.getUrlKey("CategoryName", window.location.href);
if (CategoryName) {
let list = this.goodsType.find(
......@@ -743,16 +711,16 @@ export default {
x.Name = x.NameCN
x.Id = x.CityCode
})
this.KeyCityListAll = data
this.KeyCityList = [
{
Id: 0,
Name: '关键字',
children: data
}
]
this.KeyCityJSON = JSON.parse(JSON.stringify(this.KeyCityList));
this.showCity = true
this.KeyCityList = data
if(data.length) this.showCity = true
else this.$q.notify({
color: "negative",
textColor: "#FFF",
icon: "report_problem",
message: "没有搜索到相关目的地",
position: "top",
timeout: 3000,
})
}
},
(err) => {
......@@ -819,37 +787,8 @@ export default {
(err) => {}
);
},
changeHandler(item) {
if(item.checked) {
this.msg.DestinationID = item.Id;
}else{
this.msg.DestinationID = ''
}
this.provinceList.forEach(x => {
if(item.Id!=x.Id&&x.checked){
x.checked = false;
}
})
if(this.provinceList.length>0&&!this.expandedProvince){
this.expandedProvince = true;
}
this.resetQuery();
},
handleSelected(target) {
},
// 关键字查询
handleKeyCityTicked(target) {
if(target.length>1) this.KeyCityTicked = [target[target.length-1]]
else if(target.length==1) this.KeyCityTicked = target
else this.KeyCityTicked = [];
this.msg.CityCode = this.KeyCityTicked[0]
this.msg.CityCode2 = this.KeyCityTicked[0]
let findIndex = this.KeyCityListAll.findIndex(x=>x.CityCode==this.msg.CityCode)
if(findIndex!=-1) this.msg.KeyWords2 = this.KeyCityListAll[findIndex].NameCN.split(' ')[0]
this.msg.KeyWords = ''
this.msg.hotelId = null
this.resetQuery();
},
handleQStarRegionTicked(target) {
this.msg.QStarRating = target
......@@ -889,34 +828,6 @@ export default {
}
this.resetQuery();
},
handleTicked(target) {
let goodsType = this.goodsType.filter(x=>{return x.Id==target})
if(goodsType&&goodsType.length>0) {
if(goodsType[0].CategoryName=='签证'){
return this.CommonJump("/searchVisa", {});
}
if(goodsType[0].CategoryName=='机票'){
// return this.CommonJump("/planeticket", {});
}
}
this.ticked = target;
this.resetQuery();
},
handleProvTicked(target) {
if(target.length>1) this.provTicked = [target[0]]
else if(target.length==1) this.provTicked = target
else this.provTicked = []
this.msg.DestinationID = this.provTicked[0]
this.resetQuery();
},
handleAreaTicked(target) {
if(target.length>1) this.areaTicked = [target[target.length-1]]
else if(target.length==1) this.areaTicked = target
else this.areaTicked = ['JP'];
this.msg.Country = this.areaTicked[0]
this.getProvinceList(this.msg.Country);
this.resetQuery();
},
initAreaList() {
this.apipost(
......@@ -949,40 +860,6 @@ export default {
},
);
},
getProvinceList(code) {
this.apipost(
"dmc_post_GetDiDaCityBaseInfo", {
CountryCode: code,
Type: "Destination",
},
res => {
let data = res.data.data;
let arrList = function(list){
list.forEach(x => {
x.Id = x.CityCode;
x.Name = x.CityName_CN;
x.checked = false;
x.explsed = false;
x.isShow = true;
})
}
arrList(data);
for (let i = 0; i < data.length; i++) {
if (data[i].Id == this.msg.DestinationID) {
this.provTicked.push(data[i].Id);
}
}
this.provinceList = [
{
Id: 0,
Name: '城市',
children: data
}
]
this.provinceJSON = JSON.parse(JSON.stringify(this.provinceList));
},
);
},
changeExplesdHandler(x) {
x.explsed = !x.explsed;
if (x.SubList) {
......@@ -1009,51 +886,6 @@ export default {
}
this.resetQuery();
},
getChoseAddressCity() {
let result = [];
function treeToArray(tree) {
return tree.reduce((res, item) => {
const { children, ...i } = item;
return res.concat(
i,
children && children.length ? treeToArray(children) : []
);
}, []);
}
const areaList = treeToArray(this.areaList);
areaList.forEach((item) => {
if (this.areaTicked.includes(item.Id)) {
let arr = item.DestinationList.map((item) => item.ID);
result = result.concat(arr);
}
});
return result;
},
changeTripDayHandler() {
this.$forceUpdate();
// this.msg.minTripDay = "0";
// this.msg.maxTripDay = "0";
// this.dayArray.forEach(x => {
// if (x.checked) {
// this.msg.StartPrice =
// this.msg.StartPrice > x.min ? x.min : this.msg.StartPrice;
// this.msg.EndPrice =
// this.msg.EndPrice < x.max ? x.max : this.msg.EndPrice;
// }
// });
// 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.dayNumList = arr;
this.resetQuery();
},
optionsFn(cd) {
return (
cd >=
......
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