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
14b930e3
Commit
14b930e3
authored
Jul 13, 2023
by
wei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
edit
parent
d85fa855
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
692 additions
and
855 deletions
+692
-855
src/views/riskProject/add/addCurrent.vue
src/views/riskProject/add/addCurrent.vue
+687
-849
src/views/riskProject/add/addInherent.vue
src/views/riskProject/add/addInherent.vue
+1
-1
src/views/riskProject/add/addPresent.vue
src/views/riskProject/add/addPresent.vue
+4
-5
No files found.
src/views/riskProject/add/addCurrent.vue
View file @
14b930e3
<
template
>
<
template
>
<div>
<div>
<LHeader
:text=
"text"
></LHeader>
<LHeader
:text=
"text"
></LHeader>
<van-tabs
v-model=
"active"
@
change=
"tabList"
color=
"#2980f7"
animated
>
<van-tabs
v-model=
"active"
@
change=
"tabList"
color=
"#2980f7"
animated
>
<van-tab
title=
"固有风险信息"
>
<van-tab
title=
"固有风险信息"
>
<van-form
<van-form
@
submit=
"onSubmit"
:scroll-to-error=
"true"
:show-error=
"false"
validate-trigger=
"onSubmit"
>
@
submit=
"onSubmit"
<div
:scroll-to-error=
"true"
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
:show-error=
"false"
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
validate-trigger=
"onSubmit"
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
>
风险信息
<div
</div>
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
<van-field
readonly
required
name=
"userName"
:value=
"form.userName"
label=
"评估人"
placeholder=
"请输入"
/>
>
<van-field
readonly
required
name=
"projectId"
:value=
"form.projectName"
label=
"所属项目"
<img
placeholder=
"请输入"
/>
src=
"@/assets/accidentIcon/bookmark.svg"
<van-field
readonly
required
name=
"buildingName"
:value=
"form.buildingName"
label=
"所属建筑物"
alt=
""
placeholder=
"请输入"
/>
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
风险信息
</div>
<van-field
readonly
required
name=
"userName"
:value=
"form.userName"
label=
"评估人"
placeholder=
"请输入"
/>
<van-field
readonly
required
name=
"projectId"
:value=
"form.projectName"
label=
"所属项目"
placeholder=
"请输入"
/>
<van-field
readonly
required
name=
"buildingName"
:value=
"form.buildingName"
label=
"所属建筑物"
placeholder=
"请输入"
/>
<van-field
<van-field
required
clickable
name=
"floorName"
:value=
"form.floorName"
label=
"所属楼层"
placeholder=
"请选择"
required
@
click=
"seletFloor('floor')"
:rules=
"[
{ required: true, message: '所属楼层不能为空' }]" />
clickable
name=
"floorName"
:value=
"form.floorName"
label=
"所属楼层"
placeholder=
"请选择"
@
click=
"seletFloor('floor')"
:rules=
"[
{ required: true, message: '所属楼层不能为空' }]"
/>
<van-field
<van-field
readonly
required
name=
"roomName"
:value=
"form.roomName"
label=
"所属房间"
placeholder=
"请输入"
readonly
@
click=
"seletRoom('room')"
:rules=
"[
{ required: true, message: '所属房间不能为空' }]" />
required
name=
"roomName"
:value=
"form.roomName"
label=
"所属房间"
placeholder=
"请输入"
@
click=
"seletRoom('room')"
:rules=
"[
{ required: true, message: '所属房间不能为空' }]"
/>
<van-field
<van-field
readonly
required
name=
"name"
v-model=
"form.name"
label=
"风险源名称"
placeholder=
"请输入"
readonly
:rules=
"[
{ required: true, message: '风险源名称不能为空' }]" @click="seletSource()" />
required
name=
"name"
v-model=
"form.name"
label=
"风险源名称"
placeholder=
"请输入"
:rules=
"[
{ required: true, message: '风险源名称不能为空' }]"
@click="seletSource()"
/>
<van-field
<van-field
v-model=
"form.factor"
required
name=
"factor"
label=
"风险因素"
placeholder=
"请选择"
v-model=
"form.factor"
@
click=
"seletFactor('factor')"
:rules=
"[
{ required: true, message: '风险因素不能为空' }]" />
required
name=
"factor"
label=
"风险因素"
placeholder=
"请选择"
@
click=
"seletFactor('factor')"
:rules=
"[
{ required: true, message: '风险因素不能为空' }]"
/>
<van-field
<van-field
v-model=
"form.type"
required
name=
"type"
label=
"准事故类型"
placeholder=
"请选择"
v-model=
"form.type"
@
click=
"seletType('type')"
:rules=
"[
{ required: true, message: '准事故类型不能为空' }]" />
required
name=
"type"
label=
"准事故类型"
placeholder=
"请选择"
@
click=
"seletType('type')"
:rules=
"[
{ required: true, message: '准事故类型不能为空' }]"
/>
<van-field
<van-field
readonly
v-model=
"form.level"
required
name=
"level"
label=
"风险等级"
placeholder=
"请选择"
readonly
@
click=
"seletGrade('level')"
:rules=
"[
{ required: true, message: '风险等级不能为空' }]" />
v-model=
"form.level"
required
name=
"level"
label=
"风险等级"
placeholder=
"请选择"
@
click=
"seletGrade('level')"
:rules=
"[
{ required: true, message: '风险等级不能为空' }]"
/>
<van-field
<van-field
required
name=
"presenceLocation"
v-model=
"form.presenceLocation"
label=
"存在部位"
required
placeholder=
"请输入"
:rules=
"[
{ required: true, message: '存在部位不能为空' }]" />
name=
"presenceLocation"
v-model=
"form.presenceLocation"
label=
"存在部位"
placeholder=
"请输入"
:rules=
"[
{ required: true, message: '存在部位不能为空' }]"
/>
<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
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
<img
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
src=
"@/assets/accidentIcon/bookmark.svg"
风险源图片
alt=
""
</div>
style=
"position: relative;top: 32%;transform: translateY(-50%);"
<van-field
name=
"hdPicture1"
label=
"风险源图片"
>
/>
<template
#input
>
风险源图片
<van-uploader
@
delete=
"deleteFile(...arguments, 'uploaderImg')"
multiple
:max-count=
"5"
</div>
upload-text=
"最多上传五个"
v-model=
"uploaderImg"
>
<van-field
name=
"hdPicture1"
label=
"风险源图片"
>
<template
slot=
"default"
>
<template
#input
>
<!-- 11111111111 -->
<van-uploader
<div
style=
"
@
delete=
"deleteFile(...arguments, 'uploaderImg')"
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"uploaderImg"
>
<template
slot=
"default"
>
<!-- 11111111111 -->
<div
style=
"
width: 2.13333rem;
width: 2.13333rem;
height: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
background: #f7f8fa;
...
@@ -147,53 +57,29 @@
...
@@ -147,53 +57,29 @@
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
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
src=
"@/assets/upload/pic.png"
</div>
alt=
""
</
template
>
style=
"width: 0.64rem; height: 0.64rem"
</van-uploader>
/>
</template>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
</van-field>
</div>
<div
</
template
>
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
</van-uploader>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
</template>
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
</van-field>
技术措施
<div
</div>
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
<van-field
v-model=
"form.measuresProject"
name=
"measuresProject"
label=
"技术措施"
type=
"textarea"
rows=
"1"
>
autosize
placeholder=
"请输入"
/>
<img
<van-field
name=
"measuresProjectFile[]"
label=
" "
>
src=
"@/assets/accidentIcon/bookmark.svg"
<
template
#input
>
alt=
""
<van-uploader
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresProjectFile"
style=
"position: relative;top: 32%;transform: translateY(-50%);"
accept=
"file"
result-type=
"file"
@
delete=
"deleteFile(...arguments, 'measuresProjectFile')"
>
/>
<template
slot=
"default"
>
技术措施
<!-- 11111111111 -->
</div>
<div
style=
"
<van-field
v-model=
"form.measuresProject"
name=
"measuresProject"
label=
"技术措施"
type=
"textarea"
rows=
"1"
autosize
placeholder=
"请输入"
/>
<van-field
name=
"measuresProjectFile[]"
label=
" "
>
<
template
#input
>
<van-uploader
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresProjectFile"
accept=
"file"
result-type=
"file"
@
delete=
"deleteFile(...arguments, 'measuresProjectFile')"
>
<template
slot=
"default"
>
<!-- 11111111111 -->
<div
style=
"
width: 2.13333rem;
width: 2.13333rem;
height: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
background: #f7f8fa;
...
@@ -201,53 +87,31 @@
...
@@ -201,53 +87,31 @@
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=
""
<img
style=
"width: 0.64rem; height: 0.64rem"
/>
src=
"@/assets/upload/file.png"
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
alt=
""
</div>
style=
"width: 0.64rem; height: 0.64rem"
</
template
>
/>
</van-uploader>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
</template>
</div>
</van-field>
</
template
>
<div
</van-uploader>
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
</template>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
</van-field>
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
<div
管理措施
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
</div>
>
<van-field
v-model=
"form.measuresAdministration"
name=
"measuresAdministration"
label=
"管理措施"
<img
type=
"textarea"
rows=
"1"
autosize
placeholder=
"请输入"
/>
src=
"@/assets/accidentIcon/bookmark.svg"
<van-field
name=
"measuresAdministrationFile[]"
label=
" "
>
alt=
""
<
template
#input
>
style=
"position: relative;top: 32%;transform: translateY(-50%);"
<van-uploader
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresAdministrationFile"
/>
accept=
"file"
result-type=
"file"
管理措施
@
delete=
"deleteFile(...arguments, 'measuresAdministrationFile')"
>
</div>
<template
slot=
"default"
>
<van-field
<!-- 11111111111 -->
v-model=
"form.measuresAdministration"
<div
style=
"
name=
"measuresAdministration"
label=
"管理措施"
type=
"textarea"
rows=
"1"
autosize
placeholder=
"请输入"
/>
<van-field
name=
"measuresAdministrationFile[]"
label=
" "
>
<
template
#input
>
<van-uploader
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresAdministrationFile"
accept=
"file"
result-type=
"file"
@
delete=
"deleteFile(...arguments, 'measuresAdministrationFile')"
>
<template
slot=
"default"
>
<!-- 11111111111 -->
<div
style=
"
width: 2.13333rem;
width: 2.13333rem;
height: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
background: #f7f8fa;
...
@@ -255,53 +119,31 @@
...
@@ -255,53 +119,31 @@
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=
""
<img
style=
"width: 0.64rem; height: 0.64rem"
/>
src=
"@/assets/upload/file.png"
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
alt=
""
</div>
style=
"width: 0.64rem; height: 0.64rem"
</
template
>
/>
</van-uploader>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
</template>
</div>
</van-field>
</
template
>
<div
</van-uploader>
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
</template>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
</van-field>
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
<div
应急措施
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
</div>
>
<van-field
v-model=
"form.measuresEmergency"
name=
"measuresEmergency"
label=
"应急措施"
type=
"textarea"
<img
rows=
"1"
autosize
placeholder=
"请输入"
/>
src=
"@/assets/accidentIcon/bookmark.svg"
<van-field
name=
"measuresEmergencyFile[]"
label=
" "
>
alt=
""
<
template
#input
>
style=
"position: relative;top: 32%;transform: translateY(-50%);"
<van-uploader
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresEmergencyFile"
/>
accept=
"file"
result-type=
"file"
应急措施
@
delete=
"deleteFile(...arguments, 'measuresEmergencyFile')"
>
</div>
<template
slot=
"default"
>
<van-field
<!-- 11111111111 -->
v-model=
"form.measuresEmergency"
<div
style=
"
name=
"measuresEmergency"
label=
"应急措施"
type=
"textarea"
rows=
"1"
autosize
placeholder=
"请输入"
/>
<van-field
name=
"measuresEmergencyFile[]"
label=
" "
>
<
template
#input
>
<van-uploader
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresEmergencyFile"
accept=
"file"
result-type=
"file"
@
delete=
"deleteFile(...arguments, 'measuresEmergencyFile')"
>
<template
slot=
"default"
>
<!-- 11111111111 -->
<div
style=
"
width: 2.13333rem;
width: 2.13333rem;
height: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
background: #f7f8fa;
...
@@ -309,30 +151,22 @@
...
@@ -309,30 +151,22 @@
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=
""
<img
style=
"width: 0.64rem; height: 0.64rem"
/>
src=
"@/assets/upload/file.png"
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
alt=
""
</div>
style=
"width: 0.64rem; height: 0.64rem"
</
template
>
/>
</van-uploader>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
</template>
</div>
</van-field>
</
template
>
<div
</van-uploader>
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
</template>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
</van-field>
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
<div
参考依据
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
</div>
>
<!-- <van-field
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
参考依据
</div>
<!-- <van-field
readonly
readonly
required
required
clickable
clickable
...
@@ -344,89 +178,77 @@
...
@@ -344,89 +178,77 @@
:rules="[{ required: true, message: '事故类型不能为空' }]"
:rules="[{ required: true, message: '事故类型不能为空' }]"
/> -->
/> -->
<div
style=
"margin: 16px 16px 0"
>
<div
style=
"margin: 16px 16px 0"
>
<van-button
round
block
type=
"info"
native-type=
"submit"
<van-button
round
block
type=
"info"
native-type=
"submit"
>
提交
</van-button>
>
提交
</van-button
</div>
>
</van-form>
</div>
<div
style=
"margin: 10px 16px 0px; padding-bottom: 16px"
>
</van-form>
<van-button
round
block
type=
"warning"
@
click.native=
"cancel"
>
取消
</van-button>
<div
style=
"margin: 10px 16px 0px; padding-bottom: 16px"
>
</div>
<van-button
round
block
type=
"warning"
@
click.native=
"cancel"
</van-tab>
>
取消
</van-button
<van-tab
title=
"现状风险"
>
>
<div
class=
"con-list"
@
touchmove=
"showIndex = null"
>
</div>
<van-cell-group
inset
v-for=
"(item, index) in messageList"
:key=
"index"
>
</van-tab>
<div
style=
"font-size: 0.45rem;padding: 5px 0;"
>
<van-tab
title=
"现状风险"
>
{{ item.title }}
<div
class=
"con-list"
@
touchmove=
"showIndex = null"
>
</div>
<van-cell-group
inset
v-for=
"(item, index) in messageList"
:key=
"index"
>
<div
style=
"font-size: 0.45rem;padding: 5px 0;"
>
{{ item.title }}
</div>
<van-row
gutter=
""
>
<van-row
gutter=
""
>
<van-col
span=
"17"
>
<van-col
span=
"17"
>
<van-row
gutter=
""
>
<van-row
gutter=
""
>
<van-col
span=
"9"
>
风险系数:
</van-col>
<van-col
span=
"9"
>
风险系数:
</van-col>
<van-col
span=
"15"
>
{{ item.time }}
</van-col>
<van-col
span=
"15"
>
{{ item.time }}
</van-col>
</van-row>
</van-row>
<van-row
gutter=
""
>
<van-row
gutter=
""
>
<van-col
span=
"9"
>
创建时间:
</van-col>
<van-col
span=
"9"
>
创建时间:
</van-col>
<van-col
span=
"15"
>
{{ item.name }}
</van-col>
<van-col
span=
"15"
>
{{ item.name }}
</van-col>
</van-row>
</van-row>
<van-row
gutter=
""
>
<van-row
gutter=
""
>
<van-col
span=
"9"
>
风险描述:
</van-col>
<van-col
span=
"9"
>
风险描述:
</van-col>
<van-col
span=
"15"
>
{{ item.name }}
</van-col>
<van-col
span=
"15"
>
{{ item.name }}
</van-col>
</van-row>
</van-row>
</van-col>
</van-col>
<van-col
<van-col
span=
"7"
:style=
"{ color: item.state == 1 ? '#0069e5' : '#03b615' }"
>
span=
"7"
{{ "●待审批" }}
:style=
"{ color: item.state == 1 ? '#0069e5' : '#03b615' }"
</van-col>
>
</van-row>
{{ "●待审批" }}
</van-cell-group>
</van-col>
<div
style=
"
</van-row>
</van-cell-group>
<div
style=
"
width: 100%;
width: 100%;
text-align: center;
text-align: center;
font-size: 0.48rem;
font-size: 0.48rem;
position: fixed;
position: fixed;
top: 30%;
top: 30%;
"
"
v-if=
"messageList['length'] == 0"
>
v-if=
"messageList['length'] == 0"
暂无数据
>
</div>
暂无数据
</div>
</div>
</van-tab>
</div>
</van-tabs>
</van-tab>
<van-popup
v-model=
"showTrouble"
position=
"bottom"
>
</van-tabs>
<van-picker
show-toolbar
value-key=
"name"
:columns=
"columnsTrouble"
@
confirm=
"onConTrouble"
<van-popup
v-model=
"showTrouble"
position=
"bottom"
>
@
cancel=
"showTrouble = false"
/>
<van-picker
</van-popup>
show-toolbar
value-key=
"name"
:columns=
"columnsTrouble"
@
confirm=
"onConTrouble"
@
cancel=
"showTrouble = false"
/>
</van-popup>
<van-popup
v-model=
"showSource"
position=
"bottom"
>
<!-- 楼层弹出层 -->
<van-picker
<van-popup
v-model=
"ShowfloorList"
position=
"bottom"
:style=
"{ height: '100%' }"
>
show-toolbar
<selectFloor
:listdata=
"floorSource"
@
closeSlect=
"closeSlectfloor"
@
saveSlect=
"saveSlectfloor"
></selectFloor>
value-key=
"name"
</van-popup>
:columns=
"columnsSource"
<!-- 风险源弹出层 -->
@
confirm=
"onConSource"
<van-popup
v-model=
"ShowSelectList"
position=
"bottom"
:style=
"{ height: '100%' }"
>
@
cancel=
"showSource = false"
<selectList
:listdata=
"columnsTrouble"
@
closeSlect=
"closeSlect"
@
saveSlect=
"saveSlect"
></selectList>
/>
</van-popup>
</van-popup>
<!-- 准事故类型 -->
<div
<van-popup
v-model=
"ShowAccidentList"
position=
"bottom"
:style=
"{ height: '100%' }"
>
v-if=
"active != 0"
<selectList
:listdata=
"columnsAccident"
@
closeSlect=
"closeSlectAccident"
@
saveSlect=
"saveSlectAccident"
>
style=
"display: flex;
</selectList>
</van-popup>
<van-popup
v-model=
"showSource"
position=
"bottom"
>
<van-picker
show-toolbar
value-key=
"name"
:columns=
"columnsSource"
@
confirm=
"onConSource"
@
cancel=
"showSource = false"
/>
</van-popup>
<div
v-if=
"active != 0"
style=
"display: flex;
justify-content: space-around;
justify-content: space-around;
background-color: #fff;
background-color: #fff;
border-top: 1px solid #e3e3e3;
border-top: 1px solid #e3e3e3;
...
@@ -434,36 +256,27 @@
...
@@ -434,36 +256,27 @@
width: 100%;
width: 100%;
text-align: center;
text-align: center;
position: fixed;
position: fixed;
bottom: 0;"
bottom: 0;"
>
>
<div
@
click=
"performTasks"
style=
"color: #4bced0;font-size: 14px;font-weight: 600;"
>
<div
<div
style=
"font-size: 22px;"
><van-icon
name=
"plus"
/></div>
@
click=
"performTasks"
<div>
新增现状风险
</div>
style=
"color: #4bced0;font-size: 14px;font-weight: 600;"
</div>
>
</div>
<div
style=
"font-size: 22px;"
><van-icon
name=
"plus"
/></div>
<!-- 风险源 -->
<div>
新增现状风险
</div>
<van-popup
v-model=
"visiableSource"
round
position=
"bottom"
</div>
:style=
"{ height: '30%', display: 'flex', flexDirection: 'column' }"
>
<van-button
class=
"btns"
@
click=
"nameByselfInput"
>
输入风险源名称
</van-button>
<van-button
class=
"btns"
@
click=
"importFromList"
>
从风险清单导入
</van-button>
<van-button
class=
"btns"
@
click=
"cancleSource"
>
取消
</van-button>
</van-popup>
</div>
</div>
<!-- 风险源 -->
<van-popup
v-model=
"visiableSource"
round
position=
"bottom"
:style=
"{ height: '30%', display: 'flex', flexDirection: 'column' }"
>
<van-button
class=
"btns"
@
click=
"nameByselfInput"
>
输入风险源名称
</van-button
>
<van-button
class=
"btns"
@
click=
"importFromList"
>
从风险清单导入
</van-button
>
<van-button
class=
"btns"
@
click=
"cancleSource"
>
取消
</van-button>
</van-popup>
</div>
</template>
</template>
<
script
>
<
script
>
import
LHeader
from
"
@/components/header.vue
"
;
import
LHeader
from
"
@/components/header.vue
"
;
import
SelectList
from
"
@/components/selectList.vue
"
;
import
selectFloor
from
"
@/components/selectFloor.vue
"
;
// import selectPeople from "@/views/riskTask/selectPeople/index.vue";
// import selectPeople from "@/views/riskTask/selectPeople/index.vue";
import
{
getFun
,
postFun
}
from
"
@/service/table.js
"
;
import
{
getFun
,
postFun
}
from
"
@/service/table.js
"
;
// import {
// import {
...
@@ -476,488 +289,513 @@ import { getFun, postFun } from "@/service/table.js";
...
@@ -476,488 +289,513 @@ import { getFun, postFun } from "@/service/table.js";
// postRiskShowMeasures,
// postRiskShowMeasures,
// } from "@/service/risk";
// } from "@/service/risk";
export
default
{
export
default
{
name
:
"
addCurrent
"
,
name
:
"
addCurrent
"
,
components
:
{
components
:
{
LHeader
LHeader
,
},
SelectList
,
beforeRouteLeave
(
to
,
from
,
next
)
{
selectFloor
if
(
to
.
name
!=
"
matrix-grad
"
)
{
}
next
();
},
data
()
{
return
{
inherentId
:
""
,
text
:
"
编辑固有风险
"
,
id
:
""
,
isTimely
:
1
,
active
:
0
,
form
:
{},
projectId
:
""
,
// 所属工程
projectName
:
""
,
// 所属工程
projectDirectorName
:
""
,
// 所属工程
projectDirector
:
""
,
// 所属工程
showProjectName
:
false
,
show
:
false
,
columnsProjectName
:
[],
factor
:
""
,
//风险因素
showFactor
:
false
,
columnsFactor
:
[],
messageList
:
[],
source
:
""
,
//风险源
userPrefix
:
""
,
//风险源
showSource
:
false
,
columnsSource
:
[],
trouble
:
""
,
//事故类型
showTrouble
:
false
,
columnsTrouble
:
[],
setRank
:
""
,
//风险定级
showSetRank
:
false
,
columnsSetRank
:
[
"
矩阵式定级
"
,
"
其他定级方式
"
],
riskRank
:
""
,
// 风险等级
showRiskRank
:
false
,
columnsRiskRank
:
[
"
重大风险
"
,
"
较大风险
"
,
"
一般风险
"
,
"
较小风险
"
],
showSetRankMode
:
false
,
// 是否显示定级方式
setRankMode
:
""
,
// 定级方式文字
setRankModeImg
:
[],
// 定级方式图片
uploaderImg
:
[],
// 定级方式图片
location
:
""
,
//风险部位
control
:
""
,
//管控层级
riskName
:
""
,
//管控层级
showControl
:
false
,
columnsControl
:
[
"
项目级
"
,
"
企业级
"
],
mainDutyDept
:
""
,
// 主责部门
mainDutyDeptId
:
""
,
showMainDutyDept
:
false
,
columnsMainDutyDept
:
[],
mainDutyPeopLe
:
""
,
// 主责人员
mainDutyPeopLeId
:
""
,
showMainDutyPeopLe
:
false
,
columnsMainDutyPeopLe
:
[],
technology
:
""
,
//技术措施文字
technologyImg
:
[],
//技术措施图片
administration
:
""
,
//管理措施文字
measuresAdministrationFile
:
[],
//管理措施图片
measuresProjectFile
:
[],
//管理措施图片
measuresEmergencyFile
:
[],
//管理措施图片
urgent
:
""
,
//应急措施文字
urgentImg
:
[],
//应急措施图片
buildingIds
:
""
,
// 退回原因
isShowreturnCause
:
false
,
visiableSource
:
false
};
},
created
()
{
if
(
this
.
$route
.
params
.
inherentId
||
sessionStorage
.
getItem
(
"
inherentId
"
))
{
this
.
inherentId
=
this
.
$route
.
params
.
inherentId
||
sessionStorage
.
getItem
(
"
inherentId
"
);
this
.
buildingIds
=
this
.
$route
.
params
.
buildingId
||
sessionStorage
.
getItem
(
"
buildingId
"
);
this
.
postReturnEcho
();
}
// this.getList();
},
methods
:
{
tabList
(
value
)
{
console
.
log
(
"
%c [ value ]-527
"
,
"
font-size:13px; background:pink; color:#bf2c9f;
"
,
value
);
if
(
value
==
1
)
{
this
.
getList
();
}
},
},
seletFloor
(
name
)
{
beforeRouteLeave
(
to
,
from
,
next
)
{
this
.
$toast
.
loading
({
if
(
to
.
name
!=
"
matrix-grad
"
)
{
message
:
"
加载中...
"
,
}
forbidClick
:
true
,
next
();
loadingType
:
"
spinner
"
,
duration
:
0
});
this
.
userPrefix
=
name
;
getFun
(
`/risk/plan/floor/list/
${
this
.
buildingIds
}
`
)
.
then
(
res
=>
{
this
.
$toast
.
clear
();
this
.
showSource
=
true
;
this
.
columnsSource
=
res
.
data
;
})
.
catch
(()
=>
{
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
},
},
seletRoom
(
name
)
{
data
()
{
this
.
$toast
.
loading
({
return
{
message
:
"
加载中...
"
,
ShowfloorList
:
false
,
forbidClick
:
true
,
floorSource
:
[],
loadingType
:
"
spinner
"
,
ShowAccidentList
:
false
,
duration
:
0
ShowSelectList
:
false
,
});
columnsAccident
:
[],
this
.
userPrefix
=
name
;
inherentId
:
""
,
getFun
(
`/risk/plan/room/list/
${
this
.
form
.
floorId
}
`
)
text
:
"
编辑固有风险
"
,
.
then
(
res
=>
{
id
:
""
,
this
.
$toast
.
clear
();
isTimely
:
1
,
this
.
showSource
=
true
;
active
:
0
,
this
.
columnsSource
=
res
.
data
;
form
:
{},
})
projectId
:
""
,
// 所属工程
.
catch
(()
=>
{
projectName
:
""
,
// 所属工程
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
projectDirectorName
:
""
,
// 所属工程
});
projectDirector
:
""
,
// 所属工程
showProjectName
:
false
,
show
:
false
,
columnsProjectName
:
[],
factor
:
""
,
//风险因素
showFactor
:
false
,
columnsFactor
:
[],
messageList
:
[],
source
:
""
,
//风险源
userPrefix
:
""
,
//风险源
showSource
:
false
,
columnsSource
:
[],
trouble
:
""
,
//事故类型
showTrouble
:
false
,
columnsTrouble
:
[],
setRank
:
""
,
//风险定级
showSetRank
:
false
,
columnsSetRank
:
[
"
矩阵式定级
"
,
"
其他定级方式
"
],
riskRank
:
""
,
// 风险等级
showRiskRank
:
false
,
columnsRiskRank
:
[
"
重大风险
"
,
"
较大风险
"
,
"
一般风险
"
,
"
较小风险
"
],
showSetRankMode
:
false
,
// 是否显示定级方式
setRankMode
:
""
,
// 定级方式文字
setRankModeImg
:
[],
// 定级方式图片
uploaderImg
:
[],
// 定级方式图片
location
:
""
,
//风险部位
control
:
""
,
//管控层级
riskName
:
""
,
//管控层级
showControl
:
false
,
columnsControl
:
[
"
项目级
"
,
"
企业级
"
],
mainDutyDept
:
""
,
// 主责部门
mainDutyDeptId
:
""
,
showMainDutyDept
:
false
,
columnsMainDutyDept
:
[],
mainDutyPeopLe
:
""
,
// 主责人员
mainDutyPeopLeId
:
""
,
showMainDutyPeopLe
:
false
,
columnsMainDutyPeopLe
:
[],
technology
:
""
,
//技术措施文字
technologyImg
:
[],
//技术措施图片
administration
:
""
,
//管理措施文字
measuresAdministrationFile
:
[],
//管理措施图片
measuresProjectFile
:
[],
//管理措施图片
measuresEmergencyFile
:
[],
//管理措施图片
urgent
:
""
,
//应急措施文字
urgentImg
:
[],
//应急措施图片
buildingIds
:
""
,
// 退回原因
isShowreturnCause
:
false
,
visiableSource
:
false
};
},
},
seletFactor
(
name
)
{
created
()
{
this
.
showTrouble
=
true
;
if
(
this
.
$route
.
params
.
inherentId
||
sessionStorage
.
getItem
(
"
inherentId
"
))
{
this
.
riskName
=
name
;
this
.
inherentId
=
this
.
columnsTrouble
=
[
this
.
$route
.
params
.
inherentId
||
sessionStorage
.
getItem
(
"
inherentId
"
);
{
this
.
buildingIds
=
name
:
"
人的因素
"
this
.
$route
.
params
.
buildingId
||
sessionStorage
.
getItem
(
"
buildingId
"
);
this
.
postReturnEcho
();
}
this
.
getFloor
();
this
.
getFXYS
();
this
.
getZSGLX
();
},
methods
:
{
tabList
(
value
)
{
console
.
log
(
"
%c [ value ]-527
"
,
"
font-size:13px; background:pink; color:#bf2c9f;
"
,
value
);
if
(
value
==
1
)
{
this
.
getList
();
}
},
},
{
getFloor
()
{
name
:
"
物的因素
"
getFun
(
`/risk/plan/floor/list/
${
this
.
inherentId
}
`
)
.
then
(
res
=>
{
// this.$toast.clear();
// this.showSource = true;
let
newArr
=
this
.
renameKeyInTree
(
res
.
data
,
"
name
"
,
"
text
"
);
this
.
floorSource
=
newArr
;
})
.
catch
(()
=>
{
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
},
},
{
getFXYS
()
{
name
:
"
环境因素
"
getFun
(
`/risk/plan/dict/data/list?dictType=risk_plan_factor`
)
.
then
(
res
=>
{
this
.
columnsTrouble
=
res
.
data
;
})
.
catch
(()
=>
{
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
},
},
{
getZSGLX
()
{
name
:
"
管理因素
"
getFun
(
`/risk/plan/dict/data/list?dictType=risk_plan_type`
)
}
.
then
(
res
=>
{
];
this
.
columnsAccident
=
res
.
data
;
},
})
seletType
(
name
)
{
.
catch
(()
=>
{
this
.
showTrouble
=
true
;
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
this
.
riskName
=
name
;
});
this
.
columnsTrouble
=
[
{
name
:
"
物体打击
"
},
},
{
seletFloor
(
name
)
{
name
:
"
车辆伤害
"
this
.
ShowfloorList
=
true
;
this
.
userPrefix
=
name
;
},
},
{
seletRoom
(
name
)
{
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
(
"
加载失败,请稍后再试
"
);
});
},
},
{
//风险因素
name
:
"
机械伤害
"
seletFactor
(
name
)
{
}
// this.showTrouble = true;
];
this
.
riskName
=
name
;
},
this
.
ShowSelectList
=
true
;
seletGrade
(
name
)
{
this
.
showTrouble
=
true
;
this
.
riskName
=
name
;
this
.
columnsTrouble
=
[
{
name
:
"
重大风险
"
},
},
{
//准事故类型
name
:
"
较大风险
"
seletType
(
name
)
{
// this.showTrouble = true;
this
.
riskName
=
name
;
this
.
ShowAccidentList
=
true
;
},
},
{
seletGrade
(
name
)
{
name
:
"
一般风险
"
this
.
showTrouble
=
true
;
this
.
riskName
=
name
;
this
.
columnsTrouble
=
[
{
name
:
"
重大风险
"
},
{
name
:
"
较大风险
"
},
{
name
:
"
一般风险
"
},
{
name
:
"
较小风险
"
}
];
},
performTasks
()
{
this
.
$router
.
push
({
name
:
"
addPresent
"
,
params
:
{
id
:
this
.
inherentId
,
// planId:this.planId
buildingId
:
this
.
buildingId
,
planId
:
this
.
inherentId
,
floorId
:
this
.
form
.
floorId
,
floorName
:
this
.
form
.
floorName
,
roomName
:
this
.
form
.
roomName
,
roomId
:
this
.
form
.
roomId
}
});
},
// 点击预览图
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
);
}
}
},
onSubmit
(
values
)
{
let
url
=
"
/riskMain/add
"
;
postReAdd
(
url
,
formdata
)
.
then
(
res
=>
{
this
.
$toast
.
clear
();
this
.
$toast
.
success
({
message
:
"
提交成功
"
,
duration
:
2000
});
history
.
go
(
-
1
);
})
.
catch
(()
=>
{
this
.
$toast
.
clear
();
this
.
$toast
.
fail
(
"
提交失败,请稍后再试
"
);
});
this
.
$toast
.
clear
();
},
},
{
name
:
"
较小风险
"
}
];
},
performTasks
()
{
this
.
$router
.
push
({
name
:
"
addPresent
"
,
params
:
{
id
:
this
.
inherentId
,
// planId:this.planId
buildingId
:
this
.
buildingId
,
planId
:
this
.
inherentId
,
floorId
:
this
.
form
.
floorId
,
roomName
:
this
.
form
.
roomName
,
roomId
:
this
.
form
.
roomId
}
});
},
// 点击预览图
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
);
}
}
},
onSubmit
(
values
)
{
let
url
=
"
/riskMain/add
"
;
postReAdd
(
url
,
formdata
)
.
then
(
res
=>
{
this
.
$toast
.
clear
();
this
.
$toast
.
success
({
message
:
"
提交成功
"
,
duration
:
2000
});
history
.
go
(
-
1
);
})
.
catch
(()
=>
{
this
.
$toast
.
clear
();
this
.
$toast
.
fail
(
"
提交失败,请稍后再试
"
);
});
this
.
$toast
.
clear
();
},
// 请求表单数据
// 请求表单数据
getList
()
{
getList
()
{
getFun
(
`/risk/plan/existing/list/
${
this
.
inherentId
}
`
)
getFun
(
`/risk/plan/existing/list/
${
this
.
inherentId
}
`
)
.
then
(
res
=>
{
.
then
(
res
=>
{
console
.
log
(
console
.
log
(
"
%c [ res ]-670
"
,
"
%c [ res ]-670
"
,
"
font-size:13px; background:pink; color:#bf2c9f;
"
,
"
font-size:13px; background:pink; color:#bf2c9f;
"
,
res
res
);
);
this
.
messageList
=
res
.
data
;
this
.
messageList
=
res
.
data
;
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
});
},
},
// 请求已退回详情数据
// 请求已退回详情数据
postReturnEcho
()
{
postReturnEcho
()
{
this
.
$toast
.
loading
({
this
.
$toast
.
loading
({
message
:
"
加载中...
"
,
message
:
"
加载中...
"
,
forbidClick
:
true
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
loadingType
:
"
spinner
"
,
duration
:
0
duration
:
0
});
});
getFun
(
`/risk/plan/inherent/details/
${
this
.
inherentId
}
`
)
getFun
(
`/risk/plan/inherent/details/
${
this
.
inherentId
}
`
)
.
then
(
res
=>
{
.
then
(
res
=>
{
this
.
form
=
res
.
data
;
this
.
form
=
res
.
data
;
this
.
uploaderImg
=
(
res
.
data
.
pictureFile
||
[]).
map
(
item
=>
{
this
.
uploaderImg
=
(
res
.
data
.
pictureFile
||
[]).
map
(
item
=>
{
return
{
return
{
...
item
,
...
item
,
url
:
item
.
filePath
url
:
item
.
filePath
};
};
});
});
this
.
measuresProjectFile
=
(
res
.
data
.
measuresProjectFile
||
[]).
map
(
this
.
measuresProjectFile
=
(
res
.
data
.
measuresProjectFile
||
[]).
map
(
item
=>
{
item
=>
{
return
{
return
{
...
item
,
...
item
,
url
:
item
.
filePath
url
:
item
.
filePath
};
};
}
}
);
);
this
.
measuresAdministrationFile
=
(
this
.
measuresAdministrationFile
=
(
res
.
data
.
measuresAdministrationFile
||
[]
res
.
data
.
measuresAdministrationFile
||
[]
).
map
(
item
=>
{
).
map
(
item
=>
{
return
{
return
{
...
item
,
...
item
,
url
:
item
.
filePath
url
:
item
.
filePath
};
};
});
});
this
.
measuresEmergencyFile
=
(
this
.
measuresEmergencyFile
=
(
res
.
data
.
measuresEmergencyFile
||
[]
res
.
data
.
measuresEmergencyFile
||
[]
).
map
(
item
=>
{
).
map
(
item
=>
{
return
{
return
{
...
item
,
...
item
,
url
:
item
.
filePath
url
:
item
.
filePath
};
};
});
});
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
this
.
$toast
.
clear
();
this
.
$toast
.
clear
();
});
});
},
},
// 所属项目
// 所属项目
onConProjectName
(
value
)
{
onConProjectName
(
value
)
{
if
(
!
value
)
{
if
(
!
value
)
{
this
.
showProjectName
=
false
;
this
.
showProjectName
=
false
;
return
;
return
;
}
}
this
.
projectId
=
value
.
id
;
this
.
projectId
=
value
.
id
;
this
.
projectName
=
value
.
projectName
;
this
.
projectName
=
value
.
projectName
;
this
.
showProjectName
=
false
;
this
.
showProjectName
=
false
;
},
},
// 风险因素
// 风险因素
onConFactor
(
value
)
{
onConFactor
(
value
)
{
if
(
!
value
)
{
if
(
!
value
)
{
this
.
showFactor
=
false
;
this
.
showFactor
=
false
;
return
;
return
;
}
}
this
.
factor
=
value
.
factorType
;
this
.
factor
=
value
.
factorType
;
this
.
showFactor
=
false
;
this
.
showFactor
=
false
;
this
.
source
=
""
;
this
.
source
=
""
;
this
.
trouble
=
""
;
this
.
trouble
=
""
;
// 请求风险源
// 请求风险源
postHdSource
(
`/riskMain/showSourceName?factorType=
${
this
.
factor
}
`
).
then
(
postHdSource
(
`/riskMain/showSourceName?factorType=
${
this
.
factor
}
`
).
then
(
res
=>
{
res
=>
{
this
.
columnsSource
=
res
.
data
;
this
.
columnsSource
=
res
.
data
;
}
}
);
);
},
},
// 风险源
// 风险源
onConSource
(
value
)
{
onConSource
(
value
)
{
if
(
!
value
)
{
if
(
!
value
)
{
this
.
showSource
=
false
;
this
.
showSource
=
false
;
return
;
return
;
}
}
this
.
form
[
this
.
userPrefix
+
"
Id
"
]
=
value
.
id
;
this
.
form
[
this
.
userPrefix
+
"
Id
"
]
=
value
.
id
;
this
.
form
[
this
.
userPrefix
+
"
Name
"
]
=
value
.
name
;
this
.
form
[
this
.
userPrefix
+
"
Name
"
]
=
value
.
name
;
this
.
showSource
=
false
;
this
.
showSource
=
false
;
},
},
seletSource
()
{
seletSource
()
{
this
.
visiableSource
=
true
;
this
.
visiableSource
=
true
;
},
},
//从风险清单列表导入
//从风险清单列表导入
importFromList
()
{
},
importFromList
()
{
},
//输入风险源名称
//输入风险源名称
nameByselfInput
()
{
},
nameByselfInput
()
{
},
//取消风险弹窗
//取消风险弹窗
cancleSource
()
{
cancleSource
()
{
this
.
visiableSource
=
false
;
this
.
visiableSource
=
false
;
},
},
// 事故类型
// 事故类型
onConTrouble
(
value
)
{
onConTrouble
(
value
)
{
if
(
!
value
)
{
if
(
!
value
)
{
this
.
showTrouble
=
false
;
this
.
showTrouble
=
false
;
return
;
return
;
}
}
this
.
form
[
this
.
riskName
]
=
value
.
name
;
this
.
form
[
this
.
riskName
]
=
value
.
name
;
this
.
showTrouble
=
false
;
this
.
showTrouble
=
false
;
},
},
// 风险定级
// 风险定级
onConSetRank
(
value
)
{
onConSetRank
(
value
)
{
this
.
showSetRank
=
false
;
this
.
showSetRank
=
false
;
this
.
setRank
=
value
;
this
.
setRank
=
value
;
this
.
riskRank
=
""
;
this
.
riskRank
=
""
;
if
(
this
.
setRank
==
"
矩阵式定级
"
)
{
if
(
this
.
setRank
==
"
矩阵式定级
"
)
{
this
.
showSetRank
=
false
;
this
.
showSetRank
=
false
;
this
.
$router
.
push
({
this
.
$router
.
push
({
name
:
"
matrix-grad
"
name
:
"
matrix-grad
"
});
});
}
}
},
},
// 自己定义风险等级点击方法
// 自己定义风险等级点击方法
myRiskRank
()
{
myRiskRank
()
{
if
(
this
.
setRank
==
""
)
{
if
(
this
.
setRank
==
""
)
{
this
.
$toast
(
"
请先选择风险定级
"
);
this
.
$toast
(
"
请先选择风险定级
"
);
}
else
if
(
this
.
setRank
==
"
其他定级方式
"
)
{
}
else
if
(
this
.
setRank
==
"
其他定级方式
"
)
{
this
.
showRiskRank
=
true
;
this
.
showRiskRank
=
true
;
}
}
},
},
// 风险等级
// 风险等级
onConRiskRank
(
value
)
{
onConRiskRank
(
value
)
{
this
.
riskRank
=
value
;
this
.
riskRank
=
value
;
this
.
showRiskRank
=
false
;
this
.
showRiskRank
=
false
;
},
},
// 管控层级
// 管控层级
onConControl
(
value
)
{
onConControl
(
value
)
{
this
.
control
=
value
;
this
.
control
=
value
;
this
.
showControl
=
false
;
this
.
showControl
=
false
;
},
},
// 主责部门
// 主责部门
onConMainDutyDept
(
value
)
{
onConMainDutyDept
(
value
)
{
this
.
mainDutyDeptId
=
value
.
deptId
;
this
.
mainDutyDeptId
=
value
.
deptId
;
this
.
mainDutyDept
=
value
.
deptName
;
this
.
mainDutyDept
=
value
.
deptName
;
this
.
showMainDutyDept
=
false
;
this
.
showMainDutyDept
=
false
;
this
.
mainDutyPeopLe
=
""
;
this
.
mainDutyPeopLe
=
""
;
// 请求主责人员
// 请求主责人员
let
formdata
=
new
FormData
();
let
formdata
=
new
FormData
();
formdata
.
append
(
"
organizationId
"
,
this
.
mainDutyDeptId
);
formdata
.
append
(
"
organizationId
"
,
this
.
mainDutyDeptId
);
postHdPeople
(
`/riskMain/getUserList`
,
formdata
).
then
(
res
=>
{
postHdPeople
(
`/riskMain/getUserList`
,
formdata
).
then
(
res
=>
{
this
.
columnsMainDutyPeopLe
=
res
.
data
;
this
.
columnsMainDutyPeopLe
=
res
.
data
;
});
});
},
},
// 主责人员
// 主责人员
onConMainDutyPeopLe
(
value
)
{
onConMainDutyPeopLe
(
value
)
{
this
.
mainDutyPeopLeId
=
value
.
userId
;
this
.
mainDutyPeopLeId
=
value
.
userId
;
this
.
mainDutyPeopLe
=
value
.
userName
;
this
.
mainDutyPeopLe
=
value
.
userName
;
this
.
showMainDutyPeopLe
=
false
;
this
.
showMainDutyPeopLe
=
false
;
},
},
cancel
()
{
cancel
()
{
this
.
$router
.
go
(
-
1
);
this
.
$router
.
go
(
-
1
);
},
},
// 选择作业人
// 选择作业人
goSelPeoTwo
(
val
)
{
goSelPeoTwo
(
val
)
{
this
.
peopleName
=
val
;
this
.
peopleName
=
val
;
this
.
show
=
true
;
this
.
show
=
true
;
},
},
onClose
()
{
onClose
()
{
this
.
show
=
false
;
this
.
show
=
false
;
},
onSave
(
e
)
{
this
.
projectDirector
=
e
[
0
].
loginName
;
this
.
projectDirectorName
=
e
[
0
].
userName
;
this
.
show
=
false
;
},
closeSlectfloor
()
{
this
.
ShowfloorList
=
false
;
},
saveSlectfloor
(
data
)
{
this
.
form
.
floorId
=
data
.
id
;
this
.
form
.
floorName
=
data
.
text
;
this
.
ShowfloorList
=
false
;
},
closeSlect
()
{
this
.
ShowSelectList
=
false
;
},
saveSlect
(
data
)
{
this
.
form
.
factor
=
data
.
join
(
"
,
"
);
this
.
ShowSelectList
=
false
;
},
closeSlectAccident
()
{
this
.
ShowAccidentList
=
false
;
},
saveSlectAccident
(
data
)
{
this
.
form
.
type
=
data
.
join
(
"
,
"
);
this
.
ShowAccidentList
=
false
;
},
},
},
onSave
(
e
)
{
watch
:
{
this
.
projectDirector
=
e
[
0
].
loginName
;
// setRank(newVal, oldVal) {
this
.
projectDirectorName
=
e
[
0
].
userName
;
// if (newVal == "其他定级方式") {
this
.
show
=
false
;
// this.showSetRankMode = true;
// } else {
// this.showSetRankMode = false;
// }
// },
}
}
},
watch
:
{
// setRank(newVal, oldVal) {
// if (newVal == "其他定级方式") {
// this.showSetRankMode = true;
// } else {
// this.showSetRankMode = false;
// }
// },
}
};
};
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
/* @import url(); 引入css类 */
/* @import url(); 引入css类 */
.con-list {
.con-list {
margin-bottom: 1.5rem;
margin-bottom: 1.5rem;
padding: 0;
padding: 0;
background-color: #f0f1f5;
background-color: #f0f1f5;
.van-cell-group--inset {
.van-cell-group--inset {
margin: 0;
margin: 0;
margin-bottom: 0.26667rem;
margin-bottom: 0.26667rem;
padding: 0.25rem;
padding: 0.25rem;
font-size: 0.4rem;
font-size: 0.4rem;
position: relative;
position: relative;
border-radius: 4%;
border-radius: 4%;
box-shadow: 0px 0px 10px 2px #f3f3f3;
box-shadow: 0px 0px 10px 2px #f3f3f3;
width: 90%;
width: 90%;
margin: 0.4rem auto;
margin: 0.4rem auto;
.van-row {
.van-row {
font-size: 0.4rem;
font-size: 0.4rem;
line-height: 0.8rem;
line-height: 0.8rem;
margin-bottom: 0;
margin-bottom: 0;
}
}
.van-overlay {
.van-overlay {
position: absolute;
position: absolute;
.wrapper {
.wrapper {
display: flex;
display: flex;
align-items: center;
align-items: center;
justify-content: space-evenly;
justify-content: space-evenly;
height: 100%;
height: 100%;
}
}
}
}
}
}
}
}
.btns {
.btns {
margin: 10px 10px 0 10px;
margin: 10px 10px 0 10px;
border: none;
border: none;
border-bottom: 1px solid #efefef;
border-bottom: 1px solid #efefef;
color: #2980f7;
color: #2980f7;
}
}
</
style
>
</
style
>
src/views/riskProject/add/addInherent.vue
View file @
14b930e3
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
readonly
readonly
required
required
name=
"projectId"
name=
"projectId"
:value=
"form.project
Id
"
:value=
"form.project
Name
"
label=
"所属项目"
label=
"所属项目"
placeholder=
"请输入"
placeholder=
"请输入"
/>
/>
...
...
src/views/riskProject/add/addPresent.vue
View file @
14b930e3
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
readonly
readonly
required
required
name=
"projectId"
name=
"projectId"
:value=
"form.project
Id
"
:value=
"form.project
Name
"
label=
"所属项目"
label=
"所属项目"
placeholder=
"请输入"
placeholder=
"请输入"
/>
/>
...
@@ -44,12 +44,11 @@
...
@@ -44,12 +44,11 @@
<van-field
<van-field
required
required
clickable
readonly
name=
"floorName"
name=
"floorName"
:value=
"form.floorName"
:value=
"form.floorName"
label=
"所属楼层"
label=
"所属楼层"
placeholder=
"请选择"
placeholder=
"请选择"
@
click=
"seletFloor('floor')"
:rules=
"[
{ required: true, message: '所属楼层不能为空' }]"
:rules=
"[
{ required: true, message: '所属楼层不能为空' }]"
/>
/>
...
@@ -60,7 +59,6 @@
...
@@ -60,7 +59,6 @@
:value=
"form.roomName"
:value=
"form.roomName"
label=
"所属房间"
label=
"所属房间"
placeholder=
"请输入"
placeholder=
"请输入"
@
click=
"seletRoom('room')"
:rules=
"[
{ required: true, message: '所属房间不能为空' }]"
:rules=
"[
{ required: true, message: '所属房间不能为空' }]"
/>
/>
...
@@ -616,6 +614,7 @@ export default {
...
@@ -616,6 +614,7 @@ export default {
this
.
form
.
deptName
=
userInfo
.
dept
.
deptName
;
this
.
form
.
deptName
=
userInfo
.
dept
.
deptName
;
this
.
form
.
planId
=
this
.
$route
.
params
.
planId
;
this
.
form
.
planId
=
this
.
$route
.
params
.
planId
;
this
.
form
.
floorId
=
this
.
$route
.
params
.
floorId
;
this
.
form
.
floorId
=
this
.
$route
.
params
.
floorId
;
this
.
form
.
floorName
=
this
.
$route
.
params
.
floorName
;
this
.
form
.
roomId
=
this
.
$route
.
params
.
roomId
;
this
.
form
.
roomId
=
this
.
$route
.
params
.
roomId
;
this
.
form
.
inherentId
=
this
.
$route
.
params
.
id
;
this
.
form
.
inherentId
=
this
.
$route
.
params
.
id
;
this
.
form
.
roomName
=
this
.
$route
.
params
.
roomName
;
this
.
form
.
roomName
=
this
.
$route
.
params
.
roomName
;
...
@@ -753,7 +752,7 @@ export default {
...
@@ -753,7 +752,7 @@ export default {
},
},
//开始测评
//开始测评
goResultPage
()
{
goResultPage
()
{
this
.
$router
.
push
({
this
.
$router
.
replace
({
name
:
"
resultPage
"
,
name
:
"
resultPage
"
,
params
:
{
params
:
{
score
:
this
.
severityScore
*
this
.
possibleScore
score
:
this
.
severityScore
*
this
.
possibleScore
...
...
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