Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
C
country-energy-ecological-construction
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
范加坤
country-energy-ecological-construction
Commits
e752c89b
Commit
e752c89b
authored
Aug 03, 2021
by
吕超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 添加图片预览功能
parent
3315454a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
26 deletions
+52
-26
index.js
src/components/Map/config/index.js
+7
-7
picPopup.vue
src/pages/renewableEnergyVillage/components/picPopup.vue
+45
-19
No files found.
src/components/Map/config/index.js
View file @
e752c89b
...
@@ -18,13 +18,13 @@ export default {
...
@@ -18,13 +18,13 @@ export default {
type
:
"vector"
,
type
:
"vector"
,
maxzoom
:
12
,
maxzoom
:
12
,
},
},
area_title
:
{
//
area_title: {
tiles
:
[
//
tiles: [
`
${
process
.
env
.
VUE_APP_MAP_INIT_STYLE
}
/area_title/{z}/{x}/{y}.vector.pbf`
,
//
`${process.env.VUE_APP_MAP_INIT_STYLE}/area_title/{z}/{x}/{y}.vector.pbf`,
],
//
],
type
:
"vector"
,
//
type: "vector",
maxzoom
:
5
,
//
maxzoom: 5,
},
//
},
},
},
layers
:
[
layers
:
[
{
{
...
...
src/pages/renewableEnergyVillage/components/picPopup.vue
View file @
e752c89b
<
template
>
<
template
>
<div
class=
"picPopup"
>
<div
class=
"picPopup"
>
<el-dialog
<el-dialog
title=
""
:visible
.
sync=
"getVisible"
:visible
.
sync=
"getVisible"
width=
"70%"
width=
"70%"
:before-close=
"handleClose"
:before-close=
"handleClose"
>
>
<template
#
title
></
template
>
<div>
<div>
<div
class=
"select"
>
<div
class=
"select"
>
<el-button
<el-button
...
@@ -23,15 +23,34 @@
...
@@ -23,15 +23,34 @@
></i>
></i>
<div
class=
"contain"
>
<div
class=
"contain"
>
<div
class=
"zero"
v-if=
"listValue === 0"
>
<div
class=
"zero"
v-if=
"listValue === 0"
>
<img
:src=
"`$
{BASE_URL}/images/14_basic_info1.jpg`" alt="" />
<el-image
<img
:src=
"`$
{BASE_URL}/images/14_basic_info2.jpg`" alt="" />
style=
"width: 100%; height: 100%"
<img
:src=
"`$
{BASE_URL}/images/14_basic_info3.jpg`" alt="" />
:src=
"`${BASE_URL}/images/14_basic_info1.jpg`"
fit=
"contain"
:preview-src-list=
"imgLists"
></el-image>
<el-image
style=
"width: 100%; height: 100%"
:src=
"`${BASE_URL}/images/14_basic_info2.jpg`"
fit=
"contain"
:preview-src-list=
"imgLists"
></el-image>
<el-image
style=
"width: 100%; height: 100%"
:src=
"`${BASE_URL}/images/14_basic_info3.jpg`"
fit=
"contain"
:preview-src-list=
"imgLists"
>
</el-image>
</div>
</div>
<
template
v-else
>
<
template
v-else
>
<img
<el-image
style=
"width: 100%; height: 100%"
:src=
"`$
{BASE_URL}/images/14_${list[listValue].key}.jpg`"
:src=
"`$
{BASE_URL}/images/14_${list[listValue].key}.jpg`"
alt=""
fit="contain"
/>
:preview-src-list="imgLists"
>
</el-image>
</
template
>
</
template
>
</div>
</div>
<i
<i
...
@@ -40,12 +59,6 @@
...
@@ -40,12 +59,6 @@
></i>
></i>
</div>
</div>
</div>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"medium"
@
click=
"getVisible = false"
>
取 消
</el-button>
<el-button
size=
"medium"
type=
"primary"
@
click=
"getVisible = false"
>
确 定
</el-button>
</span>
</el-dialog>
</el-dialog>
</div>
</div>
</template>
</template>
...
@@ -70,6 +83,15 @@ export default {
...
@@ -70,6 +83,15 @@ export default {
{
key
:
"eco_benefits"
,
value
:
"效益分析"
},
{
key
:
"eco_benefits"
,
value
:
"效益分析"
},
],
],
listValue
:
0
,
listValue
:
0
,
// 添加所有图片收集
imgLists
:
[
`
${
process
.
env
.
VUE_APP_BASE_URL
}
/images/14_basic_info1.jpg`
,
`
${
process
.
env
.
VUE_APP_BASE_URL
}
/images/14_basic_info2.jpg`
,
`
${
process
.
env
.
VUE_APP_BASE_URL
}
/images/14_basic_info3.jpg`
,
`
${
process
.
env
.
VUE_APP_BASE_URL
}
/images/14_technical_patterns.jpg`
,
`
${
process
.
env
.
VUE_APP_BASE_URL
}
/images/14_goal_achievement.jpg`
,
`
${
process
.
env
.
VUE_APP_BASE_URL
}
/images/14_eco_benefits.jpg`
,
],
};
};
},
},
computed
:
{
computed
:
{
...
@@ -101,13 +123,22 @@ export default {
...
@@ -101,13 +123,22 @@ export default {
.picPopup {
.picPopup {
/deep/ .el-dialog {
/deep/ .el-dialog {
margin-top: 10vh !important;
margin-top: 10vh !important;
.el-dialog__header {
padding: 0;
}
.el-dialog__body {
padding: 1vh 1vh 6vh;
}
}
}
.select {
.select {
display: flex;
display: flex;
justify-content: space-between;
justify-content: space-between;
width: 64vw;
width: 64vw;
.el-button {
.el-button {
padding: 25px 66px;
padding: 16px 45px;
font-size: 2vh !important;
}
}
.el-button.el-button--primary {
.el-button.el-button--primary {
color: #333 !important;
color: #333 !important;
...
@@ -131,11 +162,6 @@ export default {
...
@@ -131,11 +162,6 @@ export default {
.contain {
.contain {
flex: 1;
flex: 1;
height: 50vh;
height: 50vh;
img {
width: 100%;
height: 100%;
object-fit: contain;
}
.zero {
.zero {
width: 100%;
width: 100%;
...
...
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