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
99b44087
Commit
99b44087
authored
Jul 30, 2021
by
范加坤
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
底图qiepian
parent
0cd7699c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
18 deletions
+17
-18
Map.vue
src/components/Map/Map.vue
+8
-2
index.vue
src/pages/methaneUpgrade/index.vue
+9
-16
No files found.
src/components/Map/Map.vue
View file @
99b44087
...
...
@@ -82,13 +82,19 @@ export default {
addProvinceLayer
()
{
this
.
$api
.
data
.
getProvinceData
().
then
(
res
=>
{
this
.
map
.
addSource
(
'province'
,
{
type
:
'geojson'
,
data
:
res
.
data
// type: 'geojson',
// data: res.data
tiles
:
[
'http://39.104.87.15/api/tileset/agnps_sjwj/{z}/{x}/{y}.vector.pbf'
],
type
:
'vector'
// "http://39.104.87.15/api/tileset/agnps_sjwj/{z}/{x}/{y}.vector.pbf"
})
this
.
map
.
addLayer
({
id
:
'province'
,
source
:
'province'
,
type
:
'fill'
,
'source-layer'
:
'province'
,
layout
:
{},
paint
:
{
'fill-outline-color'
:
'#fff'
,
...
...
src/pages/methaneUpgrade/index.vue
View file @
99b44087
...
...
@@ -80,7 +80,7 @@
:value=
"leftObj.zj_capacity"
></PartWrap>
</div>
<Lengend
class=
"legend-part"
:colors=
"colors"
:range=
"colorLabel"
/>
<Lengend
class=
"legend-part"
:colors=
"colors"
:range=
"colorLabel"
/>
<div
class=
"right-part"
>
<PartWrap
class=
"bottom-part-echart"
:title=
"'年末累计(处)'"
>
<div
style=
"width: 13vw; height: 38vh"
>
...
...
@@ -156,11 +156,11 @@ export default {
map
:
''
,
// legendRange:[],
colors
:
[
'rgb(
75,250,2
)'
,
'
blue
'
,
'rgb(22
9,246,0
)'
,
'rgb(2
52,114,0
)'
,
'rgb(2
38,76,0
)'
,
'rgb(
67, 134, 78
)'
,
'
rgb(178, 222, 145)
'
,
'rgb(22
3, 238, 175
)'
,
'rgb(2
45, 255, 163
)'
,
'rgb(2
40, 145, 98
)'
,
'rgb(245,1,0)'
],
colorLabel
:
[],
...
...
@@ -505,17 +505,10 @@ export default {
this
.
colorLabel
=
range
let
a
=
[
'match'
,
[
'get'
,
'province_c'
]
// 1,
// 'rgb(0,255,81)',
// 2,
// '#F9E32B',
// 3,
// '#FB3941',
// 'rgb(0,255,81)'
[
'get'
,
'code'
]
]
data
.
forEach
(
item
=>
{
a
.
push
(
Number
(
item
.
pcode
)
)
a
.
push
(
item
.
pcode
)
a
.
push
(
this
.
getColorOfProvince
(
Number
(
item
[
this
.
statusValue1
.
key
])))
})
console
.
log
(
a
)
...
...
@@ -759,7 +752,7 @@ export default {
flex: 1;
}
}
.legend-part{
.legend-part
{
position: absolute;
z-index: 11;
left: 300px;
...
...
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