Commit 285d8c9b authored by youjie's avatar youjie

no message

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