Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gassafety-progress
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
耿迪迪
gassafety-progress
Commits
04e58e9c
Commit
04e58e9c
authored
Feb 15, 2022
by
王晓倩
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
2be046af
0e4218dd
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
132 additions
and
75 deletions
+132
-75
index.vue
gassafetyprogress-web/src/views/system/eventInfo/index.vue
+62
-45
index.vue
gassafetyprogress-web/src/views/system/planInfo/index.vue
+70
-30
No files found.
gassafetyprogress-web/src/views/system/eventInfo/index.vue
View file @
04e58e9c
...
...
@@ -106,6 +106,7 @@
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<!--
<el-table-column
label=
"事件id"
align=
"center"
prop=
"eventId"
/>
-->
<el-table-column
label=
"事件名称"
align=
"center"
prop=
"eventTitle"
/>
<el-table-column
label=
"所属企业"
align=
"center"
prop=
"beyondEnterpriseName"
/>
<el-table-column
label=
"事件类型"
align=
"center"
prop=
"eventType"
:formatter=
"eventTypeFormat"
/>
<el-table-column
label=
"事件等级"
align=
"center"
prop=
"eventLevel"
:formatter=
"eventLevelFormat"
/>
<el-table-column
label=
"事件地点"
align=
"center"
prop=
"eventLocation"
/>
...
...
@@ -117,7 +118,6 @@
<
el
-
table
-
column
label
=
"报案人"
align
=
"center"
prop
=
"reportPerson"
/>
<
el
-
table
-
column
label
=
"事件处置信息"
align
=
"center"
prop
=
"eventDeal"
/>
<
el
-
table
-
column
label
=
"事件评估信息"
align
=
"center"
prop
=
"eventAssessment"
/>
<
el
-
table
-
column
label
=
"所属企业"
align
=
"center"
prop
=
"beyondEnterpriseName"
/>
<
el
-
table
-
column
label
=
"备注"
align
=
"center"
prop
=
"remarks"
/>
<
el
-
table
-
column
label
=
"操作"
align
=
"center"
class
-
name
=
"small-padding fixed-width"
>
<
template
slot
-
scope
=
"scope"
>
...
...
@@ -155,7 +155,7 @@
/>
<!--
添加或修改事件处置对话框
-->
<
el
-
dialog
:
title
=
"title"
:
visible
.
sync
=
"open"
width
=
"
10
00px"
append
-
to
-
body
>
<
el
-
dialog
:
title
=
"title"
:
visible
.
sync
=
"open"
width
=
"
8
00px"
append
-
to
-
body
>
<
el
-
form
ref
=
"form"
:
model
=
"form"
:
rules
=
"rules"
label
-
width
=
"100px"
>
<
div
class
=
"division"
>
<
div
style
=
"width: 45%"
>
...
...
@@ -185,21 +185,7 @@
<
el
-
form
-
item
label
=
"事件地点"
prop
=
"eventLocation"
>
<
el
-
input
v
-
model
=
"form.eventLocation"
placeholder
=
"请输入事件地点"
:
disabled
=
"readonly"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"图片上传"
prop
=
"iconUrl"
>
<
el
-
upload
:
action
=
"uploadImgUrl"
list
-
type
=
"picture-card"
:
on
-
preview
=
"handlePictureCardPreview"
:
on
-
success
=
"uploadsuccess"
:
on
-
remove
=
"handleRemove"
:
file
-
list
=
"fileList"
>
<
i
class
=
"el-icon-plus"
><
/i
>
<
/el-upload
>
<
el
-
dialog
:
visible
.
sync
=
"dialogVisible"
>
<
img
width
=
"100%"
:
src
=
"dialogImageUrl"
alt
=
""
>
<
/el-dialog
>
<!--
<
el
-
input
v
-
model
=
"form.iconUrl"
type
=
"textarea"
placeholder
=
"请输入内容"
/>-->
<
/el-form-item
>
<
/div
>
<
div
style
=
"width: 50%"
>
<
el
-
form
-
item
label
=
"所属企业"
prop
=
"beyondEnterpriseId"
>
...
...
@@ -236,8 +222,27 @@
<
el
-
form
-
item
label
=
"事件评估信息"
prop
=
"eventAssessment"
style
=
"width: 60%"
>
<
el
-
input
v
-
model
=
"form.eventAssessment"
type
=
"textarea"
placeholder
=
"请输入事件评估信息"
:
disabled
=
"readonly"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"事件附件"
prop
=
"iconUrl"
:
style
=
"display"
>
<
FileUpload
listType
=
"picture"
@
resFun
=
"getFileInfo"
@
remove
=
"listRemove"
:
fileArr
=
"fileList"
style
=
"width: 70%"
/>
<
el
-
input
v
-
show
=
"false"
disabled
v
-
model
=
"form.iconUrl"
><
/el-input
>
<!--
<
el
-
input
v
-
model
=
"form.iconUrl"
type
=
"textarea"
placeholder
=
"请输入内容"
/>-->
<
/el-form-item
>
<
el
-
form
-
item
label
=
"事件附件"
prop
=
"iconUrl"
:
style
=
"display1"
>
<
span
class
=
"dbtn"
@
click
=
"checkFile(form.iconUrl)"
v
-
if
=
"form.iconUrl != ''"
>
<
i
class
=
"el-icon el-icon-view"
><
/i>查看/
下载
<
/span
>
<
span
v
-
else
>-<
/span
>
<
/el-form-item
>
<!--
<
el
-
form
-
item
label
=
"所属企业名称"
prop
=
"beyondEnterpriseName"
>-->
<!--
<
el
-
input
v
-
model
=
"form.beyondEnterpriseName"
placeholder
=
"请输入所属企业名称"
/>-->
<!--
<
/el-form-item>--
>
...
...
@@ -255,10 +260,12 @@
<
script
>
import
{
listEventInfo
,
getEventInfo
,
delEventInfo
,
addEventInfo
,
updateEventInfo
,
exportEventInfo
,
enterpriseList
}
from
"@/api/system/eventInfo"
;
import
FileUpload
from
'@/components/FileUpload'
;
let
uploadfile
=
require
(
"@/assets/uploadfile.png"
);
export
default
{
name
:
"EventInfo"
,
components
:
{
FileUpload
}
,
data
()
{
return
{
...
...
@@ -284,10 +291,10 @@ export default {
enterpriseList
:[],
// 弹出层标题
title
:
""
,
display
:
""
,
display1
:
"display:none"
,
// 是否显示弹出层
open
:
false
,
dialogImageUrl
:
''
,
dialogVisible
:
false
,
fileList
:[],
// 事件类型:1.泄漏 2.火灾 3.爆炸字典
eventTypeOptions
:
[],
...
...
@@ -356,20 +363,20 @@ export default {
}
);
}
,
//上传
handleRemove
(
file
,
fileList
)
{
//console.log(file, fileList);
document
.
getElementsByClassName
(
"el-upload"
)[
0
].
style
.
display
=
""
getFileInfo
(
res
){
//this.form.dealPlan = res.fileName;
this
.
form
.
iconUrl
=
res
.
url
;
this
.
fileList
.
push
({
name
:
res
.
fileName
,
url
:
uploadfile
,
}
);
}
,
uploadsuccess
(
response
){
this
.
form
.
iconUrl
=
response
.
url
;
console
.
log
(
document
.
getElementsByClassName
(
"el-upload"
)[
0
])
this
.
$nextTick
(()
=>
{
document
.
getElementsByClassName
(
"el-upload"
)[
0
].
style
.
display
=
"none"
}
)
listRemove
(
e
)
{
this
.
form
.
dealPlan
=
""
;
this
.
fileList
=
[];
}
,
handlePictureCardPreview
(
file
)
{
this
.
dialogImageUrl
=
file
.
url
;
this
.
dialogVisible
=
true
;
checkFile
(
url
)
{
window
.
open
(
url
,
'_blank'
);
}
,
qiyechang
(
value
){
let
obj
=
{
}
;
...
...
@@ -440,9 +447,8 @@ export default {
this
.
reset
();
this
.
open
=
true
;
this
.
title
=
"添加事件处置"
;
this
.
$nextTick
(()
=>
{
document
.
getElementsByClassName
(
"el-upload"
)[
0
].
style
.
display
=
""
}
)
this
.
display
=
""
;
this
.
display1
=
"display:none"
;
}
,
handleDtail
(
row
){
this
.
fileList
=
[];
...
...
@@ -454,9 +460,10 @@ export default {
this
.
form
=
response
.
data
;
this
.
title
=
"修改事件处置"
;
if
(
row
.
iconUrl
!=
null
){
this
.
fileList
=
[{
name
:
'
file'
,
url
:
row
.
iconUrl
}
];
this
.
fileList
=
[{
name
:
'
附件'
,
url
:
uploadfile
}
];
}
document
.
getElementsByClassName
(
"el-upload"
)[
0
].
style
.
display
=
"none"
this
.
display
=
"display:none"
;
this
.
display1
=
""
;
}
);
}
,
/** 修改按钮操作 */
...
...
@@ -470,11 +477,10 @@ export default {
this
.
open
=
true
;
this
.
title
=
"修改事件处置"
;
if
(
row
.
iconUrl
!=
null
){
this
.
fileList
=
[{
name
:
'file'
,
url
:
row
.
iconUrl
}
];
this
.
$nextTick
(()
=>
{
document
.
getElementsByClassName
(
"el-upload"
)[
0
].
style
.
display
=
"none"
}
)
this
.
fileList
=
[{
name
:
'附件'
,
url
:
uploadfile
}
];
}
this
.
display
=
""
;
this
.
display1
=
"display:none"
;
}
);
}
,
/** 提交按钮 */
...
...
@@ -535,6 +541,17 @@ export default {
flex
-
direction
:
row
;
justify
-
content
:
flex
-
start
;
}
.
dbtn
{
display
:
inline
-
block
;
line
-
height
:
normal
;
padding
-
left
:
2
px
;
padding
-
right
:
2
px
;
cursor
:
pointer
;
border
-
radius
:
3
px
;
border
-
style
:
solid
;
border
-
width
:
0
;
color
:
rgb
(
48
,
180
,
107
);
}
<
/style
>
<
style
lang
=
"scss"
scoped
>
::
v
-
deep
.
el
-
select
{
...
...
gassafetyprogress-web/src/views/system/planInfo/index.vue
View file @
04e58e9c
...
...
@@ -97,11 +97,23 @@
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<!--
<el-table-column
label=
"预案id"
align=
"center"
prop=
"planId"
/>
-->
<el-table-column
label=
"预案标题"
align=
"center"
prop=
"planTitle"
/>
<el-table-column
label=
"所属企业名称"
align=
"center"
prop=
"beyondEnterpriseName"
/>
<el-table-column
label=
"预案类型"
align=
"center"
prop=
"planType"
:formatter=
"planTypeFormat"
/>
<el-table-column
label=
"预案等级"
align=
"center"
prop=
"planLevel"
:formatter=
"planLevelFormat"
/>
<el-table-column
label=
"所属企业名称"
align=
"center"
prop=
"beyondEnterpriseName"
/>
<el-table-column
label=
"应急方案"
align=
"center"
prop=
"planContents"
/>
<!--
<el-table-column
label=
"应急方案"
align=
"center"
prop=
"planContents"
/>
-->
<el-table-column
label=
"应急设备及车辆"
align=
"center"
prop=
"planEquipment"
/>
<el-table-column
label=
"方案附件"
align=
"center"
prop=
"dealPlanUrl"
width=
"150px"
>
<template
slot-scope=
"scope"
>
<span
class=
"dbtn"
@
click=
"checkFile(scope.row.iconUrl)"
v-if=
"scope.row.iconUrl != ''"
>
<i
class=
"el-icon el-icon-view"
></i>
查看/下载
</span>
<span
v-else
>
-
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
createTime
,
'{y
}
-{m
}
-{d
}
{h
}
:{i
}
:{s
}
'
)
}}
<
/span
>
...
...
@@ -147,6 +159,7 @@
<
el
-
form
ref
=
"form"
:
model
=
"form"
:
rules
=
"rules"
label
-
width
=
"100px"
>
<
div
class
=
"division"
>
<
div
style
=
"width: 40%;"
>
<
div
class
=
"titletitle"
>
预案基本信息
<
/div
>
<
el
-
form
-
item
label
=
"预案标题"
prop
=
"planTitle"
>
<
el
-
input
v
-
model
=
"form.planTitle"
placeholder
=
"请输入预案标题"
:
disabled
=
"readonly"
/>
<
/el-form-item
>
...
...
@@ -187,31 +200,37 @@
<
el
-
input
v
-
model
=
"form.remarks"
placeholder
=
"请输入备注"
:
disabled
=
"readonly"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"预案附件"
id
=
"fujian"
prop
=
"iconUrl"
>
<
el
-
upload
:
action
=
"uploadImgUrl"
list
-
type
=
"picture-card"
:
on
-
success
=
"uploadsuccess"
:
on
-
remove
=
"handleRemove"
:
file
-
list
=
"fileList"
>
<
i
class
=
"el-icon-plus"
><
/i
>
<!--
<
div
slot
=
"tip"
class
=
"el-upload__tip"
>
只能上传
jpg
/
png
文件,且不超过
500
kb
<
/div>--
>
<
/el-upload
>
<
FileUpload
listType
=
"picture"
@
resFun
=
"getFileInfo"
@
remove
=
"listRemove"
:
fileArr
=
"fileList"
/>
<
el
-
input
v
-
show
=
"false"
disabled
v
-
model
=
"form.iconUrl"
><
/el-input
>
<!--
<
el
-
dialog
:
visible
.
sync
=
"dialogVisible"
>-->
<!--
<
img
width
=
"100%"
:
src
=
"dialogImageUrl"
alt
=
""
>-->
<!--
<
/el-dialog>--
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"预案附件"
id
=
"fujianxia"
prop
=
"iconUrl"
style
=
"display: none"
>
<
a
@
click
=
"downloadFile"
style
=
"color: blue"
>
下载附件
>><
/a
>
<
span
class
=
"dbtn"
@
click
=
"checkFile(form.iconUrl)"
v
-
if
=
"form.iconUrl != ''"
>
<
i
class
=
"el-icon el-icon-view"
><
/i>查看/
下载
<
/span
>
<
span
v
-
else
>-<
/span
>
<!--
<
el
-
input
v
-
model
=
"fileurl"
placeholder
=
""
/>-->
<
/el-form-item
>
<
/div
>
<
div
style
=
"width: 60%;"
>
<
el
-
form
-
item
label
=
"应急方案"
prop
=
"planContents"
>
<
div
style
=
"width: 58%;margin-left: 2%"
>
<
div
class
=
"titletitle"
>
方案内容
<
/div
>
<!--
<
el
-
form
-
item
label
=
"应急方案"
prop
=
"planContents"
>-->
<!--
<
el
-
input
v
-
model
=
"form.planContents"
placeholder
=
""
/>-->
<
editor
v
-
model
=
"form.planContents"
style
=
"height: 300px;"
:
readOnly
=
"readonly"
/>
<!--
<
textarea
id
=
"editorA"
v
-
model
=
"form.planContents"
height
=
"100%"
><
/textarea>--
>
<
/el-form-item
>
<
!--
<
/el-form-item>--
>
<
/div
>
<
/div
>
...
...
@@ -235,14 +254,15 @@
<
script
>
import
{
listPlanInfo
,
getPlanInfo
,
delPlanInfo
,
addPlanInfo
,
updatePlanInfo
,
exportPlanInfo
,
enterpriseList
}
from
"@/api/system/planInfo"
;
import
Editor
from
'@/components/Editor'
;
import
FileUpload
from
'@/components/FileUpload'
;
let
uploadfile
=
require
(
"@/assets/uploadfile.png"
);
export
default
{
name
:
"PlanInfo"
,
components
:
{
Editor
Editor
,
FileUpload
}
,
data
()
{
return
{
uploadImgUrl
:
process
.
env
.
VUE_APP_BASE_API
+
"/common/upload"
,
// 上传的图片服务器地址
// 遮罩层
loading
:
true
,
readonly
:
true
,
...
...
@@ -334,19 +354,21 @@ export default {
this
.
form
.
beyondEnterpriseName
=
obj
.
enterpriseName
;
this
.
form
.
beyondEnterpriseId
=
value
;
}
,
//上传图片
uploadsuccess
(
response
){
this
.
form
.
iconUrl
=
response
.
url
;
console
.
log
(
this
.
fileList
)
//console.log(document.getElementsByClassName("el-upload--picture-card"))
document
.
getElementsByClassName
(
"el-upload--picture-card"
)[
0
].
style
.
display
=
"none"
;
//上传
getFileInfo
(
res
){
//this.form.dealPlan = res.fileName;
this
.
form
.
iconUrl
=
res
.
url
;
this
.
fileList
.
push
({
name
:
res
.
fileName
,
url
:
uploadfile
,
}
);
}
,
handleRemove
(
file
,
fileList
)
{
document
.
getElementsByClassName
(
"el-upload--picture-card"
)[
0
].
style
.
display
=
""
;
listRemove
(
e
)
{
this
.
form
.
dealPlan
=
""
;
this
.
fileList
=
[];
}
,
handlePictureCardPreview
(
file
)
{
this
.
dialogImageUrl
=
file
.
url
;
this
.
dialogVisible
=
true
;
checkFile
(
url
)
{
window
.
open
(
url
,
'_blank'
);
}
,
// 取消按钮
cancel
()
{
...
...
@@ -434,7 +456,7 @@ export default {
this
.
form
=
response
.
data
;
this
.
title
=
"应急预案详情"
;
this
.
fileList
=
[{
name
:
'file'
,
url
:
row
.
iconUrl
}
];
this
.
fileList
=
[{
name
:
'file'
,
url
:
uploadfile
}
];
this
.
fileurl
=
row
.
iconUrl
;
document
.
getElementById
(
"yesbutton"
).
style
.
display
=
"none"
;
document
.
getElementById
(
"fujian"
).
style
.
display
=
"none"
...
...
@@ -452,7 +474,7 @@ export default {
this
.
open
=
true
;
this
.
title
=
"修改应急预案"
;
if
(
row
.
iconUrl
!=
null
||
row
.
iconUrl
==
""
){
this
.
fileList
=
[{
name
:
'file'
,
url
:
row
.
iconUrl
}
];
this
.
fileList
=
[{
name
:
'file'
,
url
:
uploadfile
}
];
this
.
$nextTick
(()
=>
{
document
.
getElementsByClassName
(
"el-upload--picture-card"
)[
0
].
style
.
display
=
"none"
document
.
getElementById
(
"yesbutton"
).
style
.
display
=
""
;
...
...
@@ -530,6 +552,24 @@ export default {
flex
-
direction
:
row
;
justify
-
content
:
flex
-
start
;
}
.
dbtn
{
display
:
inline
-
block
;
line
-
height
:
normal
;
padding
-
left
:
2
px
;
padding
-
right
:
2
px
;
cursor
:
pointer
;
border
-
radius
:
3
px
;
border
-
style
:
solid
;
border
-
width
:
0
;
color
:
rgb
(
48
,
180
,
107
);
}
.
titletitle
{
background
:
#
1
c84c6
;
color
:
white
;
height
:
20
px
;
line
-
height
:
20
px
;
text
-
align
:
center
;
margin
-
bottom
:
10
px
;
}
<
/style
>
<
style
lang
=
"scss"
scoped
>
::
v
-
deep
.
el
-
select
{
...
...
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