Commit 07bd3ec6 authored by 吕超's avatar 吕超

fix: 修改标题,信息弹窗,调整间距等等

parent 68756cae
...@@ -465,4 +465,16 @@ i { ...@@ -465,4 +465,16 @@ i {
.leaflet-control-clegend-right { .leaflet-control-clegend-right {
right: 20vw; right: 20vw;
bottom: 0; bottom: 0;
}
&::-webkit-scrollbar {
width: 8px;
height: 8px;
background-color: rgba(0, 100, 200, 0.2);
}
&::-webkit-scrollbar-thumb {
border-radius: 5px;
// box-shadow: inset 0 0 6px rgba(234, 227, 216, 0.1);
background-color: rgba(0, 100, 210, 1);
} }
\ No newline at end of file
<template> <template>
<div class="part info"> <div class="part info">
<label class="title" for="title"> <label class="title" for="title">
<i class="el-icon-s-flag"></i> <i v-if="isFlag" class="el-icon-s-flag"></i>
{{ title }} {{ title }}
</label> </label>
<div> <div>
...@@ -28,6 +28,10 @@ export default { ...@@ -28,6 +28,10 @@ export default {
value: { value: {
type: [String, Number], type: [String, Number],
}, },
isFlag: {
type: Boolean,
default: true,
},
}, },
}; };
</script> </script>
......
...@@ -43,14 +43,23 @@ export default { ...@@ -43,14 +43,23 @@ export default {
const currentColor = this.getCurrentColor(item.properties[obj.key]); const currentColor = this.getCurrentColor(item.properties[obj.key]);
filterCon.push(item.properties.pcode, currentColor); filterCon.push(item.properties.pcode, currentColor);
}); });
filterCon.push("#f00"); filterCon.push(color[0]);
return filterCon; return filterCon.length === 3 ? undefined : filterCon;
}, },
...mapGetters(["getMsgOfProvince"]), ...mapGetters(["getMsgOfProvince"]),
}, },
methods: { methods: {
onload(map) { onload(map) {
this.map = map; this.map = map;
this.map.fitBounds(
[
[73.487345, 17.397329],
[135.087387, 53.561602],
],
{
padding: { bottom: 500, top: 120, left: 80, right: 470 },
}
);
this.setPaintColor(); this.setPaintColor();
}, },
getCurrentColor(val) { getCurrentColor(val) {
......
...@@ -5,8 +5,9 @@ ...@@ -5,8 +5,9 @@
v-for="(item, index) in getItemOfType" v-for="(item, index) in getItemOfType"
:key="index" :key="index"
:title="item.value" :title="item.value"
:style="{ width: `${getItemOfType.length === 1 ? '100%' : '48%'}` }" :style="{ width: '48%' }"
> >
<!-- :style="{ width: `${getItemOfType.length === 1 ? '100%' : '48%'}` }" -->
<div class="partItem"> <div class="partItem">
<Echart <Echart
ref="echart3" ref="echart3"
...@@ -72,18 +73,15 @@ export default { ...@@ -72,18 +73,15 @@ export default {
const xData = data.map((item) => item.xAxis); const xData = data.map((item) => item.xAxis);
const yData = data.map((item) => item.yAxis); const yData = data.map((item) => item.yAxis);
const option = { const option = {
title: { title: {},
text: "各省入侵报告次数",
textStyle: {
color: "rgba(12,88,97,.8)",
fontSize: 16,
},
},
color: ["#d65108"], color: ["#d65108"],
tooltip: {
show: true,
},
grid: { grid: {
left: "3%", left: "3%",
right: "3%", right: "13%",
top: "10%", top: "3%",
bottom: "3%", bottom: "3%",
containLabel: true, containLabel: true,
}, },
...@@ -122,7 +120,7 @@ export default { ...@@ -122,7 +120,7 @@ export default {
{ {
name: "入侵报告次数", name: "入侵报告次数",
type: "bar", type: "bar",
barWidth: 12, barWidth: `80%`,
data: yData, data: yData,
label: { label: {
show: true, show: true,
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
v-for="(item, index) in getItemOfType" v-for="(item, index) in getItemOfType"
:key="index" :key="index"
:label="item.value" :label="item.value"
:width="450 / getItemOfType.length" :width="`${1 / getItemOfType.length}%`"
align="center" align="center"
> >
</el-table-column> </el-table-column>
......
...@@ -98,14 +98,11 @@ export default { ...@@ -98,14 +98,11 @@ export default {
const xData = data.map((item) => item.xAxis); const xData = data.map((item) => item.xAxis);
const yData = data.map((item) => item.yAxis); const yData = data.map((item) => item.yAxis);
const option = { const option = {
title: { title: {},
text: "各省入侵报告次数",
textStyle: {
color: "rgba(12,88,97,.8)",
fontSize: 16,
},
},
color: ["#d65108"], color: ["#d65108"],
tooltip: {
show: true,
},
grid: { grid: {
left: "3%", left: "3%",
right: "3%", right: "3%",
...@@ -148,11 +145,11 @@ export default { ...@@ -148,11 +145,11 @@ export default {
{ {
name: "入侵报告次数", name: "入侵报告次数",
type: "bar", type: "bar",
barWidth: 12, barWidth: `50%`,
data: yData, data: yData,
label: { label: {
show: true, show: true,
position: "right", position: "top",
}, },
itemStyle: { itemStyle: {
emphasis: { emphasis: {
...@@ -198,7 +195,7 @@ export default { ...@@ -198,7 +195,7 @@ export default {
position: absolute; position: absolute;
bottom: 1vw; bottom: 1vw;
right: 1vw; right: 1vw;
left: calc(600px + 1vw); left: calc(31vw + 2vw);
height: 27vh; height: 27vh;
.left-part-item { .left-part-item {
......
...@@ -38,6 +38,15 @@ export default { ...@@ -38,6 +38,15 @@ export default {
methods: { methods: {
async onload(map) { async onload(map) {
this.map = map; this.map = map;
this.map.fitBounds(
[
[73.487345, 17.397329],
[135.087387, 53.561602],
],
{
padding: { bottom: 80, top: 120, left: 80, right: 470 },
}
);
await this.getData(); await this.getData();
this.addLayer(); this.addLayer();
}, },
......
<template> <template>
<div class="filterProvince"> <div class="filterProvince">
<div class="search"> <PartWrap :isFlag="false">
<input type="text" v-model.lazy="search" /> <div class="search">
</div> <input type="text" v-model="search" />
<div class="content"> </div>
<ul> <div class="content">
<li <ul>
v-for="(item, index) in getData" <li
@click="onAddressChange(item)" v-for="(item, index) in getData"
:key="index" @click="onAddressChange(item)"
> :key="index"
{{ item.province }} >
</li> {{ item.province }}
</ul> </li>
</div> </ul>
</div>
</PartWrap>
</div> </div>
</template> </template>
<script> <script>
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
import PartWrap from "@/components/PartWrap/PartWrap.vue";
export default { export default {
name: "filterProvince", name: "filterProvince",
data() { data() {
...@@ -26,16 +29,21 @@ export default { ...@@ -26,16 +29,21 @@ export default {
search: "", search: "",
}; };
}, },
components: {
PartWrap,
},
created() {},
computed: { computed: {
getData() { getData() {
let data = []; let data = [];
data = this.getAggregationProvince();
if (this.search) { if (this.search) {
data = this.getAggregationProvince().filter( data = this.getAggregationProvince().filter(
(item) => item.province === this.search (item) => item.province === this.search
); );
} }
data = this.getAggregationProvince();
data.unshift({ province: "全国", provinceCode: "" }); !this.search && data.unshift({ province: "全国", provinceCode: "" });
return data; return data;
}, },
...mapGetters("energyVillage", ["getAggregationProvince"]), ...mapGetters("energyVillage", ["getAggregationProvince"]),
...@@ -51,12 +59,12 @@ export default { ...@@ -51,12 +59,12 @@ export default {
<style scoped lang="less"> <style scoped lang="less">
.filterProvince { .filterProvince {
width: 300px; width: 300px;
padding: 10px;
.search input { .search input {
width: 90%; width: 90%;
transform: translate(5%); transform: translate(5%);
margin: 0 auto; margin: 10px auto 20px;
padding-left: 5px;
outline: none; outline: none;
border: none; border: none;
height: 30px; height: 30px;
...@@ -64,7 +72,7 @@ export default { ...@@ -64,7 +72,7 @@ export default {
border: 1px solid #eaeaee; border: 1px solid #eaeaee;
color: #999; color: #999;
border-radius: 5px; border-radius: 5px;
margin-bottom: 20px; // margin-bottom: 20px;
} }
ul { ul {
display: flex; display: flex;
...@@ -72,12 +80,12 @@ export default { ...@@ -72,12 +80,12 @@ export default {
align-items: center; align-items: center;
text-align: center; text-align: center;
li { li {
width: 100px; width: 33%;
cursor: pointer; cursor: pointer;
} }
li:hover { li:hover {
color: blue; color: #5e8ed1;
} }
} }
} }
......
<template> <template>
<div class="picPopup"> <div class="picPopup">
<el-dialog <el-dialog
title="提示" title=""
:visible.sync="getVisible" :visible.sync="getVisible"
width="70%" width="70%"
:before-close="handleClose" :before-close="handleClose"
...@@ -21,10 +21,19 @@ ...@@ -21,10 +21,19 @@
class="left el-icon-arrow-left" class="left el-icon-arrow-left"
@click="listValue <= 0 || (listValue -= 1)" @click="listValue <= 0 || (listValue -= 1)"
></i> ></i>
<img <div class="contain">
:src="`${BASE_URL}/images/14_${list[listValue].key}.jpg`" <div class="zero" v-if="listValue === 0">
alt="" <img :src="`${BASE_URL}/images/14_basic_info1.jpg`" alt="" />
/> <img :src="`${BASE_URL}/images/14_basic_info2.jpg`" alt="" />
<img :src="`${BASE_URL}/images/14_basic_info3.jpg`" alt="" />
</div>
<template v-else>
<img
:src="`${BASE_URL}/images/14_${list[listValue].key}.jpg`"
alt=""
/>
</template>
</div>
<i <i
class="right el-icon-arrow-right" class="right el-icon-arrow-right"
@click="listValue >= list.length - 1 || (listValue += 1)" @click="listValue >= list.length - 1 || (listValue += 1)"
...@@ -33,9 +42,9 @@ ...@@ -33,9 +42,9 @@
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="medium" @click="getVisible = false">取 消</el-button> <el-button size="medium" @click="getVisible = false">取 消</el-button>
<el-button size="medium" type="primary" @click="getVisible = false" <el-button size="medium" type="primary" @click="getVisible = false">
>确 定</el-button 确 定
> </el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
...@@ -55,9 +64,7 @@ export default { ...@@ -55,9 +64,7 @@ export default {
return { return {
BASE_URL: process.env.VUE_APP_BASE_URL, BASE_URL: process.env.VUE_APP_BASE_URL,
list: [ list: [
{ key: "basic_info1", value: "基本情况" }, { key: "basic_info", value: "基本情况" },
{ key: "basic_info2", value: "基本情况2" },
{ key: "basic_info3", value: "基本情况3" },
{ key: "technical_patterns", value: "技术模式" }, { key: "technical_patterns", value: "技术模式" },
{ key: "goal_achievement", value: "目标实现情况" }, { key: "goal_achievement", value: "目标实现情况" },
{ key: "eco_benefits", value: "效益分析" }, { key: "eco_benefits", value: "效益分析" },
...@@ -92,6 +99,9 @@ export default { ...@@ -92,6 +99,9 @@ export default {
<style scoped lang="less"> <style scoped lang="less">
.picPopup { .picPopup {
/deep/ .el-dialog {
margin-top: 10vh !important;
}
.select { .select {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
...@@ -118,10 +128,20 @@ export default { ...@@ -118,10 +128,20 @@ export default {
cursor: pointer; cursor: pointer;
} }
img { .contain {
flex: 1; flex: 1;
height: 50vh; height: 50vh;
object-fit: contain; img {
width: 100%;
height: 100%;
object-fit: contain;
}
.zero {
width: 100%;
height: 100%;
overflow-y: auto;
}
} }
} }
......
<template> <template>
<div class="sortList"> <div class="sortList">
<PartWrap class="left-part-item" title="消耗量(万吨)" style="width: 100%"> <PartWrap class="left-part-item" title="数量(个)" style="width: 100%">
<div class="partItem"> <div class="partItem">
<Echart <Echart
ref="echart3" ref="echart3"
...@@ -52,21 +52,17 @@ export default { ...@@ -52,21 +52,17 @@ export default {
const xData = data.map((item) => item.province); const xData = data.map((item) => item.province);
const yData = data.map((item) => item.count); const yData = data.map((item) => item.count);
const option = { const option = {
title: {
text: "各省入侵报告次数",
textStyle: {
color: "rgba(12,88,97,.8)",
fontSize: 16,
},
},
color: ["#d65108"], color: ["#d65108"],
grid: { grid: {
left: "3%", left: "3%",
right: "3%", right: "13%",
top: "10%", top: "3%",
bottom: "3%", bottom: "3%",
containLabel: true, containLabel: true,
}, },
tooltip: {
show: true,
},
xAxis: [ xAxis: [
{ {
position: "top", position: "top",
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
@showPopup="isShowPopup" @showPopup="isShowPopup"
></EnergyVillageMap> ></EnergyVillageMap>
<StatusControl <StatusControl
:statusStyle="{ position: 'absolute', right: '600px', top: '100px' }" class="statusControl"
:list="statusControlList" :list="statusControlList"
:value="showFilter" :value="showFilter"
@input="onStatusChange" @input="onStatusChange"
...@@ -119,7 +119,9 @@ export default { ...@@ -119,7 +119,9 @@ export default {
}, },
isShowPopup(id) { isShowPopup(id) {
this.popupId = id; this.popupId = id;
this.showPopup = true; if (id === "14") {
this.showPopup = true;
}
}, },
...mapActions("energyVillage", ["getData"]), ...mapActions("energyVillage", ["getData"]),
}, },
...@@ -132,7 +134,7 @@ export default { ...@@ -132,7 +134,7 @@ export default {
.left-part-item { .left-part-item {
position: absolute; position: absolute;
top: 11vh; top: calc(11vh + 45px + 2vh);
left: 1vw; left: 1vw;
width: 250px; width: 250px;
...@@ -152,16 +154,20 @@ export default { ...@@ -152,16 +154,20 @@ export default {
.filterProvince { .filterProvince {
position: absolute; position: absolute;
right: 600px; right: calc(3vh + 550px);
top: 140px; top: calc(11vh + 44px + 1vh);
background: rgba(255, 255, 255, 0.2);
border-radius: 5px;
} }
.date-widget { .date-widget {
position: absolute; position: absolute;
left: 280px; top: 11vh;
top: 100px; left: 1vw;
}
.statusControl {
position: absolute;
top: 11vh;
right: calc(3vh + 550px);
} }
} }
</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