Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mocp-uniapp
Overview
Overview
Details
Activity
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
pangchong
mocp-uniapp
Commits
47f22a51
Commit
47f22a51
authored
Jul 18, 2024
by
liujinbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
航班保障-列表-页面
parent
612ad67d
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
132 additions
and
15 deletions
+132
-15
src/mocp/api/flight-support.js
+2
-2
src/mocp/components/global-page/global-page.vue
+14
-1
src/mocp/store/flight-support.js
+46
-4
src/mocp/utils/getFlightList.ts
+11
-0
src/pages/modules/mocp/panel/flight-support/constants/flightSupportList.scss
+31
-0
src/pages/modules/mocp/panel/flight-support/list.vue
+28
-8
No files found.
src/mocp/api/flight-support.js
View file @
47f22a51
import
{
http
}
from
'mocp/utils/http'
import
{
http
}
from
'mocp/utils/http'
export
const
flightSupportGetList
Api
=
(
data
,
config
)
=>
{
export
const
getFlyToApplets
Api
=
(
data
,
config
)
=>
{
return
http
({
return
http
({
method
:
'POST'
,
method
:
'POST'
,
url
:
'/flighting/getFList'
,
url
:
'/flighting/getF
lyToApplets'
,
//'/flighting/getF
List',
data
,
data
,
config
config
})
})
...
...
src/mocp/components/global-page/global-page.vue
View file @
47f22a51
...
@@ -203,6 +203,10 @@ const ps = defineProps({
...
@@ -203,6 +203,10 @@ const ps = defineProps({
backToTopBottom
:
{
backToTopBottom
:
{
type
:
[
Number
,
String
],
type
:
[
Number
,
String
],
default
:
'160rpx'
default
:
'160rpx'
},
localPaging
:
{
type
:
Boolean
,
default
:
false
}
}
})
})
// z-page样式
// z-page样式
...
@@ -248,7 +252,16 @@ const queryList = (pageIndex, pageSize) => {
...
@@ -248,7 +252,16 @@ const queryList = (pageIndex, pageSize) => {
ps
.
api
(
params
,
{
loading
:
true
})
ps
.
api
(
params
,
{
loading
:
true
})
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
if
(
res
.
code
==
200
||
res
.
list
?.
length
)
{
if
(
res
.
code
==
200
||
res
.
list
?.
length
)
{
paging
.
value
?.
complete
(
res
.
list
||
res
.
data
?.
list
||
[])
if
(
!
ps
.
localPaging
)
{
paging
.
value
?.
complete
(
res
.
list
||
res
.
data
?.
list
||
res
?.
data
||
[])
}
else
{
const
data
=
res
.
data
||
[]
const
currentTime
=
Date
.
now
()
data
.
sort
((
a
,
s
)
=>
{
return
Math
.
abs
(
currentTime
-
a
.
stdChn
)
-
Math
.
abs
(
currentTime
-
s
.
stdChn
)
})
paging
.
value
?.
setLocalPaging
(
data
)
}
}
else
{
}
else
{
uni
.
$mocpMessage
.
error
(
res
.
message
)
uni
.
$mocpMessage
.
error
(
res
.
message
)
}
}
...
...
src/mocp/store/flight-support.js
View file @
47f22a51
import
{
defineStore
}
from
'pinia'
import
{
defineStore
}
from
'pinia'
import
useUserStore
from
'mocp/store/user'
import
{
decideTimeRange
}
from
'mocp/utils/getFlightList'
const
userStore
=
useUserStore
()
const
listTab
=
[
{
label
:
'航班号'
,
selected
:
true
},
{
label
:
'机号'
,
selected
:
true
},
{
label
:
'机型'
,
selected
:
true
},
{
label
:
'机位'
,
selected
:
true
},
{
label
:
'出发地'
,
selected
:
true
},
{
label
:
'预/实'
,
selected
:
true
},
{
label
:
'计划'
,
selected
:
false
},
{
label
:
'特殊任务'
,
selected
:
true
},
{
label
:
'状态'
,
selected
:
false
}
]
const
listScreen
=
[
{
name
:
'进港'
,
value
:
'进港'
},
{
name
:
'出港'
,
value
:
'出港'
},
{
name
:
'无航班'
,
value
:
'无航班'
}
]
const
time
=
decideTimeRange
(
new
Date
().
getTime
())
console
.
log
(
time
)
const
useFlightSupportStore
=
defineStore
(
'informationDisclosure'
,
{
const
useFlightSupportStore
=
defineStore
(
'informationDisclosure'
,
{
state
:
()
=>
{
state
:
()
=>
{
return
{
return
{
searchData
:
{
searchData
:
{
startT
:
'1721163600000'
,
acOwn
:
''
,
//航司
acOwns2
:
''
,
acTerminals1
:
''
,
acType
:
''
,
//机型
acTypes2
:
''
,
acs1
:
''
,
isInbound
:
1
,
isOut
:
0
,
startT
:
1721250000000
,
stopT
:
1721336400000
,
terminal
:
userStore
.
userInfo
.
terminal
//,'WUH',//航站
//flightNo: '',//航班号
//ac: '',//机号
/*startT: '1721163600000',
stopT: '1721249999000',
stopT: '1721249999000',
acTerminals2
:
'WUH'
,
acTerminals2:
userStore.userInfo.terminal,//
'WUH',
sortType: 'stdChn',
sortType: 'stdChn',
apiPwd: 'Ifar$2_0160_525_Mocp',
apiPwd: 'Ifar$2_0160_525_Mocp',
isAsc: '1',
isAsc: '1',
pageIndex: 1,
pageIndex: 1,
pageSize: 50,
pageSize: 50,
requestFrom: 6,
requestFrom: 6,
realUserId
:
10
realUserId: 10
*/
},
},
details
:
undefined
,
details
:
undefined
,
screenData
:
{}
listTab
,
listScreen
,
listScreenCurrent
:
1
}
}
},
},
getters
:
{},
getters
:
{},
actions
:
{
actions
:
{
getSelectedList
()
{
return
listTab
.
filter
(
item
=>
item
.
selected
)
},
resetForm
()
{
resetForm
()
{
this
.
searchData
=
{
this
.
searchData
=
{
startT
:
''
,
startT
:
''
,
...
@@ -42,4 +83,5 @@ const useFlightSupportStore = defineStore('informationDisclosure', {
...
@@ -42,4 +83,5 @@ const useFlightSupportStore = defineStore('informationDisclosure', {
// 配置持久化
// 配置持久化
persist
:
false
persist
:
false
})
})
export
default
useFlightSupportStore
export
default
useFlightSupportStore
src/mocp/utils/getFlightList.ts
0 → 100644
View file @
47f22a51
const
dayForMilliseconds
=
24
*
3600
*
1000
export
function
decideTimeRange
(
inputNum
:
number
)
{
const
d
=
new
Date
(
inputNum
)
d
.
setHours
(
5
,
0
,
0
,
0
)
return
{
startT
:
d
.
getTime
(),
stopT
:
d
.
getTime
()
+
dayForMilliseconds
}
}
\ No newline at end of file
src/pages/modules/mocp/panel/flight-support/constants/flightSupportList.scss
View file @
47f22a51
...
@@ -9,8 +9,39 @@
...
@@ -9,8 +9,39 @@
}
}
}
}
.listTopTab
{
padding
:
0
0
.75rem
;
font-size
:
12px
;
color
:
rgba
(
0
,
0
,
0
,
0
.6
);
.topTabItem
{
flex
:
1
;
}
}
.listScreenClass
{
padding
:
0
.5rem
0
.75rem
;
.listScreenRT
{
width
:
262rpx
;
::v-deep
.u-subsection__item
{
border
:
none
!
important
;
}
::v-deep
.u-subsection__bar
{
border-radius
:
50rpx
;
}
}
}
.flex
{
.flex
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
}
}
.flex-between
{
justify-content
:
space-between
;
}
src/pages/modules/mocp/panel/flight-support/list.vue
View file @
47f22a51
...
@@ -11,8 +11,9 @@
...
@@ -11,8 +11,9 @@
navRightType=
"icon"
navRightType=
"icon"
navRightIcon=
"saixuan-01"
navRightIcon=
"saixuan-01"
@
handleRightClick=
"handleRightClick"
@
handleRightClick=
"handleRightClick"
:api=
"
flightSupportGetList
Api"
:api=
"
getFlyToApplets
Api"
:padding=
"24"
:padding=
"24"
localPaging
>
>
<template
#="
{ dataList }">
<template
#="
{ dataList }">
<view
<view
...
@@ -20,14 +21,31 @@
...
@@ -20,14 +21,31 @@
:key=
"item.id"
:key=
"item.id"
class=
"inforDisclosureItem flex mocp-bg-fill-4"
>
class=
"inforDisclosureItem flex mocp-bg-fill-4"
>
<view
class=
"top"
>
<view
class=
"top"
>
<view
class=
"flex"
>
{{
item
.
airlineCode
}}
</view>
<view
class=
"flex"
>
{{
item
.
flightNo
}}
****
{{
item
.
airlineCode
}}
</view>
</view>
</view>
</view>
</view>
</
template
>
</
template
>
<
template
v-slot:top
>
123456
</
template
>
<
template
v-slot:top
>
<view
class=
"flex listTopTab"
>
<view
v-for=
"item of getSelectedList"
:key=
"item.label"
class=
"topTabItem"
>
{{
item
.
label
}}
</view>
</view>
</
template
>
<
template
v-slot:bottom
>
<
template
v-slot:bottom
>
<view></view>
<view
class=
"flex flex-between listScreenClass"
>
<global-icon
icon=
"saixuan-01"
/>
<up-subsection
class=
"listScreenRT"
:list=
"listScreen"
:current=
"1"
mode=
"subsection"
bgColor=
"#f00"
activeColor=
"#165DFF"
inactiveColor=
"#165DFF"
/>
</view>
</
template
>
</
template
>
</global-page>
</global-page>
...
@@ -35,16 +53,18 @@
...
@@ -35,16 +53,18 @@
<
script
setup
>
<
script
setup
>
import
{
ref
}
from
'vue'
import
{
ref
}
from
'vue'
import
{
flightSupportGetList
Api
}
from
'mocp/api/flight-support'
import
{
getFlyToApplets
Api
}
from
'mocp/api/flight-support'
import
useFlightSupportStore
from
'mocp/store/flight-support'
import
useFlightSupportStore
from
'mocp/store/flight-support'
import
{
storeToRefs
}
from
'pinia'
import
{
storeToRefs
}
from
'pinia'
const
flightSupportStore
=
useFlightSupportStore
()
const
flightSupportStore
=
useFlightSupportStore
()
const
{
searchData
}
=
storeToRefs
(
flightSupportStore
)
const
getSelectedList
=
flightSupportStore
.
getSelectedList
()
console
.
log
(
flightSupportStore
.
getSelectedList
())
const
{
searchData
,
listTab
,
listScreen
,
listScreenCurrent
}
=
storeToRefs
(
flightSupportStore
)
const
handleRightClick
=
()
=>
{
const
handleRightClick
=
()
=>
{
console
.
log
(
'handleRightClick information-disclosure'
,
flightSupportStore
)
console
.
log
(
listTab
,
listScreen
,
listScreenCurrent
)
uni
.
$mocpJump
.
navigateTo
(
'/panel/flight-support/components/screen'
)
//
uni.$mocpJump.navigateTo('/panel/flight-support/components/screen')
}
}
...
...
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