|
@@ -4,15 +4,34 @@
|
|
|
<Header @navSelect="navSelect"></Header>
|
|
|
<!-- 左侧菜单列 -->
|
|
|
<div id="leftMenus">
|
|
|
- <MenuCard :type="menus.left[0].type" :title="menus.left[0].title" :boxHeight="menus.left[0].height">
|
|
|
+ <MenuCard
|
|
|
+ :type="menus.left[0].type"
|
|
|
+ :title="menus.left[0].title"
|
|
|
+ :boxHeight="menus.left[0].height"
|
|
|
+ >
|
|
|
<template slot="top">主题上部插槽</template>
|
|
|
<template slot="bottom">主题下部插槽</template>
|
|
|
</MenuCard>
|
|
|
- <MenuCard :type="menus.left[1].type" :title="menus.left[1].title" :boxHeight="menus.left[1].height"></MenuCard>
|
|
|
- <MenuCard :type="menus.left[2].type" :title="menus.left[2].title" :boxHeight="menus.left[2].height"></MenuCard>
|
|
|
+ <MenuCard
|
|
|
+ :type="menus.left[1].type"
|
|
|
+ :title="menus.left[1].title"
|
|
|
+ :boxHeight="menus.left[1].height"
|
|
|
+ ></MenuCard>
|
|
|
+ <MenuCard
|
|
|
+ :type="menus.left[2].type"
|
|
|
+ :title="menus.left[2].title"
|
|
|
+ :boxHeight="menus.left[2].height"
|
|
|
+ ></MenuCard>
|
|
|
</div>
|
|
|
<!-- 中部菜单列 -->
|
|
|
<div id="mainMenus">
|
|
|
+ <div id="mainMenus_topLeft">所属街道</div>
|
|
|
+ <NewSelect
|
|
|
+ id="mainMenus_topSelect"
|
|
|
+ v-model="streetSelectVal"
|
|
|
+ :options="streetOptions"
|
|
|
+ :value="streetSelectVal"
|
|
|
+ />
|
|
|
<div id="mainMenus_topRight">
|
|
|
<MenuCard
|
|
|
:type="menus.main[0].type"
|
|
@@ -20,14 +39,33 @@
|
|
|
:boxWidth="menus.main[0].width"
|
|
|
:boxHeight="menus.main[0].height"
|
|
|
:boxBackground="menus.main[0].background"
|
|
|
- ></MenuCard>
|
|
|
+ >
|
|
|
+ <div class="bar-btn">1</div>
|
|
|
+ <div class="bar-content">1</div
|
|
|
+ >
|
|
|
+ </MenuCard>
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- 右侧菜单列 -->
|
|
|
<div id="rightMenus">
|
|
|
- <MenuCard :type="menus.right[0].type" :titleWidth="menus.right[0].titleWidth" :title="menus.right[0].title" :boxHeight="menus.right[0].height"></MenuCard>
|
|
|
- <MenuCard :type="menus.right[1].type" :titleWidth="menus.right[1].titleWidth" :title="menus.right[1].title" :boxHeight="menus.right[1].height"></MenuCard>
|
|
|
- <MenuCard :type="menus.right[2].type" :titleWidth="menus.right[2].titleWidth" :title="menus.right[2].title" :boxHeight="menus.right[2].height"></MenuCard>
|
|
|
+ <MenuCard
|
|
|
+ :type="menus.right[0].type"
|
|
|
+ :titleWidth="menus.right[0].titleWidth"
|
|
|
+ :title="menus.right[0].title"
|
|
|
+ :boxHeight="menus.right[0].height"
|
|
|
+ ></MenuCard>
|
|
|
+ <MenuCard
|
|
|
+ :type="menus.right[1].type"
|
|
|
+ :titleWidth="menus.right[1].titleWidth"
|
|
|
+ :title="menus.right[1].title"
|
|
|
+ :boxHeight="menus.right[1].height"
|
|
|
+ ></MenuCard>
|
|
|
+ <MenuCard
|
|
|
+ :type="menus.right[2].type"
|
|
|
+ :titleWidth="menus.right[2].titleWidth"
|
|
|
+ :title="menus.right[2].title"
|
|
|
+ :boxHeight="menus.right[2].height"
|
|
|
+ ></MenuCard>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -35,12 +73,15 @@
|
|
|
import MapHolder from "@/components/map/MapHolder.vue";
|
|
|
import Header from "@/components/layout/Header.vue";
|
|
|
import MenuCard from "@/components/layout/MenuCard";
|
|
|
+import NewSelect from "@/components/common/NewSelect.vue";
|
|
|
+import { street, soilData, waterData, forestryData } from "@/config/common";
|
|
|
export default {
|
|
|
name: "HomeView",
|
|
|
components: {
|
|
|
MapHolder,
|
|
|
Header,
|
|
|
- MenuCard
|
|
|
+ MenuCard,
|
|
|
+ NewSelect,
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -50,22 +91,107 @@ export default {
|
|
|
left: [
|
|
|
{ type: "menu", title: "土地资源" },
|
|
|
{ type: "menu", title: "水资源" },
|
|
|
- { type: "menu", title: "林地资源" }
|
|
|
+ { type: "menu", title: "林地资源" },
|
|
|
+ ],
|
|
|
+ main: [
|
|
|
+ {
|
|
|
+ type: "chart",
|
|
|
+ title: "浦东新区自然资源分布TOP10",
|
|
|
+ width: "360",
|
|
|
+ height: "370",
|
|
|
+ background: "rgba(0,39,77,0.6)",
|
|
|
+ },
|
|
|
],
|
|
|
- main: [{ type: "chart", title: "浦东新区自然资源分布TOP10", width: "360", height: "370" ,background : "rgba(0,39,77,0.6)"}],
|
|
|
right: [
|
|
|
- { type: "menu", title: "资金投入情况",titleWidth:62 },
|
|
|
- { type: "menu", title: "资源环境项目",titleWidth:62 },
|
|
|
- { type: "menu", title: "历年频发问题TOP5",titleWidth:82 }
|
|
|
- ]
|
|
|
- }
|
|
|
+ { type: "menu", title: "资金投入情况", titleWidth: 62 },
|
|
|
+ { type: "menu", title: "资源环境项目", titleWidth: 62 },
|
|
|
+ { type: "menu", title: "历年频发问题TOP5", titleWidth: 82 },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ buttonData: ["A", "B", "C"],
|
|
|
+ btnChecked: "A",
|
|
|
+ AData: {
|
|
|
+ soil: [],
|
|
|
+ water: [],
|
|
|
+ forestry: [],
|
|
|
+ },
|
|
|
+ BData: {
|
|
|
+ soil: [],
|
|
|
+ water: [],
|
|
|
+ forestry: [],
|
|
|
+ },
|
|
|
+ CData: {
|
|
|
+ soil: [],
|
|
|
+ water: [],
|
|
|
+ forestry: [],
|
|
|
+ },
|
|
|
+ streetSelectVal: "全部街道",
|
|
|
+ streetOptions: [],
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
navSelect: function (data) {
|
|
|
console.log(data);
|
|
|
+ },
|
|
|
+ clickEvent(type) {
|
|
|
+ this.btnChecked = type;
|
|
|
+ switch (type) {
|
|
|
+ case "A":
|
|
|
+ this.soil = this.AData.soil;
|
|
|
+ this.water = this.AData.water;
|
|
|
+ this.forestry = this.AData.forestry;
|
|
|
+ break;
|
|
|
+ case "B":
|
|
|
+ this.soil = this.BData.soil;
|
|
|
+ this.water = this.BData.water;
|
|
|
+ this.forestry = this.BData.forestry;
|
|
|
+ break;
|
|
|
+ case "C":
|
|
|
+ this.soil = this.CData.soil;
|
|
|
+ this.water = this.CData.water;
|
|
|
+ this.forestry = this.CData.forestry;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ // 目录
|
|
|
+ this.categoryData = Object.keys(street);
|
|
|
+ // 默认A类
|
|
|
+ this.soil = [];
|
|
|
+ this.water = [];
|
|
|
+ this.forestry = [];
|
|
|
+
|
|
|
+ for (let i in soilData) {
|
|
|
+ this.AData.soil.push(soilData[i].A);
|
|
|
+ this.BData.soil.push(soilData[i].B);
|
|
|
+ this.CData.soil.push(soilData[i].C);
|
|
|
}
|
|
|
- }
|
|
|
+
|
|
|
+ for (let i in waterData) {
|
|
|
+ this.AData.water.push(waterData[i].A);
|
|
|
+ this.BData.water.push(waterData[i].B);
|
|
|
+ this.CData.water.push(waterData[i].C);
|
|
|
+ }
|
|
|
+
|
|
|
+ for (let i in forestryData) {
|
|
|
+ this.AData.forestry.push(forestryData[i].A);
|
|
|
+ this.BData.forestry.push(forestryData[i].B);
|
|
|
+ this.CData.forestry.push(forestryData[i].C);
|
|
|
+ }
|
|
|
+
|
|
|
+ this.soil = this.AData.soil;
|
|
|
+ this.water = this.AData.water;
|
|
|
+ this.forestry = this.AData.forestry;
|
|
|
+
|
|
|
+ // 街道下拉框
|
|
|
+ for (let key in street) {
|
|
|
+ this.streetOptions.push({
|
|
|
+ value: street[key],
|
|
|
+ label: street[key],
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
};
|
|
|
</script>
|
|
|
<style lang="less" scoped>
|
|
@@ -92,11 +218,35 @@ export default {
|
|
|
width: calc(100% - 850px);
|
|
|
height: calc(100% - 60px);
|
|
|
box-sizing: border-box;
|
|
|
+ &_topLeft {
|
|
|
+ position: absolute;
|
|
|
+ left: 20px;
|
|
|
+ top: 30px;
|
|
|
+ font-size: 18px;
|
|
|
+ z-index: 99999;
|
|
|
+ color: #fff;
|
|
|
+ }
|
|
|
+ &_topSelect {
|
|
|
+ position: absolute;
|
|
|
+ left: 100px;
|
|
|
+ top: 30px;
|
|
|
+ z-index: 99999;
|
|
|
+ }
|
|
|
&_topRight {
|
|
|
position: absolute;
|
|
|
right: 10px;
|
|
|
top: 30px;
|
|
|
z-index: 999999;
|
|
|
+ .bar-btn {
|
|
|
+ width: 100%;
|
|
|
+ height: 10%;
|
|
|
+ background: red;
|
|
|
+ }
|
|
|
+ .bar-content {
|
|
|
+ width: 100%;
|
|
|
+ height: 90%;
|
|
|
+ background: yellowgreen;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
#rightMenus {
|