Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gassafety
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
Commits
e0bc00a6
Commit
e0bc00a6
authored
3 years ago
by
纪泽龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化上传图片预览
parent
7227c3b9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
609 additions
and
457 deletions
+609
-457
gassafety.scss
gassafety-web/src/assets/styles/gassafety.scss
+3
-1
index.vue
gassafety-web/src/components/MyFileUpload/index.vue
+17
-3
gaodeMapView.js
gassafety-web/src/utils/gaodeMapView.js
+23
-5
RightBototmData.vue
...c/views/enterprise/mapView/components/RightBototmData.vue
+26
-13
index.vue
gassafety-web/src/views/enterprise/mapView/index.vue
+0
-1
detail.vue
gassafety-web/src/views/workOrder/basicsInfo/detail.vue
+540
-434
No files found.
gassafety-web/src/assets/styles/gassafety.scss
View file @
e0bc00a6
...
@@ -291,4 +291,6 @@
...
@@ -291,4 +291,6 @@
}
}
}
}
// background-color: ;
// background-color: ;
}
\ No newline at end of file
}
// 图片预览
This diff is collapsed.
Click to expand it.
gassafety-web/src/components/MyFileUpload/index.vue
View file @
e0bc00a6
...
@@ -32,15 +32,24 @@
...
@@ -32,15 +32,24 @@
</
template
>
</
template
>
的文件
的文件
</div>
</div>
</el-upload>
</el-upload>
<el-dialog
<el-image
v-show=
"false"
id=
"img"
ref=
"previewImg"
:src=
"dialogImageUrl"
:preview-src-list=
"bigImageArr"
:z-index=
"9999999"
></el-image>
<!-- <el-dialog
:center="true"
:center="true"
width="50%"
width="50%"
:modal="modal"
:modal="modal"
:visible.sync="dialogVisible"
:visible.sync="dialogVisible"
>
>
<img :src="dialogImageUrl" alt="" />
<img :src="dialogImageUrl" alt="" />
</el-dialog>
</el-dialog> -->
<!-- 文件列表 -->
<!-- 文件列表 -->
<!-- <transition-group class="upload-file-list el-upload-list el-upload-list--text" name="el-fade-in-linear" tag="ul">
<!-- <transition-group class="upload-file-list el-upload-list el-upload-list--text" name="el-fade-in-linear" tag="ul">
<li :key="file.uid" class="el-upload-list__item ele-upload-list__item-content" v-for="(file, index) in list">
<li :key="file.uid" class="el-upload-list__item ele-upload-list__item-content" v-for="(file, index) in list">
...
@@ -123,6 +132,9 @@ export default {
...
@@ -123,6 +132,9 @@ export default {
return
[];
return
[];
}
}
},
},
bigImageArr
()
{
return
[
this
.
dialogImageUrl
]
},
},
},
methods
:
{
methods
:
{
// 上传前校检格式和大小
// 上传前校检格式和大小
...
@@ -197,7 +209,9 @@ export default {
...
@@ -197,7 +209,9 @@ export default {
this
.
dialogImageUrl
=
file
.
response
?
file
.
response
.
url
:
file
.
url
;
this
.
dialogImageUrl
=
file
.
response
?
file
.
response
.
url
:
file
.
url
;
// this.dialogImageUrl =if(this.fileArr) this.fileArr[0].url;
// this.dialogImageUrl =if(this.fileArr) this.fileArr[0].url;
this
.
dialogVisible
=
true
;
// this.dialogVisible = true;
this
.
$refs
.
previewImg
.
showViewer
=
true
;
console
.
log
(
file
);
console
.
log
(
file
);
// console.log(file.response.url)
// console.log(file.response.url)
},
},
...
...
This diff is collapsed.
Click to expand it.
gassafety-web/src/utils/gaodeMapView.js
View file @
e0bc00a6
...
@@ -159,7 +159,10 @@ class gaodeMap {
...
@@ -159,7 +159,10 @@ class gaodeMap {
offset
:
new
AMap
.
Pixel
(
0
,
5
)
offset
:
new
AMap
.
Pixel
(
0
,
5
)
});
});
this
.
setMarkerIcon
(
marker
);
this
.
setMarkerIcon
(
marker
);
if
(
DEVICE_TYPE
.
WORKORDER
!=
markerType
&&
DEVICE_TYPE
.
INSPECTOR
!=
markerType
)
{
if
(
DEVICE_TYPE
.
WORKORDER
!=
markerType
&&
DEVICE_TYPE
.
INSPECTOR
!=
markerType
)
{
marker
.
content
=
this
.
getMarketContent
(
data
);
marker
.
content
=
this
.
getMarketContent
(
data
);
marker
.
on
(
"mouseover"
,
infoOpen
);
marker
.
on
(
"mouseover"
,
infoOpen
);
marker
.
on
(
"mouseout"
,
infoClose
);
marker
.
on
(
"mouseout"
,
infoClose
);
...
@@ -238,16 +241,29 @@ class gaodeMap {
...
@@ -238,16 +241,29 @@ class gaodeMap {
}
}
function
infoOpen
(
e
)
{
function
infoOpen
(
e
)
{
// 如果有cloneDom就删了
// 删除克隆出来的线的clonedom
console
.
log
(
that
.
cloneDom
);
// 删除克隆出来的clonedom
that
.
removeCloneDom
();
let
options
=
map
.
getStatus
();
let
options
=
map
.
getStatus
();
options
.
scrollWheel
=
false
;
options
.
scrollWheel
=
false
;
map
.
setStatus
(
options
);
map
.
setStatus
(
options
);
infoWindow
.
setContent
(
e
.
target
.
content
);
infoWindow
.
setContent
(
e
.
target
.
content
);
infoWindow
.
open
(
map
,
e
.
target
.
getPosition
());
infoWindow
.
open
(
map
,
e
.
target
.
getPosition
());
console
.
log
(
infoWindow
.
dom
);
// 这个是为了盖住vue里的东西
e
.
target
.
cloneDom
=
infoWindow
.
dom
.
cloneNode
(
true
);
// console.log(infoWindow.dom.offsetLeft);
// console.log(infoWindow.dom);
e
.
target
.
cloneDom
.
style
.
top
=
infoWindow
.
dom
.
offsetTop
+
80
+
"px"
;
e
.
target
.
cloneDom
.
style
.
left
=
infoWindow
.
dom
.
offsetLeft
+
100
+
"px"
;
// 先删除之前的,后增加现在的
// this.removeCloneDom();
that
.
removeCloneDom
();
document
.
body
.
appendChild
(
e
.
target
.
cloneDom
);
that
.
markerCloneDom
=
e
.
target
.
cloneDom
;
infoWindow
.
close
();
that
.
markerInfoWindow
=
infoWindow
;
that
.
markerInfoWindow
=
infoWindow
;
}
}
}
}
...
@@ -539,7 +555,9 @@ class gaodeMap {
...
@@ -539,7 +555,9 @@ class gaodeMap {
removeCloneDom
()
{
removeCloneDom
()
{
this
.
cloneDom
&&
document
.
body
.
removeChild
(
this
.
cloneDom
);
this
.
cloneDom
&&
document
.
body
.
removeChild
(
this
.
cloneDom
);
this
.
markerCloneDom
&&
document
.
body
.
removeChild
(
this
.
markerCloneDom
);
this
.
cloneDom
=
null
;
this
.
cloneDom
=
null
;
this
.
markerCloneDom
=
null
;
}
}
// 创建一条新的线
// 创建一条新的线
...
...
This diff is collapsed.
Click to expand it.
gassafety-web/src/views/enterprise/mapView/components/RightBototmData.vue
View file @
e0bc00a6
...
@@ -10,14 +10,16 @@
...
@@ -10,14 +10,16 @@
</div>
</div>
<div
class=
"right"
>
<div
class=
"right"
>
<template
v-for=
"item in list"
>
<template
v-for=
"item in list"
>
<div
class=
"right-content"
:key=
"item.type"
>
<div
class=
"right-content"
:key=
"item.type"
>
<div
class=
"text-icon"
>
<div
class=
"text-icon"
>
<i
class=
"iconfont
icon-gdcd
"
></i>
<i
class=
"iconfont
"
:class=
"iconClass(item)
"
></i>
</div>
</div>
<div
class=
"text"
>
<div
class=
"text"
>
<div
class=
"top"
>
{{
typeName
[
item
.
type
]
}}
</div>
<div
class=
"top"
>
{{
typeName
[
item
.
type
]
}}
</div>
<div
class=
"bottom"
>
{{
item
.
number
}}{{
item
.
type
==
99
?
"KM"
:
"个"
}}
</div>
<div
class=
"bottom"
>
{{
item
.
number
}}{{
item
.
type
==
99
?
"KM"
:
"个"
}}
</div>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
...
@@ -32,21 +34,32 @@ export default {
...
@@ -32,21 +34,32 @@ export default {
type
:
Array
,
type
:
Array
,
},
},
},
},
data
(){
data
()
{
return
{
return
{
typeName
:{
typeName
:
{
"1"
:
"调压箱"
,
1
:
"调压箱"
,
"2"
:
"阀门井"
,
2
:
"阀门井"
,
"3"
:
"流量计"
,
3
:
"流量计"
,
"4"
:
"压力表"
,
4
:
"压力表"
,
"99"
:
"管道"
,
99
:
"管道"
,
},
},
// type
iconList
:
{
}
1
:
"icon-tyx"
,
2
:
"icon-fmj"
,
3
:
"icon-llj"
,
4
:
"icon-ylb"
,
99
:
"icon-gdcd"
,
},
};
},
},
created
()
{
created
()
{
console
.
log
(
"list"
,
this
.
list
);
console
.
log
(
"list"
,
this
.
list
);
},
},
methods
:
{
iconClass
(
item
)
{
return
this
.
iconList
[
item
.
type
]
},
},
};
};
</
script
>
</
script
>
...
...
This diff is collapsed.
Click to expand it.
gassafety-web/src/views/enterprise/mapView/index.vue
View file @
e0bc00a6
...
@@ -375,7 +375,6 @@ export default {
...
@@ -375,7 +375,6 @@ export default {
});
});
},
},
getInspectionDataByInspector
(){
getInspectionDataByInspector
(){
this
.
gaoMap
.
addMarker
(
this
.
gaoMap
.
addMarker
(
DEVICE_TYPE
.
INSPECTOR
,
DEVICE_TYPE
.
INSPECTOR
,
{
longitude
:
114.525243
,
latitude
:
38.035002
}
{
longitude
:
114.525243
,
latitude
:
38.035002
}
...
...
This diff is collapsed.
Click to expand it.
gassafety-web/src/views/workOrder/basicsInfo/detail.vue
View file @
e0bc00a6
This diff is collapsed.
Click to expand it.
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