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
58d844b6
Commit
58d844b6
authored
Jul 29, 2024
by
liujinbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
信息通报-兼容其他模板展示
parent
8ad2b684
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
425 additions
and
253 deletions
+425
-253
src/mocp/api/flight-support.js
+42
-0
src/mocp/components/global-flight-no/global-flight-no.vue
+28
-14
src/mocp/store/flight-support.js
+20
-15
src/mocp/utils/getFlightList.js
+5
-1
src/pages/modules/mocp/panel/flight-support/components/DetailsFlightInfo.vue
+32
-20
src/pages/modules/mocp/panel/flight-support/components/DetailsFollowCrewItem.vue
+6
-5
src/pages/modules/mocp/panel/flight-support/components/DetailsOtherInfo.vue
+11
-47
src/pages/modules/mocp/panel/flight-support/components/DetailsSwiper.vue
+9
-7
src/pages/modules/mocp/panel/flight-support/components/DetailsWeather.vue
+79
-0
src/pages/modules/mocp/panel/flight-support/components/TableRow.vue
+11
-5
src/pages/modules/mocp/panel/flight-support/constants/details.scss
+4
-0
src/pages/modules/mocp/panel/flight-support/flight-support-details/index.vue
+90
-34
src/pages/modules/mocp/panel/flight-support/list.vue
+2
-2
src/pages/modules/mocp/panel/flight-support/utils/currentAllRelatedFlights.js
+0
-54
src/pages/modules/mocp/panel/flight-support/utils/currentInBoundMode.js
+3
-3
src/pages/modules/mocp/panel/flight-support/utils/jumpSlingleFlight.js
+0
-18
src/pages/modules/mocp/panel/flight-support/utils/scheduledReload.js
+0
-14
src/pages/modules/mocp/panel/inforDisclosure/components/inforDisClosureItem.vue
+78
-0
src/pages/modules/mocp/panel/inforDisclosure/list.vue
+5
-14
No files found.
src/mocp/api/flight-support.js
View file @
58d844b6
...
...
@@ -16,3 +16,45 @@ export const getAircraftTerminalsApi = (data, config) => {
config
})
}
export
const
getFListApi
=
(
data
,
config
)
=>
{
return
http
({
method
:
'POST'
,
url
:
'/flighting/getFList'
,
data
,
config
})
}
export
const
getReleaseListApi
=
(
data
,
config
)
=>
{
return
http
({
method
:
'POST'
,
url
:
'/flighting/getReleaseList'
,
data
,
config
})
}
export
const
findWeatherSynopsesMessagesApi
=
(
data
,
config
)
=>
{
return
http
({
method
:
'POST'
,
url
:
'/basicinfo/findWeatherSynopsesMessages'
,
data
,
config
})
}
/*
* 获取天气信息
* /basicinfo/findWeatherSynopsesMessages
* {airportCode: "WUH"}
* [取最后一条数据] weatherInfoTxt-天气明朗 temperature-温度
*
*
* 获取航班任务-定时执行
* /flighting/getFlightTask
* {catchId: 9435439}
*
* 获取飞往目的地列表
* /flighting/getFlyToApplets
*
*
* */
src/mocp/components/global-flight-no/global-flight-no.vue
View file @
58d844b6
<
template
>
<!-- 航班号+航空图标 -->
<image
:style=
"
{visibility: airlinePic ? 'visible' : 'hidden'}"
class="flight-no-image"
:src="airlinePic || HnaPic"
:style=
"
{
visibility: airlinePic ? 'visible' : 'hidden',
...ps.style
}"
:src="airlinePic"
mode="widthFix" />
<text>
{{
ps
.
flightNo
}}
</text>
<text
v-if=
"ps.flightNo"
>
{{
ps
.
flightNo
}}
</text>
</
template
>
<
script
setup
>
...
...
@@ -13,15 +15,27 @@ import { computed } from 'vue'
import
HnaPic
from
'mocpStatic/image/monitor/hna.png'
import
{
airlinePicMapping
}
from
'./components/airlinePicMapping'
const
ps
=
defineProps
([
'flightNo'
,
'airline'
])
const
airlinePic
=
computed
(
function
()
{
return
airlinePicMapping
[
ps
.
airline
]
const
ps
=
defineProps
({
airline
:
{
type
:
String
,
default
:
HnaPic
},
flightNo
:
{
type
:
[
String
,
Number
],
default
:
''
},
style
:
{
type
:
Object
,
default
:
()
=>
{
return
{
'width'
:
'22rpx'
,
'height'
:
'22rpx'
,
'marginRight'
:
'6rpx'
}
}
}
})
const
airlinePic
=
computed
(()
=>
airlinePicMapping
[
ps
.
airline
])
</
script
>
<
style
lang=
"scss"
scoped
>
.flight-no-image
{
width
:
22
rpx
;
height
:
22
rpx
;
margin-right
:
6
rpx
;
}
</
style
>
<
style
lang=
"scss"
scoped
></
style
>
src/mocp/store/flight-support.js
View file @
58d844b6
...
...
@@ -15,7 +15,7 @@ const useFlightSupportStore = defineStore('flightSupport', {
isInbound
:
1
,
ac
:
''
,
//机号
flightNo
:
'
'
,
//航班号
flightNo
:
'
GS7857'
,
//航班号 临时测试用,ljb
acOwns2
:
''
,
acTerminals1
:
''
,
...
...
@@ -23,31 +23,36 @@ const useFlightSupportStore = defineStore('flightSupport', {
acs1
:
''
},
screenData
:
{
terminal
:
''
,
//航站
terminal
:
'
WUH
'
,
//航站
acType
:
''
,
//机型
acOwn
:
''
//航司
},
details
:
undefined
,
listTab
,
listScreen
,
listScreenCurrent
:
1
listScreenCurrent
:
1
,
details
:
undefined
,
filterDetailsList
:
[],
filterDetailsCurrentIndex
:
0
}
},
getters
:
{
getSearchData
(
state
)
{
getSearchData
(
state
)
{
const
userStore
=
useUserStore
()
return
{...
state
.
searchData
,
...
state
.
screenData
,
terminal
:
userStore
.
userInfo
?.
terminal
||
'WUH'
}
},
getSelectedList
(
state
)
{
getSelectedList
(
state
)
{
return
state
.
listTab
.
filter
(
item
=>
item
.
selected
)
},
getTerminal
()
{
getTerminal
()
{
const
userStore
=
useUserStore
()
return
userStore
.
userInfo
?.
terminal
||
'WUH'
},
getDetailsCurrentMsg
(
state
)
{
return
state
.
filterDetailsList
[
state
.
filterDetailsCurrentIndex
]
}
},
actions
:
{
resetScreenForm
()
{
resetScreenForm
()
{
const
userStore
=
useUserStore
()
this
.
screenData
=
{
terminal
:
userStore
.
userInfo
?.
terminal
||
'WUH'
,
...
...
@@ -55,7 +60,7 @@ const useFlightSupportStore = defineStore('flightSupport', {
acOwn
:
''
}
},
setStateScreen
(
state
)
{
setStateScreen
(
state
)
{
const
userStore
=
useUserStore
()
this
.
screenData
=
{
terminal
:
state
.
terminal
||
userStore
.
userInfo
?.
terminal
||
'WUH'
,
...
...
@@ -64,7 +69,7 @@ const useFlightSupportStore = defineStore('flightSupport', {
}
},
// 设置列表tab筛选数据
setListTabSelected
(
args
)
{
setListTabSelected
(
args
)
{
this
.
listTab
=
this
.
listTab
.
map
(
item
=>
{
const
that
=
args
.
find
(
args
=>
args
==
item
.
label
)
return
{
...
...
@@ -75,18 +80,18 @@ const useFlightSupportStore = defineStore('flightSupport', {
}
},
// 配置持久化
persist
:
false
/*
persist: {
//
persist: false
persist
:
{
// 调整为兼容多端的API
storage
:
{
setItem(key, value) {
setItem
(
key
,
value
)
{
uni
.
setStorageSync
(
key
,
value
)
},
getItem(key) {
getItem
(
key
)
{
return
uni
.
getStorageSync
(
key
)
}
}
}
*/
}
})
export
default
useFlightSupportStore
src/mocp/utils/getFlightList.js
View file @
58d844b6
...
...
@@ -2,7 +2,7 @@ import { ref, computed } from 'vue'
const
dayForMilliseconds
=
24
*
3600
*
1000
export
function
decideTimeRange
(
inputNum
)
{
export
function
decideTimeRange
(
inputNum
)
{
const
d
=
new
Date
(
inputNum
)
d
.
setHours
(
5
,
0
,
0
,
0
)
return
{
...
...
@@ -29,6 +29,10 @@ export const listScreen = [
{
name
:
'无航班'
,
value
:
2
}
]
export
const
followAcTagAll
=
[
'未接收'
,
'已接收'
,
'已出发'
,
'已到位'
,
'已登机'
]
export
const
fightListTime
=
[
'etdChn'
,
'atdChn'
,
'etaChn'
,
'ataChn'
]
export
const
fightListPlanTime
=
[
'staChn'
,
'schTime'
]
export
const
finishedStatus
=
[
'ARR'
,
'NDR'
,
'ATA'
]
...
...
src/pages/modules/mocp/panel/flight-support/components/DetailsFlightInfo.vue
View file @
58d844b6
<
template
>
<view
class=
"globalDetailsModel detailsBasicInfo"
>
<view
class=
"title"
>
BH9999
</view>
<view
class=
"title"
>
{{
getDetailsCurrentMsg
.
flightNo
}}
</view>
<view
class=
"basicInfoDep flex flex-between"
>
<view>
<text>
CKG
</text>
<
text
class=
"m-x-6"
>
重庆江北
</text
>
<
text>
T3
</text
>
<text>
{{
baseStore
.
getTerminalObject
[
getDetailsCurrentMsg
.
depStn
]
}}
</text>
<
!--
<text
class=
"m-x-6"
>
重庆江北
</text>
--
>
<
!--
<text>
T3
</text>
--
>
</view>
<view>
<
text>
WUh
</text
>
<text>
武汉天河
</text>
<
text>
T2
</text
>
<
!--
<text>
{{
getDetailsCurrentMsg
.
arrStn
}}
</text>
--
>
<text>
{{
baseStore
.
getTerminalObject
[
getDetailsCurrentMsg
.
arrStn
]
}}
</text>
<
!--
<text>
T2
</text>
--
>
</view>
</view>
<view
class=
"basicInfoTime flex flex-between"
>
<text>
19:59
</text>
<text>
{{
atdChnValue
}}
</text>
<image
class=
"timeFlightIcon"
:src=
"FlightImage"
/>
<text>
20:59
</text>
<text>
{{
ataChnValue
}}
</text>
</view>
<view
class=
"basicInfoTimePlan flex flex-between"
>
<view>
<text>
计划
</text>
<text
>
5/9
</text>
<text>
16:59
</text>
<text
class=
"MM"
>
{{
timeStampFormat
(
getDetailsCurrentMsg
.
stdChn
,
{
format
:
'MM/DD'
}
)
}}
<
/text
>
<
text
>
{{
timeStampFormat
(
getDetailsCurrentMsg
.
stdChn
,
{
format
:
'HH:mm'
}
)
}}
<
/text
>
<
/view
>
<
view
>
<text>
5/9
</text>
<text
>
17:59
</text>
<
text
>
{{
timeStampFormat
(
getDetailsCurrentMsg
.
staChn
,
{
format
:
'MM/DD'
}
)
}}
<
/text
>
<
text
class
=
"MM"
>
{{
timeStampFormat
(
getDetailsCurrentMsg
.
staChn
,
{
format
:
'HH:mm'
}
)
}}
<
/text
>
<
text
>
计划
<
/text
>
<
/view
>
<
/view
>
<
/view
>
<DetailsFollowCrewItem
title=
"跟机人员"
:list=
"
followCrewList
"
/>
<
DetailsFollowCrewItem
title
=
"跟机人员"
:
list
=
"
getDetailsCurrentMsg.mfollowAcLists
"
/>
<
/template
>
<
script
setup
>
import
{
ref
}
from
'vue'
import
{
computed
,
ref
}
from
'vue'
import
{
timeStampFormat
}
from
'mocp/utils/tool'
import
FlightImage
from
'mocpStatic/image/monitor/flight-pane.png'
import
DetailsFollowCrewItem
from
'./DetailsFollowCrewItem.vue'
import
useFlightSupportStore
from
'mocp/store/flight-support'
import
{
storeToRefs
}
from
'pinia'
import
useBaseStore
from
'mocp/store/base'
const
followCrewList
=
ref
([
{
name
:
'斯柯达'
},
{
name
:
'花飘万家雪'
},
{
name
:
'花样百出'
}
])
const
baseStore
=
useBaseStore
()
const
flightSupportStore
=
useFlightSupportStore
()
const
{
getDetailsCurrentMsg
}
=
storeToRefs
(
flightSupportStore
)
const
atdChnValue
=
computed
(()
=>
{
const
time
=
getDetailsCurrentMsg
.
value
?.
atdChn
||
getDetailsCurrentMsg
.
value
.
etdChn
return
time
?
timeStampFormat
(
time
,
{
format
:
'HH:mm'
}
)
:
'--:--'
}
)
const
ataChnValue
=
computed
(()
=>
{
const
time
=
getDetailsCurrentMsg
.
value
?.
ataChn
||
getDetailsCurrentMsg
.
value
.
etaChn
return
time
?
timeStampFormat
(
time
,
{
format
:
'HH:mm'
}
)
:
'--:--'
}
)
<
/script
>
...
...
src/pages/modules/mocp/panel/flight-support/components/DetailsFollowCrewItem.vue
View file @
58d844b6
...
...
@@ -8,15 +8,16 @@
class=
"followCrewItem flex flex-between"
>
<view
class=
"flex"
>
<
image
class=
"img"
:src=
"FlightImage"
/
>
<
!--
<image
class=
"img"
:src=
"FlightImage"
/>
--
>
<view>
<view>
{{
item
.
name
}}
</view>
<
view
class=
"status"
>
维修员
</view
>
<view>
{{
item
.
u
name
}}
</view>
<
!--
<view
class=
"status"
>
维修员
</view>
--
>
</view>
</view>
<view
class=
"flex"
>
<up-icon
class=
"rtIcon"
name=
"checkmark-circle-fill"
size=
"20"
:color=
"$mocp-success-6"
/>
<text>
已登机
</text>
<up-icon
v-if=
"item.followStatus > 0"
class=
"rtIcon"
name=
"checkmark-circle-fill"
size=
"20"
:color=
"$mocp-success-6"
/>
<text>
{{
item
.
followStatusValue
}}
</text>
</view>
</view>
</view>
...
...
src/pages/modules/mocp/panel/flight-support/components/DetailsOtherInfo.vue
View file @
58d844b6
<
template
>
<view
class=
"globalDetailsModel detailsFollowingCrew detailsOtherInfo"
>
<view
class=
"font-700 flex"
>
<image
class=
"timeFlightIcon"
:src=
"FlightImage"
/>
<view>
<text
class=
"m-x-6"
>
重庆江北
</text>
<text>
CKG
</text>
</view>
</view>
<view
class=
"flex waterCont"
>
<image
class=
"weatherIcon"
:src=
"FlightImage"
/>
<view>
<view
class=
"waterTp"
>
晴
</view>
<view>
<text
class=
"waterTemp font-700"
>
16°/30°
</text>
<text
class=
"waterText"
>
(起飞当日)
</text>
</view>
</view>
</view>
<view
class=
"flex flex-between waterInfo"
>
<view>
<view
class=
"flex waterInfoItem"
>
<image
class=
"weatherSubIcon"
:src=
"FlightImage"
/>
<text>
能见度
</text>
</view>
<view>
5000m
</view>
</view>
<view>
<view
class=
"flex waterInfoItem"
>
<image
class=
"weatherSubIcon"
:src=
"FlightImage"
/>
<text>
风速
</text>
</view>
<view>
5公里/小时
</view>
</view>
<view>
<view
class=
"flex waterInfoItem"
>
<image
class=
"weatherSubIcon"
:src=
"FlightImage"
/>
<text>
PM2.5
</text>
</view>
<view>
18优
</view>
</view>
</view>
<DetailsWeather
v-if=
"ps.weatherMsg?.depStnList"
title=
"起飞当日"
:msg=
"ps.weatherMsg.depStnList"
/>
</view>
<DetailsWeather
v-if=
"ps.weatherMsg?.arrStnList"
title=
"落地当日"
:msg=
"ps.weatherMsg.arrStnList"
/>
<DetailsFollowCrewItem
title=
"跟机机务"
:list=
"followCrewList"
/>
<DetailsFollowCrewItem
title=
"机组人员"
:list=
"followCrewList"
/>
</
template
>
<
script
setup
>
import
{
ref
}
from
'vue'
import
FlightImage
from
'mocpStatic/image/monitor/flight-pane.png'
import
{
ref
,
onMounted
}
from
'vue'
import
DetailsFollowCrewItem
from
'./DetailsFollowCrewItem.vue'
import
DetailsWeather
from
'./DetailsWeather.vue'
const
ps
=
defineProps
({
weatherMsg
:
{
type
:
Object
,
default
:
()
=>
{}
}
})
const
followCrewList
=
ref
([
{
name
:
'斯柯达'
},
...
...
src/pages/modules/mocp/panel/flight-support/components/DetailsSwiper.vue
View file @
58d844b6
<
template
>
<swiper
class=
"swiperCont"
:current=
"
1
"
:current=
"
filterDetailsCurrentIndex || 0
"
active-class=
"swiper-active"
previous-margin=
"20rpx"
next-margin=
"380rpx"
@
change=
"swiperChange"
>
<swiper-item
v-for=
"
(item, index) in currentAllRelatedFlights"
:key=
"item.flightNo
"
>
<swiper-item
v-for=
"
item in filterDetailsList"
:key=
"item.id
"
>
<view
class=
"swiperItem"
>
<view
class=
"title"
>
{{
item
.
flightNo
}}
</view>
<view
class=
"flex swiperInfo"
>
...
...
@@ -16,8 +16,8 @@
<text>
{{
item
.
arrStn
}}
</text>
</view>
<view
class=
"flex swiperInfo"
>
<text>
{{
item
.
stdChn
}}
</text>
<text>
{{
item
.
staChn
}}
</text>
<text>
{{
timeStampFormat
(
item
.
stdChn
,
{
format
:
'HH:mm'
}
)
}}
<
/text
>
<
text
>
{{
timeStampFormat
(
item
.
staChn
,
{
format
:
'HH:mm'
}
)
}}
<
/text
>
<
/view
>
<
/view
>
<
/swiper-item
>
...
...
@@ -28,20 +28,22 @@
<
script
setup
>
import
{
ref
}
from
'vue'
import
{
timeStampFormat
}
from
'mocp/utils/tool'
import
useFlightSupportStore
from
'mocp/store/flight-support'
import
{
storeToRefs
}
from
'pinia'
import
{
cloneDeep
}
from
'lodash'
import
FlightImage
from
'mocpStatic/image/monitor/flight-pane.png'
const
flightSupportStore
=
useFlightSupportStore
()
const
{
filterDetailsList
,
filterDetailsCurrentIndex
}
=
storeToRefs
(
flightSupportStore
)
const
ps
=
defineProps
({
currentAllRelatedFlights
:
{
filterDetailsList
:
{
type
:
Array
,
default
:
[]
}
}
)
const
swiperChange
=
(
e
)
=>
{
console
.
log
(
e
,
e
.
detail
.
current
)
filterDetailsCurrentIndex
.
value
=
e
.
detail
.
current
}
<
/script
>
<
style
lang
=
"scss"
scoped
>
...
...
src/pages/modules/mocp/panel/flight-support/components/DetailsWeather.vue
0 → 100644
View file @
58d844b6
<
template
>
<view
class=
"globalDetailsModel detailsFollowingCrew detailsOtherInfo"
>
<view
class=
"font-700 flex"
>
<image
class=
"timeFlightIcon"
:src=
"FlightImage"
/>
<view>
<text
class=
"m-x-6"
>
重庆江北
</text>
<text>
CKG
</text>
</view>
</view>
<view
class=
"flex waterCont"
>
<image
class=
"weatherIcon"
:src=
"FlightImage"
/>
<view>
<view
class=
"waterTp"
>
晴
</view>
<view>
<text
class=
"waterTemp font-700"
>
16°/30°
</text>
<text
class=
"waterText"
>
(
{{
title
}}
)
</text>
</view>
</view>
</view>
<view
class=
"flex flex-between waterInfo"
>
<view>
<view
class=
"flex waterInfoItem"
>
<image
class=
"weatherSubIcon"
:src=
"FlightImage"
/>
<text>
能见度
</text>
</view>
<view>
5000m
</view>
</view>
<view>
<view
class=
"flex waterInfoItem"
>
<image
class=
"weatherSubIcon"
:src=
"FlightImage"
/>
<text>
风速
</text>
</view>
<view>
5公里/小时
</view>
</view>
<view>
<view
class=
"flex waterInfoItem"
>
<image
class=
"weatherSubIcon"
:src=
"FlightImage"
/>
<text>
PM2.5
</text>
</view>
<view>
18优
</view>
</view>
</view>
</view>
</
template
>
<
script
setup
>
import
{
computed
,
ref
}
from
'vue'
import
FlightImage
from
'mocpStatic/image/monitor/flight-pane.png'
import
DetailsFollowCrewItem
from
'./DetailsFollowCrewItem.vue'
import
{
onLoad
}
from
'@dcloudio/uni-app'
import
{
findWeatherSynopsesMessagesApi
}
from
'mocp/api/flight-support'
const
ps
=
defineProps
({
title
:
{
type
:
String
,
default
:
'起飞当日'
},
msg
:
{
type
:
Object
,
default
:
()
=>
({})
}
})
console
.
log
(
'ps.msg'
,
ps
.
msg
)
const
followCrewList
=
ref
([
{
name
:
'斯柯达'
},
{
name
:
'花飘万家雪'
},
{
name
:
'花样百出'
}
])
</
script
>
<
style
lang=
"scss"
scoped
>
@import
'../constants/details'
;
</
style
>
src/pages/modules/mocp/panel/flight-support/components/TableRow.vue
View file @
58d844b6
...
...
@@ -34,7 +34,6 @@
</
template
>
<
script
setup
>
import
{
computed
}
from
'vue'
import
Day
from
'mocp/utils/dayjs'
import
useFlightSupportStore
from
'mocp/store/flight-support'
...
...
@@ -42,9 +41,10 @@ import { allInBoundMode, currentInBoundModeForFlightTablePage, decideReleaseStat
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
{
storeToRefs
}
from
'pinia
'
const
flightSupportStore
=
useFlightSupportStore
()
const
{
details
}
=
storeToRefs
(
flightSupportStore
)
const
listTab
=
flightSupportStore
.
listTab
const
ps
=
defineProps
({
...
...
@@ -57,7 +57,7 @@ const ps = defineProps({
const
msg
=
computed
(()
=>
{
if
(
!
ps
.
itemMsg
)
return
{}
const
isCurrentIn
=
currentInBoundModeForFlightTablePage
.
value
+
1
==
allInBoundMode
.
In
const
isCurrentIn
=
currentInBoundModeForFlightTablePage
.
value
==
allInBoundMode
.
In
const
filterListTab
=
listTab
.
filter
(
item
=>
!!
item
.
selected
)
return
filterListTab
.
map
(
item
=>
{
...
...
@@ -74,7 +74,7 @@ const msg = computed(() => {
}
}
// 出发地
if
(
item
.
keyValue
==
'
depStn
'
)
{
if
(
item
.
keyValue
==
'
place
'
)
{
return
{
...
defaultObj
,
data
:
isCurrentIn
?
...
...
@@ -111,7 +111,13 @@ const msg = computed(() => {
})
})
const
rowClicked
=
(
currentMsg
)
=>
{
console
.
log
(
'****'
,
currentMsg
)
if
(
!
currentMsg
.
ac
)
return
uni
.
$mocpMessage
.
error
(
'航班已取消'
)
details
.
value
=
currentMsg
console
.
log
(
'@@@@details'
,
details
.
value
)
uni
.
$mocpJump
.
navigateTo
(
'/panel/flight-support/flight-support-details/index'
)
}
</
script
>
<
style
lang=
"scss"
scoped
>
@import
'../constants/flightSupportList'
;
...
...
src/pages/modules/mocp/panel/flight-support/constants/details.scss
View file @
58d844b6
...
...
@@ -177,6 +177,10 @@
.basicInfoTimePlan
{
font-size
:
12px
;
color
:
$mocp-text-4
;
.MM
{
margin
:
0
12rpx
;
}
}
}
...
...
src/pages/modules/mocp/panel/flight-support/flight-support-details/index.vue
View file @
58d844b6
...
...
@@ -3,18 +3,21 @@
<view
class=
"flightSupportDetails"
>
<view
class=
"details_header"
>
<view
class=
"header_no flex"
>
<image
class=
"flight-no-image"
:src=
"HnaPic"
mode=
"widthFix"
/>
<text>
B9999
</text>
<global-flight-no
:airline=
"details.airlineCode"
:style=
"flightNoStyle"
/>
<text>
{{
details
.
ac
}}
</text>
</view>
<view
class=
"header_info flex"
>
<text
class=
"margin-r-32"
>
机型:
A999
</text>
<text>
机位:
HG99
</text>
<text
class=
"margin-r-32"
>
机型:
{{
details
.
acTypeGc
}}
</text>
<text>
机位:
{{
details
.
airlineCode
}}
</text>
</view>
</view>
<view
class=
"details_swiper"
>
<detailsSwiper
:
currentAllRelatedFlights=
"currentAllRelatedFlights
"
/>
<detailsSwiper
:
filterDetailsList=
"filterDetailsList
"
/>
</view>
<view
class=
"details_tab"
>
...
...
@@ -26,12 +29,13 @@
class=
"f-flex-1 tabItem"
:class=
"index == tabCurrent ? 'active' : ''"
>
{{
item
}}
-
-
{{
tabCurrent
}}
{{
item
}}
-
{{
tabCurrent
}}
</view>
</view>
<detailsFlightInfo
v-if=
"tabCurrent === 0"
/>
<detailsOtherInfo
v-else
/>
<detailsOtherInfo
v-else
:weatherMsg=
"weatherMsg"
/>
</view>
</view>
</global-page>
...
...
@@ -40,40 +44,92 @@
<
script
setup
>
import
{
ref
,
reactive
}
from
'vue'
import
{
storeToRefs
}
from
'pinia'
import
{
cloneDeep
}
from
'lodash'
import
useBaseStore
from
'mocp/store/base'
import
useFlightSupportStore
from
'mocp/store/flight-support'
import
{
on
Unl
oad
}
from
'@dcloudio/uni-app'
import
HnaPic
from
'mocpStatic/image/air-company/hnhk.png
'
import
{
on
L
oad
}
from
'@dcloudio/uni-app'
import
{
getFListApi
,
getReleaseListApi
,
findWeatherSynopsesMessagesApi
}
from
'mocp/api/flight-support
'
import
detailsSwiper
from
'../components/DetailsSwiper.vue'
import
detailsFlightInfo
from
'../components/DetailsFlightInfo.vue'
import
detailsOtherInfo
from
'../components/DetailsOtherInfo.vue'
import
GlobalFlightNo
from
'mocp/components/global-flight-no/global-flight-no.vue'
import
{
followAcTagAll
}
from
'mocp/utils/getFlightList'
const
currentAllRelatedFlights
=
reactive
([
{
flightNo
:
'B7777'
,
depStn
:
'AKG'
,
arrStn
:
'WUH'
,
stdChn
:
'16:16'
,
staChn
:
'17:17'
},
{
flightNo
:
'B8888'
,
depStn
:
'VGF'
,
arrStn
:
'JHY'
,
stdChn
:
'18:18'
,
staChn
:
'19:19'
},
{
flightNo
:
'B9999'
,
depStn
:
'ERG'
,
arrStn
:
'MHG'
,
stdChn
:
'20:20'
,
staChn
:
'21:21'
}
])
const
flightSupportStore
=
useFlightSupportStore
()
const
{
searchData
,
details
,
filterDetailsList
,
filterDetailsCurrentIndex
,
getDetailsCurrentMsg
}
=
storeToRefs
(
flightSupportStore
)
const
tabList
=
[
'航班信息'
,
'其他信息'
]
const
tabCurrent
=
ref
(
0
)
const
flightNoStyle
=
{
'width'
:
'64rpx'
,
'height'
:
'64rpx'
,
'marginRight'
:
'16rpx'
}
const
weatherMsg
=
ref
()
onLoad
(()
=>
{
getAllFlightsByAc
()
getWeatherMsg
()
})
const
getAllFlightsByAc
=
async
()
=>
{
const
params
=
{
acs2
:
details
.
value
.
ac
,
// pageSize: 100,
startT
:
searchData
.
value
.
startT
,
stopT
:
searchData
.
value
.
stopT
}
console
.
log
(
'92@@details.value'
,
details
.
value
)
let
{
list
}
=
await
getFListApi
(
params
,
{
loading
:
true
})
if
(
list
&&
list
.
length
)
{
const
allReleases
=
await
Promise
.
all
(
list
.
map
(
a
=>
getReleaseListApi
({
catchId
:
a
.
catchId
},
{
loading
:
true
})))
if
(
allReleases
.
every
(
a
=>
Array
.
isArray
(
a
.
data
)))
{
allReleases
.
forEach
((
q
,
w
)
=>
{
list
[
w
].
releases
=
q
.
data
})
}
else
{
uni
.
$mocpMessage
.
error
(
'请求异常'
)
}
list
=
list
.
map
(
item
=>
{
if
(
!
item
.
mfollowAcLists
||
!
item
.
mfollowAcLists
.
length
)
{
return
{...
item
}
}
else
{
const
mfollowAcLists
=
[]
for
(
let
followAcItem
of
item
.
mfollowAcLists
)
{
mfollowAcLists
.
push
({
...
followAcItem
,
followStatusValue
:
followAcTagAll
[
followAcItem
.
followStatus
]
})
}
return
{
...
item
,
mfollowAcLists
}
}
})
console
.
log
(
'87@@'
,
list
)
filterDetailsCurrentIndex
.
value
=
list
.
findIndex
(
a
=>
a
.
depStn
===
details
.
value
.
depStn
&&
a
.
stdChn
===
details
.
value
.
stdChn
)
filterDetailsList
.
value
=
list
console
.
log
(
'90@@'
,
filterDetailsCurrentIndex
.
value
)
}
}
const
getWeatherMsg
=
async
()
=>
{
const
msg
=
{
depStnList
:
[],
arrStnList
:
[]
}
const
depStnRes
=
await
findWeatherSynopsesMessagesApi
({
airportCode
:
getDetailsCurrentMsg
.
value
.
depStn
},
{
loading
:
true
})
if
(
depStnRes
.
code
==
'200'
)
msg
.
depStnList
=
depStnRes
.
data
[
depStnRes
.
data
.
length
-
1
]
const
arrStnRes
=
await
findWeatherSynopsesMessagesApi
({
airportCode
:
getDetailsCurrentMsg
.
value
.
arrStn
},
{
loading
:
true
})
if
(
arrStnRes
.
code
==
'200'
)
msg
.
arrStnList
=
arrStnRes
.
data
[
arrStnRes
.
data
.
length
-
1
]
weatherMsg
.
value
=
msg
console
.
log
(
weatherMsg
.
value
)
}
</
script
>
<
style
lang=
"scss"
scoped
>
@import
'../constants/details'
;
...
...
src/pages/modules/mocp/panel/flight-support/list.vue
View file @
58d844b6
...
...
@@ -91,6 +91,7 @@ const transformData = (data) => {
}
return
q
}).
flat
()
console
.
log
(
'@@listMsg'
,
listMsg
)
return
listMsg
}
...
...
@@ -103,9 +104,8 @@ const subsectionChange = (e) => {
searchData
.
value
.
isOut
=
e
currentInBoundModeForFlightTablePage
.
value
=
e
const
ind
=
listTab
.
value
.
findIndex
((
item
)
=>
item
.
label
==
'出发地'
||
item
.
label
==
'目的地'
)
const
isCurrentIn
=
currentInBoundModeForFlightTablePage
.
value
+
1
==
allInBoundMode
.
In
const
isCurrentIn
=
currentInBoundModeForFlightTablePage
.
value
==
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
deleted
100644 → 0
View file @
8ad2b684
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 @
58d844b6
import
{
ref
}
from
'vue'
export
const
allInBoundMode
=
{
In
:
1
,
Out
:
2
In
:
0
,
Out
:
1
}
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
+
1
===
allInBoundMode
.
Out
)
{
if
(
currentInBoundModeForFlightTablePage
.
value
===
allInBoundMode
.
Out
)
{
manualReleases
=
manualReleases
.
filter
(
a
=>
a
.
isOut
)
allReleases
=
allReleases
.
filter
(
a
=>
a
.
isOut
)
}
else
{
...
...
src/pages/modules/mocp/panel/flight-support/utils/jumpSlingleFlight.js
deleted
100644 → 0
View file @
8ad2b684
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
deleted
100644 → 0
View file @
8ad2b684
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
src/pages/modules/mocp/panel/inforDisclosure/components/inforDisClosureItem.vue
0 → 100644
View file @
58d844b6
<
template
>
<view
@
tap=
"goDetails(item)"
class=
"item"
>
<view
class=
"item-title"
>
<view
class=
"left"
>
<custom-state
:value=
"item.status?.toUpperCase()"
/>
</view>
<view
class=
"right inforDisTags"
>
<global-tag
v-for=
"tagItem of item.tags"
:key=
"tagItem.text"
:type=
"tagItem.type"
class=
"txt"
>
{{
tagItem
.
text
}}
</global-tag>
</view>
</view>
<view
class=
"item-content u-line-3"
>
<view
class=
"inforDis"
>
<text
v-if=
"item.machineNumber"
>
机号:
{{
item
.
machineNumber
}}
</text>
<text
v-if=
"item.ATA"
>
ATA:
{{
item
.
ata
}}
</text>
</view>
<text>
{{
item
.
faultDescription
||
'无'
}}
</text>
</view>
<view
class=
"item-footer inforDisFooter"
>
<view
class=
"label"
>
<global-icon
icon=
"calendar"
/>
<text
class=
"txt"
>
{{
item
.
time
}}
</text>
</view>
<view
class=
"label right"
>
<global-icon
icon=
"idcard"
/>
<text
class=
"txt"
>
值班人员:
{{
item
.
filledBy
}}
</text>
</view>
</view>
</view>
</
template
>
<
script
setup
>
import
{
ref
}
from
'vue'
import
useInforDisclosureStore
from
'mocp/store/inforDisclosure'
import
{
storeToRefs
}
from
'pinia'
import
{
onUnload
}
from
'@dcloudio/uni-app'
import
{
getMocinfoListApi
}
from
'mocp/api/inforDisclosure'
import
{
getParamsByType
}
from
'mocp/hooks/use-params/useParams'
const
ps
=
defineProps
({
item
:
{
type
:
Object
,
default
:
()
=>
({})
}
})
const
{
item
}
=
ps
//跳转
const
inforDisclosureStore
=
useInforDisclosureStore
()
const
goDetails
=
(
data
)
=>
{
uni
.
$mocpJump
.
navigateTo
(
'/panel/inforDisclosure/details'
,
{
id
:
data
.
id
}).
then
(()
=>
{
inforDisclosureStore
.
setState
(
'details'
,
data
)
})
}
//刷新
const
paging
=
ref
()
uni
.
$on
(
'inforDisclosureReload'
,
()
=>
{
paging
.
value
?.
reload
()
})
onUnload
(()
=>
{
uni
.
$off
(
'inforDisclosureReload'
)
})
</
script
>
<
style
lang=
"scss"
scoped
>
@import
'mocpStatic/css/list.scss'
;
@import
'../constants/inforDisclosure.scss'
;
</
style
>
src/pages/modules/mocp/panel/inforDisclosure/list.vue
View file @
58d844b6
...
...
@@ -19,7 +19,8 @@
@
handleRightClick=
"handleRightClick"
>
<template
#="
{ item }">
<view
<inforDisclosureItem
:item=
"item"
/>
<!--
<view
@
tap=
"goDetails(item)"
class=
"item"
>
...
...
@@ -57,7 +58,7 @@
</text>
</view>
</view>
</view>
</view>
-->
</
template
>
</global-page-swiper>
...
...
@@ -70,12 +71,11 @@ import { storeToRefs } from 'pinia'
import
{
onUnload
}
from
'@dcloudio/uni-app'
import
{
getMocinfoListApi
}
from
'mocp/api/inforDisclosure'
import
{
getParamsByType
}
from
'mocp/hooks/use-params/useParams'
import
inforDisclosureItem
from
'./components/inforDisClosureItem.vue'
//跳转
const
inforDisclosureStore
=
useInforDisclosureStore
()
const
{
searchData
}
=
storeToRefs
(
inforDisclosureStore
)
const
tabList
=
[
{
name
:
'当前通报'
,
...
...
@@ -87,12 +87,6 @@ const tabList = [
}
]
const
goDetails
=
(
data
)
=>
{
uni
.
$mocpJump
.
navigateTo
(
'/panel/inforDisclosure/details'
,
{
id
:
data
.
id
}).
then
(()
=>
{
inforDisclosureStore
.
setState
(
'details'
,
data
)
})
}
const
transformData
=
(
data
)
=>
{
const
GuaranteeStageList
=
getParamsByType
(
'GuaranteeStage'
)
const
OperationPhaseList
=
getParamsByType
(
'OperationPhase'
)
...
...
@@ -154,7 +148,4 @@ onUnload(() => {
uni
.
$off
(
'inforDisclosureReload'
)
})
</
script
>
<
style
lang=
"scss"
scoped
>
@import
'mocpStatic/css/list.scss'
;
@import
'./constants/inforDisclosure.scss'
;
</
style
>
<
style
lang=
"scss"
scoped
></
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