Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
rongtong-app
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
融通安全管理系统
rongtong-app
Commits
193938d1
Commit
193938d1
authored
Jul 18, 2023
by
yf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
固有风险修改
parent
6641f553
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
849 additions
and
154 deletions
+849
-154
src/views/riskProject/add/addCurrent.vue
src/views/riskProject/add/addCurrent.vue
+2
-2
src/views/riskProject/add/inherentRisks.vue
src/views/riskProject/add/inherentRisks.vue
+19
-3
src/views/riskProject/taskLedger/tabDetail.vue
src/views/riskProject/taskLedger/tabDetail.vue
+828
-149
No files found.
src/views/riskProject/add/addCurrent.vue
View file @
193938d1
...
@@ -258,8 +258,8 @@
...
@@ -258,8 +258,8 @@
应采取的管控措施
应采取的管控措施
</div>
</div>
<van-field
<van-field
v-model=
"form.
takenM
easuresAdministration"
v-model=
"form.
m
easuresAdministration"
name=
"
takenM
easuresAdministration"
name=
"
m
easuresAdministration"
label=
""
label=
""
type=
"textarea"
type=
"textarea"
rows=
"3"
rows=
"3"
...
...
src/views/riskProject/add/inherentRisks.vue
View file @
193938d1
...
@@ -63,9 +63,13 @@
...
@@ -63,9 +63,13 @@
<van-button
round
type=
"primary"
@
click=
"goDetail(item)"
<van-button
round
type=
"primary"
@
click=
"goDetail(item)"
>
编辑
</van-button
>
编辑
</van-button
>
>
<!--
<van-button
round
type=
"info"
@
click=
"goConfirm(item)"
v-show=
"active==0"
<van-button
>
确认
</van-button
round
>
-->
type=
"danger"
@
click=
"delInherent(item)"
v-show=
"active == 0"
>
删除
</van-button
>
</div>
</div>
</van-overlay>
</van-overlay>
</van-cell-group>
</van-cell-group>
...
@@ -158,6 +162,18 @@ export default {
...
@@ -158,6 +162,18 @@ export default {
// this.postList();
// this.postList();
},
},
methods
:
{
methods
:
{
delInherent
()
{
Dialog
.
confirm
({
title
:
"
删除固有风险
"
,
message
:
"
是否确认删除?
"
})
.
then
(()
=>
{
// on confirm
})
.
catch
(()
=>
{
// on cancel
});
},
timestampToTimes
(
time
)
{
timestampToTimes
(
time
)
{
return
timestampToTime
(
new
Date
(
time
),
"
DT2
"
,
true
);
return
timestampToTime
(
new
Date
(
time
),
"
DT2
"
,
true
);
},
},
...
...
src/views/riskProject/taskLedger/tabDetail.vue
View file @
193938d1
<
template
>
<
template
>
<div>
<div>
<van-form
:scroll-to-error=
"true"
:show-error=
"false"
validate-trigger=
"onSubmit"
>
<van-form
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
@
submit=
"onSubmit"
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
:scroll-to-error=
"true"
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
:show-error=
"false"
validate-trigger=
"onSubmit"
>
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
风险信息
风险信息
</div>
</div>
<van-field
readonly
required
:value=
"InherentRisk.userName"
label=
"评估人"
placeholder=
"请输入"
/>
<van-field
<van-field
readonly
required
:value=
"InherentRisk.projectName"
label=
"所属项目"
placeholder=
"请输入"
/>
readonly
<van-field
readonly
required
:value=
"InherentRisk.buildingName"
label=
"所属建筑物"
placeholder=
"请输入"
/>
required
name=
"userName"
:value=
"form.userName"
label=
"评估人"
placeholder=
"请输入"
/>
<van-field
readonly
required
name=
"projectId"
:value=
"form.projectId"
label=
"所属项目"
placeholder=
"请输入"
/>
<van-field
readonly
required
name=
"buildingName"
:value=
"form.buildingName"
label=
"所属建筑物"
placeholder=
"请输入 "
/>
<van-field
readonly
required
clickable
name=
"floorName"
:value=
"form.floorName"
label=
"所属楼层"
placeholder=
"请选择"
:rules=
"[
{ required: true, message: '所属楼层不能为空' }]"
/>
<van-field
required
clickable
name=
"floorName"
:value=
"InherentRisk.floorName"
label=
"所属楼层"
placeholder=
"请选择"
:rules=
"[
{ required: true, message: '所属楼层不能为空' }]" />
<div
style=
"display: flex;"
>
<div
style=
"display: flex;"
>
<van-field
readonly
required
name=
"roomName"
:value=
"InherentRisk.roomName"
label=
"所属房间"
placeholder=
"请输入"
<van-field
:rules=
"[
{ required: true, message: '所属房间不能为空' }]" />
readonly
<!--
<van-button
style=
"color: #cccc;background-color: #f0f1f5;"
icon=
"plus"
type=
"info"
/>
-->
required
name=
"roomName"
:value=
"form.roomName"
label=
"所属房间"
placeholder=
"请输入"
:rules=
"[
{ required: true, message: '所属房间不能为空' }]"
/>
</div>
</div>
<van-field
required
clickable
name=
"name"
v-model=
"InherentRisk.factor"
label=
"风险源名称"
placeholder=
"请输入"
:rules=
"[
{ required: true, message: '风险源名称不能为空' }]" />
<van-field
<van-field
required
clickable
name=
"name"
v-model=
"InherentRisk.factor"
label=
"风险点类型"
placeholder=
"请输入"
readonly
:rules=
"[
{ required: true, message: '风险点类型不能为空' }]" />
required
<van-field
required
clickable
name=
"name"
v-model=
"InherentRisk.factor"
label=
"安全警示标志"
placeholder=
"请输入"
clickable
:rules=
"[
{ required: true, message: '安全警示标志不能为空' }]" />
name=
"name"
<van-field
v-model=
"InherentRisk.factor"
required
name=
"factor"
label=
"风险因素"
placeholder=
"请选择"
v-model=
"form.name"
:rules=
"[
{ required: true, message: '风险因素不能为空' }]" />
label=
"危险源名称"
<van-field
v-model=
"InherentRisk.type"
required
name=
"type"
label=
"准事故类型"
placeholder=
"请选择"
placeholder=
"请输入"
:rules=
"[
{ required: true, message: '准事故类型不能为空' }]" />
:rules=
"[
{ required: true, message: '危险源名称不能为空' }]"
/>
<van-field
readonly
v-model=
"InherentRisk.level"
required
name=
"level"
label=
"风险等级"
placeholder=
"请选择"
<!-- 单选 -->
:rules=
"[
{ required: true, message: '风险等级不能为空' }]" />
<van-field
readonly
<van-field
required
name=
"presenceLocation"
v-model=
"InherentRisk.presenceLocation"
label=
"存在部位"
placeholder=
"请输入"
required
:rules=
"[
{ required: true, message: '存在部位不能为空' }]" />
clickable
name=
"pointType"
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
v-model=
"form.pointType"
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
label=
"风险点类型"
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
placeholder=
"请选择"
:rules=
"[
{ required: true, message: '风险点类型不能为空' }]"
/>
<!-- 多选 -->
<van-field
v-model=
"form.safetyWarningSigns"
readonly
required
name=
"safetyWarningSigns"
label=
"安全警示标志"
placeholder=
"请选择"
:rules=
"[
{ required: true, message: '安全警示标志不能为空' }]"
/>
<van-field
v-model=
"form.factor"
readonly
required
name=
"factor"
label=
"风险因素"
placeholder=
"请选择"
:rules=
"[
{ required: true, message: '风险因素不能为空' }]"
/>
<van-field
readonly
v-model=
"form.type"
required
name=
"type"
label=
"准事故类型"
placeholder=
"请选择"
:rules=
"[
{ required: true, message: '准事故类型不能为空' }]"
/>
<van-field
readonly
v-model=
"form.level"
required
name=
"level"
label=
"风险等级"
placeholder=
"请选择"
:rules=
"[
{ required: true, message: '风险等级不能为空' }]"
/>
<van-field
readonly
required
name=
"presenceLocation"
v-model=
"form.presenceLocation"
label=
"存在部位"
placeholder=
"请输入"
:rules=
"[
{ required: true, message: '存在部位不能为空' }]"
/>
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
风险源图片
风险源图片
</div>
</div>
<van-field
name=
"hdPicture1"
label=
"风险源图片"
>
<van-field
name=
"hdPicture1"
label=
"风险源图片"
>
<template
#input
>
<template
#input
>
<van-uploader
multiple
:max-count=
"5"
disabled
upload-text=
"最多上传五个"
v-model=
"uploaderImg"
>
<van-uploader
@
delete=
"deleteFile(...arguments, 'uploaderImg')"
multiple
disabled
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"uploaderImg"
>
<template
slot=
"default"
>
<template
slot=
"default"
>
<div
style=
"
<!-- 11111111111 -->
<div
style=
"
width: 2.13333rem;
width: 2.13333rem;
height: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
background: #f7f8fa;
...
@@ -51,27 +166,54 @@
...
@@ -51,27 +166,54 @@
align-items: center;
align-items: center;
justify-content: center;
justify-content: center;
flex-direction: column;
flex-direction: column;
"
>
"
<img
src=
"@/assets/upload/pic.png"
alt=
""
style=
"width: 0.64rem; height: 0.64rem"
/>
>
<img
src=
"@/assets/upload/pic.png"
alt=
""
style=
"width: 0.64rem; height: 0.64rem"
/>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
</div>
</div>
</
template
>
</
template
>
</van-uploader>
</van-uploader>
</template>
</template>
</van-field>
</van-field>
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<div
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
技术措施
技术措施
</div>
</div>
<van-field
disabled
v-model=
"InherentRisk.measuresProject"
name=
"measuresProject"
label=
"技术措施"
type=
"textarea"
<van-field
rows=
"1"
autosize
placeholder=
"请输入"
/>
readonly
<van-field
name=
"measuresProjectFile[]"
label=
" "
>
v-model=
"form.measuresProject"
name=
"measuresProject"
label=
""
type=
"textarea"
rows=
"3"
autosize
placeholder=
"请输入"
/>
<van-field
name=
"measuresProjectFile[]"
label=
"上传附件"
>
<
template
#input
>
<
template
#input
>
<van-uploader
disabled
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresProjectFile"
accept=
"file"
<van-uploader
result-type=
"file"
@
delete=
"deleteFile(...arguments, 'measuresProjectFile')"
>
multiple
disabled
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresProjectFile"
accept=
"file"
result-type=
"file"
@
delete=
"deleteFile(...arguments, 'measuresProjectFile')"
>
<template
slot=
"default"
>
<template
slot=
"default"
>
<div
style=
"
<div
style=
"
width: 2.13333rem;
width: 2.13333rem;
height: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
background: #f7f8fa;
...
@@ -79,8 +221,13 @@
...
@@ -79,8 +221,13 @@
align-items: center;
align-items: center;
justify-content: center;
justify-content: center;
flex-direction: column;
flex-direction: column;
"
>
"
<img
src=
"@/assets/upload/file.png"
alt=
""
style=
"width: 0.64rem; height: 0.64rem"
/>
>
<img
src=
"@/assets/upload/file.png"
alt=
""
style=
"width: 0.64rem; height: 0.64rem"
/>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
</div>
</div>
</
template
>
</
template
>
...
@@ -88,7 +235,7 @@
...
@@ -88,7 +235,7 @@
</template>
</template>
</van-field>
</van-field>
<
!-- <
div
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
>
<img
<img
...
@@ -99,6 +246,7 @@
...
@@ -99,6 +246,7 @@
应采取的管控措施
应采取的管控措施
</div>
</div>
<van-field
<van-field
readonly
v-model=
"form.measuresAdministration"
v-model=
"form.measuresAdministration"
name=
"measuresAdministration"
name=
"measuresAdministration"
label=
""
label=
""
...
@@ -106,52 +254,46 @@
...
@@ -106,52 +254,46 @@
rows=
"3"
rows=
"3"
autosize
autosize
placeholder=
"请输入"
placeholder=
"请输入"
/> -->
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
应采取的管控措施
</div>
<van-field
v-model=
"form.takenMeasuresAdministration"
name=
"takenMeasuresAdministration"
label=
""
type=
"textarea"
rows=
"3"
autosize
placeholder=
"请输入"
/>
/>
<van-field
<van-field
required
required
v-model=
"form.measuresDeptId"
readonly
name=
"measuresDeptId"
v-model=
"form.measuresDeptName"
name=
"measuresDeptName"
label=
"管控责任单位 "
label=
"管控责任单位 "
type=
"textarea"
type=
"textarea"
rows=
"1"
rows=
"1"
autosize
autosize
placeholder=
"请
输入
"
placeholder=
"请
选择
"
/>
/>
<van-field
<van-field
required
required
v-model=
"form.measuresUserId"
readonly
name=
"measuresUserId"
v-model=
"form.measuresUserName"
name=
"measuresUserName"
label=
"管控责任人 "
label=
"管控责任人 "
type=
"textarea"
type=
"textarea"
rows=
"1"
rows=
"1"
autosize
autosize
placeholder=
"请
输入
"
placeholder=
"请
选择
"
/>
/>
<van-field
name=
"measuresAdministrationFile[]"
label=
" "
>
<van-field
name=
"measuresAdministrationFile[]"
label=
"上传附件"
>
<
template
#input
>
<
template
#input
>
<van-uploader
disabled
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresAdministrationFile"
<van-uploader
accept=
"file"
result-type=
"file"
@
delete=
"deleteFile(...arguments, 'measuresAdministrationFile')"
>
multiple
disabled
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresAdministrationFile"
accept=
"file"
result-type=
"file"
@
delete=
"deleteFile(...arguments, 'measuresAdministrationFile')"
>
<template
slot=
"default"
>
<template
slot=
"default"
>
<div
style=
"
<div
style=
"
width: 2.13333rem;
width: 2.13333rem;
height: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
background: #f7f8fa;
...
@@ -159,8 +301,13 @@
...
@@ -159,8 +301,13 @@
align-items: center;
align-items: center;
justify-content: center;
justify-content: center;
flex-direction: column;
flex-direction: column;
"
>
"
<img
src=
"@/assets/upload/file.png"
alt=
""
style=
"width: 0.64rem; height: 0.64rem"
/>
>
<img
src=
"@/assets/upload/file.png"
alt=
""
style=
"width: 0.64rem; height: 0.64rem"
/>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
</div>
</div>
</
template
>
</
template
>
...
@@ -178,6 +325,7 @@
...
@@ -178,6 +325,7 @@
危险源管理
危险源管理
</div>
</div>
<van-field
<van-field
readonly
v-model=
"form.hazardSourceName"
v-model=
"form.hazardSourceName"
name=
"hazardSourceName"
name=
"hazardSourceName"
label=
"危险源名称 "
label=
"危险源名称 "
...
@@ -186,16 +334,12 @@
...
@@ -186,16 +334,12 @@
autosize
autosize
placeholder=
"请输入"
placeholder=
"请输入"
/>
/>
<van-field
name=
"majorHazardSource"
label=
"是否存在重大危险源"
>
<
template
#input
>
<van-switch
disabled
v-model=
"form.majorHazardSource"
size=
"20"
/>
</
template
>
</van-field>
<van-field
v-model=
"form.majorHazardSource"
name=
"majorHazardSource"
label=
"是否存在重大危险源 "
type=
"textarea"
rows=
"1"
autosize
placeholder=
"请输入"
/>
<div
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
>
...
@@ -207,6 +351,7 @@
...
@@ -207,6 +351,7 @@
重大危险源描述
重大危险源描述
</div>
</div>
<van-field
<van-field
readonly
v-model=
"form.majorHazardSourceDescription"
v-model=
"form.majorHazardSourceDescription"
name=
"majorHazardSourceDescription"
name=
"majorHazardSourceDescription"
label=
""
label=
""
...
@@ -215,19 +360,42 @@
...
@@ -215,19 +360,42 @@
autosize
autosize
placeholder=
"请输入"
placeholder=
"请输入"
/>
/>
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<div
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
应急措施
应急措施
</div>
</div>
<van-field
disabled
v-model=
"InherentRisk.measuresEmergency"
name=
"measuresEmergency"
label=
"应急措施"
type=
"textarea"
<van-field
rows=
"1"
autosize
placeholder=
"请输入"
/>
readonly
<van-field
name=
"measuresEmergencyFile[]"
label=
" "
>
v-model=
"form.measuresEmergency"
name=
"measuresEmergency"
label=
""
type=
"textarea"
rows=
"3"
autosize
placeholder=
"请输入"
/>
<van-field
name=
"measuresEmergencyFile[]"
label=
"上传附件"
>
<
template
#input
>
<
template
#input
>
<van-uploader
disabled
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresEmergencyFile"
<van-uploader
accept=
"file"
result-type=
"file"
@
delete=
"deleteFile(...arguments, 'measuresEmergencyFile')"
>
multiple
disabled
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresEmergencyFile"
accept=
"file"
result-type=
"file"
@
delete=
"deleteFile(...arguments, 'measuresEmergencyFile')"
>
<template
slot=
"default"
>
<template
slot=
"default"
>
<div
style=
"
<!-- 11111111111 -->
<div
style=
"
width: 2.13333rem;
width: 2.13333rem;
height: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
background: #f7f8fa;
...
@@ -235,30 +403,95 @@
...
@@ -235,30 +403,95 @@
align-items: center;
align-items: center;
justify-content: center;
justify-content: center;
flex-direction: column;
flex-direction: column;
"
>
"
<img
src=
"@/assets/upload/file.png"
alt=
""
style=
"width: 0.64rem; height: 0.64rem"
/>
>
<img
src=
"@/assets/upload/file.png"
alt=
""
style=
"width: 0.64rem; height: 0.64rem"
/>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
</div>
</div>
</
template
>
</
template
>
</van-uploader>
</van-uploader>
</template>
</template>
</van-field>
</van-field>
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
<div
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
参考依据
参考依据
</div>
</div>
<van-field
readonly
required
clickable
name=
"trouble"
:value=
"form.trouble"
label=
"参考依据"
placeholder=
"请选择"
<van-field
@
click=
"showTrouble = true"
:rules=
"[{ required: true, message: '事故类型不能为空' }]"
/>
readonly
required
clickable
name=
"referenceBasis"
:value=
"form.referenceBasis"
label=
"参考依据"
placeholder=
"请选择"
:rules=
"[{ required: true, message: '事故类型不能为空' }]"
/>
</van-form>
</van-form>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
getUserInfo
,
getLocalUserInfo
}
from
"
@/utils/userInfo
"
;
import
{
getFun
,
postFun
}
from
"
@/service/table.js
"
;
export
default
{
export
default
{
props
:
[
"
InherentRisk
"
],
name
:
"
addCurrent
"
,
activated
()
{
this
.
showSetRank
=
false
;
// 再次关闭弹出层 以防万一
this
.
getList
();
this
.
$bus
.
$on
(
"
riskLevelBus
"
,
res
=>
{
this
.
showSetRank
=
false
;
// 再次关闭弹出层 以防万一
console
.
log
(
Boolean
(
res
));
if
(
res
)
{
this
.
riskRank
=
res
;
}
else
{
this
.
setRank
=
""
;
}
// 销毁一下监听事件 不然会越加越多
this
.
$bus
.
$off
(
"
riskLevelBus
"
);
});
},
beforeRouteEnter
(
to
,
from
,
next
)
{
if
(
from
.
name
==
"
riskInherent
"
)
{
sessionStorage
.
setItem
(
"
inherenForm
"
,
""
);
sessionStorage
.
setItem
(
"
level
"
,
""
);
}
next
();
},
beforeRouteLeave
(
to
,
from
,
next
)
{
if
(
to
.
name
!=
"
riskInherent
"
)
{
sessionStorage
.
setItem
(
"
inherenForm
"
,
JSON
.
stringify
(
this
.
form
));
}
next
();
},
data
()
{
data
()
{
return
{
return
{
measuresDept
:
false
,
ShowfloorList
:
false
,
floorSource
:
[],
dataName
:
""
,
// 单选
showSelect
:
false
,
columnsData
:
[],
// 多选
showCheckSelect
:
false
,
columnsCheckData
:
[],
ShowAccidentList
:
false
,
ShowSelectList
:
false
,
showPopoveSetRank
:
false
,
showPopoveSetRank
:
false
,
activeNames
:
[
"
1
"
],
activeNames
:
[
"
1
"
],
showPopover
:
false
,
showPopover
:
false
,
...
@@ -279,19 +512,12 @@ export default {
...
@@ -279,19 +512,12 @@ export default {
factor
:
""
,
//风险因素
factor
:
""
,
//风险因素
showFactor
:
false
,
showFactor
:
false
,
columnsFactor
:
[],
columnsFactor
:
[],
messageList
:
[
{
title
:
"
回显风险源名称
"
,
time
:
"
2022-12-12
"
,
name
:
"
Mr.周
"
,
state
:
1
}
],
source
:
""
,
//风险源
source
:
""
,
//风险源
userPrefix
:
""
,
//风险源
userPrefix
:
""
,
//风险源
showSource
:
false
,
showSource
:
false
,
columnsSource
:
[],
columnsSource
:
[],
trouble
:
""
,
//事故类型
trouble
:
""
,
//事故类型
columnsAccident
:
[],
showTrouble
:
false
,
showTrouble
:
false
,
columnsTrouble
:
[],
columnsTrouble
:
[],
setRank
:
""
,
//风险定级
setRank
:
""
,
//风险定级
...
@@ -330,20 +556,473 @@ export default {
...
@@ -330,20 +556,473 @@ export default {
possibleValue
:
""
,
possibleValue
:
""
,
possibleScore
:
0
,
possibleScore
:
0
,
severityValue
:
""
,
severityValue
:
""
,
severityScore
:
0
severityScore
:
0
,
messageList
:
[],
inherentId
:
0
,
buildingIds
:
""
};
};
},
},
created
()
{
created
()
{
// this.form.buildingIds = this.$route.params.buildingId ||sessionStorage.getItem("buildingId")
if
(
this
.
$route
.
params
.
inherentId
||
sessionStorage
.
getItem
(
"
inherentId
"
))
{
// this.form.planId = this.$route.params.planId||sessionStorage.getItem("planId")
this
.
inherentId
=
// this.form.buildingName = this.$route.params.buildingName||sessionStorage.getItem("buildingName")
this
.
$route
.
params
.
inherentId
||
sessionStorage
.
getItem
(
"
inherentId
"
);
// this.form.userId = userInfo.userId
this
.
buildingIds
=
// this.form.userName = userInfo.userName
this
.
$route
.
params
.
buildingId
||
sessionStorage
.
getItem
(
"
buildingId
"
);
// this.form.deptName = userInfo.dept.deptName
this
.
postReturnEcho
();
// this.form.projectId = '测试项目',
}
// this.form.level = this.$route.params.level ? this.$route.params.level :''
},
},
mounted
()
{
methods
:
{},
if
(
sessionStorage
.
getItem
(
"
inherenForm
"
)
!=
""
)
{
this
.
form
=
JSON
.
parse
(
sessionStorage
.
getItem
(
"
inherenForm
"
));
this
.
form
.
level
=
sessionStorage
.
getItem
(
"
level
"
);
}
},
methods
:
{
timestampToTimes
(
time
)
{
return
timestampToTime
(
new
Date
(
time
),
"
DT2
"
,
true
);
},
tabList
(
value
)
{
console
.
log
(
"
%c [ value ]-527
"
,
"
font-size:13px; background:pink; color:#bf2c9f;
"
,
value
);
if
(
value
==
1
)
{
this
.
getList
();
}
},
// 请求详情数据
postReturnEcho
()
{
this
.
$toast
.
loading
({
message
:
"
加载中...
"
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
duration
:
0
});
getFun
(
`/risk/plan/inherent/details/
${
this
.
inherentId
}
`
)
.
then
(
res
=>
{
this
.
form
=
res
.
data
;
this
.
getFloor
();
this
.
uploaderImg
=
(
res
.
data
.
pictureFile
||
[]).
map
(
item
=>
{
return
{
...
item
,
url
:
item
.
filePath
};
});
this
.
measuresProjectFile
=
(
res
.
data
.
measuresProjectFile
||
[]).
map
(
item
=>
{
return
{
...
item
,
url
:
item
.
filePath
};
}
);
this
.
measuresAdministrationFile
=
(
res
.
data
.
measuresAdministrationFile
||
[]
).
map
(
item
=>
{
return
{
...
item
,
url
:
item
.
filePath
};
});
this
.
measuresEmergencyFile
=
(
res
.
data
.
measuresEmergencyFile
||
[]
).
map
(
item
=>
{
return
{
...
item
,
url
:
item
.
filePath
};
});
})
.
catch
(()
=>
{
this
.
$toast
.
clear
();
});
},
// 项目负责人
onConTrouble
(
value
)
{
if
(
!
value
)
{
this
.
showTrouble
=
false
;
return
;
}
this
.
form
[
this
.
userPrefix
+
"
Id
"
]
=
value
.
userId
;
this
.
form
[
this
.
userPrefix
+
"
Name
"
]
=
value
.
nickName
;
console
.
log
(
"
this.form :>>
"
,
this
.
form
);
this
.
showTrouble
=
false
;
},
getUserData
(
e
)
{
this
.
userPrefix
=
e
;
if
(
!
this
.
form
.
measuresDeptId
)
{
this
.
$toast
({
title
:
"
提示
"
,
message
:
"
请选择管控责任单位!
"
});
return
false
;
}
this
.
$toast
.
loading
({
message
:
"
加载中...
"
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
duration
:
0
});
getFun
(
`/risk/plan/user/list/
${
this
.
form
.
measuresDeptId
}
`
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
columnsTrouble
=
res
.
data
;
// 对数据进行赋值
this
.
$toast
.
clear
();
this
.
showTrouble
=
true
;
}
else
{
this
.
$toast
.
clear
();
}
});
},
changeDept
(
id
,
name
)
{
console
.
log
(
id
);
this
.
form
.
measuresDeptId
=
id
;
this
.
form
.
measuresDeptName
=
name
;
},
closeDept
()
{
console
.
log
(
this
.
form
.
deptId
);
this
.
measuresDept
=
false
;
},
selectData
(
dataName
,
isSinge
)
{
this
.
dataName
=
dataName
;
getFun
(
`/risk/plan/dict/data/list?dictType=risk_plan_
${
dataName
.
toLowerCase
()}
`
)
.
then
(
res
=>
{
if
(
isSinge
)
{
this
.
columnsData
=
res
.
data
;
this
.
showSelect
=
true
;
}
else
{
this
.
columnsCheckData
=
res
.
data
;
this
.
showCheckSelect
=
true
;
}
})
.
catch
(()
=>
{
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
},
saveSelect
(
data
)
{
this
.
form
[
this
.
dataName
]
=
data
.
dictValue
;
this
.
showSelect
=
false
;
},
saveCheckSelect
(
data
)
{
this
.
form
[
this
.
dataName
]
=
data
.
join
(
"
,
"
);
this
.
showCheckSelect
=
false
;
},
renameKeyInTree
(
data
,
oldKey
,
newKey
)
{
let
arr
=
data
.
map
(
item
=>
{
const
newItem
=
{
...
item
};
if
(
item
.
hasOwnProperty
(
oldKey
))
{
newItem
[
newKey
]
=
newItem
[
oldKey
];
delete
newItem
[
oldKey
];
}
if
(
newItem
.
children
&&
newItem
.
children
.
length
>
0
)
{
newItem
.
children
=
this
.
renameKeyInTree
(
newItem
.
children
,
oldKey
,
newKey
);
}
return
newItem
;
});
return
arr
;
},
getFloor
()
{
console
.
log
(
this
.
form
,
111
);
getFun
(
`/risk/plan/floor/list/
${
this
.
form
.
buildingId
}
`
)
.
then
(
res
=>
{
// this.$toast.clear();
// this.showSource = true;
let
newArr
=
this
.
renameKeyInTree
(
res
.
data
,
"
name
"
,
"
text
"
);
this
.
floorSource
=
newArr
;
})
.
catch
(()
=>
{
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
},
seletFloor
(
name
)
{
this
.
ShowfloorList
=
true
;
this
.
userPrefix
=
name
;
},
seletRoom
(
name
)
{
this
.
$toast
.
loading
({
message
:
"
加载中...
"
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
duration
:
0
});
this
.
userPrefix
=
name
;
getFun
(
`/risk/plan/room/list/
${
this
.
form
.
floorId
}
`
)
.
then
(
res
=>
{
this
.
$toast
.
clear
();
this
.
showSource
=
true
;
this
.
columnsSource
=
res
.
data
;
})
.
catch
(()
=>
{
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
},
//风险等级
seletGrade
(
name
)
{
this
.
getGradeList
(
"
possibility
"
);
this
.
getGradeList
(
"
severity
"
);
this
.
showGradeDialog
=
true
;
},
//风险模型配置
getGradeList
(
type
)
{
// possibility 可能性 severity 严重性
getFun
(
`/risk/plan/matrix/
${
type
}
/list`
).
then
(
res
=>
{
let
arr
=
[];
res
.
data
.
forEach
(
item
=>
{
arr
.
push
({
text
:
item
.
title
,
type
:
item
.
type
,
sort
:
item
.
sort
,
score
:
item
.
score
});
});
if
(
type
===
"
possibility
"
)
{
this
.
columnsRiskRank
=
arr
;
}
else
{
this
.
columnsSetRank
=
arr
;
}
});
},
closeSlectfloor
()
{
this
.
ShowfloorList
=
false
;
},
saveSlectfloor
(
data
)
{
this
.
form
.
floorId
=
data
.
id
;
this
.
form
.
floorName
=
data
.
text
;
this
.
ShowfloorList
=
false
;
},
onSelect
(
data
)
{
this
.
possibleValue
=
data
.
text
;
this
.
possibleScore
=
data
.
score
;
},
onSelectSetRank
(
data
)
{
this
.
severityValue
=
data
.
text
;
this
.
severityScore
=
data
.
score
;
},
//开始测评
goResultPage
()
{
this
.
$router
.
push
({
name
:
"
resultPage
"
,
params
:
{
score
:
this
.
severityScore
*
this
.
possibleScore
}
});
},
performTasks
()
{
console
.
log
(
"
1233213 :>>
"
,
1233213
);
},
// 点击预览图
clickPre
(
e
)
{
console
.
log
(
e
);
if
(
e
.
filePath
)
{
this
.
videoUrl
=
e
.
filePath
;
}
else
{
this
.
videoUrl
=
e
.
content
;
}
},
async
deleteFile
(
val
,
detail
,
key
)
{
// console.log(val,detail)
if
(
val
.
fileId
)
{
let
formdata
=
new
FormData
();
formdata
.
append
(
"
key
"
,
val
[
"
fileId
"
]);
let
res
=
await
postFun
(
"
/mobile/remove
"
,
formdata
);
if
(
res
)
{
console
.
log
(
res
);
this
.
$toast
({
title
:
"
提示
"
,
message
:
"
删除成功!
"
});
}
else
{
console
.
log
(
"
删除失败
"
);
this
[
key
].
splice
(
detail
.
index
,
0
,
val
);
}
}
},
jsonToFormData
(
config
)
{
const
formData
=
new
FormData
();
//循环传入的值转换formData
Object
.
keys
(
config
).
forEach
(
key
=>
{
formData
.
append
(
key
,
config
[
key
]);
});
return
formData
;
},
onSubmit
(
values
)
{
// console.log('%c [ values ]-592', 'font-size:13px; background:pink; color:#bf2c9f;', values)
var
formDataJson
=
this
.
jsonToFormData
(
this
.
form
);
let
url
=
"
/risk/plan/inherent
"
;
values
.
hdPicture1
.
forEach
(
item
=>
{
if
(
item
.
file
)
{
formDataJson
.
append
(
"
pictureFile[]
"
,
item
.
file
);
}
else
{
formDataJson
.
append
(
"
pictureFile[]
"
,
item
.
fileId
);
}
});
values
[
"
measuresProjectFile[]
"
].
forEach
(
item
=>
{
if
(
item
.
file
)
{
formDataJson
.
append
(
"
measuresProjectFile[]
"
,
item
.
file
);
}
else
{
formDataJson
.
append
(
"
measuresProjectFile[]
"
,
item
.
fileId
);
}
});
values
[
"
measuresEmergencyFile[]
"
].
forEach
(
item
=>
{
if
(
item
.
file
)
{
formDataJson
.
append
(
"
measuresEmergencyFile[]
"
,
item
.
file
);
}
else
{
formDataJson
.
append
(
"
measuresEmergencyFile[]
"
,
item
.
fileId
);
}
});
values
[
"
measuresAdministrationFile[]
"
].
forEach
(
item
=>
{
if
(
item
.
file
)
{
formDataJson
.
append
(
"
measuresAdministrationFile[]
"
,
item
.
file
);
}
else
{
formDataJson
.
append
(
"
measuresAdministrationFile[]
"
,
item
.
fileId
);
}
});
postFun
(
url
,
formDataJson
)
.
then
(
res
=>
{
this
.
$toast
.
clear
();
this
.
$toast
.
success
({
message
:
"
提交成功
"
,
duration
:
2000
});
history
.
go
(
-
1
);
})
.
catch
(()
=>
{
this
.
$toast
.
clear
();
this
.
$toast
.
fail
(
"
提交失败,请稍后再试
"
);
});
this
.
$toast
.
clear
();
},
// 所属项目
onConProjectName
(
value
)
{
if
(
!
value
)
{
this
.
showProjectName
=
false
;
return
;
}
this
.
projectId
=
value
.
id
;
this
.
projectName
=
value
.
projectName
;
this
.
showProjectName
=
false
;
},
// 风险因素
onConFactor
(
value
)
{
if
(
!
value
)
{
this
.
showFactor
=
false
;
return
;
}
this
.
factor
=
value
.
factorType
;
this
.
showFactor
=
false
;
this
.
source
=
""
;
this
.
trouble
=
""
;
// 请求风险源
postHdSource
(
`/riskMain/showSourceName?factorType=
${
this
.
factor
}
`
).
then
(
res
=>
{
this
.
columnsSource
=
res
.
data
;
}
);
},
// 房间
onConSource
(
value
)
{
if
(
!
value
)
{
this
.
showSource
=
false
;
return
;
}
this
.
form
[
this
.
userPrefix
+
"
Id
"
]
=
value
.
id
;
this
.
form
[
this
.
userPrefix
+
"
Name
"
]
=
value
.
name
;
this
.
showSource
=
false
;
},
// 风险定级
onConSetRank
(
value
)
{
this
.
showSetRank
=
false
;
this
.
setRank
=
value
;
this
.
riskRank
=
""
;
if
(
this
.
setRank
==
"
矩阵式定级
"
)
{
this
.
showSetRank
=
false
;
this
.
$router
.
push
({
name
:
"
matrix-grad
"
});
}
},
// 自己定义风险等级点击方法
myRiskRank
()
{
if
(
this
.
setRank
==
""
)
{
this
.
$toast
(
"
请先选择风险定级
"
);
}
else
if
(
this
.
setRank
==
"
其他定级方式
"
)
{
this
.
showRiskRank
=
true
;
}
},
// 风险等级
onConRiskRank
(
value
)
{
this
.
riskRank
=
value
;
this
.
showRiskRank
=
false
;
},
// 管控层级
onConControl
(
value
)
{
this
.
control
=
value
;
this
.
showControl
=
false
;
},
// 主责部门
onConMainDutyDept
(
value
)
{
this
.
mainDutyDeptId
=
value
.
deptId
;
this
.
mainDutyDept
=
value
.
deptName
;
this
.
showMainDutyDept
=
false
;
this
.
mainDutyPeopLe
=
""
;
// 请求主责人员
let
formdata
=
new
FormData
();
formdata
.
append
(
"
organizationId
"
,
this
.
mainDutyDeptId
);
postHdPeople
(
`/riskMain/getUserList`
,
formdata
).
then
(
res
=>
{
this
.
columnsMainDutyPeopLe
=
res
.
data
;
});
},
// 主责人员
onConMainDutyPeopLe
(
value
)
{
this
.
mainDutyPeopLeId
=
value
.
userId
;
this
.
mainDutyPeopLe
=
value
.
userName
;
this
.
showMainDutyPeopLe
=
false
;
},
//添加房间
tjfjClcik
()
{
this
.
$router
.
push
({
name
:
"
riskView
"
,
params
:
{
floorId
:
this
.
form
.
floorId
,
isView
:
false
}
});
},
cancel
()
{
this
.
$router
.
go
(
-
1
);
},
// 选择作业人
goSelPeoTwo
(
val
)
{
this
.
peopleName
=
val
;
this
.
show
=
true
;
},
onClose
()
{
this
.
show
=
false
;
},
onSave
(
e
)
{
this
.
projectDirector
=
e
[
0
].
loginName
;
this
.
projectDirectorName
=
e
[
0
].
userName
;
this
.
show
=
false
;
}
},
watch
:
{}
watch
:
{}
};
};
</
script
>
</
script
>
...
...
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