Commit c0d0ab21 authored by 范加坤's avatar 范加坤

Merge remote-tracking branch 'origin/lc_branch' into van_branch

parents 84806b74 230fc687
...@@ -4,13 +4,16 @@ ...@@ -4,13 +4,16 @@
<div class="main"> <div class="main">
<template v-for="(item, index) in colors"> <template v-for="(item, index) in colors">
<div :key="index"> <div :key="index">
<div class="item" v-if="index == 0"> <!-- <div class="item" v-if="index == 0">
<div class="circle" :style="{ 'background-color': item }"></div> <div class="circle" :style="{ 'background-color': item }"></div>
<label>- {{ range[index] }}</label> <label>- {{ range[index] }}</label>
</div> </div> -->
<div class="item" v-else> <div class="item">
<div class="circle" :style="{ 'background-color': item }"></div> <div class="circle" :style="{ 'background-color': item }"></div>
<label>{{ range[index - 1] }} - {{ range[index] }}</label> <label
>{{ range[index - 1] }} {{ getCode(index) }}
{{ range[index] }}</label
>
</div> </div>
</div> </div>
</template> </template>
...@@ -21,20 +24,33 @@ ...@@ -21,20 +24,33 @@
<script> <script>
export default { export default {
data() { data() {
return {} return {};
}, },
props: { props: {
title: { title: {
type: String type: String,
}, },
colors: { colors: {
type: Array type: Array,
}, },
range: { range: {
type: Array type: Array,
} },
} },
} computed: {
getCode() {
return function (index) {
if (index === 0) {
return "<";
}
if (index === this.colors.length - 1) {
return ">";
}
return "-";
};
},
},
};
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
...@@ -72,4 +88,4 @@ export default { ...@@ -72,4 +88,4 @@ export default {
margin-top: 0.3vh; margin-top: 0.3vh;
} }
} }
</style> </style>
\ No newline at end of file
...@@ -37,6 +37,7 @@ export default { ...@@ -37,6 +37,7 @@ export default {
.part { .part {
height: 100%; height: 100%;
padding: 1.2vh; padding: 1.2vh;
min-height: 12vh;
box-sizing: border-box; box-sizing: border-box;
position: relative; position: relative;
background: @linear-color; background: @linear-color;
......
<template> <template>
<div class="biogasManure"> <div class="biogasManure">
<Map mapId="methane" @onload="onload"></Map> <Map mapId="methane" @onload="onload"></Map>
{{ getFilterColor }}
</div> </div>
</template> </template>
......
...@@ -89,7 +89,6 @@ export default { ...@@ -89,7 +89,6 @@ export default {
.leftPart { .leftPart {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
height: 50vh;
width: 250px; width: 250px;
position: absolute; position: absolute;
top: 11vh; top: 11vh;
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
</div> </div>
</PartWrap> </PartWrap>
</div> </div>
<Legend class="legendPart" :colors="color" :range="colorLabel"></Legend>
</div> </div>
</template> </template>
...@@ -33,10 +34,12 @@ import BiogasManureMap from "./components/biogasManureMap.vue"; ...@@ -33,10 +34,12 @@ import BiogasManureMap from "./components/biogasManureMap.vue";
// import Echart from "@/components/Echart/Echarts.vue"; // import Echart from "@/components/Echart/Echarts.vue";
// import PartWrap from "@/components/PartWrap/PartWrap.vue"; // import PartWrap from "@/components/PartWrap/PartWrap.vue";
import StatusControl from "@/components/statusControl/index.vue"; import StatusControl from "@/components/statusControl/index.vue";
import Legend from "@/components/Lengend/Lengend.vue";
import LeftPart from "./components/leftPart.vue"; import LeftPart from "./components/leftPart.vue";
import SortList from "./components/sortList.vue"; import SortList from "./components/sortList.vue";
import Table from "./components/table.vue"; import Table from "./components/table.vue";
import { BiomassData } from "./config/biomass.config.js"; import { BiomassData } from "./config/biomass.config.js";
import { color, colorLabel } from "./config/legend.config";
export default { export default {
name: "BiomassEnergyWarm", name: "BiomassEnergyWarm",
data() { data() {
...@@ -50,6 +53,8 @@ export default { ...@@ -50,6 +53,8 @@ export default {
statusValue: { key: "gn", value: "打捆直燃集中供暖" }, statusValue: { key: "gn", value: "打捆直燃集中供暖" },
dataSetCode: "ra_energy_heating", dataSetCode: "ra_energy_heating",
data: [], data: [],
color,
colorLabel,
}; };
}, },
components: { components: {
...@@ -60,6 +65,7 @@ export default { ...@@ -60,6 +65,7 @@ export default {
StatusControl, StatusControl,
SortList, SortList,
Table, Table,
Legend,
}, },
computed: { computed: {
getItemOfType() { getItemOfType() {
...@@ -166,7 +172,6 @@ export default { ...@@ -166,7 +172,6 @@ export default {
filter: ["!=", "pcode", 10], filter: ["!=", "pcode", 10],
}; };
this.$api.layer.query(this.dataSetCode, param).then((res) => { this.$api.layer.query(this.dataSetCode, param).then((res) => {
console.log(res);
this.data = res.data.features; this.data = res.data.features;
this.getValOfdata; this.getValOfdata;
}); });
...@@ -194,5 +199,12 @@ export default { ...@@ -194,5 +199,12 @@ export default {
height: 300px; height: 300px;
} }
} }
.legendPart {
position: absolute;
z-index: 11;
left: 300px;
bottom: 40.5vh;
}
} }
</style> </style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment