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
07e8507d
Commit
07e8507d
authored
Jul 30, 2024
by
liujinbo
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'refs/heads/master' into master_ljb
parents
438127eb
a65e8f6b
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
550 additions
and
272 deletions
+550
-272
src/mocp/api/mco.js
+2
-2
src/mocp/api/my-toDo.js
+41
-0
src/mocp/components/global-page-swiper-item/global-page-swiper-item.vue
+6
-1
src/mocp/components/global-page-swiper/global-page-swiper.vue
+29
-10
src/mocp/components/global-page/global-page.vue
+5
-2
src/mocp/components/global-text-status/dictData.js
+6
-0
src/mocp/store/mco.js
+13
-9
src/mocp/store/my-toDo.js
+111
-0
src/mocp/store/user.js
+31
-28
src/mocp/utils/http.js
+1
-1
src/pages.json
+6
-12
src/pages/modules/mocp/panel/app-center/index.vue
+11
-3
src/pages/modules/mocp/panel/components/panel-navbar.vue
+11
-3
src/pages/modules/mocp/panel/index.vue
+13
-1
src/pages/modules/mocp/panel/mco/constants/details.scss
+20
-4
src/pages/modules/mocp/panel/mco/details.vue
+35
-3
src/pages/modules/mocp/panel/mco/feed-back.vue
+54
-0
src/pages/modules/mocp/panel/mco/materials-details.vue
+0
-32
src/pages/modules/mocp/panel/mco/materials-list.vue
+38
-10
src/pages/modules/mocp/panel/mco/step-back.vue
+20
-93
src/pages/modules/mocp/panel/mco/tools-details.vue
+0
-32
src/pages/modules/mocp/panel/mco/tools-list.vue
+37
-10
src/pages/modules/mocp/panel/my-toDo/components/appraisal-record-list.vue
+16
-3
src/pages/modules/mocp/panel/my-toDo/components/assign-work-list.vue
+16
-4
src/pages/modules/mocp/panel/my-toDo/components/move-decision-list.vue
+12
-3
src/pages/modules/mocp/panel/my-toDo/components/technology-evaluation-list.vue
+13
-3
src/pages/modules/mocp/panel/technology-evaluation/details.vue
+2
-3
src/static/mocp/css/list.scss
+1
-0
src/static/mocp/image/panel/wdgj.png
+0
-0
No files found.
src/mocp/api/mco.js
View file @
07e8507d
...
...
@@ -18,10 +18,10 @@ export const getMcoDetailsApi = (data, config) => {
})
}
export
const
add
BackApi
=
(
data
,
config
)
=>
{
export
const
get
BackApi
=
(
data
,
config
)
=>
{
return
http
({
method
:
'POST'
,
url
:
'/workbench/
add
Back'
,
url
:
'/workbench/
get
Back'
,
data
,
config
})
...
...
src/mocp/api/my-toDo.js
0 → 100644
View file @
07e8507d
import
{
http
,
post
}
from
'mocp/utils/http'
//布置工作
export
const
getArrangeWorkListForAppApi
=
(
data
,
config
)
=>
{
return
post
({
method
:
'POST'
,
url
:
'/technical-support/getArrangeWorkListForApp'
,
data
,
config
})
}
//考核记录
export
const
getRqmListForMobileApi
=
(
data
,
config
)
=>
{
return
http
({
method
:
'POST'
,
url
:
'/RepairControl/getRqmListForMobile'
,
data
,
config
})
}
//运行决策
export
const
getDecisiongetDecisionToDoApi
=
(
data
,
config
)
=>
{
return
http
({
method
:
'POST'
,
url
:
'/workbench/getDecisiongetDecisionToDo'
,
data
,
config
})
}
//技术评估
export
const
getTechnicalEvaluationToDoApi
=
(
data
,
config
)
=>
{
return
http
({
method
:
'POST'
,
url
:
'/workbench/getTechnicalEvaluationToDo'
,
data
,
config
})
}
src/mocp/components/global-page-swiper-item/global-page-swiper-item.vue
View file @
07e8507d
...
...
@@ -51,6 +51,11 @@ const ps = defineProps({
type
:
Number
,
default
:
0
},
//列表的每一项内容是否独立
alone
:
{
type
:
Boolean
,
default
:
false
},
//tab数据搜索字段
tabValueField
:
{
type
:
String
,
...
...
@@ -132,7 +137,7 @@ const queryList = (pageIndex, pageSize) => {
params
[
'pageIndex'
]
=
pageIndex
params
[
'pageSize'
]
=
pageSize
}
if
(
ps
.
tabValue
!=
null
)
{
if
(
ps
.
tabValue
!=
null
&&
!
ps
.
alone
)
{
params
[
ps
.
tabValueField
]
=
ps
.
tabValue
}
if
(
Object
.
prototype
.
toString
.
call
(
ps
.
api
)
==
'[object Function]'
)
{
...
...
src/mocp/components/global-page-swiper/global-page-swiper.vue
View file @
07e8507d
...
...
@@ -11,20 +11,17 @@
<!-- 自定义导航栏 -->
<global-navbar
:title=
"title"
v-if=
"showNavbar"
:bgColor=
"navbgColor"
:color=
"navColor"
>
<template
#
left
v-if=
"pages.length > 1 && showNavLeft"
>
<up-icon
v-if=
"navLeftType == 'icon'"
:name=
"navLeftIcon"
size=
"16"
@
tap=
"handleLeftClick"
:color=
"navColor"
></up-icon>
<up-icon
v-if=
"navLeftType == 'icon'"
:name=
"navLeftIcon"
size=
"16"
@
tap=
"handleLeftClick"
:color=
"navColor"
></up-icon>
<view
v-if=
"navLeftType == 'text'"
class=
"cancel"
@
tap=
"handleLeftClick"
>
{{
navLeftText
}}
</view>
</
template
>
<
template
#
right
v-if=
"showNavRight"
>
<global-button
type=
"text"
size=
"small"
v-if=
"navRightType == 'text'"
@
tap=
"handleRightClick"
>
{{
navRightText
}}
</global-button>
<global-button
type=
"primary"
size=
"small"
v-if=
"navRightType == 'button'"
style=
"padding: 0 32rpx"
@
tap=
"handleRightClick"
>
<global-button
type=
"primary"
size=
"small"
v-if=
"navRightType == 'button'"
style=
"padding: 0 32rpx"
@
tap=
"handleRightClick"
>
{{
navRightText
}}
</global-button>
<global-icon
v-if=
"navRightType == 'icon'"
:icon=
"navRightIcon"
@
tap=
"handleRightClick"
></global-icon>
<global-icon
v-if=
"navRightType == 'icon'"
:icon=
"navRightIcon"
@
tap=
"handleRightClick"
></global-icon>
</
template
>
</global-navbar>
<!-- tab切换 -->
...
...
@@ -53,12 +50,13 @@
<global-page-swiper-item
:ref=
"(vc) => (pagingArr[index] = vc)"
:auto=
"auto"
:tabValue=
"tabList[current][valueKey]"
:tabIndex=
"index"
:tabValue=
"tabList[current][valueKey]"
:tabValueField=
"tabValueField"
:currentIndex=
"current"
:params=
"params"
:api=
"api"
:alone=
"alone"
:params=
"getParams"
:api=
"getApi"
:refresher-enabled=
"refresherEnabled"
:refresher-threshold=
"refresherThreshold"
:auto-show-back-to-top=
"autoShowBackToTop"
...
...
@@ -101,7 +99,7 @@
import
{
computed
,
nextTick
,
onUnmounted
,
ref
,
watch
}
from
'vue'
// 获取屏幕边界到安全区域距离
const
{
safeAreaInsets
}
=
uni
.
getSystemInfoSync
()
const
{
safeAreaInsets
}
=
uni
.
getSystemInfoSync
()
const
es
=
defineEmits
([
'handleLeftClick'
,
'handleRightClick'
,
'handleFooterClick'
,
'handleChooseData'
])
const
ps
=
defineProps
({
background
:
{
...
...
@@ -121,6 +119,11 @@ const ps = defineProps({
type
:
Boolean
,
default
:
true
},
//列表的每一项内容是否独立
alone
:
{
type
:
Boolean
,
default
:
false
},
//tab数据
tabList
:
{
type
:
Array
,
...
...
@@ -330,6 +333,22 @@ const swiperTransition = (e) => {}
const
swiperAnimationfinish
=
(
e
)
=>
{
current
.
value
=
e
.
detail
.
current
}
//获取查询参数
const
getParams
=
computed
(()
=>
{
if
(
ps
.
alone
)
{
ps
.
tabList
[
current
.
value
].
params
||
{}
}
else
{
return
ps
.
params
}
})
//获取查询接口
const
getApi
=
computed
(()
=>
{
if
(
ps
.
alone
)
{
ps
.
tabList
[
current
.
value
].
api
}
else
{
return
ps
.
api
}
})
//消息提示
const
uToastRef
=
ref
()
const
openToast
=
(
params
)
=>
{
...
...
src/mocp/components/global-page/global-page.vue
View file @
07e8507d
...
...
@@ -79,7 +79,7 @@ import { filterEmptyValues } from 'mocp/utils/tool'
import
{
computed
,
nextTick
,
onUnmounted
,
ref
,
watch
}
from
'vue'
const
dataList
=
ref
([])
const
es
=
defineEmits
([
'
q
uery'
,
'handleLeftClick'
,
'handleRightClick'
,
'handleFooterClick'
,
'handleChooseData'
])
const
es
=
defineEmits
([
'
handleQ
uery'
,
'handleLeftClick'
,
'handleRightClick'
,
'handleFooterClick'
,
'handleChooseData'
])
const
paging
=
ref
()
const
ps
=
defineProps
({
background
:
{
...
...
@@ -326,6 +326,7 @@ const queryList = (pageIndex, pageSize) => {
}
else
{
paging
.
value
?.
complete
(
data
)
}
es
(
'handleQuery'
,
{
pageIndex
,
pageSize
,
res
})
}
else
{
paging
.
value
?.
complete
(
false
)
uni
.
$mocpMessage
.
error
(
res
.
message
)
...
...
@@ -340,9 +341,11 @@ const queryList = (pageIndex, pageSize) => {
}
else
{
if
(
ps
.
localData
)
{
paging
.
value
?.
complete
(
ps
.
localData
||
[])
}
else
{
paging
.
value
?.
complete
(
true
)
}
es
(
'handleQuery'
,
{
pageIndex
,
pageSize
})
}
es
(
'query'
,
{
pageIndex
,
pageSize
})
}
//点击左边插槽
const
handleLeftClick
=
()
=>
{
...
...
src/mocp/components/global-text-status/dictData.js
View file @
07e8507d
...
...
@@ -42,3 +42,9 @@ export const md_isValid = [
{
text
:
'有效'
,
class
:
'mocp-color-success-6'
,
value
:
'1'
},
{
text
:
'无效'
,
class
:
'mocp-color-danger-6'
,
value
:
'0'
}
]
export
const
mco_feedBack
=
[
{
text
:
'进行中'
,
class
:
'mocp-color-warning-6'
,
value
:
1
},
{
text
:
'已完成'
,
class
:
'mocp-color-success-6'
,
value
:
2
},
{
text
:
'-'
,
class
:
'mocp-color-text-4'
,
value
:
''
}
]
src/mocp/store/mco.js
View file @
07e8507d
...
...
@@ -19,9 +19,8 @@ const useMcoStore = defineStore('mco', {
},
id
:
''
,
details
:
undefined
,
materialsIndex
:
-
1
,
//航材详情下标
toolsIndex
:
-
1
,
//工具详情下标
stepIndex
:
-
1
//步骤详情下标
stepIndex
:
-
1
,
//步骤详情下标
feedBackType
:
1
//反馈类型 1整体反馈 2额外反馈
}
},
getters
:
{
...
...
@@ -29,22 +28,27 @@ const useMcoStore = defineStore('mco', {
getMaterialsList
(
state
)
{
return
state
.
details
?.
materialsList
?.
materialsList
||
[]
},
getMaterialsDetails
(
state
)
{
return
this
.
getMaterialsList
[
state
.
materialsIndex
]
},
//工具列表
getToolsList
(
state
)
{
return
state
.
details
?.
toolsList
?.
materialsList
||
[]
},
getToolsDetails
(
state
)
{
return
this
.
getToolsList
[
state
.
toolsIndex
]
},
//步骤列表
getStepList
(
state
)
{
return
state
.
details
?.
mcoStepList
||
[]
},
getStepDetails
(
state
)
{
return
this
.
getStepList
[
state
.
stepIndex
]
},
getStepBackDetails
()
{
return
this
.
getStepDetails
?.
backList
||
{}
},
//获取反馈详情
getFeedBackDetails
(
state
)
{
if
(
state
.
feedBackType
==
1
)
{
return
state
.
details
?.
whole
||
{}
}
else
{
return
state
.
details
?.
extra
||
{}
}
}
},
actions
:
{
...
...
src/mocp/store/my-toDo.js
0 → 100644
View file @
07e8507d
import
{
defineStore
}
from
'pinia'
import
useUserStore
from
'mocp/store/user'
import
{
getArrangeWorkListForAppApi
,
getDecisiongetDecisionToDoApi
,
getRqmListForMobileApi
,
getTechnicalEvaluationToDoApi
}
from
'mocp/api/my-toDo'
const
useMyToDoStore
=
defineStore
(
'myToDo'
,
{
state
:
()
=>
{
return
{
assignWorkNum
:
0
,
//布置工作
appraisalRecordNum
:
0
,
//考核记录
moveDecisionNum
:
0
,
//运行决策
technologyEvaluationNum
:
0
//技术评估
}
},
getters
:
{
getTotal
(
state
)
{
const
total
=
state
.
assignWorkNum
+
state
.
appraisalRecordNum
+
state
.
moveDecisionNum
+
state
.
technologyEvaluationNum
if
(
total
>
0
)
{
if
(
total
>
99
)
{
return
'99+'
}
else
{
return
total
}
}
else
{
return
'-'
}
},
getAssignWorkNum
(
state
)
{
if
(
state
.
assignWorkNum
>
0
)
{
if
(
state
.
assignWorkNum
>
99
)
{
return
'99+'
}
else
{
return
state
.
assignWorkNum
}
}
else
{
return
'暂无待办'
}
},
getAppraisalRecordNum
(
state
)
{
if
(
state
.
appraisalRecordNum
>
0
)
{
if
(
state
.
appraisalRecordNum
>
99
)
{
return
'99+'
}
else
{
return
state
.
appraisalRecordNum
}
}
else
{
return
'暂无待办'
}
},
getMoveDecisionNum
(
state
)
{
if
(
state
.
moveDecisionNum
>
0
)
{
if
(
state
.
moveDecisionNum
>
99
)
{
return
'99+'
}
else
{
return
state
.
moveDecisionNum
}
}
else
{
return
'暂无待办'
}
},
getTechnologyEvaluationNum
(
state
)
{
if
(
state
.
technologyEvaluationNum
>
0
)
{
if
(
state
.
technologyEvaluationNum
>
99
)
{
return
'99+'
}
else
{
return
state
.
technologyEvaluationNum
}
}
else
{
return
'暂无待办'
}
}
},
actions
:
{
async
getArrangeWorkListForApp
()
{
const
userStore
=
useUserStore
()
const
res
=
await
getArrangeWorkListForAppApi
({
pageIndex
:
1
,
pageSize
:
10
,
userId
:
userStore
.
userInfo
?.
id
})
if
(
res
.
code
==
200
)
{
this
.
assignWorkNum
=
parseInt
(
res
.
data
.
total
)
||
0
}
},
async
getRqmListForMobile
()
{
const
userStore
=
useUserStore
()
const
res
=
await
getRqmListForMobileApi
({
pageIndex
:
1
,
pageSize
:
10
,
userId
:
userStore
.
userInfo
?.
id
})
if
(
res
.
code
==
200
)
{
this
.
appraisalRecordNum
=
parseInt
(
res
.
total
)
||
0
}
},
async
getDecisiongetDecisionToDo
()
{
const
res
=
await
getDecisiongetDecisionToDoApi
({
pageIndex
:
1
,
pageSize
:
10
})
if
(
res
.
code
==
200
)
{
this
.
moveDecisionNum
=
parseInt
(
res
.
data
.
total
)
||
0
}
},
async
getTechnicalEvaluationToDo
()
{
const
res
=
await
getTechnicalEvaluationToDoApi
({
pageIndex
:
1
,
pageSize
:
10
})
if
(
res
.
code
==
200
)
{
this
.
technologyEvaluationNum
=
parseInt
(
res
.
data
.
total
)
||
0
}
},
async
initData
()
{
await
Promise
.
all
([
(
this
.
getArrangeWorkListForApp
(),
this
.
getRqmListForMobile
(),
this
.
getDecisiongetDecisionToDo
(),
this
.
getTechnicalEvaluationToDo
())
])
},
setState
(...
args
)
{
this
.
$patch
({
[
args
[
0
]]:
args
[
1
]
})
}
},
// 配置持久化
persist
:
false
})
export
default
useMyToDoStore
src/mocp/store/user.js
View file @
07e8507d
import
{
defineStore
}
from
'pinia'
import
{
ref
}
from
'vue'
//默认default最多显示15个
const
menuList
=
ref
([
{
id
:
15
,
name
:
'我的跟机'
,
icon
:
'khjl'
,
group
:
'运行品质'
,
count
:
0
,
url
:
'/panel/supported-task/list'
},
{
id
:
1
,
name
:
'信息通报'
,
icon
:
'xxtb'
,
group
:
'技术支援'
,
count
:
12
,
url
:
'/panel/inforDisclosure/search'
},
{
id
:
2
,
name
:
'机队状态'
,
icon
:
'jdzt'
,
group
:
'技术支援'
,
count
:
0
,
url
:
'/panel/fleet/search'
},
{
id
:
3
,
name
:
'支援申请'
,
icon
:
'zysq'
,
group
:
'技术支援'
,
count
:
0
,
url
:
'/panel/support-application/search'
},
{
id
:
4
,
name
:
'工作指令'
,
icon
:
'gzzl'
,
group
:
'技术支援'
,
count
:
0
,
url
:
'/panel/work-assignment/search'
},
{
id
:
5
,
name
:
'技术评估'
,
icon
:
'jspg'
,
group
:
'技术支援'
,
count
:
0
,
url
:
'/panel/technology-evaluation/list'
},
{
id
:
6
,
name
:
'运行调查'
,
icon
:
'yxdc'
,
group
:
'维修控制'
,
count
:
0
},
{
id
:
7
,
name
:
'运行决策'
,
icon
:
'yxjc'
,
group
:
'维修控制'
,
count
:
0
,
url
:
'/panel/move-decision/list'
},
{
id
:
8
,
name
:
'布置工作'
,
icon
:
'bzgz'
,
group
:
'维修控制'
,
count
:
0
,
url
:
'/panel/assign-work/search'
},
{
id
:
9
,
name
:
'航站管理'
,
icon
:
'hzgl'
,
group
:
'航站管理'
,
count
:
0
},
{
id
:
10
,
name
:
'协议单位'
,
icon
:
'xydw'
,
group
:
'航站管理'
,
count
:
0
},
{
id
:
11
,
name
:
'不正常事件'
,
icon
:
'bzcsj'
,
group
:
'运行品质'
,
count
:
0
},
{
id
:
12
,
name
:
'考核记录'
,
icon
:
'khjl'
,
group
:
'运行品质'
,
count
:
0
,
url
:
'/panel/appraisal-record/list'
},
{
id
:
13
,
name
:
'AOG任务'
,
icon
:
'AOG'
,
group
:
'运行品质'
,
count
:
0
,
url
:
'/panel/aog/search'
},
{
id
:
14
,
name
:
'MCO'
,
icon
:
'MCO'
,
group
:
'运行品质'
,
count
:
0
,
url
:
'/panel/mco/search'
},
{
id
:
15
,
name
:
'航班保障'
,
icon
:
'hbbz'
,
group
:
'运行品质'
,
count
:
0
,
url
:
'/panel/flight-support/list'
}
{
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
:
true
,
count
:
0
,
url
:
'/panel/support-application/search'
},
{
id
:
4
,
name
:
'工作指令'
,
icon
:
'gzzl'
,
group
:
'技术支援'
,
default
:
true
,
count
:
0
,
url
:
'/panel/work-assignment/search'
},
{
id
:
5
,
name
:
'技术评估'
,
icon
:
'jspg'
,
group
:
'技术支援'
,
default
:
true
,
count
:
0
,
url
:
'/panel/technology-evaluation/list'
},
{
id
:
6
,
name
:
'运行调查'
,
icon
:
'yxdc'
,
group
:
'维修控制'
,
default
:
true
,
count
:
0
},
{
id
:
7
,
name
:
'运行决策'
,
icon
:
'yxjc'
,
group
:
'维修控制'
,
default
:
true
,
count
:
0
,
url
:
'/panel/move-decision/list'
},
{
id
:
8
,
name
:
'布置工作'
,
icon
:
'bzgz'
,
group
:
'维修控制'
,
default
:
true
,
count
:
0
,
url
:
'/panel/assign-work/search'
},
{
id
:
9
,
name
:
'航站管理'
,
icon
:
'hzgl'
,
group
:
'航站管理'
,
default
:
true
,
count
:
0
},
{
id
:
10
,
name
:
'协议单位'
,
icon
:
'xydw'
,
group
:
'航站管理'
,
default
:
true
,
count
:
0
},
{
id
:
11
,
name
:
'不正常事件'
,
icon
:
'bzcsj'
,
group
:
'运行品质'
,
default
:
true
,
count
:
0
},
{
id
:
12
,
name
:
'考核记录'
,
icon
:
'khjl'
,
group
:
'运行品质'
,
default
:
true
,
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'
},
{
id
:
16
,
name
:
'我的跟机'
,
icon
:
'wdgj'
,
group
:
'运行品质'
,
default
:
false
,
count
:
0
,
url
:
'/panel/supported-task/list'
}
])
const
useUserStore
=
defineStore
(
'user'
,
{
state
:
()
=>
{
return
{
token
:
''
,
userInfo
:
undefined
,
//用户信息
allMenuItem
:
{
id
:
999
,
name
:
'全部菜单'
,
icon
:
'all'
,
group
:
''
,
count
:
0
},
allMenuItem
:
{
id
:
999
,
name
:
'全部菜单'
,
icon
:
'all'
,
group
:
''
,
count
:
0
},
allHomeMenuList
:
[]
//所有登录用户的首页菜单信息
}
},
getters
:
{
//获取全部菜单
getMenuList
()
{
getMenuList
()
{
return
menuList
.
value
},
//获取分组菜单
getGroupMenuList
(
state
)
{
getGroupMenuList
(
state
)
{
return
state
.
getMenuList
.
reduce
((
groups
,
item
)
=>
{
// 如果该组不存在,则创建一个新组
if
(
!
groups
[
item
.
group
])
{
...
...
@@ -46,7 +47,7 @@ const useUserStore = defineStore('user', {
},
{})
},
//获取当前登录用户的首页菜单
getHomeMenuList
(
state
)
{
getHomeMenuList
(
state
)
{
const
homeMenuList
=
state
.
allHomeMenuList
.
find
((
item
)
=>
item
.
userId
==
state
.
userInfo
?.
id
)?.
homeMenuList
const
ids
=
[]
homeMenuList
.
forEach
((
item
)
=>
{
...
...
@@ -57,7 +58,7 @@ const useUserStore = defineStore('user', {
},
actions
:
{
//用户登录
setUserInfo
(
data
)
{
setUserInfo
(
data
)
{
this
.
token
=
data
.
token
this
.
userInfo
=
data
//加入用户首页菜单信息
...
...
@@ -65,23 +66,25 @@ const useUserStore = defineStore('user', {
//记录菜单id
this
.
allHomeMenuList
.
push
({
userId
:
this
.
userInfo
.
id
,
homeMenuList
:
this
.
getMenuList
.
map
((
item
)
=>
{
return
{
id
:
item
.
id
}
})
homeMenuList
:
this
.
getMenuList
.
filter
((
item
)
=>
item
.
default
)
.
map
((
item
)
=>
{
return
{
id
:
item
.
id
}
})
})
}
//跳转工作台
uni
.
$mocpJump
.
redirectTo
(
'/tab/index'
)
},
//退出登录
handleLogOut
()
{
handleLogOut
()
{
this
.
token
=
''
this
.
userInfo
=
undefined
//返回登录页面
uni
.
$mocpJump
.
redirectTo
(
'/login/index'
)
},
//修改用户首页菜单
changeHomeMenuList
(
menuList
)
{
changeHomeMenuList
(
menuList
)
{
const
index
=
this
.
allHomeMenuList
.
findIndex
((
item
)
=>
item
.
userId
==
this
.
userInfo
.
id
)
this
.
allHomeMenuList
[
index
].
homeMenuList
=
menuList
}
...
...
@@ -90,10 +93,10 @@ const useUserStore = defineStore('user', {
persist
:
{
// 调整为兼容多端的API
storage
:
{
setItem
(
key
,
value
)
{
setItem
(
key
,
value
)
{
uni
.
setStorageSync
(
key
,
value
)
},
getItem
(
key
)
{
getItem
(
key
)
{
return
uni
.
getStorageSync
(
key
)
}
}
...
...
src/mocp/utils/http.js
View file @
07e8507d
import
useUserStore
from
'mocp/store/user'
const
baseURL
=
'https://hna-platform.anyremote.cn'
//测试
// const baseURL = 'https://moc.hnatechnic.com/api'//生产
// const baseURL = 'https://moc.hnatechnic.com/api'
//生产
class
ServiceLoading
{
open
(
loading
)
{
...
...
src/pages.json
View file @
07e8507d
...
...
@@ -426,31 +426,25 @@
{
"path"
:
"pages/modules/mocp/panel/mco/materials-list"
,
"style"
:
{
"navigationBarTitleText"
:
"航材列表"
}
},
{
"path"
:
"pages/modules/mocp/panel/mco/materials-details"
,
"style"
:
{
"navigationBarTitleText"
:
"航材详情"
"navigationBarTitleText"
:
"航材"
}
},
{
"path"
:
"pages/modules/mocp/panel/mco/tools-list"
,
"style"
:
{
"navigationBarTitleText"
:
"工具
列表
"
"navigationBarTitleText"
:
"工具"
}
},
{
"path"
:
"pages/modules/mocp/panel/mco/
tools-details
"
,
"path"
:
"pages/modules/mocp/panel/mco/
step-back
"
,
"style"
:
{
"navigationBarTitleText"
:
"
工具
详情"
"navigationBarTitleText"
:
"
步骤
详情"
}
},
{
"path"
:
"pages/modules/mocp/panel/mco/
step
-back"
,
"path"
:
"pages/modules/mocp/panel/mco/
feed
-back"
,
"style"
:
{
"navigationBarTitleText"
:
"
步骤
详情"
"navigationBarTitleText"
:
"
反馈
详情"
}
}
],
...
...
src/pages/modules/mocp/panel/app-center/index.vue
View file @
07e8507d
...
...
@@ -68,10 +68,18 @@ const handleLeftClick = () => {
}
//保存
const
handleRightClick
=
()
=>
{
isEdit
.
value
=
false
navLeftType
.
value
=
'icon'
userStore
.
changeHomeMenuList
(
cloneDeep
(
homeMenuList
.
value
))
uni
.
$mocpMessage
.
success
(
'保存菜单成功'
)
if
(
homeMenuList
.
value
.
length
>
0
)
{
if
(
homeMenuList
.
value
.
length
>
15
)
{
uni
.
$mocpMessage
.
warning
(
'最多设置15个首页菜单'
)
}
else
{
isEdit
.
value
=
false
userStore
.
changeHomeMenuList
(
cloneDeep
(
homeMenuList
.
value
))
uni
.
$mocpMessage
.
success
(
'保存菜单成功'
)
}
}
else
{
uni
.
$mocpMessage
.
warning
(
'请设置首页菜单'
)
}
}
//编辑
const
handleChange
=
()
=>
{
...
...
src/pages/modules/mocp/panel/components/panel-navbar.vue
View file @
07e8507d
...
...
@@ -20,7 +20,7 @@
<image
class=
"list-item-image"
src=
"/static/mocp/image/panel/wddb.png"
/>
<view
class=
"list-item-msg"
>
<view
class=
"list-item-title"
>
我的待办
</view>
<view
class=
"list-item-txt"
>
24
</view>
<view
class=
"list-item-txt"
>
{{
getTotal
}}
</view>
</view>
</view>
<view
class=
"list-item-line"
></view>
...
...
@@ -28,7 +28,7 @@
<image
class=
"list-item-image"
src=
"/static/mocp/image/panel/wdxx.png"
/>
<view
class=
"list-item-msg"
>
<view
class=
"list-item-title"
>
我的消息
</view>
<view
class=
"list-item-txt"
>
24
</view>
<view
class=
"list-item-txt"
>
-
</view>
</view>
</view>
</view>
...
...
@@ -36,9 +36,11 @@
</
template
>
<
script
setup
>
import
{
ref
}
from
'vue'
import
{
onMounted
,
ref
}
from
'vue'
import
useUserStore
from
'mocp/store/user'
import
useBaseStore
from
'mocp/store/base'
import
useMyToDoStore
from
'mocp/store/my-toDo'
import
{
storeToRefs
}
from
'pinia'
const
userStore
=
useUserStore
()
const
baseStore
=
useBaseStore
()
...
...
@@ -47,6 +49,12 @@ const weatherInfo = ref()
uni
.
$on
(
'sendWeatherInfo'
,
(
info
)
=>
{
weatherInfo
.
value
=
info
})
//我的待办
const
myToDoStore
=
useMyToDoStore
()
onMounted
(()
=>
{
myToDoStore
.
initData
()
})
const
{
getTotal
}
=
storeToRefs
(
myToDoStore
)
//跳转我的待办
const
goMyToDo
=
()
=>
{
uni
.
$mocpJump
.
navigateTo
(
'/panel/my-toDo/index'
)
...
...
src/pages/modules/mocp/panel/index.vue
View file @
07e8507d
<
template
>
<global-page
:showNavbar=
"false"
>
<global-page
:showNavbar=
"false"
refresherEnabled
@
handleQuery=
"handleQuery"
>
<!-- 导航栏 -->
<template
#
top
>
<image
class=
"page-bg"
src=
"/static/mocp/image/panel/page-bg.png"
/>
...
...
@@ -13,6 +13,18 @@
<
script
setup
>
import
PanelNavbar
from
'./components/panel-navbar.vue'
import
PanelMenu
from
'./components/panel-menu.vue'
import
useMyToDoStore
from
'mocp/store/my-toDo'
//刷新我的待办个数
const
myToDoStore
=
useMyToDoStore
()
const
handleQuery
=
async
()
=>
{
uni
.
showLoading
({
title
:
'加载中'
,
mask
:
true
})
await
myToDoStore
.
initData
()
uni
.
hideLoading
()
}
</
script
>
<
style
lang=
"scss"
scoped
>
.page-bg
{
...
...
src/pages/modules/mocp/panel/mco/constants/details.scss
View file @
07e8507d
...
...
@@ -15,6 +15,18 @@
margin-top
:
16rpx
;
font-size
:
34rpx
;
}
.bottom
{
display
:
flex
;
align-items
:
center
;
.txt
{
color
:
$mocp-text-5
;
font-size
:
28rpx
;
margin-left
:
16rpx
;
&
:first-child
{
margin-left
:
0
;
}
}
}
}
&
-footer
{
display
:
flex
;
...
...
@@ -47,10 +59,13 @@
&
-body
{
border-top
:
2rpx
solid
#f4f4f4
;
border-bottom
:
2rpx
solid
#f4f4f4
;
padding
:
16rpx
0
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
padding-bottom
:
16rpx
;
&
-row
{
padding-top
:
16rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
}
}
&
-footer
{
padding-top
:
16rpx
;
...
...
@@ -69,6 +84,7 @@
.msg
{
margin-top
:
8rpx
;
font-size
:
30rpx
;
word-break
:
break-all
;
}
&
:last-child
{
margin-bottom
:
0
;
...
...
src/pages/modules/mocp/panel/mco/details.vue
View file @
07e8507d
...
...
@@ -13,11 +13,15 @@
<text
class=
"txt mocp-color-text-5"
>
{{
details
.
mcoNumber
||
'-'
}}
</text>
</view>
<view
class=
"bottom"
>
<text
class=
"txt mocp-color-text-5"
>
{{
details
.
aogNum
}}
</text>
<text
class=
"txt"
v-if=
"details.isRsc == '1'"
>
涉及RSC串件
</text>
<text
class=
"txt"
v-if=
"details.testRun == '1'"
>
试车
</text>
<text
class=
"txt"
v-if=
"details.airStop == '1'"
>
防空停
</text>
<text
class=
"txt"
v-if=
"details.inspect == '1'"
>
必检
</text>
</view>
</view>
<view
class=
"details-header-footer"
>
<view
class=
"left"
>
<global-airline-image
:code=
"details.aviation"
:width=
"30"
:height=
"30"
></global-airline-image>
<text
class=
"txt u-line-1"
v-if=
"details.machineNumber"
>
{{
details
.
machineNumber
}}
</text>
<text
class=
"txt u-line-1"
v-if=
"details.model"
>
{{
details
.
model
}}
</text>
<text
class=
"txt u-line-1"
v-if=
"details.aviation"
>
...
...
@@ -30,8 +34,17 @@
<
/view
>
<
/view
>
<
view
class
=
"details-body"
>
<
global
-
field
label
=
"ATA章节:"
:
value
=
"details.ata || '-'"
><
/global-field
>
<
global
-
field
label
=
"故障代码:"
:
value
=
"details.faultCode || '-'"
><
/global-field
>
<
view
class
=
"details-body-row"
>
<
global
-
field
label
=
"发动机型号"
:
value
=
"details.engineModel || '-'"
><
/global-field
>
<
global
-
field
label
=
"工作等级:"
:
value
=
"getParamNameByValue('WorkGrade', details.workGrade) || '-'"
><
/global-field
>
<
/view
>
<
view
class
=
"details-body-row"
>
<
global
-
field
label
=
"ATA章节:"
:
value
=
"details.ata || '-'"
><
/global-field
>
<
global
-
field
label
=
"故障代码:"
:
value
=
"details.faultCode || '-'"
><
/global-field
>
<
/view
>
<
view
class
=
"details-body-row"
>
<
global
-
field
label
=
"故障现象标签:"
:
value
=
"details.faultLabel || '-'"
><
/global-field
>
<
/view
>
<
/view
>
<
view
class
=
"details-footer"
>
<
global
-
icon
icon
=
"calendar"
color
=
"#1D2129"
><
/global-icon
>
...
...
@@ -51,6 +64,18 @@
<
global
-
card
:
title
=
"`步骤${index + 1
}
`"
v
-
for
=
"(item, index) in getStepList"
:
key
=
"item.id"
@
handleTitleClick
=
"goStepDetails(index)"
>
{{
item
.
stepContent
||
'无'
}}
<
/global-card
>
<
global
-
card
title
=
"整体反馈"
:
showContent
=
"false"
v
-
if
=
"!['1', '2'].includes(details.state)"
@
handleTitleClick
=
"goFeedBack(1)"
><
/global-card
>
<
global
-
card
title
=
"额外反馈"
:
showContent
=
"false"
v
-
if
=
"!['1', '2'].includes(details.state)"
@
handleTitleClick
=
"goFeedBack(2)"
><
/global-card
>
<
global
-
card
title
=
"航材"
titleSuffix
=
"查看详情"
:
showContent
=
"false"
@
handleTitleClick
=
"goTo('/panel/mco/materials-list')"
><
/global-card
>
<
global
-
card
title
=
"工具"
titleSuffix
=
"查看详情"
:
showContent
=
"false"
@
handleTitleClick
=
"goTo('/panel/mco/tools-list')"
><
/global-card
>
<
/template
>
...
...
@@ -74,6 +99,7 @@ onLoad(() => {
mcoStore
.
setState
(
'id'
,
query
.
id
)
mcoStore
.
getMcoDetails
()
}
)
//步骤反馈详情
const
goStepDetails
=
(
index
)
=>
{
uni
.
$mocpJump
.
navigateTo
(
'/panel/mco/step-back'
).
then
(()
=>
{
mcoStore
.
setState
(
'stepIndex'
,
index
)
...
...
@@ -82,6 +108,12 @@ const goStepDetails = (index) => {
const
goTo
=
(
url
,
params
)
=>
{
uni
.
$mocpJump
.
navigateTo
(
url
,
params
)
}
//反馈详情
const
goFeedBack
=
(
feedBackType
)
=>
{
uni
.
$mocpJump
.
navigateTo
(
'/panel/mco/feed-back'
).
then
(()
=>
{
mcoStore
.
setState
(
'feedBackType'
,
feedBackType
)
}
)
}
uni
.
$on
(
'updateDetails'
,
()
=>
{
mcoStore
.
getMcoDetails
()
}
)
...
...
src/pages/modules/mocp/panel/mco/feed-back.vue
0 → 100644
View file @
07e8507d
<
template
>
<global-page
title=
"反馈详情"
>
<template
v-if=
"getFeedBackDetails"
>
<view
class=
"mocp-cell"
>
<up-cell-group>
<up-cell
title=
"状态"
>
<template
#
value
>
<global-text-status
:value=
"getFeedBackDetails.state"
dictkey=
"mco_feedBack"
></global-text-status>
</
template
>
</up-cell>
<up-cell
title=
"工作人"
:value=
"getFeedBackDetails.staff || '-'"
></up-cell>
<up-cell
title=
"总实际工时"
:value=
"getFeedBackDetails.actualWork || '-'"
></up-cell>
<up-cell
title=
"反馈内容"
:label=
"getFeedBackDetails.content || '无'"
></up-cell>
<up-cell
title=
"附件"
>
<
template
#
label
>
<view
style=
"margin-top: 16rpx"
>
<global-upload
:fileList=
"contentFile"
:showUpload=
"false"
></global-upload>
</view>
</
template
>
</up-cell>
</up-cell-group>
</view>
</template>
</global-page>
</template>
<
script
setup
>
import
{
storeToRefs
}
from
'pinia'
import
useMcoStore
from
'mocp/store/mco'
import
{
onLoad
}
from
'@dcloudio/uni-app'
import
{
ref
}
from
'vue'
import
{
getBackApi
}
from
'mocp/api/mco'
const
mcoStore
=
useMcoStore
()
const
{
getFeedBackDetails
,
feedBackType
,
details
}
=
storeToRefs
(
mcoStore
)
//获取文件
const
contentFile
=
ref
()
const
getBack
=
async
()
=>
{
const
res
=
await
getBackApi
({
stepType
:
feedBackType
.
value
,
mcoNumber
:
details
.
value
?.
mcoNumber
},
{
loading
:
true
})
if
(
res
.
code
==
200
)
{
contentFile
.
value
=
res
.
data
[
0
].
contentFile
}
else
{
uni
.
$mocpMessage
.
error
(
res
.
message
)
}
}
onLoad
(()
=>
{
getBack
()
})
</
script
>
<
style
lang=
"scss"
scoped
>
.mocp-cell
{
background
:
#fff
;
}
</
style
>
src/pages/modules/mocp/panel/mco/materials-details.vue
deleted
100644 → 0
View file @
438127eb
<
template
>
<global-page
title=
"航材详情"
>
<view
class=
"mocp-cell"
>
<up-cell-group
v-if=
"getMaterialsDetails"
>
<up-cell
title=
"件号"
:value=
"getMaterialsDetails.pn"
></up-cell>
<up-cell
title=
"名称"
:value=
"getMaterialsDetails.name"
></up-cell>
<up-cell
title=
"属性"
:value=
"getParamNameByValue('MaterialType', getMaterialsDetails.aviationAttribute)"
></up-cell>
<up-cell
title=
"需求数量"
:value=
"getMaterialsDetails.quantity"
></up-cell>
<up-cell
title=
"是否有效"
>
<template
#
value
>
<global-text-status
:value=
"getMaterialsDetails.isValid"
dictkey=
"mocMaterial_isValid"
></global-text-status>
</
template
>
</up-cell>
<up-cell
title=
"备注"
:value=
"getMaterialsDetails.remarks"
></up-cell>
</up-cell-group>
</view>
</global-page>
</template>
<
script
setup
>
import
{
storeToRefs
}
from
'pinia'
import
useMcoStore
from
'mocp/store/mco'
import
{
getParamNameByValue
}
from
'mocp/hooks/use-params/useParams'
const
mcoStore
=
useMcoStore
()
const
{
getMaterialsDetails
}
=
storeToRefs
(
mcoStore
)
</
script
>
<
style
lang=
"scss"
scoped
>
.mocp-cell
{
background
:
#fff
;
}
</
style
>
src/pages/modules/mocp/panel/mco/materials-list.vue
View file @
07e8507d
<
template
>
<global-page
:padding=
"24"
title=
"航材列表
"
auto
:localData=
"getMaterialsList"
>
<global-page
title=
"航材
"
auto
:localData=
"getMaterialsList"
>
<template
#
default=
"
{ item, index }">
<global-card
:title=
"item.name"
titleSuffix=
"查看详情"
@
handleTitleClick=
"goTo(index)"
>
<global-text-status
:value=
"item.isValid"
dictkey=
"mocMaterial_isValid"
></global-text-status>
</global-card>
<up-collapse
:value=
"[index]"
>
<up-collapse-item
:title=
"item.name"
:name=
"index"
>
<view
class=
"mocp-cell"
>
<up-cell-group>
<up-cell
title=
"件号"
:value=
"item.pn"
></up-cell>
<up-cell
title=
"名称"
:value=
"item.name"
></up-cell>
<up-cell
title=
"属性"
:value=
"getParamNameByValue('MaterialType', item.aviationAttribute)"
></up-cell>
<up-cell
title=
"需求数量"
:value=
"item.quantity"
></up-cell>
<up-cell
title=
"是否有效"
>
<template
#
value
>
<global-text-status
:value=
"item.isValid"
dictkey=
"mocMaterial_isValid"
></global-text-status>
</
template
>
</up-cell>
<up-cell
title=
"备注"
:value=
"item.remarks"
></up-cell>
</up-cell-group>
</view>
</up-collapse-item>
</up-collapse>
</template>
</global-page>
</template>
...
...
@@ -11,13 +26,26 @@
<
script
setup
>
import
{
storeToRefs
}
from
'pinia'
import
useMcoStore
from
'mocp/store/mco'
import
{
getParamNameByValue
}
from
'mocp/hooks/use-params/useParams'
const
mcoStore
=
useMcoStore
()
const
{
getMaterialsList
}
=
storeToRefs
(
mcoStore
)
const
goTo
=
(
index
)
=>
{
uni
.
$mocpJump
.
navigateTo
(
'/panel/mco/materials-details'
).
then
(()
=>
{
mcoStore
.
setState
(
'materialsIndex'
,
index
)
})
}
</
script
>
<
style
lang=
"scss"
scoped
></
style
>
<
style
lang=
"scss"
scoped
>
.mocp-cell
{
background
:
#fff
;
}
:deep
(
.u-collapse-item
)
{
background
:
#f7f8fa
;
.u-cell__body
{
padding
:
24
rpx
!important
;
}
.u-cell__title
{
color
:
$
mocp-text-5
;
font-size
:
34
rpx
;
}
.u-collapse-item__content__text
{
padding
:
0
;
}
}
</
style
>
src/pages/modules/mocp/panel/mco/step-back.vue
View file @
07e8507d
<
template
>
<global-page
title=
"步骤详情"
:showFooterBtn=
"false"
footerBtnText=
"确认提交"
@
handleFooterClick=
"handleFooterClick"
>
<global-page
title=
"步骤详情"
>
<template
v-if=
"getStepDetails"
>
<view
class=
"mocp-cell"
>
<
!--
<view
class=
"mocp-title"
>
步骤详情
</view>
--
>
<
view
class=
"mocp-title"
>
步骤详情
</view
>
<up-cell-group>
<up-cell
title=
"MCO编号"
:value=
"getStepDetails.mcoNumber"
></up-cell>
<up-cell
title=
"创建时间"
:value=
"timeStampFormat(getStepDetails.creationTime)"
></up-cell>
...
...
@@ -10,45 +10,25 @@
<up-cell
title=
"步骤描述"
:label=
"getStepDetails.stepContent || '无'"
></up-cell>
</up-cell-group>
</view>
<view
class=
"mocp-cell"
style=
"display: none"
>
<view
class=
"mocp-cell"
>
<view
class=
"mocp-title"
>
反馈
</view>
<view
class=
"mocp-form"
>
<up-form
labelPosition=
"left"
labelWidth=
"auto"
>
<up-form-item
label=
"状态"
prop=
"state"
:borderBottom=
"true"
>
<global-picker
v-model
.
number=
"formData.state"
pickAlign=
"right"
clearable
dictkey=
"mco_stepState"
></global-picker>
</up-form-item>
<up-form-item
label=
"工作人"
:borderBottom=
"true"
>
<custom-admin-picker
pickAlign=
"right"
clearable
v-model=
"formData.staff"
valueField=
"label"
:searchValue=
"formData.staff"
></custom-admin-picker>
</up-form-item>
<up-form-item
label=
"实际工时"
:borderBottom=
"true"
>
<up-input
v-model=
"formData.stateP"
inputAlign=
"right"
border=
"none"
placeholder=
"请输入"
clearable
type=
"number"
>
<template
#
suffix
>
人数
</
template
>
</up-input>
<up-input
v-model=
"formData.stateH"
inputAlign=
"right"
border=
"none"
placeholder=
"请输入"
clearable
type=
"number"
>
<
template
#
suffix
>
小时
</
template
>
</up-input>
</up-form-item>
<up-form-item
label=
"反馈内容"
:borderBottom=
"true"
labelPosition=
"top"
>
<up-textarea
placeholder=
"请输入"
:height=
"40"
border=
"none"
v-model=
"formData.content"
></up-textarea>
</up-form-item>
<up-form-item
label=
"附件"
:borderBottom=
"true"
labelPosition=
"top"
>
<view
style=
"margin-top: 24rpx"
>
<global-upload
:fileList=
"getStepDetails.backList?.contentFile || ''"
v-model=
"formData.contentFile"
mapFieldName=
"id"
:multiple=
"false"
></global-upload>
<up-cell-group>
<up-cell
title=
"状态"
>
<template
#
value
>
<global-text-status
:value=
"getStepBackDetails.state"
dictkey=
"mco_feedBack"
></global-text-status>
</
template
>
</up-cell>
<up-cell
title=
"工作人"
:value=
"getStepBackDetails.staff || '-'"
></up-cell>
<up-cell
title=
"实际工时"
:value=
"getStepBackDetails.actualWork || '-'"
></up-cell>
<up-cell
title=
"反馈内容"
:label=
"getStepBackDetails.content || '无'"
></up-cell>
<up-cell
title=
"附件"
>
<
template
#
label
>
<view
style=
"margin-top: 16rpx"
>
<global-upload
:fileList=
"getStepBackDetails.contentFile"
:showUpload=
"false"
></global-upload>
</view>
</
up-form-item
>
</up-
form
>
</
view
>
</
template
>
</up-
cell
>
</
up-cell-group
>
</view>
</template>
</global-page>
...
...
@@ -58,62 +38,9 @@
import
{
storeToRefs
}
from
'pinia'
import
useMcoStore
from
'mocp/store/mco'
import
{
timeStampFormat
}
from
'mocp/utils/tool'
import
{
reactive
}
from
'vue'
import
{
onLoad
}
from
'@dcloudio/uni-app'
import
{
addBackApi
}
from
'mocp/api/mco'
const
mcoStore
=
useMcoStore
()
const
{
getStepDetails
}
=
storeToRefs
(
mcoStore
)
const
formData
=
reactive
({
state
:
''
,
staff
:
''
,
stateP
:
''
,
stateH
:
''
,
content
:
''
,
contentFile
:
''
})
onLoad
(()
=>
{
const
details
=
getStepDetails
.
value
?.
backList
||
{}
formData
.
state
=
details
.
state
formData
.
staff
=
details
.
staff
formData
.
stateP
=
details
.
actualWork
?.
split
(
'X'
)[
0
]
formData
.
stateH
=
details
.
actualWork
?.
split
(
'X'
)[
1
]
formData
.
content
=
details
.
content
})
//提交
const
handleFooterClick
=
async
()
=>
{
const
params
=
{}
params
.
id
=
getStepDetails
.
value
.
id
if
(
getStepDetails
.
value
?.
backList
?.
id
)
{
params
.
isAdd
=
2
}
else
{
params
.
isAdd
=
1
}
if
(
formData
.
state
)
{
params
.
state
=
formData
.
state
}
if
(
formData
.
staff
)
{
params
.
staff
=
formData
.
staff
}
if
(
formData
.
stateP
&&
formData
.
stateH
)
{
params
.
stateType
=
formData
.
stateP
+
'X'
+
formData
.
stateH
}
if
(
formData
.
content
)
{
params
.
content
=
formData
.
content
}
if
(
formData
.
contentFile
)
{
params
.
contentFile
=
formData
.
contentFile
}
const
res
=
await
addBackApi
(
params
,
{
loading
:
true
})
if
(
res
.
code
==
200
)
{
uni
.
$mocpJump
.
navigateBack
()
uni
.
$mocpMessage
.
success
(
res
.
message
)
//更新详情
uni
.
$emit
(
'updateDetails'
)
}
else
{
uni
.
$mocpMessage
.
error
(
res
.
message
)
}
}
const
{
getStepDetails
,
getStepBackDetails
}
=
storeToRefs
(
mcoStore
)
</
script
>
<
style
lang=
"scss"
scoped
>
.mocp-cell
{
...
...
src/pages/modules/mocp/panel/mco/tools-details.vue
deleted
100644 → 0
View file @
438127eb
<
template
>
<global-page
title=
"工具详情"
>
<view
class=
"mocp-cell"
>
<up-cell-group
v-if=
"getToolsDetails"
>
<up-cell
title=
"件号"
:value=
"getToolsDetails.pn"
></up-cell>
<up-cell
title=
"名称"
:value=
"getToolsDetails.name"
></up-cell>
<up-cell
title=
"类型"
:value=
"getParamNameByValue('MaterialType', getToolsDetails.aviationAttribute)"
></up-cell>
<up-cell
title=
"需求数量"
:value=
"getToolsDetails.quantity"
></up-cell>
<up-cell
title=
"是否有效"
>
<template
#
value
>
<global-text-status
:value=
"getToolsDetails.isValid"
dictkey=
"mocMaterial_isValid"
></global-text-status>
</
template
>
</up-cell>
<up-cell
title=
"备注"
:value=
"getToolsDetails.remarks"
></up-cell>
</up-cell-group>
</view>
</global-page>
</template>
<
script
setup
>
import
{
storeToRefs
}
from
'pinia'
import
useMcoStore
from
'mocp/store/mco'
import
{
getParamNameByValue
}
from
'mocp/hooks/use-params/useParams'
const
mcoStore
=
useMcoStore
()
const
{
getToolsDetails
}
=
storeToRefs
(
mcoStore
)
</
script
>
<
style
lang=
"scss"
scoped
>
.mocp-cell
{
background
:
#fff
;
}
</
style
>
src/pages/modules/mocp/panel/mco/tools-list.vue
View file @
07e8507d
<
template
>
<global-page
:padding=
"24"
title=
"工具
列表
"
auto
:localData=
"getToolsList"
>
<global-page
:padding=
"24"
title=
"工具"
auto
:localData=
"getToolsList"
>
<template
#
default=
"
{ item, index }">
<global-card
:title=
"item.name"
titleSuffix=
"查看详情"
@
handleTitleClick=
"goTo(index)"
>
<global-text-status
:value=
"item.isValid"
dictkey=
"mocMaterial_isValid"
></global-text-status>
</global-card>
<up-collapse
:value=
"[index]"
>
<up-collapse-item
:title=
"item.name"
:name=
"index"
>
<view
class=
"mocp-cell"
>
<up-cell-group>
<up-cell
title=
"件号"
:value=
"item.pn"
></up-cell>
<up-cell
title=
"名称"
:value=
"item.name"
></up-cell>
<up-cell
title=
"类型"
:value=
"getParamNameByValue('MaterialType', item.aviationAttribute)"
></up-cell>
<up-cell
title=
"需求数量"
:value=
"item.quantity"
></up-cell>
<up-cell
title=
"是否有效"
>
<template
#
value
>
<global-text-status
:value=
"item.isValid"
dictkey=
"mocMaterial_isValid"
></global-text-status>
</
template
>
</up-cell>
<up-cell
title=
"备注"
:value=
"item.remarks"
></up-cell>
</up-cell-group>
</view>
</up-collapse-item>
</up-collapse>
</template>
</global-page>
</template>
...
...
@@ -14,10 +29,22 @@ import useMcoStore from 'mocp/store/mco'
const
mcoStore
=
useMcoStore
()
const
{
getToolsList
}
=
storeToRefs
(
mcoStore
)
const
goTo
=
(
index
)
=>
{
uni
.
$mocpJump
.
navigateTo
(
'/panel/mco/tools-details'
).
then
(()
=>
{
mcoStore
.
setState
(
'toolsIndex'
,
index
)
})
}
</
script
>
<
style
lang=
"scss"
scoped
></
style
>
<
style
lang=
"scss"
scoped
>
.mocp-cell
{
background
:
#fff
;
}
:deep
(
.u-collapse-item
)
{
background
:
#f7f8fa
;
.u-cell__body
{
padding
:
24
rpx
!important
;
}
.u-cell__title
{
color
:
$
mocp-text-5
;
font-size
:
34
rpx
;
}
.u-collapse-item__content__text
{
padding
:
0
;
}
}
</
style
>
src/pages/modules/mocp/panel/my-toDo/components/appraisal-record-list.vue
View file @
07e8507d
<
template
>
<up-collapse-item
title=
"考核记录(2)
"
>
<up-collapse-item
:title=
"`考核记录($
{getAppraisalRecordNum})`
">
<global-page
:fixed=
"false"
:height=
"height"
...
...
@@ -8,7 +8,11 @@
isDataList
refresherEnabled
loadingMoreEnabled
:api=
"getRqmListApi"
:params=
"
{
userId: userStore.userInfo?.id
}"
:api="getRqmListForMobileApi"
@handleQuery="handleQuery"
auto
>
<template
#
default=
"
{ item }">
...
...
@@ -31,8 +35,14 @@
</template>
<
script
setup
>
import
{
getRqmListApi
}
from
'mocp/api/appraisal-record'
import
{
getRqmListForMobileApi
}
from
'mocp/api/my-toDo'
import
useUserStore
from
'mocp/store/user'
import
useMyToDoStore
from
'mocp/store/my-toDo'
import
{
storeToRefs
}
from
'pinia'
const
userStore
=
useUserStore
()
const
myToDoStore
=
useMyToDoStore
()
const
{
getAppraisalRecordNum
}
=
storeToRefs
(
myToDoStore
)
const
ps
=
defineProps
({
height
:
{
type
:
String
,
...
...
@@ -45,5 +55,8 @@ const goDetails = (data) => {
id
:
data
.
id
})
}
const
handleQuery
=
({
res
})
=>
{
myToDoStore
.
setState
(
'appraisalRecordNum'
,
parseInt
(
res
.
total
)
||
0
)
}
</
script
>
<
style
lang=
"scss"
scoped
></
style
>
src/pages/modules/mocp/panel/my-toDo/components/assign-work-list.vue
View file @
07e8507d
<
template
>
<up-collapse-item
title=
"布置工作(2)
"
>
<up-collapse-item
:title=
"`布置工作($
{getAssignWorkNum})`
">
<global-page
:fixed=
"false"
:height=
"height"
...
...
@@ -8,7 +8,11 @@
isDataList
refresherEnabled
loadingMoreEnabled
:api=
"getArrangeWorkListApi"
:params=
"
{
userId: userStore.userInfo?.id
}"
:api="getArrangeWorkListForAppApi"
@handleQuery="handleQuery"
auto
>
<template
#
default=
"
{ item }">
...
...
@@ -45,18 +49,26 @@
<
script
setup
>
import
{
timeStampFormat
}
from
'mocp/utils/tool'
import
{
getArrangeWorkListApi
}
from
'mocp/api/assign-work'
import
{
getParamNameByValue
}
from
'mocp/hooks/use-params/useParams'
import
{
getArrangeWorkListForAppApi
}
from
'mocp/api/my-toDo'
import
useUserStore
from
'mocp/store/user'
import
useMyToDoStore
from
'mocp/store/my-toDo'
import
{
storeToRefs
}
from
'pinia'
const
userStore
=
useUserStore
()
const
myToDoStore
=
useMyToDoStore
()
const
{
getAssignWorkNum
}
=
storeToRefs
(
myToDoStore
)
const
ps
=
defineProps
({
height
:
{
type
:
String
,
default
:
''
}
}
)
const
goDetails
=
(
data
)
=>
{
uni
.
$mocpJump
.
navigateTo
(
'/panel/assign-work/details'
,
{
id
:
data
.
id
}
)
}
const
handleQuery
=
({
res
}
)
=>
{
myToDoStore
.
setState
(
'assignWorkNum'
,
parseInt
(
res
.
data
.
total
)
||
0
)
}
<
/script
>
<
style
lang
=
"scss"
scoped
><
/style
>
src/pages/modules/mocp/panel/my-toDo/components/move-decision-list.vue
View file @
07e8507d
<
template
>
<up-collapse-item
title=
"运行决策(2)
"
>
<up-collapse-item
:title=
"`运行决策($
{getMoveDecisionNum})`
">
<global-page
:fixed=
"false"
:height=
"height"
...
...
@@ -8,7 +8,8 @@
isDataList
refresherEnabled
loadingMoreEnabled
:api=
"getDecisionApi"
:api=
"getDecisiongetDecisionToDoApi"
@
handleQuery=
"handleQuery"
auto
>
<template
#
default=
"
{ item }">
...
...
@@ -42,20 +43,28 @@
<
script
setup
>
import
{
timeStampFormat
}
from
'mocp/utils/tool'
import
{
useGetDictByValue
}
from
'mocp/hooks/use-dict/useDict'
import
{
getDecisionApi
}
from
'mocp/api/move-decision'
import
useMoveDecisionStore
from
'mocp/store/move-decision'
import
{
getDecisiongetDecisionToDoApi
}
from
'mocp/api/my-toDo'
import
useMyToDoStore
from
'mocp/store/my-toDo'
import
{
storeToRefs
}
from
'pinia'
const
myToDoStore
=
useMyToDoStore
()
const
{
getMoveDecisionNum
}
=
storeToRefs
(
myToDoStore
)
const
ps
=
defineProps
({
height
:
{
type
:
String
,
default
:
''
}
}
)
//跳转
const
moveDecisionStore
=
useMoveDecisionStore
()
const
goDetails
=
(
data
)
=>
{
uni
.
$mocpJump
.
navigateTo
(
'/panel/move-decision/details'
,
{
id
:
data
.
id
}
).
then
(()
=>
{
moveDecisionStore
.
setState
(
'details'
,
data
)
}
)
}
const
handleQuery
=
({
res
}
)
=>
{
myToDoStore
.
setState
(
'moveDecisionNum'
,
parseInt
(
res
.
data
.
total
)
||
0
)
}
<
/script
>
<
style
lang
=
"scss"
scoped
><
/style
>
src/pages/modules/mocp/panel/my-toDo/components/technology-evaluation-list.vue
View file @
07e8507d
<
template
>
<up-collapse-item
title=
"技术评估(2)
"
>
<up-collapse-item
:title=
"`技术评估($
{getTechnologyEvaluationNum})`
">
<global-page
:fixed=
"false"
:height=
"height"
...
...
@@ -8,7 +8,8 @@
isDataList
refresherEnabled
loadingMoreEnabled
:api=
"getTechnicalEvaluationApi"
:api=
"getTechnicalEvaluationToDoApi"
@
handleQuery=
"handleQuery"
auto
>
<template
#
default=
"
{ item }">
...
...
@@ -46,8 +47,13 @@
import
useBaseStore
from
'mocp/store/base'
import
{
useGetDictByValue
}
from
'mocp/hooks/use-dict/useDict'
import
Day
from
'mocp/utils/dayjs'
import
{
getTechnicalEvaluationApi
}
from
'mocp/api/technology-evaluation'
import
useTechnologyEvaluationStore
from
'mocp/store/technology-evaluation'
import
{
getTechnicalEvaluationToDoApi
}
from
'mocp/api/my-toDo'
import
useMyToDoStore
from
'mocp/store/my-toDo'
import
{
storeToRefs
}
from
'pinia'
const
myToDoStore
=
useMyToDoStore
()
const
{
getTechnologyEvaluationNum
}
=
storeToRefs
(
myToDoStore
)
const
baseStore
=
useBaseStore
()
const
ps
=
defineProps
({
...
...
@@ -56,11 +62,15 @@ const ps = defineProps({
default
:
''
}
}
)
//跳转
const
technologyEvaluationStore
=
useTechnologyEvaluationStore
()
const
goDetails
=
(
data
)
=>
{
uni
.
$mocpJump
.
navigateTo
(
'/panel/technology-evaluation/details'
,
{
id
:
data
.
id
}
).
then
(()
=>
{
technologyEvaluationStore
.
setState
(
'details'
,
data
)
}
)
}
const
handleQuery
=
({
res
}
)
=>
{
myToDoStore
.
setState
(
'technologyEvaluationNum'
,
parseInt
(
res
.
data
.
total
)
||
0
)
}
<
/script
>
<
style
lang
=
"scss"
scoped
><
/style
>
src/pages/modules/mocp/panel/technology-evaluation/details.vue
View file @
07e8507d
...
...
@@ -15,7 +15,7 @@
</view>
</view>
<up-collapse
:value=
"getDefaultCollapse"
>
<up-collapse-item
title=
"客户管控技术支援工程师完成初始评估"
name=
"updat-technology"
>
<up-collapse-item
title=
"客户管控技术支援工程师完成初始评估"
name=
"updat
e
-technology"
>
<view
class=
"details-body"
>
<view
class=
"details-body-list"
>
<view
class=
"details-body-item"
>
...
...
@@ -205,7 +205,6 @@ import useTechnologyEvaluationStore from 'mocp/store/technology-evaluation'
import
{
storeToRefs
}
from
'pinia'
import
useBaseStore
from
'mocp/store/base'
import
{
useGetDictByValue
}
from
'mocp/hooks/use-dict/useDict'
import
{
timeStampFormat
}
from
'mocp/utils/tool'
import
{
computed
}
from
'vue'
import
{
getParamNameByValue
}
from
'mocp/hooks/use-params/useParams'
...
...
@@ -214,7 +213,7 @@ const { details } = storeToRefs(technologyEvaluationStore)
const
baseStore
=
useBaseStore
()
//获取默认展开项
const
getDefaultCollapse
=
computed
(()
=>
{
const
defaultCollapse
=
[
'updat-technology'
]
const
defaultCollapse
=
[
'updat
e
-technology'
]
if
(
details
.
value
?.
estimateTime
)
{
defaultCollapse
.
push
(
'add-engineering'
)
}
...
...
src/static/mocp/css/list.scss
View file @
07e8507d
...
...
@@ -47,6 +47,7 @@
font-size
:
30rpx
;
color
:
$mocp-text-4
;
line-height
:
40rpx
;
word-break
:
break-all
;
}
&
-footer
{
display
:
flex
;
...
...
src/static/mocp/image/panel/wdgj.png
0 → 100644
View file @
07e8507d
1.83 KB
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