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
20dce006
Commit
20dce006
authored
Feb 15, 2022
by
zhangjianqian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
应急处置 修改上传 以及部分样式
parent
7febb60a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
117 additions
and
72 deletions
+117
-72
index.vue
gassafetyprogress-web/src/views/system/eventInfo/index.vue
+61
-44
index.vue
gassafetyprogress-web/src/views/system/planInfo/index.vue
+56
-28
No files found.
gassafetyprogress-web/src/views/system/eventInfo/index.vue
View file @
20dce006
...
@@ -155,7 +155,7 @@
...
@@ -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"
>
<
el
-
form
ref
=
"form"
:
model
=
"form"
:
rules
=
"rules"
label
-
width
=
"100px"
>
<
div
class
=
"division"
>
<
div
class
=
"division"
>
<
div
style
=
"width: 45%"
>
<
div
style
=
"width: 45%"
>
...
@@ -185,21 +185,7 @@
...
@@ -185,21 +185,7 @@
<
el
-
form
-
item
label
=
"事件地点"
prop
=
"eventLocation"
>
<
el
-
form
-
item
label
=
"事件地点"
prop
=
"eventLocation"
>
<
el
-
input
v
-
model
=
"form.eventLocation"
placeholder
=
"请输入事件地点"
:
disabled
=
"readonly"
/>
<
el
-
input
v
-
model
=
"form.eventLocation"
placeholder
=
"请输入事件地点"
:
disabled
=
"readonly"
/>
<
/el-form-item
>
<
/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
>
<
div
style
=
"width: 50%"
>
<
div
style
=
"width: 50%"
>
<
el
-
form
-
item
label
=
"所属企业"
prop
=
"beyondEnterpriseId"
>
<
el
-
form
-
item
label
=
"所属企业"
prop
=
"beyondEnterpriseId"
>
...
@@ -236,8 +222,27 @@
...
@@ -236,8 +222,27 @@
<
el
-
form
-
item
label
=
"事件评估信息"
prop
=
"eventAssessment"
style
=
"width: 60%"
>
<
el
-
form
-
item
label
=
"事件评估信息"
prop
=
"eventAssessment"
style
=
"width: 60%"
>
<
el
-
input
v
-
model
=
"form.eventAssessment"
type
=
"textarea"
placeholder
=
"请输入事件评估信息"
:
disabled
=
"readonly"
/>
<
el
-
input
v
-
model
=
"form.eventAssessment"
type
=
"textarea"
placeholder
=
"请输入事件评估信息"
:
disabled
=
"readonly"
/>
<
/el-form-item
>
<
/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
-
form
-
item
label
=
"所属企业名称"
prop
=
"beyondEnterpriseName"
>-->
<!--
<
el
-
input
v
-
model
=
"form.beyondEnterpriseName"
placeholder
=
"请输入所属企业名称"
/>-->
<!--
<
el
-
input
v
-
model
=
"form.beyondEnterpriseName"
placeholder
=
"请输入所属企业名称"
/>-->
<!--
<
/el-form-item>--
>
<!--
<
/el-form-item>--
>
...
@@ -255,10 +260,12 @@
...
@@ -255,10 +260,12 @@
<
script
>
<
script
>
import
{
listEventInfo
,
getEventInfo
,
delEventInfo
,
addEventInfo
,
updateEventInfo
,
exportEventInfo
,
enterpriseList
}
from
"@/api/system/eventInfo"
;
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
{
export
default
{
name
:
"EventInfo"
,
name
:
"EventInfo"
,
components
:
{
components
:
{
FileUpload
}
,
}
,
data
()
{
data
()
{
return
{
return
{
...
@@ -284,10 +291,10 @@ export default {
...
@@ -284,10 +291,10 @@ export default {
enterpriseList
:[],
enterpriseList
:[],
// 弹出层标题
// 弹出层标题
title
:
""
,
title
:
""
,
display
:
""
,
display1
:
"display:none"
,
// 是否显示弹出层
// 是否显示弹出层
open
:
false
,
open
:
false
,
dialogImageUrl
:
''
,
dialogVisible
:
false
,
fileList
:[],
fileList
:[],
// 事件类型:1.泄漏 2.火灾 3.爆炸字典
// 事件类型:1.泄漏 2.火灾 3.爆炸字典
eventTypeOptions
:
[],
eventTypeOptions
:
[],
...
@@ -356,20 +363,20 @@ export default {
...
@@ -356,20 +363,20 @@ export default {
}
);
}
);
}
,
}
,
//上传
//上传
handleRemove
(
file
,
fileList
)
{
getFileInfo
(
res
){
//console.log(file, fileList);
//this.form.dealPlan = res.fileName;
document
.
getElementsByClassName
(
"el-upload"
)[
0
].
style
.
display
=
""
this
.
form
.
iconUrl
=
res
.
url
;
this
.
fileList
.
push
({
name
:
res
.
fileName
,
url
:
uploadfile
,
}
);
}
,
}
,
uploadsuccess
(
response
){
listRemove
(
e
)
{
this
.
form
.
iconUrl
=
response
.
url
;
this
.
form
.
dealPlan
=
""
;
console
.
log
(
document
.
getElementsByClassName
(
"el-upload"
)[
0
])
this
.
fileList
=
[];
this
.
$nextTick
(()
=>
{
document
.
getElementsByClassName
(
"el-upload"
)[
0
].
style
.
display
=
"none"
}
)
}
,
}
,
handlePictureCardPreview
(
file
)
{
checkFile
(
url
)
{
this
.
dialogImageUrl
=
file
.
url
;
window
.
open
(
url
,
'_blank'
);
this
.
dialogVisible
=
true
;
}
,
}
,
qiyechang
(
value
){
qiyechang
(
value
){
let
obj
=
{
}
;
let
obj
=
{
}
;
...
@@ -440,9 +447,8 @@ export default {
...
@@ -440,9 +447,8 @@ export default {
this
.
reset
();
this
.
reset
();
this
.
open
=
true
;
this
.
open
=
true
;
this
.
title
=
"添加事件处置"
;
this
.
title
=
"添加事件处置"
;
this
.
$nextTick
(()
=>
{
this
.
display
=
""
;
document
.
getElementsByClassName
(
"el-upload"
)[
0
].
style
.
display
=
""
this
.
display1
=
"display:none"
;
}
)
}
,
}
,
handleDtail
(
row
){
handleDtail
(
row
){
this
.
fileList
=
[];
this
.
fileList
=
[];
...
@@ -454,9 +460,10 @@ export default {
...
@@ -454,9 +460,10 @@ export default {
this
.
form
=
response
.
data
;
this
.
form
=
response
.
data
;
this
.
title
=
"修改事件处置"
;
this
.
title
=
"修改事件处置"
;
if
(
row
.
iconUrl
!=
null
){
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 {
...
@@ -470,11 +477,10 @@ export default {
this
.
open
=
true
;
this
.
open
=
true
;
this
.
title
=
"修改事件处置"
;
this
.
title
=
"修改事件处置"
;
if
(
row
.
iconUrl
!=
null
){
if
(
row
.
iconUrl
!=
null
){
this
.
fileList
=
[{
name
:
'file'
,
url
:
row
.
iconUrl
}
];
this
.
fileList
=
[{
name
:
'附件'
,
url
:
uploadfile
}
];
this
.
$nextTick
(()
=>
{
document
.
getElementsByClassName
(
"el-upload"
)[
0
].
style
.
display
=
"none"
}
)
}
}
this
.
display
=
""
;
this
.
display1
=
"display:none"
;
}
);
}
);
}
,
}
,
/** 提交按钮 */
/** 提交按钮 */
...
@@ -535,6 +541,17 @@ export default {
...
@@ -535,6 +541,17 @@ export default {
flex
-
direction
:
row
;
flex
-
direction
:
row
;
justify
-
content
:
flex
-
start
;
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
>
<
style
lang
=
"scss"
scoped
>
<
style
lang
=
"scss"
scoped
>
::
v
-
deep
.
el
-
select
{
::
v
-
deep
.
el
-
select
{
...
...
gassafetyprogress-web/src/views/system/planInfo/index.vue
View file @
20dce006
...
@@ -147,6 +147,7 @@
...
@@ -147,6 +147,7 @@
<
el
-
form
ref
=
"form"
:
model
=
"form"
:
rules
=
"rules"
label
-
width
=
"100px"
>
<
el
-
form
ref
=
"form"
:
model
=
"form"
:
rules
=
"rules"
label
-
width
=
"100px"
>
<
div
class
=
"division"
>
<
div
class
=
"division"
>
<
div
style
=
"width: 40%;"
>
<
div
style
=
"width: 40%;"
>
<
div
class
=
"titletitle"
>
预案基本信息
<
/div
>
<
el
-
form
-
item
label
=
"预案标题"
prop
=
"planTitle"
>
<
el
-
form
-
item
label
=
"预案标题"
prop
=
"planTitle"
>
<
el
-
input
v
-
model
=
"form.planTitle"
placeholder
=
"请输入预案标题"
:
disabled
=
"readonly"
/>
<
el
-
input
v
-
model
=
"form.planTitle"
placeholder
=
"请输入预案标题"
:
disabled
=
"readonly"
/>
<
/el-form-item
>
<
/el-form-item
>
...
@@ -187,31 +188,37 @@
...
@@ -187,31 +188,37 @@
<
el
-
input
v
-
model
=
"form.remarks"
placeholder
=
"请输入备注"
:
disabled
=
"readonly"
/>
<
el
-
input
v
-
model
=
"form.remarks"
placeholder
=
"请输入备注"
:
disabled
=
"readonly"
/>
<
/el-form-item
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"预案附件"
id
=
"fujian"
prop
=
"iconUrl"
>
<
el
-
form
-
item
label
=
"预案附件"
id
=
"fujian"
prop
=
"iconUrl"
>
<
el
-
upload
<
FileUpload
:
action
=
"uploadImgUrl"
listType
=
"picture"
list
-
type
=
"picture-card"
@
resFun
=
"getFileInfo"
:
on
-
success
=
"uploadsuccess"
@
remove
=
"listRemove"
:
on
-
remove
=
"handleRemove"
:
fileArr
=
"fileList"
:
file
-
list
=
"fileList"
>
/>
<
i
class
=
"el-icon-plus"
><
/i
>
<
el
-
input
v
-
show
=
"false"
disabled
v
-
model
=
"form.iconUrl"
><
/el-input
>
<!--
<
div
slot
=
"tip"
class
=
"el-upload__tip"
>
只能上传
jpg
/
png
文件,且不超过
500
kb
<
/div>--
>
<
/el-upload
>
<!--
<
el
-
dialog
:
visible
.
sync
=
"dialogVisible"
>-->
<!--
<
el
-
dialog
:
visible
.
sync
=
"dialogVisible"
>-->
<!--
<
img
width
=
"100%"
:
src
=
"dialogImageUrl"
alt
=
""
>-->
<!--
<
img
width
=
"100%"
:
src
=
"dialogImageUrl"
alt
=
""
>-->
<!--
<
/el-dialog>--
>
<!--
<
/el-dialog>--
>
<
/el-form-item
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"预案附件"
id
=
"fujianxia"
prop
=
"iconUrl"
style
=
"display: none"
>
<
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
-
input
v
-
model
=
"fileurl"
placeholder
=
""
/>-->
<
/el-form-item
>
<
/el-form-item
>
<
/div
>
<
/div
>
<
div
style
=
"width: 60%;"
>
<
div
style
=
"width: 58%;margin-left: 2%"
>
<
el
-
form
-
item
label
=
"应急方案"
prop
=
"planContents"
>
<
div
class
=
"titletitle"
>
方案内容
<
/div
>
<!--
<
el
-
form
-
item
label
=
"应急方案"
prop
=
"planContents"
>-->
<!--
<
el
-
input
v
-
model
=
"form.planContents"
placeholder
=
""
/>-->
<!--
<
el
-
input
v
-
model
=
"form.planContents"
placeholder
=
""
/>-->
<
editor
v
-
model
=
"form.planContents"
style
=
"height: 300px;"
:
readOnly
=
"readonly"
/>
<
editor
v
-
model
=
"form.planContents"
style
=
"height: 300px;"
:
readOnly
=
"readonly"
/>
<!--
<
textarea
id
=
"editorA"
v
-
model
=
"form.planContents"
height
=
"100%"
><
/textarea>--
>
<!--
<
textarea
id
=
"editorA"
v
-
model
=
"form.planContents"
height
=
"100%"
><
/textarea>--
>
<
/el-form-item
>
<
!--
<
/el-form-item>--
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
@@ -235,14 +242,15 @@
...
@@ -235,14 +242,15 @@
<
script
>
<
script
>
import
{
listPlanInfo
,
getPlanInfo
,
delPlanInfo
,
addPlanInfo
,
updatePlanInfo
,
exportPlanInfo
,
enterpriseList
}
from
"@/api/system/planInfo"
;
import
{
listPlanInfo
,
getPlanInfo
,
delPlanInfo
,
addPlanInfo
,
updatePlanInfo
,
exportPlanInfo
,
enterpriseList
}
from
"@/api/system/planInfo"
;
import
Editor
from
'@/components/Editor'
;
import
Editor
from
'@/components/Editor'
;
import
FileUpload
from
'@/components/FileUpload'
;
let
uploadfile
=
require
(
"@/assets/uploadfile.png"
);
export
default
{
export
default
{
name
:
"PlanInfo"
,
name
:
"PlanInfo"
,
components
:
{
components
:
{
Editor
Editor
,
FileUpload
}
,
}
,
data
()
{
data
()
{
return
{
return
{
uploadImgUrl
:
process
.
env
.
VUE_APP_BASE_API
+
"/common/upload"
,
// 上传的图片服务器地址
// 遮罩层
// 遮罩层
loading
:
true
,
loading
:
true
,
readonly
:
true
,
readonly
:
true
,
...
@@ -334,19 +342,21 @@ export default {
...
@@ -334,19 +342,21 @@ export default {
this
.
form
.
beyondEnterpriseName
=
obj
.
enterpriseName
;
this
.
form
.
beyondEnterpriseName
=
obj
.
enterpriseName
;
this
.
form
.
beyondEnterpriseId
=
value
;
this
.
form
.
beyondEnterpriseId
=
value
;
}
,
}
,
//上传图片
//上传
uploadsuccess
(
response
){
getFileInfo
(
res
){
this
.
form
.
iconUrl
=
response
.
url
;
//this.form.dealPlan = res.fileName;
console
.
log
(
this
.
fileList
)
this
.
form
.
iconUrl
=
res
.
url
;
//console.log(document.getElementsByClassName("el-upload--picture-card"))
this
.
fileList
.
push
({
document
.
getElementsByClassName
(
"el-upload--picture-card"
)[
0
].
style
.
display
=
"none"
;
name
:
res
.
fileName
,
url
:
uploadfile
,
}
);
}
,
}
,
handleRemove
(
file
,
fileList
)
{
listRemove
(
e
)
{
document
.
getElementsByClassName
(
"el-upload--picture-card"
)[
0
].
style
.
display
=
""
;
this
.
form
.
dealPlan
=
""
;
this
.
fileList
=
[];
}
,
}
,
handlePictureCardPreview
(
file
)
{
checkFile
(
url
)
{
this
.
dialogImageUrl
=
file
.
url
;
window
.
open
(
url
,
'_blank'
);
this
.
dialogVisible
=
true
;
}
,
}
,
// 取消按钮
// 取消按钮
cancel
()
{
cancel
()
{
...
@@ -434,7 +444,7 @@ export default {
...
@@ -434,7 +444,7 @@ export default {
this
.
form
=
response
.
data
;
this
.
form
=
response
.
data
;
this
.
title
=
"应急预案详情"
;
this
.
title
=
"应急预案详情"
;
this
.
fileList
=
[{
name
:
'file'
,
url
:
row
.
iconUrl
}
];
this
.
fileList
=
[{
name
:
'file'
,
url
:
uploadfile
}
];
this
.
fileurl
=
row
.
iconUrl
;
this
.
fileurl
=
row
.
iconUrl
;
document
.
getElementById
(
"yesbutton"
).
style
.
display
=
"none"
;
document
.
getElementById
(
"yesbutton"
).
style
.
display
=
"none"
;
document
.
getElementById
(
"fujian"
).
style
.
display
=
"none"
document
.
getElementById
(
"fujian"
).
style
.
display
=
"none"
...
@@ -452,7 +462,7 @@ export default {
...
@@ -452,7 +462,7 @@ export default {
this
.
open
=
true
;
this
.
open
=
true
;
this
.
title
=
"修改应急预案"
;
this
.
title
=
"修改应急预案"
;
if
(
row
.
iconUrl
!=
null
||
row
.
iconUrl
==
""
){
if
(
row
.
iconUrl
!=
null
||
row
.
iconUrl
==
""
){
this
.
fileList
=
[{
name
:
'file'
,
url
:
row
.
iconUrl
}
];
this
.
fileList
=
[{
name
:
'file'
,
url
:
uploadfile
}
];
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
document
.
getElementsByClassName
(
"el-upload--picture-card"
)[
0
].
style
.
display
=
"none"
document
.
getElementsByClassName
(
"el-upload--picture-card"
)[
0
].
style
.
display
=
"none"
document
.
getElementById
(
"yesbutton"
).
style
.
display
=
""
;
document
.
getElementById
(
"yesbutton"
).
style
.
display
=
""
;
...
@@ -530,6 +540,24 @@ export default {
...
@@ -530,6 +540,24 @@ export default {
flex
-
direction
:
row
;
flex
-
direction
:
row
;
justify
-
content
:
flex
-
start
;
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
>
<
style
lang
=
"scss"
scoped
>
<
style
lang
=
"scss"
scoped
>
::
v
-
deep
.
el
-
select
{
::
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