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
565e2fc9
Commit
565e2fc9
authored
Aug 14, 2023
by
p-wanping.song
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.新增楼层,复制功能
2.风险评估模型功能开发
parent
8a61229a
Changes
16
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
1039 additions
and
89 deletions
+1039
-89
src/components/selectFloor.vue
src/components/selectFloor.vue
+1
-1
src/router/index.js
src/router/index.js
+58
-39
src/store/mutations.js
src/store/mutations.js
+13
-1
src/store/state.js
src/store/state.js
+7
-2
src/views/drawCanvas/riskView.vue
src/views/drawCanvas/riskView.vue
+33
-5
src/views/riskProject/add/addCurrent.vue
src/views/riskProject/add/addCurrent.vue
+44
-13
src/views/riskProject/add/addFloor.vue
src/views/riskProject/add/addFloor.vue
+131
-0
src/views/riskProject/add/addInherent.vue
src/views/riskProject/add/addInherent.vue
+33
-3
src/views/riskProject/add/addPresent.vue
src/views/riskProject/add/addPresent.vue
+29
-13
src/views/riskProject/add/copyFloor.vue
src/views/riskProject/add/copyFloor.vue
+196
-0
src/views/riskProject/add/inherentRisks.vue
src/views/riskProject/add/inherentRisks.vue
+17
-0
src/views/riskProject/add/resultPage.vue
src/views/riskProject/add/resultPage.vue
+38
-12
src/views/riskProject/assess/model/index.js
src/views/riskProject/assess/model/index.js
+1
-0
src/views/riskProject/assess/model/step1.vue
src/views/riskProject/assess/model/step1.vue
+150
-0
src/views/riskProject/assess/model/step2.vue
src/views/riskProject/assess/model/step2.vue
+287
-0
vue.config.js
vue.config.js
+1
-0
No files found.
src/components/selectFloor.vue
View file @
565e2fc9
...
...
@@ -9,7 +9,7 @@
</div>
</van-sticky>
-->
<div
style=
"margin-bottom: 1.4rem;"
>
<van-tree-select
:items=
"listdata"
:active-id.sync=
"activeId"
:main-active-index.sync=
"activeIndex"
@
click-item=
"clickItem"
>
<van-tree-select
height=
"auto"
:items=
"listdata"
:active-id.sync=
"activeId"
:main-active-index.sync=
"activeIndex"
@
click-item=
"clickItem"
>
</van-tree-select>
</div>
<!-- 底部信息 -->
...
...
src/router/index.js
View file @
565e2fc9
...
...
@@ -5,223 +5,242 @@ Vue.use(VueRouter);
const
routes
=
[
{
path
:
"
/
"
,
redirect
:
"
/login
"
redirect
:
"
/login
"
,
},
// 登录页
{
path
:
"
/login
"
,
name
:
"
login
"
,
component
:
()
=>
import
(
"
../views/login.vue
"
)
component
:
()
=>
import
(
"
../views/login.vue
"
)
,
},
// 我的地盘页面
{
path
:
"
/my
"
,
name
:
"
my
"
,
component
:
()
=>
import
(
"
../views/my
"
)
component
:
()
=>
import
(
"
../views/my
"
)
,
},
{
path
:
"
/my-role
"
,
name
:
"
my-role
"
,
meta
:
{
title
:
"
我的权限
"
title
:
"
我的权限
"
,
},
component
:
()
=>
import
(
"
@/views/my/role
"
)
component
:
()
=>
import
(
"
@/views/my/role
"
)
,
},
{
path
:
"
/my-reset-pas
"
,
name
:
"
my-reset-pas
"
,
meta
:
{
title
:
"
修改密码
"
title
:
"
修改密码
"
,
},
component
:
()
=>
import
(
"
@/views/my/resetPas
"
)
component
:
()
=>
import
(
"
@/views/my/resetPas
"
)
,
},
// 安全工作台页面
{
path
:
"
/save-workbench
"
,
name
:
"
save-workbench
"
,
component
:
()
=>
import
(
"
../views/saveWorkbench
"
)
component
:
()
=>
import
(
"
../views/saveWorkbench
"
)
,
},
// 创建任务页面
{
path
:
"
/create-task
"
,
name
:
"
create-task
"
,
component
:
()
=>
import
(
"
../views/createTask
"
)
component
:
()
=>
import
(
"
../views/createTask
"
)
,
},
// 选择任务类型
{
path
:
"
/task-type
"
,
name
:
"
task-type
"
,
component
:
()
=>
import
(
"
../views/createTask/taskSubPage/taskType.vue
"
)
component
:
()
=>
import
(
"
../views/createTask/taskSubPage/taskType.vue
"
)
,
},
// 选择作业任务
{
path
:
"
/work-task
"
,
name
:
"
work-task
"
,
component
:
()
=>
import
(
"
../views/createTask/taskSubPage/workTask
"
)
component
:
()
=>
import
(
"
../views/createTask/taskSubPage/workTask
"
)
,
},
// 选择作业综合班
{
path
:
"
/work-class
"
,
name
:
"
work-class
"
,
component
:
()
=>
import
(
"
../views/createTask/taskSubPage/workClass
"
)
component
:
()
=>
import
(
"
../views/createTask/taskSubPage/workClass
"
)
,
},
// 选择作业综合组
{
path
:
"
/work-group
"
,
name
:
"
work-group
"
,
component
:
()
=>
import
(
"
../views/createTask/taskSubPage/workGroup
"
)
component
:
()
=>
import
(
"
../views/createTask/taskSubPage/workGroup
"
)
,
},
// 选择作业负责人
{
path
:
"
/work-leader
"
,
name
:
"
work-leader
"
,
component
:
()
=>
import
(
"
../views/createTask/taskSubPage/workLeader
"
)
component
:
()
=>
import
(
"
../views/createTask/taskSubPage/workLeader
"
)
,
},
// 选择作业其他人员
{
path
:
"
/work-other-per
"
,
name
:
"
work-other-per
"
,
component
:
()
=>
import
(
"
../views/createTask/taskSubPage/workOtherPer
"
)
component
:
()
=>
import
(
"
../views/createTask/taskSubPage/workOtherPer
"
)
,
},
// 选择微流域
{
path
:
"
/micro-watersh
"
,
name
:
"
micro-watersh
"
,
component
:
()
=>
import
(
"
../views/createTask/taskSubPage/microWatersh
"
)
component
:
()
=>
import
(
"
../views/createTask/taskSubPage/microWatersh
"
)
,
},
// 选择管段
{
path
:
"
/pipe-section
"
,
name
:
"
pipe-section
"
,
component
:
()
=>
import
(
"
../views/createTask/taskSubPage/pipeSection
"
)
component
:
()
=>
import
(
"
../views/createTask/taskSubPage/pipeSection
"
)
,
},
// 选择车牌号
{
path
:
"
/license-plate
"
,
name
:
"
license-plate
"
,
component
:
()
=>
import
(
"
../views/createTask/taskSubPage/licensePlate
"
)
component
:
()
=>
import
(
"
../views/createTask/taskSubPage/licensePlate
"
)
,
},
// 选择手杆爬行器
{
path
:
"
/work-device
"
,
name
:
"
work-device
"
,
component
:
()
=>
import
(
"
../views/createTask/taskSubPage/workDevice
"
)
component
:
()
=>
import
(
"
../views/createTask/taskSubPage/workDevice
"
)
,
},
//风险项目新增
{
path
:
"
/riskAdd
"
,
name
:
"
riskAdd
"
,
component
:
()
=>
import
(
"
../views/riskProject/add
"
)
component
:
()
=>
import
(
"
../views/riskProject/add
"
)
,
},
//风险项目管理
{
path
:
"
/riskManage
"
,
name
:
"
riskManage
"
,
component
:
()
=>
import
(
"
../views/riskProject/manage
"
)
component
:
()
=>
import
(
"
../views/riskProject/manage
"
)
,
},
//风险评估
{
path
:
"
/riskAssess
"
,
name
:
"
riskAssess
"
,
component
:
()
=>
import
(
"
../views/riskProject/assess
"
)
component
:
()
=>
import
(
"
../views/riskProject/assess
"
)
,
},
//风险审批
{
path
:
"
/riskApprove
"
,
name
:
"
riskApprove
"
,
component
:
()
=>
import
(
"
../views/riskProject/approve
"
)
component
:
()
=>
import
(
"
../views/riskProject/approve
"
)
,
},
//风险台账
{
path
:
"
/riskLedger
"
,
name
:
"
riskLedger
"
,
component
:
()
=>
import
(
"
../views/riskProject/ledger
"
)
component
:
()
=>
import
(
"
../views/riskProject/ledger
"
)
,
},
//任务单
{
path
:
"
/riskTaskList
"
,
name
:
"
riskTaskList
"
,
component
:
()
=>
import
(
"
../views/riskProject/add/taskList.vue
"
)
component
:
()
=>
import
(
"
../views/riskProject/add/taskList.vue
"
)
,
},
//固有风险列表
{
path
:
"
/riskInherent
"
,
name
:
"
riskInherent
"
,
component
:
()
=>
import
(
"
../views/riskProject/add/inherentRisks.vue
"
)
component
:
()
=>
import
(
"
../views/riskProject/add/inherentRisks.vue
"
)
,
},
//新增固有风险
{
path
:
"
/addInherent
"
,
name
:
"
addInherent
"
,
component
:
()
=>
import
(
"
../views/riskProject/add/addInherent.vue
"
)
component
:
()
=>
import
(
"
../views/riskProject/add/addInherent.vue
"
)
,
},
{
//编辑固有风险
path
:
"
/addCurrent
"
,
name
:
"
addCurrent
"
,
component
:
()
=>
import
(
"
../views/riskProject/add/addCurrent.vue
"
)
component
:
()
=>
import
(
"
../views/riskProject/add/addCurrent.vue
"
)
,
},
{
//新增现状风险
path
:
"
/addPresent
"
,
name
:
"
addPresent
"
,
component
:
()
=>
import
(
"
../views/riskProject/add/addPresent.vue
"
)
component
:
()
=>
import
(
"
../views/riskProject/add/addPresent.vue
"
)
,
},
{
//现状风险详情
path
:
"
/presentDetail
"
,
name
:
"
presentDetail
"
,
component
:
()
=>
import
(
"
../views/riskProject/taskLedger/presentDetail.vue
"
)
component
:
()
=>
import
(
"
../views/riskProject/taskLedger/presentDetail.vue
"
),
},
{
//风险评估列表详情页
path
:
"
/riskBigDetail
"
,
name
:
"
riskBigDetail
"
,
component
:
()
=>
import
(
"
../views/riskProject/assess/riskBigDetail.vue
"
)
component
:
()
=>
import
(
"
../views/riskProject/assess/riskBigDetail.vue
"
)
,
},
{
//执行情况管理
path
:
"
/riskExecution
"
,
name
:
"
riskExecution
"
,
component
:
()
=>
import
(
"
../views/riskProject/execution/index.vue
"
)
component
:
()
=>
import
(
"
../views/riskProject/execution/index.vue
"
)
,
},
{
//四色图
path
:
"
/riskView
"
,
name
:
"
riskView
"
,
component
:
()
=>
import
(
"
../views/drawCanvas/riskView.vue
"
)
component
:
()
=>
import
(
"
../views/drawCanvas/riskView.vue
"
)
,
},
{
//任务台账
path
:
"
/taskLedger
"
,
name
:
"
taskLedger
"
,
component
:
()
=>
import
(
"
../views/riskProject/taskLedger/index.vue
"
)
component
:
()
=>
import
(
"
../views/riskProject/taskLedger/index.vue
"
)
,
},
{
//任务台账
path
:
"
/taskDetail
"
,
name
:
"
taskDetail
"
,
component
:
()
=>
import
(
"
../views/riskProject/taskLedger/taskDetail.vue
"
)
component
:
()
=>
import
(
"
../views/riskProject/taskLedger/taskDetail.vue
"
)
,
},
{
//任务台账
path
:
"
/resultPage
"
,
name
:
"
resultPage
"
,
component
:
()
=>
import
(
"
../views/riskProject/add/resultPage.vue
"
)
component
:
()
=>
import
(
"
../views/riskProject/add/resultPage.vue
"
)
,
},
{
//任务台账
path
:
"
/riskAppvoreText
"
,
name
:
"
riskAppvoreText
"
,
component
:
()
=>
import
(
"
../views/riskProject/add/riskAppvoreText.vue
"
)
}
component
:
()
=>
import
(
"
../views/riskProject/add/riskAppvoreText.vue
"
),
},
{
//复制楼层
path
:
"
/copyFloor
"
,
name
:
"
copyFloor
"
,
component
:
()
=>
import
(
"
../views/riskProject/add/copyFloor.vue
"
),
},
// 评估模型一
{
path
:
"
/assess/model/step1
"
,
name
:
"
assessModelStep1
"
,
component
:
()
=>
import
(
"
../views/riskProject/assess/model/step1.vue
"
),
},
// 评估模型二
{
path
:
"
/assess/model/step2
"
,
name
:
"
assessModelStep2
"
,
component
:
()
=>
import
(
"
../views/riskProject/assess/model/step2.vue
"
),
},
];
const
router
=
new
VueRouter
({
mode
:
"
history
"
,
base
:
process
.
env
.
BASE_URL
,
routes
routes
,
});
export
default
router
;
src/store/mutations.js
View file @
565e2fc9
...
...
@@ -18,5 +18,17 @@ export default {
for
(
let
i
in
state
.
present
)
{
state
.
present
[
i
]
=
[];
}
}
},
// 现状风险模型 第一步
SET_ASSESS_STEP1
(
state
,
data
)
{
state
.
assessModel
.
step1
=
data
;
},
// 现状风险模型 第二步(后台所需数据)
SET_ASSESS_STEP2
(
state
,
data
)
{
state
.
assessModel
.
step2
=
data
;
},
// 现状风险模型 第二步(表单数据)
SET_ASSESS_STEP2_FORM
(
state
,
data
)
{
state
.
assessModel
.
step2Form
=
data
;
},
};
src/store/state.js
View file @
565e2fc9
export
default
{
uploadImgArr
:
[],
present
:
{
measuresProjectFile
:
[]
}
measuresProjectFile
:
[],
},
// 现状风险模型,url:views->riskProject->assess->model
assessModel
:
{
step1
:
""
,
//影响因素
step2
:
""
,
//影响因子
},
};
src/views/drawCanvas/riskView.vue
View file @
565e2fc9
...
...
@@ -33,6 +33,7 @@
:isResizable=
"item.isResizable"
@
resized=
"resizedEvent"
@
moved=
"movedEvent"
@
click.native=
"changeName(item)"
:style=
"
{
backgroundColor: item.c,
border: item.type == 'thorough' ? 'none !important' : ''
...
...
@@ -41,7 +42,7 @@
<span
class=
"text"
:class=
"item.w > item.h * 5 ? '' : 'rowText'"
>
{{
item
.
name
}}
</span>
<span
class=
"remove"
@
click=
"removeItem(item.i)"
v-if=
"showHeader"
<span
class=
"remove"
@
click
.stop
=
"removeItem(item.i)"
v-if=
"showHeader"
>
x
</span
>
<!--
<span
class=
"remove"
@
click=
"removeItem(item.i)"
v-if=
"item.i && isEdit"
>
x
</span>
-->
...
...
@@ -162,6 +163,7 @@ export default {
baseName
:
""
,
baseArr
:
[],
layoutData
:
[],
editItem
:
null
,
layoutDataStr
:
[]
};
},
...
...
@@ -308,8 +310,8 @@ export default {
// 增加
addItem
()
{
this
.
roomType
=
""
;
this
.
roomName
=
""
;
this
.
title
=
"
创建房间
"
;
this
.
roomName
=
""
;
this
.
title
=
"
创建房间
"
;
this
.
isRoom
=
true
;
this
.
show
=
true
;
this
.
isBase
=
false
;
...
...
@@ -349,6 +351,23 @@ export default {
// on cancel
});
},
// 修改名称
changeName
(
item
){
this
.
editItem
=
item
;
switch
(
item
.
type
){
case
'
基础设施
'
:
this
.
addBase
();
break
;
case
'
thorough
'
:
this
.
addOther
();
break
;
default
:
this
.
addItem
()
this
.
roomType
=
item
.
type
;
}
this
.
title
=
"
编辑
"
;
this
.
roomName
=
item
.
name
;
},
//添加基础设施
addBase
()
{
this
.
roomType
=
""
;
...
...
@@ -453,7 +472,16 @@ export default {
});
return
;
}
console
.
log
(
this
.
layout
);
if
(
this
.
editItem
){
const
editItem
=
this
.
layout
.
find
(
x
=>
x
.
i
==
this
.
editItem
.
i
)
if
(
editItem
){
editItem
.
name
=
this
.
roomName
;
editItem
.
type
=
this
.
roomType
;
this
.
editItem
=
{};
return
}
this
.
editItem
=
{};
}
var
i
=
this
.
layout
&&
this
.
layout
.
length
>
0
?
Math
.
max
.
apply
(
...
...
@@ -493,7 +521,6 @@ export default {
:
"
9999
"
};
this
.
layoutData
.
push
(
data
);
console
.
log
(
this
.
layoutData
,
this
.
layout
,
"
111111111111
"
);
// postFun("/ledger/room/save", data)
// .then(res => {
// if (res.code == 200) {
...
...
@@ -509,6 +536,7 @@ export default {
cancelDialog
()
{
this
.
roomType
=
""
;
this
.
roomName
=
""
;
this
.
editItem
=
null
},
onConfirm
(
value
)
{
if
(
this
.
isRoom
)
{
...
...
src/views/riskProject/add/addCurrent.vue
View file @
565e2fc9
...
...
@@ -44,6 +44,7 @@
placeholder=
"请输入 "
/>
<div
style=
"display: flex;"
>
<van-field
required
clickable
...
...
@@ -54,7 +55,14 @@
@
click=
"seletFloor('floor')"
:rules=
"[
{ required: true, message: '所属楼层不能为空' }]"
/>
<van-button
style=
"color: #cccc;background-color: #f0f1f5;"
icon=
"plus"
type=
"info"
native-type=
"button"
@
click=
"createFloor"
/>
</div>
<div
style=
"display: flex;"
>
<van-field
readonly
...
...
@@ -848,6 +856,9 @@
<selectDept
@
changeDept=
"changeDept"
></selectDept>
</div>
</van-popup>
<div
v-if=
"isFloor"
>
<addFloor
@
close=
"closeFloor"
:buildingId=
"form.buildingId"
/>
</div>
<!-- 管控责任人 -->
<van-popup
v-model=
"showTrouble"
position=
"bottom"
>
<van-picker
...
...
@@ -870,6 +881,7 @@ import selectFloor from "@/components/selectFloor.vue";
import
{
getUserInfo
,
getLocalUserInfo
}
from
"
@/utils/userInfo
"
;
import
{
getFun
,
postFun
}
from
"
@/service/table.js
"
;
import
{
timestampToTime
,
generateId
}
from
"
@/utils/format
"
;
import
addFloor
from
'
./addFloor
'
export
default
{
name
:
"
addCurrent
"
,
...
...
@@ -877,7 +889,8 @@ export default {
LHeader
,
selectDept
,
SelectList
,
selectFloor
selectFloor
,
addFloor
},
activated
()
{
this
.
showSetRank
=
false
;
// 再次关闭弹出层 以防万一
...
...
@@ -909,6 +922,7 @@ export default {
},
data
()
{
return
{
isFloor
:
false
,
loadingStatus
:
false
,
loadingText
:
"
提交...
"
,
measureNameList
:
[],
...
...
@@ -1014,6 +1028,23 @@ export default {
}
},
methods
:
{
createFloor
(){
this
.
isFloor
=
true
;
},
closeFloor
(
data
){
if
(
data
){
this
.
getFloor
().
then
(()
=>
{
const
floors
=
[].
concat
(
this
.
floorSource
.
map
(
x
=>
x
.
children
).
flat
());
const
currentFloor
=
floors
.
find
(
x
=>
x
.
id
===
data
)
console
.
log
(
floors
,
currentFloor
);
if
(
currentFloor
){
this
.
form
.
floorId
=
currentFloor
.
id
;
this
.
form
.
floorName
=
currentFloor
.
text
}
})
}
this
.
isFloor
=
false
},
measuresUserNameChange
(
e
)
{
getFun
(
`/risk/plan/inherent/getResponsibilityPersons?personName=
${
e
}
&projectId=
${
this
.
form
.
projectId
}
`
...
...
@@ -1246,7 +1277,7 @@ export default {
return
arr
;
},
getFloor
()
{
getFun
(
`/risk/plan/floor/list/
${
this
.
form
.
buildingId
}
`
)
return
getFun
(
`/risk/plan/floor/list/
${
this
.
form
.
buildingId
}
`
)
.
then
(
res
=>
{
// this.$toast.clear();
// this.showSource = true;
...
...
src/views/riskProject/add/addFloor.vue
0 → 100644
View file @
565e2fc9
<!-- 新建项目/新建楼宇-->
<
template
>
<div
class=
"project-component"
>
<LHeader
text=
"新增楼层"
:customBack=
"toCancel"
></LHeader>
<van-form
@
submit=
"onSubmit"
:scroll-to-error=
"true"
:show-error=
"false"
validate-trigger=
"onSubmit"
>
<van-field
label=
"楼层"
required
:rules=
"[
{ required: true, message: '请填写楼层名称' }]"
>
<template
#input
>
<van-radio-group
v-model=
"form.type"
direction=
"horizontal"
>
<van-radio
name=
"地上"
>
地上
</van-radio>
<van-radio
name=
"地下"
>
地下
</van-radio>
</van-radio-group>
</
template
>
</van-field>
<van-field
label=
"楼层名称"
v-model=
"form.name"
required
:rules=
"[{ required: true, message: '请填写楼层名称' }]"
><
template
#right-icon
><span>
层
</span></
template
></van-field>
<div
class=
"action-btns"
>
<van-button
class=
"confirm-btn"
:loading=
"loadingStatus"
:loading-text=
"loadingText"
round
block
type=
"info"
native-type=
"submit"
>
保存
</van-button>
<van-button
@
click=
"toCancel"
class=
"cancel-btn"
round
block
type=
"warning"
>
取消
</van-button>
</div>
</van-form>
</div>
</template>
<
script
>
import
LHeader
from
"
@/components/header.vue
"
;
import
{
postFun
}
from
"
@/service/table
"
;
export
default
{
components
:
{
LHeader
,
},
props
:
{
buildingId
:{
type
:
Number
,
}
},
destroyed
(){
this
.
toCancel
()
},
data
()
{
return
{
loadingStatus
:
false
,
loadingText
:
"
保存中...
"
,
form
:
{}
};
},
methods
:
{
toCancel
(
data
=
null
){
this
.
$emit
(
'
close
'
,
data
)
},
onSubmit
(
values
){
if
(
!
this
.
buildingId
){
return
;
}
this
.
form
.
buildingId
=
this
.
buildingId
this
.
form
.
name
=
this
.
form
.
name
+
'
层
'
postFun
(
'
/risk/plan/floor
'
,
this
.
form
)
.
then
(
res
=>
{
this
.
$toast
.
clear
();
this
.
$toast
.
success
({
message
:
"
提交成功
"
,
duration
:
2000
});
this
.
toCancel
(
res
.
data
)
})
.
catch
(()
=>
{
this
.
$emit
(
'
close
'
)
});
}
}
};
</
script
>
<
style
lang=
"less"
scoped
>
.project-component {
position: fixed;
width: 100vw;
height: 100vh;
top: 0;
left: 0;
z-index: 100;
background: #fff;
.van-form{
height: calc(100vh - 1.6rem);
overflow: auto;
}
.action-btns {
margin-top: 1rem;
padding: 0 0.5rem;
.cancel-btn {
margin-top: 0.3rem;
}
}
}
</
style
>
src/views/riskProject/add/addInherent.vue
View file @
565e2fc9
...
...
@@ -42,6 +42,7 @@
placeholder=
"请输入 "
/>
<div
style=
"display: flex;"
>
<van-field
required
clickable
...
...
@@ -52,6 +53,15 @@
@
click=
"seletFloor('floor')"
:rules=
"[
{ required: true, message: '所属楼层不能为空' }]"
/>
<van-button
style=
"color: #cccc;background-color: #f0f1f5;"
icon=
"plus"
type=
"info"
native-type=
"button"
@
click=
"isFloor=true"
/>
</div>
<div
style=
"display: flex;"
>
<van-field
...
...
@@ -641,6 +651,9 @@
<selectDept
@
changeDept=
"changeDept"
></selectDept>
</div>
</van-popup>
<div
v-if=
"isFloor"
>
<addFloor
@
close=
"closeFloor"
:buildingId=
"form.buildingId"
/>
</div>
<!-- 管控责任人 -->
<van-popup
v-model=
"showTrouble"
position=
"bottom"
>
<van-picker
...
...
@@ -677,6 +690,7 @@ import LHeader from "@/components/header.vue";
import
selectDept
from
"
@/components/selectDept/index.vue
"
;
import
SelectList
from
"
@/components/selectList.vue
"
;
import
selectFloor
from
"
@/components/selectFloor.vue
"
;
import
addFloor
from
'
./addFloor
'
import
{
getUserInfo
,
getLocalUserInfo
}
from
"
@/utils/userInfo
"
;
import
{
getFun
,
postFun
}
from
"
@/service/table.js
"
;
...
...
@@ -686,7 +700,8 @@ export default {
LHeader
,
selectDept
,
SelectList
,
selectFloor
selectFloor
,
addFloor
},
activated
()
{
...
...
@@ -726,6 +741,7 @@ export default {
},
data
()
{
return
{
isFloor
:
false
,
loadingStatus
:
false
,
loadingText
:
"
提交...
"
,
measureNameList
:
[],
...
...
@@ -838,6 +854,19 @@ export default {
methods
:
{
/* swp add */
closeFloor
(
data
){
if
(
data
){
this
.
getFloor
().
then
(()
=>
{
const
floors
=
[].
concat
(
this
.
floorSource
.
map
(
x
=>
x
.
children
).
flat
())
const
currentFloor
=
floors
.
find
(
x
=>
x
.
id
===
data
)
if
(
currentFloor
){
this
.
form
.
floorId
=
currentFloor
.
id
;
this
.
form
.
floorName
=
currentFloor
.
name
}
})
}
this
.
isFloor
=
false
;
},
measuresUserNameChange
(
e
)
{
getFun
(
`/risk/plan/inherent/getResponsibilityPersons?personName=
${
e
}
&projectId=
${
this
.
form
.
projectId
}
`
...
...
@@ -950,8 +979,9 @@ export default {
return
arr
;
},
getFloor
()
{
getFun
(
`/risk/plan/floor/list/
${
this
.
form
.
buildingIds
}
`
)
return
getFun
(
`/risk/plan/floor/list/
${
this
.
form
.
buildingIds
}
`
)
.
then
(
res
=>
{
debugger
// this.$toast.clear();
// this.showSource = true;
...
...
src/views/riskProject/add/addPresent.vue
View file @
565e2fc9
...
...
@@ -433,7 +433,6 @@
size=
"small"
type=
"info"
native-type=
"button"
@
click=
"goResultPage"
>
开始测评
</van-button
></van-col
>
...
...
@@ -572,6 +571,14 @@ export default {
SelectList
,
selectFloor
},
// 退出前,将测评模型数据清空
beforeRouteLeave
(
to
,
_
,
next
){
if
(
to
.
name
!=
'
assessModelStep1
'
){
this
.
$store
.
commit
(
'
SET_ASSESS_STEP2
'
,
""
)
this
.
$store
.
commit
(
'
SET_ASSESS_STEP1
'
,
""
)
}
next
()
},
data
()
{
return
{
loadingStatus
:
false
,
...
...
@@ -712,6 +719,8 @@ export default {
getFun
(
`/risk/plan/existing/details/
${
this
.
existingId
}
`
)
.
then
(
res
=>
{
this
.
form
=
res
.
data
;
this
.
$store
.
commit
(
'
SET_ASSESS_STEP1
'
,
this
.
form
.
factorItems
)
this
.
$store
.
commit
(
'
SET_ASSESS_STEP2
'
,
this
.
form
.
evaluationItemIds
)
this
.
uploaderImg
=
(
res
.
data
.
pictureFile
||
[]).
map
(
item
=>
{
return
{
...
item
,
...
...
@@ -764,7 +773,7 @@ export default {
this
.
form
.
type
=
res
.
data
.
type
;
this
.
form
.
planId
=
res
.
data
.
planId
;
/* 下面这些值还要可以输入,用上面的方法赋值后没有办法输入新的值
!还不知道为啥
*/
/* 下面这些值还要可以输入,用上面的方法赋值后没有办法输入新的值*/
const
{
measuresProject
,
measuresEmergency
,
...
...
@@ -896,10 +905,13 @@ export default {
this
.
riskName
=
name
;
this
.
ShowAccidentList
=
true
;
},
//开始测评
seletGrade
(
name
)
{
this
.
getGradeList
(
"
possibility
"
);
this
.
getGradeList
(
"
severity
"
);
this
.
showGradeDialog
=
true
;
this
.
saveFormData
()
// this.getGradeList("possibility");
// this.getGradeList("severity");
// this.showGradeDialog = true;
this
.
$router
.
push
(
'
/assess/model/step1
'
)
},
//风险模型配置
getGradeList
(
type
)
{
...
...
@@ -951,8 +963,8 @@ export default {
this
.
severityValue
=
data
.
text
;
this
.
severityScore
=
data
.
score
;
},
//
开始测评
goResultPage
()
{
//
防止跳转页面后数据丢失
saveFormData
()
{
sessionStorage
.
setItem
(
"
presentForm
"
,
JSON
.
stringify
(
this
.
form
));
/* measuresAdministrationFile: [], //管理措施图片
measuresProjectFile: [], //管理措施图片
...
...
@@ -970,12 +982,12 @@ export default {
key
:
'
measuresEmergencyFile
'
,
value
:
this
.
measuresEmergencyFile
},])
this
.
$router
.
push
({
name
:
"
resultPage
"
,
params
:
{
score
:
this
.
severityScore
*
this
.
possibleScore
}
});
//
this.$router.push({
//
name: "resultPage",
//
params: {
//
score: this.severityScore * this.possibleScore
//
}
//
});
},
performTasks
()
{},
// 点击预览图
...
...
@@ -1015,6 +1027,10 @@ export default {
onSubmit
(
values
)
{
// console.log('%c [ values ]-592', 'font-size:13px; background:pink; color:#bf2c9f;', values)
var
formDataJson
=
this
.
jsonToFormData
(
this
.
form
);
const
assessModel
=
this
.
$store
.
state
.
assessModel
;
formDataJson
.
append
(
'
factorItems
'
,
assessModel
.
step1
)
formDataJson
.
append
(
'
evaluationItemIds
'
,
assessModel
.
step2
)
// let url = "/risk/plan/inherent";
this
.
loadingStatus
=
true
;
let
url
=
"
/risk/plan/existing
"
;
...
...
src/views/riskProject/add/copyFloor.vue
0 → 100644
View file @
565e2fc9
<!-- 新建项目/新建楼宇-->
<
template
>
<div
class=
"project-component"
>
<LHeader
text=
"复制楼层"
></LHeader>
<van-form
@
submit=
"onSubmit"
:scroll-to-error=
"true"
:show-error=
"false"
validate-trigger=
"onSubmit"
>
<van-field
required
clickable
label-width=
"10em"
label=
"原始楼层(需要复制的数据)"
:value=
"form.sourceFloorIdName"
:rules=
"[
{ required: true, message: '请填写原始楼层' }]"
@click="seletFloor('sourceFloorId')"
>
</van-field>
<van-field
label-width=
"10em"
label=
"目标楼层(需要填充的数据)"
:value=
"form.targetFloorIdName"
required
:rules=
"[
{ required: true, message: '请填写目标楼层' }]"
@click="seletFloor('targetFloorId')"
>
</van-field>
<div
class=
"action-btns"
>
<van-button
class=
"confirm-btn"
:loading=
"loadingStatus"
:loading-text=
"loadingText"
round
block
type=
"info"
native-type=
"submit"
>
保存
</van-button>
<van-button
@
click=
"toCancel"
class=
"cancel-btn"
round
block
type=
"warning"
>
取消
</van-button>
</div>
</van-form>
<!-- 楼层弹出层 -->
<van-popup
v-model=
"ShowfloorList"
position=
"bottom"
:style=
"
{ height: '100%' }"
>
<selectFloor
v-if=
"ShowfloorList"
:listdata=
"floorSource"
@
closeSlect=
"closeSlectfloor"
@
saveSlect=
"saveSlectfloor"
></selectFloor>
</van-popup>
</div>
</
template
>
<
script
>
import
LHeader
from
"
@/components/header.vue
"
;
import
selectFloor
from
"
@/components/selectFloor.vue
"
;
import
{
postFun
,
getFun
}
from
"
@/service/table
"
;
export
default
{
components
:
{
LHeader
,
selectFloor
},
mounted
(){
// this.form.planId = this.$route.query;
const
{
buildingId
,
planId
}
=
this
.
$route
.
query
;
this
.
form
=
{...
this
.
form
,
buildingId
,
planId
}
this
.
getFloor
()
},
data
()
{
return
{
loadingStatus
:
false
,
loadingText
:
"
保存中...
"
,
ShowfloorList
:
false
,
floorSource
:[],
form
:
{},
userPrefix
:
''
};
},
methods
:
{
seletFloor
(
name
)
{
this
.
ShowfloorList
=
true
;
this
.
userPrefix
=
name
;
},
closeSlectfloor
()
{
this
.
ShowfloorList
=
false
;
},
saveSlectfloor
(
data
)
{
this
.
form
[
this
.
userPrefix
]
=
data
.
id
;
this
.
form
[
this
.
userPrefix
+
"
Name
"
]
=
data
.
text
;
console
.
log
(
this
.
form
);
this
.
ShowfloorList
=
false
;
},
renameKeyInTree
(
data
,
oldKey
,
newKey
)
{
let
arr
=
data
.
map
(
item
=>
{
const
newItem
=
{
...
item
};
if
(
item
.
hasOwnProperty
(
oldKey
))
{
newItem
[
newKey
]
=
newItem
[
oldKey
];
delete
newItem
[
oldKey
];
}
if
(
newItem
.
children
&&
newItem
.
children
.
length
>
0
)
{
newItem
.
children
=
this
.
renameKeyInTree
(
newItem
.
children
,
oldKey
,
newKey
);
}
return
newItem
;
});
return
arr
;
},
getFloor
()
{
getFun
(
`/risk/plan/floor/list/
${
this
.
form
.
buildingId
}
`
)
.
then
(
res
=>
{
let
newArr
=
this
.
renameKeyInTree
(
res
.
data
,
"
name
"
,
"
text
"
);
this
.
floorSource
=
newArr
;
})
.
catch
(()
=>
{
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
},
onSubmit
(){
this
.
$dialog
.
confirm
({
title
:
'
提示
'
,
message
:
'
是否将原始楼层覆盖到目标楼层,目标楼层下的全部数据将清空?
'
,
})
.
then
(()
=>
{
// on confirm
const
{
targetFloorId
,
sourceFloorId
,
planId
}
=
this
.
form
postFun
(
`/risk/plan/copy/floor/
${
this
.
form
.
planId
}
/
${
sourceFloorId
}
/
${
targetFloorId
}
`
)
.
then
(
res
=>
{
this
.
$toast
.
success
({
message
:
"
提交成功
"
,
duration
:
2000
});
this
.
toCancel
()
})
.
catch
(()
=>
{
this
.
$emit
(
'
close
'
)
});
})
.
catch
(()
=>
{
// on cancel
});
},
toCancel
(){
this
.
$router
.
back
()
}
}
};
</
script
>
<
style
lang=
"less"
scoped
>
.project-component {
position: fixed;
width: 100vw;
height: 100vh;
top: 0;
left: 0;
z-index: 100;
background: #fff;
.van-form{
height: calc(100vh - 1.6rem);
overflow: auto;
}
.action-btns {
margin-top: 1rem;
padding: 0 0.5rem;
.cancel-btn {
margin-top: 0.3rem;
}
}
}
</
style
>
src/views/riskProject/add/inherentRisks.vue
View file @
565e2fc9
...
...
@@ -100,6 +100,13 @@
position: fixed;
bottom: 0;"
>
<div
@
click=
"copyFloor"
style=
"color: #4bced0;font-size: 14px;font-weight: 600;"
>
<div
style=
"font-size: 22px;"
><van-icon
name=
"coupon-o"
/></div>
<div>
复制楼层
</div>
</div>
<div
@
click=
"performTasks"
style=
"color: #4bced0;font-size: 14px;font-weight: 600;"
...
...
@@ -216,6 +223,16 @@ export default {
}
});
},
// 复制楼层
copyFloor
(){
this
.
$router
.
push
({
name
:
'
copyFloor
'
,
query
:{
planId
:
this
.
planId
,
buildingId
:
this
.
buildingId
}
})
},
//任务执行结束
endTasks
()
{
//toDo
...
...
src/views/riskProject/add/resultPage.vue
View file @
565e2fc9
...
...
@@ -3,10 +3,10 @@
<LHeader
:text=
"text"
></LHeader>
<div
class=
"section"
>
<p>
该次测评风险值为:
</p>
<div
class=
"resultScore"
:style=
"
{ background:
backgroundC
olor}" >
<p
style=
"font-weight: bold;font-size: 20px;color: white;"
>
{{
this
.
$route
.
params
.
score
}}
</p>
<div
class=
"resultScore"
:style=
"
{ background:
result.c
olor}" >
<p
style=
"font-weight: bold;font-size: 20px;color: white;"
>
{{
this
.
score
}}
</p>
</div>
<p>
本次评估结果评定为:
{{
level
}}
</p>
<p>
本次评估结果评定为:
{{
result
.
level
}}
</p>
<van-divider></van-divider>
<van-field
readonly
label=
"所属模型:"
placeholder=
"ls风险矩阵评估模型"
/>
<van-field
readonly
label=
"风险发生可能性:"
placeholder=
"一般情况不会发生"
/>
...
...
@@ -34,21 +34,47 @@ import LHeader from "@/components/header.vue";
return
{
text
:
'
测评结果
'
,
score
:
0
,
level
:
''
,
backgroundColor
:
''
,
result
:
null
}
},
created
(){
this
.
score
=
this
.
$route
.
query
.
score
-
''
;
this
.
getResult
()
},
methods
:{
getResult
(){
getFun
(
`/risk/plan/matrix/score/
${
this
.
$route
.
params
.
score
}
`
).
then
(
res
=>
{
this
.
level
=
res
.
data
.
level
this
.
score
=
res
.
data
.
max
this
.
backgroundColor
=
this
.
level
==
'
一般风险
'
?
"
#FFFF00
"
:
this
.
level
==
'
较小风险
'
?
"
#0091EA
"
:
this
.
level
==
'
较大风险
'
?
"
#FF9800
"
:
this
.
level
==
'
重大风险
'
?
"
#FF4433
"
:
"
orange
"
;
})
this
.
result
=
(()
=>
{
// 较小风险:1-2,一般风险:2-3 较大风险:3-4 重大风险:>4
// switch(this.score){
// case '一般风险':
// return '#FFFF00';
// case "较小风险":
// return "#0091EA";
// case "较大风险":
// return "FF9800";
// case "重大风险":
// return "FF4433";
// default:
// return "orange"
// }
if
(
this
.
score
<=
2
){
return
{
level
:
'
较小风险
'
,
color
:
"
#0091EA
"
}
}
else
if
(
this
.
score
>
2
&&
this
.
score
<=
3
){
return
{
level
:
'
一般风险
'
,
color
:
"
#FFFF00
"
}
}
else
if
(
this
.
score
>
3
&&
this
.
score
<=
4
){
return
{
level
:
'
较大风险
'
,
color
:
"
#FF9800
"
}
}
else
if
(
this
.
score
>
4
){
return
{
level
:
'
重大风险
'
,
color
:
"
#FF4433
"
}
}
else
{
return
{
level
:
''
,
color
:
"
orange
"
}
}
})()
// getFun(`/risk/plan/matrix/score/${this.$route.params.score}`).then(res=>{
// this.level = res.data.level
// this.score = res.data.max
// this.backgroundColor=bgColor()
// })
},
resetClose
(){
sessionStorage
.
setItem
(
'
level
'
,
''
)
...
...
@@ -56,8 +82,8 @@ import LHeader from "@/components/header.vue";
},
sureClose
(){
// this.$emit('',)
sessionStorage
.
setItem
(
'
level
'
,
this
.
level
)
history
.
go
(
-
1
)
sessionStorage
.
setItem
(
'
level
'
,
this
.
result
.
level
)
history
.
go
(
-
3
)
// this.$router.push({
// name:'addInherent',
// params:{
...
...
src/views/riskProject/assess/model/index.js
0 → 100644
View file @
565e2fc9
class
Loading
{}
src/views/riskProject/assess/model/step1.vue
0 → 100644
View file @
565e2fc9
<
template
>
<div
class=
"assess-model"
>
<div>
<LHeader
:text=
"title"
></LHeader></div>
<div
class=
"assess-model-container"
>
<div
class=
"assess-model-select-title"
><span>
选择影响因素
</span></div>
<van-checkbox-group
class=
"assess-model-select"
v-model=
"effectValue"
>
<van-checkbox
v-for=
"(item) in effectList"
:key=
"item.dictLabel"
:name=
"item.dictLabel"
shape=
"square"
>
<van-icon
slot=
"icon"
slot-scope=
"props"
:name=
"props.checked?'success':''"
/>
{{
item
.
dictLabel
}}
</van-checkbox>
</van-checkbox-group>
</div>
<footer
class=
"assess-model-footer"
>
<van-button
round
type=
"info"
@
click=
"toNext"
>
下一步
</van-button>
</footer>
</div>
</
template
>
<
script
>
import
LHeader
from
"
@/components/header.vue
"
;
import
{
getFun
,
postFun
}
from
"
@/service/table
"
;
export
default
{
components
:{
LHeader
},
data
(){
return
{
title
:
'
影响因素
'
,
effectList
:
[],
effectValue
:[]
}
},
mounted
(){
const
present
=
localStorage
.
getItem
(
'
presentForm
'
)
let
presentForm
=
present
?
JSON
.
parse
(
present
):
null
;
if
(
this
.
$store
.
state
.
assessModel
.
step1
){
this
.
effectValue
=
this
.
$store
.
state
.
assessModel
.
step1
.
split
(
"
,
"
)
}
else
if
(
presentForm
&&
presentForm
.
factorItems
){
// 用户刷新
this
.
$store
.
commit
(
'
SET_ASSESS_STEP1
'
,
presentForm
.
factorItems
);
this
.
$store
.
commit
(
'
SET_ASSESS_STEP2
'
,
presentForm
.
evaluationItemIds
);
}
this
.
getData
()
},
beforeRouteLeave
(
to
,
form
,
next
){
// console.log(e);
if
(
to
.
name
===
'
addPresent
'
){
this
.
$store
.
commit
(
'
SET_ASSESS_STEP1
'
,
''
)
}
next
()
},
methods
:{
toNext
(){
let
effectValue
=
this
.
effectList
.
filter
(
x
=>
this
.
effectValue
.
includes
(
x
.
dictLabel
))
if
(
effectValue
.
length
){
effectValue
=
effectValue
.
map
(
x
=>
x
.
dictLabel
)
}
if
(
this
.
effectValue
.
length
==
0
){
this
.
$toast
(
"
请先选择影响因素
"
)
return
;
}
this
.
$store
.
commit
(
'
SET_ASSESS_STEP1
'
,
effectValue
.
join
(
'
,
'
))
// 保存数据
this
.
$router
.
push
({
path
:
'
/assess/model/step2
'
,
query
:{
ids
:
effectValue
.
join
(
'
,
'
)
}
})
},
getData
(){
getFun
(
'
/risk/plan/dict/data/list
'
,{
dictType
:
'
evaluation_model_classification
'
}).
then
(
res
=>
{
// console.log(res);
if
(
res
.
code
!==
200
)
return
;
this
.
effectList
=
res
.
data
;
}).
catch
(()
=>
{
this
.
$toast
(
'
网络请求错误
'
)
})
},
destroy
(){
},
}
}
</
script
>
<
style
lang=
"less"
scoped
>
.assess-model{
background: #fff;
z-index: 10;
.assess-model-select-title{
font-weight: 400;
font-size: 14px;
color: rgba(69,90,100,.6);
padding: 0.6rem 0.7rem;
}
.assess-model-container{
height: calc(100% - 1.5rem);
overflow: auto;
}
.assess-model-footer{
width: 100%;
height: 1.4rem;
z-index: 9;
position: fixed;
bottom: 0px;
text-align: center;
line-height: 1rem;
.van-button{
width: 90%;
margin: 0 auto;
}
}
}
.van-checkbox-group{
padding: 0 1rem;
box-sizing: border-box;
.van-checkbox{
background: #fff;
margin-bottom: 0.4rem;
padding: 0.4rem;
border-radius: 3px;
box-shadow: 1px 1px 3px 1px #dddddd;
color: #1c1c1c;
text-align: center;
::v-deep .van-icon{
border-radius: 0.08rem;
border:none;
background: transparent;
color: #1989fa;
}
::v-deep .van-checkbox__label{
flex: 1;
text-align: center;
font-size: 0.45rem;
transform: translateX(-20px);
}
}
.van-checkbox[aria-checked="true"]{
box-shadow: 1px 1px 3px 1px #38fc;
}
}
</
style
>
\ No newline at end of file
src/views/riskProject/assess/model/step2.vue
0 → 100644
View file @
565e2fc9
This diff is collapsed.
Click to expand it.
vue.config.js
View file @
565e2fc9
...
...
@@ -13,6 +13,7 @@ module.exports = {
// target: "http://192.168.10.137:8080/", //这里是后台的地址
// target: 'http://192.168.15.124:8080/', //这里是杨帆的地址
// target: "http://192.168.10.137:8080/", //这里是昊哥的地址
// target: "http://192.168.15.230:8080/", //这里是晓静的地址
// target: 'http://localhost:8081/', //这里是后台的地址
ws
:
true
,
changOrigin
:
true
,
//允许跨域
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment