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
594e9fa2
Commit
594e9fa2
authored
Mar 07, 2024
by
kaitly205422@163.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
固有风险导入功能问题修复
parent
f4c94a6f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
48 deletions
+58
-48
src/views/riskProject/add/addInherent.vue
src/views/riskProject/add/addInherent.vue
+58
-48
No files found.
src/views/riskProject/add/addInherent.vue
View file @
594e9fa2
...
@@ -75,6 +75,7 @@
...
@@ -75,6 +75,7 @@
风险图片
风险图片
</div>
</div>
<van-field
name=
"hdPicture1"
label=
"风险图片"
>
<van-field
name=
"hdPicture1"
label=
"风险图片"
>
<
template
#input
>
<
template
#input
>
<van-uploader
@
delete=
"deleteFile(...arguments, 'pictureFile')"
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
<van-uploader
@
delete=
"deleteFile(...arguments, 'pictureFile')"
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"uploaderImg"
>
v-model=
"uploaderImg"
>
...
@@ -106,12 +107,14 @@
...
@@ -106,12 +107,14 @@
应采取的管控措施
应采取的管控措施
</div>
</div>
<van-field
label=
"技术措施"
>
<van-field
label=
"技术措施"
>
<
template
#input
>
<
template
#input
>
<van-field
v-model=
"form.measuresProject"
name=
"measuresProject"
label=
""
type=
"textarea"
rows=
"3"
autosize
<van-field
v-model=
"form.measuresProject"
name=
"measuresProject"
label=
""
type=
"textarea"
rows=
"3"
autosize
placeholder=
"请输入"
style=
"padding-left: 0; padding-top: 0"
/>
placeholder=
"请输入"
style=
"padding-left: 0; padding-top: 0"
/>
</
template
>
</
template
>
</van-field>
</van-field>
<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
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresProjectFile"
accept=
"file"
@
delete=
"deleteFile(...arguments, 'measuresProjectFile')"
>
@
delete=
"deleteFile(...arguments, 'measuresProjectFile')"
>
...
@@ -133,12 +136,14 @@
...
@@ -133,12 +136,14 @@
</template>
</template>
</van-field>
</van-field>
<van-field
label=
"管理措施"
>
<van-field
label=
"管理措施"
>
<
template
#input
>
<
template
#input
>
<van-field
v-model=
"form.measuresAdministration"
name=
"measuresAdministration"
label=
""
type=
"textarea"
rows=
"3"
<van-field
v-model=
"form.measuresAdministration"
name=
"measuresAdministration"
label=
""
type=
"textarea"
autosize
placeholder=
"请输入"
style=
"padding-left: 0; padding-top: 0"
/>
rows=
"3"
autosize
placeholder=
"请输入"
style=
"padding-left: 0; padding-top: 0"
/>
</
template
>
</
template
>
</van-field>
</van-field>
<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
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresAdministrationFile"
accept=
"file"
@
delete=
"deleteFile(...arguments, 'measuresAdministrationFile')"
>
@
delete=
"deleteFile(...arguments, 'measuresAdministrationFile')"
>
...
@@ -160,12 +165,14 @@
...
@@ -160,12 +165,14 @@
</template>
</template>
</van-field>
</van-field>
<van-field
label=
"应急措施"
>
<van-field
label=
"应急措施"
>
<
template
#input
>
<
template
#input
>
<van-field
v-model=
"form.measuresEmergency"
name=
"measuresEmergency"
label=
""
type=
"textarea"
rows=
"3"
autosize
<van-field
v-model=
"form.measuresEmergency"
name=
"measuresEmergency"
label=
""
type=
"textarea"
rows=
"3"
placeholder=
"请输入"
style=
"padding-left: 0; padding-top: 0"
/>
autosize
placeholder=
"请输入"
style=
"padding-left: 0; padding-top: 0"
/>
</
template
>
</
template
>
</van-field>
</van-field>
<van-field
name=
"measuresEmergencyFile[]"
label=
"应急措施附件"
>
<van-field
name=
"measuresEmergencyFile[]"
label=
"应急措施附件"
>
<
template
#input
>
<
template
#input
>
<van-uploader
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresEmergencyFile"
accept=
"file"
<van-uploader
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"measuresEmergencyFile"
accept=
"file"
@
delete=
"deleteFile(...arguments, 'measuresEmergencyFile')"
>
@
delete=
"deleteFile(...arguments, 'measuresEmergencyFile')"
>
...
@@ -211,6 +218,7 @@
...
@@ -211,6 +218,7 @@
</div>
</div>
<van-field
name=
"majorHazardSource"
label=
"是否为重大危险源"
>
<van-field
name=
"majorHazardSource"
label=
"是否为重大危险源"
>
<
template
#input
>
<
template
#input
>
<span
style=
"margin-right: 10px; color: red"
>
否
</span>
<span
style=
"margin-right: 10px; color: red"
>
否
</span>
<van-switch
v-model=
"form.majorHazardSource"
size=
"20"
/>
<van-switch
v-model=
"form.majorHazardSource"
size=
"20"
/>
...
@@ -220,31 +228,32 @@
...
@@ -220,31 +228,32 @@
<van-field
:disabled=
"!form.majorHazardSource"
v-model=
"form.hazardSourceName"
:required=
"form.majorHazardSource"
<van-field
:disabled=
"!form.majorHazardSource"
v-model=
"form.hazardSourceName"
:required=
"form.majorHazardSource"
name=
"hazardSourceName"
label=
"危险源名称 "
type=
"textarea"
rows=
"1"
autosize
placeholder=
"请输入"
name=
"hazardSourceName"
label=
"危险源名称 "
type=
"textarea"
rows=
"1"
autosize
placeholder=
"请输入"
:key=
"form.majorHazardSource + '456'"
:rules=
"form.majorHazardSource
:key=
"form.majorHazardSource + '456'"
:rules=
"form.majorHazardSource
? [{ required: true, message: '危险源名称不能为空' }]
? [{ required: true, message: '危险源名称不能为空' }]
: []
: []
"
/>
"
/>
<van-field
label=
"重大危险源描述"
:disabled=
"!form.majorHazardSource"
:required=
"form.majorHazardSource"
>
<van-field
label=
"重大危险源描述"
:disabled=
"!form.majorHazardSource"
:required=
"form.majorHazardSource"
>
<
template
#input
>
<
template
#input
>
<van-field
:disabled=
"!form.majorHazardSource"
v-model=
"form.majorHazardSourceDescription"
<van-field
:disabled=
"!form.majorHazardSource"
v-model=
"form.majorHazardSourceDescription"
name=
"majorHazardSourceDescription"
label=
""
type=
"textarea"
rows=
"3"
autosize
placeholder=
"请输入"
name=
"majorHazardSourceDescription"
label=
""
type=
"textarea"
rows=
"3"
autosize
placeholder=
"请输入"
:key=
"form.majorHazardSource + '123'"
:rules=
"form.majorHazardSource
:key=
"form.majorHazardSource + '123'"
:rules=
"form.majorHazardSource
? [
{ required: true, message: '重大危险源描述不能为空' }]
? [
{ required: true, message: '重大危险源描述不能为空' }]
: []
: []
" style="padding-left: 0; padding-top: 0" />
" style="padding-left: 0; padding-top: 0" />
</
template
>
</
template
>
</van-field>
</van-field>
<van-field
:disabled=
"!form.majorHazardSource"
:required=
"form.majorHazardSource"
readonly
clickable
<van-field
:disabled=
"!form.majorHazardSource"
:required=
"form.majorHazardSource"
readonly
clickable
name=
"referenceBasis"
:value=
"form.referenceBasis == 'null' ? '' : form.referenceBasis"
label=
"判断依据"
name=
"referenceBasis"
:value=
"form.referenceBasis == 'null' ? '' : form.referenceBasis"
label=
"判断依据"
placeholder=
"请选择"
:key=
"form.majorHazardSource + '7'"
:rules=
"form.majorHazardSource
placeholder=
"请选择"
:key=
"form.majorHazardSource + '7'"
:rules=
"form.majorHazardSource
? [{ required: true, message: '判断依据不能为空' }]
? [{ required: true, message: '判断依据不能为空' }]
: []
: []
"
@
click=
"() => {
"
@
click=
"() => {
if (form.majorHazardSource) {
if (form.majorHazardSource) {
selectData('referenceBasis', false);
selectData('referenceBasis', false);
}
}
}
}
"
/>
"
/>
<van-dialog
v-model=
"showGradeDialog"
title=
"风险评测配置"
:show-cancel-button=
"false"
:show-confirm-button=
"false"
>
<van-dialog
v-model=
"showGradeDialog"
title=
"风险评测配置"
:show-cancel-button=
"false"
:show-confirm-button=
"false"
>
<div
class=
"dialogContain"
>
<div
class=
"dialogContain"
>
<van-collapse
v-model=
"activeNames"
>
<van-collapse
v-model=
"activeNames"
>
...
@@ -253,12 +262,14 @@
...
@@ -253,12 +262,14 @@
</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
v-model=
"showPopoveSetRank"
trigger=
"click"
:actions=
"columnsSetRank"
@
select=
"onSelectSetRank"
>
@
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
>
...
@@ -299,10 +310,10 @@
...
@@ -299,10 +310,10 @@
<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"
v-on:click=
"
<button
type=
"button"
class=
"van-picker__cancel"
v-on:click=
"
{
{
form.measuresDeptId = 0;
form.measuresDeptId = 0;
projectDept = false;
projectDept = false;
}
}
"
>
"
>
取消
</button><button
type=
"button"
class=
"van-picker__confirm"
@
click=
"closeDept"
>
取消
</button><button
type=
"button"
class=
"van-picker__confirm"
@
click=
"closeDept"
>
确认
确认
</button>
</button>
...
@@ -354,6 +365,12 @@ export default {
...
@@ -354,6 +365,12 @@ export default {
},
},
activated
()
{
activated
()
{
/* swp add 不确定会不会影响其他地方(右上角导入功能)*/
this
.
initForm
()
if
(
this
.
$store
.
state
.
inherentTemplate
)
{
this
.
form
=
{
...
this
.
form
,
...
this
.
$store
.
state
.
inherentTemplate
};
}
/* swp end */
this
.
showSetRank
=
false
;
// 再次关闭弹出层 以防万一
this
.
showSetRank
=
false
;
// 再次关闭弹出层 以防万一
this
.
showGradeDialog
=
false
;
this
.
showGradeDialog
=
false
;
this
.
$set
(
this
.
form
,
'
level
'
,
sessionStorage
.
getItem
(
"
level
"
));
this
.
$set
(
this
.
form
,
'
level
'
,
sessionStorage
.
getItem
(
"
level
"
));
...
@@ -363,19 +380,11 @@ export default {
...
@@ -363,19 +380,11 @@ export default {
this
.
taskId
=
this
.
$route
.
params
.
taskId
;
this
.
taskId
=
this
.
$route
.
params
.
taskId
;
this
.
postReturnEcho
();
this
.
postReturnEcho
();
}
}
// this.getList();
// this.$bus.$on("riskLevelBus", (res) => {
},
// this.showSetRank = false; // 再次关闭弹出层 以防万一
deactivated
()
{
// console.log(Boolean(res));
this
.
$store
.
commit
(
"
SET_INHERENT_TEMPLATE
"
,
{});
// if (res) {
this
.
form
=
{}
// this.riskRank = res;
// } else {
// this.setRank = "";
// }
// // 销毁一下监听事件 不然会越加越多
// this.$bus.$off("riskLevelBus");
// });
},
},
beforeRouteEnter
(
to
,
from
,
next
)
{
beforeRouteEnter
(
to
,
from
,
next
)
{
if
(
from
.
name
==
"
riskInherent
"
)
{
if
(
from
.
name
==
"
riskInherent
"
)
{
...
@@ -384,9 +393,6 @@ export default {
...
@@ -384,9 +393,6 @@ export default {
}
}
next
();
next
();
},
},
destroyed
()
{
this
.
$store
.
commit
(
"
SET_INHERENT_TEMPLATE
"
,
{});
},
beforeRouteLeave
(
to
,
from
,
next
)
{
beforeRouteLeave
(
to
,
from
,
next
)
{
if
(
to
.
name
==
"
resultPage
"
)
{
if
(
to
.
name
==
"
resultPage
"
)
{
sessionStorage
.
setItem
(
"
inherenForm
"
,
JSON
.
stringify
(
this
.
form
));
sessionStorage
.
setItem
(
"
inherenForm
"
,
JSON
.
stringify
(
this
.
form
));
...
@@ -487,18 +493,7 @@ export default {
...
@@ -487,18 +493,7 @@ export default {
};
};
},
},
created
()
{
created
()
{
var
userInfo
=
getUserInfo
();
this
.
initForm
()
this
.
form
.
buildingIds
=
this
.
$route
.
params
.
buildingId
||
sessionStorage
.
getItem
(
"
buildingId
"
);
this
.
form
.
planId
=
this
.
$route
.
params
.
planId
||
sessionStorage
.
getItem
(
"
planId
"
);
this
.
form
.
buildingName
=
sessionStorage
.
getItem
(
"
buildingName
"
)
||
this
.
$route
.
params
.
buildingName
;
this
.
form
.
projectId
=
sessionStorage
.
getItem
(
"
projectId
"
);
this
.
form
.
projectName
=
sessionStorage
.
getItem
(
"
projectName
"
);
this
.
form
.
userId
=
userInfo
.
userId
;
this
.
form
.
userName
=
userInfo
.
userName
;
this
.
form
.
deptName
=
userInfo
.
dept
.
deptName
;
},
},
mounted
()
{
mounted
()
{
if
(
sessionStorage
.
getItem
(
"
inherenForm
"
)
!=
""
)
{
if
(
sessionStorage
.
getItem
(
"
inherenForm
"
)
!=
""
)
{
...
@@ -516,6 +511,20 @@ export default {
...
@@ -516,6 +511,20 @@ export default {
},
},
methods
:
{
methods
:
{
initForm
()
{
var
userInfo
=
getUserInfo
();
this
.
form
.
buildingIds
=
this
.
$route
.
params
.
buildingId
||
sessionStorage
.
getItem
(
"
buildingId
"
);
this
.
form
.
planId
=
this
.
$route
.
params
.
planId
||
sessionStorage
.
getItem
(
"
planId
"
);
this
.
form
.
buildingName
=
sessionStorage
.
getItem
(
"
buildingName
"
)
||
this
.
$route
.
params
.
buildingName
;
this
.
form
.
projectId
=
sessionStorage
.
getItem
(
"
projectId
"
);
this
.
form
.
projectName
=
sessionStorage
.
getItem
(
"
projectName
"
);
this
.
form
.
userId
=
userInfo
.
userId
;
this
.
form
.
userName
=
userInfo
.
userName
;
this
.
form
.
deptName
=
userInfo
.
dept
.
deptName
;
},
toImport
()
{
toImport
()
{
this
.
$router
.
push
({
name
:
"
inherent-template
"
});
this
.
$router
.
push
({
name
:
"
inherent-template
"
});
},
},
...
@@ -1071,6 +1080,7 @@ export default {
...
@@ -1071,6 +1080,7 @@ export default {
},
},
};
};
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
/* @import url(); 引入css类 */
/* @import url(); 引入css类 */
.con-list {
.con-list {
...
...
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