Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
bigwood
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
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
罗超
bigwood
Commits
85ce9ab0
Commit
85ce9ab0
authored
Nov 24, 2022
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解決衝突
parent
e339448c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
289 additions
and
50 deletions
+289
-50
index.ts
src/@types/index.ts
+9
-0
App.vue
src/App.vue
+2
-0
ImagePreview.vue
src/components/common/ImagePreview.vue
+111
-0
ListTable.vue
src/components/hotel/list/ListTable.vue
+22
-3
hotelDetails.vue
src/components/hotel/list/hotelDetails.vue
+98
-43
index.ts
src/i18n/zh-TW/index.ts
+20
-3
tools.ts
src/utils/tools.ts
+27
-1
No files found.
src/@types/index.ts
View file @
85ce9ab0
...
@@ -218,3 +218,12 @@ export type OrderType={
...
@@ -218,3 +218,12 @@ export type OrderType={
TypeId
:
number
,
TypeId
:
number
,
TypeName
:
string
TypeName
:
string
}
}
export
type
DinnerType
=
{
Id
:
number
,
Name
:
string
}
export
type
HotelType
=
{
Id
:
number
,
Name
:
string
}
src/App.vue
View file @
85ce9ab0
...
@@ -301,4 +301,6 @@ body
...
@@ -301,4 +301,6 @@ body
color
:
var
(
--
q-gray-800
)
!
important
color
:
var
(
--
q-gray-800
)
!
important
.text-grey-900
.text-grey-900
color
:
var
(
--
q-gray-900
)
!
important
color
:
var
(
--
q-gray-900
)
!
important
.no-padding
.q-dialog__inner--minimized
padding
:
0px
!
important
</
style
>
</
style
>
src/components/common/ImagePreview.vue
0 → 100644
View file @
85ce9ab0
<
template
>
<div
style=
"width: 100vw !important; height: 100vh !important; overflow: hidden"
class=
"column items-center justify-center"
>
<q-img
width=
"100%"
height=
"100%"
:src=
"images[currentIndex]"
:img-style=
"
{'transform':scaleString+' '+rotateString}" spinner-color="primary" spinner-size="30px" fit="cover" />
<!--
<img
:src=
"images[currentIndex]"
class=
"drop-target"
:style=
"
{'transform':scaleString+' '+rotateString}"/> -->
</div>
<div
class=
"img-preview-tools-box"
style=
"box-shadow: none !important"
>
<div
class=
"img-preview-tools"
style=
"box-shadow: none !important"
>
<div
class=
"row items-center"
style=
"box-shadow: none !important"
>
<q-icon
name=
"first_page"
size=
"28px"
color=
"grey-2"
class=
"q-mr-md cursor-pointer"
v-ripple
@
click=
"changeImageIndexHandler(-1)"
/>
<q-icon
name=
"last_page"
size=
"28px"
color=
"grey-2"
class=
"q-mr-md cursor-pointer"
v-ripple
@
click=
"changeImageIndexHandler(1)"
/>
<q-icon
name=
"rotate_right"
size=
"28px"
color=
"grey-2"
class=
"q-mr-md cursor-pointer"
v-ripple
@
click=
"rotateHandler(1)"
/>
<q-icon
name=
"rotate_left"
size=
"28px"
color=
"grey-2"
class=
"q-mr-md cursor-pointer"
v-ripple
@
click=
"rotateHandler(-1)"
/>
<q-icon
name=
"crop_free"
size=
"28px"
color=
"grey-2"
class=
"q-mr-md cursor-pointer"
v-ripple
@
click=
"zoomHandler(0)"
/>
<q-icon
name=
"zoom_out"
size=
"28px"
color=
"grey-2"
class=
"q-mr-md cursor-pointer"
v-ripple
@
click=
"zoomHandler(-1)"
/>
<q-icon
name=
"zoom_in"
size=
"28px"
color=
"grey-2"
class=
"q-mr-md cursor-pointer"
v-ripple
@
click=
"zoomHandler(1)"
/>
<q-icon
name=
"close"
size=
"28px"
color=
"grey-2"
class=
"cursor-pointer"
v-ripple
v-close-popup
/>
<!-- crop_free rotate_right first_page -->
</div>
</div>
</div>
</
template
>
<
script
lang=
"ts"
>
import
{
defineComponent
,
toRefs
,
watch
,
reactive
}
from
'vue'
export
default
defineComponent
({
props
:
[
'current'
,
'images'
],
setup
(
props
)
{
watch
(
()
=>
props
.
current
,
(
n
,
o
)
=>
{
data
.
current
=
props
.
current
data
.
images
=
props
.
images
data
.
currentIndex
=
data
.
images
.
indexOf
(
data
.
current
)
data
.
currentIndex
=
data
.
currentIndex
==-
1
?
0
:
data
.
currentIndex
}
)
const
data
=
reactive
({
current
:
props
.
current
,
currentIndex
:
0
,
images
:
props
.
images
,
scale
:
1
,
scaleString
:
'scale(1)'
,
rotate
:
0
,
rotateString
:
'rotate(0deg)'
})
data
.
currentIndex
=
data
.
images
.
indexOf
(
data
.
current
)
data
.
currentIndex
=
data
.
currentIndex
==-
1
?
0
:
data
.
currentIndex
const
methods
=
{
zoomHandler
(
num
:
number
){
if
(
num
==
0
){
data
.
scale
=
1
}
if
(
data
.
scale
<
3
&&
num
>
0
){
data
.
scale
+=
0.25
}
if
(
data
.
scale
>
0.25
&&
num
<
0
){
data
.
scale
-=
0.25
}
data
.
scaleString
=
`scale(
${
data
.
scale
}
)`
console
.
log
(
data
.
scale
,
data
.
scaleString
)
},
rotateHandler
(
num
:
number
){
if
(
num
==
0
){
data
.
rotate
=
0
}
if
(
num
>
0
){
data
.
rotate
+=
90
}
if
(
num
<
0
){
data
.
rotate
-=
90
}
data
.
rotateString
=
`rotate(
${
data
.
rotate
}
deg)`
},
changeImageIndexHandler
(
num
:
number
){
data
.
scale
=
1
data
.
scaleString
=
`scale(
${
data
.
scale
}
)`
data
.
rotate
=
0
data
.
rotateString
=
`rotate(
${
data
.
rotate
}
deg)`
let
i
=
data
.
currentIndex
i
+=
num
i
=
i
<
0
?
data
.
images
.
length
-
1
:
i
i
=
i
==
data
.
images
.
length
?
0
:
i
data
.
currentIndex
=
i
}
}
return
{
...
toRefs
(
data
),
...
methods
}
}
})
</
script
>
<
style
>
.img-preview-tools-box
{
position
:
fixed
;
z-index
:
999999
;
bottom
:
100px
;
}
.img-preview-tools-box
.img-preview-tools
{
background
:
rgba
(
0
,
0
,
0
,
0.5
);
border-radius
:
48px
;
padding
:
10px
20px
;
display
:
inline-block
;
}
</
style
>
src/components/hotel/list/ListTable.vue
View file @
85ce9ab0
...
@@ -25,8 +25,10 @@
...
@@ -25,8 +25,10 @@
<q-td
style=
"width:200px;"
class=
"cursor-pointer ListTable-title"
@
click=
"showHotelDetailHandler(props.row.HotelId)"
>
<q-td
style=
"width:200px;"
class=
"cursor-pointer ListTable-title"
@
click=
"showHotelDetailHandler(props.row.HotelId)"
>
<div
class=
"ellipsis-3-lines"
style=
"padding: 7px 16px;width: 200px;white-space: break-spaces;"
>
<div
class=
"ellipsis-3-lines"
style=
"padding: 7px 16px;width: 200px;white-space: break-spaces;"
>
{{
props
.
row
.
HotelName
}}
{{
props
.
row
.
HotelName
}}
<!--
<q-tooltip
style=
"padding:none;"
>
<hotel-card
class=
"ListTable-show"
></hotel-card>
</q-tooltip>
-->
</div>
</div>
<!--
<hotelCard
class=
"ListTable-show"
v-if=
"props.rowIndex==0"
></hotelCard>
-->
</q-td>
</q-td>
<q-td>
<q-td>
<div
class=
"td-item"
>
{{
$t
(
'hotel.table.price'
)
}}
</div>
<div
class=
"td-item"
>
{{
$t
(
'hotel.table.price'
)
}}
</div>
...
@@ -74,8 +76,25 @@
...
@@ -74,8 +76,25 @@
card-class=
"no-shadow bg-primary text-white"
card-class=
"no-shadow bg-primary text-white"
:pagination=
"pages"
:pagination=
"pages"
:loading=
"loading"
:loading=
"loading"
@
row-click=
"viewHotelPriceListHandler"
>
>
<
template
v-slot:item=
"props"
>
<div
@
click=
"viewHotelPriceListHandler(props.row)"
class=
"rounded-borders bg-primary text-white col-12 q-mb-sm"
style=
"padding: 12px;margin-left: 12px;margin-right: 12px; width: calc(100% - 24px);"
>
<div
@
click
.
stop=
"showHotelDetailHandler(props.row.HotelId)"
>
<div
style=
"opacity: 0.54;font-weight: 500;font-size: 12px;margin-bottom: 4px;"
>
{{
$t
(
'hotel.col.first'
)
}}
</div>
<div
style=
"font-size: 13px;"
>
{{
props
.
row
.
HotelName
}}
</div>
</div>
<div
class=
"q-my-md"
>
<div
style=
"opacity: 0.54;font-weight: 500;font-size: 12px;margin-bottom: 4px;"
>
{{
$t
(
'hotel.col.three'
)
}}
</div>
<div
style=
"font-size: 13px;"
>
{{
props
.
row
.
TotalInventory
}}
</div>
</div>
<div>
<div
style=
"opacity: 0.54;font-weight: 500;font-size: 12px;margin-bottom: 4px;"
>
{{
$t
(
'hotel.col.four'
)
}}
</div>
<div
class=
""
>
<span>
¥
{{
props
.
row
.
LowerPrice
.
toFixed
(
2
)
}}
円
{{
$t
(
'hotel.col.low'
)
}}
</span>
</div>
</div>
</div>
</
template
>
<
template
v-slot:bottom
>
<
template
v-slot:bottom
>
<q-pagination
class=
"full-width justify-end"
v-model=
"pages.pageIndex"
color=
"primary"
:max=
"pages.pageCount"
:input=
"true"
@
update:model-value=
"changePageHandler"
/>
<q-pagination
class=
"full-width justify-end"
v-model=
"pages.pageIndex"
color=
"primary"
:max=
"pages.pageCount"
:input=
"true"
@
update:model-value=
"changePageHandler"
/>
</
template
>
</
template
>
...
@@ -229,7 +248,7 @@ export default defineComponent({
...
@@ -229,7 +248,7 @@ export default defineComponent({
})
})
return
lower
return
lower
},
},
viewHotelPriceListHandler
(
e
:
any
,
row
:
any
,
index
:
number
){
viewHotelPriceListHandler
(
row
:
any
){
data
.
queryHotelObj
=
row
data
.
queryHotelObj
=
row
data
.
showPriceList
=
true
data
.
showPriceList
=
true
},
},
...
...
src/components/hotel/list/hotelDetails.vue
View file @
85ce9ab0
This diff is collapsed.
Click to expand it.
src/i18n/zh-TW/index.ts
View file @
85ce9ab0
...
@@ -16,6 +16,21 @@ export default {
...
@@ -16,6 +16,21 @@ export default {
verified
:
'已認證'
,
verified
:
'已認證'
,
noneFax
:
'無傳真信息'
,
noneFax
:
'無傳真信息'
,
noneNotify
:
'暫無通知消息'
,
noneNotify
:
'暫無通知消息'
,
none
:
'無'
,
have
:
'有'
,
free
:
'免費'
,
before
:
'提前'
,
dinner
:{
a
:
'早餐'
,
b
:
'午餐'
,
c
:
'晚餐'
},
hotelType
:{
a
:
'商務酒店'
,
b
:
'豪華酒店'
,
c
:
'溫泉酒店'
,
d
:
'海濱度假酒店'
,
},
personal
:{
personal
:{
pageTitle
:
"個人檔案"
,
pageTitle
:
"個人檔案"
,
trading
:
'累積交易額'
,
trading
:
'累積交易額'
,
...
@@ -57,7 +72,8 @@ export default {
...
@@ -57,7 +72,8 @@ export default {
d
:
'預約截止天數'
,
d
:
'預約截止天數'
,
e
:
'是否含餐'
,
e
:
'是否含餐'
,
f
:
'酒店類型'
,
f
:
'酒店類型'
,
g
:
'設施服務'
g
:
'設施服務'
,
h
:
'溫馨提醒'
}
}
},
},
dialog
:{
dialog
:{
...
@@ -80,7 +96,8 @@ export default {
...
@@ -80,7 +96,8 @@ export default {
jp
:
"円"
,
jp
:
"円"
,
jpc
:
"¥"
,
jpc
:
"¥"
,
night
:
"晚"
,
night
:
"晚"
,
jf
:
"間房"
jf
:
"間房"
,
day
:
'天'
},
},
expends
:{
expends
:{
on
:
"展開"
,
on
:
"展開"
,
...
@@ -354,7 +371,7 @@ export default {
...
@@ -354,7 +371,7 @@ export default {
registlink
:
"申請註冊"
,
registlink
:
"申請註冊"
,
title
:
"登入"
,
title
:
"登入"
,
subTitle
:
"歡迎您的到來,開啟急速採購"
,
subTitle
:
"歡迎您的到來,開啟急速採購"
,
account
:
"帳戶(EMail)"
,
account
:
"帳戶(EMail
/統編
)"
,
password
:
"密碼"
,
password
:
"密碼"
,
forgot
:
"忘記密碼?"
,
forgot
:
"忘記密碼?"
,
signin
:
"登入"
,
signin
:
"登入"
,
...
...
src/utils/tools.ts
View file @
85ce9ab0
import
{
SitLang
,
StandardStatus
,
RoomType
,
OrderType
}
from
'./../@types/index'
;
import
{
SitLang
,
StandardStatus
,
RoomType
,
OrderType
,
DinnerType
,
HotelType
}
from
'./../@types/index'
;
import
{
i18n
}
from
'../boot/i18n'
import
{
i18n
}
from
'../boot/i18n'
const
{
t
}
=
i18n
.
global
const
{
t
}
=
i18n
.
global
/**
/**
...
@@ -183,6 +183,32 @@ export function getHotelOrderType(getNormal:boolean = false):Array<OrderType>{
...
@@ -183,6 +183,32 @@ export function getHotelOrderType(getNormal:boolean = false):Array<OrderType>{
return
types
return
types
}
}
export
function
getDinners
():
DinnerType
[]{
let
dinners
=
[]
as
Array
<
DinnerType
>
let
dinStr
=
[
t
(
'dinner.a'
),
t
(
'dinner.b'
),
t
(
'dinner.c'
)]
dinStr
.
forEach
((
x
:
string
,
i
:
number
)
=>
{
dinners
.
push
({
Id
:
i
+
1
,
Name
:
x
})
})
return
dinners
}
export
function
getHotelType
():
HotelType
[]{
let
hotelTypes
=
[]
as
Array
<
HotelType
>
let
types
=
[
t
(
'hotelType.a'
),
t
(
'hotelType.b'
),
t
(
'hotelType.c'
),
t
(
'hotelType.c'
)]
types
.
forEach
((
x
:
string
,
i
:
number
)
=>
{
hotelTypes
.
push
({
Id
:
i
+
1
,
Name
:
x
})
})
return
hotelTypes
}
export
function
getLangs
()
{
export
function
getLangs
()
{
const
zhTw
:
SitLang
=
{
const
zhTw
:
SitLang
=
{
langLocale
:
"zhTW"
,
langLocale
:
"zhTW"
,
...
...
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