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
853c5719
Commit
853c5719
authored
Nov 25, 2022
by
youjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
d462445d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
22 deletions
+12
-22
ListCar.vue
src/components/hotel/list/ListCar.vue
+1
-8
ListHeader.vue
src/components/hotel/list/ListHeader.vue
+5
-11
TableOperation.vue
src/components/hotel/list/TableOperation.vue
+3
-1
HotelList.vue
src/pages/hotel/HotelList.vue
+3
-2
No files found.
src/components/hotel/list/ListCar.vue
View file @
853c5719
...
...
@@ -159,7 +159,6 @@ export default defineComponent({
currentI
:
0
,
currentS
:
0
,
RemainingInventory
:
0
,
// HotelLength: 0,
loading
:
false
,
cacheHotels
:
[
{
Name
:
t
(
'hotel.car.scattered'
),
ID
:
1
},
...
...
@@ -248,12 +247,6 @@ export default defineComponent({
data
.
loading
=
false
})
},
getLength
()
{
HotelLength
.
value
=
0
cars
.
value
.
forEach
((
item
:
any
)
=>
{
HotelLength
.
value
+=
item
.
Hotels
.
length
})
},
removeHotelHandler
(
x
:
number
,
y
:
number
){
$q
.
dialog
({
title
:
t
(
'dialog.titles.hotel'
),
...
...
@@ -266,6 +259,7 @@ export default defineComponent({
}
else
{
cars
.
value
[
x
].
Hotels
.
splice
(
y
,
1
)
}
HotelLength
.
value
=
cars
.
value
.
length
})
},
...
...
@@ -274,7 +268,6 @@ export default defineComponent({
context
.
emit
(
'close'
)
}
}
methods
.
getLength
()
methods
.
getMoney
()
return
{
...
toRefs
(
data
),
...
...
src/components/hotel/list/ListHeader.vue
View file @
853c5719
...
...
@@ -90,7 +90,6 @@ export default defineComponent({
cacheHotels
:
[]
as
Array
<
any
>
,
hotelsRates
:
[]
as
Array
<
HotelRate
>
,
canHide
:
false
,
// HotelLength: 0
})
data
.
scrollStyle
=
useScrollModule
().
scrollStyle
const
search
=
inject
(
DirtionmaryHelper
.
HOTEL_QUERY_PARAM
)
as
any
...
...
@@ -186,14 +185,6 @@ export default defineComponent({
setSuccess
(){
data
.
rightCarOpen
=
false
},
getLength
(){
HotelLength
.
value
=
0
if
(
cars
.
value
.
length
>
0
){
cars
.
value
.
forEach
((
item
:
any
)
=>
{
HotelLength
.
value
+=
item
.
Hotels
.
length
})
}
},
}
const
searchCnt
=
computed
(()
=>
{
let
setCnt
=
0
...
...
@@ -211,10 +202,13 @@ export default defineComponent({
methods
.
initHotels
()
watch
(
cars
.
value
,
(
n
,
o
)
=>
{
localStorage
.
setItem
(
DirtionmaryHelper
.
HOTEL_HOTELCARS_CACHE
,
JSON
.
stringify
(
cars
.
value
))
methods
.
getLength
()
})
watch
(
HotelLength
,
(
n
,
o
)
=>
{
HotelLength
.
value
=
n
})
onMounted
(()
=>
{
methods
.
getLength
()
})
return
{
...
toRefs
(
data
),
...
...
src/components/hotel/list/TableOperation.vue
View file @
853c5719
...
...
@@ -108,6 +108,7 @@ export default defineComponent({
setup
(
props
,
context
)
{
const
{
t
}
=
useI18n
()
const
qDateProxyOpera
=
ref
<
any
>
(
null
)
const
HotelLength
=
inject
(
DirtionmaryHelper
.
HOTEL_CAR_ORDER_LENGTH
)
as
any
const
cars
=
inject
(
DirtionmaryHelper
.
HOTEL_CAR_LIST
)
as
any
const
editor
=
inject
(
DirtionmaryHelper
.
HOTEL_UPDATEHOTEL_CAR
)
as
any
const
data
=
reactive
({
...
...
@@ -201,6 +202,7 @@ export default defineComponent({
cars
.
value
.
sort
((
x
:
any
,
y
:
any
)
=>
{
return
new
Date
(
x
.
Date
).
getTime
()
-
new
Date
(
y
.
Date
).
getTime
()
})
HotelLength
.
value
=
cars
.
value
.
length
message
.
successMsg
(
t
(
'success'
))
editor
.
value
=
{}
context
.
emit
(
'close'
)
...
...
@@ -282,7 +284,7 @@ export default defineComponent({
}
})
return
{
...
toRefs
(
data
),
...
methods
,
editor
}
return
{
...
toRefs
(
data
),
editor
,
HotelLength
,
...
methods
}
}
})
</
script
>
...
...
src/pages/hotel/HotelList.vue
View file @
853c5719
...
...
@@ -41,6 +41,7 @@ export default defineComponent({
provide
(
DirtionmaryHelper
.
HOTEL_QUERY_PARAM
,
search
)
const
HotelCarList
=
ref
<
Array
<
any
>>
([])
const
cacheCars
=
localStorage
.
getItem
(
DirtionmaryHelper
.
HOTEL_HOTELCARS_CACHE
)
if
(
cacheCars
){
HotelCarList
.
value
=
JSON
.
parse
(
cacheCars
)
...
...
@@ -50,8 +51,8 @@ export default defineComponent({
provide
(
DirtionmaryHelper
.
HOTEL_UPDATEHOTEL_CAR
,
updateObj
)
const
orderstatus
=
ref
(
false
)
provide
(
DirtionmaryHelper
.
HOTEL_CAR_ORDER_STATUS
,
orderstatus
)
const
HotelLength
=
ref
(
0
)
provide
(
DirtionmaryHelper
.
HOTEL_CAR_ORDER_LENGTH
,
HotelLength
)
const
HotelLength
s
=
ref
(
0
)
provide
(
DirtionmaryHelper
.
HOTEL_CAR_ORDER_LENGTH
,
HotelLength
s
)
const
menu
=
inject
(
DirtionmaryHelper
.
MENU_KEYS
)
as
any
menu
.
value
=
2
...
...
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