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
39184f9f
Commit
39184f9f
authored
Aug 22, 2024
by
pangchong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 调整
parent
ad5661f3
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
165 additions
and
76 deletions
+165
-76
src/mocp/components/global-page/global-page.vue
+7
-3
src/mocp/store/my-toDo.js
+12
-28
src/mocp/store/user.js
+17
-15
src/mocp/utils/http.js
+3
-3
src/pages/modules/mocp/panel/my-toDo/components/appraisal-record-list.vue
+18
-1
src/pages/modules/mocp/panel/my-toDo/components/assign-work-list.vue
+18
-1
src/pages/modules/mocp/panel/my-toDo/components/move-decision-list.vue
+40
-22
src/pages/modules/mocp/panel/my-toDo/components/technology-evaluation-list.vue
+18
-1
src/pages/modules/mocp/panel/my-toDo/index.vue
+32
-2
No files found.
src/mocp/components/global-page/global-page.vue
View file @
39184f9f
...
...
@@ -3,7 +3,7 @@
<z-paging
ref=
"paging"
v-model=
"dataList"
:auto=
"auto"
:auto=
"auto
|| showEmpty
"
:fixed=
"fixed"
:height=
"height"
:refresher-enabled=
"refresherEnabled"
...
...
@@ -12,13 +12,13 @@
:loading-more-enabled=
"loadingMoreEnabled"
:back-to-top-bottom=
"backToTopBottom"
show-refresher-update-time
:hide-empty-view=
"!
auto
"
:hide-empty-view=
"!
(auto || showEmpty)
"
@
query=
"queryList"
@
scroll=
"scroll"
:paging-style=
"getPagingStyle"
:default-page-size=
"pageSize"
>
<template
#
empty
v-if=
"
auto && !dataList.length
"
>
<template
#
empty
v-if=
"
showEmpty || (auto && !dataList.length)
"
>
<global-empty></global-empty>
</
template
>
<!-- 头部 -->
...
...
@@ -83,6 +83,10 @@ const dataList = ref([])
const
es
=
defineEmits
([
'handleQuery'
,
'handleLeftClick'
,
'handleRightClick'
,
'handleFooterClick'
,
'handleChooseData'
])
const
paging
=
ref
()
const
ps
=
defineProps
({
showEmpty
:
{
type
:
Boolean
,
default
:
false
},
background
:
{
type
:
String
,
default
:
'#f7f8fa'
...
...
src/mocp/store/my-toDo.js
View file @
39184f9f
...
...
@@ -25,47 +25,31 @@ const useMyToDoStore = defineStore('myToDo', {
}
},
getAssignWorkNum
(
state
)
{
if
(
state
.
assignWorkNum
>
0
)
{
if
(
state
.
assignWorkNum
>
99
)
{
return
'99+'
}
else
{
return
state
.
assignWorkNum
}
if
(
state
.
assignWorkNum
>
99
)
{
return
'99+'
}
else
{
return
'暂无待办'
return
state
.
assignWorkNum
}
},
getAppraisalRecordNum
(
state
)
{
if
(
state
.
appraisalRecordNum
>
0
)
{
if
(
state
.
appraisalRecordNum
>
99
)
{
return
'99+'
}
else
{
return
state
.
appraisalRecordNum
}
if
(
state
.
appraisalRecordNum
>
99
)
{
return
'99+'
}
else
{
return
'暂无待办'
return
state
.
appraisalRecordNum
}
},
getMoveDecisionNum
(
state
)
{
if
(
state
.
moveDecisionNum
>
0
)
{
if
(
state
.
moveDecisionNum
>
99
)
{
return
'99+'
}
else
{
return
state
.
moveDecisionNum
}
if
(
state
.
moveDecisionNum
>
99
)
{
return
'99+'
}
else
{
return
'暂无待办'
return
state
.
moveDecisionNum
}
},
getTechnologyEvaluationNum
(
state
)
{
if
(
state
.
technologyEvaluationNum
>
0
)
{
if
(
state
.
technologyEvaluationNum
>
99
)
{
return
'99+'
}
else
{
return
state
.
technologyEvaluationNum
}
if
(
state
.
technologyEvaluationNum
>
99
)
{
return
'99+'
}
else
{
return
'暂无待办'
return
state
.
technologyEvaluationNum
}
}
},
...
...
src/mocp/store/user.js
View file @
39184f9f
...
...
@@ -5,16 +5,16 @@ import { ref } from 'vue'
const
menuList
=
ref
([
{
id
:
1
,
name
:
'信息通报'
,
icon
:
'xxtb'
,
group
:
'技术支援'
,
default
:
true
,
count
:
0
,
url
:
'/panel/inforDisclosure/search'
},
{
id
:
2
,
name
:
'机队状态'
,
icon
:
'jdzt'
,
group
:
'技术支援'
,
default
:
true
,
count
:
0
,
url
:
'/panel/fleet/search'
},
{
id
:
3
,
name
:
'支援申请'
,
icon
:
'zysq'
,
group
:
'技术支援'
,
default
:
tru
e
,
count
:
0
,
url
:
'/panel/support-application/search'
},
{
id
:
4
,
name
:
'工作指令'
,
icon
:
'gzzl'
,
group
:
'技术支援'
,
default
:
tru
e
,
count
:
0
,
url
:
'/panel/work-assignment/search'
},
{
id
:
5
,
name
:
'技术评估'
,
icon
:
'jspg'
,
group
:
'技术支援'
,
default
:
tru
e
,
count
:
0
,
url
:
'/panel/technology-evaluation/list'
},
{
id
:
3
,
name
:
'支援申请'
,
icon
:
'zysq'
,
group
:
'技术支援'
,
default
:
fals
e
,
count
:
0
,
url
:
'/panel/support-application/search'
},
{
id
:
4
,
name
:
'工作指令'
,
icon
:
'gzzl'
,
group
:
'技术支援'
,
default
:
fals
e
,
count
:
0
,
url
:
'/panel/work-assignment/search'
},
{
id
:
5
,
name
:
'技术评估'
,
icon
:
'jspg'
,
group
:
'技术支援'
,
default
:
fals
e
,
count
:
0
,
url
:
'/panel/technology-evaluation/list'
},
{
id
:
6
,
name
:
'运行调查'
,
icon
:
'yxdc'
,
group
:
'维修控制'
,
default
:
false
,
count
:
0
},
{
id
:
7
,
name
:
'运行决策'
,
icon
:
'yxjc'
,
group
:
'维修控制'
,
default
:
tru
e
,
count
:
0
,
url
:
'/panel/move-decision/list'
},
{
id
:
8
,
name
:
'布置工作'
,
icon
:
'bzgz'
,
group
:
'维修控制'
,
default
:
tru
e
,
count
:
0
,
url
:
'/panel/assign-work/search'
},
{
id
:
9
,
name
:
'航站管理'
,
icon
:
'hzgl'
,
group
:
'航站管理'
,
default
:
tru
e
,
count
:
0
},
{
id
:
10
,
name
:
'协议单位'
,
icon
:
'xydw'
,
group
:
'航站管理'
,
default
:
tru
e
,
count
:
0
},
{
id
:
11
,
name
:
'不正常事件'
,
icon
:
'bzcsj'
,
group
:
'运行品质'
,
default
:
tru
e
,
count
:
0
},
{
id
:
12
,
name
:
'考核记录'
,
icon
:
'khjl'
,
group
:
'运行品质'
,
default
:
tru
e
,
count
:
0
,
url
:
'/panel/appraisal-record/list'
},
{
id
:
7
,
name
:
'运行决策'
,
icon
:
'yxjc'
,
group
:
'维修控制'
,
default
:
fals
e
,
count
:
0
,
url
:
'/panel/move-decision/list'
},
{
id
:
8
,
name
:
'布置工作'
,
icon
:
'bzgz'
,
group
:
'维修控制'
,
default
:
fals
e
,
count
:
0
,
url
:
'/panel/assign-work/search'
},
{
id
:
9
,
name
:
'航站管理'
,
icon
:
'hzgl'
,
group
:
'航站管理'
,
default
:
fals
e
,
count
:
0
},
{
id
:
10
,
name
:
'协议单位'
,
icon
:
'xydw'
,
group
:
'航站管理'
,
default
:
fals
e
,
count
:
0
},
{
id
:
11
,
name
:
'不正常事件'
,
icon
:
'bzcsj'
,
group
:
'运行品质'
,
default
:
fals
e
,
count
:
0
},
{
id
:
12
,
name
:
'考核记录'
,
icon
:
'khjl'
,
group
:
'运行品质'
,
default
:
fals
e
,
count
:
0
,
url
:
'/panel/appraisal-record/list'
},
{
id
:
13
,
name
:
'AOG任务'
,
icon
:
'AOG'
,
group
:
'运行品质'
,
default
:
true
,
count
:
0
,
url
:
'/panel/aog/search'
},
{
id
:
14
,
name
:
'MCO'
,
icon
:
'MCO'
,
group
:
'运行品质'
,
default
:
true
,
count
:
0
,
url
:
'/panel/mco/search'
},
{
id
:
15
,
name
:
'航班保障'
,
icon
:
'hbbz'
,
group
:
'运行品质'
,
default
:
true
,
count
:
0
,
url
:
'/panel/flight-support/list'
},
...
...
@@ -26,7 +26,7 @@ const useUserStore = defineStore('user', {
token
:
''
,
userInfo
:
undefined
,
//用户信息
allMenuItem
:
{
id
:
999
,
name
:
'全部菜单'
,
icon
:
'all'
,
group
:
''
,
count
:
0
},
all
HomeMenuList
:
[]
//所有登录用户的首页菜单
信息
all
UserList
:
[]
//所有登录用户存储的
信息
}
},
getters
:
{
...
...
@@ -48,7 +48,7 @@ const useUserStore = defineStore('user', {
},
//获取当前登录用户的首页菜单
getHomeMenuList
(
state
)
{
const
homeMenuList
=
state
.
all
HomeMenu
List
.
find
((
item
)
=>
item
.
userId
==
state
.
userInfo
?.
id
)?.
homeMenuList
const
homeMenuList
=
state
.
all
User
List
.
find
((
item
)
=>
item
.
userId
==
state
.
userInfo
?.
id
)?.
homeMenuList
const
ids
=
[]
homeMenuList
.
forEach
((
item
)
=>
{
ids
.
push
(
item
.
id
)
...
...
@@ -62,9 +62,9 @@ const useUserStore = defineStore('user', {
this
.
token
=
data
.
token
this
.
userInfo
=
data
//加入用户首页菜单信息
if
(
!
this
.
all
HomeMenu
List
.
find
((
item
)
=>
item
.
userId
==
this
.
userInfo
.
id
))
{
if
(
!
this
.
all
User
List
.
find
((
item
)
=>
item
.
userId
==
this
.
userInfo
.
id
))
{
//记录菜单id
this
.
all
HomeMenu
List
.
push
({
this
.
all
User
List
.
push
({
userId
:
this
.
userInfo
.
id
,
homeMenuList
:
this
.
getMenuList
.
filter
((
item
)
=>
item
.
default
)
...
...
@@ -85,8 +85,10 @@ const useUserStore = defineStore('user', {
},
//修改用户首页菜单
changeHomeMenuList
(
menuList
)
{
const
index
=
this
.
allHomeMenuList
.
findIndex
((
item
)
=>
item
.
userId
==
this
.
userInfo
.
id
)
this
.
allHomeMenuList
[
index
].
homeMenuList
=
menuList
const
index
=
this
.
allUserList
.
findIndex
((
item
)
=>
item
.
userId
==
this
.
userInfo
.
id
)
this
.
allUserList
[
index
].
homeMenuList
=
menuList
.
map
((
item
)
=>
{
return
{
id
:
item
.
id
}
})
}
},
// 配置持久化
...
...
src/mocp/utils/http.js
View file @
39184f9f
import
useUserStore
from
'mocp/store/user'
//
const baseURL = 'https://hna-platform.anyremote.cn' //测试
const
baseURL
=
'https://hna-platform.anyremote.cn'
//测试
// const baseURL = 'https://moc.hnatechnic.com/api' //生产
const
baseURL
=
'https://hnaelbtest.hnatechnic.com/mocptest/api'
//内网
//
const baseURL = 'https://hnaelbtest.hnatechnic.com/mocptest/api' //内网
class
ServiceLoading
{
open
(
loading
)
{
...
...
@@ -123,7 +123,7 @@ export const http = (options) => {
},
500
)
reject
(
res
)
}
else
{
uni
.
$mocpMessage
.
error
(
res
.
data
.
message
||
'请求
错误'
)
uni
.
$mocpMessage
.
error
(
res
.
data
.
path
+
'接口
错误'
)
reject
(
res
)
}
},
...
...
src/pages/modules/mocp/panel/my-toDo/components/appraisal-record-list.vue
View file @
39184f9f
<
template
>
<up-collapse-item
:title=
"`考核记录($
{getAppraisalRecordNum})`">
<up-collapse-item
:title=
"`考核记录($
{getAppraisalRecordNum})`"
v-if="getAppraisalRecordNum > 0"
>
<global-page
:fixed=
"false"
:height=
"height"
...
...
@@ -16,6 +16,19 @@
auto
>
<template
#
default=
"
{ item }">
<up-swipe-action>
<up-swipe-action-item
@
click=
"handleDelete(item)"
:options=
"[
{
text: '移除',
style: {
backgroundColor: '#f53f3f'
}
}
]"
>
</up-swipe-action-item>
</up-swipe-action>
<view
class=
"item"
@
tap=
"goDetails(item)"
>
<view
class=
"item-title"
>
<view
class=
"desc"
>
...
...
@@ -55,6 +68,10 @@ const goDetails = (data) => {
id
:
data
.
id
})
}
//删除
const
handleDelete
=
(
data
)
=>
{
console
.
log
(
data
)
}
const
handleQuery
=
({
res
})
=>
{
myToDoStore
.
setState
(
'appraisalRecordNum'
,
parseInt
(
res
.
total
)
||
0
)
}
...
...
src/pages/modules/mocp/panel/my-toDo/components/assign-work-list.vue
View file @
39184f9f
<
template
>
<up-collapse-item
:title=
"`布置工作($
{getAssignWorkNum})`">
<up-collapse-item
:title=
"`布置工作($
{getAssignWorkNum})`"
v-if="getAssignWorkNum > 0"
>
<global-page
:fixed=
"false"
:height=
"height"
...
...
@@ -16,6 +16,19 @@
auto
>
<template
#
default=
"
{ item }">
<up-swipe-action>
<up-swipe-action-item
@
click=
"handleDelete(item)"
:options=
"[
{
text: '移除',
style: {
backgroundColor: '#f53f3f'
}
}
]"
>
</up-swipe-action-item>
</up-swipe-action>
<view
class=
"item"
@
tap=
"goDetails(item)"
>
<view
class=
"item-title"
>
<view
class=
"left"
>
...
...
@@ -67,6 +80,10 @@ const ps = defineProps({
const
goDetails
=
(
data
)
=>
{
uni
.
$mocpJump
.
navigateTo
(
'/panel/assign-work/details'
,
{
id
:
data
.
id
}
)
}
//删除
const
handleDelete
=
(
data
)
=>
{
console
.
log
(
data
)
}
const
handleQuery
=
({
res
}
)
=>
{
myToDoStore
.
setState
(
'assignWorkNum'
,
parseInt
(
res
.
data
.
total
)
||
0
)
}
...
...
src/pages/modules/mocp/panel/my-toDo/components/move-decision-list.vue
View file @
39184f9f
<
template
>
<up-collapse-item
:title=
"`运行决策($
{getMoveDecisionNum})`">
<up-collapse-item
:title=
"`运行决策($
{getMoveDecisionNum})`"
v-if="getMoveDecisionNum > 0"
>
<global-page
:fixed=
"false"
:height=
"height"
...
...
@@ -13,28 +13,42 @@
auto
>
<template
#
default=
"
{ item }">
<view
class=
"item"
@
tap=
"goDetails(item)"
>
<view
class=
"item-title"
>
<view
class=
"left"
>
<custom-state
:value=
"useGetDictByValue('md_state', item.state)"
></custom-state>
<up-swipe-action>
<up-swipe-action-item
@
click=
"handleDelete(item)"
:options=
"[
{
text: '移除',
style: {
backgroundColor: '#f53f3f'
}
}
]"
>
<view
class=
"item"
@
tap=
"goDetails(item)"
>
<view
class=
"item-title"
>
<view
class=
"left"
>
<custom-state
:value=
"useGetDictByValue('md_state', item.state)"
></custom-state>
</view>
<view
class=
"right"
>
<text
class=
"txt u-line-1"
v-if=
"item.machineNumber"
>
{{
item
.
machineNumber
}}
</text>
<text
class=
"txt u-line-1"
v-if=
"item.aviation"
>
{{
item
.
aviation
}}
</text>
</view>
</view>
<view
class=
"item-content u-line-3"
>
{{
item
.
faultDescription
||
'无'
}}
</view>
<view
class=
"item-footer"
>
<view
class=
"label"
>
<global-icon
icon=
"calendar"
></global-icon>
<text
class=
"txt"
>
{{
timeStampFormat
(
item
.
filledTime
,
{
format
:
'YYYY/MM/DD HH:mm'
}
)
}}
<
/text
>
<
/view
>
<
/view
>
<
/view
>
<view
class=
"right"
>
<text
class=
"txt u-line-1"
v-if=
"item.machineNumber"
>
{{
item
.
machineNumber
}}
</text>
<text
class=
"txt u-line-1"
v-if=
"item.aviation"
>
{{
item
.
aviation
}}
</text>
</view>
</view>
<view
class=
"item-content u-line-3"
>
{{
item
.
faultDescription
||
'无'
}}
</view>
<view
class=
"item-footer"
>
<view
class=
"label"
>
<global-icon
icon=
"calendar"
></global-icon>
<text
class=
"txt"
>
{{
timeStampFormat
(
item
.
filledTime
,
{
format
:
'YYYY/MM/DD HH:mm'
}
)
}}
<
/text
>
<
/view
>
<
/view
>
<
/view
>
<
/up-swipe-action-item
>
<
/up-swipe-action
>
<
/template
>
<
/global-page
>
<
/up-collapse-item
>
...
...
@@ -63,6 +77,10 @@ const goDetails = (data) => {
moveDecisionStore
.
setState
(
'details'
,
data
)
}
)
}
//删除
const
handleDelete
=
(
data
)
=>
{
console
.
log
(
data
)
}
const
handleQuery
=
({
res
}
)
=>
{
myToDoStore
.
setState
(
'moveDecisionNum'
,
parseInt
(
res
.
data
.
total
)
||
0
)
}
...
...
src/pages/modules/mocp/panel/my-toDo/components/technology-evaluation-list.vue
View file @
39184f9f
<
template
>
<up-collapse-item
:title=
"`技术评估($
{getTechnologyEvaluationNum})`">
<up-collapse-item
:title=
"`技术评估($
{getTechnologyEvaluationNum})`"
v-if="getTechnologyEvaluationNum > 0"
>
<global-page
:fixed=
"false"
:height=
"height"
...
...
@@ -13,6 +13,19 @@
auto
>
<template
#
default=
"
{ item }">
<up-swipe-action>
<up-swipe-action-item
@
click=
"handleDelete(item)"
:options=
"[
{
text: '移除',
style: {
backgroundColor: '#f53f3f'
}
}
]"
>
</up-swipe-action-item>
</up-swipe-action>
<view
class=
"item"
@
tap=
"goDetails(item)"
>
<view
class=
"item-title"
>
<view
class=
"left"
>
...
...
@@ -69,6 +82,10 @@ const goDetails = (data) => {
technologyEvaluationStore
.
setState
(
'details'
,
data
)
}
)
}
//删除
const
handleDelete
=
(
data
)
=>
{
console
.
log
(
data
)
}
const
handleQuery
=
({
res
}
)
=>
{
myToDoStore
.
setState
(
'technologyEvaluationNum'
,
parseInt
(
res
.
data
.
total
)
||
0
)
}
...
...
src/pages/modules/mocp/panel/my-toDo/index.vue
View file @
39184f9f
<
template
>
<global-page
title=
"我的待办"
>
<!-- :showNavRight="getTotal !== '-'" -->
<global-page
title=
"我的待办"
:showEmpty=
"getTotal == '-'"
navRightText=
"全部移除"
@
handleRightClick=
"handleRightClick"
>
<up-collapse
:border=
"false"
accordion
>
<assign-work-list
:height=
"getHeight"
></assign-work-list>
<appraisal-record-list
:height=
"getHeight"
></appraisal-record-list>
<move-decision-list
:height=
"getHeight"
></move-decision-list>
<technology-evaluation-list
:height=
"getHeight"
></technology-evaluation-list>
</up-collapse>
<up-modal
:width=
"250"
content=
"是否确认移除全部「我的待办」?"
:show=
"show"
showCancelButton
closeOnClickOverlay
@
confirm=
"confirm"
@
cancel=
"show = false"
@
close=
"show = false"
></up-modal>
</global-page>
</
template
>
<
script
setup
>
import
{
computed
}
from
'vue'
import
{
computed
,
ref
}
from
'vue'
import
AssignWorkList
from
'./components/assign-work-list.vue'
import
AppraisalRecordList
from
'./components/appraisal-record-list.vue'
import
MoveDecisionList
from
'./components/move-decision-list.vue'
import
TechnologyEvaluationList
from
'./components/technology-evaluation-list.vue'
import
useMyToDoStore
from
'mocp/store/my-toDo'
import
{
storeToRefs
}
from
'pinia'
const
{
windowHeight
,
safeAreaInsets
}
=
uni
.
getSystemInfoSync
()
//内容高度-nav高度-底部安全区-底部安全区
const
getHeight
=
computed
(()
=>
{
return
windowHeight
-
44
-
safeAreaInsets
?.
top
-
safeAreaInsets
?.
bottom
-
75
*
4
+
'px'
})
const
myToDoStore
=
useMyToDoStore
()
const
{
getTotal
}
=
storeToRefs
(
myToDoStore
)
//全部清除
const
show
=
ref
(
false
)
const
handleRightClick
=
()
=>
{
show
.
value
=
true
}
//确认删除
const
confirm
=
()
=>
{
show
.
value
=
false
}
</
script
>
<
style
lang=
"scss"
>
@import
'mocpStatic/css/list.scss'
;
.item
{
margin-bottom
:
0
;
}
.u-swipe-action
{
margin-bottom
:
16
rpx
;
}
</
style
>
<
style
lang=
"scss"
scoped
>
.item
:last-child
{
...
...
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