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
a31deac3
Commit
a31deac3
authored
Sep 07, 2023
by
p-wanping.song
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
0906问题列表修复
parent
559a46c5
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
414 additions
and
249 deletions
+414
-249
src/views/my/sign.vue
src/views/my/sign.vue
+32
-0
src/views/riskProject/add/addCurrent.vue
src/views/riskProject/add/addCurrent.vue
+14
-6
src/views/riskProject/add/addInherent.vue
src/views/riskProject/add/addInherent.vue
+14
-6
src/views/riskProject/add/addProject.vue
src/views/riskProject/add/addProject.vue
+216
-137
src/views/riskProject/add/inherentTemplate/detail.vue
src/views/riskProject/add/inherentTemplate/detail.vue
+14
-7
src/views/riskProject/taskLedger/tabDetail.vue
src/views/riskProject/taskLedger/tabDetail.vue
+122
-91
vue.config.js
vue.config.js
+2
-2
No files found.
src/views/my/sign.vue
View file @
a31deac3
...
...
@@ -31,6 +31,17 @@
<div>
{{
form
.
signTime
}}
</div>
</
template
>
-->
</van-field>
<van-field
required
readonly
name=
"projectName"
:value=
"form.projectName"
label=
"关联项目"
placeholder=
"请选择"
@
click=
"showProject = true"
:rules=
"[{ required: true, message: '关联项目不能为空' }]"
>
</van-field>
<van-field
required
name=
"remark"
...
...
@@ -62,6 +73,13 @@
>
</div>
</van-form>
<van-popup
v-model=
"showProject"
position=
"bottom"
:style=
"{ height: '100%' }"
>
<selectPeople
@
onClose=
"onClose"
@
onSave=
"onSave"
></selectPeople>
</van-popup>
</div>
</template>
...
...
@@ -69,12 +87,15 @@
import
LHeader
from
"
@/components/header.vue
"
;
import
{
getUserInfo
}
from
"
@/utils/userInfo
"
;
import
{
getFun
,
postFun
}
from
"
@/service/table.js
"
;
import
selectPeople
from
"
@/views/riskProject/add/projectList.vue
"
;
export
default
{
components
:
{
LHeader
,
selectPeople
,
},
data
()
{
return
{
showProject
:
false
,
timer
:
""
,
userName
:
"
用户名
"
,
form
:
{
...
...
@@ -82,6 +103,8 @@ export default {
file
:
[],
remark
:
""
,
userId
:
""
,
projectName
:
""
,
projectId
:
""
,
},
};
},
...
...
@@ -94,6 +117,15 @@ export default {
},
methods
:
{
onClose
()
{
this
.
showProject
=
false
;
},
onSave
(
val
)
{
this
.
onClose
();
console
.
log
(
val
);
this
.
form
.
projectId
=
val
.
id
;
this
.
form
.
projectName
=
val
.
name
;
},
toGetUserInfo
()
{
this
.
userName
=
getUserInfo
().
userName
;
this
.
form
.
userId
=
getUserInfo
().
userId
;
...
...
src/views/riskProject/add/addCurrent.vue
View file @
a31deac3
...
...
@@ -115,15 +115,23 @@
v-show=
"form.pointType == '设备设施类'"
>
<template
#input
>
<span
style=
"margin-right: 10px; color: red"
>
否
</span>
<van-switch
<van-radio-group
v-model=
"form.specialEquipment"
size=
"20"
name=
"specialEquipment"
/>
<span
style=
"margin-left: 10px; color: green"
>
是
</span>
direction=
"horizontal"
>
<van-radio
:name=
"true"
>
是
</van-radio>
<van-radio
:name=
"false"
>
否
</van-radio>
</van-radio-group>
</
template
>
</van-field>
<van-field
v-if=
"form.specialEquipment == true"
clickable
name=
"pointType"
v-model=
"form.equipmentNumber"
label=
"特种设备的证书号码"
placeholder=
"请选择"
/>
<!-- 多选 -->
<van-field
v-model=
"form.safetyWarningSigns"
...
...
src/views/riskProject/add/addInherent.vue
View file @
a31deac3
...
...
@@ -117,15 +117,23 @@
v-show=
"form.pointType == '设备设施类'"
>
<template
#input
>
<span
style=
"margin-right: 10px; color: red"
>
否
</span>
<van-switch
name=
"specialEquipment"
<van-radio-group
v-model=
"form.specialEquipment"
size=
"20"
/>
<span
style=
"margin-left: 10px; color: green"
>
是
</span>
direction=
"horizontal"
>
<van-radio
:name=
"true"
>
是
</van-radio>
<van-radio
:name=
"false"
>
否
</van-radio>
</van-radio-group>
</
template
>
</van-field>
<van-field
v-if=
"form.specialEquipment == true"
clickable
name=
"pointType"
v-model=
"form.equipmentNumber"
label=
"特种设备的证书号码"
placeholder=
"请选择"
/>
<!-- 多选 -->
<van-field
v-model=
"form.safetyWarningSigns"
...
...
src/views/riskProject/add/addProject.vue
View file @
a31deac3
<!-- 新建项目/新建楼宇-->
<
template
>
<div
class=
"project-component"
>
<LHeader
:text=
"initData[type].title"
:customBack=
"pageDestory"
></LHeader>
<van-form
...
...
@@ -12,9 +10,7 @@
:show-error=
"false"
validate-trigger=
"onSubmit"
>
<template
v-for=
"item in initData[type].columns"
>
<van-field
v-if=
"item.type === 'input'"
:name=
"item.name"
...
...
@@ -30,18 +26,62 @@
:name=
"item.name"
:label=
"item.label"
:value=
"form[item.key]"
:key=
"item.
name
"
:key=
"item.
key
"
readonly
@
click=
"choice.select(item)"
v-bind=
"item._config"
/>
<van-field
v-if=
"item.type === 'radio'"
:label=
"item.label"
v-bind=
"item._config"
:key=
"item.key"
:name=
"item.name"
>
<template
#input
>
<van-radio-group
v-model=
"form[item.key]"
direction=
"horizontal"
>
<van-radio
v-for=
"option in item.options"
:key=
"option.name"
:name=
"option.name"
>
{{
option
.
name
}}
</van-radio
>
</van-radio-group>
</
template
>
</van-field>
<van-field
v-if=
"item.type === 'checkbox'"
:label=
"item.label"
v-bind=
"item._config"
:key=
"item.key"
>
<
template
#input
>
<template
v-if=
"item.options.length == 1"
>
<van-checkbox
v-model=
"form[item.key]"
shape=
"square"
>
{{
item
.
options
[
0
].
name
}}
</van-checkbox>
</
template
>
<van-checkbox-group
v-else
v-model=
"form[item.key]"
direction=
"horizontal"
>
<van-checkbox
v-for=
"option in item.options"
:key=
"option.name"
:name=
"option.name"
shape=
"square"
>
{{ option.name }}
</van-checkbox>
</van-checkbox-group>
</template>
</van-field>
</template>
<!-- 选择层 -->
<van-popup
v-model=
"choice.visible"
position=
"bottom"
>
<van-picker
show-toolbar
value-key=
"name"
...
...
@@ -49,11 +89,9 @@
@
confirm=
"choice.confirm"
@
cancel=
"choice.cancel"
/>
</van-popup>
<div
class=
"action-btns"
>
<van-button
class=
"confirm-btn"
:loading=
"loadingStatus"
...
...
@@ -66,39 +104,42 @@
保存
</van-button>
<van-button
class=
"cancel-btn"
round
block
type=
"warning"
@
click=
"pageDestory"
>
<van-button
class=
"cancel-btn"
round
block
type=
"warning"
@
click=
"pageDestory"
>
取消
</van-button>
</div>
</van-form>
<!-- 选择项目小组 -->
<van-popup
v-model=
"dept.visible"
position=
"bottom"
:style=
"{ height: '100%' }"
<van-popup
v-model=
"dept.visible"
position=
"bottom"
:style=
"{ height: '100%' }"
>
<div
class=
"van-picker__toolbar"
style=
"position: absolute; width: 100%; top: 0"
>
<div
class=
"van-picker__toolbar"
style=
"position: absolute;width: 100%;top: 0;"
<button
type=
"button"
class=
"van-picker__cancel"
@
click=
"dept.close"
>
取消
</button
><button
type=
"button"
class=
"van-picker__confirm"
@
click=
"dept.confirm"
>
<button
type=
"button"
class=
"van-picker__cancel"
@
click=
"dept.close"
>
取消
</button
><button
type=
"button"
class=
"van-picker__confirm"
@
click=
"dept.confirm"
>
确认
</button>
</div>
<div
style=
"display:flex;margin-top: 44px;"
>
<selectDept
ref=
"selectDeptRef"
></selectDept>
</div>
</van-popup>
确认
</button>
</div>
<div
style=
"display: flex; margin-top: 44px"
>
<selectDept
ref=
"selectDeptRef"
></selectDept>
</div>
</van-popup>
</div>
</template>
<
script
>
...
...
@@ -108,28 +149,28 @@ import selectDept from "@/components/selectDept/index.vue";
export
default
{
components
:
{
LHeader
,
selectDept
,
selectDept
,
},
props
:
{
type
:
{
/* type:project,building */
type
:
String
,
default
:
"
building
"
default
:
"
building
"
,
},
projectId
:
{
type
:
Number
,
},
projectId
:{
type
:
Number
,
}
},
data
()
{
return
{
loadingStatus
:
false
,
loadingText
:
"
保存中...
"
,
form
:
{},
dept
:{
visible
:
false
,
select
:
this
.
deptSelect
,
close
:
this
.
deptClose
,
confirm
:
this
.
deptConfirm
dept
:
{
visible
:
false
,
select
:
this
.
deptSelect
,
close
:
this
.
deptClose
,
confirm
:
this
.
deptConfirm
,
},
choice
:
{
key
:
""
,
...
...
@@ -137,7 +178,7 @@ export default {
columns
:
[],
confirm
:
this
.
choiceConfirm
,
select
:
this
.
choiceSelect
,
cancel
:
this
.
choiceCancal
cancel
:
this
.
choiceCancal
,
},
initData
:
{
project
:
{
...
...
@@ -154,10 +195,10 @@ export default {
rules
:
[
{
required
:
true
,
message
:
"
项目名称不能为空
"
}
]
}
message
:
"
项目名称不能为空
"
,
}
,
]
,
}
,
},
{
label
:
"
项目类型
"
,
...
...
@@ -165,14 +206,14 @@ export default {
type
:
"
select
"
,
options
:
[
{
name
:
"
地产
"
name
:
"
地产
"
,
},
{
name
:
"
土地
"
name
:
"
土地
"
,
},
{
name
:
"
其他
"
}
name
:
"
其他
"
,
}
,
],
_config
:
{
required
:
true
,
...
...
@@ -180,28 +221,27 @@ export default {
rules
:
[
{
required
:
true
,
message
:
"
项目类型不能为空
"
}
]
}
message
:
"
项目类型不能为空
"
,
}
,
]
,
}
,
},
{
label
:
"
所属单位
"
,
key
:
"
deptName
"
,
type
:
"
input
"
,
method
:
this
.
projectDeptEvent
,
method
:
this
.
projectDeptEvent
,
_config
:
{
required
:
true
,
readonly
:
true
,
readonly
:
true
,
placeholder
:
"
请输入所属单位
"
,
rules
:
[
{
required
:
true
,
message
:
"
所属单位不能为空
"
}
]
message
:
"
所属单位不能为空
"
,
}
,
]
,
},
},
{
label
:
"
所在城市
"
,
...
...
@@ -213,10 +253,10 @@ export default {
rules
:
[
{
required
:
true
,
message
:
"
所在城市不能为空
"
}
]
}
message
:
"
所在城市不能为空
"
,
}
,
]
,
}
,
},
{
label
:
"
详细地址
"
,
...
...
@@ -228,12 +268,38 @@ export default {
rules
:
[
{
required
:
true
,
message
:
"
详细地址不能为空
"
}
]
}
}
]
message
:
"
详细地址不能为空
"
,
},
],
},
},
{
label
:
"
经营状态
"
,
key
:
"
businessStatus
"
,
type
:
"
radio
"
,
options
:
[{
name
:
"
自营
"
},
{
name
:
"
租赁
"
}],
_config
:
{
required
:
true
,
placeholder
:
"
请选择经营状态
"
,
rules
:
[
{
required
:
true
,
message
:
"
请选择经营状态
"
,
},
],
},
},
{
label
:
"
是否为物业
"
,
key
:
"
propertyManagement
"
,
type
:
"
checkbox
"
,
defaultValue
:
false
,
options
:
[{
name
:
"
物业
"
}],
_config
:
{
placeholder
:
"
请选择经营状态
"
,
},
},
],
},
building
:
{
title
:
"
新建楼宇
"
,
...
...
@@ -246,21 +312,19 @@ export default {
_config
:
{
rules
:
[{
required
:
true
,
message
:
"
楼宇名称不能为空
"
}],
placeholder
:
"
请输入楼宇名称
"
,
required
:
true
}
required
:
true
,
}
,
},
{
label
:
"
资产类型
"
,
key
:
"
type
"
,
type
:
"
select
"
,
options
:
[
{
name
:
"
地产
"
},{
name
:
"
土地
"
},{
name
:
"
其他
"
},
],
options
:
[{
name
:
"
地产
"
},
{
name
:
"
土地
"
},
{
name
:
"
其他
"
}],
_config
:
{
rules
:
[{
required
:
true
,
message
:
"
资产类型不能为空
"
}],
placeholder
:
"
请选择资产类型
"
,
required
:
true
}
required
:
true
,
}
,
},
{
label
:
"
地上楼层几层
"
,
...
...
@@ -270,8 +334,8 @@ export default {
type
:
"
number
"
,
rules
:
[{
required
:
true
,
message
:
"
地上楼层几层不能为空
"
}],
placeholder
:
"
请输入地上楼层几层
"
,
required
:
true
}
required
:
true
,
}
,
},
{
label
:
"
地下楼层几层
"
,
...
...
@@ -281,21 +345,19 @@ export default {
type
:
"
number
"
,
rules
:
[{
required
:
true
,
message
:
"
地下楼层几层不能为空
"
}],
placeholder
:
"
请输入地下楼层几层
"
,
required
:
true
}
required
:
true
,
}
,
},
{
label
:
"
用途
"
,
key
:
"
useto
"
,
type
:
"
select
"
,
options
:
[
{
name
:
"
地产
"
},{
name
:
"
土地
"
},{
name
:
"
其他
"
},
],
options
:
[{
name
:
"
地产
"
},
{
name
:
"
土地
"
},
{
name
:
"
其他
"
}],
_config
:
{
rules
:
[{
required
:
true
,
message
:
"
用途不能为空
"
}],
placeholder
:
"
请选择用途
"
,
required
:
true
}
required
:
true
,
}
,
},
{
label
:
"
所在城市
"
,
...
...
@@ -304,8 +366,8 @@ export default {
_config
:
{
rules
:
[{
required
:
true
,
message
:
"
所在城市不能为空
"
}],
placeholder
:
"
请输入所在城市
"
,
required
:
true
}
required
:
true
,
}
,
},
{
label
:
"
详细地址
"
,
...
...
@@ -314,36 +376,53 @@ export default {
_config
:
{
rules
:
[{
required
:
true
,
message
:
"
详细地址不能为空
"
}],
placeholder
:
"
请输入详细地址
"
,
required
:
true
}
}
]
}
}
required
:
true
,
}
,
}
,
]
,
}
,
}
,
};
},
watch
:
{
type
:
{
handler
(
newVal
,
oldVal
)
{
console
.
log
(
111
);
this
.
initData
[
newVal
].
columns
.
forEach
((
val
)
=>
{
if
(
val
.
hasOwnProperty
(
"
defaultValue
"
))
{
// this.form[val.key] = val.defaultValue;
this
.
$set
(
this
.
form
,
val
.
key
,
val
.
defaultValue
);
}
});
},
immediate
:
true
,
},
},
methods
:
{
/* 作为载体处理方法 */
fieldClick
(
item
){
if
(
item
.
method
){
item
.
method
()}
fieldClick
(
item
)
{
if
(
item
.
method
)
{
item
.
method
();
}
},
deptClose
(){
this
.
dept
.
visible
=
false
;
deptClose
()
{
this
.
dept
.
visible
=
false
;
},
deptConfirm
(){
const
selectDeptRef
=
this
.
$refs
.
selectDeptRef
;
this
.
form
.
deptId
=
selectDeptRef
.
result
;
this
.
form
.
deptName
=
selectDeptRef
.
resultName
;
this
.
dept
.
close
()
deptConfirm
()
{
const
selectDeptRef
=
this
.
$refs
.
selectDeptRef
;
this
.
form
.
deptId
=
selectDeptRef
.
result
;
this
.
form
.
deptName
=
selectDeptRef
.
resultName
;
this
.
dept
.
close
();
},
choiceConfirm
(
val
)
{
this
.
form
[
this
.
choice
.
key
]
=
val
.
name
;
this
.
choice
.
cancel
();
},
projectDeptEvent
(){
this
.
dept
.
visible
=
true
projectDeptEvent
()
{
this
.
dept
.
visible
=
true
;
},
choiceCancal
()
{
console
.
log
(
this
.
form
);
this
.
choice
.
visible
=
false
;
this
.
choice
.
key
=
""
;
this
.
choice
.
columns
=
[];
...
...
@@ -354,40 +433,40 @@ export default {
this
.
choice
.
columns
=
item
.
options
;
},
/* 点击返回、点击取消 */
pageDestory
(){
this
.
choiceCancal
()
this
.
$emit
(
'
close
'
)
pageDestory
()
{
this
.
choiceCancal
();
this
.
$emit
(
"
close
"
);
},
onSubmit
()
{
this
.
loadingStatus
=
true
;
if
(
this
.
type
===
'
building
'
)
{
if
(
!
this
.
projectId
)
{
this
.
$toast
(
"
保存失败,未获取到项目Id
"
);
return
;
if
(
this
.
type
===
"
building
"
)
{
if
(
!
this
.
projectId
)
{
this
.
$toast
(
"
保存失败,未获取到项目Id
"
);
return
;
}
this
.
form
.
projectId
=
this
.
projectId
;
}
postFun
(
this
.
initData
[
this
.
type
].
fetchUrl
,
this
.
form
)
postFun
(
this
.
initData
[
this
.
type
].
fetchUrl
,
this
.
form
)
.
then
((
res
)
=>
{
if
(
this
.
type
===
'
project
'
)
{
this
.
form
.
projectId
=
res
.
data
if
(
this
.
type
===
"
project
"
)
{
this
.
form
.
projectId
=
res
.
data
;
}
setTimeout
(()
=>
{
this
.
loadingStatus
=
false
;
this
.
$toast
(
"
保存成功
"
);
this
.
$emit
(
"
confirm
"
,
this
.
form
)
},
2000
);
}).
catch
(()
=>
{
this
.
loadingStatus
=
false
;
this
.
$toast
(
"
保存失败
"
);
setTimeout
(()
=>
{
this
.
loadingStatus
=
false
;
this
.
$toast
(
"
保存成功
"
);
this
.
$emit
(
"
confirm
"
,
this
.
form
);
},
2000
);
})
}
}
.
catch
(()
=>
{
this
.
loadingStatus
=
false
;
this
.
$toast
(
"
保存失败
"
);
});
},
},
};
</
script
>
<
style
lang=
"less"
scoped
>
.project-component {
position: fixed;
width: 100vw;
...
...
@@ -396,16 +475,16 @@ export default {
left: 0;
z-index: 100;
background: #fff;
.van-form{
.van-form
{
height: calc(100vh - 1.6rem);
overflow: auto;
}
.action-btns {
margin-top: 1rem;
padding: 0 0.5rem;
.cancel-btn {
margin-top: 0.3rem;
}
}
.action-btns {
margin-top: 1rem;
padding: 0 0.5rem;
.cancel-btn {
margin-top: 0.3rem;
}
}
}
</
style
>
src/views/riskProject/add/inherentTemplate/detail.vue
View file @
a31deac3
...
...
@@ -46,16 +46,23 @@
v-show=
"form.pointType == '设备设施类'"
>
<template
#input
>
<span
style=
"margin-right: 10px; color: red"
>
否
</span>
<van-switch
disabled
<van-radio-group
v-model=
"form.specialEquipment"
size=
"20"
name=
"specialEquipment"
/>
<span
style=
"margin-left: 10px; color: green"
>
是
</span>
direction=
"horizontal"
>
<van-radio
:name=
"true"
>
是
</van-radio>
<van-radio
:name=
"false"
>
否
</van-radio>
</van-radio-group>
</
template
>
</van-field>
<van-field
v-if=
"form.specialEquipment == true"
clickable
name=
"pointType"
v-model=
"form.equipmentNumber"
label=
"特种设备的证书号码"
placeholder=
"请选择"
/>
<!-- 多选 -->
<van-field
v-model=
"form.safetyWarningSigns"
...
...
src/views/riskProject/taskLedger/tabDetail.vue
View file @
a31deac3
...
...
@@ -7,12 +7,17 @@
validate-trigger=
"onSubmit"
>
<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%);
"
style=
"position: relative;
top: 32%; transform: translateY(-50%)
"
/>
风险信息
</div>
...
...
@@ -52,7 +57,7 @@
:rules=
"[
{ required: true, message: '所属楼层不能为空' }]"
/>
<div
style=
"display: flex
;
"
>
<div
style=
"display: flex"
>
<van-field
readonly
required
...
...
@@ -87,16 +92,27 @@
/>
<van-field
required
name=
"specialEquipment"
label=
"是否为特种设备"
v-show=
"form.pointType == '设备设施类'"
>
<template
#input
>
<span
style=
"margin-right: 10px;color: red;"
>
否
</span>
<van-switch
disabled
v-model=
"form.specialEquipment"
size=
"20"
/>
<span
style=
"margin-left: 10px;color: green;"
>
是
</span>
<van-radio-group
v-model=
"form.specialEquipment"
direction=
"horizontal"
>
<van-radio
:name=
"true"
>
是
</van-radio>
<van-radio
:name=
"false"
>
否
</van-radio>
</van-radio-group>
</
template
>
</van-field>
<van-field
v-if=
"form.specialEquipment == true"
clickable
name=
"pointType"
v-model=
"form.equipmentNumber"
label=
"特种设备的证书号码"
placeholder=
"请选择"
/>
<!-- 多选 -->
<van-field
v-model=
"form.safetyWarningSigns"
...
...
@@ -148,12 +164,17 @@
/>
<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%);
"
style=
"position: relative;
top: 32%; transform: translateY(-50%)
"
/>
风险图片
</div>
...
...
@@ -171,14 +192,14 @@
<!-- 11111111111 -->
<div
style=
"
width: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
"
width: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
"
>
<img
src=
"@/assets/upload/pic.png"
...
...
@@ -192,12 +213,17 @@
</template>
</van-field>
<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%);
"
style=
"position: relative;
top: 32%; transform: translateY(-50%)
"
/>
应采取的管控措施
</div>
...
...
@@ -212,7 +238,7 @@
rows=
"3"
autosize
placeholder=
"请输入"
style=
"padding-left: 0;
padding-top: 0;
"
style=
"padding-left: 0;
padding-top: 0
"
/>
</
template
>
</van-field>
...
...
@@ -230,14 +256,14 @@
<template
slot=
"default"
>
<div
style=
"
width: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
"
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"
...
...
@@ -262,7 +288,7 @@
rows=
"3"
autosize
placeholder=
"请输入"
style=
"padding-left: 0;
padding-top: 0;
"
style=
"padding-left: 0;
padding-top: 0
"
/>
</
template
>
</van-field>
...
...
@@ -280,14 +306,14 @@
<template
slot=
"default"
>
<div
style=
"
width: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
"
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"
...
...
@@ -311,7 +337,7 @@
rows=
"3"
autosize
placeholder=
"请输入"
style=
"padding-left: 0;
padding-top: 0;
"
style=
"padding-left: 0;
padding-top: 0
"
/>
</
template
>
</van-field>
...
...
@@ -330,13 +356,13 @@
<!-- 11111111111 -->
<div
style=
"
width: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
width: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
"
>
<img
...
...
@@ -384,20 +410,25 @@
/>
<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%);
"
style=
"position: relative;
top: 32%; transform: translateY(-50%)
"
/>
重大危险源管理
</div>
<van-field
name=
"majorHazardSource"
label=
"是否为重大危险源"
>
<
template
#input
>
<span
style=
"margin-right: 10px;
color: red;
"
>
否
</span>
<span
style=
"margin-right: 10px;
color: red
"
>
否
</span>
<van-switch
disabled
v-model=
"form.majorHazardSource"
size=
"20"
/>
<span
style=
"margin-left: 10px;
color: green;
"
>
是
</span>
<span
style=
"margin-left: 10px;
color: green
"
>
是
</span>
</
template
>
</van-field>
<van-field
...
...
@@ -422,7 +453,7 @@
rows=
"3"
autosize
placeholder=
"请输入"
style=
"padding-left: 0;
padding-top: 0;
"
style=
"padding-left: 0;
padding-top: 0
"
/>
</
template
>
</van-field>
...
...
@@ -450,7 +481,7 @@ export default {
activated
()
{
this
.
showSetRank
=
false
;
// 再次关闭弹出层 以防万一
this
.
getList
();
this
.
$bus
.
$on
(
"
riskLevelBus
"
,
res
=>
{
this
.
$bus
.
$on
(
"
riskLevelBus
"
,
(
res
)
=>
{
this
.
showSetRank
=
false
;
// 再次关闭弹出层 以防万一
console
.
log
(
Boolean
(
res
));
if
(
res
)
{
...
...
@@ -488,7 +519,7 @@ export default {
isTimely
:
1
,
active
:
0
,
form
:
{
specialEquipment
:
false
specialEquipment
:
false
,
},
projectId
:
""
,
// 所属工程
projectName
:
""
,
// 所属工程
...
...
@@ -547,7 +578,7 @@ export default {
severityScore
:
0
,
messageList
:
[],
inherentId
:
0
,
buildingIds
:
""
buildingIds
:
""
,
};
},
created
()
{
...
...
@@ -581,40 +612,40 @@ export default {
message
:
"
加载中...
"
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
duration
:
0
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
=>
{
this
.
uploaderImg
=
(
res
.
data
.
pictureFile
||
[]).
map
(
(
item
)
=>
{
return
{
...
item
,
url
:
item
.
filePath
url
:
item
.
filePath
,
};
});
this
.
measuresProjectFile
=
(
res
.
data
.
measuresProjectFile
||
[]).
map
(
item
=>
{
(
item
)
=>
{
return
{
...
item
,
url
:
item
.
filePath
url
:
item
.
filePath
,
};
}
);
this
.
measuresAdministrationFile
=
(
res
.
data
.
measuresAdministrationFile
||
[]
).
map
(
item
=>
{
).
map
(
(
item
)
=>
{
return
{
...
item
,
url
:
item
.
filePath
url
:
item
.
filePath
,
};
});
this
.
measuresEmergencyFile
=
(
res
.
data
.
measuresEmergencyFile
||
[]
).
map
(
item
=>
{
).
map
(
(
item
)
=>
{
return
{
...
item
,
url
:
item
.
filePath
url
:
item
.
filePath
,
};
});
})
...
...
@@ -637,7 +668,7 @@ export default {
if
(
!
this
.
form
.
measuresDeptId
)
{
this
.
$toast
({
title
:
"
提示
"
,
message
:
"
请选择管控责任单位!
"
message
:
"
请选择管控责任单位!
"
,
});
return
false
;
}
...
...
@@ -645,9 +676,9 @@ export default {
message
:
"
加载中...
"
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
duration
:
0
duration
:
0
,
});
getFun
(
`/risk/plan/user/list/
${
this
.
form
.
measuresDeptId
}
`
).
then
(
res
=>
{
getFun
(
`/risk/plan/user/list/
${
this
.
form
.
measuresDeptId
}
`
).
then
(
(
res
)
=>
{
if
(
res
.
code
==
200
)
{
this
.
columnsTrouble
=
res
.
data
;
// 对数据进行赋值
...
...
@@ -670,7 +701,7 @@ export default {
getFun
(
`/risk/plan/dict/data/list?dictType=risk_plan_
${
dataName
.
toLowerCase
()}
`
)
.
then
(
res
=>
{
.
then
(
(
res
)
=>
{
if
(
isSinge
)
{
this
.
columnsData
=
res
.
data
;
this
.
showSelect
=
true
;
...
...
@@ -692,7 +723,7 @@ export default {
this
.
showCheckSelect
=
false
;
},
renameKeyInTree
(
data
,
oldKey
,
newKey
)
{
let
arr
=
data
.
map
(
item
=>
{
let
arr
=
data
.
map
(
(
item
)
=>
{
const
newItem
=
{
...
item
};
if
(
item
.
hasOwnProperty
(
oldKey
))
{
...
...
@@ -714,7 +745,7 @@ export default {
},
getFloor
()
{
getFun
(
`/risk/plan/floor/list/
${
this
.
form
.
buildingId
}
`
)
.
then
(
res
=>
{
.
then
(
(
res
)
=>
{
// this.$toast.clear();
// this.showSource = true;
...
...
@@ -734,11 +765,11 @@ export default {
message
:
"
加载中...
"
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
duration
:
0
duration
:
0
,
});
this
.
userPrefix
=
name
;
getFun
(
`/risk/plan/room/list/
${
this
.
form
.
floorId
}
`
)
.
then
(
res
=>
{
.
then
(
(
res
)
=>
{
this
.
$toast
.
clear
();
this
.
showSource
=
true
;
this
.
columnsSource
=
res
.
data
;
...
...
@@ -757,14 +788,14 @@ export default {
//风险模型配置
getGradeList
(
type
)
{
// possibility 可能性 severity 严重性
getFun
(
`/risk/plan/matrix/
${
type
}
/list`
).
then
(
res
=>
{
getFun
(
`/risk/plan/matrix/
${
type
}
/list`
).
then
(
(
res
)
=>
{
let
arr
=
[];
res
.
data
.
forEach
(
item
=>
{
res
.
data
.
forEach
(
(
item
)
=>
{
arr
.
push
({
text
:
item
.
title
,
type
:
item
.
type
,
sort
:
item
.
sort
,
score
:
item
.
score
score
:
item
.
score
,
});
});
if
(
type
===
"
possibility
"
)
{
...
...
@@ -798,9 +829,9 @@ export default {
name
:
"
resultPage
"
,
params
:
{
score
:
this
.
severityScore
*
this
.
possibleScore
,
possibleValue
:
this
.
possibleValue
,
severityValue
:
this
.
severityValue
,
}
possibleValue
:
this
.
possibleValue
,
severityValue
:
this
.
severityValue
,
}
,
});
},
performTasks
()
{
...
...
@@ -825,7 +856,7 @@ export default {
jsonToFormData
(
config
)
{
const
formData
=
new
FormData
();
//循环传入的值转换formData
Object
.
keys
(
config
).
forEach
(
key
=>
{
Object
.
keys
(
config
).
forEach
(
(
key
)
=>
{
formData
.
append
(
key
,
config
[
key
]);
});
return
formData
;
...
...
@@ -834,28 +865,28 @@ export default {
// console.log('%c [ values ]-592', 'font-size:13px; background:pink; color:#bf2c9f;', values)
var
formDataJson
=
this
.
jsonToFormData
(
this
.
form
);
let
url
=
"
/risk/plan/inherent
"
;
values
.
hdPicture1
.
forEach
(
item
=>
{
values
.
hdPicture1
.
forEach
(
(
item
)
=>
{
if
(
item
.
file
)
{
formDataJson
.
append
(
"
pictureFile[]
"
,
item
.
file
);
}
else
{
formDataJson
.
append
(
"
pictureFile[]
"
,
item
.
fileId
);
}
});
values
[
"
measuresProjectFile[]
"
].
forEach
(
item
=>
{
values
[
"
measuresProjectFile[]
"
].
forEach
(
(
item
)
=>
{
if
(
item
.
file
)
{
formDataJson
.
append
(
"
measuresProjectFile[]
"
,
item
.
file
);
}
else
{
formDataJson
.
append
(
"
measuresProjectFile[]
"
,
item
.
fileId
);
}
});
values
[
"
measuresEmergencyFile[]
"
].
forEach
(
item
=>
{
values
[
"
measuresEmergencyFile[]
"
].
forEach
(
(
item
)
=>
{
if
(
item
.
file
)
{
formDataJson
.
append
(
"
measuresEmergencyFile[]
"
,
item
.
file
);
}
else
{
formDataJson
.
append
(
"
measuresEmergencyFile[]
"
,
item
.
fileId
);
}
});
values
[
"
measuresAdministrationFile[]
"
].
forEach
(
item
=>
{
values
[
"
measuresAdministrationFile[]
"
].
forEach
(
(
item
)
=>
{
if
(
item
.
file
)
{
formDataJson
.
append
(
"
measuresAdministrationFile[]
"
,
item
.
file
);
}
else
{
...
...
@@ -863,11 +894,11 @@ export default {
}
});
postFun
(
url
,
formDataJson
)
.
then
(
res
=>
{
.
then
(
(
res
)
=>
{
this
.
$toast
.
clear
();
this
.
$toast
.
success
({
message
:
"
提交成功
"
,
duration
:
2000
duration
:
2000
,
});
history
.
go
(
-
1
);
})
...
...
@@ -900,7 +931,7 @@ export default {
this
.
trouble
=
""
;
// 请求风险源
postHdSource
(
`/riskMain/showSourceName?factorType=
${
this
.
factor
}
`
).
then
(
res
=>
{
(
res
)
=>
{
this
.
columnsSource
=
res
.
data
;
}
);
...
...
@@ -923,7 +954,7 @@ export default {
if
(
this
.
setRank
==
"
矩阵式定级
"
)
{
this
.
showSetRank
=
false
;
this
.
$router
.
push
({
name
:
"
matrix-grad
"
name
:
"
matrix-grad
"
,
});
}
},
...
...
@@ -955,7 +986,7 @@ export default {
// 请求主责人员
let
formdata
=
new
FormData
();
formdata
.
append
(
"
organizationId
"
,
this
.
mainDutyDeptId
);
postHdPeople
(
`/riskMain/getUserList`
,
formdata
).
then
(
res
=>
{
postHdPeople
(
`/riskMain/getUserList`
,
formdata
).
then
(
(
res
)
=>
{
this
.
columnsMainDutyPeopLe
=
res
.
data
;
});
},
...
...
@@ -971,8 +1002,8 @@ export default {
name
:
"
riskView
"
,
params
:
{
floorId
:
this
.
form
.
floorId
,
isView
:
false
}
isView
:
false
,
}
,
});
},
...
...
@@ -992,9 +1023,9 @@ export default {
this
.
projectDirector
=
e
[
0
].
loginName
;
this
.
projectDirectorName
=
e
[
0
].
userName
;
this
.
show
=
false
;
}
}
,
},
watch
:
{}
watch
:
{}
,
};
</
script
>
<
style
lang=
"less"
scoped
>
...
...
vue.config.js
View file @
a31deac3
...
...
@@ -9,10 +9,10 @@ module.exports = {
proxy
:
{
//配置跨域
"
/app-api
"
:
{
//
target: "http://192.168.4.232:8080/", //这里是后台的地址
target
:
"
http://192.168.4.232:8080/
"
,
//这里是后台的地址
// target: "http://192.168.10.137:8080/", //这里是后台的地址
// target: 'http://192.168.15.124:8080/', //这里是杨帆的地址
target
:
"
http://192.168.10.137:8080/
"
,
//这里是昊哥
的地址
// target: "http://192.168.10.137:8080/", //这里是周昊
的地址
// target: "http://192.168.15.230:8080/", //这里是晓静的地址
// target: 'http://localhost:8081/', //这里是后台的地址
ws
:
true
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment