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
98dcf66f
Commit
98dcf66f
authored
Jul 14, 2023
by
wei
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into dev-lv
parents
59bb8b9c
40c809cf
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
2527 additions
and
1578 deletions
+2527
-1578
src/App.vue
src/App.vue
+1
-1
src/components/selectFloor.vue
src/components/selectFloor.vue
+3
-3
src/views/drawCanvas/riskView.vue
src/views/drawCanvas/riskView.vue
+2
-2
src/views/riskProject/add/addCurrent.vue
src/views/riskProject/add/addCurrent.vue
+207
-153
src/views/riskProject/add/addInherent.vue
src/views/riskProject/add/addInherent.vue
+415
-158
src/views/riskProject/add/addPresent.vue
src/views/riskProject/add/addPresent.vue
+938
-669
src/views/riskProject/add/index.vue
src/views/riskProject/add/index.vue
+10
-6
src/views/riskProject/add/inherentRisks.vue
src/views/riskProject/add/inherentRisks.vue
+114
-60
src/views/riskProject/add/taskList.vue
src/views/riskProject/add/taskList.vue
+16
-9
src/views/riskProject/manage/index.vue
src/views/riskProject/manage/index.vue
+2
-1
src/views/riskProject/taskLedger/index.vue
src/views/riskProject/taskLedger/index.vue
+21
-6
src/views/riskProject/taskLedger/presentDetail.vue
src/views/riskProject/taskLedger/presentDetail.vue
+388
-265
src/views/riskProject/taskLedger/tabDetail.vue
src/views/riskProject/taskLedger/tabDetail.vue
+410
-245
No files found.
src/App.vue
View file @
98dcf66f
...
@@ -63,7 +63,7 @@ export default {
...
@@ -63,7 +63,7 @@ export default {
"
riskAssess
"
,
"
riskAssess
"
,
"
riskApprove
"
,
"
riskApprove
"
,
"
taskList
"
,
"
taskList
"
,
"
taskDetail
"
,
"
taskDetail
"
],
],
// cachePage预先定义的缓存页面
// cachePage预先定义的缓存页面
otherCache
:
[],
otherCache
:
[],
...
...
src/components/selectFloor.vue
View file @
98dcf66f
...
@@ -42,8 +42,6 @@ export default {
...
@@ -42,8 +42,6 @@ export default {
components
:
{
components
:
{
// LHeader
// LHeader
},
},
created
()
{
},
data
()
{
data
()
{
return
{
return
{
text
:
"
选择人员
"
,
text
:
"
选择人员
"
,
...
@@ -52,6 +50,9 @@ export default {
...
@@ -52,6 +50,9 @@ export default {
seletedItem
:{}
seletedItem
:{}
};
};
},
},
mounted
(){
this
.
seletedItem
=
this
.
listdata
[
0
].
children
[
0
]
},
methods
:
{
methods
:
{
// 待搜索框内容发生变化
// 待搜索框内容发生变化
onInput
:
debounce
(
function
()
{
onInput
:
debounce
(
function
()
{
...
@@ -62,7 +63,6 @@ export default {
...
@@ -62,7 +63,6 @@ export default {
this
.
itemSel
=
e
this
.
itemSel
=
e
},
},
clickItem
(
data
)
{
clickItem
(
data
)
{
console
.
log
(
data
,
'
llll
'
)
this
.
seletedItem
=
data
this
.
seletedItem
=
data
},
},
save
()
{
save
()
{
...
...
src/views/drawCanvas/riskView.vue
View file @
98dcf66f
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
<div
class=
"wrap"
ref=
"mapmidbox"
>
<div
class=
"wrap"
ref=
"mapmidbox"
>
<van-sticky
v-if=
"showHeader"
>
<van-sticky
v-if=
"showHeader"
>
<header
class=
"header"
>
<header
class=
"header"
>
<span
@
click=
"close"
class=
"iconLeft"
>
关闭
</span>
<span
@
click=
"close"
class=
"iconLeft"
>
返回
</span>
<span>
{{
text
}}
</span>
<span>
{{
text
}}
</span>
<span
@
click=
"confim"
class=
"iconRight"
v-show=
"!isViews"
>
确定
</span>
<span
@
click=
"confim"
class=
"iconRight"
v-show=
"!isViews"
>
保存
</span>
<span
class=
"iconRight"
v-show=
"isViews"
></span>
<span
class=
"iconRight"
v-show=
"isViews"
></span>
</header>
</header>
</van-sticky>
</van-sticky>
...
...
src/views/riskProject/add/addCurrent.vue
View file @
98dcf66f
...
@@ -7,15 +7,16 @@
...
@@ -7,15 +7,16 @@
<div
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"position: relative;top: 32%;transform: translateY(-50%);"
>
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/
>
风险信息
风险信息
</div>
</div>
<van-field
readonly
required
name=
"userName"
:value=
"form.userName"
label=
"评估人"
placeholder=
"请输入"
/>
<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=
"projectId"
:value=
"form.projectName"
label=
"所属项目"
placeholder=
"请输入"
/>
<van-field
readonly
required
name=
"buildingName"
:value=
"form.buildingName"
label=
"所属建筑物"
<van-field
readonly
required
name=
"buildingName"
:value=
"form.buildingName"
label=
"所属建筑物"
placeholder=
"请输入"
/>
placeholder=
"请输入"
/>
<van-field
required
clickable
name=
"floor
Id"
:value=
"form.floorId
"
label=
"所属楼层"
placeholder=
"请选择"
<van-field
required
clickable
name=
"floor
Name"
:value=
"form.floorName
"
label=
"所属楼层"
placeholder=
"请选择"
@
click=
"seletFloor('floor')"
:rules=
"[
{ required: true, message: '所属楼层不能为空' }]" />
@
click=
"seletFloor('floor')"
:rules=
"[
{ required: true, message: '所属楼层不能为空' }]" />
<van-field
readonly
required
name=
"roomName"
:value=
"form.roomName"
label=
"所属房间"
placeholder=
"请输入"
<van-field
readonly
required
name=
"roomName"
:value=
"form.roomName"
label=
"所属房间"
placeholder=
"请输入"
...
@@ -39,7 +40,7 @@
...
@@ -39,7 +40,7 @@
<div
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"position: relative;top: 32%;transform: translateY(-50%);"
>
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/
>
风险源图片
风险源图片
</div>
</div>
<van-field
name=
"hdPicture1"
label=
"风险源图片"
>
<van-field
name=
"hdPicture1"
label=
"风险源图片"
>
...
@@ -67,7 +68,7 @@
...
@@ -67,7 +68,7 @@
<div
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"position: relative;top: 32%;transform: translateY(-50%);"
>
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/
>
技术措施
技术措施
</div>
</div>
<van-field
v-model=
"form.measuresProject"
name=
"measuresProject"
label=
"技术措施"
type=
"textarea"
rows=
"1"
<van-field
v-model=
"form.measuresProject"
name=
"measuresProject"
label=
"技术措施"
type=
"textarea"
rows=
"1"
...
@@ -98,7 +99,7 @@
...
@@ -98,7 +99,7 @@
<div
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"position: relative;top: 32%;transform: translateY(-50%);"
>
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/
>
管理措施
管理措施
</div>
</div>
<van-field
v-model=
"form.measuresAdministration"
name=
"measuresAdministration"
label=
"管理措施"
<van-field
v-model=
"form.measuresAdministration"
name=
"measuresAdministration"
label=
"管理措施"
...
@@ -130,7 +131,7 @@
...
@@ -130,7 +131,7 @@
<div
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"position: relative;top: 32%;transform: translateY(-50%);"
>
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/
>
应急措施
应急措施
</div>
</div>
<van-field
v-model=
"form.measuresEmergency"
name=
"measuresEmergency"
label=
"应急措施"
type=
"textarea"
<van-field
v-model=
"form.measuresEmergency"
name=
"measuresEmergency"
label=
"应急措施"
type=
"textarea"
...
@@ -162,7 +163,7 @@
...
@@ -162,7 +163,7 @@
<div
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"position: relative;top: 32%;transform: translateY(-50%);"
>
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/
>
参考依据
参考依据
</div>
</div>
<!-- <van-field
<!-- <van-field
...
@@ -177,9 +178,8 @@
...
@@ -177,9 +178,8 @@
:rules="[{ required: true, message: '事故类型不能为空' }]"
:rules="[{ required: true, message: '事故类型不能为空' }]"
/> -->
/> -->
<div
style=
"margin: 16px 16px 0"
>
<div
style=
"margin: 16px 16px 0"
>
<van-button
round
block
type=
"info"
native-type=
"submit"
>
上报
</van-button>
<van-button
round
block
type=
"info"
native-type=
"submit"
>
提交
</van-button>
</div>
</div>
</van-form>
</van-form>
<div
style=
"margin: 10px 16px 0px; padding-bottom: 16px"
>
<div
style=
"margin: 10px 16px 0px; padding-bottom: 16px"
>
...
@@ -189,25 +189,27 @@
...
@@ -189,25 +189,27 @@
<van-tab
title=
"现状风险"
>
<van-tab
title=
"现状风险"
>
<div
class=
"con-list"
@
touchmove=
"showIndex = null"
>
<div
class=
"con-list"
@
touchmove=
"showIndex = null"
>
<van-cell-group
inset
v-for=
"(item, index) in messageList"
:key=
"index"
>
<van-cell-group
inset
v-for=
"(item, index) in messageList"
:key=
"index"
>
<div
style=
"font-size: 0.45rem;padding: 5px 0;"
>
{{ item.title }}
</div>
<div
style=
"font-size: 0.45rem;padding: 5px 0;"
>
{{ item.title }}
</div>
<van-row
gutter=
""
>
<van-row
gutter=
""
>
<van-col
span=
"17"
>
<van-col
span=
"17"
>
<van-row
gutter=
""
>
<van-row
gutter=
""
>
<van-col
span=
"9"
>
风险
系数
:
</van-col>
<van-col
span=
"9"
>
风险
名称
:
</van-col>
<van-col
span=
"15"
>
{{ item.
ti
me }}
</van-col>
<van-col
span=
"15"
>
{{ item.
na
me }}
</van-col>
</van-row>
</van-row>
<van-row
gutter=
""
>
<van-row
gutter=
""
>
<van-col
span=
"9"
>
创建时间:
</van-col>
<van-col
span=
"9"
>
创建时间:
</van-col>
<van-col
span=
"15"
>
{{
item.name
}}
</van-col>
<van-col
span=
"15"
>
{{
timestampToTimes(item.createTime)
}}
</van-col>
</van-row>
</van-row>
<van-row
gutter=
""
>
<van-row
gutter=
""
>
<van-col
span=
"9"
>
风险描述:
</van-col>
<van-col
span=
"9"
>
风险描述:
</van-col>
<van-col
span=
"15"
>
{{ item.
nam
e }}
</van-col>
<van-col
span=
"15"
>
{{ item.
describ
e }}
</van-col>
</van-row>
</van-row>
</van-col>
</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-col>
</van-row>
</van-row>
</van-cell-group>
</van-cell-group>
...
@@ -221,7 +223,6 @@
...
@@ -221,7 +223,6 @@
暂无数据
暂无数据
</div>
</div>
</div>
</div>
</van-tab>
</van-tab>
</van-tabs>
</van-tabs>
<van-popup
v-model=
"showTrouble"
position=
"bottom"
>
<van-popup
v-model=
"showTrouble"
position=
"bottom"
>
...
@@ -229,6 +230,20 @@
...
@@ -229,6 +230,20 @@
@
cancel=
"showTrouble = false"
/>
@
cancel=
"showTrouble = false"
/>
</van-popup>
</van-popup>
<!-- 楼层弹出层 -->
<van-popup
v-model=
"ShowfloorList"
position=
"bottom"
:style=
"{ height: '100%' }"
>
<selectFloor
:listdata=
"floorSource"
@
closeSlect=
"closeSlectfloor"
@
saveSlect=
"saveSlectfloor"
></selectFloor>
</van-popup>
<!-- 风险源弹出层 -->
<van-popup
v-model=
"ShowSelectList"
position=
"bottom"
:style=
"{ height: '100%' }"
>
<selectList
:listdata=
"columnsTrouble"
@
closeSlect=
"closeSlect"
@
saveSlect=
"saveSlect"
></selectList>
</van-popup>
<!-- 准事故类型 -->
<van-popup
v-model=
"ShowAccidentList"
position=
"bottom"
:style=
"{ height: '100%' }"
>
<selectList
:listdata=
"columnsAccident"
@
closeSlect=
"closeSlectAccident"
@
saveSlect=
"saveSlectAccident"
>
</selectList>
</van-popup>
<van-popup
v-model=
"showSource"
position=
"bottom"
>
<van-popup
v-model=
"showSource"
position=
"bottom"
>
<van-picker
show-toolbar
value-key=
"name"
:columns=
"columnsSource"
@
confirm=
"onConSource"
<van-picker
show-toolbar
value-key=
"name"
:columns=
"columnsSource"
@
confirm=
"onConSource"
@
cancel=
"showSource = false"
/>
@
cancel=
"showSource = false"
/>
...
@@ -248,16 +263,21 @@
...
@@ -248,16 +263,21 @@
</div>
</div>
</div>
</div>
<!-- 风险源 -->
<!-- 风险源 -->
<van-popup
v-model=
"visiableSource"
round
position=
"bottom"
:style=
"{ height: '30%',display:'flex',flexDirection:'column', }"
>
<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=
"nameByselfInput"
>
输入风险源名称
</van-button>
<van-button
class=
"btns"
@
click=
"importFromList"
>
从风险清单导入
</van-button>
<van-button
class=
"btns"
@
click=
"importFromList"
>
从风险清单导入
</van-button>
<van-button
class=
"btns"
@
click=
"cancleSource"
>
取消
</van-button>
<van-button
class=
"btns"
@
click=
"cancleSource"
>
取消
</van-button>
</van-popup>
</van-popup>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
LHeader
from
"
@/components/header.vue
"
;
import
LHeader
from
"
@/components/header.vue
"
;
import
SelectList
from
"
@/components/selectList.vue
"
;
import
selectFloor
from
"
@/components/selectFloor.vue
"
;
import
{
timestampToTime
,
generateId
}
from
"
@/utils/format
"
;
// import selectPeople from "@/views/riskTask/selectPeople/index.vue";
// import selectPeople from "@/views/riskTask/selectPeople/index.vue";
import
{
getFun
,
postFun
}
from
"
@/service/table.js
"
;
import
{
getFun
,
postFun
}
from
"
@/service/table.js
"
;
// import {
// import {
...
@@ -273,23 +293,27 @@ export default {
...
@@ -273,23 +293,27 @@ export default {
name
:
"
addCurrent
"
,
name
:
"
addCurrent
"
,
components
:
{
components
:
{
LHeader
,
LHeader
,
SelectList
,
selectFloor
},
},
beforeRouteLeave
(
to
,
from
,
next
)
{
beforeRouteLeave
(
to
,
from
,
next
)
{
if
(
to
.
name
!=
"
matrix-grad
"
)
{
if
(
to
.
name
!=
"
matrix-grad
"
)
{
}
}
next
();
next
();
},
},
data
()
{
data
()
{
return
{
return
{
ShowfloorList
:
false
,
floorSource
:
[],
ShowAccidentList
:
false
,
ShowSelectList
:
false
,
columnsAccident
:
[],
inherentId
:
""
,
inherentId
:
""
,
text
:
"
编辑固有风险
"
,
text
:
"
编辑固有风险
"
,
id
:
""
,
id
:
""
,
isTimely
:
1
,
isTimely
:
1
,
active
:
0
,
active
:
0
,
form
:
{
form
:
{},
},
projectId
:
""
,
// 所属工程
projectId
:
""
,
// 所属工程
projectName
:
""
,
// 所属工程
projectName
:
""
,
// 所属工程
projectDirectorName
:
""
,
// 所属工程
projectDirectorName
:
""
,
// 所属工程
...
@@ -341,109 +365,116 @@ export default {
...
@@ -341,109 +365,116 @@ export default {
urgentImg
:
[],
//应急措施图片
urgentImg
:
[],
//应急措施图片
buildingIds
:
""
,
// 退回原因
buildingIds
:
""
,
// 退回原因
isShowreturnCause
:
false
,
isShowreturnCause
:
false
,
visiableSource
:
false
,
visiableSource
:
false
};
};
},
},
created
()
{
created
()
{
if
(
this
.
$route
.
params
.
inherentId
||
sessionStorage
.
getItem
(
"
inherentId
"
))
{
if
(
this
.
$route
.
params
.
inherentId
||
sessionStorage
.
getItem
(
"
inherentId
"
))
{
this
.
inherentId
=
this
.
$route
.
params
.
inherentId
||
sessionStorage
.
getItem
(
"
inherentId
"
)
this
.
inherentId
=
this
.
buildingIds
=
this
.
$route
.
params
.
buildingId
||
sessionStorage
.
getItem
(
"
buildingId
"
)
this
.
$route
.
params
.
inherentId
||
sessionStorage
.
getItem
(
"
inherentId
"
);
this
.
buildingIds
=
this
.
$route
.
params
.
buildingId
||
sessionStorage
.
getItem
(
"
buildingId
"
);
this
.
postReturnEcho
();
this
.
postReturnEcho
();
}
}
// this.getList();
this
.
getFloor
();
this
.
getFXYS
();
this
.
getZSGLX
();
},
},
methods
:
{
methods
:
{
timestampToTimes
(
time
)
{
return
timestampToTime
(
new
Date
(
time
),
"
DT2
"
,
true
);
},
tabList
(
value
)
{
tabList
(
value
)
{
console
.
log
(
'
%c [ value ]-527
'
,
'
font-size:13px; background:pink; color:#bf2c9f;
'
,
value
)
console
.
log
(
"
%c [ value ]-527
"
,
"
font-size:13px; background:pink; color:#bf2c9f;
"
,
value
);
if
(
value
==
1
)
{
if
(
value
==
1
)
{
this
.
getList
();
this
.
getList
();
}
}
},
},
seletFloor
(
name
)
{
getFloor
()
{
this
.
$toast
.
loading
({
getFun
(
`/risk/plan/floor/list/
${
this
.
buildingIds
}
`
)
message
:
"
加载中...
"
,
.
then
(
res
=>
{
forbidClick
:
true
,
// this.$toast.clear();
loadingType
:
"
spinner
"
,
// this.showSource = true;
duration
:
0
,
let
newArr
=
this
.
renameKeyInTree
(
res
.
data
,
"
name
"
,
"
text
"
);
this
.
floorSource
=
newArr
;
})
.
catch
(()
=>
{
// this.$toast.fail("加载失败,请稍后再试");
});
});
this
.
userPrefix
=
name
},
getFun
(
`/risk/plan/floor/list/
${
this
.
buildingIds
}
`
).
then
((
res
)
=>
{
getFXYS
()
{
this
.
$toast
.
clear
()
getFun
(
`/risk/plan/dict/data/list?dictType=risk_plan_factor`
)
this
.
showSource
=
true
.
then
(
res
=>
{
this
.
columnsSource
=
res
.
data
this
.
columnsTrouble
=
res
.
data
;
}).
catch
(()
=>
{
})
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
.
catch
(()
=>
{
// this.$toast.fail("加载失败,请稍后再试");
});
});
},
},
getZSGLX
()
{
getFun
(
`/risk/plan/dict/data/list?dictType=risk_plan_type`
)
.
then
(
res
=>
{
this
.
columnsAccident
=
res
.
data
;
})
.
catch
(()
=>
{
// this.$toast.fail("加载失败,请稍后再试");
});
},
seletFloor
(
name
)
{
this
.
ShowfloorList
=
true
;
this
.
userPrefix
=
name
;
},
seletRoom
(
name
)
{
seletRoom
(
name
)
{
this
.
$toast
.
loading
({
this
.
$toast
.
loading
({
message
:
"
加载中...
"
,
message
:
"
加载中...
"
,
forbidClick
:
true
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
loadingType
:
"
spinner
"
,
duration
:
0
,
duration
:
0
});
});
this
.
userPrefix
=
name
this
.
userPrefix
=
name
;
getFun
(
`/risk/plan/room/list/
${
this
.
form
.
floorId
}
`
).
then
((
res
)
=>
{
getFun
(
`/risk/plan/room/list/
${
this
.
form
.
floorId
}
`
)
this
.
$toast
.
clear
()
.
then
(
res
=>
{
this
.
showSource
=
true
this
.
$toast
.
clear
();
this
.
columnsSource
=
res
.
data
this
.
showSource
=
true
;
}).
catch
(()
=>
{
this
.
columnsSource
=
res
.
data
;
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
})
.
catch
(()
=>
{
// this.$toast.fail("加载失败,请稍后再试");
});
});
},
},
//风险因素
seletFactor
(
name
)
{
seletFactor
(
name
)
{
this
.
showTrouble
=
true
// this.showTrouble = true;
this
.
riskName
=
name
this
.
riskName
=
name
;
this
.
columnsTrouble
=
[
this
.
ShowSelectList
=
true
;
{
name
:
'
人的因素
'
,
},
{
name
:
'
物的因素
'
,
},
{
name
:
'
环境因素
'
,
},
{
name
:
'
管理因素
'
,
},
]
},
},
//准事故类型
seletType
(
name
)
{
seletType
(
name
)
{
this
.
showTrouble
=
true
// this.showTrouble = true;
this
.
riskName
=
name
this
.
riskName
=
name
;
this
.
columnsTrouble
=
[
this
.
ShowAccidentList
=
true
;
{
name
:
'
物体打击
'
,
},
{
name
:
'
车辆伤害
'
,
},
{
name
:
'
起重伤害
'
,
},
{
name
:
'
机械伤害
'
,
},
]
},
},
seletGrade
(
name
)
{
seletGrade
(
name
)
{
this
.
showTrouble
=
true
this
.
showTrouble
=
true
;
this
.
riskName
=
name
this
.
riskName
=
name
;
this
.
columnsTrouble
=
[
this
.
columnsTrouble
=
[
{
{
name
:
'
重大风险
'
,
name
:
"
重大风险
"
},
},
{
{
name
:
'
较大风险
'
,
name
:
"
较大风险
"
},
},
{
{
name
:
'
一般风险
'
,
name
:
"
一般风险
"
},
},
{
{
name
:
'
较小风险
'
,
name
:
"
较小风险
"
}
,
}
]
]
;
},
},
performTasks
()
{
performTasks
()
{
this
.
$router
.
push
({
this
.
$router
.
push
({
...
@@ -451,13 +482,16 @@ export default {
...
@@ -451,13 +482,16 @@ export default {
params
:
{
params
:
{
id
:
this
.
inherentId
,
id
:
this
.
inherentId
,
// planId:this.planId
// planId:this.planId
buildingId
:
this
.
buildingId
,
buildingId
:
this
.
buildingId
,
planId
:
this
.
inherentId
,
planId
:
this
.
inherentId
,
floorId
:
this
.
form
.
floorId
,
floorId
:
this
.
form
.
floorId
,
roomName
:
this
.
form
.
roomName
,
floorName
:
this
.
form
.
floorName
,
roomId
:
this
.
form
.
roomId
,
projectName
:
this
.
form
.
projectName
,
},
projectId
:
this
.
form
.
projectId
,
})
roomName
:
this
.
form
.
roomName
,
roomId
:
this
.
form
.
roomId
}
});
},
},
// 点击预览图
// 点击预览图
clickPre
(
e
)
{
clickPre
(
e
)
{
...
@@ -478,7 +512,7 @@ export default {
...
@@ -478,7 +512,7 @@ export default {
console
.
log
(
res
);
console
.
log
(
res
);
this
.
$toast
({
this
.
$toast
({
title
:
"
提示
"
,
title
:
"
提示
"
,
message
:
"
删除成功!
"
,
message
:
"
删除成功!
"
});
});
}
else
{
}
else
{
console
.
log
(
"
删除失败
"
);
console
.
log
(
"
删除失败
"
);
...
@@ -489,11 +523,11 @@ export default {
...
@@ -489,11 +523,11 @@ export default {
onSubmit
(
values
)
{
onSubmit
(
values
)
{
let
url
=
"
/riskMain/add
"
;
let
url
=
"
/riskMain/add
"
;
postReAdd
(
url
,
formdata
)
postReAdd
(
url
,
formdata
)
.
then
(
(
res
)
=>
{
.
then
(
res
=>
{
this
.
$toast
.
clear
();
this
.
$toast
.
clear
();
this
.
$toast
.
success
({
this
.
$toast
.
success
({
message
:
"
提交成功
"
,
message
:
"
提交成功
"
,
duration
:
2000
,
duration
:
2000
});
});
history
.
go
(
-
1
);
history
.
go
(
-
1
);
})
})
...
@@ -507,8 +541,12 @@ export default {
...
@@ -507,8 +541,12 @@ export default {
// 请求表单数据
// 请求表单数据
getList
()
{
getList
()
{
getFun
(
`/risk/plan/existing/list/
${
this
.
inherentId
}
`
)
getFun
(
`/risk/plan/existing/list/
${
this
.
inherentId
}
`
)
.
then
((
res
)
=>
{
.
then
(
res
=>
{
console
.
log
(
'
%c [ res ]-670
'
,
'
font-size:13px; background:pink; color:#bf2c9f;
'
,
res
)
console
.
log
(
"
%c [ res ]-670
"
,
"
font-size:13px; background:pink; color:#bf2c9f;
"
,
res
);
this
.
messageList
=
res
.
data
;
this
.
messageList
=
res
.
data
;
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
...
@@ -522,43 +560,41 @@ export default {
...
@@ -522,43 +560,41 @@ export default {
message
:
"
加载中...
"
,
message
:
"
加载中...
"
,
forbidClick
:
true
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
loadingType
:
"
spinner
"
,
duration
:
0
,
duration
:
0
});
});
getFun
(
`/risk/plan/inherent/details/
${
this
.
inherentId
}
`
)
getFun
(
`/risk/plan/inherent/details/
${
this
.
inherentId
}
`
)
.
then
((
res
)
=>
{
.
then
(
res
=>
{
this
.
form
=
res
.
data
this
.
form
=
res
.
data
;
this
.
uploaderImg
=
(
res
.
data
.
pictureFile
||
[]).
map
(
this
.
uploaderImg
=
(
res
.
data
.
pictureFile
||
[]).
map
(
item
=>
{
(
item
)
=>
{
return
{
return
{
...
item
,
...
item
,
url
:
item
.
filePath
,
url
:
item
.
filePath
};
};
}
});
);
this
.
measuresProjectFile
=
(
res
.
data
.
measuresProjectFile
||
[]).
map
(
this
.
measuresProjectFile
=
(
res
.
data
.
measuresProjectFile
||
[]).
map
(
(
item
)
=>
{
item
=>
{
return
{
return
{
...
item
,
...
item
,
url
:
item
.
filePath
,
url
:
item
.
filePath
};
};
}
}
);
);
this
.
measuresAdministrationFile
=
(
res
.
data
.
measuresAdministrationFile
||
[]).
map
(
this
.
measuresAdministrationFile
=
(
(
item
)
=>
{
res
.
data
.
measuresAdministrationFile
||
[]
).
map
(
item
=>
{
return
{
return
{
...
item
,
...
item
,
url
:
item
.
filePath
,
url
:
item
.
filePath
};
};
}
});
);
this
.
measuresEmergencyFile
=
(
this
.
measuresEmergencyFile
=
(
res
.
data
.
measuresEmergencyFile
||
[]).
map
(
res
.
data
.
measuresEmergencyFile
||
[]
(
item
)
=>
{
).
map
(
item
=>
{
return
{
return
{
...
item
,
...
item
,
url
:
item
.
filePath
,
url
:
item
.
filePath
};
};
}
});
);
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
this
.
$toast
.
clear
();
this
.
$toast
.
clear
();
...
@@ -587,7 +623,7 @@ export default {
...
@@ -587,7 +623,7 @@ export default {
this
.
trouble
=
""
;
this
.
trouble
=
""
;
// 请求风险源
// 请求风险源
postHdSource
(
`/riskMain/showSourceName?factorType=
${
this
.
factor
}
`
).
then
(
postHdSource
(
`/riskMain/showSourceName?factorType=
${
this
.
factor
}
`
).
then
(
(
res
)
=>
{
res
=>
{
this
.
columnsSource
=
res
.
data
;
this
.
columnsSource
=
res
.
data
;
}
}
);
);
...
@@ -603,19 +639,15 @@ export default {
...
@@ -603,19 +639,15 @@ export default {
this
.
showSource
=
false
;
this
.
showSource
=
false
;
},
},
seletSource
()
{
seletSource
()
{
this
.
visiableSource
=
true
this
.
visiableSource
=
true
;
},
},
//从风险清单列表导入
//从风险清单列表导入
importFromList
(){
importFromList
()
{
},
},
//输入风险源名称
//输入风险源名称
nameByselfInput
(){
nameByselfInput
()
{
},
},
//取消风险弹窗
//取消风险弹窗
cancleSource
(){
cancleSource
()
{
this
.
visiableSource
=
false
this
.
visiableSource
=
false
;
},
},
// 事故类型
// 事故类型
...
@@ -626,7 +658,6 @@ export default {
...
@@ -626,7 +658,6 @@ export default {
}
}
this
.
form
[
this
.
riskName
]
=
value
.
name
;
this
.
form
[
this
.
riskName
]
=
value
.
name
;
this
.
showTrouble
=
false
;
this
.
showTrouble
=
false
;
},
},
// 风险定级
// 风险定级
onConSetRank
(
value
)
{
onConSetRank
(
value
)
{
...
@@ -636,7 +667,7 @@ export default {
...
@@ -636,7 +667,7 @@ export default {
if
(
this
.
setRank
==
"
矩阵式定级
"
)
{
if
(
this
.
setRank
==
"
矩阵式定级
"
)
{
this
.
showSetRank
=
false
;
this
.
showSetRank
=
false
;
this
.
$router
.
push
({
this
.
$router
.
push
({
name
:
"
matrix-grad
"
,
name
:
"
matrix-grad
"
});
});
}
}
},
},
...
@@ -668,7 +699,7 @@ export default {
...
@@ -668,7 +699,7 @@ export default {
// 请求主责人员
// 请求主责人员
let
formdata
=
new
FormData
();
let
formdata
=
new
FormData
();
formdata
.
append
(
"
organizationId
"
,
this
.
mainDutyDeptId
);
formdata
.
append
(
"
organizationId
"
,
this
.
mainDutyDeptId
);
postHdPeople
(
`/riskMain/getUserList`
,
formdata
).
then
(
(
res
)
=>
{
postHdPeople
(
`/riskMain/getUserList`
,
formdata
).
then
(
res
=>
{
this
.
columnsMainDutyPeopLe
=
res
.
data
;
this
.
columnsMainDutyPeopLe
=
res
.
data
;
});
});
},
},
...
@@ -685,17 +716,39 @@ export default {
...
@@ -685,17 +716,39 @@ export default {
// 选择作业人
// 选择作业人
goSelPeoTwo
(
val
)
{
goSelPeoTwo
(
val
)
{
this
.
peopleName
=
val
this
.
peopleName
=
val
;
this
.
show
=
true
;
this
.
show
=
true
;
},
},
onClose
()
{
onClose
()
{
this
.
show
=
false
;
this
.
show
=
false
;
},
},
onSave
(
e
)
{
onSave
(
e
)
{
this
.
projectDirector
=
e
[
0
].
loginName
this
.
projectDirector
=
e
[
0
].
loginName
;
this
.
projectDirectorName
=
e
[
0
].
userName
this
.
projectDirectorName
=
e
[
0
].
userName
;
this
.
show
=
false
;
this
.
show
=
false
;
},
},
closeSlectfloor
()
{
this
.
ShowfloorList
=
false
;
},
saveSlectfloor
(
data
)
{
this
.
form
.
floorId
=
data
.
id
;
this
.
form
.
floorName
=
data
.
text
;
this
.
ShowfloorList
=
false
;
},
closeSlect
()
{
this
.
ShowSelectList
=
false
;
},
saveSlect
(
data
)
{
this
.
form
.
factor
=
data
.
join
(
"
,
"
);
this
.
ShowSelectList
=
false
;
},
closeSlectAccident
()
{
this
.
ShowAccidentList
=
false
;
},
saveSlectAccident
(
data
)
{
this
.
form
.
type
=
data
.
join
(
"
,
"
);
this
.
ShowAccidentList
=
false
;
},
},
},
watch
:
{
watch
:
{
// setRank(newVal, oldVal) {
// setRank(newVal, oldVal) {
...
@@ -705,7 +758,7 @@ export default {
...
@@ -705,7 +758,7 @@ export default {
// this.showSetRankMode = false;
// this.showSetRankMode = false;
// }
// }
// },
// },
}
,
}
};
};
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
...
@@ -744,10 +797,11 @@ export default {
...
@@ -744,10 +797,11 @@ export default {
}
}
}
}
}
}
.btns{
margin:10px 10px 0 10px;
.btns {
border:none;
margin: 10px 10px 0 10px;
border: none;
border-bottom: 1px solid #efefef;
border-bottom: 1px solid #efefef;
color: #2980
F
7;
color: #2980
f
7;
}
}
</
style
>
</
style
>
src/views/riskProject/add/addInherent.vue
View file @
98dcf66f
<
template
>
<
template
>
<div>
<div>
<LHeader
:text=
"text"
></LHeader>
<LHeader
:text=
"text"
></LHeader>
<van-form
@
submit=
"onSubmit"
:scroll-to-error=
"true"
:show-error=
"false"
validate-trigger=
"onSubmit"
>
<van-form
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
@
submit=
"onSubmit"
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
:scroll-to-error=
"true"
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
:show-error=
"false"
validate-trigger=
"onSubmit"
>
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
风险信息
风险信息
</div>
</div>
<van-field
readonly
required
name=
"userName"
:value=
"form.userName"
label=
"评估人"
placeholder=
"请输入"
/>
<van-field
<van-field
readonly
required
name=
"projectId"
:value=
"form.projectId"
label=
"所属项目"
placeholder=
"请输入"
/>
readonly
<van-field
readonly
required
name=
"buildingName"
:value=
"form.buildingName"
label=
"所属建筑物"
placeholder=
"请输入"
/>
required
name=
"userName"
:value=
"form.userName"
label=
"评估人"
placeholder=
"请输入"
/>
<van-field
readonly
required
name=
"projectId"
:value=
"form.projectId"
label=
"所属项目"
placeholder=
"请输入"
/>
<van-field
readonly
required
name=
"buildingName"
:value=
"form.buildingName"
label=
"所属建筑物"
placeholder=
"请输入 "
/>
<van-field
required
clickable
name=
"floorName"
:value=
"form.floorName"
label=
"所属楼层"
placeholder=
"请选择"
<van-field
@
click=
"seletFloor('floor')"
:rules=
"[
{ required: true, message: '所属楼层不能为空' }]" />
required
clickable
name=
"floorName"
:value=
"form.floorName"
label=
"所属楼层"
placeholder=
"请选择"
@
click=
"seletFloor('floor')"
:rules=
"[
{ required: true, message: '所属楼层不能为空' }]"
/>
<div
style=
"display: flex;"
>
<div
style=
"display: flex;"
>
<van-field
readonly
required
name=
"roomName"
:value=
"form.roomName"
label=
"所属房间"
placeholder=
"请输入"
<van-field
@
click=
"seletRoom('room')"
:rules=
"[
{ required: true, message: '所属房间不能为空' }]" />
readonly
<van-button
style=
"color: #cccc;background-color: #f0f1f5;"
icon=
"plus"
type=
"info"
native-type=
"button"
required
@
click=
"tjfjClcik"
/>
name=
"roomName"
:value=
"form.roomName"
label=
"所属房间"
placeholder=
"请输入"
@
click=
"seletRoom('room')"
:rules=
"[
{ required: true, message: '所属房间不能为空' }]"
/>
<van-button
style=
"color: #cccc;background-color: #f0f1f5;"
icon=
"plus"
type=
"info"
native-type=
"button"
@
click=
"tjfjClcik"
/>
</div>
</div>
<van-field
required
clickable
name=
"name"
v-model=
"form.name"
label=
"风险源名称"
placeholder=
"请输入"
<van-field
:rules=
"[
{ required: true, message: '风险源名称不能为空' }]" />
required
<van-field
v-model=
"form.factor"
readonly
required
name=
"factor"
label=
"风险因素"
placeholder=
"请选择"
clickable
@
click=
"seletFactor('factor')"
:rules=
"[
{ required: true, message: '风险因素不能为空' }]" />
name=
"name"
v-model=
"form.name"
label=
"风险源名称"
placeholder=
"请输入"
:rules=
"[
{ required: true, message: '风险源名称不能为空' }]"
/>
<van-field
v-model=
"form.factor"
readonly
required
name=
"factor"
label=
"风险因素"
placeholder=
"请选择"
@
click=
"seletFactor('factor')"
:rules=
"[
{ required: true, message: '风险因素不能为空' }]"
/>
<van-field
readonly
v-model=
"form.type"
required
name=
"type"
label=
"准事故类型"
placeholder=
"请选择"
<van-field
@
click=
"seletType('type')"
:rules=
"[
{ required: true, message: '准事故类型不能为空' }]" />
readonly
v-model=
"form.type"
required
name=
"type"
label=
"准事故类型"
placeholder=
"请选择"
@
click=
"seletType('type')"
:rules=
"[
{ required: true, message: '准事故类型不能为空' }]"
/>
<van-field
readonly
v-model=
"form.level"
required
name=
"level"
label=
"风险等级"
placeholder=
"请选择"
@
click=
"seletGrade"
<van-field
:rules=
"[
{ required: true, message: '风险等级不能为空' }]" />
readonly
v-model=
"form.level"
required
name=
"level"
label=
"风险等级"
placeholder=
"请选择"
@
click=
"seletGrade"
:rules=
"[
{ required: true, message: '风险等级不能为空' }]"
/>
<!--
<van-field
readonly
v-model=
"form.level"
required
name=
"level"
label=
"风险等级"
placeholder=
"请选择"
<!--
<van-field
readonly
v-model=
"form.level"
required
name=
"level"
label=
"风险等级"
placeholder=
"请选择"
@
click=
"seletGrade('level')"
:rules=
"[
{ required: true, message: '风险等级不能为空' }]" /> -->
@
click=
"seletGrade('level')"
:rules=
"[
{ required: true, message: '风险等级不能为空' }]" /> -->
<van-field
required
name=
"presenceLocation"
v-model=
"form.presenceLocation"
label=
"存在部位"
placeholder=
"请输入"
<van-field
:rules=
"[
{ required: true, message: '存在部位不能为空' }]" />
required
name=
"presenceLocation"
v-model=
"form.presenceLocation"
label=
"存在部位"
placeholder=
"请输入"
:rules=
"[
{ required: true, message: '存在部位不能为空' }]"
/>
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<div
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
风险源图片
风险源图片
</div>
</div>
<van-field
name=
"hdPicture1"
label=
"风险源图片"
>
<van-field
name=
"hdPicture1"
label=
"风险源图片"
>
<template
#input
>
<template
#input
>
<van-uploader
@
delete=
"deleteFile(...arguments, 'uploaderImg')"
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
<van-uploader
v-model=
"uploaderImg"
>
@
delete=
"deleteFile(...arguments, 'uploaderImg')"
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"uploaderImg"
>
<template
slot=
"default"
>
<template
slot=
"default"
>
<!-- 11111111111 -->
<!-- 11111111111 -->
<div
style=
"
<div
style=
"
width: 2.13333rem;
width: 2.13333rem;
height: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
background: #f7f8fa;
...
@@ -56,28 +156,53 @@
...
@@ -56,28 +156,53 @@
align-items: center;
align-items: center;
justify-content: center;
justify-content: center;
flex-direction: column;
flex-direction: column;
"
>
"
<img
src=
"@/assets/upload/pic.png"
alt=
""
style=
"width: 0.64rem; height: 0.64rem"
/>
>
<img
src=
"@/assets/upload/pic.png"
alt=
""
style=
"width: 0.64rem; height: 0.64rem"
/>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
</div>
</div>
</
template
>
</
template
>
</van-uploader>
</van-uploader>
</template>
</template>
</van-field>
</van-field>
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<div
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
技术措施
技术措施
</div>
</div>
<van-field
v-model=
"form.measuresProject"
name=
"measuresProject"
label=
"技术措施"
type=
"textarea"
rows=
"1"
autosize
<van-field
placeholder=
"请输入"
/>
v-model=
"form.measuresProject"
name=
"measuresProject"
label=
"技术措施"
type=
"textarea"
rows=
"1"
autosize
placeholder=
"请输入"
/>
<van-field
name=
"measuresProjectFile[]"
label=
" "
>
<van-field
name=
"measuresProjectFile[]"
label=
" "
>
<
template
#input
>
<
template
#input
>
<van-uploader
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresProjectFile"
accept=
"file"
<van-uploader
result-type=
"file"
@
delete=
"deleteFile(...arguments, 'measuresProjectFile')"
>
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresProjectFile"
accept=
"file"
result-type=
"file"
@
delete=
"deleteFile(...arguments, 'measuresProjectFile')"
>
<template
slot=
"default"
>
<template
slot=
"default"
>
<!-- 11111111111 -->
<!-- 11111111111 -->
<div
style=
"
<div
style=
"
width: 2.13333rem;
width: 2.13333rem;
height: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
background: #f7f8fa;
...
@@ -85,45 +210,53 @@
...
@@ -85,45 +210,53 @@
align-items: center;
align-items: center;
justify-content: center;
justify-content: center;
flex-direction: column;
flex-direction: column;
"
>
"
<img
src=
"@/assets/upload/file.png"
alt=
""
style=
"width: 0.64rem; height: 0.64rem"
/>
>
<img
src=
"@/assets/upload/file.png"
alt=
""
style=
"width: 0.64rem; height: 0.64rem"
/>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
</div>
</div>
</
template
>
</
template
>
</van-uploader>
</van-uploader>
</template>
</template>
</van-field>
</van-field>
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<div
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
>
应采取的管控措施
<img
</div>
src=
"@/assets/accidentIcon/bookmark.svg"
<van-field
v-model=
"form.measuresAdministration"
name=
"measuresAdministration"
label=
""
type=
"textarea"
rows=
"3"
alt=
""
autosize
placeholder=
"请输入"
/>
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=
"3"
autosize
placeholder=
"请输入"
/>
<van-field
readonly
required
clickable
name=
"trouble"
:value=
"form.trouble"
label=
"管控责任单位"
placeholder=
"请选择"
@
click=
"showTrouble = true"
:rules=
"[{ required: true, message: '管控责任单位不能为空' }]"
/>
<van-field
readonly
required
clickable
name=
"trouble"
:value=
"form.trouble"
label=
"管控责任人"
placeholder=
"请选择"
@
click=
"showTrouble = true"
:rules=
"[{ required: true, message: '管控责任人不能为空' }]"
/>
<!-- <div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;">
<img src="@/assets/accidentIcon/bookmark.svg" alt=""
style="position: relative;top: 32%;transform: translateY(-50%);" />
管理措施
管理措施
</div> -->
</div>
<van-field
v-model=
"form.measuresAdministration"
name=
"measuresAdministration"
label=
"上传附件"
type=
"textarea"
rows=
"1"
<van-field
autosize
placeholder=
"请输入"
/>
v-model=
"form.measuresAdministration"
<!-- <van-field name="measuresAdministrationFile[]" label=" ">
name=
"measuresAdministration"
label=
"管理措施"
type=
"textarea"
rows=
"1"
autosize
placeholder=
"请输入"
/>
<van-field
name=
"measuresAdministrationFile[]"
label=
" "
>
<
template
#input
>
<
template
#input
>
<van-uploader multiple :max-count="5" upload-text="最多上传五个" v-model="measuresAdministrationFile" accept="file"
<van-uploader
result-type="file" @delete="deleteFile(...arguments, 'measuresAdministrationFile')">
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresAdministrationFile"
accept=
"file"
result-type=
"file"
@
delete=
"deleteFile(...arguments, 'measuresAdministrationFile')"
>
<template
slot=
"default"
>
<template
slot=
"default"
>
<div style="
<!-- 11111111111 -->
<div
style=
"
width: 2.13333rem;
width: 2.13333rem;
height: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
background: #f7f8fa;
...
@@ -131,34 +264,53 @@
...
@@ -131,34 +264,53 @@
align-items: center;
align-items: center;
justify-content: center;
justify-content: center;
flex-direction: column;
flex-direction: column;
">
"
<img src="@/assets/upload/file.png" alt="" style="width: 0.64rem; height: 0.64rem" />
>
<img
src=
"@/assets/upload/file.png"
alt=
""
style=
"width: 0.64rem; height: 0.64rem"
/>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
</div>
</div>
</
template
>
</
template
>
</van-uploader>
</van-uploader>
</template>
</template>
</van-field> -->
</van-field>
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<div
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
>
重大危险源描述
<img
</div>
src=
"@/assets/accidentIcon/bookmark.svg"
<van-field
v-model=
"form.measuresEmergency"
name=
"measuresEmergency"
label=
""
type=
"textarea"
rows=
"3"
autosize
alt=
""
placeholder=
"请输入"
/>
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>
</div>
<van-field
v-model=
"form.measuresEmergency"
name=
"measuresEmergency"
label=
"应急措施"
type=
"textarea"
rows=
"1"
autosize
<van-field
placeholder=
"请输入"
/>
v-model=
"form.measuresEmergency"
name=
"measuresEmergency"
label=
"应急措施"
type=
"textarea"
rows=
"1"
autosize
placeholder=
"请输入"
/>
<van-field
name=
"measuresEmergencyFile[]"
label=
" "
>
<van-field
name=
"measuresEmergencyFile[]"
label=
" "
>
<
template
#input
>
<
template
#input
>
<van-uploader
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresEmergencyFile"
accept=
"file"
<van-uploader
result-type=
"file"
@
delete=
"deleteFile(...arguments, 'measuresEmergencyFile')"
>
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresEmergencyFile"
accept=
"file"
result-type=
"file"
@
delete=
"deleteFile(...arguments, 'measuresEmergencyFile')"
>
<template
slot=
"default"
>
<template
slot=
"default"
>
<div
style=
"
<!-- 11111111111 -->
<div
style=
"
width: 2.13333rem;
width: 2.13333rem;
height: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
background: #f7f8fa;
...
@@ -166,76 +318,182 @@
...
@@ -166,76 +318,182 @@
align-items: center;
align-items: center;
justify-content: center;
justify-content: center;
flex-direction: column;
flex-direction: column;
"
>
"
<img
src=
"@/assets/upload/file.png"
alt=
""
style=
"width: 0.64rem; height: 0.64rem"
/>
>
<img
src=
"@/assets/upload/file.png"
alt=
""
style=
"width: 0.64rem; height: 0.64rem"
/>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
</div>
</div>
</
template
>
</
template
>
</van-uploader>
</van-uploader>
</template>
</template>
</van-field>
</van-field>
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<div
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
参考依据
参考依据
</div>
</div>
<van-field
readonly
required
clickable
name=
"trouble"
:value=
"form.trouble"
label=
"参考依据"
placeholder=
"请选择"
<!-- <van-field
@
click=
"showTrouble = true"
:rules=
"[{ required: true, message: '事故类型不能为空' }]"
/>
readonly
<van-dialog
v-model=
"showGradeDialog"
title=
"风险评测配置"
:show-cancel-button=
"false"
:show-confirm-button=
"false"
>
required
clickable
name="trouble"
:value="form.trouble"
label="参考依据"
placeholder="请选择"
@click="showTrouble = true"
:rules="[{ required: true, message: '事故类型不能为空' }]"
/> -->
<van-dialog
v-model=
"showGradeDialog"
title=
"风险评测配置"
:show-cancel-button=
"false"
:show-confirm-button=
"false"
>
<div
class=
"dialogContain"
>
<div
class=
"dialogContain"
>
<van-collapse
v-model=
"activeNames"
>
<van-collapse
v-model=
"activeNames"
>
<van-collapse-item
title=
"风险模型"
name=
"1"
>
<van-collapse-item
title=
"风险模型"
name=
"1"
>
<van-field
readonly
required
name=
"level"
label=
"当前风险模型"
placeholder=
"LS风险矩阵评估模型"
/>
<van-field
readonly
required
name=
"level"
label=
"当前风险模型"
placeholder=
"LS风险矩阵评估模型"
/>
</van-collapse-item>
</van-collapse-item>
<van-collapse-item
title=
"风险模型配置"
name=
"2"
>
<van-collapse-item
title=
"风险模型配置"
name=
"2"
>
<van-popover
v-model=
"showPopover"
trigger=
"click"
:actions=
"columnsRiskRank"
@
select=
"onSelect"
>
<van-popover
v-model=
"showPopover"
trigger=
"click"
:actions=
"columnsRiskRank"
@
select=
"onSelect"
>
<
template
#reference
>
<
template
#reference
>
<van-field
v-model=
"possibleValue"
readonly
required
name=
"level"
label=
"发生的可能性"
placeholder=
"请选择"
/>
<van-field
v-model=
"possibleValue"
readonly
required
name=
"level"
label=
"发生的可能性"
placeholder=
"请选择"
/>
</
template
>
</
template
>
</van-popover>
</van-popover>
<van-popover
v-model=
"showPopoveSetRank"
trigger=
"click"
:actions=
"columnsSetRank"
<van-popover
@
select=
"onSelectSetRank"
>
v-model=
"showPopoveSetRank"
trigger=
"click"
:actions=
"columnsSetRank"
@
select=
"onSelectSetRank"
>
<
template
#reference
>
<
template
#reference
>
<van-field
v-model=
"severityValue"
readonly
required
name=
"level"
label=
"后果严重程度"
placeholder=
"请选择"
/>
<van-field
v-model=
"severityValue"
readonly
required
name=
"level"
label=
"后果严重程度"
placeholder=
"请选择"
/>
</
template
>
</
template
>
</van-popover>
</van-popover>
</van-collapse-item>
</van-collapse-item>
</van-collapse>
</van-collapse>
<van-row
type=
"flex"
justify=
"center"
style=
"margin-top:10px"
>
<van-row
type=
"flex"
justify=
"center"
style=
"margin-top:10px"
>
<van-col
span=
"6"
><van-button
size=
"small"
plain
native-type=
"button"
type=
"info"
<van-col
span=
"6"
@
click=
"showGradeDialog = false"
>
取消
</van-button></van-col>
><van-button
<van-col
span=
"6"
><van-button
size=
"small"
type=
"info"
native-type=
"button"
size=
"small"
@
click=
"goResultPage"
>
开始测评
</van-button></van-col>
plain
native-type=
"button"
type=
"info"
@
click=
"showGradeDialog = false"
>
取消
</van-button
></van-col
>
<van-col
span=
"6"
><van-button
size=
"small"
type=
"info"
native-type=
"button"
@
click=
"goResultPage"
>
开始测评
</van-button
></van-col
>
</van-row>
</van-row>
</div>
</div>
</van-dialog>
</van-dialog>
<van-popup
v-model=
"showTrouble"
position=
"bottom"
>
<van-popup
v-model=
"showTrouble"
position=
"bottom"
>
<van-picker
show-toolbar
value-key=
"name"
:columns=
"columnsTrouble"
@
confirm=
"onConTrouble"
<van-picker
@
cancel=
"showTrouble = false"
/>
show-toolbar
value-key=
"name"
:columns=
"columnsTrouble"
@
confirm=
"onConTrouble"
@
cancel=
"showTrouble = false"
/>
</van-popup>
</van-popup>
<van-popup
v-model=
"showSource"
position=
"bottom"
>
<van-popup
v-model=
"showSource"
position=
"bottom"
>
<van-picker
show-toolbar
value-key=
"name"
:columns=
"columnsSource"
@
confirm=
"onConSource"
<van-picker
@
cancel=
"showSource = false"
/>
show-toolbar
value-key=
"name"
:columns=
"columnsSource"
@
confirm=
"onConSource"
@
cancel=
"showSource = false"
/>
</van-popup>
</van-popup>
<!-- 楼层弹出层 -->
<!-- 楼层弹出层 -->
<van-popup
v-model=
"ShowfloorList"
position=
"bottom"
:style=
"{ height: '100%' }"
>
<van-popup
<selectFloor
:listdata=
"floorSource"
@
closeSlect=
"closeSlectfloor"
@
saveSlect=
"saveSlectfloor"
></selectFloor>
v-model=
"ShowfloorList"
position=
"bottom"
:style=
"{ height: '100%' }"
>
<selectFloor
:listdata=
"floorSource"
@
closeSlect=
"closeSlectfloor"
@
saveSlect=
"saveSlectfloor"
></selectFloor>
</van-popup>
</van-popup>
<!-- 风险源弹出层 -->
<!-- 风险源弹出层 -->
<van-popup
v-model=
"ShowSelectList"
position=
"bottom"
:style=
"{ height: '100%' }"
>
<van-popup
<selectList
:listdata=
"columnsTrouble"
@
closeSlect=
"closeSlect"
@
saveSlect=
"saveSlect"
></selectList>
v-model=
"ShowSelectList"
position=
"bottom"
:style=
"{ height: '100%' }"
>
<selectList
:listdata=
"columnsTrouble"
@
closeSlect=
"closeSlect"
@
saveSlect=
"saveSlect"
></selectList>
</van-popup>
</van-popup>
<!-- 准事故类型 -->
<!-- 准事故类型 -->
<van-popup
v-model=
"ShowAccidentList"
position=
"bottom"
:style=
"{ height: '100%' }"
>
<van-popup
<selectList
:listdata=
"columnsAccident"
@
closeSlect=
"closeSlectAccident"
@
saveSlect=
"saveSlectAccident"
>
v-model=
"ShowAccidentList"
position=
"bottom"
:style=
"{ height: '100%' }"
>
<selectList
:listdata=
"columnsAccident"
@
closeSlect=
"closeSlectAccident"
@
saveSlect=
"saveSlectAccident"
>
</selectList>
</selectList>
</van-popup>
</van-popup>
<div
style=
"margin: 16px 16px 0"
>
<div
style=
"margin: 16px 16px 0"
>
<van-button
round
block
type=
"info"
native-type=
"submit"
>
上报
</van-button>
<van-button
round
block
type=
"info"
native-type=
"submit"
>
提交
</van-button
>
</div>
</div>
</van-form>
</van-form>
<div
style=
"margin: 10px 16px 0px; padding-bottom: 16px"
>
<div
style=
"margin: 10px 16px 0px; padding-bottom: 16px"
>
<van-button
round
block
type=
"warning"
@
click.native=
"cancel"
>
取消
</van-button>
<van-button
round
block
type=
"warning"
@
click.native=
"cancel"
>
取消
</van-button
>
</div>
</div>
</div>
</div>
</template>
</template>
...
@@ -287,15 +545,15 @@ export default {
...
@@ -287,15 +545,15 @@ export default {
});
});
},
},
beforeRouteEnter
(
to
,
from
,
next
)
{
beforeRouteEnter
(
to
,
from
,
next
)
{
if
(
from
.
name
==
'
riskInherent
'
)
{
if
(
from
.
name
==
"
riskInherent
"
)
{
sessionStorage
.
setItem
(
'
inherenForm
'
,
''
)
sessionStorage
.
setItem
(
"
inherenForm
"
,
""
);
sessionStorage
.
setItem
(
'
level
'
,
''
)
sessionStorage
.
setItem
(
"
level
"
,
""
);
}
}
next
()
next
()
;
},
},
beforeRouteLeave
(
to
,
from
,
next
)
{
beforeRouteLeave
(
to
,
from
,
next
)
{
if
(
to
.
name
!=
"
riskInherent
"
)
{
if
(
to
.
name
!=
"
riskInherent
"
)
{
sessionStorage
.
setItem
(
'
inherenForm
'
,
JSON
.
stringify
(
this
.
form
))
sessionStorage
.
setItem
(
"
inherenForm
"
,
JSON
.
stringify
(
this
.
form
));
}
}
next
();
next
();
},
},
...
@@ -391,33 +649,33 @@ export default {
...
@@ -391,33 +649,33 @@ export default {
this
.
form
.
userId
=
userInfo
.
userId
;
this
.
form
.
userId
=
userInfo
.
userId
;
this
.
form
.
userName
=
userInfo
.
userName
;
this
.
form
.
userName
=
userInfo
.
userName
;
this
.
form
.
deptName
=
userInfo
.
dept
.
deptName
;
this
.
form
.
deptName
=
userInfo
.
dept
.
deptName
;
(
this
.
form
.
projectId
=
"
测试项目
"
)
this
.
form
.
projectId
=
"
测试项目
"
;
},
},
mounted
()
{
mounted
()
{
if
(
sessionStorage
.
getItem
(
'
inherenForm
'
)
!=
''
)
{
if
(
sessionStorage
.
getItem
(
"
inherenForm
"
)
!=
""
)
{
this
.
form
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'
inherenForm
'
))
this
.
form
=
JSON
.
parse
(
sessionStorage
.
getItem
(
"
inherenForm
"
));
this
.
form
.
level
=
sessionStorage
.
getItem
(
'
level
'
)
this
.
form
.
level
=
sessionStorage
.
getItem
(
"
level
"
);
}
}
this
.
getFloor
()
this
.
getFloor
();
this
.
getFXYS
()
this
.
getFXYS
();
this
.
getZSGLX
()
this
.
getZSGLX
();
},
},
methods
:
{
methods
:
{
renameKeyInTree
(
data
,
oldKey
,
newKey
)
{
renameKeyInTree
(
data
,
oldKey
,
newKey
)
{
let
arr
=
data
.
map
(
item
=>
{
let
arr
=
data
.
map
(
item
=>
{
const
newItem
=
{
...
item
};
const
newItem
=
{
...
item
};
if
(
item
.
hasOwnProperty
(
oldKey
))
{
if
(
item
.
hasOwnProperty
(
oldKey
))
{
newItem
[
newKey
]
=
newItem
[
oldKey
];
newItem
[
newKey
]
=
newItem
[
oldKey
];
delete
newItem
[
oldKey
];
delete
newItem
[
oldKey
];
}
}
if
(
newItem
.
children
&&
newItem
.
children
.
length
>
0
)
{
if
(
newItem
.
children
&&
newItem
.
children
.
length
>
0
)
{
newItem
.
children
=
this
.
renameKeyInTree
(
newItem
.
children
=
this
.
renameKeyInTree
(
newItem
.
children
,
oldKey
,
newKey
);
newItem
.
children
,
oldKey
,
newKey
);
}
}
return
newItem
;
return
newItem
;
});
});
...
@@ -429,9 +687,9 @@ export default {
...
@@ -429,9 +687,9 @@ export default {
.
then
(
res
=>
{
.
then
(
res
=>
{
// this.$toast.clear();
// this.$toast.clear();
// this.showSource = true;
// this.showSource = true;
let
newArr
=
this
.
renameKeyInTree
(
res
.
data
,
'
name
'
,
'
text
'
)
this
.
floorSource
=
newArr
;
let
newArr
=
this
.
renameKeyInTree
(
res
.
data
,
"
name
"
,
"
text
"
);
this
.
floorSource
=
newArr
;
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
...
@@ -462,9 +720,8 @@ export default {
...
@@ -462,9 +720,8 @@ export default {
// loadingType: "spinner",
// loadingType: "spinner",
// duration: 0
// duration: 0
// });
// });
this
.
ShowfloorList
=
true
this
.
ShowfloorList
=
true
;
this
.
userPrefix
=
name
;
this
.
userPrefix
=
name
;
},
},
seletRoom
(
name
)
{
seletRoom
(
name
)
{
this
.
$toast
.
loading
({
this
.
$toast
.
loading
({
...
@@ -488,14 +745,13 @@ export default {
...
@@ -488,14 +745,13 @@ export default {
seletFactor
(
name
)
{
seletFactor
(
name
)
{
// this.showTrouble = true;
// this.showTrouble = true;
this
.
riskName
=
name
;
this
.
riskName
=
name
;
this
.
ShowSelectList
=
true
this
.
ShowSelectList
=
true
;
},
},
//准事故类型
//准事故类型
seletType
(
name
)
{
seletType
(
name
)
{
// this.showTrouble = true;
// this.showTrouble = true;
this
.
riskName
=
name
;
this
.
riskName
=
name
;
this
.
ShowAccidentList
=
true
this
.
ShowAccidentList
=
true
;
},
},
//风险等级
//风险等级
seletGrade
(
name
)
{
seletGrade
(
name
)
{
...
@@ -530,25 +786,26 @@ export default {
...
@@ -530,25 +786,26 @@ export default {
// })
// })
// },
// },
closeSlectfloor
()
{
closeSlectfloor
()
{
this
.
ShowfloorList
=
false
this
.
ShowfloorList
=
false
;
},
},
saveSlectfloor
(
data
)
{
saveSlectfloor
(
data
)
{
this
.
form
.
floorName
=
data
.
text
this
.
form
.
floorId
=
data
.
id
;
this
.
ShowfloorList
=
false
this
.
form
.
floorName
=
data
.
text
;
this
.
ShowfloorList
=
false
;
},
},
closeSlect
()
{
closeSlect
()
{
this
.
ShowSelectList
=
false
this
.
ShowSelectList
=
false
;
},
},
saveSlect
(
data
)
{
saveSlect
(
data
)
{
this
.
form
.
factor
=
data
.
join
(
'
,
'
);
this
.
form
.
factor
=
data
.
join
(
"
,
"
);
this
.
ShowSelectList
=
false
this
.
ShowSelectList
=
false
;
},
},
closeSlectAccident
()
{
closeSlectAccident
()
{
this
.
ShowAccidentList
=
false
this
.
ShowAccidentList
=
false
;
},
},
saveSlectAccident
(
data
)
{
saveSlectAccident
(
data
)
{
this
.
form
.
type
=
data
.
join
(
'
,
'
);
this
.
form
.
type
=
data
.
join
(
"
,
"
);
this
.
ShowAccidentList
=
false
this
.
ShowAccidentList
=
false
;
},
},
onSelect
(
data
)
{
onSelect
(
data
)
{
this
.
possibleValue
=
data
.
text
;
this
.
possibleValue
=
data
.
text
;
...
@@ -801,7 +1058,7 @@ export default {
...
@@ -801,7 +1058,7 @@ export default {
this
.
$router
.
push
({
this
.
$router
.
push
({
name
:
"
riskView
"
,
name
:
"
riskView
"
,
params
:
{
params
:
{
floorId
:
18
,
floorId
:
this
.
form
.
floorId
,
isView
:
false
isView
:
false
}
}
});
});
...
...
src/views/riskProject/add/addPresent.vue
View file @
98dcf66f
<
template
>
<
template
>
<div>
<div>
<LHeader
:text=
"text"
></LHeader>
<LHeader
:text=
"text"
></LHeader>
<van-form
@
submit=
"onSubmit"
:scroll-to-error=
"true"
:show-error=
"false"
validate-trigger=
"onSubmit"
>
<van-form
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
@
submit=
"onSubmit"
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
:scroll-to-error=
"true"
style=
"position: relative;top: 32%;transform: translateY(-50%);"
>
:show-error=
"false"
validate-trigger=
"onSubmit"
>
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
风险信息
风险信息
</div>
</div>
<van-field
readonly
required
name=
"userName"
:value=
"form.userName"
label=
"评估人"
placeholder=
"请输入"
/>
<van-field
<van-field
readonly
required
name=
"projectId"
:value=
"form.projectId"
label=
"所属项目"
placeholder=
"请输入"
/>
readonly
<van-field
readonly
required
name=
"buildingName"
:value=
"form.buildingName"
label=
"所属建筑物"
placeholder=
"请输入"
/>
required
name=
"userName"
:value=
"form.userName"
label=
"评估人"
placeholder=
"请输入"
/>
<van-field
readonly
required
name=
"projectName"
:value=
"form.projectName"
label=
"所属项目"
placeholder=
"请输入"
/>
<van-field
readonly
required
name=
"buildingName"
:value=
"form.buildingName"
label=
"所属建筑物"
placeholder=
"请输入"
/>
<van-field
required
clickable
name=
"floorId"
:value=
"form.floorId"
label=
"所属楼层"
placeholder=
"请选择"
<van-field
@
click=
"seletFloor('floor')"
:rules=
"[
{ required: true, message: '所属楼层不能为空' }]" />
required
readonly
name=
"floorName"
:value=
"form.floorName"
label=
"所属楼层"
placeholder=
"请选择"
:rules=
"[
{ required: true, message: '所属楼层不能为空' }]"
/>
<van-field
readonly
required
name=
"roomName"
:value=
"form.roomName"
label=
"所属房间"
placeholder=
"请输入"
<van-field
@
click=
"seletRoom('room')"
:rules=
"[
{ required: true, message: '所属房间不能为空' }]" />
readonly
required
name=
"roomName"
:value=
"form.roomName"
label=
"所属房间"
placeholder=
"请输入"
:rules=
"[
{ required: true, message: '所属房间不能为空' }]"
/>
<van-field
required
name=
"name"
v-model=
"form.name"
label=
"风险源名称"
placeholder=
"请输入"
<van-field
:rules=
"[
{ required: true, message: '风险源名称不能为空' }]" />
required
<van-field
readonly
v-model=
"form.factor"
required
name=
"factor"
label=
"风险因素"
placeholder=
"请选择"
name=
"name"
@
click=
"seletFactor('factor')"
:rules=
"[
{ required: true, message: '风险因素不能为空' }]" />
v-model=
"form.name"
label=
"风险源名称"
placeholder=
"请输入"
:rules=
"[
{ required: true, message: '风险源名称不能为空' }]"
/>
<van-field
readonly
v-model=
"form.factor"
required
name=
"factor"
label=
"风险因素"
placeholder=
"请选择"
@
click=
"seletFactor('factor')"
:rules=
"[
{ required: true, message: '风险因素不能为空' }]"
/>
<van-field
readonly
v-model=
"form.type"
required
name=
"type"
label=
"准事故类型"
placeholder=
"请选择"
<van-field
@
click=
"seletType('type')"
:rules=
"[
{ required: true, message: '准事故类型不能为空' }]" />
readonly
v-model=
"form.type"
required
name=
"type"
label=
"准事故类型"
placeholder=
"请选择"
@
click=
"seletType('type')"
:rules=
"[
{ required: true, message: '准事故类型不能为空' }]"
/>
<!--
<van-field
<!--
<van-field
readonly
readonly
...
@@ -35,24 +102,49 @@
...
@@ -35,24 +102,49 @@
@
click=
"seletGrade('level')"
@
click=
"seletGrade('level')"
:rules=
"[
{ required: true, message: '风险等级不能为空' }]"
:rules=
"[
{ required: true, message: '风险等级不能为空' }]"
/> -->
/> -->
<van-field
readonly
v-model=
"form.level"
required
name=
"level"
label=
"风险管控措施评价"
placeholder=
"请选择"
<!--
<van-field
@
click=
"seletGrade"
:rules=
"[
{ required: true, message: '风险等级不能为空' }]" />
readonly
v-model=
"form.level"
required
name=
"level"
label=
"风险管控措施评价"
placeholder=
"请选择"
@
click=
"seletGrade"
:rules=
"[
{ required: true, message: '风险等级不能为空' }]"
/> -->
<van-field
required
name=
"presenceLocation"
v-model=
"form.presenceLocation"
label=
"存在部位"
placeholder=
"请输入"
<van-field
:rules=
"[
{ required: true, message: '存在部位不能为空' }]" />
required
name=
"presenceLocation"
v-model=
"form.presenceLocation"
label=
"存在部位"
placeholder=
"请输入"
:rules=
"[
{ required: true, message: '存在部位不能为空' }]"
/>
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<div
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
style=
"position: relative;top: 32%;transform: translateY(-50%);"
>
>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
风险源图片
风险源图片
</div>
</div>
<van-field
name=
"hdPicture1"
label=
"风险源图片"
>
<van-field
name=
"hdPicture1"
label=
"风险源图片"
>
<template
#input
>
<template
#input
>
<van-uploader
@
delete=
"deleteFile(...arguments, 'uploaderImg')"
multiple
:max-count=
"5"
<van-uploader
upload-text=
"最多上传五个"
v-model=
"uploaderImg"
>
@
delete=
"deleteFile(...arguments, 'uploaderImg')"
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"uploaderImg"
>
<template
slot=
"default"
>
<template
slot=
"default"
>
<!-- 11111111111 -->
<!-- 11111111111 -->
<div
style=
"
<div
style=
"
width: 2.13333rem;
width: 2.13333rem;
height: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
background: #f7f8fa;
...
@@ -60,28 +152,53 @@
...
@@ -60,28 +152,53 @@
align-items: center;
align-items: center;
justify-content: center;
justify-content: center;
flex-direction: column;
flex-direction: column;
"
>
"
<img
src=
"@/assets/upload/pic.png"
alt=
""
style=
"width: 0.64rem; height: 0.64rem"
/>
>
<img
src=
"@/assets/upload/pic.png"
alt=
""
style=
"width: 0.64rem; height: 0.64rem"
/>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
</div>
</div>
</
template
>
</
template
>
</van-uploader>
</van-uploader>
</template>
</template>
</van-field>
</van-field>
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<div
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
style=
"position: relative;top: 32%;transform: translateY(-50%);"
>
>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
技术措施
技术措施
</div>
</div>
<van-field
v-model=
"form.measuresProject"
name=
"measuresProject"
label=
"技术措施"
type=
"textarea"
rows=
"1"
autosize
<van-field
placeholder=
"请输入"
/>
v-model=
"form.measuresProject"
name=
"measuresProject"
label=
"技术措施"
type=
"textarea"
rows=
"1"
autosize
placeholder=
"请输入"
/>
<van-field
name=
"measuresProjectFile[]"
label=
" "
>
<van-field
name=
"measuresProjectFile[]"
label=
" "
>
<
template
#input
>
<
template
#input
>
<van-uploader
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresProjectFile"
accept=
"file"
<van-uploader
result-type=
"file"
@
delete=
"deleteFile(...arguments, 'measuresProjectFile')"
>
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresProjectFile"
accept=
"file"
result-type=
"file"
@
delete=
"deleteFile(...arguments, 'measuresProjectFile')"
>
<template
slot=
"default"
>
<template
slot=
"default"
>
<!-- 11111111111 -->
<!-- 11111111111 -->
<div
style=
"
<div
style=
"
width: 2.13333rem;
width: 2.13333rem;
height: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
background: #f7f8fa;
...
@@ -89,46 +206,53 @@
...
@@ -89,46 +206,53 @@
align-items: center;
align-items: center;
justify-content: center;
justify-content: center;
flex-direction: column;
flex-direction: column;
"
>
"
<img
src=
"@/assets/upload/file.png"
alt=
""
style=
"width: 0.64rem; height: 0.64rem"
/>
>
<img
src=
"@/assets/upload/file.png"
alt=
""
style=
"width: 0.64rem; height: 0.64rem"
/>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
</div>
</div>
</
template
>
</
template
>
</van-uploader>
</van-uploader>
</template>
</template>
</van-field>
</van-field>
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<div
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
>
应采取的管控措施
<img
</div>
src=
"@/assets/accidentIcon/bookmark.svg"
<van-field
v-model=
"form.measuresAdministration"
name=
"measuresAdministration"
label=
""
type=
"textarea"
rows=
"3"
alt=
""
autosize
placeholder=
"请输入"
/>
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=
"3"
autosize
placeholder=
"请输入"
/>
<van-field
readonly
required
clickable
name=
"trouble"
:value=
"form.trouble"
label=
"管控责任单位"
placeholder=
"请选择"
@
click=
"showTrouble = true"
:rules=
"[{ required: true, message: '管控责任单位不能为空' }]"
/>
<van-field
readonly
required
clickable
name=
"trouble"
:value=
"form.trouble"
label=
"管控责任人"
placeholder=
"请选择"
@
click=
"showTrouble = true"
:rules=
"[{ required: true, message: '管控责任人不能为空' }]"
/>
<!-- <div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;">
<img src="@/assets/accidentIcon/bookmark.svg" alt=""
style="position: relative;top: 32%;transform: translateY(-50%);">
管理措施
管理措施
</div> -->
</div>
<!-- <van-field v-model="form.measuresAdministration" name="measuresAdministration" label="管理措施" type="textarea"
<van-field
rows="1" autosize placeholder="请输入" /> -->
v-model=
"form.measuresAdministration"
name=
"measuresAdministration"
label=
"管理措施"
type=
"textarea"
rows=
"1"
autosize
placeholder=
"请输入"
/>
<van-field
name=
"measuresAdministrationFile[]"
label=
" "
>
<van-field
name=
"measuresAdministrationFile[]"
label=
" "
>
<
template
#input
>
<
template
#input
>
<van-uploader
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresAdministrationFile"
<van-uploader
accept=
"file"
result-type=
"file"
@
delete=
"deleteFile(...arguments, 'measuresAdministrationFile')"
>
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresAdministrationFile"
accept=
"file"
result-type=
"file"
@
delete=
"deleteFile(...arguments, 'measuresAdministrationFile')"
>
<template
slot=
"default"
>
<template
slot=
"default"
>
<!-- 11111111111 -->
<!-- 11111111111 -->
<div
style=
"
<div
style=
"
width: 2.13333rem;
width: 2.13333rem;
height: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
background: #f7f8fa;
...
@@ -136,28 +260,53 @@
...
@@ -136,28 +260,53 @@
align-items: center;
align-items: center;
justify-content: center;
justify-content: center;
flex-direction: column;
flex-direction: column;
"
>
"
<img
src=
"@/assets/upload/file.png"
alt=
""
style=
"width: 0.64rem; height: 0.64rem"
/>
>
<img
src=
"@/assets/upload/file.png"
alt=
""
style=
"width: 0.64rem; height: 0.64rem"
/>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
</div>
</div>
</
template
>
</
template
>
</van-uploader>
</van-uploader>
</template>
</template>
</van-field>
</van-field>
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<div
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
style=
"position: relative;top: 32%;transform: translateY(-50%);"
>
>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
应急措施
应急措施
</div>
</div>
<van-field
v-model=
"form.measuresEmergency"
name=
"measuresEmergency"
label=
"应急措施"
type=
"textarea"
rows=
"1"
<van-field
autosize
placeholder=
"请输入"
/>
v-model=
"form.measuresEmergency"
name=
"measuresEmergency"
label=
"应急措施"
type=
"textarea"
rows=
"1"
autosize
placeholder=
"请输入"
/>
<van-field
name=
"measuresEmergencyFile[]"
label=
" "
>
<van-field
name=
"measuresEmergencyFile[]"
label=
" "
>
<
template
#input
>
<
template
#input
>
<van-uploader
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresEmergencyFile"
accept=
"file"
<van-uploader
result-type=
"file"
@
delete=
"deleteFile(...arguments, 'measuresEmergencyFile')"
>
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresEmergencyFile"
accept=
"file"
result-type=
"file"
@
delete=
"deleteFile(...arguments, 'measuresEmergencyFile')"
>
<template
slot=
"default"
>
<template
slot=
"default"
>
<!-- 11111111111 -->
<!-- 11111111111 -->
<div
style=
"
<div
style=
"
width: 2.13333rem;
width: 2.13333rem;
height: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
background: #f7f8fa;
...
@@ -165,8 +314,13 @@
...
@@ -165,8 +314,13 @@
align-items: center;
align-items: center;
justify-content: center;
justify-content: center;
flex-direction: column;
flex-direction: column;
"
>
"
<img
src=
"@/assets/upload/file.png"
alt=
""
style=
"width: 0.64rem; height: 0.64rem"
/>
>
<img
src=
"@/assets/upload/file.png"
alt=
""
style=
"width: 0.64rem; height: 0.64rem"
/>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
</div>
</div>
</
template
>
</
template
>
...
@@ -174,12 +328,17 @@
...
@@ -174,12 +328,17 @@
</template>
</template>
</van-field>
</van-field>
<!-- v-if="this.$route.params.isView" -->
<!-- v-if="this.$route.params.isView" -->
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<div
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
style=
"position: relative;top: 32%;transform: translateY(-50%);"
>
>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
参考依据
参考依据
</div>
</div>
<van-field
<!--
<van-field
readonly
readonly
required
required
name="trouble"
name="trouble"
...
@@ -188,63 +347,146 @@
...
@@ -188,63 +347,146 @@
placeholder="请选择"
placeholder="请选择"
@click="showTrouble = true"
@click="showTrouble = true"
:rules="[{ required: true, message: '事故类型不能为空' }]"
:rules="[{ required: true, message: '事故类型不能为空' }]"
/>
/>
-->
<van-popup
v-model=
"showTrouble"
position=
"bottom"
>
<van-popup
v-model=
"showTrouble"
position=
"bottom"
>
<van-picker
show-toolbar
value-key=
"name"
:columns=
"columnsTrouble"
@
confirm=
"onConTrouble"
<van-picker
@
cancel=
"showTrouble = false"
/>
show-toolbar
value-key=
"name"
:columns=
"columnsTrouble"
@
confirm=
"onConTrouble"
@
cancel=
"showTrouble = false"
/>
</van-popup>
</van-popup>
<van-popup
v-model=
"showSource"
position=
"bottom"
>
<van-popup
v-model=
"showSource"
position=
"bottom"
>
<van-picker
show-toolbar
value-key=
"name"
:columns=
"columnsSource"
@
confirm=
"onConSource"
<van-picker
@
cancel=
"showSource = false"
/>
show-toolbar
value-key=
"name"
:columns=
"columnsSource"
@
confirm=
"onConSource"
@
cancel=
"showSource = false"
/>
</van-popup>
<!-- 楼层弹出层 -->
<van-popup
v-model=
"ShowfloorList"
position=
"bottom"
:style=
"{ height: '100%' }"
>
<selectFloor
:listdata=
"floorSource"
@
closeSlect=
"closeSlectfloor"
@
saveSlect=
"saveSlectfloor"
></selectFloor>
</van-popup>
</van-popup>
<!-- 风险源弹出层 -->
<!-- 风险源弹出层 -->
<van-popup
v-model=
"ShowSelectList"
position=
"bottom"
:style=
"{ height: '100%' }"
>
<van-popup
<selectList
:listdata=
"columnsTrouble"
@
closeSlect=
"closeSlect"
@
saveSlect=
"saveSlect"
></selectList>
v-model=
"ShowSelectList"
position=
"bottom"
:style=
"{ height: '100%' }"
>
<selectList
:listdata=
"columnsTrouble"
@
closeSlect=
"closeSlect"
@
saveSlect=
"saveSlect"
></selectList>
</van-popup>
</van-popup>
<!-- 准事故类型 -->
<!-- 准事故类型 -->
<van-popup
v-model=
"ShowAccidentList"
position=
"bottom"
:style=
"{ height: '100%' }"
>
<van-popup
<selectList
:listdata=
"columnsAccident"
@
closeSlect=
"closeSlectAccident"
@
saveSlect=
"saveSlectAccident"
>
v-model=
"ShowAccidentList"
position=
"bottom"
:style=
"{ height: '100%' }"
>
<selectList
:listdata=
"columnsAccident"
@
closeSlect=
"closeSlectAccident"
@
saveSlect=
"saveSlectAccident"
>
</selectList>
</selectList>
</van-popup>
</van-popup>
<!-- v-if="this.$route.params.isView" -->
<!-- v-if="this.$route.params.isView" -->
<div
style=
"margin: 16px 16px 0"
>
<div
style=
"margin: 16px 16px 0"
>
<van-button
round
block
type=
"info"
native-type=
"submit"
>
上报
</van-button>
<van-button
round
block
type=
"info"
native-type=
"submit"
>
提交
</van-button
>
</div>
</div>
</van-form>
</van-form>
<van-dialog
v-model=
"showGradeDialog"
title=
"风险评测配置"
:show-cancel-button=
"false"
:show-confirm-button=
"false"
>
<van-dialog
v-model=
"showGradeDialog"
title=
"风险评测配置"
:show-cancel-button=
"false"
:show-confirm-button=
"false"
>
<div
class=
"dialogContain"
>
<div
class=
"dialogContain"
>
<van-collapse
v-model=
"activeNames"
>
<van-collapse
v-model=
"activeNames"
>
<van-collapse-item
title=
"风险模型"
name=
"1"
>
<van-collapse-item
title=
"风险模型"
name=
"1"
>
<van-field
readonly
required
name=
"level"
label=
"当前风险模型"
placeholder=
"LS风险矩阵评估模型"
/>
<van-field
readonly
required
name=
"level"
label=
"当前风险模型"
placeholder=
"LS风险矩阵评估模型"
/>
</van-collapse-item>
</van-collapse-item>
<van-collapse-item
title=
"风险模型配置"
name=
"2"
>
<van-collapse-item
title=
"风险模型配置"
name=
"2"
>
<van-popover
v-model=
"showPopover"
trigger=
"click"
:actions=
"columnsRiskRank"
@
select=
"onSelect"
>
<van-popover
v-model=
"showPopover"
trigger=
"click"
:actions=
"columnsRiskRank"
@
select=
"onSelect"
>
<
template
#reference
>
<
template
#reference
>
<van-field
v-model=
"possibleValue"
readonly
required
name=
"level"
label=
"发生的可能性"
<van-field
placeholder=
"请选择"
/>
v-model=
"possibleValue"
readonly
required
name=
"level"
label=
"发生的可能性"
placeholder=
"请选择"
/>
</
template
>
</
template
>
</van-popover>
</van-popover>
<van-popover
v-model=
"showPopoveSetRank"
trigger=
"click"
:actions=
"columnsSetRank"
<van-popover
@
select=
"onSelectSetRank"
>
v-model=
"showPopoveSetRank"
trigger=
"click"
:actions=
"columnsSetRank"
@
select=
"onSelectSetRank"
>
<
template
#reference
>
<
template
#reference
>
<van-field
v-model=
"severityValue"
readonly
required
name=
"level"
label=
"后果严重程度"
<van-field
placeholder=
"请选择"
/>
v-model=
"severityValue"
readonly
required
name=
"level"
label=
"后果严重程度"
placeholder=
"请选择"
/>
</
template
>
</
template
>
</van-popover>
</van-popover>
</van-collapse-item>
</van-collapse-item>
</van-collapse>
</van-collapse>
<van-row
type=
"flex"
justify=
"center"
style=
"margin-top:10px"
>
<van-row
type=
"flex"
justify=
"center"
style=
"margin-top:10px"
>
<van-col
span=
"6"
><van-button
size=
"small"
plain
type=
"info"
<van-col
span=
"6"
@
click=
"showGradeDialog = false"
>
取消
</van-button></van-col>
><van-button
<van-col
span=
"6"
><van-button
size=
"small"
type=
"info"
@
click=
"goResultPage"
>
开始测评
</van-button></van-col>
size=
"small"
plain
type=
"info"
@
click=
"showGradeDialog = false"
>
取消
</van-button
></van-col
>
<van-col
span=
"6"
><van-button
size=
"small"
type=
"info"
@
click=
"goResultPage"
>
开始测评
</van-button
></van-col
>
</van-row>
</van-row>
</div>
</div>
</van-dialog>
</van-dialog>
<!-- v-if="this.$route.params.isView" -->
<!-- v-if="this.$route.params.isView" -->
<div
style=
"margin: 10px 16px 0px; padding-bottom: 16px"
>
<div
style=
"margin: 10px 16px 0px; padding-bottom: 16px"
>
<van-button
round
block
type=
"warning"
@
click.native=
"cancel"
>
取消
</van-button>
<van-button
round
block
type=
"warning"
@
click.native=
"cancel"
>
取消
</van-button
>
</div>
</div>
</div>
</div>
</template>
</template>
...
@@ -252,8 +494,9 @@
...
@@ -252,8 +494,9 @@
<
script
>
<
script
>
import
LHeader
from
"
@/components/header.vue
"
;
import
LHeader
from
"
@/components/header.vue
"
;
import
SelectList
from
"
@/components/selectList.vue
"
;
import
SelectList
from
"
@/components/selectList.vue
"
;
import
selectFloor
from
"
@/components/selectFloor.vue
"
;
// import selectPeople from "@/views/riskTask/selectPeople/index.vue";
// import selectPeople from "@/views/riskTask/selectPeople/index.vue";
import
{
getUserInfo
,
getLocalUserInfo
}
from
'
@/utils/userInfo
'
import
{
getUserInfo
,
getLocalUserInfo
}
from
"
@/utils/userInfo
"
;
import
{
getFun
,
postFun
}
from
"
@/service/table.js
"
;
import
{
getFun
,
postFun
}
from
"
@/service/table.js
"
;
// import {
// import {
// getFormList,
// getFormList,
...
@@ -268,25 +511,27 @@ export default {
...
@@ -268,25 +511,27 @@ export default {
name
:
"
addPresent
"
,
name
:
"
addPresent
"
,
components
:
{
components
:
{
LHeader
,
LHeader
,
selectFloor
,
SelectList
},
},
activated
()
{
activated
()
{},
},
beforeRouteEnter
(
to
,
from
,
next
)
{
beforeRouteEnter
(
to
,
from
,
next
)
{
if
(
from
.
name
==
'
addCurrent
'
)
{
if
(
from
.
name
==
"
addCurrent
"
)
{
sessionStorage
.
setItem
(
'
presentForm
'
,
''
)
sessionStorage
.
setItem
(
"
presentForm
"
,
""
);
sessionStorage
.
setItem
(
'
level
'
,
''
)
sessionStorage
.
setItem
(
"
level
"
,
""
);
}
}
next
()
next
();
},
},
beforeRouteLeave
(
to
,
from
,
next
)
{
beforeRouteLeave
(
to
,
from
,
next
)
{
if
(
to
.
name
!=
"
riskInherent
"
)
{
if
(
to
.
name
!=
"
riskInherent
"
)
{
sessionStorage
.
setItem
(
'
presentForm
'
,
JSON
.
stringify
(
this
.
form
))
sessionStorage
.
setItem
(
"
presentForm
"
,
JSON
.
stringify
(
this
.
form
));
}
}
next
();
next
();
},
},
data
()
{
data
()
{
return
{
return
{
ShowfloorList
:
false
,
floorSource
:
[],
ShowAccidentList
:
false
,
ShowAccidentList
:
false
,
ShowSelectList
:
false
,
ShowSelectList
:
false
,
columnsAccident
:
[],
columnsAccident
:
[],
...
@@ -299,9 +544,7 @@ export default {
...
@@ -299,9 +544,7 @@ export default {
id
:
""
,
id
:
""
,
isTimely
:
1
,
isTimely
:
1
,
active
:
0
,
active
:
0
,
form
:
{
form
:
{},
},
projectId
:
""
,
// 所属工程
projectId
:
""
,
// 所属工程
projectName
:
""
,
// 所属工程
projectName
:
""
,
// 所属工程
projectDirectorName
:
""
,
// 所属工程
projectDirectorName
:
""
,
// 所属工程
...
@@ -354,33 +597,53 @@ export default {
...
@@ -354,33 +597,53 @@ export default {
possibleValue
:
""
,
possibleValue
:
""
,
possibleScore
:
0
,
possibleScore
:
0
,
severityValue
:
""
,
severityValue
:
""
,
severityScore
:
0
,
severityScore
:
0
};
};
},
},
created
()
{
created
()
{
var
userInfo
=
getUserInfo
()
var
userInfo
=
getUserInfo
();
this
.
form
.
buildingIds
=
this
.
$route
.
params
.
id
this
.
form
.
buildingIds
=
this
.
form
.
planId
=
this
.
$route
.
params
.
planId
this
.
$route
.
params
.
buildingId
||
sessionStorage
.
getItem
(
"
buildingId
"
);
this
.
form
.
floorId
=
this
.
$route
.
params
.
floorId
this
.
form
.
planId
=
this
.
form
.
roomId
=
this
.
$route
.
params
.
roomId
this
.
$route
.
params
.
planId
||
sessionStorage
.
getItem
(
"
planId
"
);
this
.
form
.
inherentId
=
this
.
$route
.
params
.
id
this
.
form
.
buildingName
=
this
.
form
.
roomName
=
this
.
$route
.
params
.
roomName
this
.
$route
.
params
.
buildingName
||
sessionStorage
.
getItem
(
"
buildingName
"
);
this
.
form
.
buildingName
=
'
1号楼
'
this
.
form
.
userId
=
userInfo
.
userId
;
this
.
form
.
userId
=
userInfo
.
userId
this
.
form
.
userName
=
userInfo
.
userName
;
this
.
form
.
userName
=
userInfo
.
userName
this
.
form
.
deptName
=
userInfo
.
dept
.
deptName
;
this
.
form
.
deptName
=
userInfo
.
dept
.
deptName
this
.
form
.
planId
=
this
.
$route
.
params
.
planId
;
this
.
form
.
projectId
=
'
测试项目
'
this
.
form
.
floorId
=
this
.
$route
.
params
.
floorId
;
this
.
form
.
floorName
=
this
.
$route
.
params
.
floorName
;
this
.
form
.
projectName
=
this
.
$route
.
params
.
projectName
;
this
.
form
.
projectId
=
this
.
$route
.
params
.
projectId
;
this
.
form
.
roomId
=
this
.
$route
.
params
.
roomId
;
this
.
form
.
inherentId
=
this
.
$route
.
params
.
id
;
this
.
form
.
roomName
=
this
.
$route
.
params
.
roomName
;
this
.
form
.
buildingName
=
"
1号楼
"
;
this
.
form
.
userId
=
userInfo
.
userId
;
this
.
form
.
userName
=
userInfo
.
userName
;
this
.
form
.
deptName
=
userInfo
.
dept
.
deptName
;
this
.
form
.
projectId
=
"
测试项目
"
;
},
},
mounted
()
{
mounted
()
{
if
(
sessionStorage
.
getItem
(
'
presentForm
'
)
!=
''
)
{
// this.getFloor();
this
.
form
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'
presentForm
'
))
this
.
form
.
level
=
sessionStorage
.
getItem
(
'
level
'
)
}
this
.
getFXYS
();
this
.
getFXYS
();
this
.
getZSGLX
();
this
.
getZSGLX
();
},
},
methods
:
{
methods
:
{
// getFloor() {
// getFun(`/risk/plan/floor/list/${this.form.buildingIds}`)
// .then(res => {
// // this.$toast.clear();
// // this.showSource = true;
// let newArr = this.renameKeyInTree(res.data, "name", "text");
// this.floorSource = newArr;
// })
// .catch(() => {
// this.$toast.fail("加载失败,请稍后再试");
// });
// },
getFXYS
()
{
getFXYS
()
{
getFun
(
`/risk/plan/dict/data/list?dictType=risk_plan_factor`
)
getFun
(
`/risk/plan/dict/data/list?dictType=risk_plan_factor`
)
.
then
(
res
=>
{
.
then
(
res
=>
{
...
@@ -400,34 +663,24 @@ export default {
...
@@ -400,34 +663,24 @@ export default {
});
});
},
},
seletFloor
(
name
)
{
seletFloor
(
name
)
{
this
.
$toast
.
loading
({
this
.
ShowfloorList
=
true
;
message
:
"
加载中...
"
,
this
.
userPrefix
=
name
;
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
duration
:
0
,
});
this
.
userPrefix
=
name
getFun
(
`/risk/plan/floor/list/
${
this
.
form
.
buildingIds
}
`
).
then
((
res
)
=>
{
this
.
$toast
.
clear
()
this
.
showSource
=
true
this
.
columnsSource
=
res
.
data
}).
catch
(()
=>
{
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
},
},
seletRoom
(
name
)
{
seletRoom
(
name
)
{
this
.
$toast
.
loading
({
this
.
$toast
.
loading
({
message
:
"
加载中...
"
,
message
:
"
加载中...
"
,
forbidClick
:
true
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
loadingType
:
"
spinner
"
,
duration
:
0
,
duration
:
0
});
});
this
.
userPrefix
=
name
this
.
userPrefix
=
name
;
getFun
(
`/risk/plan/room/list/
${
this
.
form
.
floorId
}
`
).
then
((
res
)
=>
{
getFun
(
`/risk/plan/room/list/
${
this
.
form
.
floorId
}
`
)
this
.
$toast
.
clear
()
.
then
(
res
=>
{
this
.
showSource
=
true
this
.
$toast
.
clear
();
this
.
columnsSource
=
res
.
data
this
.
showSource
=
true
;
}).
catch
(()
=>
{
this
.
columnsSource
=
res
.
data
;
})
.
catch
(()
=>
{
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
});
},
},
...
@@ -435,70 +688,79 @@ export default {
...
@@ -435,70 +688,79 @@ export default {
seletFactor
(
name
)
{
seletFactor
(
name
)
{
// this.showTrouble = true;
// this.showTrouble = true;
this
.
riskName
=
name
;
this
.
riskName
=
name
;
this
.
ShowSelectList
=
true
this
.
ShowSelectList
=
true
;
},
},
//准事故类型
//准事故类型
seletType
(
name
)
{
seletType
(
name
)
{
// this.showTrouble = true;
// this.showTrouble = true;
this
.
riskName
=
name
;
this
.
riskName
=
name
;
this
.
ShowAccidentList
=
true
this
.
ShowAccidentList
=
true
;
},
},
seletGrade
(
name
)
{
seletGrade
(
name
)
{
this
.
getGradeList
(
'
possibility
'
)
this
.
getGradeList
(
"
possibility
"
);
this
.
getGradeList
(
'
severity
'
)
this
.
getGradeList
(
"
severity
"
);
this
.
showGradeDialog
=
true
this
.
showGradeDialog
=
true
;
},
},
//风险模型配置
//风险模型配置
getGradeList
(
type
)
{
getGradeList
(
type
)
{
// possibility 可能性 severity 严重性
// possibility 可能性 severity 严重性
getFun
(
`/risk/plan/matrix/
${
type
}
/list`
).
then
(
res
=>
{
getFun
(
`/risk/plan/matrix/
${
type
}
/list`
).
then
(
res
=>
{
let
arr
=
[]
let
arr
=
[];
res
.
data
.
forEach
(
item
=>
{
res
.
data
.
forEach
(
item
=>
{
arr
.
push
({
text
:
item
.
title
,
type
:
item
.
type
,
sort
:
item
.
sort
,
score
:
item
.
score
})
arr
.
push
({
})
text
:
item
.
title
,
if
(
type
===
'
possibility
'
)
{
type
:
item
.
type
,
this
.
columnsRiskRank
=
arr
sort
:
item
.
sort
,
score
:
item
.
score
});
});
if
(
type
===
"
possibility
"
)
{
this
.
columnsRiskRank
=
arr
;
}
else
{
}
else
{
this
.
columnsSetRank
=
arr
this
.
columnsSetRank
=
arr
;
}
}
});
})
},
closeSlectfloor
()
{
this
.
ShowfloorList
=
false
;
},
saveSlectfloor
(
data
)
{
this
.
form
.
floorId
=
data
.
id
;
this
.
form
.
floorName
=
data
.
text
;
this
.
ShowfloorList
=
false
;
},
},
closeSlect
()
{
closeSlect
()
{
this
.
ShowSelectList
=
false
this
.
ShowSelectList
=
false
;
},
},
saveSlect
(
data
)
{
saveSlect
(
data
)
{
this
.
form
.
factor
=
data
.
join
(
'
,
'
);
this
.
form
.
factor
=
data
.
join
(
"
,
"
);
this
.
ShowSelectList
=
false
this
.
ShowSelectList
=
false
;
},
},
closeSlectAccident
()
{
closeSlectAccident
()
{
this
.
ShowAccidentList
=
false
this
.
ShowAccidentList
=
false
;
},
},
saveSlectAccident
(
data
)
{
saveSlectAccident
(
data
)
{
this
.
form
.
type
=
data
.
join
(
'
,
'
);
this
.
form
.
type
=
data
.
join
(
"
,
"
);
this
.
ShowAccidentList
=
false
this
.
ShowAccidentList
=
false
;
},
},
onSelect
(
data
)
{
onSelect
(
data
)
{
this
.
possibleValue
=
data
.
text
this
.
possibleValue
=
data
.
text
;
this
.
possibleScore
=
data
.
score
this
.
possibleScore
=
data
.
score
;
},
},
onSelectSetRank
(
data
)
{
onSelectSetRank
(
data
)
{
this
.
severityValue
=
data
.
text
this
.
severityValue
=
data
.
text
;
this
.
severityScore
=
data
.
score
this
.
severityScore
=
data
.
score
;
},
},
//开始测评
//开始测评
goResultPage
()
{
goResultPage
()
{
this
.
$router
.
push
({
this
.
$router
.
replace
({
name
:
'
resultPage
'
,
name
:
"
resultPage
"
,
params
:
{
params
:
{
score
:
this
.
severityScore
*
this
.
possibleScore
score
:
this
.
severityScore
*
this
.
possibleScore
}
}
})
});
},
performTasks
()
{
},
},
performTasks
()
{},
// 点击预览图
// 点击预览图
clickPre
(
e
)
{
clickPre
(
e
)
{
console
.
log
(
e
);
console
.
log
(
e
);
...
@@ -518,7 +780,7 @@ export default {
...
@@ -518,7 +780,7 @@ export default {
console
.
log
(
res
);
console
.
log
(
res
);
this
.
$toast
({
this
.
$toast
({
title
:
"
提示
"
,
title
:
"
提示
"
,
message
:
"
删除成功!
"
,
message
:
"
删除成功!
"
});
});
}
else
{
}
else
{
console
.
log
(
"
删除失败
"
);
console
.
log
(
"
删除失败
"
);
...
@@ -529,38 +791,38 @@ export default {
...
@@ -529,38 +791,38 @@ export default {
jsonToFormData
(
config
)
{
jsonToFormData
(
config
)
{
const
formData
=
new
FormData
();
const
formData
=
new
FormData
();
//循环传入的值转换formData
//循环传入的值转换formData
Object
.
keys
(
config
).
forEach
((
key
)
=>
{
Object
.
keys
(
config
).
forEach
(
key
=>
{
formData
.
append
(
key
,
config
[
key
]);
formData
.
append
(
key
,
config
[
key
]);
})
});
return
formData
;
return
formData
;
},
},
onSubmit
(
values
)
{
onSubmit
(
values
)
{
// console.log('%c [ values ]-592', 'font-size:13px; background:pink; color:#bf2c9f;', 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";
// let url = "/risk/plan/inherent";
let
url
=
"
/risk/plan/existing
"
;
let
url
=
"
/risk/plan/existing
"
;
values
.
hdPicture1
.
forEach
((
item
)
=>
{
values
.
hdPicture1
.
forEach
(
item
=>
{
if
(
item
.
file
)
{
if
(
item
.
file
)
{
formDataJson
.
append
(
"
pictureFile[]
"
,
item
.
file
);
formDataJson
.
append
(
"
pictureFile[]
"
,
item
.
file
);
}
else
{
}
else
{
formDataJson
.
append
(
"
pictureFile[]
"
,
item
.
fileId
);
formDataJson
.
append
(
"
pictureFile[]
"
,
item
.
fileId
);
}
}
});
});
values
[
'
measuresProjectFile[]
'
].
forEach
((
item
)
=>
{
values
[
"
measuresProjectFile[]
"
].
forEach
(
item
=>
{
if
(
item
.
file
)
{
if
(
item
.
file
)
{
formDataJson
.
append
(
"
measuresProjectFile[]
"
,
item
.
file
);
formDataJson
.
append
(
"
measuresProjectFile[]
"
,
item
.
file
);
}
else
{
}
else
{
formDataJson
.
append
(
"
measuresProjectFile[]
"
,
item
.
fileId
);
formDataJson
.
append
(
"
measuresProjectFile[]
"
,
item
.
fileId
);
}
}
});
});
values
[
'
measuresEmergencyFile[]
'
].
forEach
((
item
)
=>
{
values
[
"
measuresEmergencyFile[]
"
].
forEach
(
item
=>
{
if
(
item
.
file
)
{
if
(
item
.
file
)
{
formDataJson
.
append
(
"
measuresEmergencyFile[]
"
,
item
.
file
);
formDataJson
.
append
(
"
measuresEmergencyFile[]
"
,
item
.
file
);
}
else
{
}
else
{
formDataJson
.
append
(
"
measuresEmergencyFile[]
"
,
item
.
fileId
);
formDataJson
.
append
(
"
measuresEmergencyFile[]
"
,
item
.
fileId
);
}
}
});
});
values
[
'
measuresAdministrationFile[]
'
].
forEach
((
item
)
=>
{
values
[
"
measuresAdministrationFile[]
"
].
forEach
(
item
=>
{
if
(
item
.
file
)
{
if
(
item
.
file
)
{
formDataJson
.
append
(
"
measuresAdministrationFile[]
"
,
item
.
file
);
formDataJson
.
append
(
"
measuresAdministrationFile[]
"
,
item
.
file
);
}
else
{
}
else
{
...
@@ -568,11 +830,11 @@ export default {
...
@@ -568,11 +830,11 @@ export default {
}
}
});
});
postFun
(
url
,
formDataJson
)
postFun
(
url
,
formDataJson
)
.
then
((
res
)
=>
{
.
then
(
res
=>
{
this
.
$toast
.
clear
();
this
.
$toast
.
clear
();
this
.
$toast
.
success
({
this
.
$toast
.
success
({
message
:
"
提交成功
"
,
message
:
"
提交成功
"
,
duration
:
2000
,
duration
:
2000
});
});
history
.
go
(
-
1
);
history
.
go
(
-
1
);
})
})
...
@@ -589,11 +851,15 @@ export default {
...
@@ -589,11 +851,15 @@ export default {
message
:
"
加载中...
"
,
message
:
"
加载中...
"
,
forbidClick
:
true
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
loadingType
:
"
spinner
"
,
duration
:
0
,
duration
:
0
});
});
postriskConiCause
(
`/riskMain/edit/
${
this
.
taskId
}
`
)
postriskConiCause
(
`/riskMain/edit/
${
this
.
taskId
}
`
)
.
then
((
res
)
=>
{
.
then
(
res
=>
{
console
.
log
(
'
%c [ res ]-332
'
,
'
font-size:13px; background:pink; color:#bf2c9f;
'
,
res
)
console
.
log
(
"
%c [ res ]-332
"
,
"
font-size:13px; background:pink; color:#bf2c9f;
"
,
res
);
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
this
.
$toast
.
clear
();
this
.
$toast
.
clear
();
...
@@ -622,7 +888,7 @@ export default {
...
@@ -622,7 +888,7 @@ export default {
this
.
trouble
=
""
;
this
.
trouble
=
""
;
// 请求风险源
// 请求风险源
postHdSource
(
`/riskMain/showSourceName?factorType=
${
this
.
factor
}
`
).
then
(
postHdSource
(
`/riskMain/showSourceName?factorType=
${
this
.
factor
}
`
).
then
(
(
res
)
=>
{
res
=>
{
this
.
columnsSource
=
res
.
data
;
this
.
columnsSource
=
res
.
data
;
}
}
);
);
...
@@ -639,14 +905,17 @@ export default {
...
@@ -639,14 +905,17 @@ export default {
},
},
// 事故类型
// 事故类型
onConTrouble
(
value
)
{
onConTrouble
(
value
)
{
console
.
log
(
'
%c [ value ]-653
'
,
'
font-size:13px; background:pink; color:#bf2c9f;
'
,
value
)
console
.
log
(
"
%c [ value ]-653
"
,
"
font-size:13px; background:pink; color:#bf2c9f;
"
,
value
);
if
(
!
value
)
{
if
(
!
value
)
{
this
.
showTrouble
=
false
;
this
.
showTrouble
=
false
;
return
;
return
;
}
}
this
.
form
[
this
.
riskName
]
=
value
.
name
;
this
.
form
[
this
.
riskName
]
=
value
.
name
;
this
.
showTrouble
=
false
;
this
.
showTrouble
=
false
;
},
},
// 风险定级
// 风险定级
onConSetRank
(
value
)
{
onConSetRank
(
value
)
{
...
@@ -656,7 +925,7 @@ export default {
...
@@ -656,7 +925,7 @@ export default {
if
(
this
.
setRank
==
"
矩阵式定级
"
)
{
if
(
this
.
setRank
==
"
矩阵式定级
"
)
{
this
.
showSetRank
=
false
;
this
.
showSetRank
=
false
;
this
.
$router
.
push
({
this
.
$router
.
push
({
name
:
"
matrix-grad
"
,
name
:
"
matrix-grad
"
});
});
}
}
},
},
...
@@ -688,7 +957,7 @@ export default {
...
@@ -688,7 +957,7 @@ export default {
// 请求主责人员
// 请求主责人员
let
formdata
=
new
FormData
();
let
formdata
=
new
FormData
();
formdata
.
append
(
"
organizationId
"
,
this
.
mainDutyDeptId
);
formdata
.
append
(
"
organizationId
"
,
this
.
mainDutyDeptId
);
postHdPeople
(
`/riskMain/getUserList`
,
formdata
).
then
((
res
)
=>
{
postHdPeople
(
`/riskMain/getUserList`
,
formdata
).
then
(
res
=>
{
this
.
columnsMainDutyPeopLe
=
res
.
data
;
this
.
columnsMainDutyPeopLe
=
res
.
data
;
});
});
},
},
...
@@ -705,17 +974,17 @@ export default {
...
@@ -705,17 +974,17 @@ export default {
// 选择作业人
// 选择作业人
goSelPeoTwo
(
val
)
{
goSelPeoTwo
(
val
)
{
this
.
peopleName
=
val
this
.
peopleName
=
val
;
this
.
show
=
true
;
this
.
show
=
true
;
},
},
onClose
()
{
onClose
()
{
this
.
show
=
false
;
this
.
show
=
false
;
},
},
onSave
(
e
)
{
onSave
(
e
)
{
this
.
projectDirector
=
e
[
0
].
loginName
this
.
projectDirector
=
e
[
0
].
loginName
;
this
.
projectDirectorName
=
e
[
0
].
userName
this
.
projectDirectorName
=
e
[
0
].
userName
;
this
.
show
=
false
;
this
.
show
=
false
;
},
}
},
},
watch
:
{
watch
:
{
// setRank(newVal, oldVal) {
// setRank(newVal, oldVal) {
...
@@ -725,7 +994,7 @@ export default {
...
@@ -725,7 +994,7 @@ export default {
// this.showSetRankMode = false;
// this.showSetRankMode = false;
// }
// }
// },
// },
},
}
};
};
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
...
...
src/views/riskProject/add/index.vue
View file @
98dcf66f
...
@@ -205,8 +205,12 @@
...
@@ -205,8 +205,12 @@
</van-checkbox-group>
</van-checkbox-group>
</div>
</div>
<div
style=
"display: flex;justify-content: space-around;"
>
<div
style=
"display: flex;justify-content: space-around;"
>
<van-button
native-type=
"button"
type=
"primary"
v-on:click=
"checkAll"
>
全选
</van-button>
<van-button
native-type=
"button"
type=
"primary"
v-on:click=
"checkAll"
<van-button
native-type=
"button"
type=
"info"
@
click=
"toggleAll"
>
反选
</van-button>
>
全选
</van-button
>
<van-button
native-type=
"button"
type=
"info"
@
click=
"toggleAll"
>
反选
</van-button
>
</div>
</div>
</van-popup>
</van-popup>
...
@@ -243,7 +247,7 @@
...
@@ -243,7 +247,7 @@
<!-- 选择时间弹出层 -->
<!-- 选择时间弹出层 -->
<van-popup
v-model=
"showTime"
position=
"bottom"
>
<van-popup
v-model=
"showTime"
position=
"bottom"
>
<van-datetime-picker
<van-datetime-picker
type=
"date
time
"
type=
"date"
@
confirm=
"onConTime"
@
confirm=
"onConTime"
@
cancel=
"showTime = false"
@
cancel=
"showTime = false"
:min-date=
"minDate"
:min-date=
"minDate"
...
@@ -253,7 +257,7 @@
...
@@ -253,7 +257,7 @@
<div
style=
"margin: 16px 16px 0"
>
<div
style=
"margin: 16px 16px 0"
>
<van-button
round
block
type=
"info"
native-type=
"submit"
<van-button
round
block
type=
"info"
native-type=
"submit"
>
上报
</van-button
>
提交
</van-button
>
>
</div>
</div>
</van-form>
</van-form>
...
@@ -374,7 +378,7 @@ export default {
...
@@ -374,7 +378,7 @@ export default {
"
font-size:13px; background:pink; color:#bf2c9f;
"
,
"
font-size:13px; background:pink; color:#bf2c9f;
"
,
date
date
);
);
let
time
=
timestampToTime
(
date
,
"
DT
1
"
,
true
);
let
time
=
timestampToTime
(
date
,
"
DT
2
"
,
true
);
this
.
form
[
this
.
timeName
]
=
time
;
this
.
form
[
this
.
timeName
]
=
time
;
this
.
showTime
=
false
;
this
.
showTime
=
false
;
},
},
...
...
src/views/riskProject/add/inherentRisks.vue
View file @
98dcf66f
...
@@ -8,12 +8,32 @@
...
@@ -8,12 +8,32 @@
<van-tabs
v-model=
"active"
@
change=
"tabList"
color=
"#2980f7"
animated
>
<van-tabs
v-model=
"active"
@
change=
"tabList"
color=
"#2980f7"
animated
>
<van-tab
:title=
"buildingName"
>
<van-tab
:title=
"buildingName"
>
<van-dropdown-menu
z-index=
"1000"
>
<van-dropdown-menu
z-index=
"1000"
>
<van-dropdown-item
v-model=
"value0"
@
change=
"changeBuild"
:options=
"option0"
get-container=
"body"
/>
<van-dropdown-item
<van-dropdown-item
v-model=
"value1"
@
change=
"changeFloor"
:options=
"option1"
get-container=
"body"
/>
v-model=
"value0"
<van-dropdown-item
v-model=
"value2"
@
change=
"changeRoom"
:options=
"option2"
get-container=
"body"
/>
@
change=
"changeBuild"
:options=
"option0"
get-container=
"body"
/>
<van-dropdown-item
v-model=
"value1"
@
change=
"changeFloor"
:options=
"option1"
get-container=
"body"
/>
<van-dropdown-item
v-model=
"value2"
@
change=
"changeRoom"
:options=
"option2"
get-container=
"body"
/>
</van-dropdown-menu>
</van-dropdown-menu>
<div
class=
"con-list"
>
<div
class=
"con-list"
>
<van-cell-group
inset
v-for=
"(item, index) in messageList"
:key=
"index"
@
click=
"touchstart(index, item)"
>
<van-cell-group
inset
v-for=
"(item, index) in messageList"
:key=
"index"
@
click=
"touchstart(index, item)"
>
<div
style=
"font-size: 0.45rem;padding: 5px 0;"
>
<div
style=
"font-size: 0.45rem;padding: 5px 0;"
>
{{
item
.
name
}}
{{
item
.
name
}}
</div>
</div>
...
@@ -40,27 +60,33 @@
...
@@ -40,27 +60,33 @@
</van-row>
</van-row>
<van-overlay
:show=
"showIndex == index"
>
<van-overlay
:show=
"showIndex == index"
>
<div
class=
"wrapper"
@
click.stop=
"showIndex = null"
>
<div
class=
"wrapper"
@
click.stop=
"showIndex = null"
>
<van-button
round
type=
"primary"
@
click=
"goDetail(item)"
>
编辑
</van-button>
<van-button
round
type=
"primary"
@
click=
"goDetail(item)"
>
编辑
</van-button
>
<!--
<van-button
round
type=
"info"
@
click=
"goConfirm(item)"
v-show=
"active==0"
<!--
<van-button
round
type=
"info"
@
click=
"goConfirm(item)"
v-show=
"active==0"
>
确认
</van-button
>
确认
</van-button
>
-->
>
-->
</div>
</div>
</van-overlay>
</van-overlay>
</van-cell-group>
</van-cell-group>
<div
style=
"
<div
style=
"
width: 100%;
width: 100%;
text-align: center;
text-align: center;
font-size: 0.48rem;
font-size: 0.48rem;
position: fixed;
position: fixed;
top: 30%;
top: 30%;
"
v-if=
"messageList['length'] == 0"
>
"
v-if=
"messageList['length'] == 0"
>
暂无数据
暂无数据
</div>
</div>
</div>
</div>
</van-tab>
</van-tab>
</van-tabs>
</van-tabs>
</div>
</div>
<div
style=
"display: flex;
<div
style=
"display: flex;
justify-content: space-around;
justify-content: space-around;
background-color: #fff;
background-color: #fff;
border-top: 1px solid #e3e3e3;
border-top: 1px solid #e3e3e3;
...
@@ -68,12 +94,19 @@
...
@@ -68,12 +94,19 @@
width: 100%;
width: 100%;
text-align: center;
text-align: center;
position: fixed;
position: fixed;
bottom: 0;"
>
bottom: 0;"
<div
@
click=
"performTasks"
style=
"color: #4bced0;font-size: 14px;font-weight: 600;"
>
>
<div
@
click=
"performTasks"
style=
"color: #4bced0;font-size: 14px;font-weight: 600;"
>
<div
style=
"font-size: 22px;"
><van-icon
name=
"plus"
/></div>
<div
style=
"font-size: 22px;"
><van-icon
name=
"plus"
/></div>
<div>
新增固有风险
</div>
<div>
新增固有风险
</div>
</div>
</div>
<div
@
click=
"endTasks"
style=
"color: #D9001B;font-size: 14px;font-weight: 600;"
>
<div
@
click=
"endTasks"
style=
"color: #D9001B;font-size: 14px;font-weight: 600;"
>
<div
style=
"font-size: 22px;"
><van-icon
name=
"cross"
/></div>
<div
style=
"font-size: 22px;"
><van-icon
name=
"cross"
/></div>
<div>
任务执行结束
</div>
<div>
任务执行结束
</div>
</div>
</div>
...
@@ -82,14 +115,14 @@
...
@@ -82,14 +115,14 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
Dialog
}
from
'
vant
'
;
import
{
Dialog
}
from
"
vant
"
;
import
LHeader
from
"
@/components/header.vue
"
;
import
LHeader
from
"
@/components/header.vue
"
;
import
{
getFun
,
postFun
}
from
"
@/service/table.js
"
;
import
{
getFun
,
postFun
}
from
"
@/service/table.js
"
;
import
{
timestampToTime
,
generateId
}
from
"
@/utils/format
"
;
import
{
timestampToTime
,
generateId
}
from
"
@/utils/format
"
;
export
default
{
export
default
{
name
:
"
risk-confirme
"
,
name
:
"
risk-confirme
"
,
components
:
{
components
:
{
LHeader
,
LHeader
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -98,10 +131,10 @@ export default {
...
@@ -98,10 +131,10 @@ export default {
planId
:
0
,
planId
:
0
,
buildingId
:
0
,
buildingId
:
0
,
buildingName
:
""
,
buildingName
:
""
,
value0
:
''
,
value0
:
""
,
value1
:
0
,
value1
:
0
,
value2
:
0
,
value2
:
0
,
option0
:[],
option0
:
[],
option1
:
[],
option1
:
[],
option2
:
[],
option2
:
[],
isHaveNews
:
false
,
isHaveNews
:
false
,
...
@@ -112,13 +145,15 @@ export default {
...
@@ -112,13 +145,15 @@ export default {
active
:
1
,
active
:
1
,
form
:
{},
form
:
{},
tabs
:
[],
tabs
:
[],
floorListData
:[]
floorListData
:
[]
};
};
},
},
created
()
{
created
()
{
this
.
planId
=
this
.
$route
.
params
.
id
||
sessionStorage
.
getItem
(
"
planId
"
);
this
.
planId
=
this
.
$route
.
params
.
id
||
sessionStorage
.
getItem
(
"
planId
"
);
this
.
buildingId
=
this
.
$route
.
params
.
buildingId
||
sessionStorage
.
getItem
(
"
buildingId
"
);
this
.
buildingId
=
this
.
buildingName
=
this
.
$route
.
params
.
buildingName
||
sessionStorage
.
getItem
(
"
buildingName
"
);
this
.
$route
.
params
.
buildingId
||
sessionStorage
.
getItem
(
"
buildingId
"
);
this
.
buildingName
=
this
.
$route
.
params
.
buildingName
||
sessionStorage
.
getItem
(
"
buildingName
"
);
this
.
getRiskList
(
this
.
planId
);
this
.
getRiskList
(
this
.
planId
);
// this.postList();
// this.postList();
},
},
...
@@ -138,9 +173,9 @@ export default {
...
@@ -138,9 +173,9 @@ export default {
},
},
//新增固有风险
//新增固有风险
performTasks
()
{
performTasks
()
{
sessionStorage
.
setItem
(
'
buildingId
'
,
this
.
buildingId
)
sessionStorage
.
setItem
(
"
buildingId
"
,
this
.
buildingId
);
sessionStorage
.
setItem
(
'
planId
'
,
this
.
planId
)
sessionStorage
.
setItem
(
"
planId
"
,
this
.
planId
);
sessionStorage
.
setItem
(
'
buildingName
'
,
this
.
buildingName
)
sessionStorage
.
setItem
(
"
buildingName
"
,
this
.
buildingName
);
this
.
$router
.
push
({
this
.
$router
.
push
({
name
:
"
addInherent
"
,
name
:
"
addInherent
"
,
...
@@ -156,29 +191,28 @@ export default {
...
@@ -156,29 +191,28 @@ export default {
endTasks
()
{
endTasks
()
{
//toDo
//toDo
Dialog
.
confirm
({
Dialog
.
confirm
({
title
:
'
任务执行结束
'
,
title
:
"
任务执行结束
"
,
message
:
'
是否任务执行结束
'
,
message
:
"
是否任务执行结束
"
})
})
.
then
(()
=>
{
.
then
(()
=>
{
postFun
(
postFun
(
`/risk/plan/submit/
${
this
.
planId
}
/
${
this
.
buildingId
}
`
).
then
(
`/risk/plan/submit/
${
this
.
planId
}
/
${
this
.
buildingId
}
`
res
=>
{
).
then
(
res
=>
{
// Dialog.alert({
// Dialog.alert({
// title: '任务执行结束',
// title: '任务执行结束',
// message: res.msg,
// message: res.msg,
// }).then(() => {
// }).then(() => {
// resolve(res.data);
// resolve(res.data);
this
.
$toast
.
success
(
res
.
msg
)
this
.
$toast
.
success
(
res
.
msg
);
this
.
$router
.
push
({
this
.
$router
.
push
({
name
:
'
riskAssess
'
name
:
"
riskAssess
"
})
});
// });
// });
})
}
);
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
// on cancel
// on cancel
});
});
},
},
handadd
()
{
handadd
()
{
this
.
$router
.
push
({
this
.
$router
.
push
({
...
@@ -193,10 +227,12 @@ export default {
...
@@ -193,10 +227,12 @@ export default {
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
getFun
(
`/risk/plan/floor/list/
${
id
}
`
)
getFun
(
`/risk/plan/floor/list/
${
id
}
`
)
.
then
(
res
=>
{
.
then
(
res
=>
{
this
.
floorListData
=
res
.
data
this
.
floorListData
=
res
.
data
;
this
.
option0
=
this
.
changeData
(
res
.
data
)
this
.
changeBuild
(
res
.
data
[
0
].
name
);
this
.
value0
=
res
.
data
[
0
].
name
||
''
this
.
option0
=
this
.
changeData
(
res
.
data
);
this
.
changeBuild
(
res
.
data
[
0
].
name
)
this
.
value0
=
res
.
data
[
0
].
name
||
""
;
console
.
log
(
this
.
value0
,
222
);
this
.
changeBuild
();
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
...
@@ -209,7 +245,14 @@ export default {
...
@@ -209,7 +245,14 @@ export default {
.
then
(
res
=>
{
.
then
(
res
=>
{
this
.
option2
=
this
.
changeData
(
res
.
data
);
this
.
option2
=
this
.
changeData
(
res
.
data
);
this
.
value2
=
res
.
data
[
0
].
id
||
0
;
this
.
value2
=
res
.
data
[
0
].
id
||
0
;
console
.
log
(
this
.
value2
,
"
vlaue2
"
);
resolve
(
res
.
data
);
resolve
(
res
.
data
);
let
risk
=
this
.
riskList
(
this
.
planId
,
this
.
buildingId
,
this
.
value1
,
this
.
value2
);
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
...
@@ -237,35 +280,46 @@ export default {
...
@@ -237,35 +280,46 @@ export default {
});
});
});
});
},
},
async
getRiskList
(
id
)
{
getRiskList
(
id
)
{
this
.
$toast
.
loading
({
this
.
$toast
.
loading
({
message
:
"
加载中...
"
,
message
:
"
加载中...
"
,
forbidClick
:
true
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
loadingType
:
"
spinner
"
,
duration
:
0
duration
:
0
});
});
let
floor
=
await
this
.
floorList
(
this
.
buildingId
);
let
floor
=
this
.
floorList
(
this
.
buildingId
);
let
room
=
await
this
.
roomList
(
floor
[
0
].
id
);
let
risk
=
this
.
riskList
(
let
risk
=
await
this
.
riskList
(
id
,
this
.
buildingId
);
this
.
planId
,
this
.
buildingId
,
this
.
value1
,
this
.
value2
);
this
.
$toast
.
clear
();
this
.
$toast
.
clear
();
},
},
async
tabList
(
value
)
{
async
tabList
(
value
)
{
let
floor
=
await
this
.
floorList
(
value
);
let
floor
=
await
this
.
floorList
(
value
);
let
room
=
await
this
.
roomList
(
floor
[
0
].
id
);
let
risk
=
await
this
.
riskList
(
this
.
planId
,
value
);
let
risk
=
await
this
.
riskList
(
this
.
planId
,
value
);
},
},
changeBuild
(
name
){
changeBuild
()
{
let
arr
=
this
.
floorListData
.
map
((
item
)
=>
{
if
(
this
.
value0
)
{
if
(
item
.
name
==
name
){
console
.
log
(
this
.
floorListData
,
this
.
value0
,
111
);
return
item
.
children
let
arr
=
this
.
floorListData
.
filter
(
item
=>
item
.
name
==
this
.
value0
)[
0
]
.
children
;
console
.
log
(
arr
);
this
.
option1
=
this
.
changeData
(
arr
);
this
.
value1
=
arr
[
0
].
id
;
this
.
roomList
(
this
.
value1
);
}
}
});
this
.
option1
=
this
.
changeData
(
arr
[
0
])
this
.
value1
=
this
.
changeData
(
arr
[
0
]).
id
},
},
async
changeFloor
()
{
async
changeFloor
()
{
let
room
=
await
this
.
roomList
(
this
.
value1
);
let
room
=
await
this
.
roomList
(
this
.
value1
);
let
risk
=
await
this
.
riskList
(
this
.
planId
,
this
.
buildingId
,
this
.
value1
,
this
.
value2
);
let
risk
=
await
this
.
riskList
(
this
.
planId
,
this
.
buildingId
,
this
.
value1
,
this
.
value2
);
},
},
async
changeRoom
()
{
async
changeRoom
()
{
let
risk
=
await
this
.
riskList
(
let
risk
=
await
this
.
riskList
(
...
@@ -287,10 +341,10 @@ export default {
...
@@ -287,10 +341,10 @@ export default {
},
},
// 详情
// 详情
goDetail
(
data
)
{
goDetail
(
data
)
{
sessionStorage
.
setItem
(
'
buildingId
'
,
this
.
buildingId
)
sessionStorage
.
setItem
(
"
buildingId
"
,
this
.
buildingId
);
sessionStorage
.
setItem
(
'
planId
'
,
this
.
planId
)
sessionStorage
.
setItem
(
"
planId
"
,
this
.
planId
);
sessionStorage
.
setItem
(
'
buildingName
'
,
this
.
buildingName
)
sessionStorage
.
setItem
(
"
buildingName
"
,
this
.
buildingName
);
sessionStorage
.
setItem
(
'
inherentId
'
,
data
.
businessId
||
data
.
id
)
sessionStorage
.
setItem
(
"
inherentId
"
,
data
.
businessId
||
data
.
id
);
this
.
$router
.
push
({
this
.
$router
.
push
({
name
:
"
addCurrent
"
,
name
:
"
addCurrent
"
,
params
:
{
params
:
{
...
...
src/views/riskProject/add/taskList.vue
View file @
98dcf66f
...
@@ -179,7 +179,7 @@
...
@@ -179,7 +179,7 @@
<van-col
span=
"5"
>
<van-col
span=
"5"
>
<van-image
<van-image
width=
"46"
width=
"46"
height=
"7
6
"
height=
"7
4
"
src=
"http://rongtongpc.censoft.com.cn/dev-api/profile/upload/2023/07/08/guyou.png"
src=
"http://rongtongpc.censoft.com.cn/dev-api/profile/upload/2023/07/08/guyou.png"
/>
/>
<!--
<van-image
width=
"46"
height=
"46"
:src=
"item.avatar"
/>
-->
<!--
<van-image
width=
"46"
height=
"46"
:src=
"item.avatar"
/>
-->
...
@@ -191,11 +191,11 @@
...
@@ -191,11 +191,11 @@
</van-row>
</van-row>
<van-row
gutter=
""
>
<van-row
gutter=
""
>
<van-col
span=
"9"
>
风险等级:
</van-col>
<van-col
span=
"9"
>
风险等级:
</van-col>
<van-col
span=
"15"
>
{{
item
.
level
}}
</van-col>
<van-col
span=
"15"
>
{{
item
.
level
}}
</van-col>
</van-row>
</van-row>
<van-row
gutter=
""
>
<van-row
gutter=
""
>
<van-col
span=
"9"
>
上报时间:
</van-col>
<van-col
span=
"9"
>
上报时间:
</van-col>
<van-col
span=
"15"
>
{{
timestampToTimes
(
item
.
createTime
,
'
DT2
'
)
}}
</van-col>
<van-col
span=
"15"
>
{{
timestampToTimes
(
item
.
createTime
,
"
DT2
"
)
}}
</van-col>
</van-row>
</van-row>
</van-col>
</van-col>
</van-col>
</van-col>
...
@@ -236,15 +236,22 @@
...
@@ -236,15 +236,22 @@
<van-col
span=
"7"
<van-col
span=
"7"
><span
class=
"field-title"
>
任务节点:
</span></van-col
><span
class=
"field-title"
>
任务节点:
</span></van-col
>
>
<van-col
span=
"17"
>
{{
item
.
taskName
}}{{
<van-col
span=
"17"
item
.
taskResult
&&
item
.
taskResult
==
1
?
"
(审批通过)
"
:
"
(审批否决)
"
>
{{
item
.
taskName
}}
</van-col>
}}{{
item
.
taskResult
?
item
.
taskResult
==
1
?
"
(审批通过)
"
:
"
(审批否决)
"
:
""
}}
</van-col
>
</van-row>
</van-row>
<van-row
v-show=
"item.taskResult"
>
<van-row
v-show=
"item.taskResult"
>
<van-col
span=
"7"
<van-col
span=
"7"
><span
class=
"field-title"
>
审批意见:
</span></van-col
><span
class=
"field-title"
>
审批意见:
</span></van-col
>
>
<van-col
span=
"17"
>
{{
item
.
taskOpinion
}}
</van-col>
<van-col
span=
"17"
>
{{
item
.
taskOpinion
}}
</van-col>
</van-row>
</van-row>
<!--
<van-row>
<!--
<van-row>
<van-col
span=
"7"
<van-col
span=
"7"
...
@@ -261,7 +268,7 @@
...
@@ -261,7 +268,7 @@
</van-cell-group>
</van-cell-group>
</div>
</div>
</van-tab>
</van-tab>
<van-tab
title=
"
风险
评估报告"
>
<van-tab
title=
"评估报告"
>
<div
<div
style=
"height: 1.5rem;
style=
"height: 1.5rem;
background-color: #fff;
background-color: #fff;
...
@@ -766,7 +773,7 @@ export default {
...
@@ -766,7 +773,7 @@ export default {
name
:
"
taskDetail
"
,
name
:
"
taskDetail
"
,
params
:
{
params
:
{
id
:
item
.
id
,
id
:
item
.
id
,
floorId
:
item
.
floorId
floorId
:
item
.
floorId
}
}
});
});
}
}
...
...
src/views/riskProject/manage/index.vue
View file @
98dcf66f
...
@@ -145,7 +145,7 @@ export default {
...
@@ -145,7 +145,7 @@ export default {
},
},
methods
:
{
methods
:
{
timestampToTimes
(
time
)
{
timestampToTimes
(
time
)
{
return
timestampToTime
(
new
Date
(
time
),
"
DT
1
"
,
true
);
return
timestampToTime
(
new
Date
(
time
),
"
DT
2
"
,
true
);
},
},
handadd
()
{
handadd
()
{
this
.
$router
.
push
({
this
.
$router
.
push
({
...
@@ -200,6 +200,7 @@ export default {
...
@@ -200,6 +200,7 @@ export default {
});
});
sessionStorage
.
setItem
(
"
pathAuth
"
,
"
riskManage
"
);
sessionStorage
.
setItem
(
"
pathAuth
"
,
"
riskManage
"
);
sessionStorage
.
setItem
(
"
planId
"
,
data
.
id
);
sessionStorage
.
setItem
(
"
planId
"
,
data
.
id
);
sessionStorage
.
setItem
(
"
buildingId
"
,
""
);
this
.
showIndex
=
null
;
this
.
showIndex
=
null
;
},
},
// 确认
// 确认
...
...
src/views/riskProject/taskLedger/index.vue
View file @
98dcf66f
...
@@ -4,34 +4,48 @@
...
@@ -4,34 +4,48 @@
<LHeader
:text=
"text"
></LHeader>
<LHeader
:text=
"text"
></LHeader>
</van-sticky>
</van-sticky>
<van-sticky
offset-top=
"1.5rem"
>
<van-sticky
offset-top=
"1.5rem"
>
<van-search
v-model=
"searchValue"
show-action
placeholder=
"请输入搜索内容"
@
search=
"onSearch"
>
<van-search
v-model=
"searchValue"
show-action
placeholder=
"请输入搜索内容"
@
search=
"onSearch"
>
<template
#action
>
<template
#action
>
<div
@
click=
"onSearch"
>
搜索
</div>
<div
@
click=
"onSearch"
>
搜索
</div>
</
template
>
</
template
>
</van-search>
</van-search>
</van-sticky>
</van-sticky>
<div
class=
"con-list"
>
<div
class=
"con-list"
>
<van-cell-group
v-for=
"(item, index) in taskList"
:key=
"index"
inset
@
click=
"touchstart(index, item)"
>
<van-cell-group
v-for=
"(item, index) in taskList"
:key=
"index"
inset
@
click=
"touchstart(index, item)"
>
<div
style=
"font-size: 0.45rem;padding: 5px 0;"
>
{{ item.name }}
</div>
<div
style=
"font-size: 0.45rem;padding: 5px 0;"
>
{{ item.name }}
</div>
<van-row
gutter=
""
>
<van-row
gutter=
""
>
<van-col
span=
"17"
>
<van-col
span=
"17"
>
<van-row
gutter=
""
>
<van-row
gutter=
""
>
<van-col
span=
"9"
>
发起时间:
</van-col>
<van-col
span=
"9"
>
发起时间:
</van-col>
<van-col
span=
"15"
>
{{ timestampToTimes(item.startTime) }}
</van-col>
<van-col
span=
"15"
>
{{
timestampToTimes(item.startTime)
}}
</van-col>
</van-row>
</van-row>
<van-row
gutter=
""
>
<van-row
gutter=
""
>
<van-col
span=
"9"
>
处理人员:
</van-col>
<van-col
span=
"9"
>
处理人员:
</van-col>
<van-col
span=
"15"
>
{{ item.leaderUserName }}
</van-col>
<van-col
span=
"15"
>
{{ item.leaderUserName }}
</van-col>
</van-row>
</van-row>
</van-col>
</van-col>
<van-col
span=
"7"
:style=
"{
'color'
: '#03b615' }"
>
<van-col
span=
"7"
:style=
"{
color
: '#03b615' }"
>
{{ item.state }}
{{ item.state }}
</van-col>
</van-col>
</van-row>
</van-row>
<!-- 长按显示遮罩层 -->
<!-- 长按显示遮罩层 -->
<van-overlay
:show=
"showIndex == index"
>
<van-overlay
:show=
"showIndex == index"
>
<div
class=
"wrapper"
@
click.stop=
"showIndex = null"
>
<div
class=
"wrapper"
@
click.stop=
"showIndex = null"
>
<van-button
round
type=
"primary"
@
click=
"goDetail(item)"
>
详情
</van-button>
<van-button
round
type=
"primary"
@
click=
"goDetail(item)"
>
详情
</van-button
>
</div>
</div>
</van-overlay>
</van-overlay>
</van-cell-group>
</van-cell-group>
...
@@ -86,6 +100,7 @@ export default {
...
@@ -86,6 +100,7 @@ export default {
id
:
item
.
id
,
id
:
item
.
id
,
},
},
});
});
sessionStorage
.
setItem
(
"
buildingId
"
,
""
);
},
},
onSearch
(
searchValue
)
{
onSearch
(
searchValue
)
{
...
...
src/views/riskProject/taskLedger/presentDetail.vue
View file @
98dcf66f
...
@@ -3,45 +3,105 @@
...
@@ -3,45 +3,105 @@
<van-sticky
offset-top=
"0"
>
<van-sticky
offset-top=
"0"
>
<LHeader
:text=
"text"
></LHeader>
<LHeader
:text=
"text"
></LHeader>
</van-sticky>
</van-sticky>
<van-form
:scroll-to-error=
"true"
:show-error=
"false"
validate-trigger=
"onSubmit"
>
<van-form
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
:scroll-to-error=
"true"
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
:show-error=
"false"
style=
"position: relative;top: 32%;transform: translateY(-50%);"
>
validate-trigger=
"onSubmit"
>
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
风险信息
风险信息
</div>
</div>
<van-field
readonly
required
label=
"评估人"
placeholder=
"请输入"
/>
<van-field
readonly
required
label=
"评估人"
placeholder=
"请输入"
/>
<van-field
readonly
required
label=
"所属项目"
placeholder=
"请输入"
/>
<van-field
readonly
required
label=
"所属项目"
placeholder=
"请输入"
/>
<van-field
readonly
required
label=
"所属建筑物"
placeholder=
"请输入"
/>
<van-field
readonly
required
label=
"所属建筑物"
placeholder=
"请输入"
/>
<van-field
required
name=
"floorId"
label=
"所属楼层"
placeholder=
"请选择"
<van-field
:rules=
"[
{ required: true, message: '所属楼层不能为空' }]" />
required
clickable
name=
"floorName"
label=
"所属楼层"
placeholder=
"请选择"
:rules=
"[
{ required: true, message: '所属楼层不能为空' }]"
/>
<div
style=
"display: flex;"
>
<div
style=
"display: flex;"
>
<van-field
readonly
required
name=
"roomName"
label=
"所属房间"
placeholder=
"请输入"
<van-field
:rules=
"[
{ required: true, message: '所属房间不能为空' }]" />
readonly
required
name=
"roomName"
label=
"所属房间"
placeholder=
"请输入"
:rules=
"[
{ required: true, message: '所属房间不能为空' }]"
/>
<!--
<van-button
style=
"color: #cccc;background-color: #f0f1f5;"
icon=
"plus"
type=
"info"
/>
-->
<!--
<van-button
style=
"color: #cccc;background-color: #f0f1f5;"
icon=
"plus"
type=
"info"
/>
-->
</div>
</div>
<van-field
required
name=
"name"
label=
"风险源名称"
placeholder=
"请输入"
<van-field
:rules=
"[
{ required: true, message: '风险源名称不能为空' }]" />
required
<van-field
required
name=
"factor"
label=
"风险因素"
placeholder=
"请选择"
clickable
:rules=
"[
{ required: true, message: '风险因素不能为空' }]" />
name=
"name"
<van-field
required
name=
"type"
label=
"准事故类型"
placeholder=
"请选择"
label=
"风险源名称"
:rules=
"[
{ required: true, message: '准事故类型不能为空' }]" />
placeholder=
"请输入"
:rules=
"[
{ required: true, message: '风险源名称不能为空' }]"
/>
<van-field
required
name=
"factor"
label=
"风险因素"
placeholder=
"请选择"
:rules=
"[
{ required: true, message: '风险因素不能为空' }]"
/>
<van-field
required
name=
"type"
label=
"准事故类型"
placeholder=
"请选择"
:rules=
"[
{ required: true, message: '准事故类型不能为空' }]"
/>
<van-field
required
name=
"presenceLocation"
label=
"存在部位"
placeholder=
"请输入"
<van-field
:rules=
"[
{ required: true, message: '存在部位不能为空' }]" />
required
<van-field
readonly
required
name=
"level"
label=
"风险管控措施评价"
placeholder=
"请选择"
name=
"presenceLocation"
:rules=
"[
{ required: true, message: '风险等级不能为空' }]" />
label=
"存在部位"
placeholder=
"请输入"
:rules=
"[
{ required: true, message: '存在部位不能为空' }]"
/>
<van-field
readonly
required
name=
"level"
label=
"风险管控措施评价"
placeholder=
"请选择"
:rules=
"[
{ required: true, message: '风险等级不能为空' }]"
/>
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<div
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
style=
"position: relative;top: 32%;transform: translateY(-50%);"
>
>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
风险源图片
风险源图片
</div>
</div>
<van-field
name=
"hdPicture1"
label=
"风险源图片"
>
<van-field
name=
"hdPicture1"
label=
"风险源图片"
>
<template
#input
>
<template
#input
>
<van-uploader
multiple
:max-count=
"5"
disabled
upload-text=
"最多上传五个"
v-model=
"uploaderImg"
>
<van-uploader
multiple
:max-count=
"5"
disabled
upload-text=
"最多上传五个"
v-model=
"uploaderImg"
>
<template
slot=
"default"
>
<template
slot=
"default"
>
<div
style=
"
<div
style=
"
width: 2.13333rem;
width: 2.13333rem;
height: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
background: #f7f8fa;
...
@@ -49,26 +109,53 @@
...
@@ -49,26 +109,53 @@
align-items: center;
align-items: center;
justify-content: center;
justify-content: center;
flex-direction: column;
flex-direction: column;
"
>
"
<img
src=
"@/assets/upload/pic.png"
alt=
""
style=
"width: 0.64rem; height: 0.64rem"
/>
>
<img
src=
"@/assets/upload/pic.png"
alt=
""
style=
"width: 0.64rem; height: 0.64rem"
/>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
</div>
</div>
</
template
>
</
template
>
</van-uploader>
</van-uploader>
</template>
</template>
</van-field>
</van-field>
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<div
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
style=
"position: relative;top: 32%;transform: translateY(-50%);"
>
>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
现有技术措施
现有技术措施
</div>
</div>
<van-field
disabled
name=
"measuresProject"
label=
"技术措施"
type=
"textarea"
rows=
"1"
autosize
placeholder=
"请输入"
/>
<van-field
disabled
name=
"measuresProject"
label=
"技术措施"
type=
"textarea"
rows=
"1"
autosize
placeholder=
"请输入"
/>
<van-field
name=
"measuresProjectFile[]"
label=
" "
>
<van-field
name=
"measuresProjectFile[]"
label=
" "
>
<
template
#input
>
<
template
#input
>
<van-uploader
disabled
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresProjectFile"
<van-uploader
accept=
"file"
result-type=
"file"
@
delete=
"deleteFile(...arguments, 'measuresProjectFile')"
>
disabled
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresProjectFile"
accept=
"file"
result-type=
"file"
@
delete=
"deleteFile(...arguments, 'measuresProjectFile')"
>
<template
slot=
"default"
>
<template
slot=
"default"
>
<div
style=
"
<div
style=
"
width: 2.13333rem;
width: 2.13333rem;
height: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
background: #f7f8fa;
...
@@ -76,45 +163,53 @@
...
@@ -76,45 +163,53 @@
align-items: center;
align-items: center;
justify-content: center;
justify-content: center;
flex-direction: column;
flex-direction: column;
"
>
"
<img
src=
"@/assets/upload/file.png"
alt=
""
style=
"width: 0.64rem; height: 0.64rem"
/>
>
<img
src=
"@/assets/upload/file.png"
alt=
""
style=
"width: 0.64rem; height: 0.64rem"
/>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
</div>
</div>
</
template
>
</
template
>
</van-uploader>
</van-uploader>
</template>
</template>
</van-field>
</van-field>
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<div
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
>
应采取的管控措施
<img
</div>
src=
"@/assets/accidentIcon/bookmark.svg"
<van-field
v-model=
"form.measuresAdministration"
name=
"measuresAdministration"
label=
""
type=
"textarea"
rows=
"3"
alt=
""
autosize
placeholder=
"请输入"
/>
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=
"3"
autosize
placeholder=
"请输入"
/>
<van-field
readonly
required
name=
"trouble"
:value=
"form.trouble"
label=
"管控责任单位"
placeholder=
"请选择"
@
click=
"showTrouble = true"
:rules=
"[{ required: true, message: '管控责任单位不能为空' }]"
/>
<van-field
readonly
required
name=
"trouble"
:value=
"form.trouble"
label=
"管控责任人"
placeholder=
"请选择"
@
click=
"showTrouble = true"
:rules=
"[{ required: true, message: '管控责任人不能为空' }]"
/>
<!-- <div style="height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;">
<img src="@/assets/accidentIcon/bookmark.svg" alt=""
style="position: relative;top: 32%;transform: translateY(-50%);">
现有管理措施
现有管理措施
</div> -->
</div>
<!-- <van-field disabled name="measuresAdministration" label="管理措施" type="textarea" rows="1" autosize
<van-field
placeholder="请输入" /> -->
disabled
<!-- <van-field name="measuresAdministrationFile[]" label=" ">
name=
"measuresAdministration"
label=
"管理措施"
type=
"textarea"
rows=
"1"
autosize
placeholder=
"请输入"
/>
<van-field
name=
"measuresAdministrationFile[]"
label=
" "
>
<
template
#input
>
<
template
#input
>
<van-uploader disabled multiple :max-count="5" upload-text="最多上传五个" v-model="measuresAdministrationFile"
<van-uploader
accept="file" result-type="file" @delete="deleteFile(...arguments, 'measuresAdministrationFile')">
disabled
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresAdministrationFile"
accept=
"file"
result-type=
"file"
@
delete=
"deleteFile(...arguments, 'measuresAdministrationFile')"
>
<template
slot=
"default"
>
<template
slot=
"default"
>
<div style="
<div
style=
"
width: 2.13333rem;
width: 2.13333rem;
height: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
background: #f7f8fa;
...
@@ -122,26 +217,53 @@
...
@@ -122,26 +217,53 @@
align-items: center;
align-items: center;
justify-content: center;
justify-content: center;
flex-direction: column;
flex-direction: column;
">
"
<img src="@/assets/upload/file.png" alt="" style="width: 0.64rem; height: 0.64rem" />
>
<img
src=
"@/assets/upload/file.png"
alt=
""
style=
"width: 0.64rem; height: 0.64rem"
/>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
</div>
</div>
</
template
>
</
template
>
</van-uploader>
</van-uploader>
</template>
</template>
</van-field> -->
</van-field>
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<div
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
style=
"position: relative;top: 32%;transform: translateY(-50%);"
>
>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
现有应急措施
现有应急措施
</div>
</div>
<van-field
disabled
name=
"measuresEmergency"
label=
"应急措施"
type=
"textarea"
rows=
"1"
autosize
placeholder=
"请输入"
/>
<van-field
disabled
name=
"measuresEmergency"
label=
"应急措施"
type=
"textarea"
rows=
"1"
autosize
placeholder=
"请输入"
/>
<van-field
name=
"measuresEmergencyFile[]"
label=
" "
>
<van-field
name=
"measuresEmergencyFile[]"
label=
" "
>
<
template
#input
>
<
template
#input
>
<van-uploader
disabled
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresEmergencyFile"
<van-uploader
accept=
"file"
result-type=
"file"
@
delete=
"deleteFile(...arguments, 'measuresEmergencyFile')"
>
disabled
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresEmergencyFile"
accept=
"file"
result-type=
"file"
@
delete=
"deleteFile(...arguments, 'measuresEmergencyFile')"
>
<template
slot=
"default"
>
<template
slot=
"default"
>
<div
style=
"
<div
style=
"
width: 2.13333rem;
width: 2.13333rem;
height: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
background: #f7f8fa;
...
@@ -149,23 +271,30 @@
...
@@ -149,23 +271,30 @@
align-items: center;
align-items: center;
justify-content: center;
justify-content: center;
flex-direction: column;
flex-direction: column;
"
>
"
<img
src=
"@/assets/upload/file.png"
alt=
""
style=
"width: 0.64rem; height: 0.64rem"
/>
>
<img
src=
"@/assets/upload/file.png"
alt=
""
style=
"width: 0.64rem; height: 0.64rem"
/>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
</div>
</div>
</
template
>
</
template
>
</van-uploader>
</van-uploader>
</template>
</template>
</van-field>
</van-field>
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<div
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
style=
"position: relative;top: 32%;transform: translateY(-50%);"
>
>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
参考依据
参考依据
</div>
</div>
<van-field
readonly
required
clickable
name=
"trouble"
:value=
"form.trouble"
label=
"参考依据"
placeholder=
"请选择"
@
click=
"showTrouble = true"
:rules=
"[{ required: true, message: '事故类型不能为空' }]"
/>
</van-form>
</van-form>
</div>
</div>
</template>
</template>
...
@@ -187,9 +316,7 @@ export default {
...
@@ -187,9 +316,7 @@ export default {
id
:
""
,
id
:
""
,
isTimely
:
1
,
isTimely
:
1
,
active
:
0
,
active
:
0
,
form
:
{
form
:
{},
},
projectId
:
""
,
// 所属工程
projectId
:
""
,
// 所属工程
projectName
:
""
,
// 所属工程
projectName
:
""
,
// 所属工程
projectDirectorName
:
""
,
// 所属工程
projectDirectorName
:
""
,
// 所属工程
...
@@ -202,9 +329,9 @@ export default {
...
@@ -202,9 +329,9 @@ export default {
columnsFactor
:
[],
columnsFactor
:
[],
messageList
:
[
messageList
:
[
{
{
title
:
'
回显风险源名称
'
,
title
:
"
回显风险源名称
"
,
time
:
'
2022-12-12
'
,
time
:
"
2022-12-12
"
,
name
:
'
Mr.周
'
,
name
:
"
Mr.周
"
,
state
:
1
state
:
1
}
}
],
],
...
@@ -217,10 +344,10 @@ export default {
...
@@ -217,10 +344,10 @@ export default {
columnsTrouble
:
[],
columnsTrouble
:
[],
setRank
:
""
,
//风险定级
setRank
:
""
,
//风险定级
showSetRank
:
false
,
showSetRank
:
false
,
columnsSetRank
:
[
"
矩阵式定级
"
,
"
其他定级方式
"
],
//严重程度
columnsSetRank
:
[
"
矩阵式定级
"
,
"
其他定级方式
"
],
//严重程度
riskRank
:
""
,
// 风险等级
riskRank
:
""
,
// 风险等级
showRiskRank
:
false
,
showRiskRank
:
false
,
columnsRiskRank
:
[],
//发生可能性
columnsRiskRank
:
[],
//发生可能性
showSetRankMode
:
false
,
// 是否显示定级方式
showSetRankMode
:
false
,
// 是否显示定级方式
setRankMode
:
""
,
// 定级方式文字
setRankMode
:
""
,
// 定级方式文字
setRankModeImg
:
[],
// 定级方式图片
setRankModeImg
:
[],
// 定级方式图片
...
@@ -251,7 +378,7 @@ export default {
...
@@ -251,7 +378,7 @@ export default {
possibleValue
:
""
,
possibleValue
:
""
,
possibleScore
:
0
,
possibleScore
:
0
,
severityValue
:
""
,
severityValue
:
""
,
severityScore
:
0
,
severityScore
:
0
};
};
},
},
created
()
{
created
()
{
...
@@ -264,12 +391,8 @@ export default {
...
@@ -264,12 +391,8 @@ export default {
// this.form.projectId = '测试项目',
// this.form.projectId = '测试项目',
// this.form.level = this.$route.params.level ? this.$route.params.level :''
// this.form.level = this.$route.params.level ? this.$route.params.level :''
},
},
methods
:
{
methods
:
{},
watch
:
{}
},
watch
:
{
},
};
};
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
...
...
src/views/riskProject/taskLedger/tabDetail.vue
View file @
98dcf66f
<
template
>
<
template
>
<div>
<div>
<van-form
:scroll-to-error=
"true"
:show-error=
"false"
validate-trigger=
"onSubmit"
>
<van-form
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
:scroll-to-error=
"true"
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
:show-error=
"false"
style=
"position: relative;top: 32%;transform: translateY(-50%);"
>
validate-trigger=
"onSubmit"
>
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
风险信息
风险信息
</div>
</div>
<van-field
readonly
required
:value=
"InherentRisk.userName"
label=
"评估人"
placeholder=
"请输入"
/>
<van-field
<van-field
readonly
required
:value=
"InherentRisk.projectName"
label=
"所属项目"
placeholder=
"请输入"
/>
readonly
<van-field
readonly
required
:value=
"InherentRisk.buildingName"
label=
"所属建筑物"
placeholder=
"请输入"
/>
required
:value=
"InherentRisk.userName"
label=
"评估人"
placeholder=
"请输入"
/>
<van-field
readonly
required
:value=
"InherentRisk.projectName"
label=
"所属项目"
placeholder=
"请输入"
/>
<van-field
readonly
required
:value=
"InherentRisk.buildingName"
label=
"所属建筑物"
placeholder=
"请输入"
/>
<van-field
required
clickable
name=
"floorId"
:value=
"InherentRisk.floorName"
label=
"所属楼层"
placeholder=
"请选择"
<van-field
:rules=
"[
{ required: true, message: '所属楼层不能为空' }]" />
required
clickable
name=
"floorName"
:value=
"InherentRisk.floorName"
label=
"所属楼层"
placeholder=
"请选择"
:rules=
"[
{ required: true, message: '所属楼层不能为空' }]"
/>
<div
style=
"display: flex;"
>
<div
style=
"display: flex;"
>
<van-field
readonly
required
name=
"roomName"
:value=
"InherentRisk.roomName"
label=
"所属房间"
placeholder=
"请输入"
<van-field
:rules=
"[
{ required: true, message: '所属房间不能为空' }]" />
readonly
required
name=
"roomName"
:value=
"InherentRisk.roomName"
label=
"所属房间"
placeholder=
"请输入"
:rules=
"[
{ required: true, message: '所属房间不能为空' }]"
/>
<!--
<van-button
style=
"color: #cccc;background-color: #f0f1f5;"
icon=
"plus"
type=
"info"
/>
-->
<!--
<van-button
style=
"color: #cccc;background-color: #f0f1f5;"
icon=
"plus"
type=
"info"
/>
-->
</div>
</div>
<van-field
required
clickable
name=
"name"
v-model=
"InherentRisk.factor"
label=
"风险源名称"
placeholder=
"请输入"
<van-field
:rules=
"[
{ required: true, message: '风险源名称不能为空' }]" />
required
<van-field
v-model=
"InherentRisk.factor"
required
name=
"factor"
label=
"风险因素"
placeholder=
"请选择"
clickable
:rules=
"[
{ required: true, message: '风险因素不能为空' }]" />
name=
"name"
<van-field
v-model=
"InherentRisk.type"
required
name=
"type"
label=
"准事故类型"
placeholder=
"请选择"
v-model=
"InherentRisk.factor"
:rules=
"[
{ required: true, message: '准事故类型不能为空' }]" />
label=
"风险源名称"
placeholder=
"请输入"
:rules=
"[
{ required: true, message: '风险源名称不能为空' }]"
/>
<van-field
v-model=
"InherentRisk.factor"
required
name=
"factor"
label=
"风险因素"
placeholder=
"请选择"
:rules=
"[
{ required: true, message: '风险因素不能为空' }]"
/>
<van-field
v-model=
"InherentRisk.type"
required
name=
"type"
label=
"准事故类型"
placeholder=
"请选择"
:rules=
"[
{ required: true, message: '准事故类型不能为空' }]"
/>
<van-field
readonly
v-model=
"InherentRisk.level"
required
name=
"level"
label=
"风险等级"
placeholder=
"请选择"
<van-field
:rules=
"[
{ required: true, message: '风险等级不能为空' }]" />
readonly
v-model=
"InherentRisk.level"
required
name=
"level"
label=
"风险等级"
placeholder=
"请选择"
:rules=
"[
{ required: true, message: '风险等级不能为空' }]"
/>
<van-field
required
name=
"presenceLocation"
v-model=
"InherentRisk.presenceLocation"
label=
"存在部位"
placeholder=
"请输入"
<van-field
:rules=
"[
{ required: true, message: '存在部位不能为空' }]" />
required
name=
"presenceLocation"
v-model=
"InherentRisk.presenceLocation"
label=
"存在部位"
placeholder=
"请输入"
:rules=
"[
{ required: true, message: '存在部位不能为空' }]"
/>
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<div
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
style=
"position: relative;top: 32%;transform: translateY(-50%);"
>
>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
风险源图片
风险源图片
</div>
</div>
<van-field
name=
"hdPicture1"
label=
"风险源图片"
>
<van-field
name=
"hdPicture1"
label=
"风险源图片"
>
<template
#input
>
<template
#input
>
<van-uploader
multiple
:max-count=
"5"
disabled
<van-uploader
upload-text=
"最多上传五个"
v-model=
"uploaderImg"
>
multiple
:max-count=
"5"
disabled
upload-text=
"最多上传五个"
v-model=
"uploaderImg"
>
<template
slot=
"default"
>
<template
slot=
"default"
>
<div
style=
"
<div
style=
"
width: 2.13333rem;
width: 2.13333rem;
height: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
background: #f7f8fa;
...
@@ -48,27 +132,54 @@
...
@@ -48,27 +132,54 @@
align-items: center;
align-items: center;
justify-content: center;
justify-content: center;
flex-direction: column;
flex-direction: column;
"
>
"
<img
src=
"@/assets/upload/pic.png"
alt=
""
style=
"width: 0.64rem; height: 0.64rem"
/>
>
<img
src=
"@/assets/upload/pic.png"
alt=
""
style=
"width: 0.64rem; height: 0.64rem"
/>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
</div>
</div>
</
template
>
</
template
>
</van-uploader>
</van-uploader>
</template>
</template>
</van-field>
</van-field>
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<div
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
style=
"position: relative;top: 32%;transform: translateY(-50%);"
>
>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
应有技术措施
应有技术措施
</div>
</div>
<van-field
disabled
v-model=
"InherentRisk.measuresProject"
name=
"measuresProject"
label=
"技术措施"
type=
"textarea"
rows=
"1"
autosize
<van-field
placeholder=
"请输入"
/>
disabled
v-model=
"InherentRisk.measuresProject"
name=
"measuresProject"
label=
"技术措施"
type=
"textarea"
rows=
"1"
autosize
placeholder=
"请输入"
/>
<van-field
name=
"measuresProjectFile[]"
label=
" "
>
<van-field
name=
"measuresProjectFile[]"
label=
" "
>
<
template
#input
>
<
template
#input
>
<van-uploader
disabled
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresProjectFile"
accept=
"file"
<van-uploader
result-type=
"file"
@
delete=
"deleteFile(...arguments, 'measuresProjectFile')"
>
disabled
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresProjectFile"
accept=
"file"
result-type=
"file"
@
delete=
"deleteFile(...arguments, 'measuresProjectFile')"
>
<template
slot=
"default"
>
<template
slot=
"default"
>
<div
style=
"
<div
style=
"
width: 2.13333rem;
width: 2.13333rem;
height: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
background: #f7f8fa;
...
@@ -76,27 +187,54 @@
...
@@ -76,27 +187,54 @@
align-items: center;
align-items: center;
justify-content: center;
justify-content: center;
flex-direction: column;
flex-direction: column;
"
>
"
<img
src=
"@/assets/upload/file.png"
alt=
""
style=
"width: 0.64rem; height: 0.64rem"
/>
>
<img
src=
"@/assets/upload/file.png"
alt=
""
style=
"width: 0.64rem; height: 0.64rem"
/>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
</div>
</div>
</
template
>
</
template
>
</van-uploader>
</van-uploader>
</template>
</template>
</van-field>
</van-field>
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<div
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
style=
"position: relative;top: 32%;transform: translateY(-50%);"
>
>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
应有管理措施
应有管理措施
</div>
</div>
<van-field
disabled
v-model=
"InherentRisk.measuresAdministration"
name=
"measuresAdministration"
label=
"管理措施"
type=
"textarea"
<van-field
rows=
"1"
autosize
placeholder=
"请输入"
/>
disabled
v-model=
"InherentRisk.measuresAdministration"
name=
"measuresAdministration"
label=
"管理措施"
type=
"textarea"
rows=
"1"
autosize
placeholder=
"请输入"
/>
<van-field
name=
"measuresAdministrationFile[]"
label=
" "
>
<van-field
name=
"measuresAdministrationFile[]"
label=
" "
>
<
template
#input
>
<
template
#input
>
<van-uploader
disabled
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresAdministrationFile"
<van-uploader
accept=
"file"
result-type=
"file"
@
delete=
"deleteFile(...arguments, 'measuresAdministrationFile')"
>
disabled
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresAdministrationFile"
accept=
"file"
result-type=
"file"
@
delete=
"deleteFile(...arguments, 'measuresAdministrationFile')"
>
<template
slot=
"default"
>
<template
slot=
"default"
>
<div
style=
"
<div
style=
"
width: 2.13333rem;
width: 2.13333rem;
height: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
background: #f7f8fa;
...
@@ -104,27 +242,54 @@
...
@@ -104,27 +242,54 @@
align-items: center;
align-items: center;
justify-content: center;
justify-content: center;
flex-direction: column;
flex-direction: column;
"
>
"
<img
src=
"@/assets/upload/file.png"
alt=
""
style=
"width: 0.64rem; height: 0.64rem"
/>
>
<img
src=
"@/assets/upload/file.png"
alt=
""
style=
"width: 0.64rem; height: 0.64rem"
/>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
</div>
</div>
</
template
>
</
template
>
</van-uploader>
</van-uploader>
</template>
</template>
</van-field>
</van-field>
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<div
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
style=
"position: relative;top: 32%;transform: translateY(-50%);"
>
>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
应有应急措施
应有应急措施
</div>
</div>
<van-field
disabled
v-model=
"InherentRisk.measuresEmergency"
name=
"measuresEmergency"
label=
"应急措施"
type=
"textarea"
rows=
"1"
<van-field
autosize
placeholder=
"请输入"
/>
disabled
v-model=
"InherentRisk.measuresEmergency"
name=
"measuresEmergency"
label=
"应急措施"
type=
"textarea"
rows=
"1"
autosize
placeholder=
"请输入"
/>
<van-field
name=
"measuresEmergencyFile[]"
label=
" "
>
<van-field
name=
"measuresEmergencyFile[]"
label=
" "
>
<
template
#input
>
<
template
#input
>
<van-uploader
disabled
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresEmergencyFile"
accept=
"file"
<van-uploader
result-type=
"file"
@
delete=
"deleteFile(...arguments, 'measuresEmergencyFile')"
>
disabled
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresEmergencyFile"
accept=
"file"
result-type=
"file"
@
delete=
"deleteFile(...arguments, 'measuresEmergencyFile')"
>
<template
slot=
"default"
>
<template
slot=
"default"
>
<div
style=
"
<div
style=
"
width: 2.13333rem;
width: 2.13333rem;
height: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
background: #f7f8fa;
...
@@ -132,24 +297,30 @@
...
@@ -132,24 +297,30 @@
align-items: center;
align-items: center;
justify-content: center;
justify-content: center;
flex-direction: column;
flex-direction: column;
"
>
"
<img
src=
"@/assets/upload/file.png"
alt=
""
style=
"width: 0.64rem; height: 0.64rem"
/>
>
<img
src=
"@/assets/upload/file.png"
alt=
""
style=
"width: 0.64rem; height: 0.64rem"
/>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
</div>
</div>
</
template
>
</
template
>
</van-uploader>
</van-uploader>
</template>
</template>
</van-field>
</van-field>
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<div
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
style=
"position: relative;top: 32%;transform: translateY(-50%);"
>
>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
参考依据
参考依据
</div>
</div>
<van-field
readonly
required
clickable
name=
"trouble"
:value=
"form.trouble"
label=
"参考依据"
placeholder=
"请选择"
@
click=
"showTrouble = true"
:rules=
"[{ required: true, message: '事故类型不能为空' }]"
/>
</van-form>
</van-form>
</div>
</div>
</template>
</template>
...
@@ -167,9 +338,7 @@ export default {
...
@@ -167,9 +338,7 @@ export default {
id
:
""
,
id
:
""
,
isTimely
:
1
,
isTimely
:
1
,
active
:
0
,
active
:
0
,
form
:
{
form
:
{},
},
projectId
:
""
,
// 所属工程
projectId
:
""
,
// 所属工程
projectName
:
""
,
// 所属工程
projectName
:
""
,
// 所属工程
projectDirectorName
:
""
,
// 所属工程
projectDirectorName
:
""
,
// 所属工程
...
@@ -182,9 +351,9 @@ export default {
...
@@ -182,9 +351,9 @@ export default {
columnsFactor
:
[],
columnsFactor
:
[],
messageList
:
[
messageList
:
[
{
{
title
:
'
回显风险源名称
'
,
title
:
"
回显风险源名称
"
,
time
:
'
2022-12-12
'
,
time
:
"
2022-12-12
"
,
name
:
'
Mr.周
'
,
name
:
"
Mr.周
"
,
state
:
1
state
:
1
}
}
],
],
...
@@ -197,10 +366,10 @@ export default {
...
@@ -197,10 +366,10 @@ export default {
columnsTrouble
:
[],
columnsTrouble
:
[],
setRank
:
""
,
//风险定级
setRank
:
""
,
//风险定级
showSetRank
:
false
,
showSetRank
:
false
,
columnsSetRank
:
[
"
矩阵式定级
"
,
"
其他定级方式
"
],
//严重程度
columnsSetRank
:
[
"
矩阵式定级
"
,
"
其他定级方式
"
],
//严重程度
riskRank
:
""
,
// 风险等级
riskRank
:
""
,
// 风险等级
showRiskRank
:
false
,
showRiskRank
:
false
,
columnsRiskRank
:
[],
//发生可能性
columnsRiskRank
:
[],
//发生可能性
showSetRankMode
:
false
,
// 是否显示定级方式
showSetRankMode
:
false
,
// 是否显示定级方式
setRankMode
:
""
,
// 定级方式文字
setRankMode
:
""
,
// 定级方式文字
setRankModeImg
:
[],
// 定级方式图片
setRankModeImg
:
[],
// 定级方式图片
...
@@ -231,7 +400,7 @@ export default {
...
@@ -231,7 +400,7 @@ export default {
possibleValue
:
""
,
possibleValue
:
""
,
possibleScore
:
0
,
possibleScore
:
0
,
severityValue
:
""
,
severityValue
:
""
,
severityScore
:
0
,
severityScore
:
0
};
};
},
},
created
()
{
created
()
{
...
@@ -244,12 +413,8 @@ export default {
...
@@ -244,12 +413,8 @@ export default {
// this.form.projectId = '测试项目',
// this.form.projectId = '测试项目',
// this.form.level = this.$route.params.level ? this.$route.params.level :''
// this.form.level = this.$route.params.level ? this.$route.params.level :''
},
},
methods
:
{
methods
:
{},
watch
:
{}
},
watch
:
{
},
};
};
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
...
...
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