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
f35384ea
Commit
f35384ea
authored
Jul 18, 2023
by
wei
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into dev-lv
parents
4e4a62a8
33d8b0f0
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
2258 additions
and
1246 deletions
+2258
-1246
src/assets/imgs/north.png
src/assets/imgs/north.png
+0
-0
src/components/selectList.vue
src/components/selectList.vue
+190
-191
src/main.js
src/main.js
+11
-8
src/views/drawCanvas/riskView.vue
src/views/drawCanvas/riskView.vue
+87
-35
src/views/riskProject/add/addCurrent.vue
src/views/riskProject/add/addCurrent.vue
+1382
-791
src/views/riskProject/add/addInherent.vue
src/views/riskProject/add/addInherent.vue
+581
-203
src/views/riskProject/add/index.vue
src/views/riskProject/add/index.vue
+0
-15
src/views/riskProject/add/taskList.vue
src/views/riskProject/add/taskList.vue
+4
-0
src/views/riskProject/assess/index.vue
src/views/riskProject/assess/index.vue
+1
-1
vue.config.js
vue.config.js
+2
-2
No files found.
src/assets/imgs/north.png
0 → 100644
View file @
f35384ea
3.19 KB
src/components/selectList.vue
View file @
f35384ea
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<van-sticky
offset-top=
"0"
>
<van-sticky
offset-top=
"0"
>
<div
class=
"content-wrap"
>
<div
class=
"content-wrap"
>
<div
class=
"search-wrap"
>
<div
class=
"search-wrap"
>
<van-search
v-model=
"searchVal"
placeholder=
"搜索"
@
input=
"onInput"
/>
<van-search
v-model=
"searchVal"
placeholder=
"搜索"
@
input=
"onInput"
/>
</div>
</div>
</div>
</div>
</van-sticky>
</van-sticky>
...
@@ -16,12 +16,17 @@
...
@@ -16,12 +16,17 @@
finished-text=
"没有更多了"
finished-text=
"没有更多了"
@
load=
"getInsideUser()"
@
load=
"getInsideUser()"
>
-->
>
-->
<van-checkbox
style=
"margin: 0px 10px;"
v-for=
"(item,index) in listdata"
:name=
"item.dictLabel"
:key=
"index"
@
click=
"selData(item)"
>
<van-checkbox
style=
"margin: 0px 10px;"
v-for=
"(item, index) in listdata"
:name=
"item.dictLabel"
:key=
"index"
@
click=
"selData(item)"
>
<van-cell
:title=
"item.dictValue"
/>
<van-cell
:title=
"item.dictValue"
/>
</van-checkbox>
</van-checkbox>
<!--
</van-list>
-->
<!--
</van-list>
-->
</van-checkbox-group>
</van-checkbox-group>
</div>
</div>
<!-- 底部信息 -->
<!-- 底部信息 -->
<footer
class=
"footer"
>
<footer
class=
"footer"
>
...
@@ -35,8 +40,7 @@
...
@@ -35,8 +40,7 @@
style=
"border-radius: 5px; background-color: #f0f1f5;"
style=
"border-radius: 5px; background-color: #f0f1f5;"
@
click.native=
"cancel"
@
click.native=
"cancel"
>
取消
>
取消
</van-button
</van-button>
>
<van-button
<van-button
size=
"small"
size=
"small"
type=
"info"
type=
"info"
...
@@ -44,77 +48,73 @@
...
@@ -44,77 +48,73 @@
style=
"margin:0 10px 0 20px;border-radius: 5px;"
style=
"margin:0 10px 0 20px;border-radius: 5px;"
@
click.native=
"save"
@
click.native=
"save"
>
保存
>
保存
</van-button
</van-button>
>
</div>
</div>
</van-cell-group>
</van-cell-group>
</footer>
</footer>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
debounce
}
from
"
@/utils/common.js
"
;
import
{
debounce
}
from
"
@/utils/common.js
"
;
export
default
{
props
:
{
export
default
{
listdata
:
{
props
:{
type
:
Array
,
listdata
:{
default
:
()
=>
[]
type
:
Array
,
default
:()
=>
[],
}
}
},
},
components
:
{
components
:
{
// LHeader
// LHeader
},
},
created
()
{
created
()
{},
},
data
()
{
data
()
{
return
{
return
{
text
:
"
选择人员
"
,
text
:
"
选择人员
"
,
personName
:
""
,
personName
:
""
,
searchVal
:
""
,
searchVal
:
""
,
checkbox
:
[],
checkbox
:
[],
pageSize
:
20
,
pageSize
:
20
,
pageNum
:
1
,
pageNum
:
1
,
loading
:
false
,
loading
:
false
,
finished
:
false
,
finished
:
false
,
projectList
:[],
projectList
:
[],
itemSel
:{
itemSel
:
{}
}
};
};
},
},
methods
:
{
methods
:
{
// 待搜索框内容发生变化
// 待搜索框内容发生变化
onInput
:
debounce
(
function
()
{
onInput
:
debounce
(
function
()
{
this
.
projectList
=
[]
this
.
projectList
=
[];
this
.
pageNum
=
1
this
.
pageNum
=
1
;
this
.
finished
=
false
this
.
finished
=
false
;
this
.
loading
=
true
this
.
loading
=
true
;
this
.
getInsideUser
();
this
.
getInsideUser
();
},
800
),
},
800
),
selData
(
e
)
{
selData
(
e
)
{
this
.
itemSel
=
e
this
.
itemSel
=
e
;
},
},
save
()
{
save
()
{
this
.
$emit
(
'
saveSlect
'
,
this
.
checkbox
)
this
.
$emit
(
"
saveSlect
"
,
this
.
checkbox
);
this
.
checkbox
=
[];
},
},
cancel
()
{
cancel
()
{
this
.
$emit
(
'
closeSlect
'
)
this
.
$emit
(
"
closeSlect
"
);
}
}
}
}
};
};
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
/* @import url(); 引入css类 */
/* @import url(); 引入css类 */
// 搜索
// 搜索
.content-wrap {
.content-wrap {
padding: 10px;
padding: 10px;
background-color: #f0f1f5;
background-color: #f0f1f5;
}
}
.search-wrap {
.search-wrap {
margin: 0.26667rem;
margin: 0.26667rem;
.van-search {
.van-search {
...
@@ -125,9 +125,9 @@
...
@@ -125,9 +125,9 @@
.van-search__content {
.van-search__content {
background-color: #ffffff;
background-color: #ffffff;
}
}
}
}
.upStep {
.upStep {
.van-cell-group {
.van-cell-group {
display: flex;
display: flex;
height: 1.2rem;
height: 1.2rem;
...
@@ -163,22 +163,22 @@
...
@@ -163,22 +163,22 @@
white-space: nowrap;
white-space: nowrap;
}
}
}
}
}
}
.dept-list-wrap {
.dept-list-wrap {
margin-top: 0.266667rem;
margin-top: 0.266667rem;
}
}
.people-wrap {
.people-wrap {
margin-top: 0.266667rem;
margin-top: 0.266667rem;
/deep/ .van-radio__label {
/deep/ .van-radio__label {
display: flex;
display: flex;
align-items: center;
align-items: center;
}
}
}
}
.footer {
.footer {
width: 100%;
width: 100%;
height: 1.4rem;
height: 1.4rem;
z-index: 9;
z-index: 9;
...
@@ -218,6 +218,5 @@
...
@@ -218,6 +218,5 @@
}
}
}
}
}
}
}
}
</
style
>
</
style
>
\ No newline at end of file
src/main.js
View file @
f35384ea
...
@@ -8,16 +8,19 @@ import qs from 'qs';
...
@@ -8,16 +8,19 @@ import qs from 'qs';
import
'
./permission
'
import
'
./permission
'
import
Cookies
from
'
js-cookie
'
import
Cookies
from
'
js-cookie
'
import
util
from
'
./api/util.js
'
import
util
from
'
./api/util.js
'
import
{
DropdownMenu
,
DropdownItem
,
Divider
,
Popup
,
Overlay
,
Loading
,
Dialog
,
ContactCard
,
Form
,
AddressEdit
,
AddressList
,
Field
,
CellGroup
,
Cell
,
SwipeCell
,
Icon
,
Stepper
,
Card
,
Checkbox
,
CheckboxGroup
,
Button
,
Swipe
,
SwipeItem
,
PullRefresh
,
List
,
Tab
,
Tabs
,
GoodsAction
,
GoodsActionIcon
,
GoodsActionButton
,
SubmitBar
,
Toast
,
Search
,
Picker
,
Uploader
,
Notify
,
ContactList
,
Calendar
,
Radio
,
RadioGroup
,
Tag
,
Tabbar
,
TabbarItem
,
Sticky
,
Grid
,
GridItem
,
Skeleton
,
Col
,
Row
,
Image
as
VanImage
,
Badge
,
NoticeBar
,
DatetimePicker
,
import
{
Step
,
Steps
,
Lazyload
,
Popover
,
Collapse
,
CollapseItem
,
TreeSelect
}
from
'
vant
'
DropdownMenu
,
DropdownItem
,
Divider
,
Popup
,
Overlay
,
Loading
,
Dialog
,
ContactCard
,
Form
,
AddressEdit
,
AddressList
,
Field
,
CellGroup
,
Cell
,
SwipeCell
,
Icon
,
Stepper
,
Card
,
Checkbox
,
CheckboxGroup
,
Button
,
Swipe
,
SwipeItem
,
PullRefresh
,
List
,
Tab
,
Tabs
,
GoodsAction
,
GoodsActionIcon
,
GoodsActionButton
,
SubmitBar
,
Toast
,
Search
,
Picker
,
Uploader
,
Notify
,
ContactList
,
Calendar
,
Radio
,
RadioGroup
,
Tag
,
Tabbar
,
TabbarItem
,
Sticky
,
Grid
,
GridItem
,
Skeleton
,
Col
,
Row
,
Image
as
VanImage
,
Badge
,
NoticeBar
,
DatetimePicker
,
Step
,
Steps
,
Lazyload
,
Popover
,
Collapse
,
CollapseItem
,
TreeSelect
,
Switch
}
from
'
vant
'
import
'
lib-flexible/flexible
'
import
'
lib-flexible/flexible
'
import
vueEsign
from
'
vue-esign
'
import
vueEsign
from
'
vue-esign
'
Vue
.
use
(
vueEsign
)
Vue
.
use
(
vueEsign
)
Vue
.
prototype
.
util
=
util
Vue
.
prototype
.
util
=
util
Vue
.
use
(
Divider
).
use
(
Popup
).
use
(
Overlay
).
use
(
Loading
).
use
(
Dialog
).
use
(
Toast
).
use
(
ContactCard
).
use
(
Form
).
use
(
AddressEdit
).
use
(
AddressList
).
use
(
Field
).
use
(
CellGroup
).
use
(
Cell
).
use
(
SwipeCell
).
use
(
Icon
).
use
(
Stepper
).
use
(
Card
).
use
(
Button
).
use
(
Swipe
).
use
(
SwipeItem
).
use
(
PullRefresh
).
use
(
List
).
use
(
Tab
).
use
(
Tabs
).
use
(
GoodsAction
).
use
(
GoodsActionIcon
).
use
(
GoodsActionButton
).
use
(
SubmitBar
).
use
(
Checkbox
).
use
(
CheckboxGroup
).
use
(
Search
).
use
(
Picker
).
use
(
Uploader
).
use
(
Notify
)
Vue
.
use
(
Divider
).
use
(
Popup
).
use
(
Overlay
).
use
(
Loading
).
use
(
Dialog
).
use
(
Toast
).
use
(
ContactCard
).
use
(
Form
).
use
(
AddressEdit
).
use
(
AddressList
).
use
(
Field
).
use
(
CellGroup
).
use
(
Cell
).
use
(
SwipeCell
).
use
(
Icon
).
use
(
Stepper
).
use
(
Card
).
use
(
Button
).
use
(
Swipe
).
use
(
SwipeItem
).
use
(
PullRefresh
).
use
(
List
).
use
(
Tab
).
use
(
Tabs
).
use
(
GoodsAction
).
use
(
GoodsActionIcon
).
use
(
GoodsActionButton
).
use
(
SubmitBar
).
use
(
Checkbox
).
use
(
CheckboxGroup
).
use
(
Search
).
use
(
Picker
).
use
(
Uploader
).
use
(
Notify
)
.
use
(
ContactList
).
use
(
Calendar
).
use
(
Radio
).
use
(
RadioGroup
).
use
(
Tag
).
use
(
Tabbar
).
use
(
TabbarItem
).
use
(
Sticky
)
.
use
(
ContactList
).
use
(
Calendar
).
use
(
Radio
).
use
(
RadioGroup
).
use
(
Tag
).
use
(
Tabbar
).
use
(
TabbarItem
).
use
(
Sticky
)
.
use
(
Grid
).
use
(
GridItem
).
use
(
Skeleton
).
use
(
Col
).
use
(
Row
).
use
(
VanImage
).
use
(
Badge
).
use
(
NoticeBar
).
use
(
DatetimePicker
).
use
(
Step
).
use
(
Steps
).
use
(
Popover
).
use
(
Lazyload
).
use
(
Collapse
).
use
(
CollapseItem
).
use
(
TreeSelect
)
.
use
(
Grid
).
use
(
GridItem
).
use
(
Skeleton
).
use
(
Col
).
use
(
Row
).
use
(
VanImage
).
use
(
Badge
).
use
(
NoticeBar
).
use
(
DatetimePicker
).
use
(
Step
).
use
(
Steps
).
use
(
Popover
).
use
(
Lazyload
).
use
(
Collapse
).
use
(
CollapseItem
).
use
(
TreeSelect
)
Vue
.
use
(
DropdownMenu
);
Vue
.
use
(
DropdownMenu
);
Vue
.
use
(
Switch
);
Vue
.
use
(
DropdownItem
);
Vue
.
use
(
DropdownItem
);
// 引用高德地图组件 main.js
// 引用高德地图组件 main.js
import
VueAMap
from
'
vue-amap
'
import
VueAMap
from
'
vue-amap
'
...
@@ -65,7 +68,7 @@ Vue.prototype.$md5 = md5;
...
@@ -65,7 +68,7 @@ Vue.prototype.$md5 = md5;
Vue
.
prototype
.
qs
=
qs
;
Vue
.
prototype
.
qs
=
qs
;
Array
.
prototype
.
remove
=
function
(
val
)
{
Array
.
prototype
.
remove
=
function
(
val
)
{
var
index
=
this
.
indexOf
(
val
);
var
index
=
this
.
indexOf
(
val
);
if
(
index
>
-
1
)
{
if
(
index
>
-
1
)
{
this
.
splice
(
index
,
1
);
this
.
splice
(
index
,
1
);
...
...
src/views/drawCanvas/riskView.vue
View file @
f35384ea
...
@@ -8,6 +8,9 @@
...
@@ -8,6 +8,9 @@
<span
class=
"iconRight"
v-show=
"isViews"
></span>
<span
class=
"iconRight"
v-show=
"isViews"
></span>
</header>
</header>
</van-sticky>
</van-sticky>
<div
class=
"north"
>
<img
src=
"../../assets/imgs/north.png"
alt=
""
>
</div>
<grid-layout
:layout.sync=
"layout"
<grid-layout
:layout.sync=
"layout"
:col-num=
"colNum"
:col-num=
"colNum"
:row-height=
"30"
:row-height=
"30"
...
@@ -16,7 +19,7 @@
...
@@ -16,7 +19,7 @@
:prevent-collision=
"false"
:prevent-collision=
"false"
:preventCollision=
"true"
:preventCollision=
"true"
>
>
<grid-item
v-for=
"
item
in layout"
<grid-item
v-for=
"
(item)
in layout"
:static=
"item.static"
:static=
"item.static"
:x=
"item.x"
:x=
"item.x"
:y=
"item.y"
:y=
"item.y"
...
@@ -31,12 +34,15 @@
...
@@ -31,12 +34,15 @@
:style=
"
{'backgroundColor':item.c,'border':(item.type == 'thorough'? 'none !important':'')}"
:style=
"
{'backgroundColor':item.c,'border':(item.type == 'thorough'? 'none !important':'')}"
>
>
<span
class=
"text"
:class=
"item.w>(item.h*5) ? '': 'rowText'"
>
{{
item
.
name
}}
</span>
<span
class=
"text"
:class=
"item.w>(item.h*5) ? '': 'rowText'"
>
{{
item
.
name
}}
</span>
<span
class=
"remove"
@
click=
"removeItem(item.i)"
v-if=
"!item.i"
>
x
</span>
<span
class=
"remove"
@
click=
"removeItem(item.i)"
v-if=
"showHeader"
>
x
</span>
<!--
<span
class=
"remove"
@
click=
"removeItem(item.i)"
v-if=
"item.i && isEdit"
>
x
</span>
-->
</grid-item>
</grid-item>
</grid-layout>
</grid-layout>
<div
class=
"setBtns"
>
<div
class=
"setBtns"
>
<van-button
@
click=
"addItem"
type=
"info"
size=
"mini"
v-if=
"!isViews"
>
添加房间
</van-button>
<van-button
@
click=
"addItem"
type=
"info"
size=
"mini"
v-if=
"!isViews"
>
添加房间
</van-button>
<van-button
@
click=
"addOther"
type=
"info"
size=
"mini"
v-if=
"!isViews"
>
添加其他
</van-button>
<van-button
@
click=
"addOther"
type=
"info"
size=
"mini"
v-if=
"!isViews"
>
添加其他
</van-button>
<van-button
@
click=
"addBase"
type=
"info"
size=
"mini"
v-if=
"!isViews"
>
添加基础设施
</van-button>
<!--
<van-button
@
click=
"editItem"
type=
"info"
size=
"mini"
v-if=
"!isViews"
>
修改
</van-button>
-->
<van-grid
direction=
"horizontal"
:column-num=
"2"
class=
"footer"
v-if=
"isViews"
>
<van-grid
direction=
"horizontal"
:column-num=
"2"
class=
"footer"
v-if=
"isViews"
>
风险等级图例:
风险等级图例:
<span
class=
"riskTab type1"
></span>
重大风险
<span
class=
"riskTab type1"
></span>
重大风险
...
@@ -110,6 +116,7 @@ export default {
...
@@ -110,6 +116,7 @@ export default {
isViews
:
false
,
// true:查看页面; false: 添加页面
isViews
:
false
,
// true:查看页面; false: 添加页面
showHeader
:
true
,
showHeader
:
true
,
isRoom
:
true
,
//是否为添加房间
isRoom
:
true
,
//是否为添加房间
layoutData
:[]
}
}
},
},
props
:{
props
:{
...
@@ -123,6 +130,7 @@ export default {
...
@@ -123,6 +130,7 @@ export default {
// this.$nextTick(() => {
// this.$nextTick(() => {
// this.rotateBox();
// this.rotateBox();
// });
// });
console
.
log
(
'
floorId==>>
'
,
this
.
$route
.
params
.
floorId
)
if
(
this
.
_props
.
isView
)
{
if
(
this
.
_props
.
isView
)
{
console
.
log
(
'
作为组件传值==>>
'
,)
console
.
log
(
'
作为组件传值==>>
'
,)
this
.
isViews
=
true
this
.
isViews
=
true
...
@@ -210,11 +218,15 @@ export default {
...
@@ -210,11 +218,15 @@ export default {
getFun
(
'
/ledger/room/list
'
,
data
).
then
((
res
)
=>
{
getFun
(
'
/ledger/room/list
'
,
data
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
this
.
layout
=
[]
this
.
layout
=
[]
res
.
rows
.
forEach
((
item
)
=>
{
this
.
layoutData
=
res
.
data
res
.
data
.
forEach
((
item
)
=>
{
item
.
position
=
JSON
.
parse
(
item
.
position
)
item
.
position
=
JSON
.
parse
(
item
.
position
)
item
.
position
.
i
=
item
.
id
item
.
position
.
i
=
item
.
id
item
.
position
.
id
=
item
.
id
if
(
!
this
.
showHeader
)
{
item
.
position
.
isDraggable
=
false
item
.
position
.
isDraggable
=
false
item
.
position
.
isResizable
=
false
item
.
position
.
isResizable
=
false
}
if
(
!
this
.
isViews
||
item
.
position
.
type
==
'
thorough
'
)
{
//添加页面不显示颜色
if
(
!
this
.
isViews
||
item
.
position
.
type
==
'
thorough
'
)
{
//添加页面不显示颜色
item
.
position
.
c
=
'
#e6e5e5
'
item
.
position
.
c
=
'
#e6e5e5
'
}
else
{
}
else
{
...
@@ -281,6 +293,11 @@ export default {
...
@@ -281,6 +293,11 @@ export default {
this
.
layout
.
splice
(
index
,
1
);
this
.
layout
.
splice
(
index
,
1
);
return
return
}
}
this
.
$dialog
.
confirm
({
title
:
'
提示
'
,
message
:
'
是否删除
'
,
})
.
then
(()
=>
{
postFun
(
'
/ledger/room/delete/
'
+
val
).
then
((
res
)
=>
{
postFun
(
'
/ledger/room/delete/
'
+
val
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
Toast
.
success
(
'
删除成功
'
);
Toast
.
success
(
'
删除成功
'
);
...
@@ -289,45 +306,53 @@ export default {
...
@@ -289,45 +306,53 @@ export default {
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
log
(
'
err==>>
'
,
err
)
console
.
log
(
'
err==>>
'
,
err
)
})
})
})
.
catch
(()
=>
{
// on cancel
});
},
//添加基础设施
addBase
(){
},
},
// 移动后的事件
// 移动后的事件
movedEvent
(
i
,
newX
,
newY
){
movedEvent
(
i
,
newX
,
newY
){
this
.
layOutItem
.
x
=
newX
this
.
layOutItem
.
x
=
newX
this
.
layOutItem
.
y
=
newY
this
.
layOutItem
.
y
=
newY
console
.
log
(
'
layOutItem==>>
'
,
this
.
layOutItem
)
// console.log('layOutItem==>>',this.layOutItem)
// console.log('this.layout==>>',this.layout)
},
},
// 调整大小后的事件
// 调整大小后的事件
resizedEvent
:
function
(
i
,
newH
,
newW
){
resizedEvent
:
function
(
i
,
newH
,
newW
){
this
.
layOutItem
.
w
=
newW
this
.
layOutItem
.
w
=
newW
this
.
layOutItem
.
h
=
newH
this
.
layOutItem
.
h
=
newH
console
.
log
(
'
layOutItem==>>
'
,
this
.
layOutItem
)
// console.log('layOutItem==>>',this.layOutItem)
// console.log('this.layout==>>',this.layout)
},
},
//关闭
//关闭
close
(){
close
(){
history
.
go
(
-
1
)
history
.
go
(
-
1
)
},
},
// 确定 保存房间信息
//edger/room/update/batch
// 确定 执行批量编辑保存
confim
(){
confim
(){
if
(
this
.
roomName
==
''
)
{
// if (this.roomName == '') {
Toast
.
fail
({
// Toast.fail({
title
:
'
提示
'
,
// title: '提示',
forbidClick
:
true
,
// forbidClick: true,
message
:
'
请先添加房间!
'
,
// message: '请先添加房间!',
// })
// return
// }
let
data
=
this
.
layoutData
this
.
layoutData
.
forEach
((
item
)
=>
{
item
.
position
=
JSON
.
stringify
(
item
.
position
)
})
})
return
console
.
log
(
'
data==>>
'
,
data
)
}
postFun
(
'
/ledger/room/update/batch
'
,
data
).
then
((
res
)
=>
{
let
data
=
{
floorId
:
this
.
$route
.
params
.
floorId
?
this
.
$route
.
params
.
floorId
:
'
18
'
,
name
:
this
.
roomName
,
position
:
JSON
.
stringify
(
this
.
layOutItem
),
roomType
:
this
.
isRoom
?
this
.
roomType
:
'
9999
'
,
}
postFun
(
'
/ledger/room/save
'
,
data
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
Toast
.
success
(
'
提交
成功
'
);
Toast
.
success
(
'
保存
成功
'
);
this
.
getRoomInfo
()
this
.
getRoomInfo
()
this
.
roomType
=
''
this
.
roomName
=
''
}
}
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
log
(
'
err==>>
'
,
err
)
console
.
log
(
'
err==>>
'
,
err
)
...
@@ -350,13 +375,29 @@ export default {
...
@@ -350,13 +375,29 @@ export default {
h
:
3
,
h
:
3
,
i
:
''
,
i
:
''
,
name
:
this
.
roomName
,
name
:
this
.
roomName
,
c
:
'
#
0091EA
'
,
c
:
'
#
e6e5e5
'
,
type
:
this
.
isRoom
?
this
.
roomType
:
'
thorough
'
,
type
:
this
.
isRoom
?
this
.
roomType
:
'
thorough
'
,
isDraggable
:
true
,
isDraggable
:
true
,
isResizable
:
true
isResizable
:
true
}
}
this
.
layout
.
push
(
this
.
layOutItem
)
this
.
layout
.
push
(
this
.
layOutItem
)
console
.
log
(
'
layOutItem==>>
'
,
this
.
layOutItem
)
// console.log('layOutItem==>>',this.layOutItem)
let
data
=
{
floorId
:
this
.
$route
.
params
.
floorId
?
this
.
$route
.
params
.
floorId
:
'
18
'
,
name
:
this
.
roomName
,
position
:
JSON
.
stringify
(
this
.
layOutItem
),
roomType
:
this
.
isRoom
?
this
.
roomType
:
'
9999
'
,
}
postFun
(
'
/ledger/room/save
'
,
data
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
// Toast.success('保存成功');
this
.
getRoomInfo
()
this
.
roomType
=
''
this
.
roomName
=
''
}
}).
catch
((
err
)
=>
{
console
.
log
(
'
err==>>
'
,
err
)
})
},
},
cancelDialog
(){
cancelDialog
(){
this
.
roomType
=
''
this
.
roomType
=
''
...
@@ -379,6 +420,17 @@ export default {
...
@@ -379,6 +420,17 @@ export default {
width
:
100vw
;
width
:
100vw
;
position
:
relative
;
position
:
relative
;
}
}
.north
{
position
:
absolute
;
display
:
inline-block
;
top
:
1.5rem
;
right
:
0.5rem
;
z-index
:
999
;
}
.north
img
{
width
:
15px
;
height
:
30px
;
}
.footer
{
.footer
{
/* position: fixed; */
/* position: fixed; */
/* left: 0; */
/* left: 0; */
...
...
src/views/riskProject/add/addCurrent.vue
View file @
f35384ea
...
@@ -3,56 +3,176 @@
...
@@ -3,56 +3,176 @@
<LHeader
:text=
"text"
></LHeader>
<LHeader
:text=
"text"
></LHeader>
<van-tabs
v-model=
"active"
@
change=
"tabList"
color=
"#2980f7"
animated
>
<van-tabs
v-model=
"active"
@
change=
"tabList"
color=
"#2980f7"
animated
>
<van-tab
title=
"固有风险信息"
>
<van-tab
title=
"固有风险信息"
>
<van-form
@
submit=
"onSubmit"
:scroll-to-error=
"true"
:show-error=
"false"
validate-trigger=
"onSubmit"
>
<van-form
@
submit=
"onSubmit"
:scroll-to-error=
"true"
:show-error=
"false"
validate-trigger=
"onSubmit"
>
<div
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
>
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
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.projectName"
label=
"所属项目"
readonly
placeholder=
"请输入"
/>
required
<van-field
readonly
required
name=
"buildingName"
:value=
"form.buildingName"
label=
"所属建筑物"
name=
"userName"
placeholder=
"请输入"
/>
: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: '所属楼层不能为空' }]"
/>
<van-field
readonly
required
name=
"roomName"
:value=
"form.roomName"
label=
"所属房间"
placeholder=
"请输入"
<div
style=
"display: flex;"
>
@
click=
"seletRoom('room')"
:rules=
"[
{ required: true, message: '所属房间不能为空' }]" />
<van-field
readonly
<van-field
readonly
required
name=
"name"
v-model=
"form.name"
label=
"风险源名称"
placeholder=
"请输入"
required
:rules=
"[
{ required: true, message: '风险源名称不能为空' }]" @click="seletSource()" />
name=
"roomName"
<van-field
readonly
required
name=
"name"
v-model=
"form.name"
label=
"风险点类型"
placeholder=
"请输入"
:value=
"form.roomName"
:rules=
"[
{ required: true, message: '风险点类型不能为空' }]" @click="seletSource()" />
label=
"所属房间"
<van-field
readonly
required
name=
"name"
v-model=
"form.name"
label=
"安全警示标志"
placeholder=
"请输入"
placeholder=
"请输入"
:rules=
"[
{ required: true, message: '安全警示标志不能为空' }]" @click="seletSource()" />
@
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>
<van-field
v-model=
"form.factor"
required
name=
"factor"
label=
"风险因素"
placeholder=
"请选择"
<van-field
@
click=
"seletFactor('factor')"
:rules=
"[
{ required: true, message: '风险因素不能为空' }]" />
required
clickable
name=
"name"
v-model=
"form.name"
label=
"危险源名称"
placeholder=
"请输入"
:rules=
"[
{ required: true, message: '危险源名称不能为空' }]"
/>
<!-- 单选 -->
<van-field
required
clickable
name=
"pointType"
v-model=
"form.pointType"
label=
"风险点类型"
placeholder=
"请选择"
@
click=
"selectData('pointType', true)"
:rules=
"[
{ required: true, message: '风险点类型不能为空' }]"
/>
<!-- 多选 -->
<van-field
v-model=
"form.safetyWarningSigns"
readonly
required
name=
"safetyWarningSigns"
label=
"安全警示标志"
placeholder=
"请选择"
@
click=
"selectData('safetyWarningSigns', false)"
:rules=
"[
{ required: true, message: '安全警示标志不能为空' }]"
/>
<van-field
v-model=
"form.factor"
readonly
required
name=
"factor"
label=
"风险因素"
placeholder=
"请选择"
@
click=
"selectData('factor', false)"
:rules=
"[
{ required: true, message: '风险因素不能为空' }]"
/>
<van-field
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=
"selectData('type', false)"
:rules=
"[
{ required: true, message: '准事故类型不能为空' }]"
/>
<van-field
readonly
v-model=
"form.level"
required
name=
"level"
label=
"风险等级"
placeholder=
"请选择"
<van-field
@
click=
"seletGrade('level')"
:rules=
"[
{ required: true, message: '风险等级不能为空' }]" />
readonly
v-model=
"form.level"
required
name=
"level"
label=
"风险等级"
placeholder=
"请选择"
@
click=
"seletGrade"
:rules=
"[
{ required: true, message: '风险等级不能为空' }]"
/>
<!--
<van-field
readonly
v-model=
"form.level"
required
name=
"level"
label=
"风险等级"
placeholder=
"请选择"
@
click=
"seletGrade('level')"
:rules=
"[
{ required: true, message: '风险等级不能为空' }]" /> -->
<van-field
required
name=
"presenceLocation"
v-model=
"form.presenceLocation"
label=
"存在部位"
<van-field
placeholder=
"请输入"
:rules=
"[
{ required: true, message: '存在部位不能为空' }]" />
required
name=
"presenceLocation"
v-model=
"form.presenceLocation"
label=
"存在部位"
placeholder=
"请输入"
:rules=
"[
{ required: true, message: '存在部位不能为空' }]"
/>
<div
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
>
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
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"
>
<div
style=
"
<!-- 11111111111 -->
<div
style=
"
width: 2.13333rem;
width: 2.13333rem;
height: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
background: #f7f8fa;
...
@@ -60,8 +180,13 @@
...
@@ -60,8 +180,13 @@
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
>
...
@@ -69,19 +194,38 @@
...
@@ -69,19 +194,38 @@
</template>
</template>
</van-field>
</van-field>
<div
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
>
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
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
autosize
placeholder=
"请输入"
/>
v-model=
"form.measuresProject"
<van-field
name=
"measuresProjectFile[]"
label=
" "
>
name=
"measuresProject"
label=
""
type=
"textarea"
rows=
"3"
autosize
placeholder=
"请输入"
/>
<van-field
name=
"measuresProjectFile[]"
label=
"上传附件"
>
<
template
#input
>
<
template
#input
>
<van-uploader
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresProjectFile"
<van-uploader
accept=
"file"
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"
>
<div
style=
"
<div
style=
"
width: 2.13333rem;
width: 2.13333rem;
height: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
background: #f7f8fa;
...
@@ -89,42 +233,81 @@
...
@@ -89,42 +233,81 @@
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;">
<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="请输入" /> -->
<div
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
>
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
应采取的管控措施
应采取的管控措施
</div>
</div>
<van-field
v-model=
"form.takenMeasuresAdministration"
name=
"takenMeasuresAdministration"
label=
""
<van-field
type=
"textarea"
rows=
"3"
autosize
placeholder=
"请输入"
/>
v-model=
"form.takenMeasuresAdministration"
<van-field
required
v-model=
"form.measuresDeptId"
name=
"measuresDeptId"
label=
"管控责任单位 "
type=
"textarea"
name=
"takenMeasuresAdministration"
rows=
"1"
autosize
placeholder=
"请输入"
/>
label=
""
<van-field
required
v-model=
"form.measuresUserId"
name=
"measuresUserId"
label=
"管控责任人 "
type=
"textarea"
type=
"textarea"
rows=
"1"
autosize
placeholder=
"请输入"
/>
rows=
"3"
<van-field
name=
"measuresAdministrationFile[]"
label=
" "
>
autosize
placeholder=
"请输入"
/>
<van-field
required
v-model=
"form.measuresDeptName"
name=
"measuresDeptName"
label=
"管控责任单位 "
type=
"textarea"
rows=
"1"
autosize
@
click=
"
{
measuresDept = true;
}
"
placeholder=
"请选择"
/>
<van-field
required
v-model=
"form.measuresUserName"
name=
"measuresUserName"
label=
"管控责任人 "
type=
"textarea"
rows=
"1"
autosize
@
click=
"getUserData('measuresUser')"
placeholder=
"请选择"
/>
<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"
multiple
@
delete=
"deleteFile(...arguments, 'measuresAdministrationFile')"
>
: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;
...
@@ -132,9 +315,13 @@
...
@@ -132,9 +315,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
>
...
@@ -142,59 +329,83 @@
...
@@ -142,59 +329,83 @@
</template>
</template>
</van-field>
</van-field>
<div
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
>
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
危险源管理
危险源管理
</div>
</div>
<van-field
required
v-model=
"form.hazardSourceName"
name=
"hazardSourceName"
label=
"危险源名称 "
<van-field
type=
"textarea"
rows=
"1"
autosize
placeholder=
"请输入"
/>
v-model=
"form.hazardSourceName"
<van-field
required
v-model=
"form.majorHazardSource"
name=
"majorHazardSource"
label=
"是否存在重大危险源 "
name=
"hazardSourceName"
type=
"textarea"
rows=
"1"
autosize
placeholder=
"请输入"
/>
label=
"危险源名称 "
<van-field
required
v-model=
"form.measuresUserId"
name=
"measuresUserId"
label=
"重大危险源描述"
type=
"textarea"
type=
"textarea"
rows=
"3"
autosize
placeholder=
"请输入"
/>
rows=
"1"
<van-field
v-model=
"form.majorHazardSourceDescription"
name=
"majorHazardSourceDescription"
label=
"应急措施"
autosize
type=
"textarea"
rows=
"1"
autosize
placeholder=
"请输入"
/>
placeholder=
"请输入"
<van-field
name=
"measuresEmergencyFile[]"
label=
" "
>
/>
<van-field
name=
"majorHazardSource"
label=
"是否存在重大危险源"
>
<
template
#input
>
<
template
#input
>
<van-uploader
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresEmergencyFile"
<van-switch
v-model=
"form.majorHazardSource"
size=
"20"
/>
accept=
"file"
result-type=
"file"
@
delete=
"deleteFile(...arguments, 'measuresEmergencyFile')"
>
<template
slot=
"default"
>
<div
style=
"
width: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
"
>
<img
src=
"@/assets/upload/file.png"
alt=
""
style=
"width: 0.64rem; height: 0.64rem"
/>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
</div>
</
template
>
</van-uploader>
</
template
>
</
template
>
</van-field>
</van-field>
<div
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
>
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
重大危险源描述
</div>
<van-field
v-model=
"form.majorHazardSourceDescription"
name=
"majorHazardSourceDescription"
label=
""
type=
"textarea"
rows=
"3"
autosize
placeholder=
"请输入"
/>
<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"
<van-field
rows=
"1"
autosize
placeholder=
"请输入"
/>
v-model=
"form.measuresEmergency"
<van-field
name=
"measuresEmergencyFile[]"
label=
" "
>
name=
"measuresEmergency"
label=
""
type=
"textarea"
rows=
"3"
autosize
placeholder=
"请输入"
/>
<van-field
name=
"measuresEmergencyFile[]"
label=
"上传附件"
>
<
template
#input
>
<
template
#input
>
<van-uploader
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresEmergencyFile"
<van-uploader
accept=
"file"
result-type=
"file"
multiple
@
delete=
"deleteFile(...arguments, 'measuresEmergencyFile')"
>
: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;
...
@@ -202,35 +413,226 @@
...
@@ -202,35 +413,226 @@
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
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
>
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
参考依据
参考依据
</div>
</div>
<van-field
readonly
required
clickable
name=
"trouble"
:value=
"form.trouble"
label=
"参考依据"
<van-field
placeholder=
"请选择"
@
click=
"showTrouble = true"
:rules=
"[{ required: true, message: '事故类型不能为空' }]"
/>
readonly
required
clickable
name=
"referenceBasis"
:value=
"form.referenceBasis"
label=
"参考依据"
placeholder=
"请选择"
@
click=
"selectData('referenceBasis', false)"
:rules=
"[{ required: true, message: '事故类型不能为空' }]"
/>
<van-dialog
v-model=
"showGradeDialog"
title=
"风险评测配置"
:show-cancel-button=
"false"
:show-confirm-button=
"false"
>
<div
class=
"dialogContain"
>
<van-collapse
v-model=
"activeNames"
>
<van-collapse-item
title=
"风险模型"
name=
"1"
>
<van-field
readonly
required
name=
"level"
label=
"当前风险模型"
placeholder=
"LS风险矩阵评估模型"
/>
</van-collapse-item>
<van-collapse-item
title=
"风险模型配置"
name=
"2"
>
<van-popover
v-model=
"showPopover"
trigger=
"click"
:actions=
"columnsRiskRank"
@
select=
"onSelect"
>
<
template
#reference
>
<van-field
v-model=
"possibleValue"
readonly
required
name=
"level"
label=
"发生的可能性"
placeholder=
"请选择"
/>
</
template
>
</van-popover>
<van-popover
v-model=
"showPopoveSetRank"
trigger=
"click"
:actions=
"columnsSetRank"
@
select=
"onSelectSetRank"
>
<
template
#reference
>
<van-field
v-model=
"severityValue"
readonly
required
name=
"level"
label=
"后果严重程度"
placeholder=
"请选择"
/>
</
template
>
</van-popover>
</van-collapse-item>
</van-collapse>
<van-row
type=
"flex"
justify=
"center"
style=
"margin-top:10px"
>
<van-col
span=
"6"
><van-button
size=
"small"
plain
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>
</div>
</van-dialog>
<!-- 楼层弹出层 -->
<van-popup
v-model=
"ShowfloorList"
position=
"bottom"
:style=
"{ height: '100%' }"
>
<selectFloor
:listdata=
"floorSource"
@
closeSlect=
"closeSlectfloor"
@
saveSlect=
"saveSlectfloor"
></selectFloor>
</van-popup>
<!-- 单选弹出层 -->
<van-popup
v-model=
"showSelect"
position=
"bottom"
>
<van-picker
show-toolbar
value-key=
"dictValue"
:columns=
"columnsData"
@
confirm=
"saveSelect"
@
cancel=
"showSelect = false"
/>
</van-popup>
<!-- 复选弹出层 -->
<van-popup
v-model=
"showCheckSelect"
position=
"bottom"
:style=
"{ height: '100%' }"
>
<selectList
:listdata=
"columnsCheckData"
@
closeSlect=
"showCheckSelect = false"
@
saveSlect=
"saveCheckSelect"
></selectList>
</van-popup>
<!-- 房间弹出层 -->
<van-popup
v-model=
"showSource"
position=
"bottom"
>
<van-picker
show-toolbar
value-key=
"name"
:columns=
"columnsSource"
@
confirm=
"onConSource"
@
cancel=
"showSource = false"
/>
</van-popup>
<!-- 管控责任单位 -->
<van-popup
v-model=
"measuresDept"
position=
"bottom"
:style=
"{ height: '100%' }"
>
<div
class=
"van-picker__toolbar"
style=
"position: absolute;width: 100%;top: 0;"
>
<button
type=
"button"
class=
"van-picker__cancel"
v-on:click=
"
{
form.measuresDeptId = 0;
projectDept = false;
}
"
>
取消
</button
><button
type=
"button"
class=
"van-picker__confirm"
@
click=
"closeDept"
>
确认
</button>
</div>
<div
style=
"display:flex;margin-top: 44px;"
>
<selectDept
@
changeDept=
"changeDept"
></selectDept>
</div>
</van-popup>
<!-- 管控责任人 -->
<van-popup
v-model=
"showTrouble"
position=
"bottom"
>
<van-picker
show-toolbar
value-key=
"nickName"
:columns=
"columnsTrouble"
@
confirm=
"onConTrouble"
@
cancel=
"showTrouble = false"
/>
</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>
</van-tab>
</van-tab>
<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;"
>
<div
style=
"font-size: 0.45rem;padding: 5px 0;"
>
{{ item.title }}
{{ item.title }}
</div>
</div>
...
@@ -243,54 +645,42 @@
...
@@ -243,54 +645,42 @@
</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) }}
</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.describe }}
</van-col>
<van-col
span=
"15"
>
{{ item.describe }}
</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>
<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>
<van-popup
v-model=
"showTrouble"
position=
"bottom"
>
<van-picker
show-toolbar
value-key=
"name"
:columns=
"columnsTrouble"
@
confirm=
"onConTrouble"
@
cancel=
"showTrouble = false"
/>
</van-popup>
<!-- 楼层弹出层 -->
<div
<van-popup
v-model=
"ShowfloorList"
position=
"bottom"
:style=
"{ height: '100%' }"
>
v-if=
"active != 0"
<selectFloor
:listdata=
"floorSource"
@
closeSlect=
"closeSlectfloor"
@
saveSlect=
"saveSlectfloor"
></selectFloor>
style=
"display: flex;
</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-picker
show-toolbar
value-key=
"name"
:columns=
"columnsSource"
@
confirm=
"onConSource"
@
cancel=
"showSource = false"
/>
</van-popup>
<div
v-if=
"active != 0"
style=
"display: flex;
justify-content: space-around;
justify-content: space-around;
background-color: #fff;
background-color: #fff;
border-top: 1px solid #e3e3e3;
border-top: 1px solid #e3e3e3;
...
@@ -298,60 +688,170 @@
...
@@ -298,60 +688,170 @@
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>
</div>
<!-- 风险源 -->
<!-- 楼层弹出层 -->
<van-popup
v-model=
"visiableSource"
round
position=
"bottom"
<van-popup
:style=
"{ height: '30%', display: 'flex', flexDirection: 'column' }"
>
v-model=
"ShowfloorList"
<van-button
class=
"btns"
@
click=
"nameByselfInput"
>
输入风险源名称
</van-button>
position=
"bottom"
<van-button
class=
"btns"
@
click=
"importFromList"
>
从风险清单导入
</van-button>
:style=
"{ height: '100%' }"
<van-button
class=
"btns"
@
click=
"cancleSource"
>
取消
</van-button>
>
<selectFloor
:listdata=
"floorSource"
@
closeSlect=
"closeSlectfloor"
@
saveSlect=
"saveSlectfloor"
></selectFloor>
</van-popup>
<!-- 单选弹出层 -->
<van-popup
v-model=
"showSelect"
position=
"bottom"
>
<van-picker
show-toolbar
value-key=
"dictValue"
:columns=
"columnsData"
@
confirm=
"saveSelect"
@
cancel=
"showSelect = false"
/>
</van-popup>
<!-- 复选弹出层 -->
<van-popup
v-model=
"showCheckSelect"
position=
"bottom"
:style=
"{ height: '100%' }"
>
<selectList
:listdata=
"columnsCheckData"
@
closeSlect=
"showCheckSelect = false"
@
saveSlect=
"saveCheckSelect"
></selectList>
</van-popup>
</van-popup>
<!-- 房间弹出层 -->
<van-popup
v-model=
"showSource"
position=
"bottom"
>
<van-picker
show-toolbar
value-key=
"name"
:columns=
"columnsSource"
@
confirm=
"onConSource"
@
cancel=
"showSource = false"
/>
</van-popup>
<!-- 管控责任单位 -->
<van-popup
v-model=
"measuresDept"
position=
"bottom"
:style=
"{ height: '100%' }"
>
<div
class=
"van-picker__toolbar"
style=
"position: absolute;width: 100%;top: 0;"
>
<button
type=
"button"
class=
"van-picker__cancel"
v-on:click=
"
{
form.measuresDeptId = 0;
projectDept = false;
}
"
>
取消
</button
><button
type=
"button"
class=
"van-picker__confirm"
@
click=
"closeDept"
>
确认
</button>
</div>
<div
style=
"display:flex;margin-top: 44px;"
>
<selectDept
@
changeDept=
"changeDept"
></selectDept>
</div>
</van-popup>
<!-- 管控责任人 -->
<van-popup
v-model=
"showTrouble"
position=
"bottom"
>
<van-picker
show-toolbar
value-key=
"nickName"
:columns=
"columnsTrouble"
@
confirm=
"onConTrouble"
@
cancel=
"showTrouble = false"
/>
</van-popup>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
LHeader
from
"
@/components/header.vue
"
;
import
LHeader
from
"
@/components/header.vue
"
;
import
selectDept
from
"
@/components/selectDept/index.vue
"
;
import
SelectList
from
"
@/components/selectList.vue
"
;
import
SelectList
from
"
@/components/selectList.vue
"
;
import
selectFloor
from
"
@/components/selectFloor.vue
"
;
import
selectFloor
from
"
@/components/selectFloor.vue
"
;
import
{
timestampToTime
,
generateId
}
from
"
@/utils/format
"
;
import
{
getUserInfo
,
getLocalUserInfo
}
from
"
@/utils/userInfo
"
;
// import selectPeople from "@/views/riskTask/selectPeople/index.vue";
import
{
getFun
,
postFun
}
from
"
@/service/table.js
"
;
import
{
getFun
,
postFun
}
from
"
@/service/table.js
"
;
// import {
// getFormList,
// postHdSource,
// postHdType,
// postHdPeople,
// postReAdd,
// postriskConiCause,
// postRiskShowMeasures,
// } from "@/service/risk";
export
default
{
export
default
{
name
:
"
addCurrent
"
,
name
:
"
addCurrent
"
,
components
:
{
components
:
{
LHeader
,
LHeader
,
selectDept
,
SelectList
,
SelectList
,
selectFloor
selectFloor
},
},
activated
()
{
this
.
showSetRank
=
false
;
// 再次关闭弹出层 以防万一
this
.
getList
();
this
.
$bus
.
$on
(
"
riskLevelBus
"
,
res
=>
{
this
.
showSetRank
=
false
;
// 再次关闭弹出层 以防万一
console
.
log
(
Boolean
(
res
));
if
(
res
)
{
this
.
riskRank
=
res
;
}
else
{
this
.
setRank
=
""
;
}
// 销毁一下监听事件 不然会越加越多
this
.
$bus
.
$off
(
"
riskLevelBus
"
);
});
},
beforeRouteEnter
(
to
,
from
,
next
)
{
if
(
from
.
name
==
"
riskInherent
"
)
{
sessionStorage
.
setItem
(
"
inherenForm
"
,
""
);
sessionStorage
.
setItem
(
"
level
"
,
""
);
}
next
();
},
beforeRouteLeave
(
to
,
from
,
next
)
{
beforeRouteLeave
(
to
,
from
,
next
)
{
if
(
to
.
name
!=
"
matrix-grad
"
)
{
if
(
to
.
name
!=
"
riskInherent
"
)
{
sessionStorage
.
setItem
(
"
inherenForm
"
,
JSON
.
stringify
(
this
.
form
));
}
}
next
();
next
();
},
},
data
()
{
data
()
{
return
{
return
{
measuresDept
:
false
,
ShowfloorList
:
false
,
ShowfloorList
:
false
,
floorSource
:
[],
floorSource
:
[],
dataName
:
""
,
// 单选
showSelect
:
false
,
columnsData
:
[],
// 多选
showCheckSelect
:
false
,
columnsCheckData
:
[],
ShowAccidentList
:
false
,
ShowAccidentList
:
false
,
ShowSelectList
:
false
,
ShowSelectList
:
false
,
columnsAccident
:
[],
showPopoveSetRank
:
false
,
inherentId
:
""
,
activeNames
:
[
"
1
"
],
text
:
"
编辑固有风险
"
,
showPopover
:
false
,
showGradeDialog
:
false
,
taskId
:
""
,
text
:
"
添加固有风险
"
,
id
:
""
,
id
:
""
,
isTimely
:
1
,
isTimely
:
1
,
active
:
0
,
active
:
0
,
...
@@ -366,20 +866,20 @@ export default {
...
@@ -366,20 +866,20 @@ export default {
factor
:
""
,
//风险因素
factor
:
""
,
//风险因素
showFactor
:
false
,
showFactor
:
false
,
columnsFactor
:
[],
columnsFactor
:
[],
messageList
:
[],
source
:
""
,
//风险源
source
:
""
,
//风险源
userPrefix
:
""
,
//风险源
userPrefix
:
""
,
//风险源
showSource
:
false
,
showSource
:
false
,
columnsSource
:
[],
columnsSource
:
[],
trouble
:
""
,
//事故类型
trouble
:
""
,
//事故类型
columnsAccident
:
[],
showTrouble
:
false
,
showTrouble
:
false
,
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
:
[],
// 定级方式图片
...
@@ -405,9 +905,15 @@ export default {
...
@@ -405,9 +905,15 @@ export default {
measuresEmergencyFile
:
[],
//管理措施图片
measuresEmergencyFile
:
[],
//管理措施图片
urgent
:
""
,
//应急措施文字
urgent
:
""
,
//应急措施文字
urgentImg
:
[],
//应急措施图片
urgentImg
:
[],
//应急措施图片
buildingIds
:
""
,
// 退回原因
returnCause
:
""
,
// 退回原因
isShowreturnCause
:
false
,
isShowreturnCause
:
false
,
visiableSource
:
false
possibleValue
:
""
,
possibleScore
:
0
,
severityValue
:
""
,
severityScore
:
0
,
messageList
:
[],
inherentId
:
0
,
buildingIds
:
""
};
};
},
},
created
()
{
created
()
{
...
@@ -418,9 +924,12 @@ export default {
...
@@ -418,9 +924,12 @@ export default {
this
.
$route
.
params
.
buildingId
||
sessionStorage
.
getItem
(
"
buildingId
"
);
this
.
$route
.
params
.
buildingId
||
sessionStorage
.
getItem
(
"
buildingId
"
);
this
.
postReturnEcho
();
this
.
postReturnEcho
();
}
}
this
.
getFloor
();
},
this
.
getFXYS
();
mounted
()
{
this
.
getZSGLX
();
if
(
sessionStorage
.
getItem
(
"
inherenForm
"
)
!=
""
)
{
this
.
form
=
JSON
.
parse
(
sessionStorage
.
getItem
(
"
inherenForm
"
));
this
.
form
.
level
=
sessionStorage
.
getItem
(
"
level
"
);
}
},
},
methods
:
{
methods
:
{
timestampToTimes
(
time
)
{
timestampToTimes
(
time
)
{
...
@@ -436,34 +945,173 @@ export default {
...
@@ -436,34 +945,173 @@ export default {
this
.
getList
();
this
.
getList
();
}
}
},
},
getFloor
()
{
// 请求表单数据
getFun
(
`/risk/plan/floor/list/
${
this
.
buildingIds
}
`
)
getList
()
{
getFun
(
`/risk/plan/existing/list/
${
this
.
inherentId
}
`
)
.
then
(
res
=>
{
.
then
(
res
=>
{
// this.$toast.clear();
console
.
log
(
// this.showSource = true;
"
%c [ res ]-670
"
,
let
newArr
=
this
.
renameKeyInTree
(
res
.
data
,
"
name
"
,
"
text
"
);
"
font-size:13px; background:pink; color:#bf2c9f;
"
,
this
.
floorSource
=
newArr
;
res
);
this
.
messageList
=
res
.
data
;
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
//
this.$toast.fail("加载失败,请稍后再试");
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
});
},
},
getFXYS
()
{
// 请求详情数据
getFun
(
`/risk/plan/dict/data/list?dictType=risk_plan_factor`
)
postReturnEcho
()
{
this
.
$toast
.
loading
({
message
:
"
加载中...
"
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
duration
:
0
});
getFun
(
`/risk/plan/inherent/details/
${
this
.
inherentId
}
`
)
.
then
(
res
=>
{
.
then
(
res
=>
{
this
.
form
=
res
.
data
;
this
.
getFloor
();
this
.
uploaderImg
=
(
res
.
data
.
pictureFile
||
[]).
map
(
item
=>
{
return
{
...
item
,
url
:
item
.
filePath
};
});
this
.
measuresProjectFile
=
(
res
.
data
.
measuresProjectFile
||
[]).
map
(
item
=>
{
return
{
...
item
,
url
:
item
.
filePath
};
}
);
this
.
measuresAdministrationFile
=
(
res
.
data
.
measuresAdministrationFile
||
[]
).
map
(
item
=>
{
return
{
...
item
,
url
:
item
.
filePath
};
});
this
.
measuresEmergencyFile
=
(
res
.
data
.
measuresEmergencyFile
||
[]
).
map
(
item
=>
{
return
{
...
item
,
url
:
item
.
filePath
};
});
})
.
catch
(()
=>
{
this
.
$toast
.
clear
();
});
},
// 项目负责人
onConTrouble
(
value
)
{
if
(
!
value
)
{
this
.
showTrouble
=
false
;
return
;
}
this
.
form
[
this
.
userPrefix
+
"
Id
"
]
=
value
.
userId
;
this
.
form
[
this
.
userPrefix
+
"
Name
"
]
=
value
.
nickName
;
console
.
log
(
"
this.form :>>
"
,
this
.
form
);
this
.
showTrouble
=
false
;
},
getUserData
(
e
)
{
this
.
userPrefix
=
e
;
if
(
!
this
.
form
.
measuresDeptId
)
{
this
.
$toast
({
title
:
"
提示
"
,
message
:
"
请选择管控责任单位!
"
});
return
false
;
}
this
.
$toast
.
loading
({
message
:
"
加载中...
"
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
duration
:
0
});
getFun
(
`/risk/plan/user/list/
${
this
.
form
.
measuresDeptId
}
`
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
columnsTrouble
=
res
.
data
;
this
.
columnsTrouble
=
res
.
data
;
// 对数据进行赋值
this
.
$toast
.
clear
();
this
.
showTrouble
=
true
;
}
else
{
this
.
$toast
.
clear
();
}
});
},
changeDept
(
id
,
name
)
{
console
.
log
(
id
);
this
.
form
.
measuresDeptId
=
id
;
this
.
form
.
measuresDeptName
=
name
;
},
closeDept
()
{
console
.
log
(
this
.
form
.
deptId
);
this
.
measuresDept
=
false
;
},
selectData
(
dataName
,
isSinge
)
{
this
.
dataName
=
dataName
;
getFun
(
`/risk/plan/dict/data/list?dictType=risk_plan_
${
dataName
.
toLowerCase
()}
`
)
.
then
(
res
=>
{
if
(
isSinge
)
{
this
.
columnsData
=
res
.
data
;
this
.
showSelect
=
true
;
}
else
{
this
.
columnsCheckData
=
res
.
data
;
this
.
showCheckSelect
=
true
;
}
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
// this.$toast.fail("加载失败,请稍后再试");
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
},
saveSelect
(
data
)
{
this
.
form
[
this
.
dataName
]
=
data
.
dictValue
;
this
.
showSelect
=
false
;
},
saveCheckSelect
(
data
)
{
this
.
form
[
this
.
dataName
]
=
data
.
join
(
"
,
"
);
this
.
showCheckSelect
=
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
;
},
},
getZSGLX
()
{
getFloor
()
{
getFun
(
`/risk/plan/dict/data/list?dictType=risk_plan_type`
)
console
.
log
(
this
.
form
,
111
);
getFun
(
`/risk/plan/floor/list/
${
this
.
form
.
buildingId
}
`
)
.
then
(
res
=>
{
.
then
(
res
=>
{
this
.
columnsAccident
=
res
.
data
;
// this.$toast.clear();
// this.showSource = true;
let
newArr
=
this
.
renameKeyInTree
(
res
.
data
,
"
name
"
,
"
text
"
);
this
.
floorSource
=
newArr
;
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
//
this.$toast.fail("加载失败,请稍后再试");
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
});
},
},
seletFloor
(
name
)
{
seletFloor
(
name
)
{
...
@@ -485,56 +1133,66 @@ export default {
...
@@ -485,56 +1133,66 @@ export default {
this
.
columnsSource
=
res
.
data
;
this
.
columnsSource
=
res
.
data
;
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
//
this.$toast.fail("加载失败,请稍后再试");
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
});
},
},
//风险因素
seletFactor
(
name
)
{
//风险等级
// this.showTrouble = true;
seletGrade
(
name
)
{
this
.
riskName
=
name
;
this
.
getGradeList
(
"
possibility
"
);
this
.
ShowSelectList
=
true
;
this
.
getGradeList
(
"
severity
"
);
this
.
showGradeDialog
=
true
;
},
},
//准事故类型
//风险模型配置
seletType
(
name
)
{
getGradeList
(
type
)
{
// this.showTrouble = true;
// possibility 可能性 severity 严重性
this
.
riskName
=
name
;
getFun
(
`/risk/plan/matrix/
${
type
}
/list`
).
then
(
res
=>
{
this
.
ShowAccidentList
=
true
;
let
arr
=
[];
res
.
data
.
forEach
(
item
=>
{
arr
.
push
({
text
:
item
.
title
,
type
:
item
.
type
,
sort
:
item
.
sort
,
score
:
item
.
score
});
});
if
(
type
===
"
possibility
"
)
{
this
.
columnsRiskRank
=
arr
;
}
else
{
this
.
columnsSetRank
=
arr
;
}
});
},
},
seletGrade
(
name
)
{
this
.
showTrouble
=
true
;
closeSlectfloor
()
{
this
.
riskName
=
name
;
this
.
ShowfloorList
=
false
;
this
.
columnsTrouble
=
[
{
name
:
"
重大风险
"
},
},
{
saveSlectfloor
(
data
)
{
name
:
"
较大风险
"
this
.
form
.
floorId
=
data
.
id
;
this
.
form
.
floorName
=
data
.
text
;
this
.
ShowfloorList
=
false
;
},
},
{
name
:
"
一般风险
"
onSelect
(
data
)
{
this
.
possibleValue
=
data
.
text
;
this
.
possibleScore
=
data
.
score
;
},
},
{
onSelectSetRank
(
data
)
{
name
:
"
较小风险
"
this
.
severityValue
=
data
.
text
;
}
this
.
severityScore
=
data
.
score
;
];
},
},
performTasks
()
{
//开始测评
goResultPage
()
{
this
.
$router
.
push
({
this
.
$router
.
push
({
name
:
"
addPresent
"
,
name
:
"
resultPage
"
,
params
:
{
params
:
{
id
:
this
.
inherentId
,
score
:
this
.
severityScore
*
this
.
possibleScore
// planId:this.planId
buildingId
:
this
.
buildingId
,
planId
:
this
.
inherentId
,
floorId
:
this
.
form
.
floorId
,
floorName
:
this
.
form
.
floorName
,
projectName
:
this
.
form
.
projectName
,
projectId
:
this
.
form
.
projectId
,
roomName
:
this
.
form
.
roomName
,
roomId
:
this
.
form
.
roomId
}
}
});
});
},
},
performTasks
()
{
console
.
log
(
"
1233213 :>>
"
,
1233213
);
},
// 点击预览图
// 点击预览图
clickPre
(
e
)
{
clickPre
(
e
)
{
console
.
log
(
e
);
console
.
log
(
e
);
...
@@ -562,9 +1220,47 @@ export default {
...
@@ -562,9 +1220,47 @@ export default {
}
}
}
}
},
},
jsonToFormData
(
config
)
{
const
formData
=
new
FormData
();
//循环传入的值转换formData
Object
.
keys
(
config
).
forEach
(
key
=>
{
formData
.
append
(
key
,
config
[
key
]);
});
return
formData
;
},
onSubmit
(
values
)
{
onSubmit
(
values
)
{
let
url
=
"
/riskMain/add
"
;
// console.log('%c [ values ]-592', 'font-size:13px; background:pink; color:#bf2c9f;', values)
postReAdd
(
url
,
formdata
)
var
formDataJson
=
this
.
jsonToFormData
(
this
.
form
);
let
url
=
"
/risk/plan/inherent
"
;
values
.
hdPicture1
.
forEach
(
item
=>
{
if
(
item
.
file
)
{
formDataJson
.
append
(
"
pictureFile[]
"
,
item
.
file
);
}
else
{
formDataJson
.
append
(
"
pictureFile[]
"
,
item
.
fileId
);
}
});
values
[
"
measuresProjectFile[]
"
].
forEach
(
item
=>
{
if
(
item
.
file
)
{
formDataJson
.
append
(
"
measuresProjectFile[]
"
,
item
.
file
);
}
else
{
formDataJson
.
append
(
"
measuresProjectFile[]
"
,
item
.
fileId
);
}
});
values
[
"
measuresEmergencyFile[]
"
].
forEach
(
item
=>
{
if
(
item
.
file
)
{
formDataJson
.
append
(
"
measuresEmergencyFile[]
"
,
item
.
file
);
}
else
{
formDataJson
.
append
(
"
measuresEmergencyFile[]
"
,
item
.
fileId
);
}
});
values
[
"
measuresAdministrationFile[]
"
].
forEach
(
item
=>
{
if
(
item
.
file
)
{
formDataJson
.
append
(
"
measuresAdministrationFile[]
"
,
item
.
file
);
}
else
{
formDataJson
.
append
(
"
measuresAdministrationFile[]
"
,
item
.
fileId
);
}
});
postFun
(
url
,
formDataJson
)
.
then
(
res
=>
{
.
then
(
res
=>
{
this
.
$toast
.
clear
();
this
.
$toast
.
clear
();
this
.
$toast
.
success
({
this
.
$toast
.
success
({
...
@@ -580,69 +1276,6 @@ export default {
...
@@ -580,69 +1276,6 @@ export default {
this
.
$toast
.
clear
();
this
.
$toast
.
clear
();
},
},
// 请求表单数据
getList
()
{
getFun
(
`/risk/plan/existing/list/
${
this
.
inherentId
}
`
)
.
then
(
res
=>
{
console
.
log
(
"
%c [ res ]-670
"
,
"
font-size:13px; background:pink; color:#bf2c9f;
"
,
res
);
this
.
messageList
=
res
.
data
;
})
.
catch
(()
=>
{
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
},
// 请求已退回详情数据
postReturnEcho
()
{
this
.
$toast
.
loading
({
message
:
"
加载中...
"
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
duration
:
0
});
getFun
(
`/risk/plan/inherent/details/
${
this
.
inherentId
}
`
)
.
then
(
res
=>
{
this
.
form
=
res
.
data
;
this
.
uploaderImg
=
(
res
.
data
.
pictureFile
||
[]).
map
(
item
=>
{
return
{
...
item
,
url
:
item
.
filePath
};
});
this
.
measuresProjectFile
=
(
res
.
data
.
measuresProjectFile
||
[]).
map
(
item
=>
{
return
{
...
item
,
url
:
item
.
filePath
};
}
);
this
.
measuresAdministrationFile
=
(
res
.
data
.
measuresAdministrationFile
||
[]
).
map
(
item
=>
{
return
{
...
item
,
url
:
item
.
filePath
};
});
this
.
measuresEmergencyFile
=
(
res
.
data
.
measuresEmergencyFile
||
[]
).
map
(
item
=>
{
return
{
...
item
,
url
:
item
.
filePath
};
});
})
.
catch
(()
=>
{
this
.
$toast
.
clear
();
});
},
// 所属项目
// 所属项目
onConProjectName
(
value
)
{
onConProjectName
(
value
)
{
if
(
!
value
)
{
if
(
!
value
)
{
...
@@ -670,7 +1303,7 @@ export default {
...
@@ -670,7 +1303,7 @@ export default {
}
}
);
);
},
},
// 风险源
// 房间
onConSource
(
value
)
{
onConSource
(
value
)
{
if
(
!
value
)
{
if
(
!
value
)
{
this
.
showSource
=
false
;
this
.
showSource
=
false
;
...
@@ -680,27 +1313,6 @@ export default {
...
@@ -680,27 +1313,6 @@ export default {
this
.
form
[
this
.
userPrefix
+
"
Name
"
]
=
value
.
name
;
this
.
form
[
this
.
userPrefix
+
"
Name
"
]
=
value
.
name
;
this
.
showSource
=
false
;
this
.
showSource
=
false
;
},
},
seletSource
()
{
this
.
visiableSource
=
true
;
},
//从风险清单列表导入
importFromList
()
{
},
//输入风险源名称
nameByselfInput
()
{
},
//取消风险弹窗
cancleSource
()
{
this
.
visiableSource
=
false
;
},
// 事故类型
onConTrouble
(
value
)
{
if
(
!
value
)
{
this
.
showTrouble
=
false
;
return
;
}
this
.
form
[
this
.
riskName
]
=
value
.
name
;
this
.
showTrouble
=
false
;
},
// 风险定级
// 风险定级
onConSetRank
(
value
)
{
onConSetRank
(
value
)
{
this
.
showSetRank
=
false
;
this
.
showSetRank
=
false
;
...
@@ -751,6 +1363,16 @@ export default {
...
@@ -751,6 +1363,16 @@ export default {
this
.
mainDutyPeopLe
=
value
.
userName
;
this
.
mainDutyPeopLe
=
value
.
userName
;
this
.
showMainDutyPeopLe
=
false
;
this
.
showMainDutyPeopLe
=
false
;
},
},
//添加房间
tjfjClcik
()
{
this
.
$router
.
push
({
name
:
"
riskView
"
,
params
:
{
floorId
:
this
.
form
.
floorId
,
isView
:
false
}
});
},
cancel
()
{
cancel
()
{
this
.
$router
.
go
(
-
1
);
this
.
$router
.
go
(
-
1
);
...
@@ -768,45 +1390,14 @@ export default {
...
@@ -768,45 +1390,14 @@ export default {
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
:
{
// setRank(newVal, oldVal) {
// if (newVal == "其他定级方式") {
// this.showSetRankMode = true;
// } else {
// this.showSetRankMode = false;
// }
// },
}
}
},
watch
:
{}
};
};
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
/* @import url(); 引入css类 */
/* @import url(); 引入css类 */
.con-list {
.con-list {
margin-bottom: 1.5rem;
padding: 0;
padding: 0;
background-color: #f0f1f5;
background-color: #f0f1f5;
...
@@ -840,10 +1431,10 @@ export default {
...
@@ -840,10 +1431,10 @@ export default {
}
}
}
}
.
btns
{
.
dialogContain
{
margin: 10px 10px 0 10px
;
width: 100%
;
border: none
;
height: 100%
;
border-bottom: 1px solid #efefef
;
padding: 10px
;
color: #2980f7
;
box-sizing: border-box
;
}
}
</
style
>
</
style
>
src/views/riskProject/add/addInherent.vue
View file @
f35384ea
<
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>
<<<<<<<
HEAD
<van-field
required
clickable
name=
"name"
v-model=
"form.name"
label=
"危险源名称"
placeholder=
"请输入"
<van-field
required
clickable
name=
"name"
v-model=
"form.name"
label=
"危险源名称"
placeholder=
"请输入"
:rules=
"[
{ required: true, message: '危险源名称不能为空' }]" />
:rules=
"[
{ required: true, message: '危险源名称不能为空' }]" />
<van-field
required
clickable
name=
"name"
v-model=
"form.name"
label=
"风险点类型"
placeholder=
"请输入"
<van-field
required
clickable
name=
"name"
v-model=
"form.name"
label=
"风险点类型"
placeholder=
"请输入"
...
@@ -29,30 +82,106 @@
...
@@ -29,30 +82,106 @@
:rules=
"[
{ required: true, message: '安全警示标志不能为空' }]" />
:rules=
"[
{ required: true, message: '安全警示标志不能为空' }]" />
<van-field
v-model=
"form.factor"
readonly
required
name=
"factor"
label=
"风险因素"
placeholder=
"请选择"
<van-field
v-model=
"form.factor"
readonly
required
name=
"factor"
label=
"风险因素"
placeholder=
"请选择"
@
click=
"seletFactor('factor')"
:rules=
"[
{ required: true, message: '风险因素不能为空' }]" />
@
click=
"seletFactor('factor')"
:rules=
"[
{ required: true, message: '风险因素不能为空' }]" />
=======
<van-field
required
clickable
name=
"name"
v-model=
"form.name"
label=
"危险源名称"
placeholder=
"请输入"
:rules=
"[
{ required: true, message: '危险源名称不能为空' }]"
/>
<!-- 单选 -->
<van-field
required
clickable
name=
"pointType"
v-model=
"form.pointType"
label=
"风险点类型"
placeholder=
"请选择"
@
click=
"selectData('pointType', true)"
:rules=
"[
{ required: true, message: '风险点类型不能为空' }]"
/>
<!-- 多选 -->
<van-field
v-model=
"form.safetyWarningSigns"
readonly
required
name=
"safetyWarningSigns"
label=
"安全警示标志"
placeholder=
"请选择"
@
click=
"selectData('safetyWarningSigns', false)"
:rules=
"[
{ required: true, message: '安全警示标志不能为空' }]"
/>
<van-field
v-model=
"form.factor"
readonly
required
name=
"factor"
label=
"风险因素"
placeholder=
"请选择"
@
click=
"selectData('factor', false)"
:rules=
"[
{ required: true, message: '风险因素不能为空' }]"
/>
>>>>>>> develop
<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=
"selectData('type', false)"
: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;
...
@@ -60,27 +189,52 @@
...
@@ -60,27 +189,52 @@
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=
"3"
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"
>
<div
style=
"
<div
style=
"
width: 2.13333rem;
width: 2.13333rem;
height: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
background: #f7f8fa;
...
@@ -88,15 +242,21 @@
...
@@ -88,15 +242,21 @@
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
<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
<img
...
@@ -107,34 +267,56 @@
...
@@ -107,34 +267,56 @@
应采取的管控措施
应采取的管控措施
</div>
</div>
<van-field
<van-field
v-model="form.
m
easuresAdministration"
v-model=
"form.
takenM
easuresAdministration"
name="
m
easuresAdministration"
name=
"
takenM
easuresAdministration"
label=
""
label=
""
type=
"textarea"
type=
"textarea"
rows=
"3"
rows=
"3"
autosize
autosize
placeholder=
"请输入"
placeholder=
"请输入"
/> -->
/>
<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.takenMeasuresAdministration"
name=
"takenMeasuresAdministration"
label=
""
type=
"textarea"
rows=
"3"
autosize
placeholder=
"请输入"
/>
<van-field
required
v-model=
"form.measuresDeptId"
name=
"measuresDeptId"
label=
"管控责任单位 "
type=
"textarea"
rows=
"1"
<van-field
autosize
placeholder=
"请输入"
/>
required
<van-field
required
v-model=
"form.measuresUserId"
name=
"measuresUserId"
label=
"管控责任人 "
type=
"textarea"
rows=
"1"
v-model=
"form.measuresDeptName"
autosize
placeholder=
"请输入"
/>
name=
"measuresDeptName"
label=
"管控责任单位 "
type=
"textarea"
rows=
"1"
autosize
@
click=
"
{
measuresDept = true;
}
"
placeholder=
"请选择"
/>
<van-field
required
v-model=
"form.measuresUserName"
name=
"measuresUserName"
label=
"管控责任人 "
type=
"textarea"
rows=
"1"
autosize
@
click=
"getUserData('measuresUser')"
placeholder=
"请选择"
/>
<van-field
name=
"measuresAdministrationFile[]"
label=
"
"
>
<van-field
name=
"measuresAdministrationFile[]"
label=
"
上传附件
"
>
<
template
#input
>
<
template
#input
>
<van-uploader
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresAdministrationFile"
accept=
"file"
<van-uploader
result-type=
"file"
@
delete=
"deleteFile(...arguments, 'measuresAdministrationFile')"
>
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresAdministrationFile"
accept=
"file"
result-type=
"file"
@
delete=
"deleteFile(...arguments, 'measuresAdministrationFile')"
>
<template
slot=
"default"
>
<template
slot=
"default"
>
<div
style=
"
<div
style=
"
width: 2.13333rem;
width: 2.13333rem;
height: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
background: #f7f8fa;
...
@@ -142,45 +324,97 @@
...
@@ -142,45 +324,97 @@
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.hazardSourceName"
name=
"hazardSourceName"
label=
"危险源名称 "
type=
"textarea"
rows=
"1"
autosize
<van-field
placeholder=
"请输入"
/>
v-model=
"form.hazardSourceName"
name=
"hazardSourceName"
<van-field
v-model=
"form.majorHazardSource"
name=
"majorHazardSource"
label=
"是否存在重大危险源 "
type=
"textarea"
rows=
"1"
label=
"危险源名称 "
autosize
placeholder=
"请输入"
/>
type=
"textarea"
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
rows=
"1"
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
autosize
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
placeholder=
"请输入"
/>
<van-field
name=
"majorHazardSource"
label=
"是否存在重大危险源"
>
<
template
#input
>
<van-switch
v-model=
"form.majorHazardSource"
size=
"20"
/>
</
template
>
</van-field>
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
重大危险源描述
重大危险源描述
</div>
</div>
<van-field
v-model=
"form.majorHazardSourceDescription"
name=
"majorHazardSourceDescription"
label=
" "
type=
"textarea"
<van-field
rows=
"3"
autosize
placeholder=
"请输入"
/>
v-model=
"form.majorHazardSourceDescription"
<div
style=
"height: 1rem;font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';font-weight: 700;line-height: 1rem;"
>
name=
"majorHazardSourceDescription"
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
label=
""
style=
"position: relative;top: 32%;transform: translateY(-50%);"
/>
type=
"textarea"
rows=
"3"
autosize
placeholder=
"请输入"
/>
<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"
<van-field
name=
"measuresEmergencyFile[]"
label=
" "
>
name=
"measuresEmergency"
label=
""
type=
"textarea"
rows=
"3"
autosize
placeholder=
"请输入"
/>
<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;
...
@@ -188,8 +422,13 @@
...
@@ -188,8 +422,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
>
...
@@ -197,94 +436,217 @@
...
@@ -197,94 +436,217 @@
</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=
"referenceBasis"
:value=
"form.referenceBasis"
label=
"参考依据"
placeholder=
"请选择"
@
click=
"selectData('referenceBasis', false)"
: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-picker
show-toolbar
value-key=
"name"
:columns=
"columnsTrouble"
@
confirm=
"onConTrouble"
<van-popup
@
cancel=
"showTrouble = false"
/>
v-model=
"ShowfloorList"
position=
"bottom"
:style=
"{ height: '100%' }"
>
<selectFloor
:listdata=
"floorSource"
@
closeSlect=
"closeSlectfloor"
@
saveSlect=
"saveSlectfloor"
></selectFloor>
</van-popup>
</van-popup>
<van-popup
v-model=
"showSource"
position=
"bottom"
>
<van-picker
show-toolbar
value-key=
"name"
:columns=
"columnsSource"
@
confirm=
"onConSource"
<!-- 单选弹出层 -->
@
cancel=
"showSource = false"
/>
<van-popup
v-model=
"showSelect"
position=
"bottom"
>
<van-picker
show-toolbar
value-key=
"dictValue"
:columns=
"columnsData"
@
confirm=
"saveSelect"
@
cancel=
"showSelect = 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=
"showCheckSelect"
position=
"bottom"
:style=
"{ height: '100%' }"
>
<selectList
:listdata=
"columnsCheckData"
@
closeSlect=
"showCheckSelect = false"
@
saveSlect=
"saveCheckSelect"
></selectList>
</van-popup>
</van-popup>
<!-- 风险源弹出层 -->
<van-popup
v-model=
"ShowSelectList"
position=
"bottom"
:style=
"{ height: '100%' }"
>
<!-- 房间弹出层 -->
<selectList
:listdata=
"columnsTrouble"
@
closeSlect=
"closeSlect"
@
saveSlect=
"saveSlect"
></selectList>
<van-popup
v-model=
"showSource"
position=
"bottom"
>
<van-picker
show-toolbar
value-key=
"name"
:columns=
"columnsSource"
@
confirm=
"onConSource"
@
cancel=
"showSource = false"
/>
</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=
"measuresDept"
</selectList>
position=
"bottom"
:style=
"{ height: '100%' }"
>
<div
class=
"van-picker__toolbar"
style=
"position: absolute;width: 100%;top: 0;"
>
<button
type=
"button"
class=
"van-picker__cancel"
v-on:click=
"
{
form.measuresDeptId = 0;
projectDept = false;
}
"
>
取消
</button
><button
type=
"button"
class=
"van-picker__confirm"
@
click=
"closeDept"
>
确认
</button>
</div>
<div
style=
"display:flex;margin-top: 44px;"
>
<selectDept
@
changeDept=
"changeDept"
></selectDept>
</div>
</van-popup>
<!-- 管控责任人 -->
<van-popup
v-model=
"showTrouble"
position=
"bottom"
>
<van-picker
show-toolbar
value-key=
"nickName"
:columns=
"columnsTrouble"
@
confirm=
"onConTrouble"
@
cancel=
"showTrouble = false"
/>
</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>
<
script
>
<
script
>
import
LHeader
from
"
@/components/header.vue
"
;
import
LHeader
from
"
@/components/header.vue
"
;
import
selectDept
from
"
@/components/selectDept/index.vue
"
;
import
SelectList
from
"
@/components/selectList.vue
"
;
import
SelectList
from
"
@/components/selectList.vue
"
;
import
selectFloor
from
"
@/components/selectFloor.vue
"
;
import
selectFloor
from
"
@/components/selectFloor.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 {
// getFormList,
// postHdSource,
// postHdType,
// postHdPeople,
// postReAdd,
// postriskConiCause,
// postRiskShowMeasures,
// } from "@/service/risk";
export
default
{
export
default
{
name
:
"
addInherent
"
,
name
:
"
addInherent
"
,
components
:
{
components
:
{
LHeader
,
LHeader
,
selectDept
,
SelectList
,
SelectList
,
selectFloor
selectFloor
},
},
...
@@ -325,8 +687,18 @@ export default {
...
@@ -325,8 +687,18 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
measuresDept
:
false
,
ShowfloorList
:
false
,
ShowfloorList
:
false
,
floorSource
:
[],
floorSource
:
[],
dataName
:
""
,
// 单选
showSelect
:
false
,
columnsData
:
[],
// 多选
showCheckSelect
:
false
,
columnsCheckData
:
[],
ShowAccidentList
:
false
,
ShowAccidentList
:
false
,
ShowSelectList
:
false
,
ShowSelectList
:
false
,
showPopoveSetRank
:
false
,
showPopoveSetRank
:
false
,
...
@@ -423,10 +795,80 @@ export default {
...
@@ -423,10 +795,80 @@ export default {
this
.
form
.
level
=
sessionStorage
.
getItem
(
"
level
"
);
this
.
form
.
level
=
sessionStorage
.
getItem
(
"
level
"
);
}
}
this
.
getFloor
();
this
.
getFloor
();
this
.
getFXYS
();
this
.
getZSGLX
();
},
},
methods
:
{
methods
:
{
// 项目负责人
onConTrouble
(
value
)
{
if
(
!
value
)
{
this
.
showTrouble
=
false
;
return
;
}
this
.
form
[
this
.
userPrefix
+
"
Id
"
]
=
value
.
userId
;
this
.
form
[
this
.
userPrefix
+
"
Name
"
]
=
value
.
nickName
;
console
.
log
(
"
this.form :>>
"
,
this
.
form
);
this
.
showTrouble
=
false
;
},
getUserData
(
e
)
{
this
.
userPrefix
=
e
;
if
(
!
this
.
form
.
measuresDeptId
)
{
this
.
$toast
({
title
:
"
提示
"
,
message
:
"
请选择管控责任单位!
"
});
return
false
;
}
this
.
$toast
.
loading
({
message
:
"
加载中...
"
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
duration
:
0
});
getFun
(
`/risk/plan/user/list/
${
this
.
form
.
measuresDeptId
}
`
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
columnsTrouble
=
res
.
data
;
// 对数据进行赋值
this
.
$toast
.
clear
();
this
.
showTrouble
=
true
;
}
else
{
this
.
$toast
.
clear
();
}
});
},
changeDept
(
id
,
name
)
{
console
.
log
(
id
);
this
.
form
.
measuresDeptId
=
id
;
this
.
form
.
measuresDeptName
=
name
;
},
closeDept
()
{
console
.
log
(
this
.
form
.
deptId
);
this
.
measuresDept
=
false
;
},
selectData
(
dataName
,
isSinge
)
{
this
.
dataName
=
dataName
;
getFun
(
`/risk/plan/dict/data/list?dictType=risk_plan_
${
dataName
.
toLowerCase
()}
`
)
.
then
(
res
=>
{
if
(
isSinge
)
{
this
.
columnsData
=
res
.
data
;
this
.
showSelect
=
true
;
}
else
{
this
.
columnsCheckData
=
res
.
data
;
this
.
showCheckSelect
=
true
;
}
})
.
catch
(()
=>
{
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
},
saveSelect
(
data
)
{
this
.
form
[
this
.
dataName
]
=
data
.
dictValue
;
this
.
showSelect
=
false
;
},
saveCheckSelect
(
data
)
{
this
.
form
[
this
.
dataName
]
=
data
.
join
(
"
,
"
);
this
.
showCheckSelect
=
false
;
},
renameKeyInTree
(
data
,
oldKey
,
newKey
)
{
renameKeyInTree
(
data
,
oldKey
,
newKey
)
{
let
arr
=
data
.
map
(
item
=>
{
let
arr
=
data
.
map
(
item
=>
{
const
newItem
=
{
...
item
};
const
newItem
=
{
...
item
};
...
@@ -461,31 +903,7 @@ export default {
...
@@ -461,31 +903,7 @@ export default {
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
});
},
},
getFXYS
()
{
getFun
(
`/risk/plan/dict/data/list?dictType=risk_plan_factor`
)
.
then
(
res
=>
{
this
.
columnsTrouble
=
res
.
data
;
})
.
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
)
{
seletFloor
(
name
)
{
// this.$toast.loading({
// message: "加载中...",
// forbidClick: true,
// loadingType: "spinner",
// duration: 0
// });
this
.
ShowfloorList
=
true
;
this
.
ShowfloorList
=
true
;
this
.
userPrefix
=
name
;
this
.
userPrefix
=
name
;
},
},
...
@@ -507,18 +925,7 @@ export default {
...
@@ -507,18 +925,7 @@ export default {
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
});
},
},
//风险因素
seletFactor
(
name
)
{
// this.showTrouble = true;
this
.
riskName
=
name
;
this
.
ShowSelectList
=
true
;
},
//准事故类型
seletType
(
name
)
{
// this.showTrouble = true;
this
.
riskName
=
name
;
this
.
ShowAccidentList
=
true
;
},
//风险等级
//风险等级
seletGrade
(
name
)
{
seletGrade
(
name
)
{
this
.
getGradeList
(
"
possibility
"
);
this
.
getGradeList
(
"
possibility
"
);
...
@@ -553,8 +960,6 @@ export default {
...
@@ -553,8 +960,6 @@ export default {
// getConsequence(){
// getConsequence(){
// getFun(`/risk/plan/matrix/${type}/list`).then(res=>{
// getFun(`/risk/plan/matrix/${type}/list`).then(res=>{
// })
// },
closeSlectfloor
()
{
closeSlectfloor
()
{
this
.
ShowfloorList
=
false
;
this
.
ShowfloorList
=
false
;
},
},
...
@@ -563,20 +968,7 @@ export default {
...
@@ -563,20 +968,7 @@ export default {
this
.
form
.
floorName
=
data
.
text
;
this
.
form
.
floorName
=
data
.
text
;
this
.
ShowfloorList
=
false
;
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
;
},
onSelect
(
data
)
{
onSelect
(
data
)
{
this
.
possibleValue
=
data
.
text
;
this
.
possibleValue
=
data
.
text
;
this
.
possibleScore
=
data
.
score
;
this
.
possibleScore
=
data
.
score
;
...
@@ -749,7 +1141,7 @@ export default {
...
@@ -749,7 +1141,7 @@ export default {
}
}
);
);
},
},
//
风险源
//
房间
onConSource
(
value
)
{
onConSource
(
value
)
{
if
(
!
value
)
{
if
(
!
value
)
{
this
.
showSource
=
false
;
this
.
showSource
=
false
;
...
@@ -759,20 +1151,6 @@ export default {
...
@@ -759,20 +1151,6 @@ export default {
this
.
form
[
this
.
userPrefix
+
"
Name
"
]
=
value
.
name
;
this
.
form
[
this
.
userPrefix
+
"
Name
"
]
=
value
.
name
;
this
.
showSource
=
false
;
this
.
showSource
=
false
;
},
},
// 事故类型
onConTrouble
(
value
)
{
console
.
log
(
"
%c [ value ]-653
"
,
"
font-size:13px; background:pink; color:#bf2c9f;
"
,
value
);
if
(
!
value
)
{
this
.
showTrouble
=
false
;
return
;
}
this
.
form
[
this
.
riskName
]
=
value
.
name
;
this
.
showTrouble
=
false
;
},
// 风险定级
// 风险定级
onConSetRank
(
value
)
{
onConSetRank
(
value
)
{
this
.
showSetRank
=
false
;
this
.
showSetRank
=
false
;
...
...
src/views/riskProject/add/index.vue
View file @
f35384ea
...
@@ -389,13 +389,6 @@ export default {
...
@@ -389,13 +389,6 @@ export default {
this
.
currentDate
=
new
Date
();
this
.
currentDate
=
new
Date
();
},
},
getLeaderUserList
(
e
)
{
getLeaderUserList
(
e
)
{
if
(
!
this
.
form
.
projectId
)
{
this
.
$toast
({
title
:
"
提示
"
,
message
:
"
请选择关联项目!
"
});
return
false
;
}
this
.
userPrefix
=
e
;
this
.
userPrefix
=
e
;
this
.
$toast
.
loading
({
this
.
$toast
.
loading
({
message
:
"
加载中...
"
,
message
:
"
加载中...
"
,
...
@@ -439,14 +432,6 @@ export default {
...
@@ -439,14 +432,6 @@ export default {
this
.
projectDept
=
false
;
this
.
projectDept
=
false
;
},
},
getExecuteUser
()
{
getExecuteUser
()
{
if
(
!
this
.
form
.
projectId
)
{
this
.
$toast
({
title
:
"
提示
"
,
message
:
"
请选择关联项目!
"
});
return
false
;
}
this
.
filedName
=
"
nickName
"
;
this
.
filedName
=
"
nickName
"
;
this
.
$toast
.
loading
({
this
.
$toast
.
loading
({
message
:
"
加载中...
"
,
message
:
"
加载中...
"
,
...
...
src/views/riskProject/add/taskList.vue
View file @
f35384ea
...
@@ -197,6 +197,10 @@
...
@@ -197,6 +197,10 @@
<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-row
gutter=
""
>
<van-col
span=
"9"
>
所属房间:
</van-col>
<van-col
span=
"15"
>
{{
item
.
buildingName
+
item
.
floorName
+
item
.
roomName
}}
</van-col>
</van-row>
</van-col>
</van-col>
</van-col>
</van-col>
<van-col
span=
"4"
>
<van-col
span=
"4"
>
...
...
src/views/riskProject/assess/index.vue
View file @
f35384ea
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
<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
.
leader
UserName
}}
</van-col>
<van-col
span=
"15"
>
{{
item
.
create
UserName
}}
</van-col>
</van-row>
</van-row>
<van-row
gutter=
""
>
<van-row
gutter=
""
>
<van-col
span=
"9"
>
发起时间:
</van-col>
<van-col
span=
"9"
>
发起时间:
</van-col>
...
...
vue.config.js
View file @
f35384ea
...
@@ -8,11 +8,11 @@ module.exports = {
...
@@ -8,11 +8,11 @@ module.exports = {
//以上的ip和端口是我们本机的;下面为需要跨域的
//以上的ip和端口是我们本机的;下面为需要跨域的
proxy
:
{
//配置跨域
proxy
:
{
//配置跨域
'
/app-api
'
:
{
'
/app-api
'
:
{
target
:
'
http://192.168.4.232:8080/
'
,
//这里是后台的地址
//
target: 'http://192.168.4.232:8080/', //这里是后台的地址
// target: 'http://192.168.15.124:8080/', //这里是杨帆的地址
// target: 'http://192.168.15.124:8080/', //这里是杨帆的地址
// target: 'http://192.168.10.137:8080/', //这里是昊哥的地址
// target: 'http://192.168.10.137:8080/', //这里是昊哥的地址
// target: 'http://192.168.10.36:8080/', //这里是昊哥的地址
// target: 'http://192.168.10.36:8080/', //这里是昊哥的地址
// target: 'http://localhost:8080
/', //这里是后台的地址
target
:
'
http://localhost:8081
/
'
,
//这里是后台的地址
ws
:
true
,
ws
:
true
,
changOrigin
:
true
,
//允许跨域
changOrigin
:
true
,
//允许跨域
// logLevel: 'debug', // 显示代理调试信息
// logLevel: 'debug', // 显示代理调试信息
...
...
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