Commit df81710f authored by youjie's avatar youjie

no message

parent 38697b98
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
elevated elevated
transition-hide="scale" transition-hide="scale"
style="z-index: 9;"> 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" class="cursor-pointer"
@click="selectCity(item)" @click="selectCity(item)"
>{{ item.Name }}</div> >{{ item.Name }}</div>
...@@ -169,14 +169,14 @@ ...@@ -169,14 +169,14 @@
@input="changeAddrSearchHandler" @input="changeAddrSearchHandler"
@keyup.enter="searchCity" @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" v-show="showCity"
id="sb" id="sb"
transition-show="fade" transition-show="fade"
elevated elevated
transition-hide="scale" transition-hide="scale"
style="z-index: 9;"> 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" class="cursor-pointer"
@click="selectCity(item)" @click="selectCity(item)"
>{{ item.Name }}</div> >{{ item.Name }}</div>
...@@ -208,32 +208,6 @@ ...@@ -208,32 +208,6 @@
no-nodes-label=" " no-nodes-label=" "
no-results-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> </q-card>
...@@ -580,10 +554,6 @@ export default { ...@@ -580,10 +554,6 @@ export default {
min: 1, min: 1,
max: 100000, max: 100000,
}, },
expandedCountry: true,
expandedProvince: false,
provinceList: [],
provTicked: [],
CitiesList: [], CitiesList: [],
CitiesTicked: [], CitiesTicked: [],
CitiesListAll: [], CitiesListAll: [],
...@@ -592,7 +562,6 @@ export default { ...@@ -592,7 +562,6 @@ export default {
regionList: [],// 区域 regionList: [],// 区域
regionTicked: [], regionTicked: [],
KeyCityList: [],// 搜索城市 KeyCityList: [],// 搜索城市
KeyCityListAll: [],// 搜索城市
KeyCityTicked: [], KeyCityTicked: [],
showCity: false, showCity: false,
StarList: [], StarList: [],
...@@ -637,7 +606,6 @@ export default { ...@@ -637,7 +606,6 @@ export default {
}, },
mounted() { mounted() {
this.areaTicked = this.msg.Country ? [this.msg.Country] : (this.msg.Countrys ? this.msg.Countrys : []); 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); var CategoryName = this.getUrlKey("CategoryName", window.location.href);
if (CategoryName) { if (CategoryName) {
let list = this.goodsType.find( let list = this.goodsType.find(
...@@ -743,16 +711,16 @@ export default { ...@@ -743,16 +711,16 @@ export default {
x.Name = x.NameCN x.Name = x.NameCN
x.Id = x.CityCode x.Id = x.CityCode
}) })
this.KeyCityListAll = data this.KeyCityList = data
this.KeyCityList = [ if(data.length) this.showCity = true
{ else this.$q.notify({
Id: 0, color: "negative",
Name: '关键字', textColor: "#FFF",
children: data icon: "report_problem",
} message: "没有搜索到相关目的地",
] position: "top",
this.KeyCityJSON = JSON.parse(JSON.stringify(this.KeyCityList)); timeout: 3000,
this.showCity = true })
} }
}, },
(err) => { (err) => {
...@@ -819,37 +787,8 @@ export default { ...@@ -819,37 +787,8 @@ export default {
(err) => {} (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) { 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) { handleQStarRegionTicked(target) {
this.msg.QStarRating = target this.msg.QStarRating = target
...@@ -889,34 +828,6 @@ export default { ...@@ -889,34 +828,6 @@ export default {
} }
this.resetQuery(); 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() { initAreaList() {
this.apipost( this.apipost(
...@@ -949,40 +860,6 @@ export default { ...@@ -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) { changeExplesdHandler(x) {
x.explsed = !x.explsed; x.explsed = !x.explsed;
if (x.SubList) { if (x.SubList) {
...@@ -1009,51 +886,6 @@ export default { ...@@ -1009,51 +886,6 @@ export default {
} }
this.resetQuery(); 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) { optionsFn(cd) {
return ( return (
cd >= 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