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
8769f449
Commit
8769f449
authored
Jul 30, 2021
by
范加坤
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/lc_branch' into van_branch
parents
ca377fca
b0331d21
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
74 additions
and
35 deletions
+74
-35
App.vue
src/App.vue
+7
-0
biogasManureMap.vue
src/pages/biomassEnergyWarm/components/biogasManureMap.vue
+2
-4
sortList.vue
src/pages/biomassEnergyWarm/components/sortList.vue
+0
-7
index.vue
src/pages/biomassEnergyWarm/index.vue
+0
-1
methaneMap.vue
src/pages/methaneUpgrade/components/methaneMap.vue
+18
-19
index.js
src/store/index.js
+38
-4
energyVillage.js
src/store/module/energyVillage.js
+9
-0
No files found.
src/App.vue
View file @
8769f449
...
...
@@ -7,10 +7,17 @@
</
template
>
<
script
>
import
{
mapActions
}
from
"vuex"
;
export
default
{
data
()
{
return
{};
},
created
()
{
this
.
getRegionProvince
();
},
methods
:
{
...
mapActions
([
"getRegionProvince"
]),
},
};
</
script
>
...
...
src/pages/biomassEnergyWarm/components/biogasManureMap.vue
View file @
8769f449
...
...
@@ -33,10 +33,10 @@ export default {
const
obj
=
BiomassData
[
this
.
type
].
find
(
(
item
)
=>
item
.
type
===
"aggregation"
);
const
filterCon
=
[
"match"
,
[
"get"
,
"
province_c
"
]];
const
filterCon
=
[
"match"
,
[
"get"
,
"
code
"
]];
this
.
data
.
forEach
((
item
)
=>
{
const
currentColor
=
this
.
getCurrentColor
(
item
.
properties
[
obj
.
key
]);
filterCon
.
push
(
Number
(
item
.
properties
.
pcode
)
,
currentColor
);
filterCon
.
push
(
item
.
properties
.
pcode
,
currentColor
);
});
filterCon
.
push
(
"#f00"
);
return
filterCon
;
...
...
@@ -45,9 +45,7 @@ export default {
methods
:
{
onload
(
map
)
{
this
.
map
=
map
;
console
.
log
(
this
.
map
.
getStyle
());
this
.
setPaintColor
();
console
.
log
(
"地图加载完成"
);
},
getCurrentColor
(
val
)
{
if
(
val
>
colorLabel
[
colorLabel
.
length
-
1
])
{
...
...
src/pages/biomassEnergyWarm/components/sortList.vue
View file @
8769f449
...
...
@@ -66,7 +66,6 @@ export default {
// res.rj_local.push({ xAxis: pname, yAxis: rj_local });
// res.th_local.push({ xAxis: pname, yAxis: th_local });
});
console
.
log
(
res
);
return
res
;
},
setOptionOfEchart
()
{
...
...
@@ -155,17 +154,11 @@ export default {
filter
:
[
"!="
,
"pcode"
,
10
],
};
this
.
$api
.
layer
.
query
(
this
.
dataSetCode
,
param
).
then
((
res
)
=>
{
console
.
log
(
res
);
this
.
data
=
res
.
data
.
features
;
this
.
getValOfdata
;
});
},
},
watch
:
{
getItemOfType
(
val
)
{
console
.
log
(
val
);
},
},
};
</
script
>
...
...
src/pages/biomassEnergyWarm/index.vue
View file @
8769f449
...
...
@@ -158,7 +158,6 @@ export default {
},
],
};
console
.
log
(
option
);
return
option
;
};
},
...
...
src/pages/methaneUpgrade/components/methaneMap.vue
View file @
8769f449
...
...
@@ -5,39 +5,38 @@
</
template
>
<
script
>
import
Map
from
'@/components/Map/Map.vue'
import
Map
from
"@/components/Map/Map.vue"
;
export
default
{
name
:
'methane'
,
name
:
"methane"
,
data
()
{
return
{
map
:
''
}
map
:
""
,
}
;
},
components
:
{
Map
Map
,
},
computed
:
{},
methods
:
{
async
onload
(
map
)
{
this
.
map
=
map
this
.
map
=
map
;
this
.
map
.
addLayer
({
id
:
'province'
,
source
:
'province'
,
type
:
'fill'
,
id
:
"province"
,
source
:
"province"
,
type
:
"fill"
,
layout
:
{},
paint
:
{
'fill-outline-color'
:
'#fff'
,
'fill-color'
:
'rgba(0, 0, 0, 0)'
}
})
await
this
.
$emit
(
'onload'
,
map
)
"fill-outline-color"
:
"#fff"
,
"fill-color"
:
"rgba(0, 0, 0, 0)"
,
}
,
})
;
await
this
.
$emit
(
"onload"
,
map
);
},
async
setBackground
(
data
)
{
console
.
log
(
this
.
map
.
getStyle
())
await
this
.
map
.
setPaintProperty
(
'province'
,
'fill-color'
,
data
)
}
}
}
await
this
.
map
.
setPaintProperty
(
"province"
,
"fill-color"
,
data
);
},
},
};
</
script
>
<
style
scoped
lang=
"less"
>
...
...
src/store/index.js
View file @
8769f449
import
Vue
from
"vue"
;
import
Vuex
from
"vuex"
;
import
energyVillage
from
"./module/energyVillage"
;
import
{
query
}
from
"@/api/modules/layer.js"
;
Vue
.
use
(
Vuex
);
export
default
new
Vuex
.
Store
({
state
:
{},
mutations
:
{},
actions
:
{},
modules
:
{},
state
:
{
province
:
[],
},
mutations
:
{
GET_REGION_PROVINCE
(
state
,
data
)
{
state
.
province
=
data
;
},
},
actions
:
{
getRegionProvince
({
commit
})
{
query
(
"land_region_province"
).
then
((
res
)
=>
{
commit
(
"GET_REGION_PROVINCE"
,
res
.
data
.
features
);
});
},
},
getters
:
{
getMsgOfProvince
:
(
state
)
=>
(
code
)
=>
{
const
detail
=
state
.
province
.
find
(
(
item
)
=>
item
.
properties
.
PXZQDM
===
code
);
if
(
!
detail
)
return
null
;
const
{
PXZQDM
,
PXZQMC
,
x_max
,
x_min
,
y_max
,
y_min
}
=
detail
.
properties
;
const
res
=
{
key
:
PXZQDM
,
value
:
PXZQMC
,
bbox
:
[
[
x_min
,
y_min
],
[
x_max
,
y_max
],
],
};
return
res
;
},
},
modules
:
{
energyVillage
,
},
});
src/store/module/energyVillage.js
0 → 100644
View file @
8769f449
export
default
{
namespaced
:
true
,
state
:
{
data
:
1
,
},
mutations
:
{},
actions
:
{},
getters
:
{},
};
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