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
165a0c1c
Commit
165a0c1c
authored
Jul 13, 2023
by
杨帆
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev-yf'' into 'develop'
Dev yf' See merge request
!14
parents
c8757c18
3e50c046
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
3091 additions
and
1977 deletions
+3091
-1977
src/App.vue
src/App.vue
+1
-1
src/views/riskProject/add/addCurrent.vue
src/views/riskProject/add/addCurrent.vue
+849
-639
src/views/riskProject/add/addInherent.vue
src/views/riskProject/add/addInherent.vue
+393
-125
src/views/riskProject/add/addPresent.vue
src/views/riskProject/add/addPresent.vue
+908
-649
src/views/riskProject/add/index.vue
src/views/riskProject/add/index.vue
+10
-6
src/views/riskProject/add/inherentRisks.vue
src/views/riskProject/add/inherentRisks.vue
+94
-55
src/views/riskProject/add/taskList.vue
src/views/riskProject/add/taskList.vue
+13
-6
src/views/riskProject/manage/index.vue
src/views/riskProject/manage/index.vue
+2
-1
src/views/riskProject/taskLedger/index.vue
src/views/riskProject/taskLedger/index.vue
+21
-6
src/views/riskProject/taskLedger/presentDetail.vue
src/views/riskProject/taskLedger/presentDetail.vue
+388
-245
src/views/riskProject/taskLedger/tabDetail.vue
src/views/riskProject/taskLedger/tabDetail.vue
+410
-242
vue.config.js
vue.config.js
+2
-2
No files found.
src/App.vue
View file @
165a0c1c
...
@@ -63,7 +63,7 @@ export default {
...
@@ -63,7 +63,7 @@ export default {
"
riskAssess
"
,
"
riskAssess
"
,
"
riskApprove
"
,
"
riskApprove
"
,
"
taskList
"
,
"
taskList
"
,
"
taskDetail
"
,
"
taskDetail
"
],
],
// cachePage预先定义的缓存页面
// cachePage预先定义的缓存页面
otherCache
:
[],
otherCache
:
[],
...
...
src/views/riskProject/add/addCurrent.vue
View file @
165a0c1c
<
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
@
submit=
"onSubmit"
:scroll-to-error=
"true"
:show-error=
"false"
validate-trigger=
"onSubmit"
>
<van-form
<div
@
submit=
"onSubmit"
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
:scroll-to-error=
"true"
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
:show-error=
"false"
style=
"position: relative;top: 32%;transform: translateY(-50%);"
>
validate-trigger=
"onSubmit"
风险信息
>
</div>
<div
<van-field
readonly
required
name=
"userName"
:value=
"form.userName"
label=
"评估人"
placeholder=
"请输入"
/>
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
<van-field
readonly
required
name=
"projectId"
:value=
"form.projectId"
label=
"所属项目"
placeholder=
"请输入"
/>
>
<van-field
readonly
required
name=
"buildingName"
:value=
"form.buildingName"
label=
"所属建筑物"
<img
placeholder=
"请输入"
/>
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
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.projectId"
label=
"所属项目"
placeholder=
"请输入"
/>
<van-field
readonly
required
name=
"buildingName"
:value=
"form.buildingName"
label=
"所属建筑物"
placeholder=
"请输入"
/>
<van-field
required
clickable
name=
"floorId"
:value=
"form.floorId"
label=
"所属楼层"
placeholder=
"请选择"
<van-field
@
click=
"seletFloor('floor')"
:rules=
"[
{ required: true, message: '所属楼层不能为空' }]" />
required
clickable
name=
"floorName"
:value=
"form.floorName"
label=
"所属楼层"
placeholder=
"请选择"
@
click=
"seletFloor('floor')"
:rules=
"[
{ required: true, message: '所属楼层不能为空' }]"
/>
<van-field
readonly
required
name=
"roomName"
:value=
"form.roomName"
label=
"所属房间"
placeholder=
"请输入"
<van-field
@
click=
"seletRoom('room')"
:rules=
"[
{ required: true, message: '所属房间不能为空' }]" />
readonly
required
name=
"roomName"
:value=
"form.roomName"
label=
"所属房间"
placeholder=
"请输入"
@
click=
"seletRoom('room')"
:rules=
"[
{ required: true, message: '所属房间不能为空' }]"
/>
<van-field
readonly
required
name=
"name"
v-model=
"form.name"
label=
"风险源名称"
placeholder=
"请输入"
<van-field
:rules=
"[
{ required: true, message: '风险源名称不能为空' }]" @click="seletSource()" />
readonly
required
name=
"name"
v-model=
"form.name"
label=
"风险源名称"
placeholder=
"请输入"
:rules=
"[
{ required: true, message: '风险源名称不能为空' }]"
@click="seletSource()"
/>
<van-field
v-model=
"form.factor"
required
name=
"factor"
label=
"风险因素"
placeholder=
"请选择"
<van-field
@
click=
"seletFactor('factor')"
:rules=
"[
{ required: true, message: '风险因素不能为空' }]" />
v-model=
"form.factor"
required
name=
"factor"
label=
"风险因素"
placeholder=
"请选择"
@
click=
"seletFactor('factor')"
:rules=
"[
{ required: true, message: '风险因素不能为空' }]"
/>
<van-field
v-model=
"form.type"
required
name=
"type"
label=
"准事故类型"
placeholder=
"请选择"
<van-field
@
click=
"seletType('type')"
:rules=
"[
{ required: true, message: '准事故类型不能为空' }]" />
v-model=
"form.type"
required
name=
"type"
label=
"准事故类型"
placeholder=
"请选择"
@
click=
"seletType('type')"
:rules=
"[
{ required: true, message: '准事故类型不能为空' }]"
/>
<van-field
readonly
v-model=
"form.level"
required
name=
"level"
label=
"风险等级"
placeholder=
"请选择"
<van-field
@
click=
"seletGrade('level')"
:rules=
"[
{ required: true, message: '风险等级不能为空' }]" />
readonly
v-model=
"form.level"
required
name=
"level"
label=
"风险等级"
placeholder=
"请选择"
@
click=
"seletGrade('level')"
:rules=
"[
{ required: true, message: '风险等级不能为空' }]"
/>
<van-field
required
name=
"presenceLocation"
v-model=
"form.presenceLocation"
label=
"存在部位"
<van-field
placeholder=
"请输入"
:rules=
"[
{ required: true, message: '存在部位不能为空' }]" />
required
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=
""
>
style=
"position: relative;top: 32%;transform: translateY(-50%);"
>
<img
风险源图片
src=
"@/assets/accidentIcon/bookmark.svg"
</div>
alt=
""
<van-field
name=
"hdPicture1"
label=
"风险源图片"
>
style=
"position: relative;top: 32%;transform: translateY(-50%);"
<template
#input
>
/>
<van-uploader
@
delete=
"deleteFile(...arguments, 'uploaderImg')"
multiple
:max-count=
"5"
风险源图片
upload-text=
"最多上传五个"
v-model=
"uploaderImg"
>
</div>
<template
slot=
"default"
>
<van-field
name=
"hdPicture1"
label=
"风险源图片"
>
<!-- 11111111111 -->
<template
#input
>
<div
style=
"
<van-uploader
@
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;
...
@@ -56,29 +147,53 @@
...
@@ -56,29 +147,53 @@
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"
/>
>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
<img
</div>
src=
"@/assets/upload/pic.png"
</
template
>
alt=
""
</van-uploader>
style=
"width: 0.64rem; height: 0.64rem"
</template>
/>
</van-field>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
<div
</div>
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
</
template
>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
</van-uploader>
style=
"position: relative;top: 32%;transform: translateY(-50%);"
>
</template>
技术措施
</van-field>
</div>
<div
<van-field
v-model=
"form.measuresProject"
name=
"measuresProject"
label=
"技术措施"
type=
"textarea"
rows=
"1"
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
autosize
placeholder=
"请输入"
/>
>
<van-field
name=
"measuresProjectFile[]"
label=
" "
>
<img
<
template
#input
>
src=
"@/assets/accidentIcon/bookmark.svg"
<van-uploader
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresProjectFile"
alt=
""
accept=
"file"
result-type=
"file"
@
delete=
"deleteFile(...arguments, 'measuresProjectFile')"
>
style=
"position: relative;top: 32%;transform: translateY(-50%);"
<template
slot=
"default"
>
/>
<!-- 11111111111 -->
技术措施
<div
style=
"
</div>
<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;
...
@@ -86,31 +201,53 @@
...
@@ -86,31 +201,53 @@
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
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
src=
"@/assets/upload/file.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.measuresAdministration"
name=
"measuresAdministration"
label=
"管理措施"
>
type=
"textarea"
rows=
"1"
autosize
placeholder=
"请输入"
/>
<img
<van-field
name=
"measuresAdministrationFile[]"
label=
" "
>
src=
"@/assets/accidentIcon/bookmark.svg"
<
template
#input
>
alt=
""
<van-uploader
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresAdministrationFile"
style=
"position: relative;top: 32%;transform: translateY(-50%);"
accept=
"file"
result-type=
"file"
/>
@
delete=
"deleteFile(...arguments, 'measuresAdministrationFile')"
>
管理措施
<template
slot=
"default"
>
</div>
<!-- 11111111111 -->
<van-field
<div
style=
"
v-model=
"form.measuresAdministration"
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;
...
@@ -118,31 +255,53 @@
...
@@ -118,31 +255,53 @@
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
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
src=
"@/assets/upload/file.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.measuresEmergency"
name=
"measuresEmergency"
label=
"应急措施"
type=
"textarea"
>
rows=
"1"
autosize
placeholder=
"请输入"
/>
<img
<van-field
name=
"measuresEmergencyFile[]"
label=
" "
>
src=
"@/assets/accidentIcon/bookmark.svg"
<
template
#input
>
alt=
""
<van-uploader
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresEmergencyFile"
style=
"position: relative;top: 32%;transform: translateY(-50%);"
accept=
"file"
result-type=
"file"
/>
@
delete=
"deleteFile(...arguments, 'measuresEmergencyFile')"
>
应急措施
<template
slot=
"default"
>
</div>
<!-- 11111111111 -->
<van-field
<div
style=
"
v-model=
"form.measuresEmergency"
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;
...
@@ -150,22 +309,30 @@
...
@@ -150,22 +309,30 @@
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
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
src=
"@/assets/upload/file.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
>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
参考依据
</div>
<!-- <van-field
readonly
readonly
required
required
clickable
clickable
...
@@ -177,63 +344,89 @@
...
@@ -177,63 +344,89 @@
:rules="[{ required: true, message: '事故类型不能为空' }]"
:rules="[{ required: true, message: '事故类型不能为空' }]"
/> -->
/> -->
<div
style=
"margin: 16px 16px 0"
>
<van-button
round
block
type=
"info"
native-type=
"submit"
>
提交
</van-button
>
</div>
</van-form>
<div
style=
"margin: 10px 16px 0px; padding-bottom: 16px"
>
<van-button
round
block
type=
"warning"
@
click.native=
"cancel"
>
取消
</van-button
>
</div>
</van-tab>
<van-tab
title=
"现状风险"
>
<div
class=
"con-list"
@
touchmove=
"showIndex = null"
>
<van-cell-group
inset
v-for=
"(item, index) in messageList"
:key=
"index"
>
<div
style=
"font-size: 0.45rem;padding: 5px 0;"
>
{{ item.title }}
</div>
<div
style=
"margin: 16px 16px 0"
>
<van-row
gutter=
""
>
<van-button
round
block
type=
"info"
native-type=
"submit"
>
上报
</van-button>
<van-col
span=
"17"
>
</div>
<van-row
gutter=
""
>
</van-form>
<van-col
span=
"9"
>
风险系数:
</van-col>
<div
style=
"margin: 10px 16px 0px; padding-bottom: 16px"
>
<van-col
span=
"15"
>
{{ item.time }}
</van-col>
<van-button
round
block
type=
"warning"
@
click.native=
"cancel"
>
取消
</van-button>
</van-row>
</div>
<van-row
gutter=
""
>
</van-tab>
<van-col
span=
"9"
>
创建时间:
</van-col>
<van-tab
title=
"现状风险"
>
<van-col
span=
"15"
>
{{ item.name }}
</van-col>
<div
class=
"con-list"
@
touchmove=
"showIndex = null"
>
</van-row>
<van-cell-group
inset
v-for=
"(item, index) in messageList"
:key=
"index"
>
<van-row
gutter=
""
>
<div
style=
"font-size: 0.45rem;padding: 5px 0;"
>
{{ item.title }}
</div>
<van-col
span=
"9"
>
风险描述:
</van-col>
<van-col
span=
"15"
>
{{ item.name }}
</van-col>
<van-row
gutter=
""
>
</van-row>
<van-col
span=
"17"
>
</van-col>
<van-row
gutter=
""
>
<van-col
<van-col
span=
"9"
>
风险系数:
</van-col>
span=
"7"
<van-col
span=
"15"
>
{{ item.time }}
</van-col>
:style=
"{ color: item.state == 1 ? '#0069e5' : '#03b615' }"
</van-row>
>
<van-row
gutter=
""
>
{{ "●待审批" }}
<van-col
span=
"9"
>
创建时间:
</van-col>
</van-col>
<van-col
span=
"15"
>
{{ item.name }}
</van-col>
</van-row>
</van-row>
</van-cell-group>
<van-row
gutter=
""
>
<div
<van-col
span=
"9"
>
风险描述:
</van-col>
style=
"
<van-col
span=
"15"
>
{{ item.name }}
</van-col>
</van-row>
</van-col>
<van-col
span=
"7"
:style=
"{ 'color': item.state == 1 ? '#0069e5' : '#03b615' }"
>
{{ '●待审批' }}
</van-col>
</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-popup
v-model=
"showSource"
position=
"bottom"
>
<van-picker
show-toolbar
value-key=
"name"
:columns=
"columnsSource"
@
confirm=
"onConSource"
<van-picker
@
cancel=
"showSource = false"
/>
show-toolbar
</van-popup>
value-key=
"name"
<div
v-if=
"active != 0"
style=
"display: flex;
: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;
...
@@ -241,19 +434,32 @@
...
@@ -241,19 +434,32 @@
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
style=
"font-size: 22px;"
><van-icon
name=
"plus"
/></div>
<div
<div>
新增现状风险
</div>
@
click=
"performTasks"
</div>
style=
"color: #4bced0;font-size: 14px;font-weight: 600;"
</div>
>
<!-- 风险源 -->
<div
style=
"font-size: 22px;"
><van-icon
name=
"plus"
/></div>
<van-popup
v-model=
"visiableSource"
round
position=
"bottom"
:style=
"{ height: '30%',display:'flex',flexDirection:'column', }"
>
<div>
新增现状风险
</div>
<van-button
class=
"btns"
@
click=
"nameByselfInput"
>
输入风险源名称
</van-button>
</div>
<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
>
...
@@ -270,484 +476,488 @@ import { getFun, postFun } from "@/service/table.js";
...
@@ -270,484 +476,488 @@ 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
},
},
beforeRouteLeave
(
to
,
from
,
next
)
{
beforeRouteLeave
(
to
,
from
,
next
)
{
if
(
to
.
name
!=
"
matrix-grad
"
)
{
if
(
to
.
name
!=
"
matrix-grad
"
)
{
}
}
next
();
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
();
}
},
},
data
()
{
seletFloor
(
name
)
{
return
{
this
.
$toast
.
loading
({
inherentId
:
""
,
message
:
"
加载中...
"
,
text
:
"
编辑固有风险
"
,
forbidClick
:
true
,
id
:
""
,
loadingType
:
"
spinner
"
,
isTimely
:
1
,
duration
:
0
active
:
0
,
});
form
:
{
this
.
userPrefix
=
name
;
getFun
(
`/risk/plan/floor/list/
${
this
.
buildingIds
}
`
)
},
.
then
(
res
=>
{
projectId
:
""
,
// 所属工程
this
.
$toast
.
clear
();
projectName
:
""
,
// 所属工程
this
.
showSource
=
true
;
projectDirectorName
:
""
,
// 所属工程
this
.
columnsSource
=
res
.
data
;
projectDirector
:
""
,
// 所属工程
})
showProjectName
:
false
,
.
catch
(()
=>
{
show
:
false
,
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
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
()
{
seletRoom
(
name
)
{
if
(
this
.
$route
.
params
.
inherentId
||
sessionStorage
.
getItem
(
"
inherentId
"
))
{
this
.
$toast
.
loading
({
this
.
inherentId
=
this
.
$route
.
params
.
inherentId
||
sessionStorage
.
getItem
(
"
inherentId
"
)
message
:
"
加载中...
"
,
this
.
buildingIds
=
this
.
$route
.
params
.
buildingId
||
sessionStorage
.
getItem
(
"
buildingId
"
)
forbidClick
:
true
,
this
.
postReturnEcho
();
loadingType
:
"
spinner
"
,
}
duration
:
0
// this.getList();
});
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
(
"
加载失败,请稍后再试
"
);
});
},
},
methods
:
{
seletFactor
(
name
)
{
tabList
(
value
)
{
this
.
showTrouble
=
true
;
console
.
log
(
'
%c [ value ]-527
'
,
'
font-size:13px; background:pink; color:#bf2c9f;
'
,
value
)
this
.
riskName
=
name
;
if
(
value
==
1
)
{
this
.
columnsTrouble
=
[
this
.
getList
();
{
}
name
:
"
人的因素
"
},
},
seletFloor
(
name
)
{
{
this
.
$toast
.
loading
({
name
:
"
物的因素
"
message
:
"
加载中...
"
,
forbidClick
:
true
,
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
)
{
{
this
.
$toast
.
loading
({
name
:
"
环境因素
"
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
(
"
加载失败,请稍后再试
"
);
});
},
},
seletFactor
(
name
)
{
{
this
.
showTrouble
=
true
name
:
"
管理因素
"
this
.
riskName
=
name
}
this
.
columnsTrouble
=
[
];
{
},
name
:
'
人的因素
'
,
seletType
(
name
)
{
},
this
.
showTrouble
=
true
;
{
this
.
riskName
=
name
;
name
:
'
物的因素
'
,
this
.
columnsTrouble
=
[
},
{
{
name
:
"
物体打击
"
name
:
'
环境因素
'
,
},
{
name
:
'
管理因素
'
,
},
]
},
seletType
(
name
)
{
this
.
showTrouble
=
true
this
.
riskName
=
name
this
.
columnsTrouble
=
[
{
name
:
'
物体打击
'
,
},
{
name
:
'
车辆伤害
'
,
},
{
name
:
'
起重伤害
'
,
},
{
name
:
'
机械伤害
'
,
},
]
},
seletGrade
(
name
)
{
this
.
showTrouble
=
true
this
.
riskName
=
name
this
.
columnsTrouble
=
[
{
name
:
'
重大风险
'
,
},
{
name
:
'
较大风险
'
,
},
{
name
:
'
一般风险
'
,
},
{
name
:
'
较小风险
'
,
},
]
},
},
performTasks
()
{
{
this
.
$router
.
push
({
name
:
"
车辆伤害
"
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
)
{
name
:
"
起重伤害
"
console
.
log
(
e
);
if
(
e
.
filePath
)
{
this
.
videoUrl
=
e
.
filePath
;
}
else
{
this
.
videoUrl
=
e
.
content
;
}
},
},
async
deleteFile
(
val
,
detail
,
key
)
{
{
// console.log(val,detail)
name
:
"
机械伤害
"
if
(
val
.
fileId
)
{
}
let
formdata
=
new
FormData
();
];
formdata
.
append
(
"
key
"
,
val
[
"
fileId
"
]);
},
let
res
=
await
postFun
(
"
/mobile/remove
"
,
formdata
);
seletGrade
(
name
)
{
if
(
res
)
{
this
.
showTrouble
=
true
;
console
.
log
(
res
);
this
.
riskName
=
name
;
this
.
$toast
({
this
.
columnsTrouble
=
[
title
:
"
提示
"
,
{
message
:
"
删除成功!
"
,
name
:
"
重大风险
"
});
}
else
{
console
.
log
(
"
删除失败
"
);
this
[
key
].
splice
(
detail
.
index
,
0
,
val
);
}
}
},
},
onSubmit
(
values
)
{
{
let
url
=
"
/riskMain/add
"
;
name
:
"
较大风险
"
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
:
"
一般风险
"
getList
()
{
getFun
(
`/risk/plan/existing/list/
${
this
.
inherentId
}
`
)
.
then
((
res
)
=>
{
console
.
log
(
'
%c [ res ]-670
'
,
'
font-size:13px; background:pink; color:#bf2c9f;
'
,
res
)
this
.
messageList
=
res
.
data
;
})
.
catch
(()
=>
{
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
},
},
{
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
();
},
// 请求已退回详情数据
// 请求表单数据
postReturnEcho
()
{
getList
()
{
this
.
$toast
.
loading
({
getFun
(
`/risk/plan/existing/list/
${
this
.
inherentId
}
`
)
message
:
"
加载中...
"
,
.
then
(
res
=>
{
forbidClick
:
true
,
console
.
log
(
loadingType
:
"
spinner
"
,
"
%c [ res ]-670
"
,
duration
:
0
,
"
font-size:13px; background:pink; color:#bf2c9f;
"
,
});
res
getFun
(
`/risk/plan/inherent/details/
${
this
.
inherentId
}
`
)
);
.
then
((
res
)
=>
{
this
.
messageList
=
res
.
data
;
this
.
form
=
res
.
data
})
this
.
uploaderImg
=
(
res
.
data
.
pictureFile
||
[]).
map
(
.
catch
(()
=>
{
(
item
)
=>
{
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
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
();
});
},
// 所属项目
// 请求已退回详情数据
onConProjectName
(
value
)
{
postReturnEcho
()
{
if
(
!
value
)
{
this
.
$toast
.
loading
({
this
.
showProjectName
=
false
;
message
:
"
加载中...
"
,
return
;
forbidClick
:
true
,
}
loadingType
:
"
spinner
"
,
this
.
projectId
=
value
.
id
;
duration
:
0
this
.
projectName
=
value
.
projectName
;
});
this
.
showProjectName
=
false
;
getFun
(
`/risk/plan/inherent/details/
${
this
.
inherentId
}
`
)
},
.
then
(
res
=>
{
// 风险因素
this
.
form
=
res
.
data
;
onConFactor
(
value
)
{
this
.
uploaderImg
=
(
res
.
data
.
pictureFile
||
[]).
map
(
item
=>
{
if
(
!
value
)
{
return
{
this
.
showFactor
=
false
;
...
item
,
return
;
url
:
item
.
filePath
}
};
this
.
factor
=
value
.
factorType
;
});
this
.
showFactor
=
false
;
this
.
measuresProjectFile
=
(
res
.
data
.
measuresProjectFile
||
[]).
map
(
this
.
source
=
""
;
item
=>
{
this
.
trouble
=
""
;
return
{
// 请求风险源
...
item
,
postHdSource
(
`/riskMain/showSourceName?factorType=
${
this
.
factor
}
`
).
then
(
url
:
item
.
filePath
(
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
.
measuresAdministrationFile
=
(
this
.
showSource
=
false
;
res
.
data
.
measuresAdministrationFile
||
[]
},
).
map
(
item
=>
{
seletSource
()
{
return
{
this
.
visiableSource
=
true
...
item
,
},
url
:
item
.
filePath
//从风险清单列表导入
};
importFromList
(){
});
this
.
measuresEmergencyFile
=
(
},
res
.
data
.
measuresEmergencyFile
||
[]
//输入风险源名称
).
map
(
item
=>
{
nameByselfInput
(){
return
{
...
item
,
},
url
:
item
.
filePath
//取消风险弹窗
};
cancleSource
(){
});
this
.
visiableSource
=
false
})
},
.
catch
(()
=>
{
this
.
$toast
.
clear
();
});
},
// 事故类型
// 所属项目
onConTrouble
(
value
)
{
onConProjectName
(
value
)
{
if
(
!
value
)
{
if
(
!
value
)
{
this
.
showTrouble
=
false
;
this
.
showProjectName
=
false
;
return
;
return
;
}
}
this
.
form
[
this
.
riskName
]
=
value
.
name
;
this
.
projectId
=
value
.
id
;
this
.
showTrouble
=
false
;
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
;
},
seletSource
()
{
this
.
visiableSource
=
true
;
},
//从风险清单列表导入
importFromList
()
{},
//输入风险源名称
nameByselfInput
()
{},
//取消风险弹窗
cancleSource
()
{
this
.
visiableSource
=
false
;
},
},
// 事故类型
// 风险定级
onConTrouble
(
value
)
{
onConSetRank
(
value
)
{
if
(
!
value
)
{
this
.
showSetRank
=
false
;
this
.
showTrouble
=
false
;
this
.
setRank
=
value
;
return
;
this
.
riskRank
=
""
;
}
if
(
this
.
setRank
==
"
矩阵式定级
"
)
{
this
.
form
[
this
.
riskName
]
=
value
.
name
;
this
.
showSetRank
=
false
;
this
.
showTrouble
=
false
;
this
.
$router
.
push
({
},
name
:
"
matrix-grad
"
,
// 风险定级
});
onConSetRank
(
value
)
{
}
this
.
showSetRank
=
false
;
},
this
.
setRank
=
value
;
// 自己定义风险等级点击方法
this
.
riskRank
=
""
;
myRiskRank
()
{
if
(
this
.
setRank
==
"
矩阵式定级
"
)
{
if
(
this
.
setRank
==
""
)
{
this
.
showSetRank
=
false
;
this
.
$toast
(
"
请先选择风险定级
"
);
this
.
$router
.
push
({
}
else
if
(
this
.
setRank
==
"
其他定级方式
"
)
{
name
:
"
matrix-grad
"
this
.
showRiskRank
=
true
;
});
}
}
},
},
// 风险等级
// 自己定义风险等级点击方法
onConRiskRank
(
value
)
{
myRiskRank
()
{
this
.
riskRank
=
value
;
if
(
this
.
setRank
==
""
)
{
this
.
showRiskRank
=
false
;
this
.
$toast
(
"
请先选择风险定级
"
);
},
}
else
if
(
this
.
setRank
==
"
其他定级方式
"
)
{
this
.
showRiskRank
=
true
;
}
},
// 风险等级
onConRiskRank
(
value
)
{
this
.
riskRank
=
value
;
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
()
{
this
.
show
=
false
;
},
onSave
(
e
)
{
this
.
projectDirector
=
e
[
0
].
loginName
this
.
projectDirectorName
=
e
[
0
].
userName
this
.
show
=
false
;
},
},
},
watch
:
{
onClose
()
{
// setRank(newVal, oldVal) {
this
.
show
=
false
;
// if (newVal == "其他定级方式") {
// this.showSetRankMode = true;
// } else {
// this.showSetRankMode = false;
// }
// },
},
},
onSave
(
e
)
{
this
.
projectDirector
=
e
[
0
].
loginName
;
this
.
projectDirectorName
=
e
[
0
].
userName
;
this
.
show
=
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: #2980F
7;
color: #2980f
7;
}
}
</
style
>
</
style
>
src/views/riskProject/add/addInherent.vue
View file @
165a0c1c
<
template
>
<
template
>
<div>
<div>
<LHeader
:text=
"text"
></LHeader>
<LHeader
:text=
"text"
></LHeader>
<van-form
@
submit=
"onSubmit"
: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
name=
"userName"
:value=
"form.userName"
label=
"评估人"
placeholder=
"请输入"
/>
<van-field
<van-field
readonly
required
name=
"projectId"
:value=
"form.projectId"
label=
"所属项目"
placeholder=
"请输入"
/>
readonly
<van-field
readonly
required
name=
"buildingName"
:value=
"form.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
required
clickable
name=
"floorName"
:value=
"form.floorName"
label=
"所属楼层"
placeholder=
"请选择"
<van-field
@
click=
"seletFloor('floor')"
:rules=
"[
{ required: true, message: '所属楼层不能为空' }]" />
required
clickable
name=
"floorName"
:value=
"form.floorName"
label=
"所属楼层"
placeholder=
"请选择"
@
click=
"seletFloor('floor')"
:rules=
"[
{ required: true, message: '所属楼层不能为空' }]"
/>
<div
style=
"display: flex;"
>
<div
style=
"display: flex;"
>
<van-field
readonly
required
name=
"roomName"
:value=
"form.roomName"
label=
"所属房间"
placeholder=
"请输入"
<van-field
@
click=
"seletRoom('room')"
:rules=
"[
{ required: true, message: '所属房间不能为空' }]" />
readonly
<van-button
style=
"color: #cccc;background-color: #f0f1f5;"
icon=
"plus"
type=
"info"
native-type=
"button"
required
@
click=
"tjfjClcik"
/>
name=
"roomName"
:value=
"form.roomName"
label=
"所属房间"
placeholder=
"请输入"
@
click=
"seletRoom('room')"
:rules=
"[
{ required: true, message: '所属房间不能为空' }]"
/>
<van-button
style=
"color: #cccc;background-color: #f0f1f5;"
icon=
"plus"
type=
"info"
native-type=
"button"
@
click=
"tjfjClcik"
/>
</div>
</div>
<van-field
required
clickable
name=
"name"
v-model=
"form.name"
label=
"风险源名称"
placeholder=
"请输入"
<van-field
:rules=
"[
{ required: true, message: '风险源名称不能为空' }]" />
required
<van-field
v-model=
"form.factor"
readonly
required
name=
"factor"
label=
"风险因素"
placeholder=
"请选择"
clickable
@
click=
"seletFactor('factor')"
:rules=
"[
{ required: true, message: '风险因素不能为空' }]" />
name=
"name"
v-model=
"form.name"
label=
"风险源名称"
placeholder=
"请输入"
:rules=
"[
{ required: true, message: '风险源名称不能为空' }]"
/>
<van-field
v-model=
"form.factor"
readonly
required
name=
"factor"
label=
"风险因素"
placeholder=
"请选择"
@
click=
"seletFactor('factor')"
:rules=
"[
{ required: true, message: '风险因素不能为空' }]"
/>
<van-field
readonly
v-model=
"form.type"
required
name=
"type"
label=
"准事故类型"
placeholder=
"请选择"
<van-field
@
click=
"seletType('type')"
:rules=
"[
{ required: true, message: '准事故类型不能为空' }]" />
readonly
v-model=
"form.type"
required
name=
"type"
label=
"准事故类型"
placeholder=
"请选择"
@
click=
"seletType('type')"
:rules=
"[
{ required: true, message: '准事故类型不能为空' }]"
/>
<van-field
readonly
v-model=
"form.level"
required
name=
"level"
label=
"风险等级"
placeholder=
"请选择"
@
click=
"seletGrade"
<van-field
:rules=
"[
{ required: true, message: '风险等级不能为空' }]" />
readonly
v-model=
"form.level"
required
name=
"level"
label=
"风险等级"
placeholder=
"请选择"
@
click=
"seletGrade"
:rules=
"[
{ required: true, message: '风险等级不能为空' }]"
/>
<!--
<van-field
readonly
v-model=
"form.level"
required
name=
"level"
label=
"风险等级"
placeholder=
"请选择"
<!--
<van-field
readonly
v-model=
"form.level"
required
name=
"level"
label=
"风险等级"
placeholder=
"请选择"
@
click=
"seletGrade('level')"
:rules=
"[
{ required: true, message: '风险等级不能为空' }]" /> -->
@
click=
"seletGrade('level')"
:rules=
"[
{ required: true, message: '风险等级不能为空' }]" /> -->
<van-field
required
name=
"presenceLocation"
v-model=
"form.presenceLocation"
label=
"存在部位"
placeholder=
"请输入"
<van-field
:rules=
"[
{ required: true, message: '存在部位不能为空' }]" />
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;"
>
<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
name=
"hdPicture1"
label=
"风险源图片"
>
<van-field
name=
"hdPicture1"
label=
"风险源图片"
>
<template
#input
>
<template
#input
>
<van-uploader
@
delete=
"deleteFile(...arguments, 'uploaderImg')"
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
<van-uploader
v-model=
"uploaderImg"
>
@
delete=
"deleteFile(...arguments, 'uploaderImg')"
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"uploaderImg"
>
<template
slot=
"default"
>
<template
slot=
"default"
>
<!-- 11111111111 -->
<!-- 11111111111 -->
<div
style=
"
<div
style=
"
width: 2.13333rem;
width: 2.13333rem;
height: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
background: #f7f8fa;
...
@@ -56,28 +156,53 @@
...
@@ -56,28 +156,53 @@
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
v-model=
"form.measuresProject"
name=
"measuresProject"
label=
"技术措施"
type=
"textarea"
rows=
"1"
autosize
<van-field
placeholder=
"请输入"
/>
v-model=
"form.measuresProject"
name=
"measuresProject"
label=
"技术措施"
type=
"textarea"
rows=
"1"
autosize
placeholder=
"请输入"
/>
<van-field
name=
"measuresProjectFile[]"
label=
" "
>
<van-field
name=
"measuresProjectFile[]"
label=
" "
>
<
template
#input
>
<
template
#input
>
<van-uploader
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresProjectFile"
accept=
"file"
<van-uploader
result-type=
"file"
@
delete=
"deleteFile(...arguments, 'measuresProjectFile')"
>
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresProjectFile"
accept=
"file"
result-type=
"file"
@
delete=
"deleteFile(...arguments, 'measuresProjectFile')"
>
<template
slot=
"default"
>
<template
slot=
"default"
>
<!-- 11111111111 -->
<!-- 11111111111 -->
<div
style=
"
<div
style=
"
width: 2.13333rem;
width: 2.13333rem;
height: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
background: #f7f8fa;
...
@@ -85,28 +210,53 @@
...
@@ -85,28 +210,53 @@
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;"
>
<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
v-model=
"form.measuresAdministration"
name=
"measuresAdministration"
label=
"管理措施"
type=
"textarea"
rows=
"1"
<van-field
autosize
placeholder=
"请输入"
/>
v-model=
"form.measuresAdministration"
name=
"measuresAdministration"
label=
"管理措施"
type=
"textarea"
rows=
"1"
autosize
placeholder=
"请输入"
/>
<van-field
name=
"measuresAdministrationFile[]"
label=
" "
>
<van-field
name=
"measuresAdministrationFile[]"
label=
" "
>
<
template
#input
>
<
template
#input
>
<van-uploader
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresAdministrationFile"
accept=
"file"
<van-uploader
result-type=
"file"
@
delete=
"deleteFile(...arguments, 'measuresAdministrationFile')"
>
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresAdministrationFile"
accept=
"file"
result-type=
"file"
@
delete=
"deleteFile(...arguments, 'measuresAdministrationFile')"
>
<template
slot=
"default"
>
<template
slot=
"default"
>
<!-- 11111111111 -->
<!-- 11111111111 -->
<div
style=
"
<div
style=
"
width: 2.13333rem;
width: 2.13333rem;
height: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
background: #f7f8fa;
...
@@ -114,28 +264,53 @@
...
@@ -114,28 +264,53 @@
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;"
>
<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
v-model=
"form.measuresEmergency"
name=
"measuresEmergency"
label=
"应急措施"
type=
"textarea"
rows=
"1"
autosize
<van-field
placeholder=
"请输入"
/>
v-model=
"form.measuresEmergency"
name=
"measuresEmergency"
label=
"应急措施"
type=
"textarea"
rows=
"1"
autosize
placeholder=
"请输入"
/>
<van-field
name=
"measuresEmergencyFile[]"
label=
" "
>
<van-field
name=
"measuresEmergencyFile[]"
label=
" "
>
<
template
#input
>
<
template
#input
>
<van-uploader
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresEmergencyFile"
accept=
"file"
<van-uploader
result-type=
"file"
@
delete=
"deleteFile(...arguments, 'measuresEmergencyFile')"
>
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresEmergencyFile"
accept=
"file"
result-type=
"file"
@
delete=
"deleteFile(...arguments, 'measuresEmergencyFile')"
>
<template
slot=
"default"
>
<template
slot=
"default"
>
<!-- 11111111111 -->
<!-- 11111111111 -->
<div
style=
"
<div
style=
"
width: 2.13333rem;
width: 2.13333rem;
height: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
background: #f7f8fa;
...
@@ -143,17 +318,27 @@
...
@@ -143,17 +318,27 @@
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;"
>
<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
<!-- <van-field
...
@@ -167,61 +352,148 @@
...
@@ -167,61 +352,148 @@
@click="showTrouble = true"
@click="showTrouble = true"
:rules="[{ required: true, message: '事故类型不能为空' }]"
:rules="[{ required: true, message: '事故类型不能为空' }]"
/> -->
/> -->
<van-dialog
v-model=
"showGradeDialog"
title=
"风险评测配置"
:show-cancel-button=
"false"
:show-confirm-button=
"false"
>
<van-dialog
v-model=
"showGradeDialog"
title=
"风险评测配置"
:show-cancel-button=
"false"
:show-confirm-button=
"false"
>
<div
class=
"dialogContain"
>
<div
class=
"dialogContain"
>
<van-collapse
v-model=
"activeNames"
>
<van-collapse
v-model=
"activeNames"
>
<van-collapse-item
title=
"风险模型"
name=
"1"
>
<van-collapse-item
title=
"风险模型"
name=
"1"
>
<van-field
readonly
required
name=
"level"
label=
"当前风险模型"
placeholder=
"LS风险矩阵评估模型"
/>
<van-field
readonly
required
name=
"level"
label=
"当前风险模型"
placeholder=
"LS风险矩阵评估模型"
/>
</van-collapse-item>
</van-collapse-item>
<van-collapse-item
title=
"风险模型配置"
name=
"2"
>
<van-collapse-item
title=
"风险模型配置"
name=
"2"
>
<van-popover
v-model=
"showPopover"
trigger=
"click"
:actions=
"columnsRiskRank"
@
select=
"onSelect"
>
<van-popover
v-model=
"showPopover"
trigger=
"click"
:actions=
"columnsRiskRank"
@
select=
"onSelect"
>
<
template
#reference
>
<
template
#reference
>
<van-field
v-model=
"possibleValue"
readonly
required
name=
"level"
label=
"发生的可能性"
placeholder=
"请选择"
/>
<van-field
v-model=
"possibleValue"
readonly
required
name=
"level"
label=
"发生的可能性"
placeholder=
"请选择"
/>
</
template
>
</
template
>
</van-popover>
</van-popover>
<van-popover
v-model=
"showPopoveSetRank"
trigger=
"click"
:actions=
"columnsSetRank"
<van-popover
@
select=
"onSelectSetRank"
>
v-model=
"showPopoveSetRank"
trigger=
"click"
:actions=
"columnsSetRank"
@
select=
"onSelectSetRank"
>
<
template
#reference
>
<
template
#reference
>
<van-field
v-model=
"severityValue"
readonly
required
name=
"level"
label=
"后果严重程度"
placeholder=
"请选择"
/>
<van-field
v-model=
"severityValue"
readonly
required
name=
"level"
label=
"后果严重程度"
placeholder=
"请选择"
/>
</
template
>
</
template
>
</van-popover>
</van-popover>
</van-collapse-item>
</van-collapse-item>
</van-collapse>
</van-collapse>
<van-row
type=
"flex"
justify=
"center"
style=
"margin-top:10px"
>
<van-row
type=
"flex"
justify=
"center"
style=
"margin-top:10px"
>
<van-col
span=
"6"
><van-button
size=
"small"
plain
native-type=
"button"
type=
"info"
<van-col
span=
"6"
@
click=
"showGradeDialog = false"
>
取消
</van-button></van-col>
><van-button
<van-col
span=
"6"
><van-button
size=
"small"
type=
"info"
native-type=
"button"
size=
"small"
@
click=
"goResultPage"
>
开始测评
</van-button></van-col>
plain
native-type=
"button"
type=
"info"
@
click=
"showGradeDialog = false"
>
取消
</van-button
></van-col
>
<van-col
span=
"6"
><van-button
size=
"small"
type=
"info"
native-type=
"button"
@
click=
"goResultPage"
>
开始测评
</van-button
></van-col
>
</van-row>
</van-row>
</div>
</div>
</van-dialog>
</van-dialog>
<van-popup
v-model=
"showTrouble"
position=
"bottom"
>
<van-popup
v-model=
"showTrouble"
position=
"bottom"
>
<van-picker
show-toolbar
value-key=
"name"
:columns=
"columnsTrouble"
@
confirm=
"onConTrouble"
<van-picker
@
cancel=
"showTrouble = false"
/>
show-toolbar
value-key=
"name"
:columns=
"columnsTrouble"
@
confirm=
"onConTrouble"
@
cancel=
"showTrouble = false"
/>
</van-popup>
</van-popup>
<van-popup
v-model=
"showSource"
position=
"bottom"
>
<van-popup
v-model=
"showSource"
position=
"bottom"
>
<van-picker
show-toolbar
value-key=
"name"
:columns=
"columnsSource"
@
confirm=
"onConSource"
<van-picker
@
cancel=
"showSource = false"
/>
show-toolbar
value-key=
"name"
:columns=
"columnsSource"
@
confirm=
"onConSource"
@
cancel=
"showSource = false"
/>
</van-popup>
</van-popup>
<!-- 楼层弹出层 -->
<!-- 楼层弹出层 -->
<van-popup
v-model=
"ShowfloorList"
position=
"bottom"
:style=
"{ height: '100%' }"
>
<van-popup
<selectFloor
:listdata=
"floorSource"
@
closeSlect=
"closeSlectfloor"
@
saveSlect=
"saveSlectfloor"
></selectFloor>
v-model=
"ShowfloorList"
position=
"bottom"
:style=
"{ height: '100%' }"
>
<selectFloor
:listdata=
"floorSource"
@
closeSlect=
"closeSlectfloor"
@
saveSlect=
"saveSlectfloor"
></selectFloor>
</van-popup>
</van-popup>
<!-- 风险源弹出层 -->
<!-- 风险源弹出层 -->
<van-popup
v-model=
"ShowSelectList"
position=
"bottom"
:style=
"{ height: '100%' }"
>
<van-popup
<selectList
:listdata=
"columnsTrouble"
@
closeSlect=
"closeSlect"
@
saveSlect=
"saveSlect"
></selectList>
v-model=
"ShowSelectList"
position=
"bottom"
:style=
"{ height: '100%' }"
>
<selectList
:listdata=
"columnsTrouble"
@
closeSlect=
"closeSlect"
@
saveSlect=
"saveSlect"
></selectList>
</van-popup>
</van-popup>
<!-- 准事故类型 -->
<!-- 准事故类型 -->
<van-popup
v-model=
"ShowAccidentList"
position=
"bottom"
:style=
"{ height: '100%' }"
>
<van-popup
<selectList
:listdata=
"columnsAccident"
@
closeSlect=
"closeSlectAccident"
@
saveSlect=
"saveSlectAccident"
>
v-model=
"ShowAccidentList"
position=
"bottom"
:style=
"{ height: '100%' }"
>
<selectList
:listdata=
"columnsAccident"
@
closeSlect=
"closeSlectAccident"
@
saveSlect=
"saveSlectAccident"
>
</selectList>
</selectList>
</van-popup>
</van-popup>
<div
style=
"margin: 16px 16px 0"
>
<div
style=
"margin: 16px 16px 0"
>
<van-button
round
block
type=
"info"
native-type=
"submit"
>
上报
</van-button>
<van-button
round
block
type=
"info"
native-type=
"submit"
>
提交
</van-button
>
</div>
</div>
</van-form>
</van-form>
<div
style=
"margin: 10px 16px 0px; padding-bottom: 16px"
>
<div
style=
"margin: 10px 16px 0px; padding-bottom: 16px"
>
<van-button
round
block
type=
"warning"
@
click.native=
"cancel"
>
取消
</van-button>
<van-button
round
block
type=
"warning"
@
click.native=
"cancel"
>
取消
</van-button
>
</div>
</div>
</div>
</div>
</template>
</template>
...
@@ -273,15 +545,15 @@ export default {
...
@@ -273,15 +545,15 @@ export default {
});
});
},
},
beforeRouteEnter
(
to
,
from
,
next
)
{
beforeRouteEnter
(
to
,
from
,
next
)
{
if
(
from
.
name
==
'
riskInherent
'
)
{
if
(
from
.
name
==
"
riskInherent
"
)
{
sessionStorage
.
setItem
(
'
inherenForm
'
,
''
)
sessionStorage
.
setItem
(
"
inherenForm
"
,
""
);
sessionStorage
.
setItem
(
'
level
'
,
''
)
sessionStorage
.
setItem
(
"
level
"
,
""
);
}
}
next
()
next
()
;
},
},
beforeRouteLeave
(
to
,
from
,
next
)
{
beforeRouteLeave
(
to
,
from
,
next
)
{
if
(
to
.
name
!=
"
riskInherent
"
)
{
if
(
to
.
name
!=
"
riskInherent
"
)
{
sessionStorage
.
setItem
(
'
inherenForm
'
,
JSON
.
stringify
(
this
.
form
))
sessionStorage
.
setItem
(
"
inherenForm
"
,
JSON
.
stringify
(
this
.
form
));
}
}
next
();
next
();
},
},
...
@@ -377,37 +649,37 @@ export default {
...
@@ -377,37 +649,37 @@ export default {
this
.
form
.
userId
=
userInfo
.
userId
;
this
.
form
.
userId
=
userInfo
.
userId
;
this
.
form
.
userName
=
userInfo
.
userName
;
this
.
form
.
userName
=
userInfo
.
userName
;
this
.
form
.
deptName
=
userInfo
.
dept
.
deptName
;
this
.
form
.
deptName
=
userInfo
.
dept
.
deptName
;
(
this
.
form
.
projectId
=
"
测试项目
"
)
this
.
form
.
projectId
=
"
测试项目
"
;
},
},
mounted
()
{
mounted
()
{
if
(
sessionStorage
.
getItem
(
'
inherenForm
'
)
!=
''
)
{
if
(
sessionStorage
.
getItem
(
"
inherenForm
"
)
!=
""
)
{
this
.
form
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'
inherenForm
'
))
this
.
form
=
JSON
.
parse
(
sessionStorage
.
getItem
(
"
inherenForm
"
));
this
.
form
.
level
=
sessionStorage
.
getItem
(
'
level
'
)
this
.
form
.
level
=
sessionStorage
.
getItem
(
"
level
"
);
}
}
this
.
getFloor
()
this
.
getFloor
();
this
.
getFXYS
()
this
.
getFXYS
();
this
.
getZSGLX
()
this
.
getZSGLX
();
},
},
methods
:
{
methods
:
{
renameKeyInTree
(
data
,
oldKey
,
newKey
)
{
renameKeyInTree
(
data
,
oldKey
,
newKey
)
{
let
arr
=
data
.
map
(
item
=>
{
let
arr
=
data
.
map
(
item
=>
{
const
newItem
=
{
...
item
};
const
newItem
=
{
...
item
};
if
(
item
.
hasOwnProperty
(
oldKey
))
{
if
(
item
.
hasOwnProperty
(
oldKey
))
{
newItem
[
newKey
]
=
newItem
[
oldKey
];
newItem
[
newKey
]
=
newItem
[
oldKey
];
delete
newItem
[
oldKey
];
delete
newItem
[
oldKey
];
}
}
if
(
newItem
.
children
&&
newItem
.
children
.
length
>
0
)
{
if
(
newItem
.
children
&&
newItem
.
children
.
length
>
0
)
{
newItem
.
children
=
this
.
renameKeyInTree
(
newItem
.
children
=
this
.
renameKeyInTree
(
newItem
.
children
,
oldKey
,
newKey
);
newItem
.
children
,
oldKey
,
newKey
);
}
}
return
newItem
;
return
newItem
;
});
});
return
arr
;
return
arr
;
},
},
getFloor
()
{
getFloor
()
{
...
@@ -415,11 +687,9 @@ export default {
...
@@ -415,11 +687,9 @@ export default {
.
then
(
res
=>
{
.
then
(
res
=>
{
// this.$toast.clear();
// this.$toast.clear();
// this.showSource = true;
// this.showSource = true;
let
newArr
=
this
.
renameKeyInTree
(
res
.
data
,
'
name
'
,
'
text
'
)
this
.
floorSource
=
newArr
;
let
newArr
=
this
.
renameKeyInTree
(
res
.
data
,
"
name
"
,
"
text
"
);
this
.
floorSource
=
newArr
;
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
...
@@ -450,9 +720,8 @@ export default {
...
@@ -450,9 +720,8 @@ export default {
// loadingType: "spinner",
// loadingType: "spinner",
// duration: 0
// duration: 0
// });
// });
this
.
ShowfloorList
=
true
this
.
ShowfloorList
=
true
;
this
.
userPrefix
=
name
;
this
.
userPrefix
=
name
;
},
},
seletRoom
(
name
)
{
seletRoom
(
name
)
{
this
.
$toast
.
loading
({
this
.
$toast
.
loading
({
...
@@ -476,14 +745,13 @@ export default {
...
@@ -476,14 +745,13 @@ export default {
seletFactor
(
name
)
{
seletFactor
(
name
)
{
// this.showTrouble = true;
// this.showTrouble = true;
this
.
riskName
=
name
;
this
.
riskName
=
name
;
this
.
ShowSelectList
=
true
this
.
ShowSelectList
=
true
;
},
},
//准事故类型
//准事故类型
seletType
(
name
)
{
seletType
(
name
)
{
// this.showTrouble = true;
// this.showTrouble = true;
this
.
riskName
=
name
;
this
.
riskName
=
name
;
this
.
ShowAccidentList
=
true
this
.
ShowAccidentList
=
true
;
},
},
//风险等级
//风险等级
seletGrade
(
name
)
{
seletGrade
(
name
)
{
...
@@ -518,26 +786,26 @@ export default {
...
@@ -518,26 +786,26 @@ export default {
// })
// })
// },
// },
closeSlectfloor
()
{
closeSlectfloor
()
{
this
.
ShowfloorList
=
false
this
.
ShowfloorList
=
false
;
},
},
saveSlectfloor
(
data
)
{
saveSlectfloor
(
data
)
{
this
.
form
.
floorId
=
data
.
id
this
.
form
.
floorId
=
data
.
id
;
this
.
form
.
floorName
=
data
.
text
this
.
form
.
floorName
=
data
.
text
;
this
.
ShowfloorList
=
false
this
.
ShowfloorList
=
false
;
},
},
closeSlect
()
{
closeSlect
()
{
this
.
ShowSelectList
=
false
this
.
ShowSelectList
=
false
;
},
},
saveSlect
(
data
)
{
saveSlect
(
data
)
{
this
.
form
.
factor
=
data
.
join
(
'
,
'
);
this
.
form
.
factor
=
data
.
join
(
"
,
"
);
this
.
ShowSelectList
=
false
this
.
ShowSelectList
=
false
;
},
},
closeSlectAccident
()
{
closeSlectAccident
()
{
this
.
ShowAccidentList
=
false
this
.
ShowAccidentList
=
false
;
},
},
saveSlectAccident
(
data
)
{
saveSlectAccident
(
data
)
{
this
.
form
.
type
=
data
.
join
(
'
,
'
);
this
.
form
.
type
=
data
.
join
(
"
,
"
);
this
.
ShowAccidentList
=
false
this
.
ShowAccidentList
=
false
;
},
},
onSelect
(
data
)
{
onSelect
(
data
)
{
this
.
possibleValue
=
data
.
text
;
this
.
possibleValue
=
data
.
text
;
...
...
src/views/riskProject/add/addPresent.vue
View file @
165a0c1c
<
template
>
<
template
>
<div>
<div>
<LHeader
:text=
"text"
></LHeader>
<LHeader
:text=
"text"
></LHeader>
<van-form
@
submit=
"onSubmit"
: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>
>
<van-field
readonly
required
name=
"userName"
:value=
"form.userName"
label=
"评估人"
placeholder=
"请输入"
/>
<div
<van-field
readonly
required
name=
"projectId"
:value=
"form.projectId"
label=
"所属项目"
placeholder=
"请输入"
/>
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
<van-field
readonly
required
name=
"buildingName"
:value=
"form.buildingName"
label=
"所属建筑物"
placeholder=
"请输入"
/>
>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
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.projectId"
label=
"所属项目"
placeholder=
"请输入"
/>
<van-field
readonly
required
name=
"buildingName"
:value=
"form.buildingName"
label=
"所属建筑物"
placeholder=
"请输入"
/>
<van-field
required
clickable
name=
"floorId"
:value=
"form.floorId"
label=
"所属楼层"
placeholder=
"请选择"
<van-field
@
click=
"seletFloor('floor')"
:rules=
"[
{ required: true, message: '所属楼层不能为空' }]" />
required
clickable
name=
"floorName"
:value=
"form.floorName"
label=
"所属楼层"
placeholder=
"请选择"
@
click=
"seletFloor('floor')"
:rules=
"[
{ required: true, message: '所属楼层不能为空' }]"
/>
<van-field
readonly
required
name=
"roomName"
:value=
"form.roomName"
label=
"所属房间"
placeholder=
"请输入"
<van-field
@
click=
"seletRoom('room')"
:rules=
"[
{ required: true, message: '所属房间不能为空' }]" />
readonly
required
name=
"roomName"
:value=
"form.roomName"
label=
"所属房间"
placeholder=
"请输入"
@
click=
"seletRoom('room')"
:rules=
"[
{ required: true, message: '所属房间不能为空' }]"
/>
<van-field
required
name=
"name"
v-model=
"form.name"
label=
"风险源名称"
placeholder=
"请输入"
<van-field
:rules=
"[
{ required: true, message: '风险源名称不能为空' }]" />
required
<van-field
readonly
v-model=
"form.factor"
required
name=
"factor"
label=
"风险因素"
placeholder=
"请选择"
name=
"name"
@
click=
"seletFactor('factor')"
:rules=
"[
{ required: true, message: '风险因素不能为空' }]" />
v-model=
"form.name"
label=
"风险源名称"
placeholder=
"请输入"
:rules=
"[
{ required: true, message: '风险源名称不能为空' }]"
/>
<van-field
readonly
v-model=
"form.factor"
required
name=
"factor"
label=
"风险因素"
placeholder=
"请选择"
@
click=
"seletFactor('factor')"
:rules=
"[
{ required: true, message: '风险因素不能为空' }]"
/>
<van-field
readonly
v-model=
"form.type"
required
name=
"type"
label=
"准事故类型"
placeholder=
"请选择"
@
click=
"seletType('type')"
<van-field
:rules=
"[
{ required: true, message: '准事故类型不能为空' }]" />
readonly
v-model=
"form.type"
required
name=
"type"
label=
"准事故类型"
placeholder=
"请选择"
@
click=
"seletType('type')"
:rules=
"[
{ required: true, message: '准事故类型不能为空' }]"
/>
<!--
<van-field
<!--
<van-field
readonly
readonly
v-model=
"form.level"
v-model=
"form.level"
required
required
...
@@ -35,24 +104,49 @@
...
@@ -35,24 +104,49 @@
@
click=
"seletGrade('level')"
@
click=
"seletGrade('level')"
:rules=
"[
{ required: true, message: '风险等级不能为空' }]"
:rules=
"[
{ required: true, message: '风险等级不能为空' }]"
/> -->
/> -->
<van-field
readonly
v-model=
"form.level"
required
name=
"level"
label=
"风险管控措施评价"
placeholder=
"请选择"
<van-field
@
click=
"seletGrade"
:rules=
"[
{ required: true, message: '风险等级不能为空' }]" />
readonly
v-model=
"form.level"
required
name=
"level"
label=
"风险管控措施评价"
placeholder=
"请选择"
@
click=
"seletGrade"
:rules=
"[
{ required: true, message: '风险等级不能为空' }]"
/>
<van-field
required
name=
"presenceLocation"
v-model=
"form.presenceLocation"
label=
"存在部位"
placeholder=
"请输入"
<van-field
:rules=
"[
{ required: true, message: '存在部位不能为空' }]" />
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;"
>
<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
</div>
src=
"@/assets/accidentIcon/bookmark.svg"
<van-field
name=
"hdPicture1"
label=
"风险源图片"
>
alt=
""
<template
#input
>
style=
"position: relative;top: 32%;transform: translateY(-50%);"
<van-uploader
@
delete=
"deleteFile(...arguments, 'uploaderImg')"
multiple
:max-count=
"5"
/>
upload-text=
"最多上传五个"
v-model=
"uploaderImg"
>
风险源图片
<template
slot=
"default"
>
</div>
<!-- 11111111111 -->
<van-field
name=
"hdPicture1"
label=
"风险源图片"
>
<div
style=
"
<template
#input
>
<van-uploader
@
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;
...
@@ -60,28 +154,53 @@
...
@@ -60,28 +154,53 @@
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"
/>
>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
<img
</div>
src=
"@/assets/upload/pic.png"
</
template
>
alt=
""
</van-uploader>
style=
"width: 0.64rem; height: 0.64rem"
</template>
/>
</van-field>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
</div>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
</
template
>
style=
"position: relative;top: 32%;transform: translateY(-50%);"
>
</van-uploader>
技术措施
</template>
</div>
</van-field>
<van-field
v-model=
"form.measuresProject"
name=
"measuresProject"
label=
"技术措施"
type=
"textarea"
rows=
"1"
autosize
<div
placeholder=
"请输入"
/>
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
<van-field
name=
"measuresProjectFile[]"
label=
" "
>
>
<
template
#input
>
<img
<van-uploader
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresProjectFile"
accept=
"file"
src=
"@/assets/accidentIcon/bookmark.svg"
result-type=
"file"
@
delete=
"deleteFile(...arguments, 'measuresProjectFile')"
>
alt=
""
<template
slot=
"default"
>
style=
"position: relative;top: 32%;transform: translateY(-50%);"
<!-- 11111111111 -->
/>
<div
style=
"
技术措施
</div>
<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;
...
@@ -89,28 +208,53 @@
...
@@ -89,28 +208,53 @@
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"
/>
>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
<img
</div>
src=
"@/assets/upload/file.png"
</
template
>
alt=
""
</van-uploader>
style=
"width: 0.64rem; height: 0.64rem"
</template>
/>
</van-field>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
</div>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
</
template
>
style=
"position: relative;top: 32%;transform: translateY(-50%);"
>
</van-uploader>
管理措施
</template>
</div>
</van-field>
<van-field
v-model=
"form.measuresAdministration"
name=
"measuresAdministration"
label=
"管理措施"
type=
"textarea"
<div
rows=
"1"
autosize
placeholder=
"请输入"
/>
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
<van-field
name=
"measuresAdministrationFile[]"
label=
" "
>
>
<
template
#input
>
<img
<van-uploader
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresAdministrationFile"
src=
"@/assets/accidentIcon/bookmark.svg"
accept=
"file"
result-type=
"file"
@
delete=
"deleteFile(...arguments, 'measuresAdministrationFile')"
>
alt=
""
<template
slot=
"default"
>
style=
"position: relative;top: 32%;transform: translateY(-50%);"
<!-- 11111111111 -->
/>
<div
style=
"
管理措施
</div>
<van-field
v-model=
"form.measuresAdministration"
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;
...
@@ -118,28 +262,53 @@
...
@@ -118,28 +262,53 @@
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"
/>
>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
<img
</div>
src=
"@/assets/upload/file.png"
</
template
>
alt=
""
</van-uploader>
style=
"width: 0.64rem; height: 0.64rem"
</template>
/>
</van-field>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
</div>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
</
template
>
style=
"position: relative;top: 32%;transform: translateY(-50%);"
>
</van-uploader>
应急措施
</template>
</div>
</van-field>
<van-field
v-model=
"form.measuresEmergency"
name=
"measuresEmergency"
label=
"应急措施"
type=
"textarea"
rows=
"1"
<div
autosize
placeholder=
"请输入"
/>
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
<van-field
name=
"measuresEmergencyFile[]"
label=
" "
>
>
<
template
#input
>
<img
<van-uploader
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresEmergencyFile"
accept=
"file"
src=
"@/assets/accidentIcon/bookmark.svg"
result-type=
"file"
@
delete=
"deleteFile(...arguments, 'measuresEmergencyFile')"
>
alt=
""
<template
slot=
"default"
>
style=
"position: relative;top: 32%;transform: translateY(-50%);"
<!-- 11111111111 -->
/>
<div
style=
"
应急措施
</div>
<van-field
v-model=
"form.measuresEmergency"
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;
...
@@ -147,21 +316,31 @@
...
@@ -147,21 +316,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=
""
style=
"width: 0.64rem; height: 0.64rem"
/>
>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
<img
</div>
src=
"@/assets/upload/file.png"
</
template
>
alt=
""
</van-uploader>
style=
"width: 0.64rem; height: 0.64rem"
</template>
/>
</van-field>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
<!-- v-if="this.$route.params.isView" -->
</div>
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
</
template
>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
</van-uploader>
style=
"position: relative;top: 32%;transform: translateY(-50%);"
>
</template>
参考依据
</van-field>
</div>
<!-- v-if="this.$route.params.isView" -->
<!-- <van-field
<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
readonly
readonly
required
required
clickable
clickable
...
@@ -172,71 +351,144 @@
...
@@ -172,71 +351,144 @@
@click="showTrouble = true"
@click="showTrouble = true"
:rules="[{ required: true, message: '事故类型不能为空' }]"
:rules="[{ required: true, message: '事故类型不能为空' }]"
/> -->
/> -->
<van-popup
v-model=
"showTrouble"
position=
"bottom"
>
<van-popup
v-model=
"showTrouble"
position=
"bottom"
>
<van-picker
show-toolbar
value-key=
"name"
:columns=
"columnsTrouble"
@
confirm=
"onConTrouble"
<van-picker
@
cancel=
"showTrouble = false"
/>
show-toolbar
</van-popup>
value-key=
"name"
:columns=
"columnsTrouble"
@
confirm=
"onConTrouble"
@
cancel=
"showTrouble = false"
/>
</van-popup>
<van-popup
v-model=
"showSource"
position=
"bottom"
>
<van-popup
v-model=
"showSource"
position=
"bottom"
>
<van-picker
show-toolbar
value-key=
"name"
:columns=
"columnsSource"
@
confirm=
"onConSource"
<van-picker
@
cancel=
"showSource = false"
/>
show-toolbar
</van-popup>
value-key=
"name"
:columns=
"columnsSource"
@
confirm=
"onConSource"
@
cancel=
"showSource = false"
/>
</van-popup>
<!-- 风险源弹出层 -->
<!-- 风险源弹出层 -->
<van-popup
v-model=
"ShowSelectList"
position=
"bottom"
:style=
"{ height: '100%' }"
>
<van-popup
<selectList
:listdata=
"columnsTrouble"
@
closeSlect=
"closeSlect"
@
saveSlect=
"saveSlect"
></selectList>
v-model=
"ShowSelectList"
</van-popup>
position=
"bottom"
<!-- 准事故类型 -->
:style=
"{ height: '100%' }"
<van-popup
v-model=
"ShowAccidentList"
position=
"bottom"
:style=
"{ height: '100%' }"
>
>
<selectList
:listdata=
"columnsAccident"
@
closeSlect=
"closeSlectAccident"
@
saveSlect=
"saveSlectAccident"
>
<selectList
</selectList>
:listdata=
"columnsTrouble"
</van-popup>
@
closeSlect=
"closeSlect"
<!-- v-if="this.$route.params.isView" -->
@
saveSlect=
"saveSlect"
<div
style=
"margin: 16px 16px 0"
>
></selectList>
<van-button
round
block
type=
"info"
native-type=
"submit"
>
上报
</van-button>
</van-popup>
</div>
<!-- 准事故类型 -->
</van-form>
<van-popup
<van-dialog
v-model=
"showGradeDialog"
title=
"风险评测配置"
:show-cancel-button=
"false"
:show-confirm-button=
"false"
>
v-model=
"ShowAccidentList"
<div
class=
"dialogContain"
>
position=
"bottom"
<van-collapse
v-model=
"activeNames"
>
:style=
"{ height: '100%' }"
<van-collapse-item
title=
"风险模型"
name=
"1"
>
>
<van-field
readonly
required
name=
"level"
label=
"当前风险模型"
placeholder=
"LS风险矩阵评估模型"
/>
<selectList
</van-collapse-item>
:listdata=
"columnsAccident"
<van-collapse-item
title=
"风险模型配置"
name=
"2"
>
@
closeSlect=
"closeSlectAccident"
<van-popover
v-model=
"showPopover"
trigger=
"click"
:actions=
"columnsRiskRank"
@
select=
"onSelect"
>
@
saveSlect=
"saveSlectAccident"
<
template
#reference
>
>
<van-field
v-model=
"possibleValue"
readonly
required
name=
"level"
label=
"发生的可能性"
</selectList>
placeholder=
"请选择"
/>
</van-popup>
</
template
>
<!-- v-if="this.$route.params.isView" -->
</van-popover>
<div
style=
"margin: 16px 16px 0"
>
<van-popover
v-model=
"showPopoveSetRank"
trigger=
"click"
:actions=
"columnsSetRank"
<van-button
round
block
type=
"info"
native-type=
"submit"
@
select=
"onSelectSetRank"
>
>
提交
</van-button
<
template
#reference
>
>
<van-field
v-model=
"severityValue"
readonly
required
name=
"level"
label=
"后果严重程度"
</div>
placeholder=
"请选择"
/>
</van-form>
</
template
>
<van-dialog
</van-popover>
v-model=
"showGradeDialog"
</van-collapse-item>
title=
"风险评测配置"
</van-collapse>
:show-cancel-button=
"false"
<van-row
type=
"flex"
justify=
"center"
style=
"margin-top:10px"
>
:show-confirm-button=
"false"
<van-col
span=
"6"
><van-button
size=
"small"
plain
type=
"info"
>
@
click=
"showGradeDialog = false"
>
取消
</van-button></van-col>
<div
class=
"dialogContain"
>
<van-col
span=
"6"
><van-button
size=
"small"
type=
"info"
@
click=
"goResultPage"
>
开始测评
</van-button></van-col>
<van-collapse
v-model=
"activeNames"
>
</van-row>
<van-collapse-item
title=
"风险模型"
name=
"1"
>
</div>
<van-field
</van-dialog>
readonly
<!-- v-if="this.$route.params.isView" -->
required
<div
style=
"margin: 10px 16px 0px; padding-bottom: 16px"
>
name=
"level"
<van-button
round
block
type=
"warning"
@
click.native=
"cancel"
>
取消
</van-button>
label=
"当前风险模型"
</div>
placeholder=
"LS风险矩阵评估模型"
/>
</van-collapse-item>
<van-collapse-item
title=
"风险模型配置"
name=
"2"
>
<van-popover
v-model=
"showPopover"
trigger=
"click"
:actions=
"columnsRiskRank"
@
select=
"onSelect"
>
<
template
#reference
>
<van-field
v-model=
"possibleValue"
readonly
required
name=
"level"
label=
"发生的可能性"
placeholder=
"请选择"
/>
</
template
>
</van-popover>
<van-popover
v-model=
"showPopoveSetRank"
trigger=
"click"
:actions=
"columnsSetRank"
@
select=
"onSelectSetRank"
>
<
template
#reference
>
<van-field
v-model=
"severityValue"
readonly
required
name=
"level"
label=
"后果严重程度"
placeholder=
"请选择"
/>
</
template
>
</van-popover>
</van-collapse-item>
</van-collapse>
<van-row
type=
"flex"
justify=
"center"
style=
"margin-top:10px"
>
<van-col
span=
"6"
><van-button
size=
"small"
plain
type=
"info"
@
click=
"showGradeDialog = false"
>
取消
</van-button
></van-col
>
<van-col
span=
"6"
><van-button
size=
"small"
type=
"info"
@
click=
"goResultPage"
>
开始测评
</van-button
></van-col
>
</van-row>
</div>
</van-dialog>
<!-- v-if="this.$route.params.isView" -->
<div
style=
"margin: 10px 16px 0px; padding-bottom: 16px"
>
<van-button
round
block
type=
"warning"
@
click.native=
"cancel"
>
取消
</van-button
>
</div>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
LHeader
from
"
@/components/header.vue
"
;
import
LHeader
from
"
@/components/header.vue
"
;
import
SelectList
from
"
@/components/selectList.vue
"
;
import
SelectList
from
"
@/components/selectList.vue
"
;
// import selectPeople from "@/views/riskTask/selectPeople/index.vue";
// import selectPeople from "@/views/riskTask/selectPeople/index.vue";
import
{
getUserInfo
,
getLocalUserInfo
}
from
'
@/utils/userInfo
'
import
{
getUserInfo
,
getLocalUserInfo
}
from
"
@/utils/userInfo
"
;
import
{
getFun
,
postFun
}
from
"
@/service/table.js
"
;
import
{
getFun
,
postFun
}
from
"
@/service/table.js
"
;
// import {
// import {
// getFormList,
// getFormList,
...
@@ -248,502 +500,509 @@ import { getFun, postFun } from "@/service/table.js";
...
@@ -248,502 +500,509 @@ import { getFun, postFun } from "@/service/table.js";
// postRiskShowMeasures,
// postRiskShowMeasures,
// } from "@/service/risk";
// } from "@/service/risk";
export
default
{
export
default
{
name
:
"
addPresent
"
,
name
:
"
addPresent
"
,
components
:
{
components
:
{
LHeader
,
LHeader
},
activated
()
{},
beforeRouteEnter
(
to
,
from
,
next
)
{
if
(
from
.
name
==
"
addCurrent
"
)
{
sessionStorage
.
setItem
(
"
presentForm
"
,
""
);
sessionStorage
.
setItem
(
"
level
"
,
""
);
}
next
();
},
beforeRouteLeave
(
to
,
from
,
next
)
{
if
(
to
.
name
!=
"
riskInherent
"
)
{
sessionStorage
.
setItem
(
"
presentForm
"
,
JSON
.
stringify
(
this
.
form
));
}
next
();
},
data
()
{
return
{
ShowAccidentList
:
false
,
ShowSelectList
:
false
,
columnsAccident
:
[],
showPopoveSetRank
:
false
,
activeNames
:
[
"
1
"
],
showPopover
:
false
,
showGradeDialog
:
false
,
taskId
:
""
,
text
:
"
添加现状风险
"
,
id
:
""
,
isTimely
:
1
,
active
:
0
,
form
:
{},
projectId
:
""
,
// 所属工程
projectName
:
""
,
// 所属工程
projectDirectorName
:
""
,
// 所属工程
projectDirector
:
""
,
// 所属工程
showProjectName
:
false
,
show
:
false
,
columnsProjectName
:
[],
factor
:
""
,
//风险因素
showFactor
:
false
,
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
:
[],
//应急措施图片
returnCause
:
""
,
// 退回原因
isShowreturnCause
:
false
,
possibleValue
:
""
,
possibleScore
:
0
,
severityValue
:
""
,
severityScore
:
0
};
},
created
()
{
var
userInfo
=
getUserInfo
();
this
.
form
.
buildingIds
=
this
.
$route
.
params
.
id
;
this
.
form
.
planId
=
this
.
$route
.
params
.
planId
;
this
.
form
.
floorId
=
this
.
$route
.
params
.
floorId
;
this
.
form
.
roomId
=
this
.
$route
.
params
.
roomId
;
this
.
form
.
inherentId
=
this
.
$route
.
params
.
id
;
this
.
form
.
roomName
=
this
.
$route
.
params
.
roomName
;
this
.
form
.
buildingName
=
"
1号楼
"
;
this
.
form
.
userId
=
userInfo
.
userId
;
this
.
form
.
userName
=
userInfo
.
userName
;
this
.
form
.
deptName
=
userInfo
.
dept
.
deptName
;
this
.
form
.
projectId
=
"
测试项目
"
;
},
mounted
()
{
if
(
sessionStorage
.
getItem
(
"
presentForm
"
)
!=
""
)
{
this
.
form
=
JSON
.
parse
(
sessionStorage
.
getItem
(
"
presentForm
"
));
this
.
form
.
level
=
sessionStorage
.
getItem
(
"
level
"
);
}
this
.
getFXYS
();
this
.
getZSGLX
();
},
methods
:
{
getFXYS
()
{
getFun
(
`/risk/plan/dict/data/list?dictType=risk_plan_factor`
)
.
then
(
res
=>
{
this
.
columnsTrouble
=
res
.
data
;
})
.
catch
(()
=>
{
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
},
},
activated
()
{
getZSGLX
()
{
getFun
(
`/risk/plan/dict/data/list?dictType=risk_plan_type`
)
.
then
(
res
=>
{
this
.
columnsAccident
=
res
.
data
;
})
.
catch
(()
=>
{
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
},
seletFloor
(
name
)
{
this
.
$toast
.
loading
({
message
:
"
加载中...
"
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
duration
:
0
});
this
.
userPrefix
=
name
;
getFun
(
`/risk/plan/floor/list/
${
this
.
form
.
buildingIds
}
`
)
.
then
(
res
=>
{
this
.
$toast
.
clear
();
this
.
showSource
=
true
;
this
.
columnsSource
=
res
.
data
;
})
.
catch
(()
=>
{
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
},
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
(
"
加载失败,请稍后再试
"
);
});
},
},
beforeRouteEnter
(
to
,
from
,
next
)
{
//风险因素
if
(
from
.
name
==
'
addCurrent
'
)
{
seletFactor
(
name
)
{
sessionStorage
.
setItem
(
'
presentForm
'
,
''
)
// this.showTrouble = true;
sessionStorage
.
setItem
(
'
level
'
,
''
)
this
.
riskName
=
name
;
this
.
ShowSelectList
=
true
;
},
//准事故类型
seletType
(
name
)
{
// this.showTrouble = true;
this
.
riskName
=
name
;
this
.
ShowAccidentList
=
true
;
},
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
;
}
}
next
()
});
},
closeSlect
()
{
this
.
ShowSelectList
=
false
;
},
saveSlect
(
data
)
{
this
.
form
.
factor
=
data
.
join
(
"
,
"
);
this
.
ShowSelectList
=
false
;
},
closeSlectAccident
()
{
this
.
ShowAccidentList
=
false
;
},
},
beforeRouteLeave
(
to
,
from
,
next
)
{
saveSlectAccident
(
data
)
{
if
(
to
.
name
!=
"
riskInherent
"
)
{
this
.
form
.
type
=
data
.
join
(
"
,
"
);
sessionStorage
.
setItem
(
'
presentForm
'
,
JSON
.
stringify
(
this
.
form
))
this
.
ShowAccidentList
=
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
}
}
next
();
});
},
},
data
()
{
performTasks
()
{},
return
{
// 点击预览图
ShowAccidentList
:
false
,
clickPre
(
e
)
{
ShowSelectList
:
false
,
console
.
log
(
e
);
columnsAccident
:
[],
if
(
e
.
filePath
)
{
showPopoveSetRank
:
false
,
this
.
videoUrl
=
e
.
filePath
;
activeNames
:
[
"
1
"
],
}
else
{
showPopover
:
false
,
this
.
videoUrl
=
e
.
content
;
showGradeDialog
:
false
,
}
taskId
:
""
,
text
:
"
添加现状风险
"
,
id
:
""
,
isTimely
:
1
,
active
:
0
,
form
:
{
},
projectId
:
""
,
// 所属工程
projectName
:
""
,
// 所属工程
projectDirectorName
:
""
,
// 所属工程
projectDirector
:
""
,
// 所属工程
showProjectName
:
false
,
show
:
false
,
columnsProjectName
:
[],
factor
:
""
,
//风险因素
showFactor
:
false
,
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
:
[],
//应急措施图片
returnCause
:
""
,
// 退回原因
isShowreturnCause
:
false
,
possibleValue
:
""
,
possibleScore
:
0
,
severityValue
:
""
,
severityScore
:
0
,
};
},
created
()
{
var
userInfo
=
getUserInfo
()
this
.
form
.
buildingIds
=
this
.
$route
.
params
.
id
this
.
form
.
planId
=
this
.
$route
.
params
.
planId
this
.
form
.
floorId
=
this
.
$route
.
params
.
floorId
this
.
form
.
roomId
=
this
.
$route
.
params
.
roomId
this
.
form
.
inherentId
=
this
.
$route
.
params
.
id
this
.
form
.
roomName
=
this
.
$route
.
params
.
roomName
this
.
form
.
buildingName
=
'
1号楼
'
this
.
form
.
userId
=
userInfo
.
userId
this
.
form
.
userName
=
userInfo
.
userName
this
.
form
.
deptName
=
userInfo
.
dept
.
deptName
this
.
form
.
projectId
=
'
测试项目
'
},
},
mounted
()
{
async
deleteFile
(
val
,
detail
,
key
)
{
if
(
sessionStorage
.
getItem
(
'
presentForm
'
)
!=
''
)
{
// console.log(val,detail)
this
.
form
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'
presentForm
'
))
if
(
val
.
fileId
)
{
this
.
form
.
level
=
sessionStorage
.
getItem
(
'
level
'
)
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
);
}
}
this
.
getFXYS
();
}
this
.
getZSGLX
();
},
},
jsonToFormData
(
config
)
{
methods
:
{
const
formData
=
new
FormData
();
getFXYS
()
{
//循环传入的值转换formData
getFun
(
`/risk/plan/dict/data/list?dictType=risk_plan_factor`
)
Object
.
keys
(
config
).
forEach
(
key
=>
{
.
then
(
res
=>
{
formData
.
append
(
key
,
config
[
key
]);
this
.
columnsTrouble
=
res
.
data
;
});
})
return
formData
;
.
catch
(()
=>
{
},
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
onSubmit
(
values
)
{
});
// console.log('%c [ values ]-592', 'font-size:13px; background:pink; color:#bf2c9f;', values)
},
var
formDataJson
=
this
.
jsonToFormData
(
this
.
form
);
getZSGLX
()
{
// let url = "/risk/plan/inherent";
getFun
(
`/risk/plan/dict/data/list?dictType=risk_plan_type`
)
let
url
=
"
/risk/plan/existing
"
;
.
then
(
res
=>
{
values
.
hdPicture1
.
forEach
(
item
=>
{
this
.
columnsAccident
=
res
.
data
;
if
(
item
.
file
)
{
})
formDataJson
.
append
(
"
pictureFile[]
"
,
item
.
file
);
.
catch
(()
=>
{
}
else
{
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
formDataJson
.
append
(
"
pictureFile[]
"
,
item
.
fileId
);
});
}
},
});
seletFloor
(
name
)
{
values
[
"
measuresProjectFile[]
"
].
forEach
(
item
=>
{
this
.
$toast
.
loading
({
if
(
item
.
file
)
{
message
:
"
加载中...
"
,
formDataJson
.
append
(
"
measuresProjectFile[]
"
,
item
.
file
);
forbidClick
:
true
,
}
else
{
loadingType
:
"
spinner
"
,
formDataJson
.
append
(
"
measuresProjectFile[]
"
,
item
.
fileId
);
duration
:
0
,
}
});
});
this
.
userPrefix
=
name
values
[
"
measuresEmergencyFile[]
"
].
forEach
(
item
=>
{
getFun
(
`/risk/plan/floor/list/
${
this
.
form
.
buildingIds
}
`
).
then
((
res
)
=>
{
if
(
item
.
file
)
{
this
.
$toast
.
clear
()
formDataJson
.
append
(
"
measuresEmergencyFile[]
"
,
item
.
file
);
this
.
showSource
=
true
}
else
{
this
.
columnsSource
=
res
.
data
formDataJson
.
append
(
"
measuresEmergencyFile[]
"
,
item
.
fileId
);
}).
catch
(()
=>
{
}
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
});
values
[
"
measuresAdministrationFile[]
"
].
forEach
(
item
=>
{
},
if
(
item
.
file
)
{
seletRoom
(
name
)
{
formDataJson
.
append
(
"
measuresAdministrationFile[]
"
,
item
.
file
);
this
.
$toast
.
loading
({
}
else
{
message
:
"
加载中...
"
,
formDataJson
.
append
(
"
measuresAdministrationFile[]
"
,
item
.
fileId
);
forbidClick
:
true
,
}
loadingType
:
"
spinner
"
,
});
duration
:
0
,
postFun
(
url
,
formDataJson
)
});
.
then
(
res
=>
{
this
.
userPrefix
=
name
this
.
$toast
.
clear
();
getFun
(
`/risk/plan/room/list/
${
this
.
form
.
floorId
}
`
).
then
((
res
)
=>
{
this
.
$toast
.
success
({
this
.
$toast
.
clear
()
message
:
"
提交成功
"
,
this
.
showSource
=
true
duration
:
2000
this
.
columnsSource
=
res
.
data
});
}).
catch
(()
=>
{
history
.
go
(
-
1
);
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
})
});
.
catch
(()
=>
{
},
this
.
$toast
.
clear
();
//风险因素
this
.
$toast
.
fail
(
"
提交失败,请稍后再试
"
);
seletFactor
(
name
)
{
});
// this.showTrouble = true;
this
.
$toast
.
clear
();
this
.
riskName
=
name
;
},
this
.
ShowSelectList
=
true
},
//准事故类型
seletType
(
name
)
{
// this.showTrouble = true;
this
.
riskName
=
name
;
this
.
ShowAccidentList
=
true
},
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
}
})
},
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
},
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
()
{
},
// 点击预览图
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";
let
url
=
"
/risk/plan/existing
"
;
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
();
},
// 请求已退回详情数据
postReturnEcho
()
{
this
.
$toast
.
loading
({
message
:
"
加载中...
"
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
duration
:
0
,
});
postriskConiCause
(
`/riskMain/edit/
${
this
.
taskId
}
`
)
.
then
((
res
)
=>
{
console
.
log
(
'
%c [ res ]-332
'
,
'
font-size:13px; background:pink; color:#bf2c9f;
'
,
res
)
})
.
catch
(()
=>
{
this
.
$toast
.
clear
();
});
},
// 所属项目
// 请求已退回详情数据
onConProjectName
(
value
)
{
postReturnEcho
()
{
if
(
!
value
)
{
this
.
$toast
.
loading
({
this
.
showProjectName
=
false
;
message
:
"
加载中...
"
,
return
;
forbidClick
:
true
,
}
loadingType
:
"
spinner
"
,
this
.
projectId
=
value
.
id
;
duration
:
0
this
.
projectName
=
value
.
projectName
;
});
this
.
showProjectName
=
false
;
postriskConiCause
(
`/riskMain/edit/
${
this
.
taskId
}
`
)
},
.
then
(
res
=>
{
// 风险因素
console
.
log
(
onConFactor
(
value
)
{
"
%c [ res ]-332
"
,
if
(
!
value
)
{
"
font-size:13px; background:pink; color:#bf2c9f;
"
,
this
.
showFactor
=
false
;
res
return
;
);
}
})
this
.
factor
=
value
.
factorType
;
.
catch
(()
=>
{
this
.
showFactor
=
false
;
this
.
$toast
.
clear
();
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
;
},
// 事故类型
onConTrouble
(
value
)
{
console
.
log
(
'
%c [ value ]-653
'
,
'
font-size:13px; background:pink; color:#bf2c9f;
'
,
value
)
if
(
!
value
)
{
this
.
showTrouble
=
false
;
return
;
}
this
.
form
[
this
.
riskName
]
=
value
.
name
;
this
.
showTrouble
=
false
;
},
// 所属项目
// 风险定级
onConProjectName
(
value
)
{
onConSetRank
(
value
)
{
if
(
!
value
)
{
this
.
showSetRank
=
false
;
this
.
showProjectName
=
false
;
this
.
setRank
=
value
;
return
;
this
.
riskRank
=
""
;
}
if
(
this
.
setRank
==
"
矩阵式定级
"
)
{
this
.
projectId
=
value
.
id
;
this
.
showSetRank
=
false
;
this
.
projectName
=
value
.
projectName
;
this
.
$router
.
push
({
this
.
showProjectName
=
false
;
name
:
"
matrix-grad
"
,
},
});
// 风险因素
}
onConFactor
(
value
)
{
},
if
(
!
value
)
{
// 自己定义风险等级点击方法
this
.
showFactor
=
false
;
myRiskRank
()
{
return
;
if
(
this
.
setRank
==
""
)
{
}
this
.
$toast
(
"
请先选择风险定级
"
);
this
.
factor
=
value
.
factorType
;
}
else
if
(
this
.
setRank
==
"
其他定级方式
"
)
{
this
.
showFactor
=
false
;
this
.
showRiskRank
=
true
;
this
.
source
=
""
;
}
this
.
trouble
=
""
;
},
// 请求风险源
// 风险等级
postHdSource
(
`/riskMain/showSourceName?factorType=
${
this
.
factor
}
`
).
then
(
onConRiskRank
(
value
)
{
res
=>
{
this
.
riskRank
=
value
;
this
.
columnsSource
=
res
.
data
;
this
.
showRiskRank
=
false
;
}
},
);
},
// 风险源
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
;
},
// 事故类型
onConTrouble
(
value
)
{
console
.
log
(
"
%c [ value ]-653
"
,
"
font-size:13px; background:pink; color:#bf2c9f;
"
,
value
);
if
(
!
value
)
{
this
.
showTrouble
=
false
;
return
;
}
this
.
form
[
this
.
riskName
]
=
value
.
name
;
this
.
showTrouble
=
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
)
{
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
()
{
this
.
show
=
false
;
},
onSave
(
e
)
{
this
.
projectDirector
=
e
[
0
].
loginName
this
.
projectDirectorName
=
e
[
0
].
userName
this
.
show
=
false
;
},
},
watch
:
{
// setRank(newVal, oldVal) {
// if (newVal == "其他定级方式") {
// this.showSetRankMode = true;
// } else {
// this.showSetRankMode = false;
// }
// },
},
},
onClose
()
{
this
.
show
=
false
;
},
onSave
(
e
)
{
this
.
projectDirector
=
e
[
0
].
loginName
;
this
.
projectDirectorName
=
e
[
0
].
userName
;
this
.
show
=
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 {
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%;
}
}
}
}
}
}
}
}
</
style
>
</
style
>
src/views/riskProject/add/index.vue
View file @
165a0c1c
...
@@ -210,9 +210,13 @@
...
@@ -210,9 +210,13 @@
</van-checkbox-group>
</van-checkbox-group>
</div>
</div>
<div
style=
"display: flex;justify-content: space-around;"
>
<div
style=
"display: flex;justify-content: space-around;"
>
<van-button
native-type=
"button"
type=
"primary"
v-on:click=
"checkAll"
>
全选
</van-button>
<van-button
native-type=
"button"
type=
"primary"
v-on:click=
"checkAll"
<van-button
native-type=
"button"
type=
"info"
@
click=
"toggleAll"
>
反选
</van-button>
>
全选
</van-button
</div>
>
<van-button
native-type=
"button"
type=
"info"
@
click=
"toggleAll"
>
反选
</van-button
>
</div>
</van-popup>
</van-popup>
<!-- 选择项目小组 -->
<!-- 选择项目小组 -->
...
@@ -248,7 +252,7 @@
...
@@ -248,7 +252,7 @@
<!-- 选择时间弹出层 -->
<!-- 选择时间弹出层 -->
<van-popup
v-model=
"showTime"
position=
"bottom"
>
<van-popup
v-model=
"showTime"
position=
"bottom"
>
<van-datetime-picker
<van-datetime-picker
type=
"date
time
"
type=
"date"
@
confirm=
"onConTime"
@
confirm=
"onConTime"
@
cancel=
"showTime = false"
@
cancel=
"showTime = false"
:min-date=
"minDate"
:min-date=
"minDate"
...
@@ -258,7 +262,7 @@
...
@@ -258,7 +262,7 @@
<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>
</div>
</van-form>
</van-form>
...
@@ -379,7 +383,7 @@ export default {
...
@@ -379,7 +383,7 @@ export default {
"
font-size:13px; background:pink; color:#bf2c9f;
"
,
"
font-size:13px; background:pink; color:#bf2c9f;
"
,
date
date
);
);
let
time
=
timestampToTime
(
date
,
"
DT
1
"
,
true
);
let
time
=
timestampToTime
(
date
,
"
DT
2
"
,
true
);
this
.
form
[
this
.
timeName
]
=
time
;
this
.
form
[
this
.
timeName
]
=
time
;
this
.
showTime
=
false
;
this
.
showTime
=
false
;
},
},
...
...
src/views/riskProject/add/inherentRisks.vue
View file @
165a0c1c
...
@@ -8,12 +8,32 @@
...
@@ -8,12 +8,32 @@
<van-tabs
v-model=
"active"
@
change=
"tabList"
color=
"#2980f7"
animated
>
<van-tabs
v-model=
"active"
@
change=
"tabList"
color=
"#2980f7"
animated
>
<van-tab
:title=
"buildingName"
>
<van-tab
:title=
"buildingName"
>
<van-dropdown-menu
z-index=
"1000"
>
<van-dropdown-menu
z-index=
"1000"
>
<van-dropdown-item
v-model=
"value0"
@
change=
"changeBuild"
:options=
"option0"
get-container=
"body"
/>
<van-dropdown-item
<van-dropdown-item
v-model=
"value1"
@
change=
"changeFloor"
:options=
"option1"
get-container=
"body"
/>
v-model=
"value0"
<van-dropdown-item
v-model=
"value2"
@
change=
"changeRoom"
:options=
"option2"
get-container=
"body"
/>
@
change=
"changeBuild"
:options=
"option0"
get-container=
"body"
/>
<van-dropdown-item
v-model=
"value1"
@
change=
"changeFloor"
:options=
"option1"
get-container=
"body"
/>
<van-dropdown-item
v-model=
"value2"
@
change=
"changeRoom"
:options=
"option2"
get-container=
"body"
/>
</van-dropdown-menu>
</van-dropdown-menu>
<div
class=
"con-list"
>
<div
class=
"con-list"
>
<van-cell-group
inset
v-for=
"(item, index) in messageList"
:key=
"index"
@
click=
"touchstart(index, item)"
>
<van-cell-group
inset
v-for=
"(item, index) in messageList"
:key=
"index"
@
click=
"touchstart(index, item)"
>
<div
style=
"font-size: 0.45rem;padding: 5px 0;"
>
<div
style=
"font-size: 0.45rem;padding: 5px 0;"
>
{{
item
.
name
}}
{{
item
.
name
}}
</div>
</div>
...
@@ -40,27 +60,33 @@
...
@@ -40,27 +60,33 @@
</van-row>
</van-row>
<van-overlay
:show=
"showIndex == index"
>
<van-overlay
:show=
"showIndex == index"
>
<div
class=
"wrapper"
@
click.stop=
"showIndex = null"
>
<div
class=
"wrapper"
@
click.stop=
"showIndex = null"
>
<van-button
round
type=
"primary"
@
click=
"goDetail(item)"
>
编辑
</van-button>
<van-button
round
type=
"primary"
@
click=
"goDetail(item)"
>
编辑
</van-button
>
<!--
<van-button
round
type=
"info"
@
click=
"goConfirm(item)"
v-show=
"active==0"
<!--
<van-button
round
type=
"info"
@
click=
"goConfirm(item)"
v-show=
"active==0"
>
确认
</van-button
>
确认
</van-button
>
-->
>
-->
</div>
</div>
</van-overlay>
</van-overlay>
</van-cell-group>
</van-cell-group>
<div
style=
"
<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>
</div>
</van-tab>
</van-tab>
</van-tabs>
</van-tabs>
</div>
</div>
<div
style=
"display: flex;
<div
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;
...
@@ -68,12 +94,19 @@
...
@@ -68,12 +94,19 @@
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
@
click=
"performTasks"
style=
"color: #4bced0;font-size: 14px;font-weight: 600;"
>
<div
style=
"font-size: 22px;"
><van-icon
name=
"plus"
/></div>
<div
style=
"font-size: 22px;"
><van-icon
name=
"plus"
/></div>
<div>
新增固有风险
</div>
<div>
新增固有风险
</div>
</div>
</div>
<div
@
click=
"endTasks"
style=
"color: #D9001B;font-size: 14px;font-weight: 600;"
>
<div
@
click=
"endTasks"
style=
"color: #D9001B;font-size: 14px;font-weight: 600;"
>
<div
style=
"font-size: 22px;"
><van-icon
name=
"cross"
/></div>
<div
style=
"font-size: 22px;"
><van-icon
name=
"cross"
/></div>
<div>
任务执行结束
</div>
<div>
任务执行结束
</div>
</div>
</div>
...
@@ -82,14 +115,14 @@
...
@@ -82,14 +115,14 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
Dialog
}
from
'
vant
'
;
import
{
Dialog
}
from
"
vant
"
;
import
LHeader
from
"
@/components/header.vue
"
;
import
LHeader
from
"
@/components/header.vue
"
;
import
{
getFun
,
postFun
}
from
"
@/service/table.js
"
;
import
{
getFun
,
postFun
}
from
"
@/service/table.js
"
;
import
{
timestampToTime
,
generateId
}
from
"
@/utils/format
"
;
import
{
timestampToTime
,
generateId
}
from
"
@/utils/format
"
;
export
default
{
export
default
{
name
:
"
risk-confirme
"
,
name
:
"
risk-confirme
"
,
components
:
{
components
:
{
LHeader
,
LHeader
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -98,10 +131,10 @@ export default {
...
@@ -98,10 +131,10 @@ export default {
planId
:
0
,
planId
:
0
,
buildingId
:
0
,
buildingId
:
0
,
buildingName
:
""
,
buildingName
:
""
,
value0
:
''
,
value0
:
""
,
value1
:
0
,
value1
:
0
,
value2
:
0
,
value2
:
0
,
option0
:[],
option0
:
[],
option1
:
[],
option1
:
[],
option2
:
[],
option2
:
[],
isHaveNews
:
false
,
isHaveNews
:
false
,
...
@@ -112,13 +145,15 @@ export default {
...
@@ -112,13 +145,15 @@ export default {
active
:
1
,
active
:
1
,
form
:
{},
form
:
{},
tabs
:
[],
tabs
:
[],
floorListData
:[]
floorListData
:
[]
};
};
},
},
created
()
{
created
()
{
this
.
planId
=
this
.
$route
.
params
.
id
||
sessionStorage
.
getItem
(
"
planId
"
);
this
.
planId
=
this
.
$route
.
params
.
id
||
sessionStorage
.
getItem
(
"
planId
"
);
this
.
buildingId
=
this
.
$route
.
params
.
buildingId
||
sessionStorage
.
getItem
(
"
buildingId
"
);
this
.
buildingId
=
this
.
buildingName
=
this
.
$route
.
params
.
buildingName
||
sessionStorage
.
getItem
(
"
buildingName
"
);
this
.
$route
.
params
.
buildingId
||
sessionStorage
.
getItem
(
"
buildingId
"
);
this
.
buildingName
=
this
.
$route
.
params
.
buildingName
||
sessionStorage
.
getItem
(
"
buildingName
"
);
this
.
getRiskList
(
this
.
planId
);
this
.
getRiskList
(
this
.
planId
);
// this.postList();
// this.postList();
},
},
...
@@ -138,9 +173,9 @@ export default {
...
@@ -138,9 +173,9 @@ export default {
},
},
//新增固有风险
//新增固有风险
performTasks
()
{
performTasks
()
{
sessionStorage
.
setItem
(
'
buildingId
'
,
this
.
buildingId
)
sessionStorage
.
setItem
(
"
buildingId
"
,
this
.
buildingId
);
sessionStorage
.
setItem
(
'
planId
'
,
this
.
planId
)
sessionStorage
.
setItem
(
"
planId
"
,
this
.
planId
);
sessionStorage
.
setItem
(
'
buildingName
'
,
this
.
buildingName
)
sessionStorage
.
setItem
(
"
buildingName
"
,
this
.
buildingName
);
this
.
$router
.
push
({
this
.
$router
.
push
({
name
:
"
addInherent
"
,
name
:
"
addInherent
"
,
...
@@ -156,29 +191,28 @@ export default {
...
@@ -156,29 +191,28 @@ export default {
endTasks
()
{
endTasks
()
{
//toDo
//toDo
Dialog
.
confirm
({
Dialog
.
confirm
({
title
:
'
任务执行结束
'
,
title
:
"
任务执行结束
"
,
message
:
'
是否任务执行结束
'
,
message
:
"
是否任务执行结束
"
})
})
.
then
(()
=>
{
.
then
(()
=>
{
postFun
(
postFun
(
`/risk/plan/submit/
${
this
.
planId
}
/
${
this
.
buildingId
}
`
).
then
(
`/risk/plan/submit/
${
this
.
planId
}
/
${
this
.
buildingId
}
`
res
=>
{
).
then
(
res
=>
{
// Dialog.alert(
{
// Dialog.alert({
// title: '任务执行结束',
// title: '任务执行结束'
,
// message: res.msg
,
// message: res.msg,
// }).then(() => {
// }).then(() => {
// resolve(res.data);
// resolve(res.data
);
this
.
$toast
.
success
(
res
.
msg
);
this
.
$toast
.
success
(
res
.
msg
)
this
.
$router
.
push
({
this
.
$router
.
push
({
name
:
"
riskAssess
"
name
:
'
riskAssess
'
});
})
// });
// });
}
})
);
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
// on cancel
// on cancel
});
});
},
},
handadd
()
{
handadd
()
{
this
.
$router
.
push
({
this
.
$router
.
push
({
...
@@ -193,10 +227,10 @@ export default {
...
@@ -193,10 +227,10 @@ export default {
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
getFun
(
`/risk/plan/floor/list/
${
id
}
`
)
getFun
(
`/risk/plan/floor/list/
${
id
}
`
)
.
then
(
res
=>
{
.
then
(
res
=>
{
this
.
floorListData
=
res
.
data
this
.
floorListData
=
res
.
data
;
this
.
changeBuild
(
res
.
data
[
0
].
name
)
this
.
changeBuild
(
res
.
data
[
0
].
name
)
;
this
.
option0
=
this
.
changeData
(
res
.
data
)
this
.
option0
=
this
.
changeData
(
res
.
data
)
;
this
.
value0
=
res
.
data
[
0
].
name
||
''
this
.
value0
=
res
.
data
[
0
].
name
||
""
;
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
...
@@ -245,27 +279,32 @@ export default {
...
@@ -245,27 +279,32 @@ export default {
duration
:
0
duration
:
0
});
});
let
floor
=
await
this
.
floorList
(
this
.
buildingId
);
let
floor
=
await
this
.
floorList
(
this
.
buildingId
);
let
room
=
await
this
.
roomList
(
floor
[
0
].
id
);
let
risk
=
await
this
.
riskList
(
id
,
this
.
buildingId
);
let
risk
=
await
this
.
riskList
(
id
,
this
.
buildingId
);
this
.
$toast
.
clear
();
this
.
$toast
.
clear
();
},
},
async
tabList
(
value
)
{
async
tabList
(
value
)
{
let
floor
=
await
this
.
floorList
(
value
);
let
floor
=
await
this
.
floorList
(
value
);
let
room
=
await
this
.
roomList
(
floor
[
0
].
id
);
let
risk
=
await
this
.
riskList
(
this
.
planId
,
value
);
let
risk
=
await
this
.
riskList
(
this
.
planId
,
value
);
},
},
changeBuild
(
name
){
changeBuild
(
name
)
{
let
arr
=
this
.
floorListData
.
map
((
item
)
=>
{
console
.
log
(
name
);
if
(
item
.
name
==
name
){
let
arr
=
this
.
floorListData
.
map
(
item
=>
{
return
item
.
children
if
(
item
.
name
==
name
)
{
return
item
.
children
;
}
}
});
});
this
.
option1
=
this
.
changeData
(
arr
[
0
])
this
.
option1
=
this
.
changeData
(
arr
[
0
]);
this
.
value1
=
this
.
changeData
(
arr
[
0
]).
id
this
.
value1
=
arr
[
0
][
0
].
id
;
this
.
roomList
(
this
.
value1
);
},
},
async
changeFloor
()
{
async
changeFloor
()
{
let
room
=
await
this
.
roomList
(
this
.
value1
);
let
room
=
await
this
.
roomList
(
this
.
value1
);
let
risk
=
await
this
.
riskList
(
this
.
planId
,
this
.
buildingId
,
this
.
value1
,
this
.
value2
);
let
risk
=
await
this
.
riskList
(
this
.
planId
,
this
.
buildingId
,
this
.
value1
,
this
.
value2
);
},
},
async
changeRoom
()
{
async
changeRoom
()
{
let
risk
=
await
this
.
riskList
(
let
risk
=
await
this
.
riskList
(
...
@@ -287,10 +326,10 @@ export default {
...
@@ -287,10 +326,10 @@ export default {
},
},
// 详情
// 详情
goDetail
(
data
)
{
goDetail
(
data
)
{
sessionStorage
.
setItem
(
'
buildingId
'
,
this
.
buildingId
)
sessionStorage
.
setItem
(
"
buildingId
"
,
this
.
buildingId
);
sessionStorage
.
setItem
(
'
planId
'
,
this
.
planId
)
sessionStorage
.
setItem
(
"
planId
"
,
this
.
planId
);
sessionStorage
.
setItem
(
'
buildingName
'
,
this
.
buildingName
)
sessionStorage
.
setItem
(
"
buildingName
"
,
this
.
buildingName
);
sessionStorage
.
setItem
(
'
inherentId
'
,
data
.
businessId
||
data
.
id
)
sessionStorage
.
setItem
(
"
inherentId
"
,
data
.
businessId
||
data
.
id
);
this
.
$router
.
push
({
this
.
$router
.
push
({
name
:
"
addCurrent
"
,
name
:
"
addCurrent
"
,
params
:
{
params
:
{
...
...
src/views/riskProject/add/taskList.vue
View file @
165a0c1c
...
@@ -236,15 +236,22 @@
...
@@ -236,15 +236,22 @@
<van-col
span=
"7"
<van-col
span=
"7"
><span
class=
"field-title"
>
任务节点:
</span></van-col
><span
class=
"field-title"
>
任务节点:
</span></van-col
>
>
<van-col
span=
"17"
>
{{
item
.
taskName
}}{{
<van-col
span=
"17"
item
.
taskResult
&&
item
.
taskResult
==
1
?
"
(审批通过)
"
:
"
(审批否决)
"
>
{{
item
.
taskName
}}
</van-col>
}}{{
item
.
taskResult
?
item
.
taskResult
==
1
?
"
(审批通过)
"
:
"
(审批否决)
"
:
""
}}
</van-col
>
</van-row>
</van-row>
<van-row
v-show=
"item.taskResult"
>
<van-row
v-show=
"item.taskResult"
>
<van-col
span=
"7"
<van-col
span=
"7"
><span
class=
"field-title"
>
审批意见:
</span></van-col
><span
class=
"field-title"
>
审批意见:
</span></van-col
>
>
<van-col
span=
"17"
>
{{
item
.
taskOpinion
}}
</van-col>
<van-col
span=
"17"
>
{{
item
.
taskOpinion
}}
</van-col>
</van-row>
</van-row>
<!--
<van-row>
<!--
<van-row>
<van-col
span=
"7"
<van-col
span=
"7"
...
@@ -261,7 +268,7 @@
...
@@ -261,7 +268,7 @@
</van-cell-group>
</van-cell-group>
</div>
</div>
</van-tab>
</van-tab>
<van-tab
title=
"
风险
评估报告"
>
<van-tab
title=
"评估报告"
>
<div
<div
style=
"height: 1.5rem;
style=
"height: 1.5rem;
background-color: #fff;
background-color: #fff;
...
@@ -766,7 +773,7 @@ export default {
...
@@ -766,7 +773,7 @@ export default {
name
:
"
taskDetail
"
,
name
:
"
taskDetail
"
,
params
:
{
params
:
{
id
:
item
.
id
,
id
:
item
.
id
,
floorId
:
item
.
floorId
floorId
:
item
.
floorId
}
}
});
});
}
}
...
...
src/views/riskProject/manage/index.vue
View file @
165a0c1c
...
@@ -145,7 +145,7 @@ export default {
...
@@ -145,7 +145,7 @@ export default {
},
},
methods
:
{
methods
:
{
timestampToTimes
(
time
)
{
timestampToTimes
(
time
)
{
return
timestampToTime
(
new
Date
(
time
),
"
DT
1
"
,
true
);
return
timestampToTime
(
new
Date
(
time
),
"
DT
2
"
,
true
);
},
},
handadd
()
{
handadd
()
{
this
.
$router
.
push
({
this
.
$router
.
push
({
...
@@ -200,6 +200,7 @@ export default {
...
@@ -200,6 +200,7 @@ export default {
});
});
sessionStorage
.
setItem
(
"
pathAuth
"
,
"
riskManage
"
);
sessionStorage
.
setItem
(
"
pathAuth
"
,
"
riskManage
"
);
sessionStorage
.
setItem
(
"
planId
"
,
data
.
id
);
sessionStorage
.
setItem
(
"
planId
"
,
data
.
id
);
sessionStorage
.
setItem
(
"
buildingId
"
,
""
);
this
.
showIndex
=
null
;
this
.
showIndex
=
null
;
},
},
// 确认
// 确认
...
...
src/views/riskProject/taskLedger/index.vue
View file @
165a0c1c
...
@@ -4,34 +4,48 @@
...
@@ -4,34 +4,48 @@
<LHeader
:text=
"text"
></LHeader>
<LHeader
:text=
"text"
></LHeader>
</van-sticky>
</van-sticky>
<van-sticky
offset-top=
"1.5rem"
>
<van-sticky
offset-top=
"1.5rem"
>
<van-search
v-model=
"searchValue"
show-action
placeholder=
"请输入搜索内容"
@
search=
"onSearch"
>
<van-search
v-model=
"searchValue"
show-action
placeholder=
"请输入搜索内容"
@
search=
"onSearch"
>
<template
#action
>
<template
#action
>
<div
@
click=
"onSearch"
>
搜索
</div>
<div
@
click=
"onSearch"
>
搜索
</div>
</
template
>
</
template
>
</van-search>
</van-search>
</van-sticky>
</van-sticky>
<div
class=
"con-list"
>
<div
class=
"con-list"
>
<van-cell-group
v-for=
"(item, index) in taskList"
:key=
"index"
inset
@
click=
"touchstart(index, item)"
>
<van-cell-group
v-for=
"(item, index) in taskList"
:key=
"index"
inset
@
click=
"touchstart(index, item)"
>
<div
style=
"font-size: 0.45rem;padding: 5px 0;"
>
{{ item.name }}
</div>
<div
style=
"font-size: 0.45rem;padding: 5px 0;"
>
{{ item.name }}
</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"
>
{{ timestampToTimes(item.startTime) }}
</van-col>
<van-col
span=
"15"
>
{{
timestampToTimes(item.startTime)
}}
</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.leaderUserName }}
</van-col>
<van-col
span=
"15"
>
{{ item.leaderUserName }}
</van-col>
</van-row>
</van-row>
</van-col>
</van-col>
<van-col
span=
"7"
:style=
"{
'color'
: '#03b615' }"
>
<van-col
span=
"7"
:style=
"{
color
: '#03b615' }"
>
{{ item.state }}
{{ item.state }}
</van-col>
</van-col>
</van-row>
</van-row>
<!-- 长按显示遮罩层 -->
<!-- 长按显示遮罩层 -->
<van-overlay
:show=
"showIndex == index"
>
<van-overlay
:show=
"showIndex == index"
>
<div
class=
"wrapper"
@
click.stop=
"showIndex = null"
>
<div
class=
"wrapper"
@
click.stop=
"showIndex = null"
>
<van-button
round
type=
"primary"
@
click=
"goDetail(item)"
>
详情
</van-button>
<van-button
round
type=
"primary"
@
click=
"goDetail(item)"
>
详情
</van-button
>
</div>
</div>
</van-overlay>
</van-overlay>
</van-cell-group>
</van-cell-group>
...
@@ -86,7 +100,8 @@ export default {
...
@@ -86,7 +100,8 @@ export default {
id
:
item
.
id
,
id
:
item
.
id
,
},
},
});
});
sessionStorage
.
setItem
(
"
buildingId
"
,
""
);
},
},
onSearch
(
searchValue
)
{
onSearch
(
searchValue
)
{
...
...
src/views/riskProject/taskLedger/presentDetail.vue
View file @
165a0c1c
<
template
>
<
template
>
<div>
<div>
<van-sticky
offset-top=
"0"
>
<van-sticky
offset-top=
"0"
>
<LHeader
:text=
"text"
></LHeader>
<LHeader
:text=
"text"
></LHeader>
</van-sticky>
</van-sticky>
<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;"
>
:scroll-to-error=
"true"
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
:show-error=
"false"
style=
"position: relative;top: 32%;transform: translateY(-50%);"
>
validate-trigger=
"onSubmit"
风险信息
>
</div>
<div
<van-field
readonly
required
label=
"评估人"
placeholder=
"请输入"
/>
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
<van-field
readonly
required
label=
"所属项目"
placeholder=
"请输入"
/>
>
<van-field
readonly
required
label=
"所属建筑物"
placeholder=
"请输入"
/>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
风险信息
</div>
<van-field
readonly
required
label=
"评估人"
placeholder=
"请输入"
/>
<van-field
readonly
required
label=
"所属项目"
placeholder=
"请输入"
/>
<van-field
readonly
required
label=
"所属建筑物"
placeholder=
"请输入"
/>
<van-field
required
clickable
name=
"floorId"
label=
"所属楼层"
placeholder=
"请选择"
<van-field
:rules=
"[
{ required: true, message: '所属楼层不能为空' }]" />
required
<div
style=
"display: flex;"
>
clickable
<van-field
readonly
required
name=
"roomName"
label=
"所属房间"
placeholder=
"请输入"
name=
"floorName"
:rules=
"[
{ required: true, message: '所属房间不能为空' }]" />
label=
"所属楼层"
<!--
<van-button
style=
"color: #cccc;background-color: #f0f1f5;"
icon=
"plus"
type=
"info"
/>
-->
placeholder=
"请选择"
</div>
:rules=
"[
{ required: true, message: '所属楼层不能为空' }]"
<van-field
required
clickable
name=
"name"
label=
"风险源名称"
placeholder=
"请输入"
/>
:rules=
"[
{ required: true, message: '风险源名称不能为空' }]" />
<div
style=
"display: flex;"
>
<van-field
required
name=
"factor"
label=
"风险因素"
placeholder=
"请选择"
<van-field
:rules=
"[
{ required: true, message: '风险因素不能为空' }]" />
readonly
<van-field
required
name=
"type"
label=
"准事故类型"
placeholder=
"请选择"
required
:rules=
"[
{ required: true, message: '准事故类型不能为空' }]" />
name=
"roomName"
label=
"所属房间"
placeholder=
"请输入"
:rules=
"[
{ required: true, message: '所属房间不能为空' }]"
/>
<!--
<van-button
style=
"color: #cccc;background-color: #f0f1f5;"
icon=
"plus"
type=
"info"
/>
-->
</div>
<van-field
required
clickable
name=
"name"
label=
"风险源名称"
placeholder=
"请输入"
:rules=
"[
{ required: true, message: '风险源名称不能为空' }]"
/>
<van-field
required
name=
"factor"
label=
"风险因素"
placeholder=
"请选择"
:rules=
"[
{ required: true, message: '风险因素不能为空' }]"
/>
<van-field
required
name=
"type"
label=
"准事故类型"
placeholder=
"请选择"
:rules=
"[
{ required: true, message: '准事故类型不能为空' }]"
/>
<van-field
required
name=
"presenceLocation"
label=
"存在部位"
placeholder=
"请输入"
<van-field
:rules=
"[
{ required: true, message: '存在部位不能为空' }]" />
required
<van-field
readonly
required
name=
"level"
label=
"风险管控措施评价"
placeholder=
"请选择"
name=
"presenceLocation"
:rules=
"[
{ required: true, message: '风险等级不能为空' }]" />
label=
"存在部位"
placeholder=
"请输入"
:rules=
"[
{ required: true, message: '存在部位不能为空' }]"
/>
<van-field
readonly
required
name=
"level"
label=
"风险管控措施评价"
placeholder=
"请选择"
:rules=
"[
{ required: true, message: '风险等级不能为空' }]"
/>
<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
</div>
src=
"@/assets/accidentIcon/bookmark.svg"
<van-field
name=
"hdPicture1"
label=
"风险源图片"
>
alt=
""
<template
#input
>
style=
"position: relative;top: 32%;transform: translateY(-50%);"
<van-uploader
multiple
:max-count=
"5"
disabled
upload-text=
"最多上传五个"
v-model=
"uploaderImg"
>
/>
<template
slot=
"default"
>
风险源图片
<div
style=
"
</div>
<van-field
name=
"hdPicture1"
label=
"风险源图片"
>
<template
#input
>
<van-uploader
multiple
:max-count=
"5"
disabled
upload-text=
"最多上传五个"
v-model=
"uploaderImg"
>
<template
slot=
"default"
>
<div
style=
"
width: 2.13333rem;
width: 2.13333rem;
height: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
background: #f7f8fa;
...
@@ -49,26 +109,53 @@
...
@@ -49,26 +109,53 @@
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"
/>
>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
<img
</div>
src=
"@/assets/upload/pic.png"
</
template
>
alt=
""
</van-uploader>
style=
"width: 0.64rem; height: 0.64rem"
</template>
/>
</van-field>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
</div>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
</
template
>
style=
"position: relative;top: 32%;transform: translateY(-50%);"
>
</van-uploader>
现有技术措施
</template>
</div>
</van-field>
<van-field
disabled
name=
"measuresProject"
label=
"技术措施"
type=
"textarea"
rows=
"1"
autosize
placeholder=
"请输入"
/>
<div
<van-field
name=
"measuresProjectFile[]"
label=
" "
>
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
<
template
#input
>
>
<van-uploader
disabled
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresProjectFile"
<img
accept=
"file"
result-type=
"file"
@
delete=
"deleteFile(...arguments, 'measuresProjectFile')"
>
src=
"@/assets/accidentIcon/bookmark.svg"
<template
slot=
"default"
>
alt=
""
<div
style=
"
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
现有技术措施
</div>
<van-field
disabled
name=
"measuresProject"
label=
"技术措施"
type=
"textarea"
rows=
"1"
autosize
placeholder=
"请输入"
/>
<van-field
name=
"measuresProjectFile[]"
label=
" "
>
<
template
#input
>
<van-uploader
disabled
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresProjectFile"
accept=
"file"
result-type=
"file"
@
delete=
"deleteFile(...arguments, 'measuresProjectFile')"
>
<template
slot=
"default"
>
<div
style=
"
width: 2.13333rem;
width: 2.13333rem;
height: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
background: #f7f8fa;
...
@@ -76,27 +163,53 @@
...
@@ -76,27 +163,53 @@
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"
/>
>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
<img
</div>
src=
"@/assets/upload/file.png"
</
template
>
alt=
""
</van-uploader>
style=
"width: 0.64rem; height: 0.64rem"
</template>
/>
</van-field>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
</div>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
</
template
>
style=
"position: relative;top: 32%;transform: translateY(-50%);"
>
</van-uploader>
现有管理措施
</template>
</div>
</van-field>
<van-field
disabled
name=
"measuresAdministration"
label=
"管理措施"
type=
"textarea"
rows=
"1"
autosize
<div
placeholder=
"请输入"
/>
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
<van-field
name=
"measuresAdministrationFile[]"
label=
" "
>
>
<
template
#input
>
<img
<van-uploader
disabled
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresAdministrationFile"
src=
"@/assets/accidentIcon/bookmark.svg"
accept=
"file"
result-type=
"file"
@
delete=
"deleteFile(...arguments, 'measuresAdministrationFile')"
>
alt=
""
<template
slot=
"default"
>
style=
"position: relative;top: 32%;transform: translateY(-50%);"
<div
style=
"
/>
现有管理措施
</div>
<van-field
disabled
name=
"measuresAdministration"
label=
"管理措施"
type=
"textarea"
rows=
"1"
autosize
placeholder=
"请输入"
/>
<van-field
name=
"measuresAdministrationFile[]"
label=
" "
>
<
template
#input
>
<van-uploader
disabled
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresAdministrationFile"
accept=
"file"
result-type=
"file"
@
delete=
"deleteFile(...arguments, 'measuresAdministrationFile')"
>
<template
slot=
"default"
>
<div
style=
"
width: 2.13333rem;
width: 2.13333rem;
height: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
background: #f7f8fa;
...
@@ -104,26 +217,53 @@
...
@@ -104,26 +217,53 @@
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"
/>
>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
<img
</div>
src=
"@/assets/upload/file.png"
</
template
>
alt=
""
</van-uploader>
style=
"width: 0.64rem; height: 0.64rem"
</template>
/>
</van-field>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
</div>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
</
template
>
style=
"position: relative;top: 32%;transform: translateY(-50%);"
>
</van-uploader>
现有应急措施
</template>
</div>
</van-field>
<van-field
disabled
name=
"measuresEmergency"
label=
"应急措施"
type=
"textarea"
rows=
"1"
autosize
placeholder=
"请输入"
/>
<div
<van-field
name=
"measuresEmergencyFile[]"
label=
" "
>
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
<
template
#input
>
>
<van-uploader
disabled
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresEmergencyFile"
<img
accept=
"file"
result-type=
"file"
@
delete=
"deleteFile(...arguments, 'measuresEmergencyFile')"
>
src=
"@/assets/accidentIcon/bookmark.svg"
<template
slot=
"default"
>
alt=
""
<div
style=
"
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
现有应急措施
</div>
<van-field
disabled
name=
"measuresEmergency"
label=
"应急措施"
type=
"textarea"
rows=
"1"
autosize
placeholder=
"请输入"
/>
<van-field
name=
"measuresEmergencyFile[]"
label=
" "
>
<
template
#input
>
<van-uploader
disabled
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresEmergencyFile"
accept=
"file"
result-type=
"file"
@
delete=
"deleteFile(...arguments, 'measuresEmergencyFile')"
>
<template
slot=
"default"
>
<div
style=
"
width: 2.13333rem;
width: 2.13333rem;
height: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
background: #f7f8fa;
...
@@ -131,167 +271,170 @@
...
@@ -131,167 +271,170 @@
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"
/>
>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
<img
</div>
src=
"@/assets/upload/file.png"
</
template
>
alt=
""
</van-uploader>
style=
"width: 0.64rem; height: 0.64rem"
</template>
/>
</van-field>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
</div>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
</
template
>
style=
"position: relative;top: 32%;transform: translateY(-50%);"
>
</van-uploader>
参考依据
</template>
</div>
</van-field>
</van-form>
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
</div>
>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
参考依据
</div>
</van-form>
</div>
</template>
</template>
<
script
>
<
script
>
import
LHeader
from
"
@/components/header.vue
"
;
import
LHeader
from
"
@/components/header.vue
"
;
export
default
{
export
default
{
// props: ["presentList"],
// props: ["presentList"],
components
:
{
components
:
{
LHeader
LHeader
},
},
data
()
{
data
()
{
return
{
return
{
showPopoveSetRank
:
false
,
showPopoveSetRank
:
false
,
activeNames
:
[
"
1
"
],
activeNames
:
[
"
1
"
],
showPopover
:
false
,
showPopover
:
false
,
showGradeDialog
:
false
,
showGradeDialog
:
false
,
taskId
:
""
,
taskId
:
""
,
text
:
"
现状风险详情
"
,
text
:
"
现状风险详情
"
,
id
:
""
,
id
:
""
,
isTimely
:
1
,
isTimely
:
1
,
active
:
0
,
active
:
0
,
form
:
{
form
:
{},
projectId
:
""
,
// 所属工程
},
projectName
:
""
,
// 所属工程
projectId
:
""
,
// 所属工程
projectDirectorName
:
""
,
// 所属工程
projectName
:
""
,
// 所属工程
projectDirector
:
""
,
// 所属工程
projectDirectorName
:
""
,
// 所属工程
showProjectName
:
false
,
projectDirector
:
""
,
// 所属工程
show
:
false
,
showProjectName
:
false
,
columnsProjectName
:
[],
show
:
false
,
factor
:
""
,
//风险因素
columnsProjectName
:
[],
showFactor
:
false
,
factor
:
""
,
//风险因素
columnsFactor
:
[],
showFactor
:
false
,
messageList
:
[
columnsFactor
:
[],
{
messageList
:
[
title
:
"
回显风险源名称
"
,
{
time
:
"
2022-12-12
"
,
title
:
'
回显风险源名称
'
,
name
:
"
Mr.周
"
,
time
:
'
2022-12-12
'
,
state
:
1
name
:
'
Mr.周
'
,
}
state
:
1
],
}
source
:
""
,
//风险源
],
userPrefix
:
""
,
//风险源
source
:
""
,
//风险源
showSource
:
false
,
userPrefix
:
""
,
//风险源
columnsSource
:
[],
showSource
:
false
,
trouble
:
""
,
//事故类型
columnsSource
:
[],
showTrouble
:
false
,
trouble
:
""
,
//事故类型
columnsTrouble
:
[],
showTrouble
:
false
,
setRank
:
""
,
//风险定级
columnsTrouble
:
[],
showSetRank
:
false
,
setRank
:
""
,
//风险定级
columnsSetRank
:
[
"
矩阵式定级
"
,
"
其他定级方式
"
],
//严重程度
showSetRank
:
false
,
riskRank
:
""
,
// 风险等级
columnsSetRank
:
[
"
矩阵式定级
"
,
"
其他定级方式
"
],
//严重程度
showRiskRank
:
false
,
riskRank
:
""
,
// 风险等级
columnsRiskRank
:
[],
//发生可能性
showRiskRank
:
false
,
showSetRankMode
:
false
,
// 是否显示定级方式
columnsRiskRank
:
[],
//发生可能性
setRankMode
:
""
,
// 定级方式文字
showSetRankMode
:
false
,
// 是否显示定级方式
setRankModeImg
:
[],
// 定级方式图片
setRankMode
:
""
,
// 定级方式文字
uploaderImg
:
[],
// 定级方式图片
setRankModeImg
:
[],
// 定级方式图片
location
:
""
,
//风险部位
uploaderImg
:
[],
// 定级方式图片
control
:
""
,
//管控层级
location
:
""
,
//风险部位
riskName
:
""
,
//管控层级
control
:
""
,
//管控层级
showControl
:
false
,
riskName
:
""
,
//管控层级
columnsControl
:
[
"
项目级
"
,
"
企业级
"
],
showControl
:
false
,
mainDutyDept
:
""
,
// 主责部门
columnsControl
:
[
"
项目级
"
,
"
企业级
"
],
mainDutyDeptId
:
""
,
mainDutyDept
:
""
,
// 主责部门
showMainDutyDept
:
false
,
mainDutyDeptId
:
""
,
columnsMainDutyDept
:
[],
showMainDutyDept
:
false
,
mainDutyPeopLe
:
""
,
// 主责人员
columnsMainDutyDept
:
[],
mainDutyPeopLeId
:
""
,
mainDutyPeopLe
:
""
,
// 主责人员
showMainDutyPeopLe
:
false
,
mainDutyPeopLeId
:
""
,
columnsMainDutyPeopLe
:
[],
showMainDutyPeopLe
:
false
,
technology
:
""
,
//技术措施文字
columnsMainDutyPeopLe
:
[],
technologyImg
:
[],
//技术措施图片
technology
:
""
,
//技术措施文字
administration
:
""
,
//管理措施文字
technologyImg
:
[],
//技术措施图片
measuresAdministrationFile
:
[],
//管理措施图片
administration
:
""
,
//管理措施文字
measuresProjectFile
:
[],
//管理措施图片
measuresAdministrationFile
:
[],
//管理措施图片
measuresEmergencyFile
:
[],
//管理措施图片
measuresProjectFile
:
[],
//管理措施图片
urgent
:
""
,
//应急措施文字
measuresEmergencyFile
:
[],
//管理措施图片
urgentImg
:
[],
//应急措施图片
urgent
:
""
,
//应急措施文字
returnCause
:
""
,
// 退回原因
urgentImg
:
[],
//应急措施图片
isShowreturnCause
:
false
,
returnCause
:
""
,
// 退回原因
possibleValue
:
""
,
isShowreturnCause
:
false
,
possibleScore
:
0
,
possibleValue
:
""
,
severityValue
:
""
,
possibleScore
:
0
,
severityScore
:
0
severityValue
:
""
,
};
severityScore
:
0
,
},
};
created
()
{
},
// this.form.buildingIds = this.$route.params.buildingId ||sessionStorage.getItem("buildingId")
created
()
{
// this.form.planId = this.$route.params.planId||sessionStorage.getItem("planId")
// this.form.buildingIds = this.$route.params.buildingId ||sessionStorage.getItem("buildingId")
// this.form.buildingName = this.$route.params.buildingName||sessionStorage.getItem("buildingName")
// this.form.planId = this.$route.params.planId||sessionStorage.getItem("planId")
// this.form.userId = userInfo.userId
// this.form.buildingName = this.$route.params.buildingName||sessionStorage.getItem("buildingName")
// this.form.userName = userInfo.userName
// this.form.userId = userInfo.userId
// this.form.deptName = userInfo.dept.deptName
// this.form.userName = userInfo.userName
// this.form.projectId = '测试项目',
// this.form.deptName = userInfo.dept.deptName
// this.form.level = this.$route.params.level ? this.$route.params.level :''
// this.form.projectId = '测试项目',
},
// this.form.level = this.$route.params.level ? this.$route.params.level :''
methods
:
{},
},
watch
:
{}
methods
:
{
},
watch
:
{
},
};
};
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
/* @import url(); 引入css类 */
/* @import url(); 引入css类 */
.con-list {
.con-list {
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%;
}
}
}
}
}
}
}
}
.dialogContain {
.dialogContain {
width: 100%;
width: 100%;
height: 100%;
height: 100%;
padding: 10px;
padding: 10px;
box-sizing: border-box;
box-sizing: border-box;
}
}
</
style
>
</
style
>
src/views/riskProject/taskLedger/tabDetail.vue
View file @
165a0c1c
<
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;"
>
:scroll-to-error=
"true"
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
:show-error=
"false"
style=
"position: relative;top: 32%;transform: translateY(-50%);"
>
validate-trigger=
"onSubmit"
风险信息
>
</div>
<div
<van-field
readonly
required
:value=
"InherentRisk.userName"
label=
"评估人"
placeholder=
"请输入"
/>
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
<van-field
readonly
required
:value=
"InherentRisk.projectName"
label=
"所属项目"
placeholder=
"请输入"
/>
>
<van-field
readonly
required
:value=
"InherentRisk.buildingName"
label=
"所属建筑物"
placeholder=
"请输入"
/>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
风险信息
</div>
<van-field
readonly
required
:value=
"InherentRisk.userName"
label=
"评估人"
placeholder=
"请输入"
/>
<van-field
readonly
required
:value=
"InherentRisk.projectName"
label=
"所属项目"
placeholder=
"请输入"
/>
<van-field
readonly
required
:value=
"InherentRisk.buildingName"
label=
"所属建筑物"
placeholder=
"请输入"
/>
<van-field
required
clickable
name=
"floorId"
:value=
"InherentRisk.floorId"
label=
"所属楼层"
placeholder=
"请选择"
<van-field
:rules=
"[
{ required: true, message: '所属楼层不能为空' }]" />
required
<div
style=
"display: flex;"
>
clickable
<van-field
readonly
required
name=
"roomName"
:value=
"InherentRisk.roomName"
label=
"所属房间"
placeholder=
"请输入"
name=
"floorName"
:rules=
"[
{ required: true, message: '所属房间不能为空' }]" />
:value=
"InherentRisk.floorName"
<!--
<van-button
style=
"color: #cccc;background-color: #f0f1f5;"
icon=
"plus"
type=
"info"
/>
-->
label=
"所属楼层"
</div>
placeholder=
"请选择"
<van-field
required
clickable
name=
"name"
v-model=
"InherentRisk.factor"
label=
"风险源名称"
placeholder=
"请输入"
:rules=
"[
{ required: true, message: '所属楼层不能为空' }]"
:rules=
"[
{ required: true, message: '风险源名称不能为空' }]" />
/>
<van-field
v-model=
"InherentRisk.factor"
required
name=
"factor"
label=
"风险因素"
placeholder=
"请选择"
<div
style=
"display: flex;"
>
:rules=
"[
{ required: true, message: '风险因素不能为空' }]" />
<van-field
<van-field
v-model=
"InherentRisk.type"
required
name=
"type"
label=
"准事故类型"
placeholder=
"请选择"
readonly
:rules=
"[
{ required: true, message: '准事故类型不能为空' }]" />
required
name=
"roomName"
:value=
"InherentRisk.roomName"
label=
"所属房间"
placeholder=
"请输入"
:rules=
"[
{ required: true, message: '所属房间不能为空' }]"
/>
<!--
<van-button
style=
"color: #cccc;background-color: #f0f1f5;"
icon=
"plus"
type=
"info"
/>
-->
</div>
<van-field
required
clickable
name=
"name"
v-model=
"InherentRisk.factor"
label=
"风险源名称"
placeholder=
"请输入"
:rules=
"[
{ required: true, message: '风险源名称不能为空' }]"
/>
<van-field
v-model=
"InherentRisk.factor"
required
name=
"factor"
label=
"风险因素"
placeholder=
"请选择"
:rules=
"[
{ required: true, message: '风险因素不能为空' }]"
/>
<van-field
v-model=
"InherentRisk.type"
required
name=
"type"
label=
"准事故类型"
placeholder=
"请选择"
:rules=
"[
{ required: true, message: '准事故类型不能为空' }]"
/>
<van-field
readonly
v-model=
"InherentRisk.level"
required
name=
"level"
label=
"风险等级"
placeholder=
"请选择"
<van-field
:rules=
"[
{ required: true, message: '风险等级不能为空' }]" />
readonly
v-model=
"InherentRisk.level"
required
name=
"level"
label=
"风险等级"
placeholder=
"请选择"
:rules=
"[
{ required: true, message: '风险等级不能为空' }]"
/>
<van-field
required
name=
"presenceLocation"
v-model=
"InherentRisk.presenceLocation"
label=
"存在部位"
placeholder=
"请输入"
<van-field
:rules=
"[
{ required: true, message: '存在部位不能为空' }]" />
required
name=
"presenceLocation"
v-model=
"InherentRisk.presenceLocation"
label=
"存在部位"
placeholder=
"请输入"
:rules=
"[
{ required: true, message: '存在部位不能为空' }]"
/>
<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
</div>
src=
"@/assets/accidentIcon/bookmark.svg"
<van-field
name=
"hdPicture1"
label=
"风险源图片"
>
alt=
""
<template
#input
>
style=
"position: relative;top: 32%;transform: translateY(-50%);"
<van-uploader
multiple
:max-count=
"5"
disabled
/>
upload-text=
"最多上传五个"
v-model=
"uploaderImg"
>
风险源图片
<template
slot=
"default"
>
</div>
<div
style=
"
<van-field
name=
"hdPicture1"
label=
"风险源图片"
>
<template
#input
>
<van-uploader
multiple
:max-count=
"5"
disabled
upload-text=
"最多上传五个"
v-model=
"uploaderImg"
>
<template
slot=
"default"
>
<div
style=
"
width: 2.13333rem;
width: 2.13333rem;
height: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
background: #f7f8fa;
...
@@ -48,27 +132,54 @@
...
@@ -48,27 +132,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"
/>
>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
<img
</div>
src=
"@/assets/upload/pic.png"
</
template
>
alt=
""
</van-uploader>
style=
"width: 0.64rem; height: 0.64rem"
</template>
/>
</van-field>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
</div>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
</
template
>
style=
"position: relative;top: 32%;transform: translateY(-50%);"
>
</van-uploader>
应有技术措施
</template>
</div>
</van-field>
<van-field
disabled
v-model=
"InherentRisk.measuresProject"
name=
"measuresProject"
label=
"技术措施"
type=
"textarea"
rows=
"1"
autosize
<div
placeholder=
"请输入"
/>
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
<van-field
name=
"measuresProjectFile[]"
label=
" "
>
>
<
template
#input
>
<img
<van-uploader
disabled
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresProjectFile"
accept=
"file"
src=
"@/assets/accidentIcon/bookmark.svg"
result-type=
"file"
@
delete=
"deleteFile(...arguments, 'measuresProjectFile')"
>
alt=
""
<template
slot=
"default"
>
style=
"position: relative;top: 32%;transform: translateY(-50%);"
<div
style=
"
/>
应有技术措施
</div>
<van-field
disabled
v-model=
"InherentRisk.measuresProject"
name=
"measuresProject"
label=
"技术措施"
type=
"textarea"
rows=
"1"
autosize
placeholder=
"请输入"
/>
<van-field
name=
"measuresProjectFile[]"
label=
" "
>
<
template
#input
>
<van-uploader
disabled
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresProjectFile"
accept=
"file"
result-type=
"file"
@
delete=
"deleteFile(...arguments, 'measuresProjectFile')"
>
<template
slot=
"default"
>
<div
style=
"
width: 2.13333rem;
width: 2.13333rem;
height: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
background: #f7f8fa;
...
@@ -76,27 +187,54 @@
...
@@ -76,27 +187,54 @@
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"
/>
>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
<img
</div>
src=
"@/assets/upload/file.png"
</
template
>
alt=
""
</van-uploader>
style=
"width: 0.64rem; height: 0.64rem"
</template>
/>
</van-field>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
</div>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
</
template
>
style=
"position: relative;top: 32%;transform: translateY(-50%);"
>
</van-uploader>
应有管理措施
</template>
</div>
</van-field>
<van-field
disabled
v-model=
"InherentRisk.measuresAdministration"
name=
"measuresAdministration"
label=
"管理措施"
type=
"textarea"
<div
rows=
"1"
autosize
placeholder=
"请输入"
/>
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
<van-field
name=
"measuresAdministrationFile[]"
label=
" "
>
>
<
template
#input
>
<img
<van-uploader
disabled
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresAdministrationFile"
src=
"@/assets/accidentIcon/bookmark.svg"
accept=
"file"
result-type=
"file"
@
delete=
"deleteFile(...arguments, 'measuresAdministrationFile')"
>
alt=
""
<template
slot=
"default"
>
style=
"position: relative;top: 32%;transform: translateY(-50%);"
<div
style=
"
/>
应有管理措施
</div>
<van-field
disabled
v-model=
"InherentRisk.measuresAdministration"
name=
"measuresAdministration"
label=
"管理措施"
type=
"textarea"
rows=
"1"
autosize
placeholder=
"请输入"
/>
<van-field
name=
"measuresAdministrationFile[]"
label=
" "
>
<
template
#input
>
<van-uploader
disabled
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresAdministrationFile"
accept=
"file"
result-type=
"file"
@
delete=
"deleteFile(...arguments, 'measuresAdministrationFile')"
>
<template
slot=
"default"
>
<div
style=
"
width: 2.13333rem;
width: 2.13333rem;
height: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
background: #f7f8fa;
...
@@ -104,27 +242,54 @@
...
@@ -104,27 +242,54 @@
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"
/>
>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
<img
</div>
src=
"@/assets/upload/file.png"
</
template
>
alt=
""
</van-uploader>
style=
"width: 0.64rem; height: 0.64rem"
</template>
/>
</van-field>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
</div>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
</
template
>
style=
"position: relative;top: 32%;transform: translateY(-50%);"
>
</van-uploader>
应有应急措施
</template>
</div>
</van-field>
<van-field
disabled
v-model=
"InherentRisk.measuresEmergency"
name=
"measuresEmergency"
label=
"应急措施"
type=
"textarea"
rows=
"1"
<div
autosize
placeholder=
"请输入"
/>
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
<van-field
name=
"measuresEmergencyFile[]"
label=
" "
>
>
<
template
#input
>
<img
<van-uploader
disabled
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresEmergencyFile"
accept=
"file"
src=
"@/assets/accidentIcon/bookmark.svg"
result-type=
"file"
@
delete=
"deleteFile(...arguments, 'measuresEmergencyFile')"
>
alt=
""
<template
slot=
"default"
>
style=
"position: relative;top: 32%;transform: translateY(-50%);"
<div
style=
"
/>
应有应急措施
</div>
<van-field
disabled
v-model=
"InherentRisk.measuresEmergency"
name=
"measuresEmergency"
label=
"应急措施"
type=
"textarea"
rows=
"1"
autosize
placeholder=
"请输入"
/>
<van-field
name=
"measuresEmergencyFile[]"
label=
" "
>
<
template
#input
>
<van-uploader
disabled
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresEmergencyFile"
accept=
"file"
result-type=
"file"
@
delete=
"deleteFile(...arguments, 'measuresEmergencyFile')"
>
<template
slot=
"default"
>
<div
style=
"
width: 2.13333rem;
width: 2.13333rem;
height: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
background: #f7f8fa;
...
@@ -132,163 +297,166 @@
...
@@ -132,163 +297,166 @@
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"
/>
>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
<img
</div>
src=
"@/assets/upload/file.png"
</
template
>
alt=
""
</van-uploader>
style=
"width: 0.64rem; height: 0.64rem"
</template>
/>
</van-field>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
</div>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
</
template
>
style=
"position: relative;top: 32%;transform: translateY(-50%);"
>
</van-uploader>
参考依据
</template>
</div>
</van-field>
</van-form>
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
</div>
>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
参考依据
</div>
</van-form>
</div>
</template>
</template>
<
script
>
<
script
>
export
default
{
export
default
{
props
:
[
"
InherentRisk
"
],
props
:
[
"
InherentRisk
"
],
data
()
{
data
()
{
return
{
return
{
showPopoveSetRank
:
false
,
showPopoveSetRank
:
false
,
activeNames
:
[
"
1
"
],
activeNames
:
[
"
1
"
],
showPopover
:
false
,
showPopover
:
false
,
showGradeDialog
:
false
,
showGradeDialog
:
false
,
taskId
:
""
,
taskId
:
""
,
text
:
"
添加固有风险
"
,
text
:
"
添加固有风险
"
,
id
:
""
,
id
:
""
,
isTimely
:
1
,
isTimely
:
1
,
active
:
0
,
active
:
0
,
form
:
{
form
:
{},
projectId
:
""
,
// 所属工程
},
projectName
:
""
,
// 所属工程
projectId
:
""
,
// 所属工程
projectDirectorName
:
""
,
// 所属工程
projectName
:
""
,
// 所属工程
projectDirector
:
""
,
// 所属工程
projectDirectorName
:
""
,
// 所属工程
showProjectName
:
false
,
projectDirector
:
""
,
// 所属工程
show
:
false
,
showProjectName
:
false
,
columnsProjectName
:
[],
show
:
false
,
factor
:
""
,
//风险因素
columnsProjectName
:
[],
showFactor
:
false
,
factor
:
""
,
//风险因素
columnsFactor
:
[],
showFactor
:
false
,
messageList
:
[
columnsFactor
:
[],
{
messageList
:
[
title
:
"
回显风险源名称
"
,
{
time
:
"
2022-12-12
"
,
title
:
'
回显风险源名称
'
,
name
:
"
Mr.周
"
,
time
:
'
2022-12-12
'
,
state
:
1
name
:
'
Mr.周
'
,
}
state
:
1
],
}
source
:
""
,
//风险源
],
userPrefix
:
""
,
//风险源
source
:
""
,
//风险源
showSource
:
false
,
userPrefix
:
""
,
//风险源
columnsSource
:
[],
showSource
:
false
,
trouble
:
""
,
//事故类型
columnsSource
:
[],
showTrouble
:
false
,
trouble
:
""
,
//事故类型
columnsTrouble
:
[],
showTrouble
:
false
,
setRank
:
""
,
//风险定级
columnsTrouble
:
[],
showSetRank
:
false
,
setRank
:
""
,
//风险定级
columnsSetRank
:
[
"
矩阵式定级
"
,
"
其他定级方式
"
],
//严重程度
showSetRank
:
false
,
riskRank
:
""
,
// 风险等级
columnsSetRank
:
[
"
矩阵式定级
"
,
"
其他定级方式
"
],
//严重程度
showRiskRank
:
false
,
riskRank
:
""
,
// 风险等级
columnsRiskRank
:
[],
//发生可能性
showRiskRank
:
false
,
showSetRankMode
:
false
,
// 是否显示定级方式
columnsRiskRank
:
[],
//发生可能性
setRankMode
:
""
,
// 定级方式文字
showSetRankMode
:
false
,
// 是否显示定级方式
setRankModeImg
:
[],
// 定级方式图片
setRankMode
:
""
,
// 定级方式文字
uploaderImg
:
[],
// 定级方式图片
setRankModeImg
:
[],
// 定级方式图片
location
:
""
,
//风险部位
uploaderImg
:
[],
// 定级方式图片
control
:
""
,
//管控层级
location
:
""
,
//风险部位
riskName
:
""
,
//管控层级
control
:
""
,
//管控层级
showControl
:
false
,
riskName
:
""
,
//管控层级
columnsControl
:
[
"
项目级
"
,
"
企业级
"
],
showControl
:
false
,
mainDutyDept
:
""
,
// 主责部门
columnsControl
:
[
"
项目级
"
,
"
企业级
"
],
mainDutyDeptId
:
""
,
mainDutyDept
:
""
,
// 主责部门
showMainDutyDept
:
false
,
mainDutyDeptId
:
""
,
columnsMainDutyDept
:
[],
showMainDutyDept
:
false
,
mainDutyPeopLe
:
""
,
// 主责人员
columnsMainDutyDept
:
[],
mainDutyPeopLeId
:
""
,
mainDutyPeopLe
:
""
,
// 主责人员
showMainDutyPeopLe
:
false
,
mainDutyPeopLeId
:
""
,
columnsMainDutyPeopLe
:
[],
showMainDutyPeopLe
:
false
,
technology
:
""
,
//技术措施文字
columnsMainDutyPeopLe
:
[],
technologyImg
:
[],
//技术措施图片
technology
:
""
,
//技术措施文字
administration
:
""
,
//管理措施文字
technologyImg
:
[],
//技术措施图片
measuresAdministrationFile
:
[],
//管理措施图片
administration
:
""
,
//管理措施文字
measuresProjectFile
:
[],
//管理措施图片
measuresAdministrationFile
:
[],
//管理措施图片
measuresEmergencyFile
:
[],
//管理措施图片
measuresProjectFile
:
[],
//管理措施图片
urgent
:
""
,
//应急措施文字
measuresEmergencyFile
:
[],
//管理措施图片
urgentImg
:
[],
//应急措施图片
urgent
:
""
,
//应急措施文字
returnCause
:
""
,
// 退回原因
urgentImg
:
[],
//应急措施图片
isShowreturnCause
:
false
,
returnCause
:
""
,
// 退回原因
possibleValue
:
""
,
isShowreturnCause
:
false
,
possibleScore
:
0
,
possibleValue
:
""
,
severityValue
:
""
,
possibleScore
:
0
,
severityScore
:
0
severityValue
:
""
,
};
severityScore
:
0
,
},
};
created
()
{
},
// this.form.buildingIds = this.$route.params.buildingId ||sessionStorage.getItem("buildingId")
created
()
{
// this.form.planId = this.$route.params.planId||sessionStorage.getItem("planId")
// this.form.buildingIds = this.$route.params.buildingId ||sessionStorage.getItem("buildingId")
// this.form.buildingName = this.$route.params.buildingName||sessionStorage.getItem("buildingName")
// this.form.planId = this.$route.params.planId||sessionStorage.getItem("planId")
// this.form.userId = userInfo.userId
// this.form.buildingName = this.$route.params.buildingName||sessionStorage.getItem("buildingName")
// this.form.userName = userInfo.userName
// this.form.userId = userInfo.userId
// this.form.deptName = userInfo.dept.deptName
// this.form.userName = userInfo.userName
// this.form.projectId = '测试项目',
// this.form.deptName = userInfo.dept.deptName
// this.form.level = this.$route.params.level ? this.$route.params.level :''
// this.form.projectId = '测试项目',
},
// this.form.level = this.$route.params.level ? this.$route.params.level :''
methods
:
{},
},
watch
:
{}
methods
:
{
},
watch
:
{
},
};
};
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
/* @import url(); 引入css类 */
/* @import url(); 引入css类 */
.con-list {
.con-list {
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%;
}
}
}
}
}
}
}
}
.dialogContain {
.dialogContain {
width: 100%;
width: 100%;
height: 100%;
height: 100%;
padding: 10px;
padding: 10px;
box-sizing: border-box;
box-sizing: border-box;
}
}
</
style
>
</
style
>
vue.config.js
View file @
165a0c1c
...
@@ -8,9 +8,9 @@ module.exports = {
...
@@ -8,9 +8,9 @@ module.exports = {
//以上的ip和端口是我们本机的;下面为需要跨域的
//以上的ip和端口是我们本机的;下面为需要跨域的
proxy
:
{
//配置跨域
proxy
:
{
//配置跨域
'
/app-api
'
:
{
'
/app-api
'
:
{
//
target: 'http://192.168.4.232:8080/', //这里是后台的地址
target
:
'
http://192.168.4.232:8080/
'
,
//这里是后台的地址
// target: 'http://192.168.15.124:8080/', //这里是杨帆的地址
// target: 'http://192.168.15.124:8080/', //这里是杨帆的地址
target
:
'
http://192.168.10.137:8080/
'
,
//这里是昊哥的地址
//
target: 'http://192.168.10.137:8080/', //这里是昊哥的地址
// target: 'http://192.168.10.36:8080/', //这里是昊哥的地址
// target: 'http://192.168.10.36:8080/', //这里是昊哥的地址
// target: 'http://localhost:8080/', //这里是后台的地址
// target: 'http://localhost:8080/', //这里是后台的地址
ws
:
true
,
ws
:
true
,
...
...
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