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
3dbf906a
Commit
3dbf906a
authored
May 27, 2024
by
pangchong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 调整
parent
34978d3a
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
134 additions
and
14 deletions
+134
-14
components.d.ts
+4
-1
src/components/widget/custom-score.vue
+0
-0
src/pages.json
+11
-1
src/pages/panel/app-center/index.vue
+1
-1
src/pages/panel/appraisal-record/details.vue
+2
-2
src/pages/panel/appraisal-record/list.vue
+1
-1
src/pages/panel/assign-work/constants/list.scss
+40
-0
src/pages/panel/assign-work/list.vue
+56
-0
src/store/user.js
+19
-8
No files found.
components.d.ts
View file @
3dbf906a
...
@@ -7,6 +7,7 @@ export {}
...
@@ -7,6 +7,7 @@ export {}
declare
module
'vue'
{
declare
module
'vue'
{
export
interface
GlobalComponents
{
export
interface
GlobalComponents
{
// 全局组件
GlobalButton
:
typeof
import
(
'./src/components/global-button/global-button.vue'
)[
'default'
]
GlobalButton
:
typeof
import
(
'./src/components/global-button/global-button.vue'
)[
'default'
]
GlobalEmpty
:
typeof
import
(
'./src/components/global-empty/global-empty.vue'
)[
'default'
]
GlobalEmpty
:
typeof
import
(
'./src/components/global-empty/global-empty.vue'
)[
'default'
]
GlobalIcon
:
typeof
import
(
'./src/components/global-icon/global-icon.vue'
)[
'default'
]
GlobalIcon
:
typeof
import
(
'./src/components/global-icon/global-icon.vue'
)[
'default'
]
...
@@ -15,7 +16,9 @@ declare module 'vue' {
...
@@ -15,7 +16,9 @@ declare module 'vue' {
GlobalPageSwiper
:
typeof
import
(
'./src/components/global-page-swiper/global-page-swiper.vue'
)[
'default'
]
GlobalPageSwiper
:
typeof
import
(
'./src/components/global-page-swiper/global-page-swiper.vue'
)[
'default'
]
GlobalPageSwiperItem
:
typeof
import
(
'./src/components/global-page-swiper-item/global-page-swiper-item.vue'
)[
'default'
]
GlobalPageSwiperItem
:
typeof
import
(
'./src/components/global-page-swiper-item/global-page-swiper-item.vue'
)[
'default'
]
GlobalPicker
:
typeof
import
(
'./src/components/global-picker/global-picker.vue'
)[
'default'
]
GlobalPicker
:
typeof
import
(
'./src/components/global-picker/global-picker.vue'
)[
'default'
]
Global
Score
:
typeof
import
(
'./src/components/global-score/global-score
.vue'
)[
'default'
]
Global
Tabs
:
typeof
import
(
'./src/components/global-tabs/global-tabs
.vue'
)[
'default'
]
GlobalUpload
:
typeof
import
(
'./src/components/global-upload/global-upload.vue'
)[
'default'
]
GlobalUpload
:
typeof
import
(
'./src/components/global-upload/global-upload.vue'
)[
'default'
]
// 自定义组件
CustomScore
:
typeof
import
(
'./src/components/widget/custom-score.vue'
)[
'default'
]
}
}
}
}
src/components/
global-score/global
-score.vue
→
src/components/
widget/custom
-score.vue
View file @
3dbf906a
File moved
src/pages.json
View file @
3dbf906a
...
@@ -5,9 +5,12 @@
...
@@ -5,9 +5,12 @@
"custom"
:
{
"custom"
:
{
//
uni-ui
规则如下配置
//
uni-ui
规则如下配置
"^uni-(.*)"
:
"@dcloudio/uni-ui/lib/uni-$1/uni-$1.vue"
,
"^uni-(.*)"
:
"@dcloudio/uni-ui/lib/uni-$1/uni-$1.vue"
,
//
uview-plus
规则如下配置
"^u--(.*)"
:
"uview-plus/components/u-$1/u-$1.vue"
,
"^u--(.*)"
:
"uview-plus/components/u-$1/u-$1.vue"
,
"^up-(.*)"
:
"uview-plus/components/u-$1/u-$1.vue"
,
"^up-(.*)"
:
"uview-plus/components/u-$1/u-$1.vue"
,
"^u-([^-].*)"
:
"uview-plus/components/u-$1/u-$1.vue"
"^u-([^-].*)"
:
"uview-plus/components/u-$1/u-$1.vue"
,
//
自定义组件
规则如下配置
"^custom-(.*)"
:
"@/components/widget/custom-$1.vue"
}
}
},
},
"pages"
:
[
"pages"
:
[
...
@@ -80,6 +83,13 @@
...
@@ -80,6 +83,13 @@
"navigationBarTitleText"
:
"添加公司值班信息"
,
"navigationBarTitleText"
:
"添加公司值班信息"
,
"navigationStyle"
:
"custom"
"navigationStyle"
:
"custom"
}
}
},
{
"path"
:
"pages/panel/assign-work/list"
,
"style"
:
{
"navigationBarTitleText"
:
"布置工作"
,
"navigationStyle"
:
"custom"
}
}
}
],
],
"globalStyle"
:
{
"globalStyle"
:
{
...
...
src/pages/panel/app-center/index.vue
View file @
3dbf906a
...
@@ -82,7 +82,7 @@ const handleHomeMenu = (menu, type) => {
...
@@ -82,7 +82,7 @@ const handleHomeMenu = (menu, type) => {
}
}
//获取全部应用
//获取全部应用
const
getMenuList
=
computed
(()
=>
{
const
getMenuList
=
computed
(()
=>
{
return
userStore
.
m
enuList
.
map
((
item
)
=>
{
return
userStore
.
getM
enuList
.
map
((
item
)
=>
{
return
{
return
{
...
item
,
...
item
,
isHome
:
homeMenuList
.
value
.
find
((
opt
)
=>
opt
.
id
==
item
.
id
)
?
true
:
false
isHome
:
homeMenuList
.
value
.
find
((
opt
)
=>
opt
.
id
==
item
.
id
)
?
true
:
false
...
...
src/pages/panel/appraisal-record/details.vue
View file @
3dbf906a
...
@@ -15,11 +15,11 @@
...
@@ -15,11 +15,11 @@
<view
class=
"details-header"
>
<view
class=
"details-header"
>
<view
class=
"details-header-top"
>
<view
class=
"details-header-top"
>
<view
class=
"txt"
>
{{ details.status == 1 ? 'OPEN' : 'ClOSE' }}
</view>
<view
class=
"txt"
>
{{ details.status == 1 ? 'OPEN' : 'ClOSE' }}
</view>
<
global
-score
<
custom
-score
v-if=
"details.score != -1"
v-if=
"details.score != -1"
:type=
"details.eventType == 1 ? 'success' : 'warning'"
:type=
"details.eventType == 1 ? 'success' : 'warning'"
:count=
"details.score"
:count=
"details.score"
></
global
-score>
></
custom
-score>
</view>
</view>
<view
class=
"details-header-bottom"
>
<view
class=
"details-header-bottom"
>
<view
class=
"left"
>
<view
class=
"left"
>
...
...
src/pages/panel/appraisal-record/list.vue
View file @
3dbf906a
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
<view
class=
"txt"
>
{{
item
.
appraisee
!=
'-1'
?
item
.
appraisee
:
''
}}
</view>
<view
class=
"txt"
>
{{
item
.
appraisee
!=
'-1'
?
item
.
appraisee
:
''
}}
</view>
<view
class=
"place"
>
{{
item
.
department
!=
'-1'
?
item
.
department
:
''
}}
</view>
<view
class=
"place"
>
{{
item
.
department
!=
'-1'
?
item
.
department
:
''
}}
</view>
</view>
</view>
<
global-score
v-if=
"item.score != -1"
:type=
"item.eventType == 1 ? 'success' : 'warning'"
:count=
"item.score"
></global
-score>
<
custom-score
v-if=
"item.score != -1"
:type=
"item.eventType == 1 ? 'success' : 'warning'"
:count=
"item.score"
></custom
-score>
</view>
</view>
<view
class=
"item-content u-line-3"
>
<view
class=
"item-content u-line-3"
>
{{
item
.
eventMsg
||
'暂无内容~'
}}
{{
item
.
eventMsg
||
'暂无内容~'
}}
...
...
src/pages/panel/assign-work/constants/list.scss
0 → 100644
View file @
3dbf906a
.list
{
padding
:
24rpx
;
.item
{
padding
:
24rpx
;
margin-bottom
:
16rpx
;
border-radius
:
12rpx
;
background
:
linear-gradient
(
#e6eeff
,
#ffffff
,
#ffffff
);
&
-title
{
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
padding-bottom
:
16rpx
;
border-bottom
:
2rpx
solid
#f4f4f4
;
.desc
{
display
:
flex
;
align-items
:
center
;
.type
{
color
:
#f53f3f
;
font-size
:
34rpx
;
}
.txt
{
color
:
#1d2129
;
font-size
:
34rpx
;
margin
:
0
16rpx
;
}
.place
{
font-size
:
28rpx
;
color
:
#86909c
;
}
}
}
&
-content
{
padding-top
:
16rpx
;
font-size
:
30rpx
;
color
:
#4e5969
;
line-height
:
40rpx
;
}
}
}
\ No newline at end of file
src/pages/panel/assign-work/list.vue
0 → 100644
View file @
3dbf906a
<
template
>
<global-page-swiper
title=
"考核记录"
refresherEnabled
loadingMoreEnabled
:tabList=
"tabList"
:api=
"getRqmListApi"
ref=
"paging"
>
<template
#="
{ dataList }">
<view
class=
"list"
>
<view
class=
"item"
v-for=
"item in dataList"
:key=
"item.id"
@
tap=
"goDetails(item)"
>
<view
class=
"item-title"
>
<view
class=
"desc"
>
<view
class=
"type"
>
{{
item
.
status
==
1
?
'OPEN'
:
'ClOSE'
}}
</view>
<view
class=
"txt"
>
{{
item
.
appraisee
!=
'-1'
?
item
.
appraisee
:
''
}}
</view>
<view
class=
"place"
>
{{
item
.
department
!=
'-1'
?
item
.
department
:
''
}}
</view>
</view>
<custom-score
v-if=
"item.score != -1"
:type=
"item.eventType == 1 ? 'success' : 'warning'"
:count=
"item.score"
></custom-score>
</view>
<view
class=
"item-content u-line-3"
>
{{
item
.
eventMsg
||
'暂无内容~'
}}
</view>
</view>
</view>
</
template
>
</global-page-swiper>
</template>
<
script
setup
>
import
{
ref
}
from
'vue'
import
{
getRqmListApi
}
from
'@/api/appraisal-record'
import
{
onLoad
,
onUnload
}
from
'@dcloudio/uni-app'
import
useAppraisalRecordStore
from
'@/store/appraisal-record'
const
tabList
=
ref
([
{
name
:
'OPEN'
,
value
:
1
},
{
name
:
'CLOSE'
,
value
:
0
},
{
name
:
'全部'
,
value
:
-
1
}
])
//跳转
const
goDetails
=
(
data
)
=>
{
uni
.
navigateTo
({
url
:
'details?id='
+
data
.
id
})
}
//加载下拉框数据
const
appraisalRecordStore
=
useAppraisalRecordStore
()
onLoad
(()
=>
{
appraisalRecordStore
.
getRqmOptions
()
})
//刷新
const
paging
=
ref
()
uni
.
$on
(
'appraisalRecordReload'
,
()
=>
{
paging
.
value
?.
reload
()
})
onUnload
(()
=>
{
uni
.
$off
(
'appraisalRecordReload'
)
})
</
script
>
<
style
lang=
"scss"
scoped
>
@import
'./constants/list.scss'
;
</
style
>
src/store/user.js
View file @
3dbf906a
import
{
defineStore
}
from
'pinia'
import
{
defineStore
}
from
'pinia'
import
{
cloneDeep
}
from
'lodash
'
import
{
ref
}
from
'vue
'
const
menuList
=
[
const
menuList
=
ref
(
[
{
id
:
1
,
name
:
'信息通报'
,
icon
:
'xxtb'
,
group
:
'技术支援'
,
count
:
12
},
{
id
:
1
,
name
:
'信息通报'
,
icon
:
'xxtb'
,
group
:
'技术支援'
,
count
:
12
},
{
id
:
2
,
name
:
'机队状态'
,
icon
:
'jdzt'
,
group
:
'技术支援'
,
count
:
0
},
{
id
:
2
,
name
:
'机队状态'
,
icon
:
'jdzt'
,
group
:
'技术支援'
,
count
:
0
},
{
id
:
3
,
name
:
'支援申请'
,
icon
:
'zysq'
,
group
:
'技术支援'
,
count
:
0
},
{
id
:
3
,
name
:
'支援申请'
,
icon
:
'zysq'
,
group
:
'技术支援'
,
count
:
0
},
...
@@ -8,7 +8,7 @@ const menuList = [
...
@@ -8,7 +8,7 @@ const menuList = [
{
id
:
5
,
name
:
'技术评估'
,
icon
:
'jspg'
,
group
:
'技术支援'
,
count
:
0
},
{
id
:
5
,
name
:
'技术评估'
,
icon
:
'jspg'
,
group
:
'技术支援'
,
count
:
0
},
{
id
:
6
,
name
:
'运行调查'
,
icon
:
'yxdc'
,
group
:
'维修控制'
,
count
:
0
},
{
id
:
6
,
name
:
'运行调查'
,
icon
:
'yxdc'
,
group
:
'维修控制'
,
count
:
0
},
{
id
:
7
,
name
:
'运行决策'
,
icon
:
'yxjc'
,
group
:
'维修控制'
,
count
:
0
},
{
id
:
7
,
name
:
'运行决策'
,
icon
:
'yxjc'
,
group
:
'维修控制'
,
count
:
0
},
{
id
:
8
,
name
:
'布置工作'
,
icon
:
'bzgz'
,
group
:
'维修控制'
,
count
:
0
},
{
id
:
8
,
name
:
'布置工作'
,
icon
:
'bzgz'
,
group
:
'维修控制'
,
count
:
0
,
url
:
'/pages/panel/assign-work/list'
},
{
id
:
9
,
name
:
'航站管理'
,
icon
:
'hzgl'
,
group
:
'航站管理'
,
count
:
0
},
{
id
:
9
,
name
:
'航站管理'
,
icon
:
'hzgl'
,
group
:
'航站管理'
,
count
:
0
},
{
id
:
10
,
name
:
'协议单位'
,
icon
:
'xydw'
,
group
:
'航站管理'
,
count
:
0
},
{
id
:
10
,
name
:
'协议单位'
,
icon
:
'xydw'
,
group
:
'航站管理'
,
count
:
0
},
{
id
:
11
,
name
:
'不正常事件'
,
icon
:
'bzcsj'
,
group
:
'运行品质'
,
count
:
0
},
{
id
:
11
,
name
:
'不正常事件'
,
icon
:
'bzcsj'
,
group
:
'运行品质'
,
count
:
0
},
...
@@ -16,21 +16,24 @@ const menuList = [
...
@@ -16,21 +16,24 @@ const menuList = [
{
id
:
13
,
name
:
'AOG任务'
,
icon
:
'AOG'
,
group
:
'运行品质'
,
count
:
0
},
{
id
:
13
,
name
:
'AOG任务'
,
icon
:
'AOG'
,
group
:
'运行品质'
,
count
:
0
},
{
id
:
14
,
name
:
'MCO'
,
icon
:
'MCO'
,
group
:
'运行品质'
,
count
:
0
},
{
id
:
14
,
name
:
'MCO'
,
icon
:
'MCO'
,
group
:
'运行品质'
,
count
:
0
},
{
id
:
15
,
name
:
'航班保障'
,
icon
:
'hbbz'
,
group
:
'运行品质'
,
count
:
0
}
{
id
:
15
,
name
:
'航班保障'
,
icon
:
'hbbz'
,
group
:
'运行品质'
,
count
:
0
}
]
]
)
const
useUserStore
=
defineStore
(
'user'
,
{
const
useUserStore
=
defineStore
(
'user'
,
{
state
:
()
=>
{
state
:
()
=>
{
return
{
return
{
token
:
''
,
token
:
''
,
userInfo
:
undefined
,
//用户信息
userInfo
:
undefined
,
//用户信息
menuList
:
cloneDeep
(
menuList
),
//全部菜单
allMenuItem
:
{
id
:
999
,
name
:
'全部菜单'
,
icon
:
'all'
,
group
:
''
,
count
:
0
},
allMenuItem
:
{
id
:
999
,
name
:
'全部菜单'
,
icon
:
'all'
,
group
:
''
,
count
:
0
},
allHomeMenuList
:
[]
//所有登录用户的首页菜单信息
allHomeMenuList
:
[]
//所有登录用户的首页菜单信息
}
}
},
},
getters
:
{
getters
:
{
//获取全部菜单
getMenuList
()
{
return
menuList
.
value
},
//获取分组菜单
//获取分组菜单
getGroupMenuList
(
state
)
{
getGroupMenuList
(
state
)
{
return
state
.
m
enuList
.
reduce
((
groups
,
item
)
=>
{
return
state
.
getM
enuList
.
reduce
((
groups
,
item
)
=>
{
// 如果该组不存在,则创建一个新组
// 如果该组不存在,则创建一个新组
if
(
!
groups
[
item
.
group
])
{
if
(
!
groups
[
item
.
group
])
{
groups
[
item
.
group
]
=
[]
groups
[
item
.
group
]
=
[]
...
@@ -42,7 +45,12 @@ const useUserStore = defineStore('user', {
...
@@ -42,7 +45,12 @@ const useUserStore = defineStore('user', {
},
},
//获取当前登录用户的首页菜单
//获取当前登录用户的首页菜单
getHomeMenuList
(
state
)
{
getHomeMenuList
(
state
)
{
return
state
.
allHomeMenuList
.
find
((
item
)
=>
item
.
userId
==
state
.
userInfo
?.
id
)?.
homeMenuList
||
state
.
menuList
const
homeMenuList
=
state
.
allHomeMenuList
.
find
((
item
)
=>
item
.
userId
==
state
.
userInfo
?.
id
)?.
homeMenuList
const
ids
=
[]
homeMenuList
.
forEach
((
item
)
=>
{
ids
.
push
(
item
.
id
)
})
return
state
.
getMenuList
.
filter
((
item
)
=>
ids
.
includes
(
item
.
id
))
}
}
},
},
actions
:
{
actions
:
{
...
@@ -52,9 +60,12 @@ const useUserStore = defineStore('user', {
...
@@ -52,9 +60,12 @@ const useUserStore = defineStore('user', {
this
.
userInfo
=
data
this
.
userInfo
=
data
//加入用户首页菜单信息
//加入用户首页菜单信息
if
(
!
this
.
allHomeMenuList
.
find
((
item
)
=>
item
.
userId
==
this
.
userInfo
.
id
))
{
if
(
!
this
.
allHomeMenuList
.
find
((
item
)
=>
item
.
userId
==
this
.
userInfo
.
id
))
{
//记录菜单id
this
.
allHomeMenuList
.
push
({
this
.
allHomeMenuList
.
push
({
userId
:
this
.
userInfo
.
id
,
userId
:
this
.
userInfo
.
id
,
homeMenuList
:
this
.
menuList
homeMenuList
:
this
.
getMenuList
.
map
((
item
)
=>
{
return
{
id
:
item
.
id
}
})
})
})
}
}
//跳转工作台
//跳转工作台
...
...
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