Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SuperMan
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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
罗超
SuperMan
Commits
dc509f5d
Commit
dc509f5d
authored
Mar 05, 2024
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
ec4a0f81
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
839 additions
and
738 deletions
+839
-738
TableOperation.vue
...ponents/Hotel/singleProduct/components/TableOperation.vue
+403
-377
hotelDetails.vue
...omponents/Hotel/singleProduct/components/hotelDetails.vue
+436
-361
No files found.
src/components/Hotel/singleProduct/components/TableOperation.vue
View file @
dc509f5d
...
@@ -37,12 +37,20 @@
...
@@ -37,12 +37,20 @@
{{
item
.
RoomName
}}
{{
item
.
RoomName
}}
</el-col>
</el-col>
<el-col
:span=
"9"
>
<el-col
:span=
"9"
>
<span
class=
"fz10 colorf44336"
>
<!-- ¥ -->
円
</span>
<span
class=
"fz10 colorf44336"
v-if=
"currentUserInfo&¤tUserInfo.RB_Group_id==2 && parameters.CurrencyName=='日元'"
>
円
</span>
<span
class=
"din colorf44336"
>
{{
item
.
UPriceFormat
}}
</span>
<span
class=
"din colorf44336"
>
{{
item
.
UPriceFormat
}}
</span>
<span
class=
"text-dark"
style=
"font-size: 12px"
>
/人
</span>
<span
class=
"text-dark"
style=
"font-size: 12px"
>
<template
v-if=
"parameters.CurrencyName&& parameters.CurrencyName!='日元'"
>
{{
parameters
.
CurrencyName
}}
</
template
>
/人
</span>
</el-col>
</el-col>
<el-col
:span=
"6"
>
<el-col
:span=
"6"
>
<div><el-input-number
v-model=
"item.PeopleNumber"
:min=
"0"
:step=
"1"
step-strictly
@
change=
"calculateNum"
></el-input-number></div>
<div>
<el-input-number
v-model=
"item.PeopleNumber"
:min=
"0"
:step=
"1"
step-strictly
@
change=
"calculateNum"
>
</el-input-number>
</div>
</el-col>
</el-col>
<el-col
:span=
"6"
>
<el-col
:span=
"6"
>
<div>
预计
<div>
预计
...
@@ -81,8 +89,8 @@
...
@@ -81,8 +89,8 @@
</div>
</div>
</div>
</div>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
export
default
{
export
default
{
props
:
{
props
:
{
editorType
:
{
editorType
:
{
...
@@ -110,10 +118,10 @@
...
@@ -110,10 +118,10 @@
Money
:
0
,
Money
:
0
,
DetailList
:
[],
DetailList
:
[],
Remark
:
''
,
Remark
:
''
,
TaxesPrice
:
0
,
TaxesPrice
:
0
,
PriceInTangTax
:
0
,
PriceInTangTax
:
0
,
PriceIsBreakfast
:
0
,
PriceIsBreakfast
:
0
,
PriceIsDinner
:
0
,
PriceIsDinner
:
0
,
CurrencyName
:
''
CurrencyName
:
''
},
},
total
:
0
,
total
:
0
,
...
@@ -126,10 +134,11 @@
...
@@ -126,10 +134,11 @@
},
},
sumPrice
:
0
,
sumPrice
:
0
,
sumPeople
:
0
,
sumPeople
:
0
,
cars
:
[],
//购物车参数
cars
:
[],
//购物车参数
HotelLength
:
0
,
//购物车酒店数
HotelLength
:
0
,
//购物车酒店数
editor
:
{},
//预定订单对象
editor
:
{},
//预定订单对象
contrastCars
:
[],
//对比缓存cars
contrastCars
:
[],
//对比缓存cars
currentUserInfo
:
{},
//当前人员
};
};
},
},
watch
:
{
watch
:
{
...
@@ -148,10 +157,10 @@
...
@@ -148,10 +157,10 @@
},
},
hotelInfor
:
{
hotelInfor
:
{
handler
:
function
(
val
,
oldVal
)
{
handler
:
function
(
val
,
oldVal
)
{
if
(
this
.
hotelInfor
&&
this
.
hotelInfor
.
RemainingInventory
)
{
if
(
this
.
hotelInfor
&&
this
.
hotelInfor
.
RemainingInventory
)
{
this
.
onlyNum
=
this
.
hotelInfor
.
RemainingInventory
this
.
onlyNum
=
this
.
hotelInfor
.
RemainingInventory
}
}
if
(
this
.
HotelRow
&&
this
.
hotelInfor
)
{
if
(
this
.
HotelRow
&&
this
.
hotelInfor
)
{
this
.
setList
()
this
.
setList
()
}
}
},
},
...
@@ -165,24 +174,21 @@
...
@@ -165,24 +174,21 @@
}
}
},
},
created
()
{
created
()
{
this
.
currentUserInfo
=
this
.
getLocalStorage
();
},
},
mounted
()
{
mounted
()
{
if
(
this
.
hotelInfor
&&
this
.
hotelInfor
.
RemainingInventory
)
{
if
(
this
.
hotelInfor
&&
this
.
hotelInfor
.
RemainingInventory
){
this
.
onlyNum
=
this
.
hotelInfor
.
RemainingInventory
this
.
onlyNum
=
this
.
hotelInfor
.
RemainingInventory
}
}
if
(
this
.
HotelRow
&&
this
.
hotelInfor
)
{
if
(
this
.
HotelRow
&&
this
.
hotelInfor
)
{
this
.
setList
()
this
.
setList
()
}
}
},
},
methods
:
{
methods
:
{
changePeople
(
val
)
{
changePeople
(
val
)
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
calculateNum
()
this
.
calculateNum
()
},
50
)
},
50
)
},
},
// 计算房间数量
// 计算房间数量
calculateNum
()
{
calculateNum
()
{
...
@@ -194,43 +200,43 @@
...
@@ -194,43 +200,43 @@
this
.
sumPeople
+=
parseInt
(
item
.
PeopleNumber
)
this
.
sumPeople
+=
parseInt
(
item
.
PeopleNumber
)
})
})
},
},
join
()
{
join
()
{
this
.
cars
=
[]
this
.
cars
=
[]
if
(
JSON
.
parse
(
localStorage
.
getItem
(
'cars'
)))
{
if
(
JSON
.
parse
(
localStorage
.
getItem
(
'cars'
)))
{
this
.
cars
=
JSON
.
parse
(
localStorage
.
getItem
(
'cars'
))
this
.
cars
=
JSON
.
parse
(
localStorage
.
getItem
(
'cars'
))
}
}
if
(
!
this
.
sumPeople
)
return
this
.
Error
(
'请加入人数'
);
if
(
!
this
.
sumPeople
)
return
this
.
Error
(
'请加入人数'
);
const
temp
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
parameters
))
const
temp
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
parameters
))
temp
.
Money
=
0
temp
.
Money
=
0
temp
.
Total
=
this
.
total
temp
.
Total
=
this
.
total
temp
.
SumPeople
=
this
.
sumPeople
temp
.
SumPeople
=
this
.
sumPeople
temp
.
DetailList
=
temp
.
DetailList
.
filter
(((
x
)
=>
x
.
PeopleNumber
>
0
))
temp
.
DetailList
=
temp
.
DetailList
.
filter
(((
x
)
=>
x
.
PeopleNumber
>
0
))
temp
.
DetailList
.
forEach
((
x
)
=>
{
temp
.
DetailList
.
forEach
((
x
)
=>
{
temp
.
Money
+=
(
x
.
PeopleNumber
*
(
x
.
Unit_Price
+
x
.
TaxesPrice
+
x
.
PriceInTangTax
))
temp
.
Money
+=
(
x
.
PeopleNumber
*
(
x
.
Unit_Price
+
x
.
TaxesPrice
+
x
.
PriceInTangTax
))
});
});
let
existsIndex
=
this
.
cars
.
findIndex
((
x
)
=>
x
.
Date
==
temp
.
Date
)
let
existsIndex
=
this
.
cars
.
findIndex
((
x
)
=>
x
.
Date
==
temp
.
Date
)
let
exists
=
existsIndex
==-
1
?
null
:
this
.
cars
[
existsIndex
]
let
exists
=
existsIndex
==
-
1
?
null
:
this
.
cars
[
existsIndex
]
if
(
exists
)
{
if
(
exists
)
{
let
existsHotel
=
exists
.
Hotels
.
findIndex
((
h
)
=>
h
.
HotelId
==
temp
.
HotelId
)
let
existsHotel
=
exists
.
Hotels
.
findIndex
((
h
)
=>
h
.
HotelId
==
temp
.
HotelId
)
if
(
existsHotel
!=-
1
)
exists
.
Hotels
.
splice
(
existsHotel
,
1
)
if
(
existsHotel
!=
-
1
)
exists
.
Hotels
.
splice
(
existsHotel
,
1
)
}
else
{
}
else
{
exists
=
{
exists
=
{
Date
:
temp
.
Date
,
Date
:
temp
.
Date
,
CurrencyName
:
this
.
parameters
.
CurrencyName
,
CurrencyName
:
this
.
parameters
.
CurrencyName
,
Hotels
:
[]
Hotels
:
[]
}
}
this
.
cars
.
push
(
exists
)
this
.
cars
.
push
(
exists
)
}
}
exists
.
Hotels
.
push
(
temp
)
exists
.
Hotels
.
push
(
temp
)
this
.
cars
.
sort
((
x
,
y
)
=>
{
this
.
cars
.
sort
((
x
,
y
)
=>
{
return
new
Date
(
x
.
Date
).
getTime
()
-
new
Date
(
y
.
Date
).
getTime
()
return
new
Date
(
x
.
Date
).
getTime
()
-
new
Date
(
y
.
Date
).
getTime
()
})
})
this
.
HotelLength
=
this
.
cars
.
length
this
.
HotelLength
=
this
.
cars
.
length
localStorage
.
setItem
(
"cars"
,
JSON
.
stringify
(
this
.
cars
))
localStorage
.
setItem
(
"cars"
,
JSON
.
stringify
(
this
.
cars
))
localStorage
.
setItem
(
"HotelLength"
,
this
.
HotelLength
)
localStorage
.
setItem
(
"HotelLength"
,
this
.
HotelLength
)
this
.
Success
(
'加入购物车成功'
);
this
.
Success
(
'加入购物车成功'
);
this
.
editor
=
{}
this
.
editor
=
{}
this
.
$emit
(
'close'
)
this
.
$emit
(
'close'
)
},
},
// 组装可选房间
// 组装可选房间
...
@@ -248,7 +254,7 @@
...
@@ -248,7 +254,7 @@
this
.
parameters
.
Date
=
hotel
.
DateStr
this
.
parameters
.
Date
=
hotel
.
DateStr
this
.
parameters
.
RemainingInventory
=
hotel
.
RemainingInventory
this
.
parameters
.
RemainingInventory
=
hotel
.
RemainingInventory
this
.
parameters
.
TaxesPrice
=
tempPrice
.
TaxesPrice
this
.
parameters
.
TaxesPrice
=
tempPrice
.
TaxesPrice
this
.
parameters
.
PriceInTangTax
=
tempPrice
.
PriceInTangTax
this
.
parameters
.
PriceInTangTax
=
tempPrice
.
PriceInTangTax
this
.
parameters
.
PriceIsBreakfast
=
tempPrice
.
PriceIsBreakfast
this
.
parameters
.
PriceIsBreakfast
=
tempPrice
.
PriceIsBreakfast
this
.
parameters
.
PriceIsDinner
=
tempPrice
.
PriceIsDinner
this
.
parameters
.
PriceIsDinner
=
tempPrice
.
PriceIsDinner
this
.
parameters
.
CurrencyName
=
tempPrice
.
CurrencyName
this
.
parameters
.
CurrencyName
=
tempPrice
.
CurrencyName
...
@@ -278,20 +284,20 @@
...
@@ -278,20 +284,20 @@
this
.
setInjectHandler
()
this
.
setInjectHandler
()
},
},
setDateRange
()
{
setDateRange
()
{
if
(
!
this
.
editorType
&&!
this
.
editor
&&
this
.
parameters
.
Date
)
{
if
(
!
this
.
editorType
&&
!
this
.
editor
&&
this
.
parameters
.
Date
)
{
this
.
joinHouse
.
StartDate
=
this
.
parameters
.
Date
this
.
joinHouse
.
StartDate
=
this
.
parameters
.
Date
}
else
if
(
this
.
editorType
&&
this
.
editor
&&
this
.
editor
.
Date
)
{
}
else
if
(
this
.
editorType
&&
this
.
editor
&&
this
.
editor
.
Date
)
{
this
.
joinHouse
.
StartDate
=
this
.
editor
.
Date
this
.
joinHouse
.
StartDate
=
this
.
editor
.
Date
}
}
this
.
joinHouse
.
EndDate
=
this
.
getBeforeDate
(
-
1
,
this
.
joinHouse
.
StartDate
)
this
.
joinHouse
.
EndDate
=
this
.
getBeforeDate
(
-
1
,
this
.
joinHouse
.
StartDate
)
this
.
joinHouse
.
dateRangeFormat
=
`
${
this
.
joinHouse
.
StartDate
}
至
${
this
.
joinHouse
.
EndDate
}
`
this
.
joinHouse
.
dateRangeFormat
=
`
${
this
.
joinHouse
.
StartDate
}
至
${
this
.
joinHouse
.
EndDate
}
`
this
.
joinHouse
.
days
=
1
this
.
joinHouse
.
days
=
1
},
},
setInjectHandler
()
{
setInjectHandler
()
{
if
(
!
this
.
editorType
&&
!
this
.
editor
)
return
if
(
!
this
.
editorType
&&
!
this
.
editor
)
return
this
.
parameters
.
DetailList
.
forEach
(
item
=>
{
this
.
parameters
.
DetailList
.
forEach
(
item
=>
{
this
.
editor
.
DetailList
.
forEach
(
x
=>
{
this
.
editor
.
DetailList
.
forEach
(
x
=>
{
if
(
item
.
RoomName
==
x
.
RoomName
&&
item
.
UPriceFormat
==
x
.
UPriceFormat
)
{
if
(
item
.
RoomName
==
x
.
RoomName
&&
item
.
UPriceFormat
==
x
.
UPriceFormat
)
{
item
.
PeopleNumber
=
x
.
PeopleNumber
item
.
PeopleNumber
=
x
.
PeopleNumber
item
.
Number
=
x
.
Number
item
.
Number
=
x
.
Number
}
}
...
@@ -303,10 +309,10 @@
...
@@ -303,10 +309,10 @@
}
}
};
};
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.header-name
{
.header-name
{
width
:
500px
;
width
:
500px
;
overflow
:
hidden
;
overflow
:
hidden
;
white-space
:
nowrap
;
white-space
:
nowrap
;
...
@@ -314,87 +320,108 @@
...
@@ -314,87 +320,108 @@
font-size
:
18px
;
font-size
:
18px
;
color
:
#009ef7
;
color
:
#009ef7
;
}
}
.header-Title
,
.header-Title
,
.header-Title-right
,
.header-Title-right
,
.TableOperation-time
,
.TableOperation-time
,
.TableOperation-buttom
{
.TableOperation-buttom
{
display
:
flex
;
display
:
flex
;
justify-content
:
space-between
;
justify-content
:
space-between
;
}
}
.header-Title-right
>
div
{
.header-Title-right
>
div
{
margin-left
:
15px
;
margin-left
:
15px
;
}
}
/
deep
/
.TableOperation-time
.el-input__inner
{
background-color
:
rgba
(
237
,
237
,
237
,
.1
);
/
deep
/
.TableOperation-time
.el-input__inner
{
background-color
:
rgba
(
237
,
237
,
237
,
.1
);
}
}
.TableOperation-time
{
.TableOperation-time
{
border-radius
:
10px
;
border-radius
:
10px
;
background
:
#FFFDE7
;
background
:
#FFFDE7
;
margin
:
15px
0
;
margin
:
15px
0
;
padding
:
10px
;
padding
:
10px
;
align-items
:
center
;
align-items
:
center
;
}
}
.TableOperation-time-right
span
{
.TableOperation-time-right
span
{
color
:
#f57f17
;
color
:
#f57f17
;
font-weight
:
bold
;
font-weight
:
bold
;
}
}
.TableOperation-note
{
.TableOperation-note
{
color
:
#f1416c
;
color
:
#f1416c
;
}
}
.TableOperation-list
{
.TableOperation-list
{
background
:
#fafafa
;
background
:
#fafafa
;
padding
:
15px
;
padding
:
15px
;
border-radius
:
10px
;
border-radius
:
10px
;
margin
:
10px
0
;
margin
:
10px
0
;
}
}
.TableOperation-list
.el-row
{
.TableOperation-list
.el-row
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
}
}
.TableOperation-list
.el-row
.el-col
:last-child
{
.TableOperation-list
.el-row
.el-col
:last-child
{
text-align
:
center
;
text-align
:
center
;
}
}
.TableOperation-list
.el-row
.el-col
:last-child
span
{
color
:
#f57f17
;
.TableOperation-list
.el-row
.el-col
:last-child
span
{
color
:
#f57f17
;
font-weight
:
bold
;
font-weight
:
bold
;
}
}
.TableOperation-buttom
{
.TableOperation-buttom
{
align-items
:
center
;
align-items
:
center
;
margin-top
:
25px
;
margin-top
:
25px
;
}
}
.buttom-left
{
.buttom-left
{
display
:
flex
;
display
:
flex
;
color
:
#9e9e9e
;
color
:
#9e9e9e
;
}
}
.buttom-left
>
div
:first-child
{
.buttom-left
>
div
:first-child
{
margin-right
:
10px
;
margin-right
:
10px
;
}
}
.buttom-left
>
div
:first-child
span
{
.buttom-left
>
div
:first-child
span
{
color
:
#ff6d00
;
color
:
#ff6d00
;
}
}
.buttom-left
>
div
>
span
{
.buttom-left
>
div
>
span
{
color
:
#f44336
;
color
:
#f44336
;
}
}
.datetimerange
{
.datetimerange
{
border
:
1px
solid
#eeeeee
;
border
:
1px
solid
#eeeeee
;
padding
:
8px
15px
;
padding
:
8px
15px
;
background
:
rgba
(
237
,
237
,
237
,
.1
);
background
:
rgba
(
237
,
237
,
237
,
.1
);
border-radius
:
3px
;
border-radius
:
3px
;
}
}
.colorf44336
{
.colorf44336
{
color
:
#f44336
;
color
:
#f44336
;
}
}
.fz10
{
.fz10
{
font-size
:
10px
;
font-size
:
10px
;
}
}
.din
{
.din
{
font-weight
:
bold
;
font-weight
:
bold
;
}
}
.text-dark
{
.text-dark
{
color
:
#181c32
;
color
:
#181c32
;
font-size
:
12px
;
font-size
:
12px
;
}
}
.prompt
{
.prompt
{
background
:
#fff3e0
;
background
:
#fff3e0
;
color
:
#e65100
;
color
:
#e65100
;
padding
:
5px
8px
;
padding
:
5px
8px
;
...
@@ -403,5 +430,4 @@
...
@@ -403,5 +430,4 @@
font-size
:
12px
;
font-size
:
12px
;
}
}
</
style
>
</
style
>
\ No newline at end of file
src/components/Hotel/singleProduct/components/hotelDetails.vue
View file @
dc509f5d
...
@@ -26,18 +26,12 @@
...
@@ -26,18 +26,12 @@
<div>
{{
h
.
ChainBrand
}}
</div>
<div>
{{
h
.
ChainBrand
}}
</div>
</div>
</div>
</div>
</div>
<el-image
<el-image
style=
"width: 100%; height: 100%"
:src=
"images[0]"
:preview-src-list=
"images"
fit=
"cover"
>
style=
"width: 100%; height: 100%"
:src=
"images[0]"
:preview-src-list=
"images"
fit=
"cover"
>
</el-image>
</el-image>
</div>
</div>
<div
v-if=
"images.length>1"
>
<div
v-if=
"images.length>1"
>
<div
class=
"Img-right-box"
:style=
"
{'height':images.length==2?'100%':'50%'}">
<div
class=
"Img-right-box"
:style=
"
{'height':images.length==2?'100%':'50%'}">
<el-image
<el-image
style=
"width: 100%; height: 100%"
:src=
"images[1]"
:preview-src-list=
"images"
fit=
"cover"
>
style=
"width: 100%; height: 100%"
:src=
"images[1]"
:preview-src-list=
"images"
fit=
"cover"
>
</el-image>
</el-image>
</div>
</div>
<div
class=
"Img-right-box"
v-if=
"images.length>2"
>
<div
class=
"Img-right-box"
v-if=
"images.length>2"
>
...
@@ -45,10 +39,8 @@
...
@@ -45,10 +39,8 @@
<span
class=
"fz20 text-weight-bold"
>
+
</span>
<span
class=
"fz20 text-weight-bold"
>
+
</span>
<span
class=
"text-h5 text-weight-bold"
>
{{
images
.
length
-
3
}}
</span>
<span
class=
"text-h5 text-weight-bold"
>
{{
images
.
length
-
3
}}
</span>
</div>
</div>
<el-image
<el-image
style=
"width: 100%; height: 100%"
:src=
"images[2]"
:preview-src-list=
"images"
ref=
"images"
style=
"width: 100%; height: 100%"
fit=
"cover"
>
:src=
"images[2]"
:preview-src-list=
"images"
ref=
"images"
fit=
"cover"
>
</el-image>
</el-image>
</div>
</div>
</div>
</div>
...
@@ -63,26 +55,51 @@
...
@@ -63,26 +55,51 @@
<div>
{{
h
.
Descriptions
}}
</div>
<div>
{{
h
.
Descriptions
}}
</div>
</div>
</div>
<div
class=
"hotelDetails-service"
>
<div
class=
"hotelDetails-service"
>
<div
class=
"service"
><span>
入汤税
</span><div>
{{
moneyFormat
(
h
.
InTangTax
)
}}
</div></div>
<div
class=
"service"
><span>
入汤税
</span>
<div
class=
"service"
><span>
城市税
</span><div>
{{
moneyFormat
(
h
.
CityTax
)
}}
</div></div>
<div>
{{
moneyFormat
(
h
.
InTangTax
)
}}
</div>
<div
class=
"service"
><span>
停车场
</span><div><p>
{{
h
.
IsHavearking
==
0
?
'无'
:
'有'
}}
</p><li>
{{
h
.
ParkFee
==
0
?
'免費'
:
moneyFormat
(
h
.
ParkFee
)
+
'元'
}}
</li></div></div>
</div>
<div
class=
"service"
><span>
预约截止天数
</span><div>
提前
{{
h
.
DieLine
}}
天
</div></div>
<div
class=
"service"
><span>
城市税
</span>
<div
class=
"service"
><span>
是否含餐
</span><div><p>
{{
!
h
.
isDinner
?
'无'
:
'有'
}}
</p><li
v-if=
"h.isDinner"
v-for=
"x in h.Dinners"
>
{{
x
.
Name
}}
</li></div></div>
<div>
{{
moneyFormat
(
h
.
CityTax
)
}}
</div>
<div
class=
"service"
><span>
酒店类型
</span><div><p>
{{
h
.
HotelTypeInfo
?
h
.
HotelTypeInfo
.
Name
:
'-'
}}
</p></div></div>
</div>
<div
class=
"service"
><span>
设施服务
</span><div><li
v-for=
"(x, i) in h.CheckHotelService"
>
{{
x
.
Content
}}
</li></div></div>
<div
class=
"service"
><span>
停车场
</span>
<div>
<p>
{{
h
.
IsHavearking
==
0
?
'无'
:
'有'
}}
</p>
<li>
{{
h
.
ParkFee
==
0
?
'免費'
:
moneyFormat
(
h
.
ParkFee
)
+
'元'
}}
</li>
</div>
</div>
<div
class=
"service"
><span>
预约截止天数
</span>
<div>
提前
{{
h
.
DieLine
}}
天
</div>
</div>
<div
class=
"service"
><span>
是否含餐
</span>
<div>
<p>
{{
!
h
.
isDinner
?
'无'
:
'有'
}}
</p>
<li
v-if=
"h.isDinner"
v-for=
"x in h.Dinners"
>
{{
x
.
Name
}}
</li>
</div>
</div>
<div
class=
"service"
><span>
酒店类型
</span>
<div>
<p>
{{
h
.
HotelTypeInfo
?
h
.
HotelTypeInfo
.
Name
:
'-'
}}
</p>
</div>
</div>
<div
class=
"service"
><span>
设施服务
</span>
<div>
<li
v-for=
"(x, i) in h.CheckHotelService"
>
{{
x
.
Content
}}
</li>
</div>
</div>
</div>
</div>
<div
class=
"hotelDetails-prompt prompt"
>
<div
class=
"hotelDetails-prompt prompt"
>
<p>
溫馨提醒
</p>
<p>
溫馨提醒
</p>
<div>
{{
h
.
WarmTip
}}
</div>
<div>
{{
h
.
WarmTip
}}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
Map
from
"../../../public/echoMap.vue"
;
import
Map
from
"../../../public/echoMap.vue"
;
export
default
{
export
default
{
components
:
{
Map
},
components
:
{
Map
},
props
:
{
props
:
{
hotelId
:
{
hotelId
:
{
type
:
Number
,
type
:
Number
,
...
@@ -94,16 +111,35 @@
...
@@ -94,16 +111,35 @@
map
:
null
,
map
:
null
,
loading
:
true
,
loading
:
true
,
h
:
{},
h
:
{},
dinners
:
[
dinners
:
[{
{
Id
:
1
,
Name
:
'早餐'
},
Id
:
1
,
{
Id
:
2
,
Name
:
'无午'
},
Name
:
'早餐'
{
Id
:
3
,
Name
:
'晚餐'
},
},
{
Id
:
2
,
Name
:
'无午'
},
{
Id
:
3
,
Name
:
'晚餐'
},
],
],
hotelTyps
:
[
hotelTyps
:
[{
{
Id
:
1
,
Name
:
'商务酒店'
},
Id
:
1
,
{
Id
:
2
,
Name
:
'豪华酒店'
},
Name
:
'商务酒店'
{
Id
:
3
,
Name
:
'溫泉酒店'
},
},
{
Id
:
4
,
Name
:
'海滩度假酒店'
},
{
Id
:
2
,
Name
:
'豪华酒店'
},
{
Id
:
3
,
Name
:
'溫泉酒店'
},
{
Id
:
4
,
Name
:
'海滩度假酒店'
},
],
],
images
:
[],
images
:
[],
currentImage
:
''
,
currentImage
:
''
,
...
@@ -123,23 +159,25 @@
...
@@ -123,23 +159,25 @@
},
},
mounted
()
{
mounted
()
{
this
.
initHotel
()
this
.
initHotel
()
},
},
methods
:
{
methods
:
{
initMap
(
lng
,
lat
,
name
)
{
initMap
(
lng
,
lat
,
name
)
{
if
(
this
.
map
)
{
if
(
this
.
map
)
{
this
.
map
.
clearOverlays
()
this
.
map
.
clearOverlays
()
}
}
var
that
=
this
;
var
that
=
this
;
this
.
map
=
new
BMap
.
Map
(
"mapContainer"
,
{
enableMapClick
:
false
,
this
.
map
=
new
BMap
.
Map
(
"mapContainer"
,
{
enableMapClick
:
false
,
minZoom
:
3
,
minZoom
:
3
,
maxZoom
:
50
,
maxZoom
:
50
,
})
//新建地图实例,enableMapClick:false :禁用地图默认点击弹框
})
//新建地图实例,enableMapClick:false :禁用地图默认点击弹框
var
point
=
new
BMap
.
Point
(
lng
,
lat
);
var
point
=
new
BMap
.
Point
(
lng
,
lat
);
this
.
map
.
centerAndZoom
(
new
BMap
.
Point
(
lng
,
lat
),
15
)
this
.
map
.
centerAndZoom
(
new
BMap
.
Point
(
lng
,
lat
),
15
)
this
.
map
.
enableScrollWheelZoom
(
false
)
this
.
map
.
enableScrollWheelZoom
(
false
)
var
marker
=
new
BMap
.
Marker
(
point
);
//标记点
var
marker
=
new
BMap
.
Marker
(
point
);
//标记点
var
label
=
new
BMap
.
Label
(
name
,{
offset
:
new
BMap
.
Size
(
0
,
28
)});
//标签
var
label
=
new
BMap
.
Label
(
name
,
{
offset
:
new
BMap
.
Size
(
0
,
28
)
});
//标签
label
.
setStyle
({
label
.
setStyle
({
color
:
"#FFF"
,
color
:
"#FFF"
,
fontSize
:
"10px"
,
fontSize
:
"10px"
,
...
@@ -154,13 +192,12 @@
...
@@ -154,13 +192,12 @@
})
})
marker
.
setLabel
(
label
)
marker
.
setLabel
(
label
)
this
.
map
.
addOverlay
(
marker
);
this
.
map
.
addOverlay
(
marker
);
},
},
initHotel
()
{
initHotel
()
{
this
.
loading
=
true
this
.
loading
=
true
this
.
apipost
(
"hotel_post_GetAll"
,
{
this
.
apipost
(
"hotel_post_GetAll"
,
{
hotelID
:
this
.
hotelId
hotelID
:
this
.
hotelId
},
r
=>
{
},
r
=>
{
if
(
r
.
data
.
resultCode
==
1
)
{
if
(
r
.
data
.
resultCode
==
1
)
{
let
temp
=
r
.
data
.
data
let
temp
=
r
.
data
.
data
temp
.
isDinner
=
temp
.
UseDinnerType
&&
temp
.
UseDinnerType
!=
''
temp
.
isDinner
=
temp
.
UseDinnerType
&&
temp
.
UseDinnerType
!=
''
...
@@ -170,179 +207,211 @@
...
@@ -170,179 +207,211 @@
})
})
}
}
temp
.
HotelTypeInfo
=
this
.
hotelTyps
.
find
((
x
)
=>
x
.
Id
==
temp
.
HotelType
)
temp
.
HotelTypeInfo
=
this
.
hotelTyps
.
find
((
x
)
=>
x
.
Id
==
temp
.
HotelType
)
let
tempService
=
JSON
.
parse
(
temp
.
FacilityServices
)[
0
]?
JSON
.
parse
(
temp
.
FacilityServices
)[
0
]
:
{}
let
tempService
=
JSON
.
parse
(
temp
.
FacilityServices
)[
0
]
?
JSON
.
parse
(
temp
.
FacilityServices
)[
0
]
:
{}
temp
.
CheckHotelService
=
tempService
.
list
.
filter
((
x
)
=>
tempService
.
checked
.
indexOf
(
x
.
ID
)
!=
-
1
)
temp
.
CheckHotelService
=
tempService
.
list
.
filter
((
x
)
=>
tempService
.
checked
.
indexOf
(
x
.
ID
)
!=
-
1
)
this
.
h
=
temp
this
.
h
=
temp
this
.
h
.
List
.
forEach
((
x
)
=>
{
this
.
h
.
List
.
forEach
((
x
)
=>
{
this
.
images
.
push
(
`http://imgfile.oytour.com
${
x
.
Path
}
`
)
this
.
images
.
push
(
`http://imgfile.oytour.com
${
x
.
Path
}
`
)
})
})
this
.
initMap
(
this
.
h
.
Lng
,
this
.
h
.
Lat
,
this
.
h
.
Name
)
this
.
initMap
(
this
.
h
.
Lng
,
this
.
h
.
Lat
,
this
.
h
.
Name
)
}
else
{
}
else
{
this
.
Error
(
r
.
data
.
message
);
this
.
Error
(
r
.
data
.
message
);
}
}
this
.
loading
=
false
this
.
loading
=
false
},
null
)
},
null
)
},
},
showImageHandler
()
{
showImageHandler
()
{
this
.
$refs
.
images
.
showViewer
=
true
this
.
$refs
.
images
.
showViewer
=
true
},
},
}
}
};
};
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.hotelDetails-header
{
.hotelDetails-header
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
}
}
.hotelDetails-header
span
{
.hotelDetails-header
span
{
font-size
:
18px
;
font-size
:
18px
;
font-weight
:
bold
;
font-weight
:
bold
;
margin-right
:
10px
;
margin-right
:
10px
;
color
:
black
;
color
:
black
;
}
}
.hotelDetails-content
{
}
.hotelDetails-content
{}
.hotelDetails-infor
{
.hotelDetails-infor
{
padding
:
20px
0
;
padding
:
20px
0
;
}
}
.hotelDetails-infor
div
{
.hotelDetails-infor
div
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
}
}
.hotelDetails-infor
>
div
:first-child
{
.hotelDetails-infor
>
div
:first-child
{
margin-bottom
:
5px
;
margin-bottom
:
5px
;
}
}
.hotelDetails-infor
div
i
{
.hotelDetails-infor
div
i
{
color
:
#BDBDBD
;
color
:
#BDBDBD
;
margin-right
:
5px
;
margin-right
:
5px
;
}
}
.hotelDetails-infor
div
p
{
.hotelDetails-infor
div
p
{
margin-right
:
10px
;
margin-right
:
10px
;
}
}
.hotelDetails-infor
div
p
span
{
.hotelDetails-infor
div
p
span
{
font-size
:
13px
;
font-size
:
13px
;
color
:
black
;
color
:
black
;
}
}
.hotelDetails-infor
div
p
span
:nth-child
(
2
),
.hotelDetails-infor
div
p
a
{
.hotelDetails-infor
div
p
span
:nth-child
(
2
),
.hotelDetails-infor
div
p
a
{
color
:
#2196F3
;
color
:
#2196F3
;
margin-left
:
5px
;
margin-left
:
5px
;
}
}
.hotelDetails-infor
div
p
a
{
.hotelDetails-infor
div
p
a
{
cursor
:
pointer
;
cursor
:
pointer
;
text-decoration
:
underline
text-decoration
:
underline
}
}
.hotelDetails-ImgMap
{
.hotelDetails-ImgMap
{
display
:
flex
;
display
:
flex
;
justify-content
:
space-between
;
justify-content
:
space-between
;
}
}
.hotelDetails-Img
{
.hotelDetails-Img
{
width
:
60%
;
width
:
60%
;
}
}
.hotelDetails-Map
{
.hotelDetails-Map
{
flex
:
1
;
flex
:
1
;
flex-shrink
:
0
;
flex-shrink
:
0
;
}
}
.hotelDetails-Map
{
.hotelDetails-Map
{
margin-left
:
10px
;
margin-left
:
10px
;
}
}
.hotelDetails-Img
{
.hotelDetails-Img
{
display
:
flex
;
display
:
flex
;
/* overflow: hidden; */
/* overflow: hidden; */
}
}
.hotelDetails-Img
>
div
:first-child
{
.hotelDetails-Img
>
div
:first-child
{
flex-grow
:
1
;
flex-grow
:
1
;
}
}
.hotelDetails-Img
>
div
:nth-child
(
2
)
{
.hotelDetails-Img
>
div
:nth-child
(
2
)
{
width
:
100%
;
width
:
100%
;
margin-left
:
10px
;
margin-left
:
10px
;
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
}
}
.Img-right-box
:nth-child
(
2
)
{
.Img-right-box
:nth-child
(
2
)
{
margin-top
:
8px
;
margin-top
:
8px
;
}
}
.Img-right-box
{
.Img-right-box
{
height
:
50%
;
height
:
50%
;
position
:
relative
;
position
:
relative
;
overflow
:
hidden
;
overflow
:
hidden
;
}
}
.Img-right-num
{
.Img-right-num
{
position
:
absolute
;
position
:
absolute
;
top
:
0
;
top
:
0
;
left
:
0
;
left
:
0
;
right
:
0
;
right
:
0
;
bottom
:
0
;
bottom
:
0
;
background
:
rgba
(
23
,
23
,
23
,
.5
);
background
:
rgba
(
23
,
23
,
23
,
.5
);
z-index
:
2
;
z-index
:
2
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
center
;
justify-content
:
center
;
cursor
:
pointer
;
cursor
:
pointer
;
}
}
.Img-right-num
span
{
.Img-right-num
span
{
color
:
#ffffff
;
color
:
#ffffff
;
font-size
:
23px
;
font-size
:
23px
;
font-weight
:
bold
;
font-weight
:
bold
;
}
}
.Img-right-num
span
:first-child
{
.Img-right-num
span
:first-child
{
font-size
:
20px
;
font-size
:
20px
;
font-weight
:
bold
;
font-weight
:
bold
;
margin-right
:
10px
;
margin-right
:
10px
;
}
}
.hotelDetails-prompt
{
.hotelDetails-prompt
{
margin
:
20px
0
;
margin
:
20px
0
;
border-radius
:
3px
;
border-radius
:
3px
;
background
:
#E1F5FE
;
background
:
#E1F5FE
;
padding
:
10px
;
padding
:
10px
;
}
}
.hotelDetails-prompt
p
{
.hotelDetails-prompt
p
{
font-weight
:
500
;
font-weight
:
500
;
font-size
:
13px
;
font-size
:
13px
;
padding
:
0
0
10px
0
;
padding
:
0
0
10px
0
;
}
}
.hotelDetails-prompt
div
{
.hotelDetails-prompt
div
{
color
:
#5E5E5E
;
color
:
#5E5E5E
;
font-size
:
12px
;
font-size
:
12px
;
line-height
:
25px
;
line-height
:
25px
;
}
}
.hotelDetails-prompt.prompt
{
.hotelDetails-prompt.prompt
{
background
:
#FFF3E0
;
background
:
#FFF3E0
;
border
:
1px
dashed
#FFA500
;
border
:
1px
dashed
#FFA500
;
}
}
.hotelDetails-service
{
.hotelDetails-service
{
padding
:
0
15px
;
padding
:
0
15px
;
}
}
.service
{
.service
{
display
:
flex
;
display
:
flex
;
justify-content
:
space-between
;
justify-content
:
space-between
;
padding
:
10px
0
;
padding
:
10px
0
;
}
}
.service
span
{
.service
span
{
color
:
#A8ABBC
;
color
:
#A8ABBC
;
font-size
:
12px
;
font-size
:
12px
;
width
:
120px
;
width
:
120px
;
flex-shrink
:
0
;
flex-shrink
:
0
;
}
}
.service
div
{
.service
div
{
flex-grow
:
1
;
flex-grow
:
1
;
display
:
flex
;
display
:
flex
;
flex-direction
:
row
;
flex-direction
:
row
;
flex-wrap
:
wrap
;
flex-wrap
:
wrap
;
color
:
black
;
color
:
black
;
}
}
.service
div
p
{
.service
div
p
{
margin-right
:
15px
;
margin-right
:
15px
;
}
}
.service
div
li
{
.service
div
li
{
list-style-type
:
disc
;
list-style-type
:
disc
;
list-style-position
:
outside
;
list-style-position
:
outside
;
white-space
:
nowrap
;
white-space
:
nowrap
;
margin-right
:
15px
;
margin-right
:
15px
;
}
}
.Img-absolute
{
.Img-absolute
{
position
:
absolute
;
position
:
absolute
;
padding
:
5px
;
padding
:
5px
;
bottom
:
unset
;
bottom
:
unset
;
...
@@ -353,20 +422,26 @@
...
@@ -353,20 +422,26 @@
font-size
:
12px
;
font-size
:
12px
;
background
:
#ffffff
;
background
:
#ffffff
;
}
}
.Img-absolute-box
{
.Img-absolute-box
{
display
:
flex
;
display
:
flex
;
flex-direction
:
row
;
flex-direction
:
row
;
align-items
:
center
;
align-items
:
center
;
overflow
:
hidden
;
overflow
:
hidden
;
}
}
.Img-absolute-box
div
:first-child
{
padding
:
0
4px
;
font-size
:
12px
;
background
:
black
;
color
:
white
;
}
.Img-absolute-box
div
:last-child
{
padding
:
0
4px
;
font-size
:
12px
;
background
:
#f0bd86
;
color
:
black
;
}
.Img-absolute-box
div
:first-child
{
padding
:
0
4px
;
font-size
:
12px
;
background
:
black
;
color
:
white
;
}
</
style
>
.Img-absolute-box
div
:last-child
{
padding
:
0
4px
;
font-size
:
12px
;
background
:
#f0bd86
;
color
:
black
;
}
</
style
>
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