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
021e5077
Commit
021e5077
authored
Jul 29, 2024
by
liujinbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
详情
parent
db40d35a
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
122 additions
and
64 deletions
+122
-64
src/mocp/api/flight-support.js
+8
-8
src/mocp/store/flight-support.js
+1
-1
src/mocp/utils/http.js
+4
-4
src/pages/modules/mocp/panel/flight-support/components/DetailsFlightInfo.vue
+2
-12
src/pages/modules/mocp/panel/flight-support/components/DetailsFollowCrewItem.vue
+9
-5
src/pages/modules/mocp/panel/flight-support/components/DetailsOtherInfo.vue
+15
-3
src/pages/modules/mocp/panel/flight-support/components/DetailsWeather.vue
+15
-15
src/pages/modules/mocp/panel/flight-support/constants/details.scss
+6
-0
src/pages/modules/mocp/panel/flight-support/flight-support-details/index.vue
+62
-15
src/pages/modules/mocp/panel/inforDisclosure/list.vue
+0
-1
No files found.
src/mocp/api/flight-support.js
View file @
021e5077
...
...
@@ -42,19 +42,19 @@ export const findWeatherSynopsesMessagesApi = (data, config) => {
config
})
}
export
const
getFcArrangeApi
=
(
data
,
config
)
=>
{
return
http
({
method
:
'POST'
,
url
:
'/basicinfo/Aircraft/getFcArrange'
,
data
,
config
})
}
/*
* 获取天气信息
* /basicinfo/findWeatherSynopsesMessages
* {airportCode: "WUH"}
* [取最后一条数据] weatherInfoTxt-天气明朗 temperature-温度
*
*
* 获取航班任务-定时执行
* /flighting/getFlightTask
* {catchId: 9435439}
*
* 获取飞往目的地列表
* /flighting/getFlyToApplets
*
*
* */
src/mocp/store/flight-support.js
View file @
021e5077
...
...
@@ -15,7 +15,7 @@ const useFlightSupportStore = defineStore('flightSupport', {
isInbound
:
1
,
ac
:
''
,
//机号
flightNo
:
'
GS7857'
,
//航班号 临时测试用,ljb
flightNo
:
'
'
,
//航班号
acOwns2
:
''
,
acTerminals1
:
''
,
...
...
src/mocp/utils/http.js
View file @
021e5077
...
...
@@ -4,7 +4,7 @@ import useUserStore from 'mocp/store/user'
const
baseURL
=
'https://moc.hnatechnic.com/api'
//生产
class
ServiceLoading
{
open
(
loading
)
{
open
(
loading
)
{
if
(
loading
||
loading
===
''
)
{
let
loadingText
=
'加载中'
if
(
typeof
loading
===
'string'
&&
loading
!==
''
)
{
...
...
@@ -17,7 +17,7 @@ class ServiceLoading {
}
}
close
(
loading
)
{
close
(
loading
)
{
if
(
loading
||
loading
===
''
)
{
uni
.
hideLoading
()
}
...
...
@@ -98,7 +98,7 @@ export const http = (options) => {
return
new
Promise
((
resolve
,
reject
)
=>
{
uni
.
request
({
...
options
,
success
(
res
)
{
success
(
res
)
{
console
.
log
(
'接口响应结果:'
,
res
)
serviceLoading
.
close
(
loading
)
const
statusCode
=
res
.
statusCode
...
...
@@ -125,7 +125,7 @@ export const http = (options) => {
reject
(
res
)
}
},
fail
(
err
)
{
fail
(
err
)
{
serviceLoading
.
close
(
loading
)
uni
.
$mocpMessage
.
error
(
'网络错误,换个网络试试'
)
reject
(
err
)
...
...
src/pages/modules/mocp/panel/flight-support/components/DetailsFlightInfo.vue
View file @
021e5077
...
...
@@ -2,16 +2,8 @@
<view
class=
"globalDetailsModel detailsBasicInfo"
>
<view
class=
"title"
>
{{
getDetailsCurrentMsg
.
flightNo
}}
</view>
<view
class=
"basicInfoDep flex flex-between"
>
<view>
<text>
{{
baseStore
.
getTerminalObject
[
getDetailsCurrentMsg
.
depStn
]
}}
</text>
<!--
<text
class=
"m-x-6"
>
重庆江北
</text>
-->
<!--
<text>
T3
</text>
-->
</view>
<view>
<!--
<text>
{{
getDetailsCurrentMsg
.
arrStn
}}
</text>
-->
<text>
{{
baseStore
.
getTerminalObject
[
getDetailsCurrentMsg
.
arrStn
]
}}
</text>
<!--
<text>
T2
</text>
-->
</view>
<text>
{{
baseStore
.
getTerminalObject
[
getDetailsCurrentMsg
.
depStn
]
}}
</text>
<text>
{{
baseStore
.
getTerminalObject
[
getDetailsCurrentMsg
.
arrStn
]
}}
</text>
</view>
<view
class=
"basicInfoTime flex flex-between"
>
...
...
@@ -35,8 +27,6 @@
<
/view
>
<
DetailsFollowCrewItem
title
=
"跟机人员"
:
list
=
"getDetailsCurrentMsg.mfollowAcLists"
/>
<
/template
>
<
script
setup
>
...
...
src/pages/modules/mocp/panel/flight-support/components/DetailsFollowCrewItem.vue
View file @
021e5077
<
template
>
<view
class=
"globalDetailsModel detailsFollowingCrew"
>
<view
class=
"font-700"
>
{{
title
}}
</view>
<view
class=
"followCrewCont"
>
<view
v-if=
"list && list.length"
class=
"followCrewCont"
>
<view
v-for=
"item of list"
:key=
"item.name"
...
...
@@ -11,16 +11,20 @@
<!--
<image
class=
"img"
:src=
"FlightImage"
/>
-->
<view>
<view>
{{
item
.
uname
}}
</view>
<!--
<view
class=
"status"
>
维修员
</view>
-->
<!--
<view
class=
"status"
>
{{
item
.
kind
}}
</view>
-->
</view>
</view>
<view
class=
"flex"
>
<up-icon
v-if=
"item.followStatus > 0"
class=
"rtIcon"
name=
"checkmark-circle-fill"
size=
"20"
:color=
"$mocp-success-6"
/>
<text>
{{
item
.
followStatusValue
}}
</text>
<template
v-if=
"item.followStatus != undefined"
>
<up-icon
v-if=
"item.followStatus > 0"
class=
"rtIcon"
name=
"checkmark-circle-fill"
size=
"20"
:color=
"$mocp-success-6"
/>
<text>
{{
item
.
followStatusValue
}}
</text>
</
template
>
<text>
发信息
</text>
</view>
</view>
</view>
<global-empty
v-else
/>
</view>
...
...
src/pages/modules/mocp/panel/flight-support/components/DetailsOtherInfo.vue
View file @
021e5077
...
...
@@ -3,9 +3,9 @@
<DetailsWeather
v-if=
"ps.weatherMsg?.arrStnList"
title=
"落地当日"
:msg=
"ps.weatherMsg.arrStnList"
/>
<DetailsFollowCrewItem
title=
"跟机机务"
:list=
"
followCrewList
"
/>
<DetailsFollowCrewItem
title=
"跟机机务"
:list=
"
FcArrangeMsg.crwStewardInf
"
/>
<DetailsFollowCrewItem
title=
"机组人员"
:list=
"
followCrewList
"
/>
<DetailsFollowCrewItem
title=
"机组人员"
:list=
"
FcArrangeMsg.crwPilotInf
"
/>
</
template
>
<
script
setup
>
...
...
@@ -16,7 +16,19 @@ import DetailsWeather from './DetailsWeather.vue'
const
ps
=
defineProps
({
weatherMsg
:
{
type
:
Object
,
default
:
()
=>
{}
default
:
()
=>
{
return
{
depStnList
:
[],
arrStnList
:
[]
}
}
},
FcArrangeMsg
:
{
type
:
Object
,
default
:
()
=>
{
return
{
crwPilotInf
:
[],
crwStewardInf
:
[]
}
}
}
})
...
...
src/pages/modules/mocp/panel/flight-support/components/DetailsWeather.vue
View file @
021e5077
...
...
@@ -3,16 +3,15 @@
<view
class=
"font-700 flex"
>
<image
class=
"timeFlightIcon"
:src=
"FlightImage"
/>
<view>
<text
class=
"m-x-6"
>
重庆江北
</text>
<text>
CKG
</text>
<text
class=
"m-x-6"
>
{{
baseStore
.
getTerminalObject
[
msg
.
airportCode
]
}}
</text>
</view>
</view>
<view
class=
"flex waterCont"
>
<image
class=
"weatherIcon"
:src=
"FlightImage"
/>
<view>
<view
class=
"waterTp"
>
晴
</view>
<view
class=
"waterTp"
>
{{
msg
.
weatherInfoTxt
}}
</view>
<view>
<text
class=
"waterTemp font-700"
>
16°/30
°
</text>
<text
class=
"waterTemp font-700"
>
{{
msg
.
temperature
}}
°
</text>
<text
class=
"waterText"
>
(
{{
title
}}
)
</text>
</view>
</view>
...
...
@@ -23,22 +22,22 @@
<image
class=
"weatherSubIcon"
:src=
"FlightImage"
/>
<text>
能见度
</text>
</view>
<view>
5000
m
</view>
<view>
{{
msg
.
visibility
}}
m
</view>
</view>
<view>
<view
class=
"flex waterInfoItem"
>
<image
class=
"weatherSubIcon"
:src=
"FlightImage"
/>
<text>
风速
</text>
</view>
<view>
5公里/小时
</view>
<view>
{{
parseInt
(
msg
.
windFs
)
}}
米/秒
</view>
</view>
<view>
<
!--
<
view>
<view
class=
"flex waterInfoItem"
>
<image
class=
"weatherSubIcon"
:src=
"FlightImage"
/>
<text>
PM2.5
</text>
</view>
<view>
18优
</view>
</view>
<view>
??
18优
</view>
</view>
-->
</view>
...
...
@@ -48,13 +47,14 @@
</
template
>
<
script
setup
>
import
{
computed
,
ref
}
from
'vue'
import
{
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'
import
useBaseStore
from
'mocp/store/base'
import
{
parseInt
}
from
'lodash'
const
baseStore
=
useBaseStore
()
const
ps
=
defineProps
({
const
{
title
,
msg
}
=
defineProps
({
title
:
{
type
:
String
,
default
:
'起飞当日'
...
...
@@ -65,7 +65,7 @@ const ps = defineProps({
}
})
console
.
log
(
'
ps.msg'
,
ps
.
msg
)
console
.
log
(
'
msg'
,
msg
)
const
followCrewList
=
ref
([
{
name
:
'斯柯达'
},
{
name
:
'花飘万家雪'
},
...
...
src/pages/modules/mocp/panel/flight-support/constants/details.scss
View file @
021e5077
...
...
@@ -144,6 +144,12 @@
}
}
.tab-content
{
margin-top
:
0
;
flex
:
auto
;
overflow-y
:
auto
;
}
.btn_lf
{
margin-right
:
46rpx
;
}
...
...
src/pages/modules/mocp/panel/flight-support/flight-support-details/index.vue
View file @
021e5077
...
...
@@ -29,30 +29,41 @@
class=
"f-flex-1 tabItem"
:class=
"index == tabCurrent ? 'active' : ''"
>
{{
item
}}
-
{{
tabCurrent
}}
{{
item
}}
</view>
</view>
<scroll-view
class=
"tab-content"
:scroll-y=
"true"
:style=
"
{ height: `calc(100vh - 690rpx - ${safeAreaInsets?.top + 'px'} - ${safeAreaInsets?.bottom + 'px'})` }">
<detailsFlightInfo
v-if=
"tabCurrent === 0"
/>
<detailsFlightInfo
v-if=
"tabCurrent === 0"
/>
<detailsOtherInfo
v-else
:weatherMsg=
"weatherMsg"
:FcArrangeMsg=
"FcArrangeMsg"
/>
</scroll-view>
<detailsOtherInfo
v-else
:weatherMsg=
"weatherMsg"
/>
</view>
</view>
</global-page>
</
template
>
<
script
setup
>
import
{
ref
,
reactive
}
from
'vue'
import
{
ref
,
watchEffect
}
from
'vue'
import
{
storeToRefs
}
from
'pinia'
import
useFlightSupportStore
from
'mocp/store/flight-support'
import
{
onLoad
}
from
'@dcloudio/uni-app'
import
{
getFListApi
,
getReleaseListApi
,
findWeatherSynopsesMessagesApi
}
from
'mocp/api/flight-support'
import
{
getFListApi
,
getReleaseListApi
,
findWeatherSynopsesMessagesApi
,
getFcArrangeApi
}
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
{
safeAreaInsets
}
=
uni
.
getSystemInfoSync
()
const
flightSupportStore
=
useFlightSupportStore
()
const
{
searchData
,
...
...
@@ -68,11 +79,9 @@ const flightNoStyle = {
'height'
:
'64rpx'
,
'marginRight'
:
'16rpx'
}
const
weatherMsg
=
ref
()
onLoad
(()
=>
{
getAllFlightsByAc
()
getWeatherMsg
()
})
const
getAllFlightsByAc
=
async
()
=>
{
...
...
@@ -82,7 +91,6 @@ const getAllFlightsByAc = async () => {
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
})))
...
...
@@ -110,25 +118,64 @@ const getAllFlightsByAc = async () => {
}
}
})
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
weatherMsg
=
ref
()
const
FcArrangeMsg
=
ref
()
watchEffect
(
async
()
=>
{
const
msg
=
{
depStnList
:
[],
arrStnList
:
[]
}
const
depStnRes
=
await
findWeatherSynopsesMessagesApi
({
airportCode
:
getDetailsCurrentMsg
.
value
.
depStn
},
{
loading
:
true
})
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
})
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
)
}
// console.log('getDetailsCurrentMsg', getDetailsCurrentMsg.value)
const
FcArrangeParams
=
{
ac
:
getDetailsCurrentMsg
.
value
?.
ac
,
arrStn
:
getDetailsCurrentMsg
.
value
?.
arrStn
,
datopChn
:
getDetailsCurrentMsg
.
value
?.
flightDate
,
depStn
:
getDetailsCurrentMsg
.
value
?.
depStn
,
flightNo
:
getDetailsCurrentMsg
.
value
?.
flightNo
,
stdChn
:
getDetailsCurrentMsg
.
value
?.
stdChn
}
const
FcRes
=
await
getFcArrangeApi
(
FcArrangeParams
,
{
loading
:
true
})
if
(
FcRes
.
code
==
'200'
&&
FcRes
.
data
)
{
const
crwPilotInf
=
FcRes
.
data
.
crwPilotInf
.
replace
(
/s/g
,
''
).
split
(
';'
).
map
(
function
(
item
)
{
const
nv
=
item
.
split
(
':'
)
return
{
uname
:
nv
[
0
],
tel
:
nv
[
1
],
kind
:
'机组人员'
}
})
const
crwStewardInf
=
FcRes
.
data
.
crwStewardInf
.
replace
(
/s/g
,
''
).
split
(
';'
).
map
(
function
(
item
)
{
const
nv
=
item
.
split
(
':'
)
return
{
uname
:
nv
[
0
],
tel
:
nv
[
1
],
kind
:
'跟机机务'
}
})
FcArrangeMsg
.
value
=
{
crwPilotInf
,
crwStewardInf
}
}
console
.
log
(
'FcRes'
,
FcArrangeMsg
.
value
)
})
</
script
>
<
style
lang=
"scss"
scoped
>
...
...
src/pages/modules/mocp/panel/inforDisclosure/list.vue
View file @
021e5077
...
...
@@ -63,7 +63,6 @@ const transformData = (data) => {
return
q
},
[])
const
mappedData
=
data
.
map
(
item
=>
{
return
{
...
item
,
time
:
item
.
creationTime
.
replace
(
/-/g
,
'/'
).
replace
(
/:
\d
+
?
$/
,
''
),
...
...
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