1
0

3 کامیت‌ها bb2633f9d7 ... a271aa6de3

نویسنده SHA1 پیام تاریخ
  lkk a271aa6de3 图斑分布组件封装 4 ماه پیش
  lkk cce8c537c6 Merge branch 'master' of http://114.244.114.158:8802/siwei/real3d-portalsite 4 ماه پیش
  lkk 0feccd559d 监测图斑页面搭建 4 ماه پیش

+ 317 - 0
src/views/farmlandProtection/components/jclxqk.vue

@@ -0,0 +1,317 @@
+<template>
+  <div>
+    <div class="divrow">
+      <div class="divCol">
+        <div class="divImg">
+          <img
+            src="/static/images/overview/icon_yrkkg.png"
+            style="height: 3.1rem; width: 3.1rem"
+          />
+        </div>
+        <div class="divText">
+          <div>
+            <span style="color: #fff">监测图斑数</span>
+          </div>
+          <div>
+            <span class="numberColor">{{ 158.38 }}km²</span>
+          </div>
+        </div>
+      </div>
+      <div class="divCol">
+        <div class="divImg">
+          <img
+            src="/static/images/overview/icon_yrkkg.png"
+            style="height: 3.1rem; width: 3.1rem"
+          />
+        </div>
+        <div class="divText">
+          <div>
+            <span style="color: #fff">监测面积</span>
+          </div>
+          <div>
+            <span class="numberColor">{{ 153.17 }}km²</span>
+          </div>
+        </div>
+      </div>
+    </div>
+    <div class="echars">
+      <div class="echartTitle">
+        <div class="block-title">监测类型情况</div>
+        <div class="selectTab">
+          <el-select
+            v-model="tab"
+            placeholder="请选择"
+            :popper-append-to-body="true"
+            @change="GetInfo()"
+          >
+            <el-option
+              v-for="item in options"
+              :key="item.value"
+              :label="item.name"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+        </div>
+      </div>
+      <div class="content">
+        <div class="echars2">
+          <div ref="echars_pie" id="echars_pie"></div>
+        </div>
+      </div>
+    </div>
+    <Statistics
+      title="图斑分布情况"
+      :cityList="cityList"
+      height="270"
+    ></Statistics>
+  </div>
+</template>
+
+<script>
+import Statistics from "./statistics";
+export default {
+  components: {
+    Statistics,
+  },
+  data() {
+    return {
+      tab: 1,
+      options: [
+        { name: "图斑数", value: 1 },
+        { name: "监测面积", value: 2 },
+      ],
+      myChart: null,
+      cityList: [
+        {
+          name: "天涯区",
+          number: 125,
+          area: 48.73,
+          unit: "km²",
+        },
+        {
+          name: "崖州区",
+          number: 125,
+          area: 48.73,
+          unit: "km²",
+        },
+        {
+          name: "海棠区",
+          number: 125,
+          area: 48.73,
+          unit: "km²",
+        },
+        {
+          name: "吉阳区",
+          number: 125,
+          area: 48.73,
+          unit: "km²",
+        },
+      ],
+    };
+  },
+  computed: {},
+  mounted() {
+    this.initEcharts();
+  },
+  methods: {
+    initEcharts(payload) {
+      console.log(payload);
+      this.myChart = echarts.init(this.$refs.echars_pie);
+
+      var names = [
+          "新增耕地",
+          "新增园地",
+          "新增林地",
+          "新增草地",
+          "新增湿地",
+          "新增农村道路用地",
+          "新增农业设施大棚",
+          "新增教育用地、体育用地",
+          "新增建筑物",
+          "新增工业用地、物流仓储用地、储备库用地",
+        ],
+        values = [];
+      for (var a = 0; a < 10; a++) {
+        values.push(Math.round(Math.random() * 100));
+      }
+
+      // qxslyqsLineEcharts.setOption({
+
+      // });
+
+      let option = {
+        // backgroundColor: "#041139",
+        tooltip: {
+          trigger: "item",
+        },
+        legend: {
+          show: false,
+        },
+        grid: {
+          top: 10,
+          left: 30,
+          right: 20,
+          bottom: 60,
+        },
+        xAxis: [
+          {
+            data: names,
+            axisLabel: {
+              textStyle: {
+                color: "#D8F0FF",
+                fontSize: 11,
+              },
+              interval: 0,
+              //   rotate: 30,
+              margin: 10, //刻度标签与轴线之间的距离。
+              rotate: 40,
+              // 超过4个字显示省略号
+              formatter: function (value) {
+                if (value.length > 5) {
+                  return `${value.slice(0, 5)}...`;
+                }
+                return value;
+              },
+            },
+            axisLine: {
+              show: false, //不显示x轴
+              lineStyle: {
+                color: "rgba(53,65,95,1)",
+              },
+            },
+            axisTick: {
+              show: false, //不显示刻度
+            },
+            boundaryGap: true,
+            splitLine: {
+              show: false,
+            },
+          },
+        ],
+        yAxis: [
+          {
+            splitLine: {
+              show: false,
+            },
+            axisTick: {
+              show: false,
+            },
+            axisLine: {
+              show: false, //不显示x轴
+              lineStyle: {
+                color: "rgba(53,65,95,1)",
+              },
+            },
+            axisLabel: {
+              show: true,
+              textStyle: {
+                color: "#D8F0FF",
+                fontSize: 14,
+              },
+            },
+          },
+        ],
+        series: [
+          // 柱体
+          {
+            name: "监测类型情况",
+            type: "bar",
+            barWidth: 15,
+            showBackground: true,
+            backgroundStyle: {
+              color: "rgba(105,160,231,0.2)",
+              borderRadius: [30, 30, 30, 30],
+            },
+            itemStyle: {
+              // 		        normal: {
+              //   color: "#E5E5E5",
+              //   barBorderRadius: 24
+              // },
+              color: {
+                x: 0,
+                y: 0,
+                x2: 0,
+                y2: 1,
+                type: "linear",
+                global: false,
+                colorStops: [
+                  {
+                    //第一节下面
+                    offset: 0,
+                    color: "#00D5FF",
+                  },
+                  {
+                    offset: 1,
+                    color: "#10274B",
+                  },
+                ],
+              },
+              borderRadius: [30, 30, 30, 30],
+            },
+            label: {
+              show: false, //每条柱状图是否显示数字
+              formatter: "{c}",
+              position: "top",
+              color: "#fff",
+              fontSize: 14,
+            },
+            data: values,
+          },
+        ],
+      };
+
+      this.myChart.setOption(option);
+    },
+  },
+  watch: {},
+  beforeDestroy() {},
+};
+</script>
+
+<style lang="less" scoped>
+.divrow {
+  margin: 0;
+  padding: 0;
+  display: flex;
+  justify-content: space-between;
+}
+
+.divImg {
+  width: 30%;
+}
+
+img {
+  height: 3.1rem;
+  width: 3.1rem;
+}
+
+.divCol {
+  width: 184px;
+  height: 75px;
+  background: inherit;
+  background-color: rgba(104, 244, 251, 0.21568627);
+  border: none;
+  border-radius: 5px;
+  display: flex;
+  white-space: nowrap;
+  align-items: center;
+  padding-left: 15px;
+  justify-content: space-around;
+}
+
+.divText {
+  width: 65%;
+  padding-left: 0.5rem;
+  .numberColor {
+    font-weight: 700;
+    font-style: normal;
+    font-size: 13px;
+    color: #00ffff;
+  }
+}
+#echars_pie {
+  height: 260px;
+  width: 402px;
+}
+</style>

+ 92 - 0
src/views/farmlandProtection/components/statistics.vue

@@ -0,0 +1,92 @@
+<template>
+  <div class="statistics">
+    <div class="echartTitle">
+      <div class="block-title">{{ title }}</div>
+    </div>
+    <div class="cityList" :style="{ height: height + 'px' }">
+      <div class="listCon" v-for="(item,i) in cityList" :key="i">
+        <div class="listArea">
+          <span>天涯区</span>
+          <span>48.73km²</span>
+        </div>
+        <div class="listItem">
+          <div class="itemBg"></div>
+        </div>
+        <div class="listNum">
+          <span>图斑数152个</span>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+    title: {
+      type: String,
+    },
+    height: {
+      type: Number,
+    },
+    cityList: {
+      type: Array,
+    },
+  },
+  components: {},
+  data() {
+    return {};
+  },
+  computed: {},
+  mounted() {},
+  methods: {},
+  watch: {},
+  watch: {},
+  beforeDestroy() {},
+};
+</script>
+
+<style lang="less" scoped>
+.statistics {
+  .cityList {
+    width: 100%;
+    // background: rgba(255, 192, 203, 0.445);
+    overflow: hidden;
+    overflow-y: auto;
+    .listCon {
+      width: 100%;
+      height: 55px;
+    //   background: rgba(152, 251, 152, 0.685);
+      margin: 5px 0px;
+      .listArea{
+        width: 365px;
+        display: flex;
+        justify-content: space-between;
+      }
+      .listItem {
+        width: 365px;
+        height: 10px;
+        background: inherit;
+        background-color: rgba(242, 242, 242, 0.43921568627451);
+        border: none;
+        border-radius: 85px;
+        box-shadow: none;
+        margin-bottom: 3px;
+        .itemBg {
+          width: 233px;
+          height: 100%;
+          background-color: rgba(30, 159, 255, 1);
+          border: none;
+          border-radius: 85px;
+        }
+      }
+      .listNum {
+      font-size: 11px;
+      color: #fff;
+      text-align: left;
+    }
+    }
+
+  }
+}
+</style>

+ 6 - 3
src/views/farmlandProtection/indexNew.vue

@@ -15,7 +15,7 @@
         </ul>
       </div>
     </div>
-    <div class="innerContainer leftPane" v-drag v-show="activeIndex != 3">
+    <div class="innerContainer leftPane" v-drag v-show="activeIndex == 0 || activeIndex == 1">
       <h2 class="Pangetitle darg-div el-col">
         <span class="pange_text">{{ checkList[activeIndex].title }} </span>
         <i class="document el-icon-document" @click="drawer = !drawer"></i>
@@ -40,8 +40,9 @@
         <Gdzl v-loading="loading" @updateParent="changeData" ref="gdzl"></Gdzl>
       </div>
     </div>
+    <Jctb v-show="activeIndex == 2"></Jctb>
     <Fzyp v-show="activeIndex == 3"></Fzyp>
-    <div class="innerContainer legendPane" v-drag>
+    <div class="innerContainer legendPane" v-drag v-show="activeIndex == 0 || activeIndex == 1">
       <div class="xz_box">
         图例
         <div v-for="(litem, li) in legends" :key="litem.label">
@@ -56,6 +57,7 @@
 <script>
 // import Organize from "./components/organize.vue";
 import Gdzl from "./gdzl/index.vue";
+import Jctb from "./jctb/index.vue";
 // import Qhdb from "./components/qhdb.vue";
 // import List from "./components/list.vue";
 // import preCheck from "./components/preCheck.vue";
@@ -69,6 +71,7 @@ export default {
   name: "farmlandProtectionNew",
   components: {
     Gdzl,
+    Jctb,
     // Qhdb,
     // List,
     // preCheck,
@@ -90,7 +93,7 @@ export default {
         { title: "监测图斑" },
         { title: "辅助研判" },
       ],
-      activeIndex: 0,
+      activeIndex: 2,
       iscontrast: false,
       legends: legends,
     };

+ 64 - 0
src/views/farmlandProtection/jctb/index.vue

@@ -0,0 +1,64 @@
+<template>
+  <div class="ghzc MonitoringPattern">
+    <div class="innerContainer leftPane" v-drag @click.native.stop>
+      <h2 class="Pangetitle darg-div">
+        <span class="pange_text">监测图斑管理</span>
+        <span class="exportBtn">导入</span>
+      </h2>
+      <div>
+        <el-tabs
+          type="border-card"
+          v-model="activeTabs"
+          class="xz_box"
+          stretch
+          @tab-click="tabClick"
+        >
+          <el-tab-pane label="图斑总览" name="tbzl">
+            <Jclxqk></Jclxqk>
+          </el-tab-pane>
+          <el-tab-pane label="图斑清单" name="tbqd"> </el-tab-pane>
+        </el-tabs>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import Jclxqk from "../components/jclxqk.vue";
+export default {
+  components: {
+    Jclxqk,
+  },
+  data() {
+    return {
+      activeTabs: "tbzl",
+    };
+  },
+  methods: {
+    tabClick(evt) {
+      this.activeTabs = evt.name;
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.MonitoringPattern {
+  .exportBtn {
+    position: absolute;
+    right: 25px;
+    top: 6px;
+    color: #fff;
+    width: 60px;
+    height: 26px;
+    font-size: 14px;
+    background: #0f7ac8;
+    text-align: center;
+    line-height: 26px;
+  }
+
+  .xz_box {
+    padding-bottom: 0;
+  }
+}
+</style>