Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
million
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
viitto
million
Commits
df81710f
Commit
df81710f
authored
Dec 29, 2025
by
youjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
38697b98
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
181 deletions
+13
-181
kkday.vue
src/components/searchdida/kkday.vue
+13
-181
No files found.
src/components/searchdida/kkday.vue
View file @
df81710f
...
...
@@ -36,7 +36,7 @@
elevated
transition-hide=
"scale"
style=
"z-index: 9;"
>
<div
v-for=
"item in KeyCityList
All
"
: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 KeyCityList
All
"
:
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.KeyCityList
All
= 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 >=
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment