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
e64be084
Commit
e64be084
authored
Jul 22, 2024
by
liujinbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
航班保障-详情-页面
parent
44c4bf45
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
201 additions
and
116 deletions
+201
-116
src/mocp/components/global-navbar/global-navbar.vue
+7
-1
src/mocp/components/global-page/global-page.vue
+5
-4
src/mocp/store/flight-support.js
+11
-9
src/mocp/utils/getFlightList.ts
+5
-3
src/pages.json
+6
-0
src/pages/modules/mocp/panel/flight-support/components/Screen.vue
+2
-1
src/pages/modules/mocp/panel/flight-support/components/TableRow.vue
+29
-8
src/pages/modules/mocp/panel/flight-support/constants/details.scss
+7
-0
src/pages/modules/mocp/panel/flight-support/constants/flightSupportList.css
+0
-68
src/pages/modules/mocp/panel/flight-support/constants/flightSupportList.css.map
+0
-7
src/pages/modules/mocp/panel/flight-support/constants/flightSupportList.scss
+1
-2
src/pages/modules/mocp/panel/flight-support/flight-support-details/index.vue
+19
-0
src/pages/modules/mocp/panel/flight-support/list.vue
+11
-2
src/pages/modules/mocp/panel/flight-support/utils/currentAllRelatedFlights.js
+54
-0
src/pages/modules/mocp/panel/flight-support/utils/currentInBoundMode.js
+12
-11
src/pages/modules/mocp/panel/flight-support/utils/jumpSlingleFlight.js
+18
-0
src/pages/modules/mocp/panel/flight-support/utils/scheduledReload.js
+14
-0
No files found.
src/mocp/components/global-navbar/global-navbar.vue
View file @
e64be084
<
template
>
<!-- 全局自定义navbar -->
<view
class=
"mocp-navbar"
>
<up-navbar
:title=
"title"
:fixed=
"false"
:bgColor=
"bgColor"
:safeAreaInsetTop=
"false"
:titleStyle=
"getTitleStyle"
:leftIconSize=
"0"
>
<up-navbar
:title=
"title"
:fixed=
"false"
:bgColor=
"bgColor"
:safeAreaInsetTop=
"false"
:titleStyle=
"getTitleStyle"
:leftIconSize=
"0"
>
<template
#
left
>
<slot
name=
"left"
></slot>
</
template
>
...
...
@@ -29,8 +30,13 @@ const ps = defineProps({
default
:
()
=>
{
return
{}
}
},
navBarBackground
:
{
type
:
String
,
default
:
'#f00'
}
})
console
.
log
(
ps
.
navBarBackground
)
const
getTitleStyle
=
computed
(()
=>
{
return
{
...
ps
.
titleStyle
,
...
...
src/mocp/components/global-page/global-page.vue
View file @
e64be084
...
...
@@ -25,7 +25,8 @@
<
template
#
top
>
<view
:style=
"
{ height: safeAreaInsets?.top + 'px' }" v-if="custom">
</view>
<!-- 自定义导航栏 -->
<global-navbar
:title=
"title"
v-if=
"showNavbar"
>
<global-navbar
:title=
"title"
v-if=
"showNavbar"
:bgColor=
"$attrs.navBarBackground"
:titleStyle=
"$attrs.titleStyle"
>
<template
#
left
v-if=
"pages.length > 1 && showNavLeft"
>
<up-icon
v-if=
"navLeftType == 'icon'"
:name=
"navLeftIcon"
size=
"16"
@
tap=
"handleLeftClick"
></up-icon>
...
...
@@ -249,7 +250,7 @@ const scroll = () => {
// #endif
}
// 获取屏幕边界到安全区域距离
const
{
safeAreaInsets
}
=
uni
.
getSystemInfoSync
()
const
{
safeAreaInsets
}
=
uni
.
getSystemInfoSync
()
//列表加载
const
queryList
=
(
pageIndex
,
pageSize
)
=>
{
if
(
ps
.
isDataList
)
{
...
...
@@ -259,7 +260,7 @@ const queryList = (pageIndex, pageSize) => {
...
filterEmptyValues
(
ps
.
params
)
}
if
(
Object
.
prototype
.
toString
.
call
(
ps
.
api
)
==
'[object Function]'
)
{
ps
.
api
(
params
,
{
loading
:
true
})
ps
.
api
(
params
,
{
loading
:
true
})
.
then
((
res
)
=>
{
if
(
res
.
code
==
200
||
res
.
list
?.
length
)
{
if
(
!
ps
.
localPaging
)
{
...
...
@@ -279,7 +280,7 @@ const queryList = (pageIndex, pageSize) => {
paging
.
value
?.
complete
(
false
)
}
}
else
{
es
(
'query'
,
{
pageIndex
,
pageSize
})
es
(
'query'
,
{
pageIndex
,
pageSize
})
}
}
//点击左边插槽
...
...
src/mocp/store/flight-support.js
View file @
e64be084
import
{
defineStore
}
from
'pinia'
import
{
defineStore
,
storeToRefs
}
from
'pinia'
import
useUserStore
from
'mocp/store/user'
import
{
decideTimeRange
,
listTab
,
listScreen
}
from
'mocp/utils/getFlightList'
import
Day
from
'mocp/utils/dayjs'
const
userStore
=
useUserStore
()
const
time
=
decideTimeRange
(
new
Date
().
getTime
())
const
{
startT
,
stopT
}
=
decideTimeRange
(
new
Date
().
getTime
())
const
useFlightSupportStore
=
defineStore
(
'
informationDisclosure
'
,
{
const
useFlightSupportStore
=
defineStore
(
'
flightSupport
'
,
{
state
:
()
=>
{
return
{
searchData
:
{
isOut
:
0
,
//0-进港 1-出港 2-无航班
startT
:
time
.
startT
,
stopT
:
time
.
stopT
,
startT
,
stopT
,
isInbound
:
1
,
ac
:
''
,
//机号
...
...
@@ -34,11 +35,11 @@ const useFlightSupportStore = defineStore('informationDisclosure', {
}
},
getters
:
{
getSearchData
(
s
ata
e
)
{
return
{...
s
atae
.
searchData
,
...
sata
e
.
screenData
}
getSearchData
(
s
tat
e
)
{
return
{...
s
tate
.
searchData
,
...
stat
e
.
screenData
}
},
getSelectedList
(
s
ata
e
)
{
return
s
ata
e
.
listTab
.
filter
(
item
=>
item
.
selected
)
getSelectedList
(
s
tat
e
)
{
return
s
tat
e
.
listTab
.
filter
(
item
=>
item
.
selected
)
}
},
actions
:
{
...
...
@@ -68,6 +69,7 @@ const useFlightSupportStore = defineStore('informationDisclosure', {
}
},
// 配置持久化
// persist: false
persist
:
{
// 调整为兼容多端的API
storage
:
{
...
...
src/mocp/utils/getFlightList.ts
View file @
e64be084
import
{
ref
,
computed
}
from
'vue'
const
dayForMilliseconds
=
24
*
3600
*
1000
export
function
decideTimeRange
(
inputNum
:
number
)
{
...
...
@@ -9,17 +11,17 @@ export function decideTimeRange(inputNum: number) {
}
}
export
const
listTab
=
[
export
const
listTab
=
ref
(
[
{
label
:
'航班号'
,
key
:
'flightNo'
,
flex
:
3
,
selected
:
true
},
{
label
:
'机号'
,
key
:
'ac'
,
flex
:
2
,
selected
:
true
},
{
label
:
'机型'
,
key
:
'acTypeGc'
,
flex
:
2
,
selected
:
true
},
{
label
:
'机位'
,
key
:
'parkPlace'
,
flex
:
2
,
selected
:
false
},
{
label
:
'出发地'
,
key
:
'
depStn
'
,
flex
:
2
,
selected
:
true
},
//place
{
label
:
'出发地'
,
key
:
'
place
'
,
flex
:
2
,
selected
:
true
},
//place
{
label
:
'预/实'
,
key
:
'time'
,
flex
:
2
,
selected
:
true
},
//etaChn ataChn : etdChn atdChn time
{
label
:
'计划'
,
key
:
'staChn'
,
flex
:
2
,
selected
:
true
},
//staChn schTime
{
label
:
'特殊任务'
,
key
:
'isSpecialTask'
,
flex
:
2
,
selected
:
false
},
{
label
:
'状态'
,
key
:
'status'
,
flex
:
2
,
selected
:
true
}
]
]
)
export
const
listScreen
=
[
{
name
:
'进港'
,
value
:
0
},
...
...
src/pages.json
View file @
e64be084
...
...
@@ -202,6 +202,12 @@
}
},
{
"path"
:
"pages/modules/mocp/panel/flight-support/flight-support-details/index"
,
"style"
:
{
"navigationBarTitleText"
:
"航班详情"
}
},
{
"path"
:
"pages/modules/mocp/panel/technology-evaluation/list"
,
"style"
:
{
"navigationBarTitleText"
:
"技术评估"
...
...
src/pages/modules/mocp/panel/flight-support/components/Screen.vue
View file @
e64be084
...
...
@@ -51,7 +51,6 @@ import { ref } from 'vue'
import
{
storeToRefs
}
from
'pinia'
import
{
cloneDeep
}
from
'lodash'
import
useBaseStore
from
'mocp/store/base'
import
useMoveDecisionStore
from
'mocp/store/move-decision'
import
useFlightSupportStore
from
'mocp/store/flight-support'
import
{
onUnload
}
from
'@dcloudio/uni-app'
...
...
@@ -63,12 +62,14 @@ const flightSupportStore = useFlightSupportStore()
const
{
screenData
}
=
storeToRefs
(
flightSupportStore
)
const
formData
=
ref
(
cloneDeep
(
screenData
.
value
))
// 重置
const
handleReset
=
()
=>
{
flightSupportStore
.
resetScreenForm
()
uni
.
$mocpJump
.
redirectTo
(
'/panel/flight-support/list'
)
uni
.
$emit
(
'screenReload'
)
}
// 提交
const
handleConfirm
=
()
=>
{
flightSupportStore
.
setStateScreen
(
formData
.
value
)
uni
.
$mocpJump
.
redirectTo
(
'/panel/flight-support/list'
)
...
...
src/pages/modules/mocp/panel/flight-support/components/TableRow.vue
View file @
e64be084
<
template
>
<view
@
tap=
"rowClicked(msg.globalMsg)"
class=
"tableRow flex"
:class=
"msg.globalMsg.isFinished ? 'mocp-bg-fill-4' : ''"
>
:class=
"msg.globalMsg.isFinished ? 'mocp-bg-fill-4' : ''"
>
<view
v-for=
"(item, index) of msg.filterMsg"
:key=
"index"
...
...
@@ -17,7 +19,7 @@
<RenderTime
v-else-if=
"item.key === 'time'"
:item=
"
item
"
:item=
"
msg.globalMsg
"
/>
<view
...
...
@@ -40,10 +42,13 @@ import { decideReleaseStatus } from '../utils/currentInBoundMode'
import
GlobalFlightNo
from
'mocp/components/global-flight-no/global-flight-no.vue'
import
RenderTime
from
'../components/RenderTime.vue'
import
{
fightListPlanTime
}
from
'mocp/utils/getFlightList'
import
{
rowClicked
}
from
'../utils/jumpSlingleFlight'
import
{
currentInBoundModeForFlightTablePage
,
allInBoundMode
}
from
'../utils/currentInBoundMode'
const
flightSupportStore
=
useFlightSupportStore
()
const
{
listTab
}
=
storeToRefs
(
flightSupportStore
)
const
ps
=
defineProps
({
item
:
{
type
:
Object
,
...
...
@@ -53,7 +58,8 @@ const ps = defineProps({
// 组装列表数据
const
msg
=
computed
(()
=>
{
const
filterListTab
=
listTab
.
value
.
filter
(
item
=>
item
.
selected
)
const
isCurrentIn
=
currentInBoundModeForFlightTablePage
.
value
+
1
==
allInBoundMode
.
In
const
filterListTab
=
listTab
.
value
.
filter
(
item
=>
!!
item
.
selected
)
const
filterMsg
=
filterListTab
.
map
(
item
=>
{
const
defaultObj
=
{
key
:
item
.
key
,
...
...
@@ -67,18 +73,24 @@ const msg = computed(() => {
airlineCode
:
ps
.
item
[
'airlineCode'
]
}
}
// 预/实
if
(
item
.
key
==
'time'
)
{
// 出发地
if
(
item
.
key
==
'depStn'
)
{
console
.
log
()
return
{
...
defaultObj
...
defaultObj
,
data
:
isCurrentIn
?
ps
.
item
.
depStn
:
ps
.
item
.
arrStn
}
}
// 计划
if
(
fightListPlanTime
.
includes
(
item
.
key
))
{
console
.
log
()
return
{
...
defaultObj
,
data
:
Day
(
ps
.
item
[
item
.
key
]).
format
(
'HH:mm'
)
data
:
isCurrentIn
?
Day
(
ps
.
item
.
staChn
).
format
(
'HH:mm'
)
:
Day
(
ps
.
item
.
stdChn
).
format
(
'HH:mm'
)
}
}
// 状态
...
...
@@ -88,6 +100,15 @@ const msg = computed(() => {
...
decideReleaseStatus
(
ps
.
item
)
}
}
// 特殊任务
if
(
item
.
key
==
'isSpecialTask'
)
{
const
current
=
ps
.
item
console
.
log
(
current
)
return
{
...
defaultObj
,
data
:
current
.
isVip
||
current
.
isHighlandFlights
||
current
.
fltType
===
'I'
?
'特殊'
:
''
}
}
return
{
...
defaultObj
}
...
...
src/pages/modules/mocp/panel/flight-support/constants/details.scss
0 → 100644
View file @
e64be084
@charset
"utf-8"
;
@import
"../constants/flightSupportList.scss"
;
.flightSupportDetails
{
background-color
:
$mocp-primary-7
;
}
src/pages/modules/mocp/panel/flight-support/constants/flightSupportList.css
deleted
100644 → 0
View file @
44c4bf45
.flex
{
display
:
flex
;
align-items
:
center
;
}
.text-center
{
text-align
:
center
;
}
.color-blue
{
color
:
blue
;
}
.color-red
{
color
:
red
;
}
.flex-between
{
justify-content
:
space-between
;
}
.inforDisclosureItem
{
border-radius
:
12
rpx
;
border-bottom
:
1px
solid
#e7e7e7
;
background-color
:
#fff
;
}
.inforDisclosureItem
.tableRow
{
width
:
100%
;
font-size
:
12px
;
color
:
rgba
(
0
,
0
,
0
,
0.6
);
padding
:
20
rpx
0
;
}
.inforDisclosureItem
.tableRow
.rowItem
{
flex
:
1
;
}
.inforDisclosureItem
.tableRow
.rowItem.flex-1
{
flex
:
1
;
}
.inforDisclosureItem
.tableRow
.rowItem.flex-2
{
flex
:
2
;
}
.inforDisclosureItem
.tableRow
.rowItem.flex-3
{
flex
:
3
;
}
.listTopTab
{
padding
:
20
rpx
0.75rem
;
font-size
:
12px
;
color
:
rgba
(
0
,
0
,
0
,
0.6
);
background-color
:
#fff
;
border-bottom
:
1px
solid
#e7e7e7
;
}
.listTopTab
.topTabItem
{
flex
:
1
;
}
.listScreenClass
{
padding
:
0.5rem
0.75rem
;
}
.listScreenClass
.listScreenRT
{
width
:
262
rpx
;
}
.listScreenClass
.listScreenRT
::v-deep
.u-subsection__item
{
border
:
none
!important
;
}
.listScreenClass
.listScreenRT
::v-deep
.u-subsection__bar
{
border-radius
:
50
rpx
;
}
.custom-title
{
font-size
:
12px
;
color
:
rgba
(
0
,
0
,
0
,
0.6
);
padding
:
0
24
rpx
;
}
.custom-checkbox
{
padding
:
24
rpx
0
;
}
.custom-checkbox
.checkbox-item
{
background
:
#fff
;
padding
:
20
rpx
24
rpx
;
margin-bottom
:
4
rpx
;
}
.custom-btn
{
margin
:
24
rpx
32
rpx
;
}
/*# sourceMappingURL=flightSupportList.css.map */
src/pages/modules/mocp/panel/flight-support/constants/flightSupportList.css.map
deleted
100644 → 0
View file @
44c4bf45
{
"version": 3,
"mappings": "AACA,KAAM;EACF,OAAO,EAAE,IAAI;EACb,WAAW,EAAE,MAAM;;AAGvB,YAAa;EACT,UAAU,EAAE,MAAM;;AAGtB,WAAY;EACR,KAAK,EAAE,IAAI;;AAGf,UAAW;EACP,KAAK,EAAE,GAAG;;AAGd,aAAc;EACV,eAAe,EAAE,aAAa;;AAGlC,oBAAqB;EACjB,aAAa,EAAE,KAAK;EACpB,aAAa,EAAE,iBAAgC;EAC/C,gBAAgB,EAAE,IAAI;EAEtB,8BAAU;IACN,KAAK,EAAE,IAAI;IACX,SAAS,EAAE,IAAI;IACf,KAAK,EAAE,kBAAkB;IACzB,OAAO,EAAE,OAAO;IAEhB,uCAAS;MACL,IAAI,EAAE,CAAC;MAEP,8CAAS;QACL,IAAI,EAAE,CAAC;MAGX,8CAAS;QACL,IAAI,EAAE,CAAC;MAGX,8CAAS;QACL,IAAI,EAAE,CAAC;;AAMvB,WAAY;EACR,OAAO,EAAE,aAAa;EACtB,SAAS,EAAE,IAAI;EACf,KAAK,EAAE,kBAAkB;EACzB,gBAAgB,EAAE,IAAI;EACtB,aAAa,EAAE,iBAAgC;EAE/C,uBAAY;IACR,IAAI,EAAE,CAAC;;AAIf,gBAAiB;EACb,OAAO,EAAE,cAAc;EAEvB,8BAAc;IACV,KAAK,EAAE,MAAM;IAEb,2DAA6B;MACzB,MAAM,EAAE,eAAe;IAG3B,0DAA4B;MACxB,aAAa,EAAE,KAAK;;AAMhC,aAAc;EACV,SAAS,EAAE,IAAI;EACf,KAAK,EAAE,kBAAkB;EACzB,OAAO,EAAE,OAAO;;AAGpB,gBAAiB;EACb,OAAO,EAAE,OAAO;EAEhB,+BAAe;IACX,UAAU,EAAE,IAAI;IAChB,OAAO,EAAE,WAAW;IACpB,aAAa,EAAE,IAAI;;AAI3B,WAAY;EACR,MAAM,EAAE,WAAW",
"sources": ["flightSupportList.scss"],
"names": [],
"file": "flightSupportList.css"
}
src/pages/modules/mocp/panel/flight-support/constants/flightSupportList.scss
View file @
e64be084
...
...
@@ -50,7 +50,7 @@
}
.listTopTab
{
padding
:
20rpx
0
.75rem
;
padding
:
20rpx
0
;
font-size
:
12px
;
color
:
rgba
(
0
,
0
,
0
,
0
.6
);
background-color
:
#fff
;
...
...
@@ -77,7 +77,6 @@
}
}
.custom-title
{
font-size
:
12px
;
color
:
rgba
(
0
,
0
,
0
,
0
.6
);
...
...
src/pages/modules/mocp/panel/flight-support/flight-support-details/index.vue
0 → 100644
View file @
e64be084
<
template
>
<global-page
title=
"航班详情"
navBarBackground=
"#0e42d2"
>
<view
class=
"flightSupportDetails"
>
航班详情
</view>
</global-page>
</
template
>
<
script
setup
>
import
{
ref
}
from
'vue'
import
{
storeToRefs
}
from
'pinia'
import
{
cloneDeep
}
from
'lodash'
import
useBaseStore
from
'mocp/store/base'
import
useFlightSupportStore
from
'mocp/store/flight-support'
import
{
onUnload
}
from
'@dcloudio/uni-app'
</
script
>
<
style
lang=
"scss"
scoped
>
@import
"../constants/details"
;
</
style
>
src/pages/modules/mocp/panel/flight-support/list.vue
View file @
e64be084
...
...
@@ -63,10 +63,11 @@ import { storeToRefs } from 'pinia'
import
TableTow
from
'./components/TableRow.vue'
import
{
finishedStatus
}
from
'mocp/utils/getFlightList'
import
{
onUnload
}
from
'@dcloudio/uni-app'
import
{
currentInBoundModeForFlightTablePage
,
allInBoundMode
}
from
'./utils/currentInBoundMode'
const
paging
=
ref
(
null
)
const
flightSupportStore
=
useFlightSupportStore
()
const
{
searchData
,
getSearchData
,
listScreen
,
getSelectedList
}
=
storeToRefs
(
flightSupportStore
)
const
{
searchData
,
getSearchData
,
listScreen
,
getSelectedList
,
listTab
}
=
storeToRefs
(
flightSupportStore
)
const
handleRightClick
=
()
=>
{
uni
.
$mocpJump
.
navigateTo
(
'/panel/flight-support/components/Screen'
)
...
...
@@ -97,7 +98,7 @@ const localPagingCB = (data) => {
return
q
})
.
flat
()
//
console.log('**listMsg**', listMsg)
console
.
log
(
'**listMsg**'
,
listMsg
)
return
listMsg
}
...
...
@@ -106,7 +107,15 @@ const toCustom = () => {
}
const
subsectionChange
=
(
e
)
=>
{
if
(
searchData
.
value
.
isOut
==
e
)
return
searchData
.
value
.
isOut
=
e
currentInBoundModeForFlightTablePage
.
value
=
e
const
ind
=
listTab
.
value
.
findIndex
(
item
=>
item
.
label
==
'出发地'
||
item
.
label
==
'目的地'
)
const
isCurrentIn
=
currentInBoundModeForFlightTablePage
.
value
+
1
==
allInBoundMode
.
In
if
(
ind
>
-
1
)
{
console
.
log
(
currentInBoundModeForFlightTablePage
.
value
,
allInBoundMode
.
In
,
ind
)
listTab
.
value
[
ind
].
label
=
isCurrentIn
?
'出发地'
:
'目的地'
}
paging
.
value
.
reload
()
}
...
...
src/pages/modules/mocp/panel/flight-support/utils/currentAllRelatedFlights.js
0 → 100644
View file @
e64be084
import
{
ref
}
from
'vue'
import
{
allInBoundMode
,
currentInBoundModeForFlightSinglePage
}
from
'./currentInBoundMode'
import
{
disableUpdateInTimeForTasks
}
from
'./scheduledReload'
export
const
fromTablePartIdentifierProps
=
ref
({
depStn
:
''
,
stdChn
:
''
})
export
const
timeRangeSpecifier
=
ref
(
0
)
export
const
currentAllRelatedFlights
=
ref
([])
export
const
currentFlightDataPassAlong
=
ref
({})
export
const
isFetchingDataInFlightSingle
=
ref
(
false
)
export
const
currentFlightSingleHandlingAc
=
ref
(
''
)
export
const
currentSelectedIndexInAllRelatedFlights
=
ref
(
0
)
export
const
currentFlightSingleHandlingAcType
=
ref
(
''
)
export
const
currentAirlineCode
=
ref
(
''
)
let
initialIndexConfig
=
0
let
initialType
=
allInBoundMode
.
In
export
function
setUpInitialSwitchConfig
()
{
initialIndexConfig
=
currentSelectedIndexInAllRelatedFlights
.
value
initialType
=
currentInBoundModeForFlightSinglePage
.
value
}
export
function
beforeJumpSingleFlightHandleFunc
(
ac
,
identifier
,
inBoundMode
,
airlineCode
)
{
currentAllRelatedFlights
.
value
=
[]
currentFlightDataPassAlong
.
value
=
{}
currentFlightSingleHandlingAc
.
value
=
ac
fromTablePartIdentifierProps
.
value
=
identifier
currentInBoundModeForFlightSinglePage
.
value
=
inBoundMode
currentAirlineCode
.
value
=
airlineCode
}
export
function
currentSelectedIndexInAllRelatedFlightsChanged
(
v
)
{
disableUpdateInTimeForTasks
()
currentSelectedIndexInAllRelatedFlights
.
value
=
v
currentFlightDataPassAlong
.
value
=
currentAllRelatedFlights
.
value
[
v
]
if
(
v
===
initialIndexConfig
)
{
currentInBoundModeForFlightSinglePage
.
value
=
initialType
}
else
if
(
v
===
initialIndexConfig
+
1
)
{
currentInBoundModeForFlightSinglePage
.
value
=
initialType
===
allInBoundMode
.
In
?
allInBoundMode
.
Out
:
allInBoundMode
.
In
}
}
src/pages/modules/mocp/panel/flight-support/utils/currentInBoundMode.js
View file @
e64be084
import
{
ref
}
from
'vue'
export
const
allInBoundMode
=
{
In
:
1
,
Out
:
2
In
:
1
,
Out
:
2
}
export
const
currentInBoundModeForFlightTablePage
=
ref
(
allInBoundMode
.
In
)
...
...
@@ -12,7 +12,7 @@ export const currentInBoundModeForFlightSinglePage = ref(allInBoundMode.In)
export
function
decideReleaseStatus
(
v
)
{
let
allReleases
=
v
.
releases
let
manualReleases
=
allReleases
.
filter
(
a
=>
a
.
isUserAdd
)
if
(
currentInBoundModeForFlightTablePage
.
value
===
allInBoundMode
.
Out
)
{
if
(
currentInBoundModeForFlightTablePage
.
value
+
1
===
allInBoundMode
.
Out
)
{
manualReleases
=
manualReleases
.
filter
(
a
=>
a
.
isOut
)
allReleases
=
allReleases
.
filter
(
a
=>
a
.
isOut
)
}
else
{
...
...
@@ -22,23 +22,23 @@ export function decideReleaseStatus(v) {
if
(
manualReleases
.
length
)
{
if
(
manualReleases
.
every
(
a
=>
a
.
releaseStatus
>
0
))
{
return
{
data
:
'已放行'
,
color
:
'color-blue'
data
:
'已放行'
,
color
:
'color-blue'
}
}
return
{
data
:
'未放行'
,
color
:
'color-red'
data
:
'未放行'
,
color
:
'color-red'
}
}
if
(
allReleases
.
every
(
a
=>
a
.
releaseStatus
>
0
))
{
return
{
data
:
'已放行'
,
color
:
'color-blue'
data
:
'已放行'
,
color
:
'color-blue'
}
}
return
{
data
:
'未放行'
,
color
:
'color-red'
data
:
'未放行'
,
color
:
'color-red'
}
}
\ No newline at end of file
src/pages/modules/mocp/panel/flight-support/utils/jumpSlingleFlight.js
0 → 100644
View file @
e64be084
import
{
timeRangeSpecifier
,
beforeJumpSingleFlightHandleFunc
}
from
'./currentAllRelatedFlights'
import
{
currentInBoundModeForFlightTablePage
,
allInBoundMode
}
from
'./currentInBoundMode'
export
const
rowClicked
=
(
currentMsg
)
=>
{
console
.
log
(
'****'
,
currentMsg
)
if
(
!
currentMsg
.
ac
)
return
uni
.
$mocpMessage
.
error
(
'航班已取消'
)
timeRangeSpecifier
.
value
=
0
beforeJumpSingleFlightHandleFunc
(
currentMsg
.
ac
,
{
depStn
:
currentMsg
.
depStn
,
stdChn
:
currentMsg
.
stdChn
},
currentInBoundModeForFlightTablePage
.
value
,
currentMsg
.
airlineCode
)
uni
.
$mocpJump
.
navigateTo
(
'/panel/flight-support/flight-support-details/index'
)
}
\ No newline at end of file
src/pages/modules/mocp/panel/flight-support/utils/scheduledReload.js
0 → 100644
View file @
e64be084
let
shouldTimelyUpdate
=
false
let
clearlyTimeout
=
0
const
TimeIntervalJob
=
5000
export
function
disableUpdateInTimeForTasks
()
{
clearTimeout
(
clearlyTimeout
)
shouldTimelyUpdate
=
false
clearlyTimeout
=
setTimeout
(
function
()
{
shouldTimelyUpdate
=
true
},
TimeIntervalJob
)
}
\ No newline at end of file
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