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
e06a6419
Commit
e06a6419
authored
Sep 18, 2024
by
pangchong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 航站不正常事件
parent
5be06937
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
390 additions
and
16 deletions
+390
-16
src/mocp/api/abnormalEventManage.js
+16
-0
src/mocp/components/global-text-status/dictData.js
+4
-0
src/mocp/hooks/use-dict/dict-data/abnormalEventManage.js
+9
-0
src/mocp/store/abnormalEventManage.js
+1
-11
src/mocp/store/user.js
+2
-2
src/pages.json
+13
-1
src/pages/modules/mocp/panel/abnormalEventManage/constants/edit.compositions.js
+143
-0
src/pages/modules/mocp/panel/abnormalEventManage/constants/edit.functionals.js
+52
-0
src/pages/modules/mocp/panel/abnormalEventManage/details.vue
+146
-0
src/pages/modules/mocp/panel/abnormalEventManage/edit.vue
+0
-0
src/pages/modules/mocp/panel/abnormalEventManage/list.vue
+4
-2
No files found.
src/mocp/api/abnormalEventManage.js
View file @
e06a6419
...
...
@@ -8,3 +8,19 @@ export const getAdverseEventsListApi = (data, config) => {
config
})
}
export
const
updateAdverseEventsApi
=
(
data
,
config
)
=>
{
return
http
({
method
:
'POST'
,
url
:
'/technical-support/updateAdverseEvents'
,
data
,
config
})
}
export
const
reviewedAdverseEventsApi
=
(
data
,
config
)
=>
{
return
http
({
method
:
'POST'
,
url
:
'/technical-support/reviewedAdverseEvents'
,
data
,
config
})
}
src/mocp/components/global-text-status/dictData.js
View file @
e06a6419
...
...
@@ -48,6 +48,10 @@ export const mco_feedBack = [
{
text
:
'已完成'
,
class
:
'mocp-color-success-6'
,
value
:
2
},
{
text
:
'-'
,
class
:
'mocp-color-text-4'
,
value
:
''
}
]
export
const
aem_state
=
[
{
text
:
'OPEN'
,
class
:
'mocp-color-primary-6'
,
value
:
0
},
{
text
:
'CLOSE'
,
class
:
'mocp-color-text-3'
,
value
:
2
}
]
export
const
aem_auditListSelect
=
[
{
text
:
'未提交审核'
,
class
:
'mocp-color-text-3'
,
value
:
'1'
},
{
text
:
'已提交审核'
,
class
:
'mocp-color-warning-6'
,
value
:
'2'
},
...
...
src/mocp/hooks/use-dict/dict-data/abnormalEventManage.js
View file @
e06a6419
...
...
@@ -14,8 +14,17 @@ export const aem_surveyListSelect = [
{
label
:
'已反馈'
,
value
:
1
},
{
label
:
'不涉及'
,
value
:
2
}
]
export
const
aem_surveyListSelect2
=
[
{
label
:
'否'
,
value
:
'0'
},
{
label
:
'是'
,
value
:
'1'
},
{
label
:
'不涉及'
,
value
:
'2'
}
]
export
const
aem_completeListSelect
=
[
{
label
:
'未完成'
,
value
:
0
},
{
label
:
'已完成'
,
value
:
1
},
{
label
:
'不涉及'
,
value
:
2
}
]
export
const
aem_yesOrNoRadio
=
[
{
label
:
'是'
,
value
:
'1'
},
{
label
:
'否'
,
value
:
'0'
}
]
src/mocp/store/abnormalEventManage.js
View file @
e06a6419
...
...
@@ -54,16 +54,6 @@ const useAbnormalEventManageStore = defineStore('abnormalEventManage', {
}
},
// 配置持久化
persist
:
{
// 调整为兼容多端的API
storage
:
{
setItem
(
key
,
value
)
{
uni
.
setStorageSync
(
key
,
value
)
},
getItem
(
key
)
{
return
uni
.
getStorageSync
(
key
)
}
}
}
persist
:
false
})
export
default
useAbnormalEventManageStore
src/mocp/store/user.js
View file @
e06a6419
...
...
@@ -10,11 +10,11 @@ const menuList = ref([
{
id
:
'wdgj'
,
name
:
'我的跟机'
,
icon
:
'wdgj'
,
group
:
'生产保障'
,
default
:
true
,
count
:
0
,
url
:
'/panel/supported-task/list'
},
{
id
:
'sfd'
,
name
:
'收费单'
,
icon
:
'sfd'
,
group
:
'生产保障'
,
default
:
true
,
count
:
0
,
url
:
'/panel/electronicBill/list'
},
// 维修控制
{
id
:
'bzcsj'
,
name
:
'不正常事件'
,
icon
:
'bzcsj'
,
group
:
'维修控制'
,
default
:
false
,
count
:
0
},
{
id
:
'bzcsj'
,
name
:
'不正常事件'
,
icon
:
'bzcsj'
,
group
:
'维修控制'
,
default
:
false
,
count
:
0
,
url
:
'/panel/abnormalEventManage/list'
},
{
id
:
'yxdc'
,
name
:
'运行调查'
,
icon
:
'yxdc'
,
group
:
'维修控制'
,
default
:
false
,
count
:
0
},
{
id
:
'yxjc'
,
name
:
'运行决策'
,
icon
:
'yxjc'
,
group
:
'维修控制'
,
default
:
false
,
count
:
0
,
url
:
'/panel/move-decision/list'
},
{
id
:
'bzgz'
,
name
:
'布置工作'
,
icon
:
'bzgz'
,
group
:
'维修控制'
,
default
:
false
,
count
:
0
,
url
:
'/panel/assign-work/search'
},
{
id
:
'jxyw'
,
name
:
'机械延误'
,
icon
:
'jxyw'
,
group
:
'维修控制'
,
default
:
false
,
count
:
0
,
url
:
'/panel/abnormalEventManage/list'
},
{
id
:
'jxyw'
,
name
:
'机械延误'
,
icon
:
'jxyw'
,
group
:
'维修控制'
,
default
:
false
,
count
:
0
},
{
id
:
'ffh'
,
name
:
'防风害'
,
icon
:
'ffh'
,
group
:
'维修控制'
,
default
:
false
,
count
:
0
},
// 技术支援
{
id
:
'jdzt'
,
name
:
'机队状态'
,
icon
:
'jdzt'
,
group
:
'技术支援'
,
default
:
true
,
count
:
0
,
url
:
'/panel/fleet/search'
},
...
...
src/pages.json
View file @
e06a6419
...
...
@@ -522,7 +522,7 @@
{
"path"
:
"pages/modules/mocp/panel/abnormalEventManage/list"
,
"style"
:
{
"navigationBarTitleText"
:
"
机械延误
"
"navigationBarTitleText"
:
"
航站不正常事件
"
}
},
{
...
...
@@ -530,6 +530,18 @@
"style"
:
{
"navigationBarTitleText"
:
"筛选"
}
},
{
"path"
:
"pages/modules/mocp/panel/abnormalEventManage/details"
,
"style"
:
{
"navigationBarTitleText"
:
"航站不正常事件详情"
}
},
{
"path"
:
"pages/modules/mocp/panel/abnormalEventManage/edit"
,
"style"
:
{
"navigationBarTitleText"
:
"编辑航站不正常事件"
}
}
],
"globalStyle"
:
{
...
...
src/pages/modules/mocp/panel/abnormalEventManage/constants/edit.compositions.js
0 → 100644
View file @
e06a6419
import
{
reactive
,
ref
}
from
'vue'
export
const
formData
=
reactive
({
source
:
''
,
terminalCode
:
''
,
repairUnit
:
''
,
personLiable
:
''
,
machineNumber
:
''
,
model
:
''
,
aviation
:
''
,
eventDescription
:
''
,
problemPoints
:
''
,
category
:
''
,
pointsDeduction
:
null
,
occurrenceTime
:
null
,
surveyUnit
:
''
,
eventProperty
:
''
,
remake
:
''
,
survey
:
''
,
surveyAtta
:
''
,
surveyAttaFileVoList
:
[],
surveyTimeLimit
:
null
,
surveyFeedback
:
''
,
correctiveComplete
:
''
,
correctiveAtta
:
''
,
correctiveAttaFileVoList
:
[],
correctiveTimeLimit
:
null
,
correctiveComplete
:
''
,
correctiveMeasures
:
''
,
delay
:
''
})
export
const
rules
=
reactive
({
terminalCode
:
[
{
required
:
true
,
message
:
'请选择航站'
,
trigger
:
[
'blur'
,
'change'
]
}
],
repairUnitId
:
[
{
required
:
true
,
message
:
'请选择责任单位'
,
trigger
:
[
'blur'
,
'change'
]
}
],
source
:
[
{
required
:
true
,
message
:
'请选择事件来源'
,
trigger
:
[
'blur'
,
'change'
]
}
],
personLiable
:
[
{
required
:
true
,
message
:
'请填写责任人'
,
trigger
:
[
'blur'
,
'change'
]
}
],
machineNumber
:
[
{
required
:
true
,
message
:
'请选择机号'
,
trigger
:
[
'blur'
,
'change'
]
}
],
eventDescription
:
[
{
required
:
true
,
message
:
'请选择事件描述'
,
trigger
:
[
'blur'
,
'change'
]
}
],
problemPoints
:
[
{
required
:
true
,
message
:
'请填写问题点'
,
trigger
:
[
'blur'
,
'change'
]
}
],
category
:
[
{
required
:
true
,
message
:
'请选择类别'
,
trigger
:
[
'blur'
,
'change'
]
}
],
pointsDeduction
:
[
{
type
:
'number'
,
required
:
true
,
message
:
'请填写扣分情况(请填写负数,例如-10)'
,
trigger
:
[
'blur'
,
'change'
]
}
],
occurrenceTime
:
[
{
type
:
'number'
,
required
:
true
,
message
:
'请选择接报日期'
,
trigger
:
[
'blur'
,
'change'
]
}
],
surveyUnit
:
[
{
required
:
true
,
message
:
'请填写调查单位'
,
trigger
:
[
'blur'
,
'change'
]
}
],
survey
:
[
{
required
:
true
,
message
:
'请选择调查反馈'
,
trigger
:
[
'blur'
,
'change'
]
}
],
correctiveComplete
:
[
{
required
:
true
,
message
:
'请选择完成整改'
,
trigger
:
[
'blur'
,
'change'
]
}
],
eventProperty
:
[
{
required
:
true
,
message
:
'请选择事件性质'
,
trigger
:
[
'blur'
,
'change'
]
}
],
delay
:
[
{
required
:
true
,
message
:
'请选择是否延误'
,
trigger
:
[
'blur'
,
'change'
]
}
]
})
export
const
formRef
=
ref
()
export
const
surveyAttaFileVoList
=
ref
([])
export
const
correctiveAttaFileVoList
=
ref
([])
src/pages/modules/mocp/panel/abnormalEventManage/constants/edit.functionals.js
0 → 100644
View file @
e06a6419
import
{
getAcReduceListApi
}
from
'mocp/api/system'
import
{
correctiveAttaFileVoList
,
formData
,
surveyAttaFileVoList
}
from
'./edit.compositions'
//切换机号
export
const
changeAc
=
async
()
=>
{
const
res
=
await
getAcReduceListApi
({
ac
:
formData
.
machineNumber
},
{
loading
:
true
})
if
(
res
.
code
==
200
)
{
formData
.
model
=
res
.
data
[
0
]?.
zstortgc
formData
.
aviation
=
res
.
data
[
0
]?.
zop3
}
else
{
uni
.
$mocpMessage
.
error
(
res
.
message
)
}
}
export
const
getSurveyAttaFileVoList
=
(
value
)
=>
{
surveyAttaFileVoList
.
value
=
value
}
export
const
getCorrectiveAtta
=
(
value
)
=>
{
correctiveAttaFileVoList
.
value
=
value
}
export
const
resetData
=
()
=>
{
surveyAttaFileVoList
.
value
=
[]
correctiveAttaFileVoList
.
value
=
[]
Object
.
assign
(
formData
,
{
source
:
''
,
terminalCode
:
''
,
repairUnit
:
''
,
personLiable
:
''
,
machineNumber
:
''
,
model
:
''
,
aviation
:
''
,
eventDescription
:
''
,
problemPoints
:
''
,
category
:
''
,
pointsDeduction
:
null
,
occurrenceTime
:
null
,
surveyUnit
:
''
,
eventProperty
:
''
,
remake
:
''
,
survey
:
''
,
surveyAtta
:
''
,
surveyAttaFileVoList
:
[],
surveyTimeLimit
:
null
,
surveyFeedback
:
''
,
correctiveComplete
:
''
,
correctiveAtta
:
''
,
correctiveAttaFileVoList
:
[],
correctiveTimeLimit
:
null
,
correctiveComplete
:
''
,
correctiveMeasures
:
''
,
delay
:
''
})
}
src/pages/modules/mocp/panel/abnormalEventManage/details.vue
0 → 100644
View file @
e06a6419
<
template
>
<global-page
:padding=
"24"
title=
"航站不正常事件详情"
showFooterBtn
:footerBtnText=
"getFooterTxt"
@
handleFooterClick=
"handleFooterClick"
:showNavRight=
"auditLabel != '审核通过'"
@
handleRightClick=
"navigateTo('/panel/abnormalEventManage/edit')"
>
<view
class=
"mocp-cell"
v-if=
"details"
>
<up-cell-group>
<up-cell
title=
"状态"
>
<template
#
value
>
<global-text-status
:value=
"details.state"
dictkey=
"aem_state"
></global-text-status>
</
template
>
</up-cell>
<up-cell
title=
"事件来源"
:value=
"getParamNameByValue('EventResource', details.source)"
/>
<up-cell
title=
"航站"
:value=
"details.terminal || '-'"
/>
<up-cell
title=
"责任单位"
:value=
"details.repairUnit || '-'"
/>
<up-cell
title=
"责任人"
:value=
"details.personLiable || '-'"
/>
<up-cell
title=
"机号"
:value=
"details.machineNumber || '-'"
/>
<up-cell
title=
"机型"
:value=
"details.model || '-'"
/>
<up-cell
title=
"航司"
:value=
"useGetDictByValue('', details.aviation, { data: baseStore.getAirlineSelect })"
/>
<up-cell
title=
"事件描述"
:value=
"details.eventDescription || '-'"
/>
<up-cell
title=
"问题点"
:value=
"details.problemPoints || '-'"
/>
<up-cell
title=
"类别"
:value=
"getParamNameByValue('EventCategory', details.category)"
/>
<up-cell
title=
"扣分情况"
:value=
"details.pointsDeduction || '-'"
/>
<up-cell
title=
"接报日期"
:value=
"timeStampFormat(details.occurrenceTime, { format: 'YYYY/MM/DD' }) || '-'"
/>
<up-cell
title=
"调查单位"
:value=
"details.surveyUnit || '-'"
/>
<up-cell
title=
"事件性质"
:value=
"getParamNameByValue('EventProperty', details.source)"
/>
<up-cell
title=
"备注"
:value=
"details.remake || '-'"
/>
<up-cell
title=
"调查已反馈"
:value=
"useGetDictByValue('aem_surveyListSelect2', details.survey)"
/>
<up-cell
title=
"附件"
>
<
template
#
label
>
<view
style=
"margin-top: 16rpx"
>
<global-upload
:fileList=
"details.surveyAttaFileVoList"
:showUpload=
"false"
></global-upload>
</view>
</
template
>
</up-cell>
<up-cell
title=
"调查完成时限"
v-if=
"!(details.survey && details.survey == '2')"
:value=
"timeStampFormat(details.surveyTimeLimit, { format: 'YYYY/MM/DD' }) || '-'"
/>
<up-cell
title=
"调查结果简述"
v-if=
"!(details.survey && details.survey == '2')"
:value=
"details.surveyFeedback || '-'"
/>
<up-cell
title=
"完成整改"
:value=
"useGetDictByValue('aem_surveyListSelect2', details.correctiveComplete)"
/>
<up-cell
title=
"附件"
>
<
template
#
label
>
<view
style=
"margin-top: 16rpx"
>
<global-upload
:fileList=
"details.correctiveAttaFileVoList"
:showUpload=
"false"
></global-upload>
</view>
</
template
>
</up-cell>
<up-cell
title=
"整改完成时限"
v-if=
"!(details.correctiveComplete && details.correctiveComplete == '2')"
:value=
"timeStampFormat(details.correctiveTimeLimit, { format: 'YYYY/MM/DD' }) || '-'"
/>
<up-cell
title=
"整改措施"
:value=
"details.correctiveMeasures || '-'"
/>
<up-cell
title=
"是否延误"
:value=
"useGetDictByValue('aem_yesOrNoRadio', details.delay)"
/>
</up-cell-group>
</view>
<global-action-sheet
v-model=
"showAction"
title=
"审核"
description=
"审核本条航站不正常事件"
:options=
"[
{ label: '审核不通过', value: '4' },
{ label: '审核通过', value: '3' }
]"
@
select=
"handleSelect"
></global-action-sheet>
<up-modal
:width=
"250"
content=
"确认提交审核吗?"
:show=
"showConfirm"
showCancelButton
closeOnClickOverlay
@
confirm=
"handleSelect('2')"
@
cancel=
"showConfirm = false"
@
close=
"showConfirm = false"
></up-modal>
</global-page>
</template>
<
script
setup
>
import
{
storeToRefs
}
from
'pinia'
import
{
getParamNameByValue
}
from
'mocp/hooks/use-params/useParams'
import
useAbnormalEventManageStore
from
'mocp/store/abnormalEventManage'
import
useBaseStore
from
'mocp/store/base'
import
{
timeStampFormat
}
from
'mocp/utils/tool'
import
{
useGetDictByValue
}
from
'mocp/hooks/use-dict/useDict'
import
{
computed
,
ref
}
from
'vue'
import
{
navigateTo
}
from
'mocp/utils/jump'
import
{
reviewedAdverseEventsApi
}
from
'mocp/api/abnormalEventManage'
const
baseStore
=
useBaseStore
()
const
abnormalEventManageStore
=
useAbnormalEventManageStore
()
const
{
details
}
=
storeToRefs
(
abnormalEventManageStore
)
const
auditLabel
=
computed
(()
=>
{
return
useGetDictByValue
(
'aem_auditListSelect'
,
details
.
value
?.
reviewedState
)
})
//获取底部按钮
const
getFooterTxt
=
computed
(()
=>
{
if
(
details
?.
reviewedState
==
''
||
auditLabel
.
value
==
'未提交审核'
||
auditLabel
.
value
==
'审核不通过'
)
{
return
'提交审核'
}
else
{
return
'审核'
}
})
//审核
const
showAction
=
ref
(
false
)
const
handleFooterClick
=
()
=>
{
if
(
getFooterTxt
.
value
==
'提交审核'
)
{
showConfirm
.
value
=
true
}
else
{
showAction
.
value
=
true
}
}
const
handleSelect
=
async
(
value
)
=>
{
const
params
=
{
id
:
details
.
value
?.
id
,
reviewedState
:
value
}
const
res
=
await
reviewedAdverseEventsApi
(
params
,
{
loading
:
true
})
if
(
res
.
code
==
200
)
{
uni
.
$mocpJump
.
navigateBack
()
uni
.
$emit
(
'abnormalEventManageReload'
)
uni
.
$mocpMessage
.
success
(
res
.
message
)
}
else
{
uni
.
$mocpMessage
.
error
(
res
.
message
)
}
}
//提交审核
const
showConfirm
=
ref
(
false
)
</
script
>
<
style
lang=
"scss"
scoped
>
.mocp-cell
{
background
:
#fff
;
}
.mocp-title
{
padding
:
0
32
rpx
24
rpx
32
rpx
;
background-color
:
#f7f8fa
;
}
</
style
>
src/pages/modules/mocp/panel/abnormalEventManage/edit.vue
0 → 100644
View file @
e06a6419
This diff is collapsed.
Click to expand it.
src/pages/modules/mocp/panel/abnormalEventManage/list.vue
View file @
e06a6419
<
template
>
<global-page
title=
"
机械延误
"
title=
"
航站不正常事件
"
isDataList
refresherEnabled
loadingMoreEnabled
...
...
@@ -63,7 +63,9 @@ const baseStore = useBaseStore()
const
abnormalEventManageStore
=
useAbnormalEventManageStore
()
const
{
searchData
}
=
storeToRefs
(
abnormalEventManageStore
)
const
goDetails
=
(
data
)
=>
{
uni
.
$mocpJump
.
navigateTo
(
'/panel/abnormalEventManage/details'
,
{
id
:
data
.
id
}
)
uni
.
$mocpJump
.
navigateTo
(
'/panel/abnormalEventManage/details'
).
then
(()
=>
{
abnormalEventManageStore
.
setState
(
'details'
,
data
)
}
)
}
//筛选
const
handleRightClick
=
()
=>
{
...
...
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