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
df43f7d7
Commit
df43f7d7
authored
Jul 06, 2023
by
dlkong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into dev_kdl
parents
1ec2d9e4
d7927ee9
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
2275 additions
and
1626 deletions
+2275
-1626
src/App.vue
src/App.vue
+1
-1
src/components/header.vue
src/components/header.vue
+5
-5
src/router/index.js
src/router/index.js
+10
-0
src/views/riskProject/add/addCurrent.vue
src/views/riskProject/add/addCurrent.vue
+287
-423
src/views/riskProject/add/addInherent.vue
src/views/riskProject/add/addInherent.vue
+206
-338
src/views/riskProject/add/addPresent.vue
src/views/riskProject/add/addPresent.vue
+0
-2
src/views/riskProject/add/inherentRisks.vue
src/views/riskProject/add/inherentRisks.vue
+322
-304
src/views/riskProject/add/taskList.vue
src/views/riskProject/add/taskList.vue
+338
-305
src/views/riskProject/assess/index.vue
src/views/riskProject/assess/index.vue
+317
-220
src/views/riskProject/assess/riskBigDetail.vue
src/views/riskProject/assess/riskBigDetail.vue
+387
-0
src/views/riskProject/execution/index.vue
src/views/riskProject/execution/index.vue
+343
-0
src/views/riskProject/manage/index.vue
src/views/riskProject/manage/index.vue
+5
-1
src/views/saveWorkbench/index.vue
src/views/saveWorkbench/index.vue
+52
-26
vue.config.js
vue.config.js
+2
-1
No files found.
src/App.vue
View file @
df43f7d7
...
...
@@ -40,7 +40,7 @@ export default {
'
riskAdd
'
],
// 不需要展示底部tabbar的页面
noTab
:[
"
login
"
,
"
login2
"
,
'
addCurrent
'
,
'
addPresent
'
,
'
addInherent
'
,
'
riskInherent
'
,
"
choose-people
"
,
"
scan
"
,
'
success
'
,
'
fail
'
,
'
warn
'
,
'
center
'
,
'
reset-pas-two
'
,
'
riskTaskList
'
,
'
riskView
'
],
noTab
:[
"
login
"
,
"
login2
"
,
'
addCurrent
'
,
'
addPresent
'
,
'
addInherent
'
,
'
riskInherent
'
,
"
choose-people
"
,
"
scan
"
,
'
success
'
,
'
fail
'
,
'
warn
'
,
'
center
'
,
'
reset-pas-two
'
,
'
riskTaskList
'
,
'
risk
BigDetail
'
,
'
risk
View
'
],
// cachePage预先定义的缓存页面
otherCache
:
[],
// 专门处理列表缓存的页面,这些页面缓存逻辑与其他缓存不一样去详情返回列表缓存,但是进入列表必须刷新,如何有需要缓存的列表请放到这里来。
...
...
src/components/header.vue
View file @
df43f7d7
...
...
@@ -11,11 +11,11 @@
<
template
>
<div>
<van-sticky>
<header
class=
"header"
>
<van-icon
@
click=
"to"
name=
"arrow-left"
class=
"iconColorLeft"
/>
<span>
{{
text
}}
</span>
<!--
<van-icon
name=
"bars"
class=
"iconColorRight"
/>
-->
</header>
<header
class=
"header"
>
<van-icon
@
click=
"to"
name=
"arrow-left"
class=
"iconColorLeft"
/>
<span>
{{
text
}}
</span>
<!--
<van-icon
name=
"bars"
class=
"iconColorRight"
/>
-->
</header>
</van-sticky>
</div>
</
template
>
...
...
src/router/index.js
View file @
df43f7d7
...
...
@@ -166,6 +166,16 @@ const routes = [{
name
:
'
addPresent
'
,
component
:
()
=>
import
(
'
../views/riskProject/add/addPresent.vue
'
),
},
{
//风险评估列表详情页
path
:
'
/riskBigDetail
'
,
name
:
'
riskBigDetail
'
,
component
:
()
=>
import
(
'
../views/riskProject/assess/riskBigDetail.vue
'
),
},
{
//执行情况管理
path
:
'
/riskExecution
'
,
name
:
'
riskExecution
'
,
component
:
()
=>
import
(
'
../views/riskProject/execution/index.vue
'
),
},
{
//四色图
path
:
'
/riskView
'
,
name
:
'
riskView
'
,
...
...
src/views/riskProject/add/addCurrent.vue
View file @
df43f7d7
<
template
>
<div>
<LHeader
:text=
"text"
></LHeader>
<van-tabs
v-model=
"active"
@
change=
"tabList"
color=
"#2980f7"
animated
>
<van-tab
title=
"固有风险信息"
>
<van-form
@
submit=
"onSubmit"
:scroll-to-error=
"true"
: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>
<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-tabs
v-model=
"active"
@
change=
"tabList"
color=
"#2980f7"
animated
>
<van-tab
title=
"固有风险信息"
>
<van-form
@
submit=
"onSubmit"
:scroll-to-error=
"true"
: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>
<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=
"请选择"
@
click=
"seletFloor('floor')"
:rules=
"[
{ required: true, message: '所属楼层不能为空' }]"
/>
<van-field
required
clickable
name=
"floorId"
:value=
"form.floorId"
label=
"所属楼层"
placeholder=
"请选择"
@
click=
"seletFloor('floor')"
:rules=
"[
{ required: true, message: '所属楼层不能为空' }]" />
<van-field
readonly
required
name=
"roomName"
:value=
"form.roomName"
label=
"所属房间"
placeholder=
"请输入"
@
click=
"seletRoom('room')"
:rules=
"[
{ required: true, message: '所属房间不能为空' }]"
/>
<van-field
readonly
required
name=
"roomName"
:value=
"form.roomName"
label=
"所属房间"
placeholder=
"请输入"
@
click=
"seletRoom('room')"
:rules=
"[
{ required: true, message: '所属房间不能为空' }]" />
<van-field
required
clickable
name=
"name"
v-model=
"form.name"
label=
"风险源名称"
placeholder=
"请输入"
:rules=
"[
{ required: true, message: '风险源名称不能为空' }]"
/>
<van-field
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=
"请选择"
@
click=
"seletFactor('factor')"
:rules=
"[
{ required: true, message: '风险因素不能为空' }]"
/>
<van-field
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=
"请选择"
@
click=
"seletType('type')"
:rules=
"[
{ required: true, message: '准事故类型不能为空' }]"
/>
<van-field
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('level')"
:rules=
"[
{ required: true, message: '风险等级不能为空' }]"
/>
<van-field
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=
"存在部位"
placeholder=
"请输入"
:rules=
"[
{ required: true, message: '存在部位不能为空' }]"
/>
<van-field
required
name=
"presenceLocation"
v-model=
"form.presenceLocation"
label=
"存在部位"
placeholder=
"请输入"
:rules=
"[
{ required: true, message: '存在部位不能为空' }]" />
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"position: relative;top: 32%;transform: translateY(-50%);"
>
风险源图片
</div>
<van-field
name=
"hdPicture1"
label=
"风险源图片"
>
<template
#input
>
<van-uploader
@
delete=
"deleteFile(...arguments, 'uploaderImg')"
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"uploaderImg"
>
<template
slot=
"default"
>
<!-- 11111111111 -->
<div
style=
"
<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
name=
"hdPicture1"
label=
"风险源图片"
>
<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;
height: 2.13333rem;
background: #f7f8fa;
...
...
@@ -139,49 +56,29 @@
align-items: center;
justify-content: center;
flex-direction: column;
"
>
<img
src=
"@/assets/upload/pic.png"
alt=
""
style=
"width: 0.64rem; height: 0.64rem"
/>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span
>
</div>
"
>
<img
src=
"@/assets/upload/pic.png"
alt=
""
style=
"width: 0.64rem; height: 0.64rem"
/>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
</div>
</
template
>
</van-uploader>
</template>
</van-uploader>
</template>
</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
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=
"
</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
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;
height: 2.13333rem;
background: #f7f8fa;
...
...
@@ -189,49 +86,31 @@
align-items: center;
justify-content: center;
flex-direction: column;
"
>
<img
src=
"@/assets/upload/file.png"
alt=
""
style=
"width: 0.64rem; height: 0.64rem"
/>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span
>
</div>
"
>
<img
src=
"@/assets/upload/file.png"
alt=
""
style=
"width: 0.64rem; height: 0.64rem"
/>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
</div>
</
template
>
</van-uploader>
</template>
</van-uploader>
</template>
</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
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=
"
</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
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;
height: 2.13333rem;
background: #f7f8fa;
...
...
@@ -239,49 +118,31 @@
align-items: center;
justify-content: center;
flex-direction: column;
"
>
<img
src=
"@/assets/upload/file.png"
alt=
""
style=
"width: 0.64rem; height: 0.64rem"
/>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span
>
</div>
"
>
<img
src=
"@/assets/upload/file.png"
alt=
""
style=
"width: 0.64rem; height: 0.64rem"
/>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
</div>
</
template
>
</van-uploader>
</template>
</van-uploader>
</template>
</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
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=
"
</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
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;
height: 2.13333rem;
background: #f7f8fa;
...
...
@@ -289,26 +150,22 @@
align-items: center;
justify-content: center;
flex-direction: column;
"
>
<img
src=
"@/assets/upload/file.png"
alt=
""
style=
"width: 0.64rem; height: 0.64rem"
/>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span
>
</div>
"
>
<img
src=
"@/assets/upload/file.png"
alt=
""
style=
"width: 0.64rem; height: 0.64rem"
/>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
</div>
</
template
>
</van-uploader>
</template>
</van-
uploader
>
</template>
</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
</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
required
clickable
...
...
@@ -319,90 +176,64 @@
@click="showTrouble = true"
: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>
<van-row
gutter=
""
>
<van-col
span=
"17"
>
<van-row
gutter=
""
>
<van-col
span=
"9"
>
风险系数:
</van-col>
<van-col
span=
"15"
>
{{ item.time}}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"9"
>
创建时间:
</van-col>
<van-col
span=
"15"
>
{{ item.name }}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"9"
>
风险描述:
</van-col>
<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=
"
<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>
<van-row
gutter=
""
>
<van-col
span=
"17"
>
<van-row
gutter=
""
>
<van-col
span=
"9"
>
风险系数:
</van-col>
<van-col
span=
"15"
>
{{ item.time }}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"9"
>
创建时间:
</van-col>
<van-col
span=
"15"
>
{{ item.name }}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"9"
>
风险描述:
</van-col>
<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%;
text-align: center;
font-size: 0.48rem;
position: fixed;
top: 30%;
"
v-if=
"messageList['length']==0"
>
暂无数据
</div>
</div>
</van-tab>
</van-tabs>
<van-popup
v-model=
"showTrouble"
position=
"bottom"
>
<van-picker
show-toolbar
value-key=
"name"
:columns=
"columnsTrouble"
@
confirm=
"onConTrouble"
@
cancel=
"showTrouble = false"
/>
</van-popup>
"
v-if=
"messageList['length'] == 0"
>
暂无数据
</div>
</div>
</van-tab>
</van-tabs>
<van-popup
v-model=
"showTrouble"
position=
"bottom"
>
<van-picker
show-toolbar
value-key=
"name"
:columns=
"columnsTrouble"
@
confirm=
"onConTrouble"
@
cancel=
"showTrouble = false"
/>
</van-popup>
<van-popup
v-model=
"showSource"
position=
"bottom"
>
<van-picker
show-toolbar
value-key=
"name"
:columns=
"columnsSource"
@
confirm=
"onConSource"
@
cancel=
"showSource = false"
/>
</van-popup>
<div
v-if=
"active!=0"
style=
"display: flex;
<van-popup
v-model=
"showSource"
position=
"bottom"
>
<van-picker
show-toolbar
value-key=
"name"
:columns=
"columnsSource"
@
confirm=
"onConSource"
@
cancel=
"showSource = false"
/>
</van-popup>
<div
v-if=
"active != 0"
style=
"display: flex;
justify-content: space-around;
background-color: #fff;
border-top: 1px solid #e3e3e3;
...
...
@@ -412,10 +243,16 @@
position: fixed;
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
style=
"font-size: 22px;"
><van-icon
name=
"plus"
/></div>
<div>
新增现状风险
</div>
</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>
...
...
@@ -439,7 +276,7 @@ export default {
},
beforeRouteLeave
(
to
,
from
,
next
)
{
if
(
to
.
name
!=
"
matrix-grad
"
)
{
}
next
();
},
...
...
@@ -448,9 +285,9 @@ export default {
inherentId
:
""
,
text
:
"
编辑固有风险
"
,
id
:
""
,
isTimely
:
1
,
active
:
0
,
form
:{
isTimely
:
1
,
active
:
0
,
form
:
{
},
projectId
:
""
,
// 所属工程
...
...
@@ -465,10 +302,10 @@ export default {
columnsFactor
:
[],
messageList
:
[
{
title
:
'
回显风险源名称
'
,
time
:
'
2022-12-12
'
,
name
:
'
Mr.周
'
,
state
:
1
title
:
'
回显风险源名称
'
,
time
:
'
2022-12-12
'
,
name
:
'
Mr.周
'
,
state
:
1
}
],
source
:
""
,
//风险源
...
...
@@ -483,7 +320,7 @@ export default {
columnsSetRank
:
[
"
矩阵式定级
"
,
"
其他定级方式
"
],
riskRank
:
""
,
// 风险等级
showRiskRank
:
false
,
columnsRiskRank
:
[
"
重大风险
"
,
"
较大风险
"
,
"
一般风险
"
,
"
较小风险
"
],
columnsRiskRank
:
[
"
重大风险
"
,
"
较大风险
"
,
"
一般风险
"
,
"
较小风险
"
],
showSetRankMode
:
false
,
// 是否显示定级方式
setRankMode
:
""
,
// 定级方式文字
setRankModeImg
:
[],
// 定级方式图片
...
...
@@ -511,114 +348,115 @@ export default {
urgentImg
:
[],
//应急措施图片
buildingIds
:
""
,
// 退回原因
isShowreturnCause
:
false
,
visiableSource
:
false
,
};
},
created
()
{
if
(
this
.
$route
.
params
.
inherentId
)
{
this
.
inherentId
=
this
.
$route
.
params
.
inherentId
this
.
buildingIds
=
this
.
$route
.
params
.
buildingIds
this
.
inherentId
=
this
.
$route
.
params
.
inherentId
this
.
buildingIds
=
this
.
$route
.
params
.
buildingIds
this
.
postReturnEcho
();
}
// this.getList();
},
methods
:
{
tabList
(
value
){
tabList
(
value
)
{
console
.
log
(
'
%c [ value ]-527
'
,
'
font-size:13px; background:pink; color:#bf2c9f;
'
,
value
)
if
(
value
==
1
)
{
if
(
value
==
1
)
{
this
.
getList
();
}
}
},
seletFloor
(
name
){
seletFloor
(
name
)
{
this
.
$toast
.
loading
({
message
:
"
加载中...
"
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
duration
:
0
,
});
this
.
userPrefix
=
name
this
.
userPrefix
=
name
getFun
(
`/risk/plan/floor/list/
${
this
.
buildingIds
}
`
).
then
((
res
)
=>
{
this
.
$toast
.
clear
()
this
.
showSource
=
true
this
.
columnsSource
=
res
.
data
this
.
showSource
=
true
this
.
columnsSource
=
res
.
data
}).
catch
(()
=>
{
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
},
seletRoom
(
name
){
seletRoom
(
name
)
{
this
.
$toast
.
loading
({
message
:
"
加载中...
"
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
duration
:
0
,
});
this
.
userPrefix
=
name
this
.
userPrefix
=
name
getFun
(
`/risk/plan/room/list/
${
this
.
form
.
floorId
}
`
).
then
((
res
)
=>
{
this
.
$toast
.
clear
()
this
.
showSource
=
true
this
.
columnsSource
=
res
.
data
this
.
showSource
=
true
this
.
columnsSource
=
res
.
data
}).
catch
(()
=>
{
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
},
seletFactor
(
name
){
this
.
showTrouble
=
true
this
.
riskName
=
name
this
.
columnsTrouble
=
[
seletFactor
(
name
)
{
this
.
showTrouble
=
true
this
.
riskName
=
name
this
.
columnsTrouble
=
[
{
name
:
'
人的因素
'
,
name
:
'
人的因素
'
,
},
{
name
:
'
物的因素
'
,
name
:
'
物的因素
'
,
},
{
name
:
'
环境因素
'
,
name
:
'
环境因素
'
,
},
{
name
:
'
管理因素
'
,
name
:
'
管理因素
'
,
},
]
},
seletType
(
name
){
this
.
showTrouble
=
true
this
.
riskName
=
name
this
.
columnsTrouble
=
[
seletType
(
name
)
{
this
.
showTrouble
=
true
this
.
riskName
=
name
this
.
columnsTrouble
=
[
{
name
:
'
物体打击
'
,
name
:
'
物体打击
'
,
},
{
name
:
'
车辆伤害
'
,
name
:
'
车辆伤害
'
,
},
{
name
:
'
起重伤害
'
,
name
:
'
起重伤害
'
,
},
{
name
:
'
机械伤害
'
,
name
:
'
机械伤害
'
,
},
]
},
seletGrade
(
name
){
this
.
showTrouble
=
true
this
.
riskName
=
name
this
.
columnsTrouble
=
[
seletGrade
(
name
)
{
this
.
showTrouble
=
true
this
.
riskName
=
name
this
.
columnsTrouble
=
[
{
name
:
'
重大风险
'
,
name
:
'
重大风险
'
,
},
{
name
:
'
较大风险
'
,
name
:
'
较大风险
'
,
},
{
name
:
'
一般风险
'
,
name
:
'
一般风险
'
,
},
{
name
:
'
较小风险
'
,
name
:
'
较小风险
'
,
},
]
},
performTasks
(){
performTasks
()
{
this
.
$router
.
push
({
name
:
"
addPresent
"
,
params
:
{
id
:
this
.
inherentId
,
id
:
this
.
inherentId
,
// planId:this.planId
},
})
...
...
@@ -690,7 +528,7 @@ export default {
});
getFun
(
`/risk/plan/inherent/details/
${
this
.
inherentId
}
`
)
.
then
((
res
)
=>
{
this
.
form
=
res
.
data
this
.
form
=
res
.
data
this
.
uploaderImg
=
(
res
.
data
.
pictureFile
||
[]).
map
(
(
item
)
=>
{
return
{
...
...
@@ -766,8 +604,24 @@ export default {
this
.
form
[
this
.
userPrefix
+
"
Name
"
]
=
value
.
name
;
this
.
showSource
=
false
;
},
// 事故类型
onConTrouble
(
value
)
{
seletSource
()
{
this
.
visiableSource
=
true
},
//从风险清单列表导入
importFromList
(){
},
//输入风险源名称
nameByselfInput
(){
},
//取消风险弹窗
cancleSource
(){
this
.
visiableSource
=
false
},
// 事故类型
onConTrouble
(
value
)
{
if
(
!
value
)
{
this
.
showTrouble
=
false
;
return
;
...
...
@@ -831,17 +685,17 @@ export default {
this
.
$router
.
go
(
-
1
);
},
// 选择作业人
// 选择作业人
goSelPeoTwo
(
val
)
{
this
.
peopleName
=
val
this
.
peopleName
=
val
this
.
show
=
true
;
},
onClose
()
{
this
.
show
=
false
;
},
onSave
(
e
)
{
this
.
projectDirector
=
e
[
0
].
loginName
this
.
projectDirectorName
=
e
[
0
].
userName
this
.
projectDirector
=
e
[
0
].
loginName
this
.
projectDirectorName
=
e
[
0
].
userName
this
.
show
=
false
;
},
},
...
...
@@ -862,30 +716,40 @@ export default {
margin-bottom: 1.5rem;
padding: 0;
background-color: #f0f1f5;
.van-cell-group--inset {
margin: 0;
margin-bottom: 0.26667rem;
padding: 0.25rem;
font-size: 0.4rem;
position: relative;
border-radius: 4%;
box-shadow: 0px 0px 10px 2px #f3f3f3;
width: 90%;
margin: 0.4rem auto;
.van-row {
margin: 0;
margin-bottom: 0.26667rem;
padding: 0.25rem;
font-size: 0.4rem;
line-height: 0.8rem;
margin-bottom: 0;
}
.van-overlay {
position: absolute;
.wrapper {
display: flex;
align-items: center;
justify-content: space-evenly;
height: 100%;
position: relative;
border-radius: 4%;
box-shadow: 0px 0px 10px 2px #f3f3f3;
width: 90%;
margin: 0.4rem auto;
.van-row {
font-size: 0.4rem;
line-height: 0.8rem;
margin-bottom: 0;
}
.van-overlay {
position: absolute;
.wrapper {
display: flex;
align-items: center;
justify-content: space-evenly;
height: 100%;
}
}
}
}
}
}
.btns{
margin:10px 10px 0 10px;
border:none;
border-bottom: 1px solid #efefef;
color: #2980F7;
}
</
style
>
src/views/riskProject/add/addInherent.vue
View file @
df43f7d7
<
template
>
<div>
<LHeader
:text=
"text"
></LHeader>
<van-form
@
submit=
"onSubmit"
:scroll-to-error=
"true"
: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>
<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-form
@
submit=
"onSubmit"
:scroll-to-error=
"true"
: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>
<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=
"请选择"
@
click=
"seletFloor('floor')"
:rules=
"[
{ required: true, message: '所属楼层不能为空' }]"
/>
<van-field
readonly
required
name=
"roomName"
:value=
"form.roomName"
label=
"所属房间"
placeholder=
"请输入"
@
click=
"seletRoom('room')"
:rules=
"[
{ required: true, message: '所属房间不能为空' }]"
/>
<van-field
required
clickable
name=
"floorId"
:value=
"form.floorId"
label=
"所属楼层"
placeholder=
"请选择"
@
click=
"seletFloor('floor')"
:rules=
"[
{ required: true, message: '所属楼层不能为空' }]" />
<van-field
readonly
required
name=
"roomName"
:value=
"form.roomName"
label=
"所属房间"
placeholder=
"请输入"
@
click=
"seletRoom('room')"
:rules=
"[
{ required: true, message: '所属房间不能为空' }]" />
<van-field
required
clickable
...
...
@@ -68,64 +25,30 @@
placeholder=
"请输入"
:rules=
"[
{ required: true, message: '风险源名称不能为空' }]"
/>
<van-field
v-model=
"form.factor"
required
name=
"factor"
label=
"风险因素"
placeholder=
"请选择"
@
click=
"seletFactor('factor')"
:rules=
"[
{ required: true, message: '风险因素不能为空' }]" />
<van-field
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=
"请选择"
@
click=
"seletType('type')"
:rules=
"[
{ required: true, message: '准事故类型不能为空' }]" />
<van-field
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('level')"
:rules=
"[
{ required: true, message: '风险等级不能为空' }]" />
<van-field
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=
"存在部位"
placeholder=
"请输入"
:rules=
"[
{ required: true, message: '存在部位不能为空' }]" />
<van-field
required
name=
"presenceLocation"
v-model=
"form.presenceLocation"
label=
"存在部位"
placeholder=
"请输入"
:rules=
"[
{ required: true, message: '存在部位不能为空' }]"
/>
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"position: relative;top: 32%;transform: translateY(-50%);"
>
<div
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
name=
"hdPicture1"
label=
"风险源图片"
>
<van-field
name=
"hdPicture1"
label=
"风险源图片"
>
<template
#input
>
<van-uploader
@
delete=
"deleteFile(...arguments, 'uploaderImg')"
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"uploaderImg"
>
<van-uploader
@
delete=
"deleteFile(...arguments, 'uploaderImg')"
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"uploaderImg"
>
<template
slot=
"default"
>
<!-- 11111111111 -->
<div
style=
"
<div
style=
"
width: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
...
...
@@ -133,49 +56,28 @@
align-items: center;
justify-content: center;
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
src=
"@/assets/upload/pic.png"
alt=
""
style=
"width: 0.64rem; height: 0.64rem"
/>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
</div>
</
template
>
</van-uploader>
</template>
</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
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"position: relative;top: 32%;transform: translateY(-50%);"
>
技术措施
</div>
<van-field
v-model=
"form.measuresProject"
name=
"measuresProject"
label=
"技术措施"
type=
"textarea"
rows=
"1"
autosize
placeholder=
"请输入"
/>
<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')"
>
<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=
"
<div
style=
"
width: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
...
...
@@ -183,49 +85,28 @@
align-items: center;
justify-content: center;
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
src=
"@/assets/upload/file.png"
alt=
""
style=
"width: 0.64rem; height: 0.64rem"
/>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
</div>
</
template
>
</van-uploader>
</template>
</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
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"position: relative;top: 32%;transform: translateY(-50%);"
>
管理措施
</div>
<van-field
v-model=
"form.measuresAdministration"
name=
"measuresAdministration"
label=
"管理措施"
type=
"textarea"
rows=
"1"
autosize
placeholder=
"请输入"
/>
<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')"
>
<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=
"
<div
style=
"
width: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
...
...
@@ -233,49 +114,28 @@
align-items: center;
justify-content: center;
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
src=
"@/assets/upload/file.png"
alt=
""
style=
"width: 0.64rem; height: 0.64rem"
/>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
</div>
</
template
>
</van-uploader>
</template>
</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
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"position: relative;top: 32%;transform: translateY(-50%);"
>
应急措施
</div>
<van-field
v-model=
"form.measuresEmergency"
name=
"measuresEmergency"
label=
"应急措施"
type=
"textarea"
rows=
"1"
autosize
placeholder=
"请输入"
/>
<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')"
>
<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=
"
<div
style=
"
width: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
...
...
@@ -283,24 +143,18 @@
align-items: center;
justify-content: center;
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
src=
"@/assets/upload/file.png"
alt=
""
style=
"width: 0.64rem; height: 0.64rem"
/>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
</div>
</
template
>
</van-uploader>
</template>
</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
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
...
...
@@ -314,35 +168,20 @@
:rules="[{ required: true, message: '事故类型不能为空' }]"
/> -->
<van-popup
v-model=
"showTrouble"
position=
"bottom"
>
<van-picker
show-toolbar
value-key=
"name"
:columns=
"columnsTrouble"
@
confirm=
"onConTrouble"
@
cancel=
"showTrouble = false"
/>
<van-picker
show-toolbar
value-key=
"name"
:columns=
"columnsTrouble"
@
confirm=
"onConTrouble"
@
cancel=
"showTrouble = false"
/>
</van-popup>
<van-popup
v-model=
"showSource"
position=
"bottom"
>
<van-picker
show-toolbar
value-key=
"name"
:columns=
"columnsSource"
@
confirm=
"onConSource"
@
cancel=
"showSource = false"
/>
<van-picker
show-toolbar
value-key=
"name"
:columns=
"columnsSource"
@
confirm=
"onConSource"
@
cancel=
"showSource = false"
/>
</van-popup>
<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>
</van-form>
<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>
</template>
...
...
@@ -350,7 +189,7 @@
<
script
>
import
LHeader
from
"
@/components/header.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 {
// getFormList,
...
...
@@ -390,7 +229,7 @@ export default {
},
beforeRouteLeave
(
to
,
from
,
next
)
{
if
(
to
.
name
!=
"
matrix-grad
"
)
{
}
next
();
},
...
...
@@ -399,9 +238,9 @@ export default {
taskId
:
""
,
text
:
"
添加固有风险
"
,
id
:
""
,
isTimely
:
1
,
active
:
0
,
form
:{
isTimely
:
1
,
active
:
0
,
form
:
{
},
projectId
:
""
,
// 所属工程
...
...
@@ -416,10 +255,10 @@ export default {
columnsFactor
:
[],
messageList
:
[
{
title
:
'
回显风险源名称
'
,
time
:
'
2022-12-12
'
,
name
:
'
Mr.周
'
,
state
:
1
title
:
'
回显风险源名称
'
,
time
:
'
2022-12-12
'
,
name
:
'
Mr.周
'
,
state
:
1
}
],
source
:
""
,
//风险源
...
...
@@ -434,7 +273,7 @@ export default {
columnsSetRank
:
[
"
矩阵式定级
"
,
"
其他定级方式
"
],
riskRank
:
""
,
// 风险等级
showRiskRank
:
false
,
columnsRiskRank
:
[
"
重大风险
"
,
"
较大风险
"
,
"
一般风险
"
,
"
较小风险
"
],
columnsRiskRank
:
[
"
重大风险
"
,
"
较大风险
"
,
"
一般风险
"
,
"
较小风险
"
],
showSetRankMode
:
false
,
// 是否显示定级方式
setRankMode
:
""
,
// 定级方式文字
setRankModeImg
:
[],
// 定级方式图片
...
...
@@ -465,103 +304,128 @@ export default {
};
},
created
()
{
var
userInfo
=
getUserInfo
()
this
.
form
.
buildingIds
=
this
.
$route
.
params
.
id
this
.
form
.
planId
=
this
.
$route
.
params
.
planId
var
userInfo
=
getUserInfo
()
this
.
form
.
buildingIds
=
this
.
$route
.
params
.
id
this
.
form
.
planId
=
this
.
$route
.
params
.
planId
this
.
form
.
buildingName
=
'
1号楼
'
this
.
form
.
userId
=
userInfo
.
userId
this
.
form
.
userName
=
userInfo
.
userName
this
.
form
.
deptName
=
userInfo
.
dept
.
deptName
this
.
form
.
projectId
=
'
测试项目
'
this
.
form
.
userId
=
userInfo
.
userId
this
.
form
.
userName
=
userInfo
.
userName
this
.
form
.
deptName
=
userInfo
.
dept
.
deptName
this
.
form
.
projectId
=
'
测试项目
'
},
methods
:
{
seletFloor
(
name
){
seletFloor
(
name
)
{
this
.
$toast
.
loading
({
message
:
"
加载中...
"
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
duration
:
0
,
});
this
.
userPrefix
=
name
this
.
userPrefix
=
name
getFun
(
`/risk/plan/floor/list/
${
this
.
form
.
buildingIds
}
`
).
then
((
res
)
=>
{
this
.
$toast
.
clear
()
this
.
showSource
=
true
this
.
columnsSource
=
res
.
data
this
.
showSource
=
true
this
.
columnsSource
=
res
.
data
}).
catch
(()
=>
{
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
},
seletRoom
(
name
){
seletRoom
(
name
)
{
this
.
$toast
.
loading
({
message
:
"
加载中...
"
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
duration
:
0
,
});
this
.
userPrefix
=
name
this
.
userPrefix
=
name
getFun
(
`/risk/plan/room/list/
${
this
.
form
.
floorId
}
`
).
then
((
res
)
=>
{
this
.
$toast
.
clear
()
this
.
showSource
=
true
this
.
columnsSource
=
res
.
data
this
.
showSource
=
true
this
.
columnsSource
=
res
.
data
}).
catch
(()
=>
{
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
},
seletFactor
(
name
){
this
.
showTrouble
=
true
this
.
riskName
=
name
this
.
columnsTrouble
=
[
{
name
:
'
人的因素
'
,
},
{
name
:
'
物的因素
'
,
},
{
name
:
'
环境因素
'
,
},
{
name
:
'
管理因素
'
,
},
]
//风险因素
seletFactor
(
name
)
{
this
.
showTrouble
=
true
this
.
riskName
=
name
getFun
(
`/risk/plan/dict/data/list?dictType=risk_plan_factor`
)
.
then
(
res
=>
{
console
.
log
(
res
.
data
)
const
arr
=
[]
res
.
data
.
forEach
(
item
=>
{
arr
.
push
({
name
:
item
.
dictLabel
})
})
this
.
columnsTrouble
=
arr
})
.
catch
(()
=>
{
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
// this.columnsTrouble = [
// {
// name: '人的因素',
// },
// {
// name: '物的因素',
// },
// {
// name: '环境因素',
// },
// {
// name: '管理因素',
// },
// ]
},
seletType
(
name
){
this
.
showTrouble
=
true
this
.
riskName
=
name
this
.
columnsTrouble
=
[
{
name
:
'
物体打击
'
,
},
{
name
:
'
车辆伤害
'
,
},
{
name
:
'
起重伤害
'
,
},
{
name
:
'
机械伤害
'
,
},
]
//准事故类型
seletType
(
name
)
{
this
.
showTrouble
=
true
this
.
riskName
=
name
getFun
(
`/risk/plan/dict/data/list?dictType=risk_plan_type`
)
.
then
(
res
=>
{
const
arr
=
[]
res
.
data
.
forEach
(
item
=>
{
arr
.
push
({
name
:
item
.
dictLabel
})
})
this
.
columnsTrouble
=
arr
})
.
catch
(()
=>
{
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
// this.columnsTrouble = [
// {
// name: '物体打击',
// },
// {
// name: '车辆伤害',
// },
// {
// name: '起重伤害',
// },
// {
// name: '机械伤害',
// },
// ]
},
seletGrade
(
name
){
this
.
showTrouble
=
true
this
.
riskName
=
name
this
.
columnsTrouble
=
[
seletGrade
(
name
)
{
this
.
showTrouble
=
true
this
.
riskName
=
name
this
.
columnsTrouble
=
[
{
name
:
'
重大风险
'
,
name
:
'
重大风险
'
,
},
{
name
:
'
较大风险
'
,
name
:
'
较大风险
'
,
},
{
name
:
'
一般风险
'
,
name
:
'
一般风险
'
,
},
{
name
:
'
较小风险
'
,
name
:
'
较小风险
'
,
},
]
},
performTasks
(){
performTasks
()
{
console
.
log
(
'
1233213 :>>
'
,
1233213
);
},
// 点击预览图
...
...
@@ -591,7 +455,7 @@ export default {
}
}
},
jsonToFormData
(
config
)
{
jsonToFormData
(
config
)
{
const
formData
=
new
FormData
();
//循环传入的值转换formData
Object
.
keys
(
config
).
forEach
((
key
)
=>
{
...
...
@@ -601,33 +465,33 @@ export default {
},
onSubmit
(
values
)
{
// console.log('%c [ values ]-592', 'font-size:13px; background:pink; color:#bf2c9f;', values)
var
formDataJson
=
this
.
jsonToFormData
(
this
.
form
)
var
formDataJson
=
this
.
jsonToFormData
(
this
.
form
)
let
url
=
"
/risk/plan/inherent
"
;
values
.
hdPicture1
.
forEach
((
item
)
=>
{
if
(
item
.
file
)
{
formDataJson
.
append
(
"
pictureFile[]
"
,
item
.
file
);
}
else
{
}
else
{
formDataJson
.
append
(
"
pictureFile[]
"
,
item
.
fileId
);
}
});
values
[
'
measuresProjectFile[]
'
].
forEach
((
item
)
=>
{
if
(
item
.
file
)
{
formDataJson
.
append
(
"
measuresProjectFile[]
"
,
item
.
file
);
}
else
{
}
else
{
formDataJson
.
append
(
"
measuresProjectFile[]
"
,
item
.
fileId
);
}
});
values
[
'
measuresEmergencyFile[]
'
].
forEach
((
item
)
=>
{
if
(
item
.
file
)
{
formDataJson
.
append
(
"
measuresEmergencyFile[]
"
,
item
.
file
);
}
else
{
}
else
{
formDataJson
.
append
(
"
measuresEmergencyFile[]
"
,
item
.
fileId
);
}
});
values
[
'
measuresAdministrationFile[]
'
].
forEach
((
item
)
=>
{
if
(
item
.
file
)
{
formDataJson
.
append
(
"
measuresAdministrationFile[]
"
,
item
.
file
);
}
else
{
}
else
{
formDataJson
.
append
(
"
measuresAdministrationFile[]
"
,
item
.
fileId
);
}
});
...
...
@@ -788,17 +652,17 @@ export default {
this
.
$router
.
go
(
-
1
);
},
// 选择作业人
// 选择作业人
goSelPeoTwo
(
val
)
{
this
.
peopleName
=
val
this
.
peopleName
=
val
this
.
show
=
true
;
},
onClose
()
{
this
.
show
=
false
;
},
onSave
(
e
)
{
this
.
projectDirector
=
e
[
0
].
loginName
this
.
projectDirectorName
=
e
[
0
].
userName
this
.
projectDirector
=
e
[
0
].
loginName
this
.
projectDirectorName
=
e
[
0
].
userName
this
.
show
=
false
;
},
},
...
...
@@ -818,30 +682,34 @@ export default {
.con-list {
padding: 0;
background-color: #f0f1f5;
.van-cell-group--inset {
margin: 0;
margin-bottom: 0.26667rem;
padding: 0.25rem;
font-size: 0.4rem;
position: relative;
border-radius: 4%;
box-shadow: 0px 0px 10px 2px #f3f3f3;
width: 90%;
margin: 0.4rem auto;
.van-row {
margin: 0;
margin-bottom: 0.26667rem;
padding: 0.25rem;
font-size: 0.4rem;
line-height: 0.8rem;
margin-bottom: 0;
}
.van-overlay {
position: absolute;
.wrapper {
display: flex;
align-items: center;
justify-content: space-evenly;
height: 100%;
position: relative;
border-radius: 4%;
box-shadow: 0px 0px 10px 2px #f3f3f3;
width: 90%;
margin: 0.4rem auto;
.van-row {
font-size: 0.4rem;
line-height: 0.8rem;
margin-bottom: 0;
}
.van-overlay {
position: absolute;
.wrapper {
display: flex;
align-items: center;
justify-content: space-evenly;
height: 100%;
}
}
}
}
}
}
</
style
>
src/views/riskProject/add/addPresent.vue
View file @
df43f7d7
...
...
@@ -61,14 +61,12 @@
<van-field
required
clickable
name=
"name"
v-model=
"form.name"
label=
"风险源名称"
placeholder=
"请输入"
:rules=
"[
{ required: true, message: '风险源名称不能为空' }]"
/>
<van-field
v-model=
"form.factor"
required
...
...
src/views/riskProject/add/inherentRisks.vue
View file @
df43f7d7
<
template
>
<!-- 提交 -->
<div>
<van-sticky
offset-top=
"0"
>
<LHeader
:text=
"text"
></LHeader>
</van-sticky>
<div
style=
"margin-bottom: 1.5rem;"
>
<van-tabs
v-model=
"active"
@
change=
"tabList"
color=
"#2980f7"
animated
>
<van-tab
v-for=
"(item) in riskLogList"
:title=
"item.name"
:name=
"item.id"
:key=
"item.id"
>
<van-dropdown-menu
z-index=
"1000"
>
<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>
<div
class=
"con-list"
>
<!-- 提交 -->
<div>
<van-sticky
offset-top=
"0"
>
<LHeader
:text=
"text"
></LHeader>
</van-sticky>
<div
style=
"margin-bottom: 1.5rem;"
>
<van-tabs
v-model=
"active"
@
change=
"tabList"
color=
"#2980f7"
animated
>
<van-tab
:title=
"buildingName"
>
<van-dropdown-menu
z-index=
"1000"
>
<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>
<div
class=
"con-list"
>
<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;"
>
{{
item
.
title
}}
</div>
<div
style=
"font-size: 0.45rem;padding: 5px 0;"
>
{{
item
.
title
}}
</div>
<van-row
gutter=
""
>
<van-row
gutter=
""
>
<van-col
span=
"17"
>
<van-row
gutter=
""
>
<van-col
span=
"9"
>
发起时间:
</van-col>
<van-col
span=
"15"
>
{{
timestampToTimes
(
item
.
createTime
)
}}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"9"
>
楼层:
</van-col>
<van-col
span=
"15"
>
{{
item
.
floorName
}}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"9"
>
房间:
</van-col>
<van-col
span=
"15"
>
{{
item
.
roomName
}}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"9"
>
发起时间:
</van-col>
<van-col
span=
"15"
>
{{
timestampToTimes
(
item
.
createTime
)
}}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"9"
>
楼层:
</van-col>
<van-col
span=
"15"
>
{{
item
.
floorName
}}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"9"
>
房间:
</van-col>
<van-col
span=
"15"
>
{{
item
.
roomName
}}
</van-col>
</van-row>
</van-col>
<van-col
span=
"7"
:style=
"
{'color':item.state == 1 ? '#0069e5':'#03b615'}">
{{
'
●待审批
'
}}
<van-col
span=
"7"
:style=
"
{ color: item.state == 1 ? '#0069e5' : '#03b615' }"
>
{{
"
●待审批
"
}}
</van-col>
</van-row>
<van-overlay
:show=
"showIndex == index"
>
</van-row>
<van-overlay
:show=
"showIndex == index"
>
<div
class=
"wrapper"
@
click.stop=
"showIndex = null"
>
<van-button
round
type=
"primary"
@
click=
"goDetail(item)"
>
编辑
</van-button
>
<!--
<van-button
round
type=
"info"
@
click=
"goConfirm(item)"
v-show=
"active==0"
...
...
@@ -59,22 +68,23 @@
</van-overlay>
</van-cell-group>
<div
style=
"
style=
"
width: 100%;
text-align: center;
font-size: 0.48rem;
position: fixed;
top: 30%;
"
v-if=
"messageList['length']==
0"
>
暂无数据
</div>
v-if=
"messageList['length'] ==
0"
>
暂无数据
</div>
</div>
</van-tab>
</van-tabs>
</div>
<div
style=
"display: flex;
</div>
<div
style=
"display: flex;
justify-content: space-around;
background-color: #fff;
border-top: 1px solid #e3e3e3;
...
...
@@ -82,277 +92,285 @@
width: 100%;
text-align: center;
position: fixed;
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>
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>
<div
@
click=
"endTasks"
style=
"color: #D9001B;font-size: 14px;font-weight: 600;"
>
<div
style=
"font-size: 22px;"
><van-icon
name=
"cross"
/></div>
<div>
任务执行结束
</div>
</div>
</div>
</
template
>
<
script
>
import
LHeader
from
"
@/components/header.vue
"
;
import
{
getFun
,
postFun
}
from
"
@/service/table.js
"
;
import
{
timestampToTime
,
generateId
}
from
"
@/utils/format
"
;
export
default
{
name
:
'
risk-confirme
'
,
components
:
{
LHeader
,
},
data
()
{
return
{
text
:
"
固有风险列表
"
,
searchValue
:
""
,
planId
:
0
,
value1
:
1
,
value2
:
1
,
option1
:
[],
option2
:
[],
isHaveNews
:
false
,
messageList
:
[],
riskLogList
:[],
Loop
:
""
,
// 定时器
showIndex
:
null
,
// 是否显示遮罩层,
active
:
1
,
form
:{
</div>
</
template
>
},
tabs
:
[
],
};
},
created
()
{
this
.
planId
=
this
.
$route
.
params
.
id
||
sessionStorage
.
getItem
(
'
planId
'
)
this
.
getRiskList
(
this
.
planId
);
<
script
>
import
LHeader
from
"
@/components/header.vue
"
;
import
{
getFun
,
postFun
}
from
"
@/service/table.js
"
;
import
{
timestampToTime
,
generateId
}
from
"
@/utils/format
"
;
export
default
{
name
:
"
risk-confirme
"
,
components
:
{
LHeader
},
data
()
{
return
{
text
:
"
固有风险列表
"
,
searchValue
:
""
,
planId
:
0
,
buildingId
:
0
,
buildingName
:
""
,
value1
:
1
,
value2
:
1
,
option1
:
[],
option2
:
[],
isHaveNews
:
false
,
messageList
:
[],
riskLogList
:
[],
Loop
:
""
,
// 定时器
showIndex
:
null
,
// 是否显示遮罩层,
active
:
1
,
form
:
{},
tabs
:
[]
};
},
created
()
{
this
.
planId
=
this
.
$route
.
params
.
id
||
sessionStorage
.
getItem
(
"
planId
"
);
this
.
buildingId
=
this
.
$route
.
params
.
buildingId
;
this
.
buildingName
=
this
.
$route
.
params
.
buildingName
;
console
.
log
(
this
.
buildingId
,
this
.
buildingName
);
this
.
getRiskList
(
this
.
planId
);
// this.postList();
},
methods
:
{
timestampToTimes
(
time
)
{
return
timestampToTime
(
new
Date
(
time
),
"
DT2
"
,
true
);
},
changeData
(
arr
)
{
var
arrList
=
[];
arr
.
forEach
(
item
=>
{
arrList
.
push
({
text
:
item
.
name
,
value
:
item
.
id
});
});
return
arrList
;
},
//新增固有风险
performTasks
()
{
this
.
$router
.
push
({
name
:
"
addInherent
"
,
params
:
{
id
:
this
.
active
,
planId
:
this
.
planId
}
});
},
//任务执行结束
endTasks
()
{
//toDo
},
methods
:
{
timestampToTimes
(
time
){
return
timestampToTime
(
new
Date
(
time
),
"
DT2
"
,
true
)
},
changeData
(
arr
){
var
arrList
=
[]
arr
.
forEach
(
item
=>
{
arrList
.
push
(
{
text
:
item
.
name
,
value
:
item
.
id
}
)
})
return
arrList
},
performTasks
(){
this
.
$router
.
push
({
name
:
"
addInherent
"
,
params
:
{
id
:
this
.
active
,
planId
:
this
.
planId
},
})
},
handadd
(){
this
.
$router
.
push
({
name
:
"
riskAdd
"
,
params
:
{
title
:
'
新增
'
},
})
},
buildingList
(
id
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
getFun
(
`/risk/plan/plan/building/list/
${
id
}
`
).
then
((
res
)
=>
{
this
.
riskLogList
=
res
.
data
||
res
.
rows
;
resolve
(
res
.
data
)
})
.
catch
(()
=>
{
this
.
$toast
.
clear
();
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
})
},
floorList
(
id
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
getFun
(
`/risk/plan/floor/list/
${
id
}
`
).
then
((
res
)
=>
{
this
.
option1
=
this
.
changeData
(
res
.
data
)
resolve
(
res
.
data
)
})
.
catch
(()
=>
{
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
})
},
roomList
(
id
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
getFun
(
`/risk/plan/room/list/
${
id
}
`
).
then
((
res
)
=>
{
this
.
option2
=
this
.
changeData
(
res
.
data
)
resolve
(
res
.
data
)
})
.
catch
(()
=>
{
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
})
},
riskList
(
planId
,
buildingId
,
floorId
,
roomId
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
var
paramsJson
=
{}
if
(
floorId
||
roomId
){
paramsJson
=
{
floorId
,
roomId
}
}
else
{
paramsJson
=
{}
}
getFun
(
`/risk/plan/inherent/list/
${
planId
}
/
${
buildingId
}
`
,
paramsJson
).
then
((
res
)
=>
{
this
.
messageList
=
res
.
data
resolve
(
res
.
data
)
})
.
catch
(()
=>
{
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
})
},
async
getRiskList
(
id
){
this
.
$toast
.
loading
({
message
:
"
加载中...
"
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
duration
:
0
,
handadd
()
{
this
.
$router
.
push
({
name
:
"
riskAdd
"
,
params
:
{
title
:
"
新增
"
}
});
},
floorList
(
id
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
getFun
(
`/risk/plan/floor/list/
${
id
}
`
)
.
then
(
res
=>
{
this
.
option1
=
this
.
changeData
(
res
.
data
);
resolve
(
res
.
data
);
})
.
catch
(()
=>
{
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
let
building
=
await
this
.
buildingList
(
id
)
let
floor
=
await
this
.
floorList
(
building
[
0
].
id
)
let
room
=
await
this
.
roomList
(
floor
[
0
].
id
)
let
risk
=
await
this
.
riskList
(
id
,
building
[
0
].
id
)
this
.
$toast
.
clear
();
},
async
tabList
(
value
){
let
floor
=
await
this
.
floorList
(
value
)
let
room
=
await
this
.
roomList
(
floor
[
0
].
id
)
let
risk
=
await
this
.
riskList
(
this
.
planId
,
value
)
},
async
changeFloor
(){
let
room
=
await
this
.
roomList
(
this
.
value1
)
let
risk
=
await
this
.
riskList
(
this
.
planId
,
this
.
active
,
this
.
value1
)
},
async
changeRoom
(){
let
risk
=
await
this
.
riskList
(
this
.
planId
,
this
.
active
,
this
.
value1
,
this
.
value2
)
},
onSearch
(
val
)
{
this
.
postList
(
this
.
searchValue
);
},
touchstart
(
index
,
item
)
{
if
(
this
.
showIndex
!=
null
)
{
this
.
showIndex
=
null
;
return
;
});
},
roomList
(
id
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
getFun
(
`/risk/plan/room/list/
${
id
}
`
)
.
then
(
res
=>
{
this
.
option2
=
this
.
changeData
(
res
.
data
);
resolve
(
res
.
data
);
})
.
catch
(()
=>
{
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
});
},
riskList
(
planId
,
buildingId
,
floorId
,
roomId
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
var
paramsJson
=
{};
if
(
floorId
||
roomId
)
{
paramsJson
=
{
floorId
,
roomId
};
}
else
{
paramsJson
=
{};
}
this
.
showIndex
=
index
;
},
// 详情
goDetail
(
data
)
{
this
.
$router
.
push
({
name
:
"
addCurrent
"
,
params
:
{
inherentId
:
data
.
businessId
||
data
.
id
,
buildingIds
:
this
.
active
,
},
});
this
.
showIndex
=
null
;
},
// 确认
goConfirm
(
data
)
{
this
.
$router
.
push
({
name
:
"
risk-affirm
"
,
params
:
{
data
:
data
,
},
});
getFun
(
`/risk/plan/inherent/list/
${
planId
}
/
${
buildingId
}
`
,
paramsJson
)
.
then
(
res
=>
{
this
.
messageList
=
res
.
data
;
resolve
(
res
.
data
);
})
.
catch
(()
=>
{
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
});
},
async
getRiskList
(
id
)
{
this
.
$toast
.
loading
({
message
:
"
加载中...
"
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
duration
:
0
});
let
floor
=
await
this
.
floorList
(
this
.
buildingId
);
let
room
=
await
this
.
roomList
(
floor
[
0
].
id
);
let
risk
=
await
this
.
riskList
(
id
,
this
.
buildingId
);
this
.
$toast
.
clear
();
},
async
tabList
(
value
)
{
let
floor
=
await
this
.
floorList
(
value
);
let
room
=
await
this
.
roomList
(
floor
[
0
].
id
);
let
risk
=
await
this
.
riskList
(
this
.
planId
,
value
);
},
async
changeFloor
()
{
let
room
=
await
this
.
roomList
(
this
.
value1
);
let
risk
=
await
this
.
riskList
(
this
.
planId
,
this
.
active
,
this
.
value1
);
},
async
changeRoom
()
{
let
risk
=
await
this
.
riskList
(
this
.
planId
,
this
.
active
,
this
.
value1
,
this
.
value2
);
},
onSearch
(
val
)
{
this
.
postList
(
this
.
searchValue
);
},
touchstart
(
index
,
item
)
{
if
(
this
.
showIndex
!=
null
)
{
this
.
showIndex
=
null
;
},
return
;
}
this
.
showIndex
=
index
;
},
};
</
script
>
<
style
lang=
"less"
scoped
>
#app {
font-family: "";
color: #2c3e50
}
.cell-wrap {
position: relative;
// 详情
goDetail
(
data
)
{
this
.
$router
.
push
({
name
:
"
addCurrent
"
,
params
:
{
inherentId
:
data
.
businessId
||
data
.
id
,
buildingIds
:
this
.
active
}
});
this
.
showIndex
=
null
;
},
// 确认
goConfirm
(
data
)
{
this
.
$router
.
push
({
name
:
"
risk-affirm
"
,
params
:
{
data
:
data
}
});
this
.
showIndex
=
null
;
}
p {
}
};
</
script
>
<
style
lang=
"less"
scoped
>
#app {
font-family: "";
color: #2c3e50;
}
.cell-wrap {
position: relative;
}
p {
font-size: 0.4rem;
font-weight: none;
padding-left: 0.16rem;
margin: 0.186667rem 0;
color: #7f7f7f;
}
.van-cell-group--inset {
margin: 0;
margin-bottom: 10px;
padding: 10px;
font-size: 13px;
position: relative;
.van-row {
margin-bottom: 0.133333rem;
line-height: 0.64rem;
}
}
.journal-wrap {
position: relative;
}
.supervise-wrap {
position: relative;
}
.info-title {
color: #2980f7;
font-weight: none;
}
.field-title {
color: black;
font-weight: none;
}
.more {
position: absolute;
bottom: 0.32rem;
right: 15px;
color: #2a80f7;
font-weight: none;
z-index: 99;
}
.con-list {
padding: 0;
min-height: 10rem;
background-color: #f0f1f5;
.van-cell-group--inset {
margin: 0;
margin-bottom: 0.26667rem;
padding: 0.25rem;
font-size: 0.4rem;
position: relative;
border-radius: 4%;
box-shadow: 0px 0px 10px 2px #f3f3f3;
width: 90%;
margin: 0.4rem auto;
.van-row {
font-size: 0.4rem;
font-weight: none;
padding-left: 0.16rem;
margin: 0.186667rem 0;
color: #7f7f7f;
}
.van-cell-group--inset {
margin: 0;
margin-bottom: 10px;
padding: 10px;
font-size: 13px;
position: relative;
.van-row {
margin-bottom: 0.133333rem;
line-height: 0.64rem;
}
}
.journal-wrap {
position: relative;
}
.supervise-wrap {
position: relative;
}
.info-title {
color: #2980f7;
font-weight: none;
line-height: 0.8rem;
margin-bottom: 0;
}
.field-title {
color: black;
font-weight: none;
}
.more {
.van-overlay {
position: absolute;
bottom: 0.32rem;
right: 15px;
color: #2a80f7;
font-weight: none;
z-index: 99;
}
.con-list {
padding: 0;
min-height: 10rem;
background-color: #f0f1f5;
.van-cell-group--inset {
margin: 0;
margin-bottom: 0.26667rem;
padding: 0.25rem;
font-size: 0.4rem;
position: relative;
border-radius: 4%;
box-shadow: 0px 0px 10px 2px #f3f3f3;
width: 90%;
margin: 0.4rem auto;
.van-row {
font-size: 0.4rem;
line-height: 0.8rem;
margin-bottom: 0;
}
.van-overlay {
position: absolute;
.wrapper {
display: flex;
align-items: center;
justify-content: space-evenly;
height: 100%;
}
.wrapper {
display: flex;
align-items: center;
justify-content: space-evenly;
height: 100%;
}
}
}
</
style
>
\ No newline at end of file
}
</
style
>
src/views/riskProject/add/taskList.vue
View file @
df43f7d7
<
template
>
<!-- 提交 -->
<div>
<van-sticky
offset-top=
"0"
>
<LHeader
:text=
"text"
></LHeader>
</van-sticky>
<div
style=
"margin-bottom: 1.5rem;"
>
<van-grid
:column-num=
"3"
style=
"background-color: #fff;"
>
<van-grid-item
>
<div>
发起人员:
</div>
<div>
{{
messageList
.
createUserName
}}
</div>
<!-- 提交 -->
<div>
<van-sticky
offset-top=
"0"
>
<LHeader
:text=
"text"
></LHeader>
</van-sticky>
<div
style=
"margin-bottom: 1.5rem;"
>
<van-grid
:column-num=
"3"
style=
"background-color: #fff;"
>
<van-grid-item>
<div>
发起人员:
</div>
<div>
{{
messageList
.
createUserName
}}
</div>
</van-grid-item>
<van-grid-item
>
<div>
项目负责人:
</div>
<div>
{{
messageList
.
leaderUserName
}}
</div>
<van-grid-item>
<div>
项目负责人:
</div>
<div>
{{
messageList
.
leaderUserName
}}
</div>
</van-grid-item>
<van-grid-item
>
<div>
任务状态:
</div>
<div>
{{
messageList
.
status
}}
</div>
<van-grid-item>
<div>
任务状态:
</div>
<div>
{{
messageList
.
status
}}
</div>
</van-grid-item>
<van-grid-item
>
<div>
开始时间:
</div>
<div>
{{
timestampToTimes
(
messageList
.
startTime
)
||
messageList
.
startTime
}}
</div>
<van-grid-item>
<div>
开始时间:
</div>
<div>
{{
timestampToTimes
(
messageList
.
startTime
)
||
messageList
.
startTime
}}
</div>
</van-grid-item>
<van-grid-item
>
<div>
结束时间:
</div>
<div>
{{
timestampToTimes
(
messageList
.
endTime
)
||
messageList
.
endTime
}}
</div>
<van-grid-item>
<div>
结束时间:
</div>
<div>
{{
timestampToTimes
(
messageList
.
endTime
)
||
messageList
.
endTime
}}
</div>
</van-grid-item>
</van-grid>
<van-steps
:active=
"active"
active-icon=
"success"
active-color=
"#38f"
style=
"margin: 0.26rem 0;"
>
<van-steps
:active=
"active"
active-icon=
"success"
active-color=
"#38f"
style=
"margin: 0.26rem 0;"
>
<van-step>
任务发起
</van-step>
<van-step>
风险评估
</van-step>
<van-step>
评估审核
</van-step>
<van-step>
项目完成
</van-step>
</van-steps>
<van-tabs
v-model=
"active"
color=
"#2980f7"
<van-tabs
v-model=
"active"
color=
"#2980f7"
animated
:sticky=
"true"
offset-top=
"2.93rem"
>
offset-top=
"2.93rem"
>
<van-tab
title=
"任务详情"
>
<van-form
<van-form
:scroll-to-error=
"true"
:show-error=
"false"
validate-trigger=
"onSubmit"
>
>
<van-field
readonly
name=
"createUserName"
:value=
"form.createUserName"
label=
"创建人员"
input-align=
"right"
:rules=
"[
{ required: true, message: '创建人员不能为空' }]"
readonly
name=
"createUserName"
:value=
"form.createUserName"
label=
"创建人员"
input-align=
"right"
:rules=
"[
{ required: true, message: '创建人员不能为空' }]"
/>
<van-field
readonly
name=
"createDeptName"
:value=
"form.createDeptName"
label=
"创建单位"
input-align=
"right"
:rules=
"[
{ required: true, message: '创建单位不能为空' }]"
readonly
name=
"createDeptName"
:value=
"form.createDeptName"
label=
"创建单位"
input-align=
"right"
:rules=
"[
{ required: true, message: '创建单位不能为空' }]"
/>
<van-field
readonly
name=
"projectName"
:value=
"form.projectName"
label=
"任务名称"
input-align=
"right"
:rules=
"[
{ required: true, message: '任务名称不能为空' }]"
readonly
name=
"projectName"
:value=
"form.projectName"
label=
"任务名称"
input-align=
"right"
:rules=
"[
{ required: true, message: '任务名称不能为空' }]"
/>
<van-field
readonly
name=
"projectName"
:value=
"form.projectName"
label=
"关联项目"
input-align=
"right"
:rules=
"[
{ required: true, message: '关联项目不能为空' }]"
readonly
name=
"projectName"
:value=
"form.projectName"
label=
"关联项目"
input-align=
"right"
:rules=
"[
{ required: true, message: '关联项目不能为空' }]"
/>
<van-field
readonly
name=
"buildingNames"
:value=
"form.buildingNames"
label=
"评估楼栋"
input-align=
"right"
:rules=
"[
{ required: true, message: '评估楼栋不能为空' }]"
readonly
name=
"buildingNames"
:value=
"form.buildingNames"
label=
"评估楼栋"
input-align=
"right"
:rules=
"[
{ required: true, message: '评估楼栋不能为空' }]"
/>
<van-field
readonly
name=
"leaderUserName"
:value=
"form.leaderUserName"
label=
"项目负责人"
input-align=
"right"
:rules=
"[
{ required: true, message: '事故类型不能为空' }]"
readonly
name=
"leaderUserName"
:value=
"form.leaderUserName"
label=
"项目负责人"
input-align=
"right"
:rules=
"[
{ required: true, message: '事故类型不能为空' }]"
/>
<van-field
v-model=
"form.startTime"
readonly
name=
"location"
label=
"任务开始时间"
input-align=
"right"
:formatter=
"()=>
{
return timestampToTimes(form.startTime)
}"
:rules="[{ required: true, message: '任务开始时间不能为空' }]"
v-model=
"form.startTime"
readonly
name=
"location"
label=
"任务开始时间"
input-align=
"right"
:formatter=
"
() =>
{
return timestampToTimes(form.startTime);
}
"
:rules="[{ required: true, message: '任务开始时间不能为空' }]"
/>
<van-field
v-model=
"form.endTime"
readonly
name=
"location"
label=
"任务结束时间"
:formatter=
"()=>
{
return timestampToTimes(form.endTime)
}"
input-align="right"
:rules="[{ required: true, message: '任务结束时间不能为空' }]"
v-model=
"form.endTime"
readonly
name=
"location"
label=
"任务结束时间"
:formatter=
"
() =>
{
return timestampToTimes(form.endTime);
}
"
input-align="right"
:rules="[{ required: true, message: '任务结束时间不能为空' }]"
/>
<van-field
clickable
name=
"workUserNames"
:value=
"form.workUserNames"
label=
"执行人员"
input-align=
"right"
:rules=
"[
{ required: true, message: '执行人员不能为空' }]"
clickable
name=
"workUserNames"
:value=
"form.workUserNames"
label=
"执行人员"
input-align=
"right"
:rules=
"[
{ required: true, message: '执行人员不能为空' }]"
/>
</van-form>
</van-tab>
<van-tab
title=
"风险清单"
>
</van-form>
</van-tab>
<van-tab
title=
"风险清单"
>
</van-tab>
<van-tab
title=
"审核记录"
>
<div
class=
"journal-wrap"
>
<van-cell-group
inset
>
<van-steps
direction=
"vertical"
:active=
"99999"
v-if=
"riskLogList.length>0"
>
<van-step
v-for=
"(item, index) in riskLogList"
:key=
"index"
>
<div
class=
"step-wrap"
>
<van-row>
<van-col
span=
"24"
><div
class=
"info-title"
>
{{
timestampToTimes
(
item
.
startTime
)
}}
</div></van-col
>
</van-row>
<van-row>
<van-col
span=
"7"
><span
class=
"field-title"
>
操作人:
</span></van-col
>
<van-col
span=
"17"
>
{{
item
.
approvalUserName
}}
</van-col>
</van-row>
<van-row>
<van-col
span=
"7"
><span
class=
"field-title"
>
审批结果:
</span></van-col
>
<van-col
span=
"17"
>
{{
item
.
taskName
}}
</van-col>
</van-row>
<van-row>
<van-col
span=
"7"
><span
class=
"field-title"
>
岗位:
</span></van-col
>
<van-col
span=
"17"
>
{{
item
.
taskResult
}}
</van-col>
</van-row>
<!--
<van-row>
<van-cell-group
inset
>
<van-steps
direction=
"vertical"
:active=
"99999"
v-if=
"riskLogList.length > 0"
>
<van-step
v-for=
"(item, index) in riskLogList"
:key=
"index"
>
<div
class=
"step-wrap"
>
<van-row>
<van-col
span=
"24"
><div
class=
"info-title"
>
{{
timestampToTimes
(
item
.
startTime
)
}}
</div></van-col
>
</van-row>
<van-row>
<van-col
span=
"7"
><span
class=
"field-title"
>
操作人:
</span></van-col
>
<van-col
span=
"17"
>
{{
item
.
approvalUserName
}}
</van-col>
</van-row>
<van-row>
<van-col
span=
"7"
><span
class=
"field-title"
>
审批结果:
</span></van-col
>
<van-col
span=
"17"
>
{{
item
.
taskName
}}
</van-col>
</van-row>
<van-row>
<van-col
span=
"7"
><span
class=
"field-title"
>
岗位:
</span></van-col
>
<van-col
span=
"17"
>
{{
item
.
taskResult
}}
</van-col>
</van-row>
<!--
<van-row>
<van-col
span=
"7"
><span
class=
"field-title"
>
结果:
</span></van-col
>
<van-col
span=
"17"
>
{{
LogType
(
item
.
taskResult
)
}}
</van-col>
</van-row>
-->
</div>
</van-step>
</van-steps>
<div
style=
"text-align: center;"
v-if=
"riskLogList.length == 0"
>
暂无数据
</div>
</van-cell-group>
</div>
</div>
</van-step>
</van-steps>
<div
style=
"text-align: center;"
v-if=
"riskLogList.length == 0"
>
暂无数据
</div>
</van-cell-group>
</div>
</van-tab>
<van-tab
title=
"风险评估报告"
>
<div
style=
"height: 1.5rem;
<div
style=
"height: 1.5rem;
background-color: #fff;
border-bottom: 1px solid #97999a;
display: flex;
justify-content: space-between;
line-height: 1.5rem;
"
>
<div><van-icon
name=
"column"
size=
"26px"
/></div>
<div
style=
"flex-grow:1;line-height: 0.6rem"
>
<div>
风险评估报告.PDF
</div>
<div>
2019-3-21 10:23 100KB
</div>
</div>
<div>
<van-icon
name=
"arrow"
size=
"26px"
/>
</div>
"
>
<div><van-icon
name=
"column"
size=
"26px"
/></div>
<div
style=
"flex-grow:1;line-height: 0.6rem"
>
<div>
风险评估报告.PDF
</div>
<div>
2019-3-21 10:23 100KB
</div>
</div>
<div>
<van-icon
name=
"arrow"
size=
"26px"
/>
</div>
</div>
<div
style=
"height: 1.5rem;
<div
style=
"height: 1.5rem;
background-color: #fff;
border-bottom: 1px solid #97999a;
display: flex;
justify-content: space-between;
line-height: 1.5rem;
"
>
<div><van-icon
name=
"column"
size=
"26px"
/></div>
<div
style=
"flex-grow:1;line-height: 0.6rem"
>
<div>
风险评估报告.PDF
</div>
<div>
2019-3-21 10:23 100KB
</div>
</div>
<div>
<van-icon
name=
"arrow"
size=
"26px"
/>
</div>
"
>
<div><van-icon
name=
"column"
size=
"26px"
/></div>
<div
style=
"flex-grow:1;line-height: 0.6rem"
>
<div>
风险评估报告.PDF
</div>
<div>
2019-3-21 10:23 100KB
</div>
</div>
<div>
<van-icon
name=
"arrow"
size=
"26px"
/>
</div>
</div>
</van-tab>
</van-tabs>
</div>
<div
style=
"display: flex;
</div>
<div
style=
"display: flex;
justify-content: space-around;
background-color: #fff;
border-top: 1px solid #e3e3e3;
...
...
@@ -220,170 +247,176 @@
width: 100%;
text-align: center;
position: fixed;
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>
<div
style=
"color: #ec808d;font-size: 14px;font-weight: 600;"
>
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>
<!--
<div
style=
"color: #ec808d;font-size: 14px;font-weight: 600;"
>
<div
style=
"font-size: 22px;"
><van-icon
name=
"success"
/></div>
<div>
任务完成
</div>
</div>
</div>
</div>
-->
</div>
</
template
>
<
script
>
import
LHeader
from
"
@/components/header.vue
"
;
import
{
timestampToTime
,
generateId
}
from
"
@/utils/format
"
;
import
{
getFun
,
postFun
}
from
"
@/service/table.js
"
;
export
default
{
name
:
'
risk-confirme
'
,
components
:
{
LHeader
,
},
data
()
{
return
{
text
:
"
任务单
"
,
searchValue
:
""
,
isHaveNews
:
false
,
messageList
:
[],
riskLogList
:[],
Loop
:
""
,
// 定时器
showIndex
:
null
,
// 是否显示遮罩层,
active
:
0
,
form
:{
</div>
</
template
>
},
tabs
:
[
],
};
<
script
>
import
LHeader
from
"
@/components/header.vue
"
;
import
{
timestampToTime
,
generateId
}
from
"
@/utils/format
"
;
import
{
getFun
,
postFun
}
from
"
@/service/table.js
"
;
export
default
{
name
:
"
risk-confirme
"
,
components
:
{
LHeader
},
data
()
{
return
{
text
:
"
任务单
"
,
searchValue
:
""
,
isHaveNews
:
false
,
messageList
:
[],
riskLogList
:
[],
Loop
:
""
,
// 定时器
showIndex
:
null
,
// 是否显示遮罩层,
active
:
0
,
form
:
{},
tabs
:
[]
};
},
created
()
{
var
planId
=
this
.
$route
.
params
.
id
||
sessionStorage
.
getItem
(
"
planId
"
);
var
buildingId
=
this
.
$route
.
params
.
buildingId
||
sessionStorage
.
getItem
(
"
buildingId
"
);
this
.
postList
(
planId
,
buildingId
);
},
methods
:
{
timestampToTimes
(
time
)
{
return
timestampToTime
(
new
Date
(
time
),
"
DT2
"
,
true
);
},
created
()
{
var
planId
=
this
.
$route
.
params
.
id
||
sessionStorage
.
getItem
(
'
planId
'
)
this
.
postList
(
planId
);
performTasks
()
{
this
.
$router
.
push
({
name
:
"
riskInherent
"
,
params
:
{
id
:
this
.
messageList
.
id
,
buildingId
:
this
.
messageList
.
riskBuildingListDtos
[
0
].
buildingId
,
buildingName
:
this
.
messageList
.
riskBuildingListDtos
[
0
].
buildingName
}
});
},
methods
:
{
timestampToTimes
(
time
){
return
timestampToTime
(
new
Date
(
time
),
"
DT2
"
,
true
)
},
performTasks
(){
this
.
$router
.
push
({
name
:
"
riskInherent
"
,
params
:
{
id
:
this
.
messageList
.
id
},
})
},
handadd
(){
this
.
$router
.
push
({
name
:
"
riskAdd
"
,
params
:
{
title
:
'
新增
'
},
})
},
postList
(
id
)
{
this
.
$toast
.
loading
({
message
:
"
加载中...
"
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
duration
:
0
,
});
getFun
(
`/risk/plan/details/
${
id
}
`
)
.
then
((
res
)
=>
{
this
.
$toast
.
clear
();
this
.
messageList
=
res
.
data
||
res
.
rows
;
this
.
form
=
this
.
messageList
.
detailsDto
this
.
riskLogList
=
this
.
messageList
.
approveListDtos
})
.
catch
(()
=>
{
this
.
$toast
.
clear
();
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
},
onSearch
(
val
)
{
this
.
postList
(
this
.
searchValue
);
},
touchstart
(
index
,
item
)
{
if
(
this
.
showIndex
!=
null
)
{
this
.
showIndex
=
null
;
return
;
handadd
()
{
this
.
$router
.
push
({
name
:
"
riskAdd
"
,
params
:
{
title
:
"
新增
"
}
this
.
showIndex
=
index
;
},
// 详情
goDetail
(
data
)
{
this
.
$router
.
push
({
name
:
"
risk-big-detail
"
,
params
:
{
id
:
data
.
businessId
||
data
.
id
,
},
});
this
.
showIndex
=
null
;
},
// 确认
goConfirm
(
data
)
{
this
.
$router
.
push
({
name
:
"
risk-affirm
"
,
params
:
{
data
:
data
,
},
});
},
postList
(
id
,
buildingId
)
{
console
.
log
(
buildingId
,
"
123
"
);
this
.
$toast
.
loading
({
message
:
"
加载中...
"
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
duration
:
0
});
var
url
=
`/risk/plan/details/
${
id
}
`
;
if
(
buildingId
)
url
+=
"
?buildingId=
"
+
buildingId
;
getFun
(
url
)
.
then
(
res
=>
{
this
.
$toast
.
clear
();
this
.
messageList
=
res
.
data
||
res
.
rows
;
this
.
form
=
this
.
messageList
.
detailsDto
;
this
.
riskLogList
=
this
.
messageList
.
approveListDtos
;
})
.
catch
(()
=>
{
this
.
$toast
.
clear
();
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
this
.
showIndex
=
null
;
},
},
};
</
script
>
<
style
lang=
"less"
scoped
>
#app {
font-family: "";
color: #2c3e50
}
.cell-wrap {
position: relative;
}
p {
font-size: 0.4rem;
font-weight: none;
padding-left: 0.16rem;
margin: 0.186667rem 0;
color: #7f7f7f;
}
.van-cell-group--inset {
margin: 0;
margin-bottom: 10px;
padding: 10px;
font-size: 13px;
position: relative;
.van-row {
margin-bottom: 0.133333rem;
line-height: 0.64rem;
onSearch
(
val
)
{
this
.
postList
(
this
.
searchValue
);
},
touchstart
(
index
,
item
)
{
if
(
this
.
showIndex
!=
null
)
{
this
.
showIndex
=
null
;
return
;
}
this
.
showIndex
=
index
;
},
// 详情
goDetail
(
data
)
{
this
.
$router
.
push
({
name
:
"
risk-big-detail
"
,
params
:
{
id
:
data
.
businessId
||
data
.
id
}
});
this
.
showIndex
=
null
;
},
// 确认
goConfirm
(
data
)
{
this
.
$router
.
push
({
name
:
"
risk-affirm
"
,
params
:
{
data
:
data
}
});
this
.
showIndex
=
null
;
}
.journal-wrap {
position: relative;
}
.supervise-wrap {
position: relative;
}
.info-title {
color: #2980f7;
font-weight: none;
}
.field-title {
color: black;
font-weight: none;
}
.more {
position: absolute;
bottom: 0.32rem;
right: 15px;
color: #2a80f7;
font-weight: none;
z-index: 99;
}
</
style
>
\ No newline at end of file
}
};
</
script
>
<
style
lang=
"less"
scoped
>
#app {
font-family: "";
color: #2c3e50;
}
.cell-wrap {
position: relative;
}
p {
font-size: 0.4rem;
font-weight: none;
padding-left: 0.16rem;
margin: 0.186667rem 0;
color: #7f7f7f;
}
.van-cell-group--inset {
margin: 0;
margin-bottom: 10px;
padding: 10px;
font-size: 13px;
position: relative;
.van-row {
margin-bottom: 0.133333rem;
line-height: 0.64rem;
}
}
.journal-wrap {
position: relative;
}
.supervise-wrap {
position: relative;
}
.info-title {
color: #2980f7;
font-weight: none;
}
.field-title {
color: black;
font-weight: none;
}
.more {
position: absolute;
bottom: 0.32rem;
right: 15px;
color: #2a80f7;
font-weight: none;
z-index: 99;
}
</
style
>
src/views/riskProject/assess/index.vue
View file @
df43f7d7
<
template
>
<!-- 提交 -->
<div>
<van-sticky
offset-top=
"0"
>
<LHeader
:text=
"text"
></LHeader>
</van-sticky>
<van-sticky
offset-top=
"1.5rem"
>
<van-search
v-model=
"searchValue"
show-action
placeholder=
"请输入搜索内容"
@
search=
"onSearch"
>
<template
#action
>
<div
@
click=
"onSearch"
>
搜索
</div>
</
template
>
</van-search>
</van-sticky>
<!-- <van-tabs
v-model="active"
@change="
postList(searchValue);
showIndex = null;
"
color="#2980f7"
animated
:sticky="true"
offset-top="2.93rem"
>
<van-tab v-for="(item, key) in tabs" :key="key" :title="item.title"> -->
<!-- 内容列表 -->
<!-- 提交 -->
<div>
<van-sticky
offset-top=
"0"
>
<LHeader
:text=
"text"
></LHeader>
</van-sticky>
<van-tabs
v-model=
"active"
@
change=
"postList"
color=
"#2980f7"
animated
:sticky=
"true"
>
<van-tab
v-for=
"item in tabs"
:key=
"item.key"
:title=
"item.title"
>
<!-- 内容列表 -->
<div
class=
"con-list"
>
<van-cell-group
inset
v-for=
"(item, index) in messageList"
:key=
"index"
>
<div
style=
"font-size: 0.45rem;padding: 5px 0;"
>
{{
item
.
title
}}
</div>
<van-row
gutter=
""
>
<van-col
span=
"17"
>
<van-row
gutter=
""
>
<van-col
span=
"9"
>
创建人:
</van-col>
<van-col
span=
"15"
>
{{
item
.
leaderUserName
}}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"9"
>
发起时间:
</van-col>
<van-col
span=
"15"
>
{{
timestampToTimes
(
item
.
startTime
)
}}
</van-col>
</van-row>
</van-col>
<van-col
span=
"7"
>
<van-row
:style=
"
{
color:
active == 0
? '#f79648'
: active == 1
? '#0069e5'
: '#03b615'
}"
>
{{
item
.
state
}}
</van-row>
<van-row>
<van-button
type=
"info"
size=
"mini"
@
click=
"lookdetail(index, item)"
>
执行情况
</van-button
>
</van-row>
</van-col>
</van-row>
</van-cell-group>
<div
class=
"con-list"
@
touchmove=
"showIndex = null"
style=
"
width: 100%;
text-align: center;
font-size: 0.48rem;
position: fixed;
top: 30%;
"
v-if=
"messageList['length'] == 0"
>
暂无数据
</div>
</div>
<!-- 暂无数据 -->
<!--
{{
messageList
}}
-->
</van-tab>
</van-tabs>
<!-- 长按显示遮罩层 -->
<van-popup
v-model=
"showIndex"
closeable
round
position=
"right"
:style=
"
{ width: '90%', height: '100%' }"
>
<van-cell-group
title=
"执行情况"
>
<!-- 内容列表 -->
<div
class=
"con-list"
>
<van-cell-group
inset
v-for=
"(item, index) in buildingList"
:key=
"index"
>
<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;"
>
{{item.title}}
</div>
<van-row
gutter=
""
>
<van-col
span=
"16"
>
{{
item
.
buildingName
}}
</van-col>
<van-col
span=
"8"
:style=
"
{
color:
item.status == 'wait'
? '#F79648'
: item.status == 'finish'
? '#03B615'
: '#FF041D'
}"
>
{{
item
.
status
==
"
wait
"
?
"
待评估
"
:
item
.
status
==
"
finish
"
?
"
已完成
"
:
"
已退回
"
}}
</van-col
>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"17"
>
<van-row
gutter=
""
>
<van-col
span=
"9"
>
发起时间:
</van-col>
<van-col
span=
"15"
>
{{ item.time}}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"9"
>
处理人员:
</van-col>
<van-col
span=
"15"
>
{{ item.name }}
</van-col>
</van-row>
</van-col>
<van-col
span=
"7"
:style=
"{'color':item.state == 1 ? '#0069e5':'#03b615'}"
>
{{ item.state==1?'●未执行':'●已执行' }}
</van-col>
</van-row>
<van-row>
<van-col
span=
"18"
>
<van-row
gutter=
""
>
<van-col
span=
"8"
>
创 建 人:
</van-col>
<van-col
span=
"16"
>
{{
item
.
createUserName
}}
</van-col>
</van-row>
<!-- <van-row gutter="">
<van-col span="7">风险源:</van-col>
<van-col span="17">{{ item.riskSource }}</van-col>
</van-row> -->
<!-- 长按显示遮罩层 -->
<van-overlay
:show=
"showIndex == index"
>
<div
class=
"wrapper"
@
click.stop=
"showIndex = null"
>
<van-button
round
type=
"primary"
@
click=
"goDetail(item)"
>
详情
</van-button
>
<van-button
round
type=
"info"
@
click=
"goConfirm(item)"
v-show=
"active==0"
>
确认
</van-button
<van-row
gutter=
""
>
<van-col
span=
"8"
>
处理人员:
</van-col>
<van-col
span=
"16"
>
{{
item
.
workUserNames
}}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"8"
>
发起时间:
</van-col>
<van-col
span=
"16"
>
{{
timestampToTimes
(
item
.
startTime
)
}}
</van-col>
</van-row>
</van-col>
<van-col
span=
"6"
>
<van-row>
<van-button
type=
"info"
size=
"mini"
@
click=
"todotail(index, item)"
>
查看详情
</van-button
>
</div>
</van-overlay>
</van-cell-group>
<div
</van-row></van-col
>
</van-row>
</van-cell-group>
<div
style=
"
width: 100%;
text-align: center;
...
...
@@ -83,164 +153,191 @@
position: fixed;
top: 30%;
"
v-if=
"
messageList['length']==
0"
v-if=
"
buildingList['length'] ==
0"
>
暂无数据
</div>
</div>
<!-- 暂无数据 -->
<!-- {{messageList}} -->
<!-- </van-tab>
</van-tabs> -->
</div>
</template>
<
script
>
import
LHeader
from
"
@/components/header.vue
"
;
import
{
getFun
,
postFun
}
from
"
@/service/table.js
"
;
// import { postriskConList } from "@/service/risk";
export
default
{
name
:
'
risk-confirme
'
,
components
:
{
LHeader
,
</div>
</van-cell-group>
</van-popup>
</div>
</
template
>
<
script
>
import
LHeader
from
"
@/components/header.vue
"
;
import
{
getFun
,
postFun
}
from
"
@/service/table.js
"
;
import
{
timestampToTime
,
generateId
}
from
"
@/utils/format
"
;
export
default
{
name
:
"
risk-execution
"
,
components
:
{
LHeader
},
data
()
{
return
{
text
:
"
执行情况管理
"
,
searchValue
:
""
,
isHaveNews
:
false
,
messageList
:
[
{
title
:
"
XX项目评估任务单
"
,
time
:
"
2022-12-12
"
,
name
:
"
Mr.周
"
,
state
:
1
}
],
Loop
:
""
,
// 定时器
showIndex
:
false
,
// 是否显示遮罩层,
active
:
0
,
tabs
:
[
{
title
:
"
待执行
"
,
key
:
"
running
"
},
{
title
:
"
已执行
"
,
key
:
"
finish
"
},
{
title
:
"
已退回
"
,
key
:
"
return
"
}
],
buildingList
:
[]
};
},
created
()
{
this
.
postList
(
0
);
},
methods
:
{
timestampToTimes
(
time
)
{
return
timestampToTime
(
new
Date
(
time
),
"
DT2
"
,
true
);
},
data
()
{
return
{
text
:
"
风险评估
"
,
searchValue
:
""
,
isHaveNews
:
false
,
messageList
:
[
{
title
:
'
XX项目评估任务单
'
,
time
:
'
2022-12-12
'
,
name
:
'
Mr.周
'
,
state
:
1
}
],
Loop
:
""
,
// 定时器
showIndex
:
null
,
// 是否显示遮罩层,
active
:
0
,
tabs
:
[
{
title
:
"
未执行
"
,
api
:
"
/riskConfirm/list
"
,
},
{
title
:
"
已执行
"
,
api
:
"
/riskConfirm/finishList
"
,
},
],
};
handadd
()
{
this
.
$router
.
push
({
name
:
"
riskAdd
"
,
params
:
{
title
:
"
新增
"
}
});
},
created
()
{
// this.postList();s
postList
(
name
,
title
)
{
this
.
$toast
.
loading
({
message
:
"
加载中...
"
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
duration
:
0
});
let
url
=
`/risk/plan/task/list?status=running`
;
if
(
name
==
0
)
{
url
=
`/risk/plan/task/list?status=running`
;
}
else
if
(
name
==
1
)
{
url
=
`/risk/plan/task/list?status=finish`
;
}
else
{
url
=
`/risk/plan/task/list?status=return`
;
}
getFun
(
url
)
.
then
(
res
=>
{
this
.
$toast
.
clear
();
this
.
messageList
=
res
.
data
||
res
.
rows
;
// 判断有无数据返回
if
(
this
.
messageList
.
length
==
0
)
{
this
.
isHaveNews
=
true
;
}
})
.
catch
(()
=>
{
this
.
$toast
.
clear
();
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
},
methods
:
{
handadd
(){
this
.
$router
.
push
({
name
:
"
riskAdd
"
,
params
:
{
title
:
'
新增
'
},
})
},
postList
(
select
=
""
)
{
this
.
$toast
.
loading
({
message
:
"
加载中...
"
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
duration
:
0
,
onSearch
(
val
)
{
this
.
postList
(
this
.
searchValue
);
},
//执行情况
lookdetail
(
index
,
item
)
{
this
.
showIndex
=
true
;
console
.
log
(
item
);
getFun
(
"
/risk/plan/allocation/building/list/
"
+
item
.
id
)
.
then
(
res
=>
{
console
.
log
(
res
);
this
.
buildingList
=
res
.
data
;
})
.
catch
(()
=>
{
this
.
$toast
.
clear
();
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
let
formdata
=
new
FormData
();
formdata
.
append
(
"
select
"
,
select
);
postFun
(
this
.
tabs
[
this
.
active
][
'
api
'
],
formdata
)
.
then
((
res
)
=>
{
this
.
$toast
.
clear
();
this
.
messageList
=
res
.
data
||
res
.
rows
;
// 判断有无数据返回
if
(
this
.
messageList
.
length
==
0
)
{
this
.
isHaveNews
=
true
;
}
})
.
catch
(()
=>
{
this
.
$toast
.
clear
();
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
},
onSearch
(
val
)
{
this
.
postList
(
this
.
searchValue
);
},
touchstart
(
index
,
item
)
{
if
(
this
.
showIndex
!=
null
)
{
this
.
showIndex
=
null
;
return
;
},
//查看详情
todotail
(
index
,
item
)
{
console
.
log
(
item
);
this
.
$router
.
push
({
name
:
"
riskTaskList
"
,
params
:
{
id
:
item
.
id
,
buildingId
:
item
.
buildingId
}
this
.
showIndex
=
index
;
},
// 详情
goDetail
(
data
)
{
this
.
$router
.
push
({
name
:
"
risk-big-detail
"
,
params
:
{
id
:
data
.
businessId
||
data
.
id
,
},
});
this
.
showIndex
=
null
;
},
// 确认
goConfirm
(
data
)
{
this
.
$router
.
push
({
name
:
"
risk-affirm
"
,
params
:
{
data
:
data
,
},
});
this
.
showIndex
=
null
;
},
});
sessionStorage
.
setItem
(
"
planId
"
,
item
.
id
);
sessionStorage
.
setItem
(
"
buildingId
"
,
item
.
buildingId
);
this
.
showIndex
=
false
;
},
};
</
script
>
<
style
lang=
"less"
scoped
>
#app {
font-family: "";
color: #2c3e50;
}
.con-list {
padding: 0;
background-color: #f0f1f5;
.van-cell-group--inset {
margin: 0;
margin-bottom: 0.26667rem;
padding: 0.25rem;
font-size: 0.4rem;
position: relative;
border-radius: 4%;
box-shadow: 0px 0px 10px 2px #f3f3f3;
width: 90%;
margin: 0.4rem auto;
.van-row {
font-size: 0.4rem;
line-height: 0.8rem;
margin-bottom: 0;
}
.van-overlay {
position: absolute;
.wrapper {
display: flex;
align-items: center;
justify-content: space-evenly;
height: 100%;
// 详情
goDetail
(
data
)
{
this
.
$router
.
push
({
name
:
"
riskBigDetail
"
,
params
:
{
id
:
data
.
businessId
||
data
.
id
}
}
});
this
.
showIndex
=
false
;
},
// 确认
goConfirm
(
data
)
{
this
.
$router
.
push
({
name
:
"
risk-affirm
"
,
params
:
{
data
:
data
}
});
this
.
showIndex
=
false
;
}
}
/deep/.van-tab__pane{
min-height: 8rem;
};
</
script
>
<
style
lang=
"less"
scoped
>
#app {
font-family: "";
color: #2c3e50;
}
.con-list {
padding: 0;
background-color: #f0f1f5;
position: relative;
.van-cell-group--inset {
margin: 0;
margin-bottom: 0.26667rem;
padding: 0.25rem;
font-size: 0.4rem;
border-radius: 4%;
box-shadow: 0px 0px 10px 2px #f3f3f3;
width: 90%;
margin: 0.4rem auto;
.van-row {
font-size: 0.4rem;
line-height: 0.8rem;
margin-bottom: 0;
}
}
</
style
>
\ No newline at end of file
}
.wrapper {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
}
</
style
>
src/views/riskProject/assess/riskBigDetail.vue
0 → 100644
View file @
df43f7d7
<
template
>
<!-- 提交 -->
<div>
<van-sticky
offset-top=
"0"
>
<LHeader
:text=
"text"
></LHeader>
</van-sticky>
<div
style=
"margin-bottom: 1.5rem;"
>
<van-grid
:column-num=
"3"
style=
"background-color: #fff;"
>
<van-grid-item
>
<div>
发起人员:
</div>
<div>
{{
messageList
.
createUserName
}}
</div>
</van-grid-item>
<van-grid-item
>
<div>
项目负责人:
</div>
<div>
{{
messageList
.
leaderUserName
}}
</div>
</van-grid-item>
<van-grid-item
>
<div>
任务状态:
</div>
<div>
{{
messageList
.
status
}}
</div>
</van-grid-item>
<van-grid-item
>
<div>
开始时间:
</div>
<div>
{{
timestampToTimes
(
messageList
.
startTime
)
||
messageList
.
startTime
}}
</div>
</van-grid-item>
<van-grid-item
>
<div>
结束时间:
</div>
<div>
{{
timestampToTimes
(
messageList
.
endTime
)
||
messageList
.
endTime
}}
</div>
</van-grid-item>
</van-grid>
<van-steps
:active=
"active"
active-icon=
"success"
active-color=
"#38f"
style=
"margin: 0.26rem 0;"
>
<van-step>
任务发起
</van-step>
<van-step>
风险评估
</van-step>
<van-step>
评估审核
</van-step>
<van-step>
项目完成
</van-step>
</van-steps>
<van-tabs
v-model=
"active"
color=
"#2980f7"
animated
:sticky=
"true"
offset-top=
"2.93rem"
>
<van-tab
title=
"任务详情"
>
<van-form
:scroll-to-error=
"true"
:show-error=
"false"
validate-trigger=
"onSubmit"
>
<van-field
readonly
name=
"createUserName"
:value=
"form.createUserName"
label=
"创建人员"
input-align=
"right"
:rules=
"[
{ required: true, message: '创建人员不能为空' }]"
/>
<van-field
readonly
name=
"createDeptName"
:value=
"form.createDeptName"
label=
"创建单位"
input-align=
"right"
:rules=
"[
{ required: true, message: '创建单位不能为空' }]"
/>
<van-field
readonly
name=
"projectName"
:value=
"form.projectName"
label=
"任务名称"
input-align=
"right"
:rules=
"[
{ required: true, message: '任务名称不能为空' }]"
/>
<van-field
readonly
name=
"projectName"
:value=
"form.projectName"
label=
"关联项目"
input-align=
"right"
:rules=
"[
{ required: true, message: '关联项目不能为空' }]"
/>
<van-field
readonly
name=
"buildingNames"
:value=
"form.buildingNames"
label=
"评估楼栋"
input-align=
"right"
:rules=
"[
{ required: true, message: '评估楼栋不能为空' }]"
/>
<van-field
readonly
name=
"leaderUserName"
:value=
"form.leaderUserName"
label=
"项目负责人"
input-align=
"right"
:rules=
"[
{ required: true, message: '事故类型不能为空' }]"
/>
<van-field
v-model=
"form.startTime"
readonly
name=
"location"
label=
"任务开始时间"
input-align=
"right"
:formatter=
"()=>
{
return timestampToTimes(form.startTime)
}"
:rules="[{ required: true, message: '任务开始时间不能为空' }]"
/>
<van-field
v-model=
"form.endTime"
readonly
name=
"location"
label=
"任务结束时间"
:formatter=
"()=>
{
return timestampToTimes(form.endTime)
}"
input-align="right"
:rules="[{ required: true, message: '任务结束时间不能为空' }]"
/>
<van-field
clickable
name=
"workUserNames"
:value=
"form.workUserNames"
label=
"执行人员"
input-align=
"right"
:rules=
"[
{ required: true, message: '执行人员不能为空' }]"
/>
</van-form>
</van-tab>
<van-tab
title=
"风险清单"
>
</van-tab>
<van-tab
title=
"审核记录"
>
<div
class=
"journal-wrap"
>
<van-cell-group
inset
>
<van-steps
direction=
"vertical"
:active=
"99999"
v-if=
"riskLogList.length>0"
>
<van-step
v-for=
"(item, index) in riskLogList"
:key=
"index"
>
<div
class=
"step-wrap"
>
<van-row>
<van-col
span=
"24"
><div
class=
"info-title"
>
{{
timestampToTimes
(
item
.
startTime
)
}}
</div></van-col>
</van-row>
<van-row>
<van-col
span=
"7"
><span
class=
"field-title"
>
操作人:
</span></van-col
>
<van-col
span=
"17"
>
{{
item
.
approvalUserName
}}
</van-col>
</van-row>
<van-row>
<van-col
span=
"7"
><span
class=
"field-title"
>
审批结果:
</span></van-col
>
<van-col
span=
"17"
>
{{
item
.
taskName
}}
</van-col>
</van-row>
<van-row>
<van-col
span=
"7"
><span
class=
"field-title"
>
岗位:
</span></van-col
>
<van-col
span=
"17"
>
{{
item
.
taskResult
}}
</van-col>
</van-row>
<!--
<van-row>
<van-col
span=
"7"
><span
class=
"field-title"
>
结果:
</span></van-col
>
<van-col
span=
"17"
>
{{
LogType
(
item
.
taskResult
)
}}
</van-col>
</van-row>
-->
</div>
</van-step>
</van-steps>
<div
style=
"text-align: center;"
v-if=
"riskLogList.length == 0"
>
暂无数据
</div>
</van-cell-group>
</div>
</van-tab>
<van-tab
title=
"风险评估报告"
>
<div
style=
"height: 1.5rem;
background-color: #fff;
border-bottom: 1px solid #97999a;
display: flex;
justify-content: space-between;
line-height: 1.5rem;
"
>
<div><van-icon
name=
"column"
size=
"26px"
/></div>
<div
style=
"flex-grow:1;line-height: 0.6rem"
>
<div>
风险评估报告.PDF
</div>
<div>
2019-3-21 10:23 100KB
</div>
</div>
<div>
<van-icon
name=
"arrow"
size=
"26px"
/>
</div>
</div>
<div
style=
"height: 1.5rem;
background-color: #fff;
border-bottom: 1px solid #97999a;
display: flex;
justify-content: space-between;
line-height: 1.5rem;
"
>
<div><van-icon
name=
"column"
size=
"26px"
/></div>
<div
style=
"flex-grow:1;line-height: 0.6rem"
>
<div>
风险评估报告.PDF
</div>
<div>
2019-3-21 10:23 100KB
</div>
</div>
<div>
<van-icon
name=
"arrow"
size=
"26px"
/>
</div>
</div>
</van-tab>
</van-tabs>
</div>
<div
style=
"display: flex;
justify-content: space-around;
background-color: #fff;
border-top: 1px solid #e3e3e3;
height: 1.5rem;
width: 100%;
text-align: center;
position: fixed;
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>
<!--
<div
style=
"color: #ec808d;font-size: 14px;font-weight: 600;"
>
<div
style=
"font-size: 22px;"
><van-icon
name=
"success"
/></div>
<div>
任务完成
</div>
</div>
-->
</div>
</div>
</
template
>
<
script
>
import
LHeader
from
"
@/components/header.vue
"
;
import
{
timestampToTime
,
generateId
}
from
"
@/utils/format
"
;
import
{
getFun
,
postFun
}
from
"
@/service/table.js
"
;
export
default
{
name
:
'
riskBigDetail
'
,
components
:
{
LHeader
,
},
data
()
{
return
{
text
:
"
任务单
"
,
searchValue
:
""
,
isHaveNews
:
false
,
messageList
:
[],
riskLogList
:[],
Loop
:
""
,
// 定时器
showIndex
:
null
,
// 是否显示遮罩层,
active
:
0
,
form
:{
},
tabs
:
[
],
};
},
created
()
{
var
planId
=
this
.
$route
.
params
.
id
||
sessionStorage
.
getItem
(
'
planId
'
)
this
.
postList
(
planId
);
},
methods
:
{
timestampToTimes
(
time
){
return
timestampToTime
(
new
Date
(
time
),
"
DT2
"
,
true
)
},
performTasks
(){
this
.
$router
.
push
({
name
:
"
riskInherent
"
,
params
:
{
id
:
this
.
messageList
.
id
},
})
},
handadd
(){
this
.
$router
.
push
({
name
:
"
riskAdd
"
,
params
:
{
title
:
'
新增
'
},
})
},
postList
(
id
)
{
this
.
$toast
.
loading
({
message
:
"
加载中...
"
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
duration
:
0
,
});
getFun
(
`/risk/plan/details/
${
id
}
`
)
.
then
((
res
)
=>
{
this
.
$toast
.
clear
();
this
.
messageList
=
res
.
data
||
res
.
rows
;
this
.
form
=
this
.
messageList
.
detailsDto
this
.
riskLogList
=
this
.
messageList
.
approveListDtos
})
.
catch
(()
=>
{
this
.
$toast
.
clear
();
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
},
onSearch
(
val
)
{
this
.
postList
(
this
.
searchValue
);
},
touchstart
(
index
,
item
)
{
if
(
this
.
showIndex
!=
null
)
{
this
.
showIndex
=
null
;
return
;
}
this
.
showIndex
=
index
;
},
// 详情
goDetail
(
data
)
{
this
.
$router
.
push
({
name
:
"
riskBigDetail
"
,
params
:
{
id
:
data
.
businessId
||
data
.
id
,
},
});
sessionStorage
.
setItem
(
'
planId
'
,
data
.
id
)
this
.
showIndex
=
null
;
},
// 确认
goConfirm
(
data
)
{
this
.
$router
.
push
({
name
:
"
risk-affirm
"
,
params
:
{
data
:
data
,
},
});
this
.
showIndex
=
null
;
},
},
};
</
script
>
<
style
lang=
"less"
scoped
>
#app {
font-family: "";
color: #2c3e50
}
.cell-wrap {
position: relative;
}
p {
font-size: 0.4rem;
font-weight: none;
padding-left: 0.16rem;
margin: 0.186667rem 0;
color: #7f7f7f;
}
.van-cell-group--inset {
margin: 0;
margin-bottom: 10px;
padding: 10px;
font-size: 13px;
position: relative;
.van-row {
margin-bottom: 0.133333rem;
line-height: 0.64rem;
}
}
.journal-wrap {
position: relative;
}
.supervise-wrap {
position: relative;
}
.info-title {
color: #2980f7;
font-weight: none;
}
.field-title {
color: black;
font-weight: none;
}
.more {
position: absolute;
bottom: 0.32rem;
right: 15px;
color: #2a80f7;
font-weight: none;
z-index: 99;
}
</
style
>
\ No newline at end of file
src/views/riskProject/execution/index.vue
0 → 100644
View file @
df43f7d7
<
template
>
<!-- 提交 -->
<div>
<van-sticky
offset-top=
"0"
>
<LHeader
:text=
"text"
></LHeader>
</van-sticky>
<van-tabs
v-model=
"active"
@
change=
"postList"
color=
"#2980f7"
animated
:sticky=
"true"
>
<van-tab
v-for=
"item in tabs"
:key=
"item.key"
:title=
"item.title"
>
<!-- 内容列表 -->
<div
class=
"con-list"
>
<van-cell-group
inset
v-for=
"(item, index) in messageList"
:key=
"index"
>
<div
style=
"font-size: 0.45rem;padding: 5px 0;"
>
{{
item
.
title
}}
</div>
<van-row
gutter=
""
>
<van-col
span=
"17"
>
<van-row
gutter=
""
>
<van-col
span=
"9"
>
创建人:
</van-col>
<van-col
span=
"15"
>
{{
item
.
leaderUserName
}}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"9"
>
发起时间:
</van-col>
<van-col
span=
"15"
>
{{
timestampToTimes
(
item
.
startTime
)
}}
</van-col>
</van-row>
</van-col>
<van-col
span=
"7"
>
<van-row
:style=
"
{
color:
active == 0
? '#f79648'
: active == 1
? '#0069e5'
: '#03b615'
}"
>
{{
item
.
state
}}
</van-row>
<van-row>
<van-button
type=
"info"
size=
"mini"
@
click=
"lookdetail(index, item)"
>
执行情况
</van-button
>
</van-row>
</van-col>
</van-row>
</van-cell-group>
<div
style=
"
width: 100%;
text-align: center;
font-size: 0.48rem;
position: fixed;
top: 30%;
"
v-if=
"messageList['length'] == 0"
>
暂无数据
</div>
</div>
<!-- 暂无数据 -->
<!--
{{
messageList
}}
-->
</van-tab>
</van-tabs>
<!-- 长按显示遮罩层 -->
<van-popup
v-model=
"showIndex"
closeable
round
position=
"right"
:style=
"
{ width: '90%', height: '100%' }"
>
<van-cell-group
title=
"执行情况"
>
<!-- 内容列表 -->
<div
class=
"con-list"
>
<van-cell-group
inset
v-for=
"(item, index) in buildingList"
:key=
"index"
>
<van-row
gutter=
""
>
<van-col
span=
"16"
>
{{
item
.
buildingName
}}
</van-col>
<van-col
span=
"8"
:style=
"
{
color:
item.status == 'wait'
? '#F79648'
: item.status == 'finish'
? '#03B615'
: '#FF041D'
}"
>
{{
item
.
status
==
"
wait
"
?
"
待评估
"
:
item
.
status
==
"
finish
"
?
"
已完成
"
:
"
已退回
"
}}
</van-col
>
</van-row>
<van-row>
<van-col
span=
"18"
>
<van-row
gutter=
""
>
<van-col
span=
"8"
>
创 建 人:
</van-col>
<van-col
span=
"16"
>
{{
item
.
createUserName
}}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"8"
>
处理人员:
</van-col>
<van-col
span=
"16"
>
{{
item
.
workUserNames
}}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"8"
>
发起时间:
</van-col>
<van-col
span=
"16"
>
{{
timestampToTimes
(
item
.
startTime
)
}}
</van-col>
</van-row>
</van-col>
<van-col
span=
"6"
>
<van-row>
<van-button
type=
"info"
size=
"mini"
@
click=
"todetail(index, item)"
>
查看详情
</van-button
>
</van-row></van-col
>
</van-row>
</van-cell-group>
<div
style=
"
width: 100%;
text-align: center;
font-size: 0.48rem;
position: fixed;
top: 30%;
"
v-if=
"buildingList['length'] == 0"
>
暂无数据
</div>
</div>
</van-cell-group>
</van-popup>
</div>
</
template
>
<
script
>
import
LHeader
from
"
@/components/header.vue
"
;
import
{
getFun
,
postFun
}
from
"
@/service/table.js
"
;
import
{
timestampToTime
,
generateId
}
from
"
@/utils/format
"
;
export
default
{
name
:
"
risk-execution
"
,
components
:
{
LHeader
},
data
()
{
return
{
text
:
"
执行情况管理
"
,
searchValue
:
""
,
isHaveNews
:
false
,
messageList
:
[
{
title
:
"
XX项目评估任务单
"
,
time
:
"
2022-12-12
"
,
name
:
"
Mr.周
"
,
state
:
1
}
],
Loop
:
""
,
// 定时器
showIndex
:
false
,
// 是否显示遮罩层,
active
:
0
,
// 状态 wait 待评估,running 执行中,finish 已完成
tabs
:
[
{
title
:
"
待评估
"
,
key
:
"
wait
"
},
{
title
:
"
执行中
"
,
key
:
"
running
"
},
{
title
:
"
已完成
"
,
key
:
"
finish
"
}
],
buildingList
:
[]
};
},
created
()
{
this
.
postList
(
0
);
},
methods
:
{
timestampToTimes
(
time
)
{
return
timestampToTime
(
new
Date
(
time
),
"
DT2
"
,
true
);
},
handadd
()
{
this
.
$router
.
push
({
name
:
"
riskAdd
"
,
params
:
{
title
:
"
新增
"
}
});
},
postList
(
name
,
title
)
{
this
.
$toast
.
loading
({
message
:
"
加载中...
"
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
duration
:
0
});
let
url
=
`/risk/plan/allocation/list?status=wait`
;
if
(
name
==
0
)
{
url
=
`/risk/plan/allocation/list?status=wait`
;
}
else
if
(
name
==
1
)
{
url
=
`/risk/plan/allocation/list?status=running`
;
}
else
{
url
=
`/risk/plan/allocation/list?status=finish`
;
}
getFun
(
url
)
.
then
(
res
=>
{
this
.
$toast
.
clear
();
this
.
messageList
=
res
.
data
||
res
.
rows
;
// 判断有无数据返回
if
(
this
.
messageList
.
length
==
0
)
{
this
.
isHaveNews
=
true
;
}
})
.
catch
(()
=>
{
this
.
$toast
.
clear
();
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
},
onSearch
(
val
)
{
this
.
postList
(
this
.
searchValue
);
},
//执行情况
lookdetail
(
index
,
item
)
{
this
.
showIndex
=
true
;
console
.
log
(
item
);
getFun
(
"
/risk/plan/allocation/building/list/
"
+
item
.
id
)
.
then
(
res
=>
{
console
.
log
(
res
);
this
.
buildingList
=
res
.
data
;
})
.
catch
(()
=>
{
this
.
$toast
.
clear
();
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
},
//查看详情
todetail
(
index
,
item
)
{
this
.
$router
.
push
({
name
:
"
riskTaskList
"
,
params
:
{
id
:
item
.
id
,
buildingId
:
item
.
buildingId
}
});
sessionStorage
.
setItem
(
"
planId
"
,
item
.
id
);
sessionStorage
.
setItem
(
"
buildingId
"
,
item
.
buildingId
);
this
.
showIndex
=
false
;;
},
// 详情
goDetail
(
data
)
{
this
.
$router
.
push
({
name
:
"
risk-big-detail
"
,
params
:
{
id
:
data
.
businessId
||
data
.
id
}
});
this
.
showIndex
=
false
;
},
// 确认
goConfirm
(
data
)
{
this
.
$router
.
push
({
name
:
"
risk-affirm
"
,
params
:
{
data
:
data
}
});
this
.
showIndex
=
false
;
}
}
};
</
script
>
<
style
lang=
"less"
scoped
>
#app {
font-family: "";
color: #2c3e50;
}
.con-list {
padding: 0;
background-color: #f0f1f5;
position: relative;
.van-cell-group--inset {
margin: 0;
margin-bottom: 0.26667rem;
padding: 0.25rem;
font-size: 0.4rem;
border-radius: 4%;
box-shadow: 0px 0px 10px 2px #f3f3f3;
width: 90%;
margin: 0.4rem auto;
.van-row {
font-size: 0.4rem;
line-height: 0.8rem;
margin-bottom: 0;
}
}
}
.wrapper {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
}
</
style
>
src/views/riskProject/manage/index.vue
View file @
df43f7d7
...
...
@@ -122,7 +122,11 @@
active
:
0
,
tabs
:
[
{
title
:
"
未执行
"
,
title
:
"
待执行
"
,
api
:
"
/risk/plan/create/list?status=wait
"
,
},
{
title
:
"
执行中
"
,
api
:
"
/risk/plan/create/list?status=running
"
,
},
{
...
...
src/views/saveWorkbench/index.vue
View file @
df43f7d7
...
...
@@ -42,7 +42,7 @@
<
script
>
import
tabBar
from
"
@/components/TabBar
"
;
import
{
getFun
,
postFun
}
from
'
@/service/table
'
import
{
getFun
,
postFun
}
from
'
@/service/table
'
export
default
{
components
:
{
tabBar
...
...
@@ -120,6 +120,7 @@ export default {
this
.
getMenuList
()
},
methods
:
{
//查询角色菜单列表
getMenuList
(){
getFun
(
'
/menu/roleMenuTreeselect
'
).
then
((
res
)
=>
{
...
...
@@ -137,22 +138,44 @@ export default {
console
.
log
(
'
err==>>
'
,
err
)
})
},
onSearch
(){
workBenchList
()
{
getFun
(
`/menu/getMenu`
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
powerObj
=
res
.
data
;
if
(
this
.
powerObj
.
风险评估管理
)
{
this
.
finalRiskList
=
[
...
this
.
riskList
].
filter
((
x
)
=>
[...
this
.
powerObj
.
风险评估管理
].
some
(
(
y
)
=>
(
`/
${
y
.
path
}
`
)
==
x
.
path
)
);
}
else
{
this
.
finalRiskList
=
[];
}
console
.
log
(
this
.
finalRiskList
)
}
else
{
this
.
powerObj
=
{}
}
});
},
onSearch
()
{
},
createdClick
(){
this
.
$router
.
push
(
'
/create-task
'
)
createdClick
()
{
this
.
$router
.
push
(
'
/create-task
'
)
},
dangerJump
(
path
)
{
if
(
path
)
{
if
(
path
==
'
/add-danger
'
)
{
sessionStorage
.
removeItem
(
'
obj
'
)
this
.
$router
.
push
({
name
:
'
add-danger
'
,
params
:{
isWorkbenchTo
:
1
}
});
}
else
{
this
.
$router
.
push
(
path
);
}
}
},
if
(
path
)
{
if
(
path
==
'
/add-danger
'
)
{
sessionStorage
.
removeItem
(
'
obj
'
)
this
.
$router
.
push
({
name
:
'
add-danger
'
,
params
:
{
isWorkbenchTo
:
1
}
});
}
else
{
this
.
$router
.
push
(
path
);
}
}
},
}
};
</
script
>
...
...
@@ -167,20 +190,23 @@ export default {
color: white;
text-align: center;
}
.con {
// height: calc(100% - 110px);
// height: 100%;
padding: 10px 0 50px 0;
background-color: #f0f1f5;
/deep/ .van-grid-item__content--center {
// padding-left: 0px;
// padding-right: 0px;
padding: 0.22667rem 0px;
}
/deep/ .van-icon__image {
width: auto;
height: 1rem;
}
// height: calc(100% - 110px);
// height: 100%;
padding: 10px 0 50px 0;
background-color: #f0f1f5;
/deep/ .van-grid-item__content--center {
// padding-left: 0px;
// padding-right: 0px;
padding: 0.22667rem 0px;
}
/deep/ .van-icon__image {
width: auto;
height: 1rem;
}
}
.notice-swipe {
height: 40px;
...
...
vue.config.js
View file @
df43f7d7
...
...
@@ -9,7 +9,8 @@ module.exports = {
proxy
:
{
//配置跨域
'
/app-api
'
:
{
// target: 'http://192.168.4.232:8080/', //这里是后台的地址
// target: 'http://192.168.10.137:8080/', //这里是后台的地址
// target: 'http://192.168.15.124:8080/', //这里是杨帆的地址
// target: 'http://192.168.10.137:8080/', //这里是昊哥的地址
target
:
'
http://192.168.10.36:8080/
'
,
//这里是后台的地址
ws
:
true
,
changOrigin
:
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