Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
Athena
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
华国豪
Athena
Commits
3ef76a6e
Commit
3ef76a6e
authored
Apr 07, 2020
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
b9673e0b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
128 additions
and
57 deletions
+128
-57
HotelList.vue
src/components/Hotel/HotelList.vue
+110
-49
SupplierView.vue
src/components/Hotel/SupplierView.vue
+18
-8
No files found.
src/components/Hotel/HotelList.vue
View file @
3ef76a6e
...
...
@@ -251,9 +251,6 @@
font-size
:
22px
;
margin-right
:
5px
;
}
.HL_ListPrice
span
label
{
margin-right
:
5px
;
}
.HL_ListBtn
{
width
:
80px
;
height
:
28px
;
...
...
@@ -368,6 +365,13 @@
text-decoration
:
underline
;
cursor
:
pointer
;
}
.HL_listType
{
position
:
absolute
;
right
:
40px
;
top
:
30px
;
color
:
#10A200
;
font-size
:
14px
;
}
</
style
>
<
template
>
...
...
@@ -575,9 +579,9 @@
</div>
<div
class=
"clearfix"
v-loading=
"loading"
>
<!--
<div
style=
"width:838px;float:left;min-height:380px;"
>
-->
<div
style=
"float:left;min-height:380px;"
v-if=
"dataList.length>0"
>
<div
style=
"float:left;min-height:380px;"
v-if=
"dataList
2
.length>0"
>
<table
class=
"HL_ListTable"
>
<tr
v-for=
"item in dataList"
>
<tr
v-for=
"item in dataList
2
"
>
<td>
<div
class=
"clearfix"
>
<div
class=
"HL_ListImg"
:style=
"`background-image: url($
{item.hotelImageUrl})`">
...
...
@@ -611,7 +615,22 @@
地址:
{{
item
.
address
}}
</div>
<div
class=
"HL_ListPrice"
>
<span><label>
¥
</label>
{{
getPrice
(
item
.
lowrateBySetCurrency
)
}}
</span>
起
<span><label>
¥
</label>
<template
v-if=
"item.type==1"
>
{{
getPrice
(
item
.
lowrateBySetCurrency
)
}}
</
template
>
<
template
v-else
>
{{
item
.
lowrateBySetCurrency
}}
</
template
>
</span>
起
</div>
<div
class=
"HL_listType"
>
<
template
v-if=
"item.type==2"
>
自营
</
template
>
<
template
v-else
>
jalan
</
template
>
</div>
<input
type=
"button"
class=
"HL_ListBtn"
@
click=
"goHotelDetail(item,'HotelDetail')"
value=
"查看详情"
/>
</div>
...
...
@@ -623,14 +642,14 @@
<div
class=
"HL_Map"
v-if=
"travelLngLat.length>0"
>
<HTMap
:dataList=
"travelLngLat"
:type=
"1"
></HTMap>
</div>
<div
v-if=
"dataList.length==0"
style=
"padding:15px 0;text-align:center"
>
<div
v-if=
"dataList
2
.length==0"
style=
"padding:15px 0;text-align:center"
>
<div
class=
"empty-data"
><i
class=
"iconfont icon-kong"
></i>
很抱歉,你想要的信息我们真的找不到了
</div>
</div>
</div>
</div>
<el-pagination
v-if=
"dataList.length>0"
class=
"pagination"
<el-pagination
v-if=
"dataList
2
.length>0"
class=
"pagination"
@
current-change=
"CurrentChange"
:current-page
.
sync=
"currentPage"
background
...
...
@@ -698,6 +717,7 @@ export default {
dateList
:[],
//数据
dataList
:[],
dataList2
:[],
loading
:
false
,
//住宿类型
hotelObj
:[{
...
...
@@ -1069,14 +1089,20 @@ export default {
})
this
.
loading
=
true
;
this
.
dataList
=
[];
this
.
dataList2
=
[];
this
.
travelLngLat
=
[];
this
.
apipost
(
"dmc_post_Get_GetJAPAN_HotelList"
,
this
.
msg
,
res
=>
{
this
.
loading
=
false
;
console
.
log
(
res
,
'resssss'
);
if
(
res
.
data
.
resultCode
==
1
)
{
if
(
Object
.
prototype
.
toString
.
call
(
res
.
data
.
data
.
hotelSummary
)
==
'[object Object]'
){
this
.
dataList
.
push
(
res
.
data
.
data
.
hotelSummary
);
}
else
{
this
.
dataList
=
res
.
data
.
data
.
hotelSummary
;
if
(
res
.
data
.
data
.
parmResult
&&
res
.
data
.
data
.
parmResult
.
hotelSummary
)
{
this
.
dataList
=
res
.
data
.
data
.
parmResult
.
hotelSummary
;
}
var
ourHotelList
=
res
.
data
.
data
.
ourHotelList
;
if
(
ourHotelList
&&
ourHotelList
.
length
>
0
){
ourHotelList
.
forEach
(
x
=>
{
x
.
type
=
2
})
}
//获取酒店坐标
this
.
dataList
.
forEach
(
x
=>
{
...
...
@@ -1087,10 +1113,32 @@ export default {
name
:
x
.
hotelName
}
this
.
travelLngLat
.
push
(
obj
);
x
.
type
=
1
})
this
.
TotalPage
=
parseInt
(
res
.
data
.
data
.
numberOfResultMatched
);
this
.
PassMsg
.
groupBookingFlg
=
res
.
data
.
data
.
groupBookingFlg
;
this
.
JapanIncrease
=
res
.
data
.
data
.
JapanIncrease
;
this
.
dataList2
=
ourHotelList
.
concat
(
this
.
dataList
);
// this.TotalPage = parseInt(res.data.data.parmResult.numberOfResultMatched);
let
Number1
=
res
.
data
.
data
.
parmResult
.
numberOfResultMatched
;
let
TotalPage
=
0
;
if
(
Number1
){
TotalPage
=
parseInt
(
res
.
data
.
data
.
parmResult
.
numberOfResultMatched
);
}
else
{
TotalPage
=
0
;
}
let
TotalourHotel
=
ourHotelList
[
0
].
totalHotelCount
;
let
c
=
TotalPage
+
TotalourHotel
let
d
=
c
/
2
if
(
c
%
2
==
1
){
this
.
TotalPage
=
(
c
/
2
)
+
1
}
else
{
this
.
TotalPage
=
c
/
2
}
this
.
PassMsg
.
groupBookingFlg
=
res
.
data
.
data
.
parmResult
.
groupBookingFlg
;
this
.
JapanIncrease
=
res
.
data
.
data
.
parmResult
.
JapanIncrease
;
}
else
{
//this.Error(res.data.message);
}
...
...
@@ -1110,43 +1158,56 @@ export default {
},
//跳转详情
goHotelDetail
(
item
,
path
){
this
.
PassMsg
.
hotelId
=
item
.
hotelId
,
this
.
PassMsg
.
arrivalDate
=
this
.
msg
.
arrivalDate
;
this
.
PassMsg
.
departureDate
=
this
.
msg
.
departureDate
;
this
.
PassMsg
.
searchroomGroup
=
this
.
msg
.
searchroomGroup
;
this
.
PassMsg
.
lowrateBySetCurrency
=
this
.
getPrice
(
item
.
lowrateBySetCurrency
);
this
.
PassMsg
.
room
=
this
.
room
this
.
PassMsg
.
auditNum
=
this
.
auditNum
;
sessionStorage
.
setItem
(
"HotelDetail"
,
JSON
.
stringify
(
this
.
PassMsg
));
if
(
item
.
type
==
2
){
let
routeData
=
this
.
$router
.
resolve
({
name
:
"SupplierView"
,
query
:
{
HotelId
:
item
.
hotelId
,
arrivalDate
:
this
.
msg
.
arrivalDate
,
departureDate
:
this
.
msg
.
departureDate
}
});
window
.
open
(
routeData
.
href
,
"_blank"
);
}
else
{
this
.
PassMsg
.
hotelId
=
item
.
hotelId
,
this
.
PassMsg
.
arrivalDate
=
this
.
msg
.
arrivalDate
;
this
.
PassMsg
.
departureDate
=
this
.
msg
.
departureDate
;
this
.
PassMsg
.
searchroomGroup
=
this
.
msg
.
searchroomGroup
;
this
.
PassMsg
.
lowrateBySetCurrency
=
this
.
getPrice
(
item
.
lowrateBySetCurrency
);
this
.
PassMsg
.
room
=
this
.
room
this
.
PassMsg
.
auditNum
=
this
.
auditNum
;
sessionStorage
.
setItem
(
"HotelDetail"
,
JSON
.
stringify
(
this
.
PassMsg
));
var
jsonstr
=
JSON
.
stringify
(
this
.
PassMsg
);
let
routeData
=
this
.
$router
.
resolve
({
name
:
"HotelDetail"
,
query
:
{
msg
:
encodeURIComponent
(
jsonstr
),
}
});
window
.
open
(
routeData
.
href
,
"_blank"
);
}
var
jsonstr
=
JSON
.
stringify
(
this
.
PassMsg
);
this
.
$router
.
push
({
path
:
"/HotelDetail"
,
query
:{
msg
:
encodeURIComponent
(
jsonstr
),
}
})
// let routeData = this.$router.resolve({
// name: path,
// });
// window.open(routeData.href, "_blank");
},
//主题特色
getTravelFeature
(
feature
){
let
fea
=
feature
.
split
(
','
);
let
newArr
=
[];
if
(
fea
[
0
]
==
1
){
newArr
.
push
(
'从车站步行5分钟'
);
}
if
(
fea
[
1
]
==
1
){
newArr
.
push
(
'有温泉'
);
}
if
(
fea
[
2
]
==
1
){
newArr
.
push
(
'离海滩5分钟'
);
}
if
(
fea
[
3
]
==
1
){
newArr
.
push
(
'退房11点以后'
);
getTravelFeature
(
feature
)
{
let
newArr
=
[];
if
(
feature
!=
''
)
{
let
fea
=
feature
.
split
(
','
);
if
(
fea
[
0
]
==
1
)
{
newArr
.
push
(
'从车站步行5分钟'
);
}
if
(
fea
[
1
]
==
1
)
{
newArr
.
push
(
'有温泉'
);
}
if
(
fea
[
2
]
==
1
)
{
newArr
.
push
(
'离海滩5分钟'
);
}
if
(
fea
[
3
]
==
1
)
{
newArr
.
push
(
'退房11点以后'
);
}
}
return
newArr
;
},
...
...
src/components/Hotel/SupplierView.vue
View file @
3ef76a6e
...
...
@@ -641,7 +641,7 @@
<div>
床型:{{item.BedType}}
</div>
</li>
<li
style=
"width:180px;"
class=
"HD_OneLi"
>
<div>
面积:{{item.Area}}
㎡
</div>
<div>
面积:{{item.Area}}
</div>
</li>
<li
class=
"HD_FreeWifi"
style=
"width:256px;margin-right:20px;"
>
<div>
前台服务时间至 {{tempData.ServiceTime}}
</div>
...
...
@@ -782,8 +782,8 @@ export default {
// RoomStatus:0
HotelId
:
''
,
RoomType
:
0
,
CheckInTime
:
moment
().
format
(
"YYYY-MM-DD"
)
,
CheckOutTime
:
moment
().
add
(
1
,
'days'
).
format
(
'YYYY-MM-DD'
)
,
CheckInTime
:
''
,
CheckOutTime
:
''
,
RoomNum
:
1
,
IsExtraBed
:
0
,
IsSmoke
:
0
,
...
...
@@ -822,16 +822,26 @@ export default {
};
},
mounted
()
{
if
(
this
.
$route
.
query
.
HotelId
)
{
this
.
HotelId
=
this
.
$route
.
query
.
HotelId
;
this
.
msg
.
HotelId
=
this
.
$route
.
query
.
HotelId
;
}
this
.
getList
();
this
.
getData
();
this
.
getMealType
();
},
created
()
{
if
(
this
.
$route
.
query
.
HotelId
)
{
this
.
HotelId
=
this
.
$route
.
query
.
HotelId
;
this
.
msg
.
HotelId
=
this
.
$route
.
query
.
HotelId
;
}
if
(
this
.
$route
.
query
.
arrivalDate
){
this
.
msg
.
CheckInTime
=
this
.
$route
.
query
.
arrivalDate
}
else
{
this
.
msg
.
CheckInTime
=
moment
().
format
(
"YYYY-MM-DD"
);
}
if
(
this
.
$route
.
query
.
departureDate
){
this
.
msg
.
CheckOutTime
=
this
.
$route
.
query
.
departureDate
}
else
{
this
.
msg
.
CheckOutTime
=
moment
().
add
(
1
,
'days'
).
format
(
'YYYY-MM-DD'
)
}
},
components
:
{
HTMap
...
...
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