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
438127eb
Commit
438127eb
authored
Jul 30, 2024
by
liujinbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
我的跟机
parent
f7f3e704
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
243 additions
and
69 deletions
+243
-69
src/mocp/api/supportedTask.js
+16
-0
src/mocp/components/global-page-swiper/global-page-swiper.vue
+11
-2
src/mocp/store/flight-support.js
+3
-3
src/mocp/store/supportedTask.js
+2
-3
src/mocp/utils/getFlightList.js
+2
-2
src/pages/modules/mocp/panel/flight-support/components/Screen.vue
+26
-8
src/pages/modules/mocp/panel/flight-support/constants/flightSupportList.scss
+4
-1
src/pages/modules/mocp/panel/flight-support/list.vue
+4
-1
src/pages/modules/mocp/panel/supported-task/components/supportedTaskItem.vue
+20
-34
src/pages/modules/mocp/panel/supported-task/constants/supportedTask.scss
+61
-0
src/pages/modules/mocp/panel/supported-task/list.vue
+94
-15
No files found.
src/mocp/api/supportedTask.js
View file @
438127eb
...
...
@@ -8,3 +8,19 @@ export const userTasksApi = (data, config) => {
config
})
}
export
const
updateFlyFollowAcApi
=
(
data
,
config
)
=>
{
return
http
({
method
:
'POST'
,
url
:
'/flighting/updateFlyFollowAc'
,
data
,
config
})
}
export
const
getMoveListApi
=
(
data
,
config
)
=>
{
return
http
({
method
:
'POST'
,
url
:
'/workbench/getMoveList'
,
data
,
config
})
}
src/mocp/components/global-page-swiper/global-page-swiper.vue
View file @
438127eb
...
...
@@ -68,9 +68,10 @@
:transformData=
"transformData"
>
<
template
#="{
dataList
}"
>
<up-checkbox-group
v-model=
"chooseValue"
v-if=
"chooseDataType == 'checkbox'"
>
<up-checkbox-group
v-model=
"chooseValue"
v-if=
"chooseDataType == 'checkbox'"
class=
"checkbox-group"
>
<template
v-for=
"(item, index) in dataList"
:key=
"index"
>
<up-checkbox
:name=
"index"
v-if=
"chooseDataType == 'checkbox'"
>
<up-checkbox
:name=
"index"
v-if=
"chooseDataType == 'checkbox'"
class=
"f-flex-1"
>
<template
#
label
>
<slot
:item=
"item"
:index=
"index"
></slot>
</
template
>
...
...
@@ -376,4 +377,12 @@ defineExpose({
.swiper
{
height
:
100%
;
}
.checkbox-group
{
display
:
block
;
}
.f-flex-1
{
flex
:
1
;
}
</
style
>
src/mocp/store/flight-support.js
View file @
438127eb
...
...
@@ -80,8 +80,8 @@ const useFlightSupportStore = defineStore('flightSupport', {
}
},
// 配置持久化
//
persist: false
persist
:
{
persist
:
false
/*
persist: {
// 调整为兼容多端的API
storage: {
setItem (key, value) {
...
...
@@ -91,7 +91,7 @@ const useFlightSupportStore = defineStore('flightSupport', {
return uni.getStorageSync(key)
}
}
}
}
*/
})
export
default
useFlightSupportStore
src/mocp/store/supportedTask.js
View file @
438127eb
...
...
@@ -4,15 +4,14 @@ import useUserStore from 'mocp/store/user'
const
useInforDisclosureStore
=
defineStore
(
'supportedTask'
,
{
state
:
()
=>
{
return
{
searchData
:
{},
details
:
undefined
searchData
:
{}
}
},
getters
:
{},
actions
:
{
resetForm
()
{
const
userStore
=
useUserStore
()
this
.
searchData
.
realU
serId
=
userStore
.
userInfo
.
id
this
.
searchData
.
u
serId
=
userStore
.
userInfo
.
id
},
setState
(...
args
)
{
this
.
$patch
({[
args
[
0
]]:
args
[
1
]})
...
...
src/mocp/utils/getFlightList.js
View file @
438127eb
...
...
@@ -25,8 +25,8 @@ export const listTab = ref([
export
const
listScreen
=
[
{
name
:
'进港'
,
value
:
0
},
{
name
:
'出港'
,
value
:
1
}
,
{
name
:
'无航班'
,
value
:
2
}
{
name
:
'出港'
,
value
:
1
}
//
{name: '无航班', value: 2}
]
export
const
followAcTagAll
=
[
...
...
src/pages/modules/mocp/panel/flight-support/components/Screen.vue
View file @
438127eb
...
...
@@ -2,6 +2,18 @@
<global-page
title=
"筛选"
>
<view
class=
"screen-form"
>
<up-form
labelPosition=
"left"
labelWidth=
"auto"
>
<up-form-item
label=
"机号"
prop=
"ac"
:borderBottom=
"true"
>
<global-picker
v-model=
"formData.ac"
pickAlign=
"right"
clearable
:options=
"deviceNumList"
filter
/>
</up-form-item>
<up-form-item
label=
"机型"
prop=
"acType"
:borderBottom=
"true"
>
<global-picker
v-model=
"formData.acType"
pickAlign=
"right"
:options=
"baseStore.getTypeSelect"
clearable
filter
/>
</up-form-item>
<up-form-item
label=
"航站"
prop=
"terminal"
:borderBottom=
"true"
>
<global-picker
pickAlign=
"right"
...
...
@@ -12,19 +24,21 @@
/>
</up-form-item>
<up-form-item
label=
"
机型"
prop=
"acType
"
:borderBottom=
"true"
>
<up-form-item
label=
"
航司"
prop=
"acOwn
"
:borderBottom=
"true"
>
<global-picker
v-model=
"formData.ac
Type
"
v-model=
"formData.ac
Own
"
pickAlign=
"right"
:options=
"baseStore.getTypeSelect"
clearable
filter
/>
:options=
"baseStore.getAirlineSelect"
clearable
filter
/>
</up-form-item>
<up-form-item
label=
"航
司"
prop=
"acOwn
"
:borderBottom=
"true"
>
<up-form-item
label=
"航
班号"
prop=
"flightNo
"
:borderBottom=
"true"
>
<global-picker
v-model=
"formData.
acOwn
"
v-model=
"formData.
flightNo
"
pickAlign=
"right"
:options=
"baseStore.
getAirlineSelec
t"
:options=
"baseStore.
selectList.flightNumLis
t"
clearable
filter
/>
...
...
@@ -35,7 +49,8 @@
<view
class=
"footer-btn"
>
<up-row
gutter=
"10"
>
<up-col
span=
"6"
>
<global-button
type=
"light"
size=
"large"
:radius=
"5"
@
tap=
"handleReset"
>
重置
</global-button>
<global-button
type=
"primary"
plain
size=
"large"
:radius=
"5"
@
tap=
"handleReset"
>
重置
</global-button>
</up-col>
<up-col
span=
"6"
>
<global-button
type=
"primary"
size=
"large"
:radius=
"5"
@
tap=
"handleConfirm"
>
确定
</global-button>
...
...
@@ -56,6 +71,9 @@ import { onUnload } from '@dcloudio/uni-app'
//获取下拉框选项
const
baseStore
=
useBaseStore
()
const
{
selectList
:
{
deviceNumList
}
}
=
useBaseStore
()
const
flightSupportStore
=
useFlightSupportStore
()
//获取查询表单数据
...
...
src/pages/modules/mocp/panel/flight-support/constants/flightSupportList.scss
View file @
438127eb
...
...
@@ -65,6 +65,9 @@
border-bottom
:
1px
solid
rgba
(
231
,
231
,
231
,
1
);
.topTabItem
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
flex
:
1
;
}
}
...
...
@@ -73,7 +76,7 @@
padding
:
0
.5rem
0
.75rem
;
.listScreenRT
{
width
:
26
2rpx
;
width
:
17
2rpx
;
::v-deep
.u-subsection__item
{
border
:
none
!
important
;
...
...
src/pages/modules/mocp/panel/flight-support/list.vue
View file @
438127eb
...
...
@@ -26,6 +26,9 @@
<view
class=
"flex listTopTab text-center"
>
<view
v-for=
"item of getSelectedList"
:key=
"item.id"
class=
"topTabItem"
:style=
"
{ flex: item.flex }">
{{
item
.
label
}}
<!--
<up-icon
v-if=
"item.keyValue == 'time' || item.keyValue == 'staChn'"
name=
"photo"
color=
"#2979ff"
size=
"12"
></up-icon>
-->
</view>
</view>
</
template
>
...
...
@@ -101,7 +104,6 @@ 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
==
allInBoundMode
.
In
...
...
@@ -109,6 +111,7 @@ const subsectionChange = (e) => {
listTab
.
value
[
ind
].
label
=
isCurrentIn
?
'出发地'
:
'目的地'
}
paging
.
value
.
reload
()
searchData
.
value
.
isOut
=
e
}
uni
.
$on
(
'screenReload'
,
()
=>
{
...
...
src/pages/modules/mocp/panel/supported-task/components/supportedTaskItem.vue
View file @
438127eb
<
template
>
<view
class=
"item"
>
<view
class=
"item-title"
>
<view
class=
"left"
>
<custom-state
:value=
"item.status?.toUpperCase()"
/>
<view
class=
"supportedTaskItem f-flex-1"
>
<view
class=
"itemFlex itemTop"
>
<view
class=
"txt f-flex-2 text-left"
>
{{
followAcTagAll
[
item
.
followStatus
]
}}
</view>
<view
class=
"txt f-flex-3 text-center"
>
{{
timeStampFormat
(
item
.
flightDate
,
{
format
:
'YYYY-MM-DD'
}
)
||
'-'
}}
<
/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
class
=
"txt f-flex-2 text-center"
>
{{
timeStampFormat
(
item
.
stdChn
,
{
format
:
'HH:mm'
}
)
||
'-'
}}
<
/view
>
<
view
class
=
"txt f-flex-3 text-right"
>
航站:
{{
item
.
depStn
}}
<
/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
class
=
"itemFlex itemBom"
>
<
view
class
=
"txt f-flex-2"
>
{{
item
.
acOwn
}}
<
/view
>
<
view
class
=
"txt f-flex-3 text-center"
>
{{
item
.
flightNo
}}
<
/view
>
<
view
class
=
"txt f-flex-2 text-center"
>
{{
item
.
ac
}}
<
/view
>
<
view
class
=
"txt f-flex-3 text-right"
>
{{
item
.
acType
}}
<
/view
>
<
/view
>
<
/view
>
<
/template
>
<
script
setup
>
import
{
ref
}
from
'vue'
import
{
timeStampFormat
}
from
'mocp/utils/tool'
import
{
followAcTagAll
}
from
'mocp/utils/getFlightList'
const
ps
=
defineProps
({
item
:
{
...
...
@@ -50,7 +35,8 @@ const ps = defineProps({
}
)
const
{
item
}
=
ps
<
/script
>
<
style
lang
=
"scss"
scoped
>
@import
'
mocpStatic/css/list
.scss'
;
@
import
'
../constants/supportedTask
.scss'
;
<
/style
>
src/pages/modules/mocp/panel/supported-task/constants/supportedTask.scss
0 → 100644
View file @
438127eb
.f-flex-1
{
flex
:
1
;
}
.f-flex-2
{
flex
:
2
;
}
.f-flex-3
{
flex
:
3
;
}
.text-left
{
text-align
:
left
;
}
.text-center
{
text-align
:
center
;
}
.text-right
{
text-align
:
right
;
}
.footer-btn
{
padding
:
24rpx
32rpx
;
background-color
:
#fff
;
}
.supportedTaskItem
{
background-color
:
#fff
;
padding
:
32rpx
;
margin
:
10rpx
0
10rpx
32rpx
;
border-radius
:
10rpx
;
font-size
:
12px
;
.itemFlex
{
display
:
flex
;
align-items
:
center
;
justify-content
:
space-around
;
.txt
{
//flex: 1;
}
}
.itemBom
{
margin-top
:
18rpx
;
.txt
{
border-right
:
1px
$mocp-fill-3
solid
;
&
:last-child
{
border-right
:
none
;
}
}
}
}
\ No newline at end of file
src/pages/modules/mocp/panel/supported-task/list.vue
View file @
438127eb
...
...
@@ -17,22 +17,63 @@
@
handleChooseData=
"handleChooseData"
>
<template
#="
{ item }">
<supportedTaskItem
:item=
"itemMsg"
/>
<supportedTaskItem
:item=
"item"
/>
</
template
>
<
template
#
bottom
>
<view
class=
"footer-btn"
>
<up-row
gutter=
"10"
>
<up-col
span=
"6"
>
<global-button
type=
"primary"
plain
size=
"large"
:radius=
"5"
@
tap=
"handleReset"
>
清空选择
</global-button>
</up-col>
<up-col
span=
"6"
>
<global-button
type=
"primary"
size=
"large"
:radius=
"5"
@
tap=
"handleConfirm"
>
确认选择
</global-button>
</up-col>
</up-row>
</view>
</
template
>
</global-page-swiper>
<global-action-sheet
v-model=
"showAction"
:options=
"followAcTagAllDispose"
@
select=
"handleSelect"
/>
</template>
<
script
setup
>
import
{
ref
}
from
'vue'
import
useSupportedTaskStore
from
'mocp/store/supportedTask'
import
{
storeToRefs
}
from
'pinia'
import
{
userTasksApi
}
from
'mocp/api/supportedTask'
import
{
userTasksApi
,
updateFlyFollowAcApi
,
getMoveList
}
from
'mocp/api/supportedTask'
import
supportedTaskItem
from
'./components/supportedTaskItem.vue'
import
{
followAcTagAll
}
from
'mocp/utils/getFlightList'
import
{
orderBy
}
from
'lodash'
//跳转
const
paging
=
ref
(
null
)
const
showAction
=
ref
(
false
)
const
supportedTaskStore
=
useSupportedTaskStore
()
const
{
searchData
}
=
storeToRefs
(
supportedTaskStore
)
const
followAcTagAllDispose
=
followAcTagAll
.
map
(
item
=>
{
return
{
label
:
item
,
value
:
item
}
})
const
tabList
=
[
{
name
:
'今日及次日后跟机任务'
,
...
...
@@ -43,25 +84,63 @@ const tabList = [
value
:
2
}
]
const
selectList
=
ref
([])
const
transformData
=
(
data
)
=>
{
console
.
log
(
'@@mappedData'
,
data
)
return
[
const
test
=
[
{
followStatus
:
1
,
//跟机状态
aaa
:
1
,
//跟机航班日期
bbb
:
1
,
//起飞时间
ccc
:
1
,
//跟机航站
ddd
:
1
,
//航司
eee
:
1
,
//航班号
fff
:
1
,
//飞机号
ggg
:
1
//机型
flightDate
:
1
,
//跟机航班日期
stdChn
:
1
,
//起飞时间
depStn
:
1
,
//跟机航站
acOwn
:
1
,
//航司
flightNo
:
1
,
//航班号
ac
:
1
,
//机号
acType
:
1
//机型
},
{
followStatus
:
2
,
//跟机状态
flightDate
:
2
,
//跟机航班日期
stdChn
:
2
,
//起飞时间
depStn
:
2
,
//跟机航站
acOwn
:
2
,
//航司
flightNo
:
2
,
//航班号
ac
:
2
,
//机号
acType
:
2
//机型
}
]
}
console
.
log
(
'@@mappedData'
,
data
.
followAc
)
return
orderBy
(
data
.
followAc
,
'stdChn'
)
}
const
handleChooseData
=
(
data
)
=>
{
console
.
log
(
'@@'
,
data
)
selectList
.
value
=
data
}
const
handleSelect
=
async
(
followStatus
)
=>
{
console
.
log
(
'选中的状态***'
,
followStatus
,
selectList
.
value
)
try
{
const
changeStatus
=
await
Promise
.
all
(
selectList
.
value
.
map
(
item
=>
updateFlyFollowAcApi
({
id
:
item
.
id
,
followStatus
}))
)
if
(
changeStatus
.
every
(
a
=>
a
.
data
.
code
.
toString
()
===
'200'
))
{
uni
.
$mocpMessage
.
success
(
'修改成功'
)
paging
.
value
.
reload
()
}
}
catch
(
e
)
{
console
.
log
(
'遍历修改状态错误'
)
}
}
const
handleReset
=
()
=>
{
paging
.
value
.
updateCache
()
}
const
handleConfirm
=
()
=>
{
if
(
!
selectList
.
value
?.
length
)
return
uni
.
$mocpMessage
.
error
(
'请至少勾选一条数据'
)
showAction
.
value
=
true
}
</
script
>
<
style
lang=
"scss"
scoped
></
style
>
<
style
lang=
"scss"
scoped
>
@import
'./constants/supportedTask.scss'
;
</
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