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
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
622 additions
and
16 deletions
+622
-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
+232
-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
<
template
>
<global-page
title=
"编辑航站不正常事件"
navLeftType=
"text"
:showNavRight=
"true"
navRightType=
"button"
navRightText=
"保存"
@
handleRightClick=
"handleSave"
>
<view
class=
"mocp-form"
>
<up-form
labelPosition=
"left"
labelWidth=
"auto"
:model=
"formData"
:rules=
"rules"
>
<up-form-item
label=
"事件来源"
prop=
"source"
:borderBottom=
"true"
required
>
<global-picker
v-model=
"formData.source"
pickAlign=
"right"
:options=
"getParamsByType('EventResource')"
clearable
></global-picker>
</up-form-item>
<up-form-item
label=
"航站"
prop=
"terminalCode"
:borderBottom=
"true"
required
>
<global-picker
pickAlign=
"right"
v-model=
"formData.terminalCode"
clearable
:options=
"baseStore.getTerminalSelect"
filter
></global-picker>
</up-form-item>
<up-form-item
label=
"责任单位"
prop=
"repairUnit"
:borderBottom=
"true"
required
>
<global-picker
v-model=
"formData.repairUnit"
pickAlign=
"right"
:options=
"repairUnitList"
clearable
filter
></global-picker>
</up-form-item>
<up-form-item
label=
"责任人"
prop=
"personLiable"
:borderBottom=
"true"
required
>
<up-input
v-model=
"formData.personLiable"
border=
"none"
inputAlign=
"right"
placeholder=
"请输入"
clearable
></up-input>
</up-form-item>
<up-form-item
label=
"机号"
prop=
"machineNumber"
:borderBottom=
"true"
required
>
<global-picker
pickAlign=
"right"
v-model=
"formData.machineNumber"
:options=
"deviceNumList"
clearable
@
change=
"changeAc"
filter
></global-picker>
</up-form-item>
<up-form-item
label=
"机型"
:borderBottom=
"true"
>
<up-input
border=
"none"
inputAlign=
"right"
clearable
v-model=
"formData.model"
disabled
disabledColor=
"#fff"
placeholder=
"请选择机号自动关联"
></up-input>
</up-form-item>
<up-form-item
label=
"航司"
:borderBottom=
"true"
>
<up-input
border=
"none"
inputAlign=
"right"
clearable
disabled
disabledColor=
"#fff"
:placeholder=
"formData.aviation ? '' : '请选择机号自动关联'"
>
<template
#
suffix
>
{{
useGetDictByValue
(
''
,
formData
.
aviation
,
{
data
:
baseStore
.
getAirlineSelect
}
)
}}
<
/template
>
<
/up-input
>
<
/up-form-item
>
<
up
-
form
-
item
label
=
"事件描述"
prop
=
"eventDescription"
:
borderBottom
=
"true"
required
labelPosition
=
"top"
>
<
up
-
textarea
v
-
model
.
trim
=
"formData.eventDescription"
placeholder
=
"请输入"
:
height
=
"40"
border
=
"none"
><
/up-textarea
>
<
/up-form-item
>
<
up
-
form
-
item
label
=
"问题点"
prop
=
"problemPoints"
:
borderBottom
=
"true"
required
>
<
up
-
input
v
-
model
=
"formData.problemPoints"
border
=
"none"
inputAlign
=
"right"
placeholder
=
"请输入"
clearable
><
/up-input
>
<
/up-form-item
>
<
up
-
form
-
item
label
=
"类别"
prop
=
"category"
:
borderBottom
=
"true"
required
>
<
global
-
picker
v
-
model
=
"formData.category"
pickAlign
=
"right"
clearable
:
options
=
"getParamsByType('EventCategory')"
><
/global-picker
>
<
/up-form-item
>
<
up
-
form
-
item
label
=
"扣分情况"
prop
=
"pointsDeduction"
:
borderBottom
=
"true"
required
>
<
up
-
input
type
=
"number"
v
-
model
=
"formData.pointsDeduction"
border
=
"none"
inputAlign
=
"right"
placeholder
=
"请输入"
clearable
><
/up-input
>
<
/up-form-item
>
<
up
-
form
-
item
label
=
"接报日期"
prop
=
"occurrenceTime"
:
borderBottom
=
"true"
required
>
<
global
-
date
pickAlign
=
"right"
v
-
model
=
"formData.occurrenceTime"
clearable
mode
=
"date"
format
=
"YYYY/MM/DD"
placeholder
=
"请选择日期"
><
/global-date
>
<
/up-form-item
>
<
up
-
form
-
item
label
=
"调查单位"
prop
=
"surveyUnit"
:
borderBottom
=
"true"
required
>
<
up
-
input
v
-
model
=
"formData.surveyUnit"
border
=
"none"
inputAlign
=
"right"
placeholder
=
"请输入"
clearable
><
/up-input
>
<
/up-form-item
>
<
up
-
form
-
item
label
=
"事件性质"
prop
=
"eventProperty"
:
borderBottom
=
"true"
required
>
<
global
-
picker
v
-
model
=
"formData.eventProperty"
pickAlign
=
"right"
:
options
=
"getParamsByType('EventProperty')"
clearable
><
/global-picker
>
<
/up-form-item
>
<
up
-
form
-
item
label
=
"备注"
prop
=
"remake"
:
borderBottom
=
"true"
labelPosition
=
"top"
>
<
up
-
textarea
v
-
model
.
trim
=
"formData.remake"
placeholder
=
"请输入"
:
height
=
"40"
border
=
"none"
><
/up-textarea
>
<
/up-form-item
>
<
up
-
form
-
item
label
=
"调查已反馈"
prop
=
"survey"
:
borderBottom
=
"true"
required
>
<
global
-
picker
v
-
model
=
"formData.survey"
pickAlign
=
"right"
dictkey
=
"aem_surveyListSelect2"
clearable
><
/global-picker
>
<
/up-form-item
>
<
up
-
form
-
item
label
=
"附件"
:
borderBottom
=
"true"
labelPosition
=
"top"
>
<
global
-
upload
:
fileList
=
"formData.surveyAttaFileVoList"
v
-
model
=
"formData.surveyAtta"
mapFieldName
=
"id"
@
getFileList
=
"getSurveyAttaFileVoList"
style
=
"margin-top: 24rpx"
><
/global-upload
>
<
/up-form-item
>
<
up
-
form
-
item
label
=
"调查完成时限"
prop
=
"surveyTimeLimit"
:
borderBottom
=
"true"
v
-
if
=
"!(formData.survey && formData.survey == '2')"
>
<
global
-
date
pickAlign
=
"right"
v
-
model
=
"formData.surveyTimeLimit"
clearable
mode
=
"date"
format
=
"YYYY/MM/DD"
placeholder
=
"请选择日期"
><
/global-date
>
<
/up-form-item
>
<
up
-
form
-
item
label
=
"调查结果简述"
prop
=
"surveyFeedback"
:
borderBottom
=
"true"
labelPosition
=
"top"
v
-
if
=
"!(formData.survey && formData.survey == '2')"
>
<
up
-
textarea
v
-
model
.
trim
=
"formData.surveyFeedback"
placeholder
=
"请输入"
:
height
=
"40"
border
=
"none"
><
/up-textarea
>
<
/up-form-item
>
<
up
-
form
-
item
label
=
"完成整改"
prop
=
"correctiveComplete"
:
borderBottom
=
"true"
required
>
<
global
-
picker
v
-
model
=
"formData.correctiveComplete"
pickAlign
=
"right"
dictkey
=
"aem_surveyListSelect2"
clearable
><
/global-picker
>
<
/up-form-item
>
<
up
-
form
-
item
label
=
"附件"
:
borderBottom
=
"true"
labelPosition
=
"top"
>
<
global
-
upload
:
fileList
=
"formData.correctiveAttaFileVoList"
v
-
model
=
"formData.correctiveAtta"
mapFieldName
=
"id"
@
getFileList
=
"getCorrectiveAtta"
style
=
"margin-top: 24rpx"
><
/global-upload
>
<
/up-form-item
>
<
up
-
form
-
item
label
=
"整改完成时限"
prop
=
"correctiveTimeLimit"
:
borderBottom
=
"true"
v
-
if
=
"!(formData.correctiveComplete && formData.correctiveComplete == '2')"
>
<
global
-
date
pickAlign
=
"right"
v
-
model
=
"formData.correctiveTimeLimit"
clearable
mode
=
"date"
format
=
"YYYY/MM/DD"
placeholder
=
"请选择日期"
><
/global-date
>
<
/up-form-item
>
<
up
-
form
-
item
label
=
"整改措施"
prop
=
"correctiveMeasures"
:
borderBottom
=
"true"
labelPosition
=
"top"
v
-
if
=
"!(formData.correctiveComplete && formData.correctiveComplete == '2')"
>
<
up
-
textarea
v
-
model
.
trim
=
"formData.correctiveMeasures"
placeholder
=
"请输入"
:
height
=
"40"
border
=
"none"
><
/up-textarea
>
<
/up-form-item
>
<
up
-
form
-
item
label
=
"是否延误"
prop
=
"delay"
:
borderBottom
=
"true"
required
>
<
global
-
picker
v
-
model
=
"formData.delay"
pickAlign
=
"right"
clearable
dictkey
=
"aem_yesOrNoRadio"
><
/global-picker
>
<
/up-form-item
>
<
/up-form
>
<
/view
>
<
/global-page
>
<
/template
>
<
script
setup
>
import
{
onLoad
}
from
'@dcloudio/uni-app'
import
{
storeToRefs
}
from
'pinia'
import
useBaseStore
from
'mocp/store/base'
import
{
useGetDictByValue
}
from
'mocp/hooks/use-dict/useDict'
import
{
getParamsByType
}
from
'mocp/hooks/use-params/useParams'
import
{
correctiveAttaFileVoList
,
formData
,
rules
,
surveyAttaFileVoList
}
from
'./constants/edit.compositions'
import
useAbnormalEventManageStore
from
'mocp/store/abnormalEventManage'
import
{
changeAc
,
getSurveyAttaFileVoList
,
getCorrectiveAtta
,
resetData
}
from
'./constants/edit.functionals'
import
{
updateAdverseEventsApi
}
from
'mocp/api/abnormalEventManage'
const
baseStore
=
useBaseStore
()
//获取下拉框选项
const
{
selectList
:
{
deviceNumList
,
repairUnitList
}
}
=
useBaseStore
()
const
abnormalEventManageStore
=
useAbnormalEventManageStore
()
const
{
details
}
=
storeToRefs
(
abnormalEventManageStore
)
//页面初始化
onLoad
(()
=>
{
Object
.
assign
(
formData
,
details
.
value
)
}
)
//保存
const
handleSave
=
async
()
=>
{
const
res
=
await
updateAdverseEventsApi
(
formData
,
{
loading
:
true
}
)
if
(
res
.
code
==
200
)
{
uni
.
$mocpJump
.
navigateBack
()
uni
.
$mocpMessage
.
success
(
res
.
message
)
//更新详情
res
.
data
.
surveyAttaFileVoList
=
surveyAttaFileVoList
.
value
res
.
data
.
correctiveAttaFileVoList
=
correctiveAttaFileVoList
.
value
abnormalEventManageStore
.
setState
(
'details'
,
res
.
data
)
resetData
()
}
else
{
uni
.
$mocpMessage
.
error
(
res
.
message
)
}
}
<
/script
>
<
style
lang
=
"scss"
scoped
>
.
mocp
-
form
{
background
:
#
fff
;
margin
-
bottom
:
24
rpx
;
padding
:
0
32
rpx
;
}
<
/style
>
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