Commit 9d7ad0a5 authored by 吕超's avatar 吕超

delete: 删除log

parent c0d0ab21
......@@ -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]) {
......
......@@ -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>
......
......@@ -158,7 +158,6 @@ export default {
},
],
};
console.log(option);
return option;
};
},
......
......@@ -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">
......
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