Commit 285d8c9b authored by youjie's avatar youjie

no message

parent 22a79b5f
......@@ -54,7 +54,7 @@
no-nodes-label=" "
no-results-label=" "
/>
<q-tree
<q-tree v-if="regionList[0].children.length > 0"
ref="region"
:nodes="regionList"
no-connectors
......@@ -188,13 +188,13 @@
node-key="CityCode"
label-key="CityName"
tick-strategy="leaf-filtered"
@update:ticked="handleCitiesTicked"
@update:ticked="handleCitiesTickedhandleCitiesTicked"
:ticked="CitiesTicked"
text-color="#666"
no-nodes-label=" "
no-results-label=" "
/>
<q-tree
<q-tree v-if="regionList[0].children.length > 0"
ref="region"
:nodes="regionList"
no-connectors
......@@ -631,11 +631,10 @@ export default {
}
this.dateRange = { from: this.msg.StartDate, to: this.msg.EndDate };
if(this.msg.KeyWords!=''){
this.handleCitiesTicked = []
this.handleRegionTicked = []
this.CitiesTicked = []
this.regionTicked = []
}
this.resetQuery();
console.log('-----222')
},
deep: true,
immediate: true,
......@@ -840,7 +839,7 @@ export default {
},
// 区域
handleRegionTicked(target) {
if(target.length>1) this.regionTicked = [target[target.length-1]]
if(target.length>1) this.regionTicked = [target[1]]
else if(target.length==1) this.regionTicked = target
else this.regionTicked = [];
this.msg.regionCode = this.regionTicked[0]
......@@ -851,9 +850,13 @@ export default {
// 目的地城市
handleCitiesTicked(target) {
let oldCityCode = this.msg.CityCode2
if(target.length>1) this.CitiesTicked = [target[target.length-1]]
if(target.length>1) this.CitiesTicked = [target[1]]
else if(target.length==1) this.CitiesTicked = target
else this.CitiesTicked = [];
else {
this.CitiesTicked = [];
this.regionList = []
this.regionListAll = []
}
this.CitiesList.forEach(x=>{
x.children.forEach(y => {
if(y.CityCode==this.msg.CityCode){
......@@ -861,8 +864,8 @@ export default {
}
})
})
this.msg.CityCode = this.CitiesTicked[0]
this.msg.CityCode2 = this.CitiesTicked[0]
this.msg.CityCode = this.CitiesTicked.length?this.CitiesTicked[0]:''
this.msg.CityCode2 = this.CitiesTicked.length?this.CitiesTicked[0]:''
let findIndex = this.CitiesListAll.findIndex(x=>x.CityCode==this.msg.CityCode)
if(findIndex!=-1) this.msg.CityName = this.CitiesListAll[findIndex].CityName
if(this.msg.CityCode2!=oldCityCode){
......
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