Преглед изворни кода

底部工具栏开发以及页面优化。

DESKTOP-6LTVLN7\Liumouren пре 2 година
родитељ
комит
bf9beb2c41

+ 0 - 0
src/assets/image/bottomMenuIcon/报告输出-a.png → public/static/images/bottomMenuIcon/bgsc-a.png


+ 0 - 0
src/assets/image/bottomMenuIcon/报告输出.png → public/static/images/bottomMenuIcon/bgsc.png


+ 0 - 0
src/assets/image/bottomMenuIcon/标记疑点-a.png → public/static/images/bottomMenuIcon/bjyd-a.png


+ 0 - 0
src/assets/image/bottomMenuIcon/标记疑点.png → public/static/images/bottomMenuIcon/bjyd.png


+ 0 - 0
src/assets/image/bottomMenuIcon/发到手机-a.png → public/static/images/bottomMenuIcon/fdsj-a.png


+ 0 - 0
src/assets/image/bottomMenuIcon/发到手机.png → public/static/images/bottomMenuIcon/fdsj.png


+ 0 - 0
src/assets/image/bottomMenuIcon/卷帘对比-a.png → public/static/images/bottomMenuIcon/jldb-a.png


+ 0 - 0
src/assets/image/bottomMenuIcon/卷帘对比.png → public/static/images/bottomMenuIcon/jldb.png


+ 0 - 0
src/assets/image/bottomMenuIcon/上传数据-a.png → public/static/images/bottomMenuIcon/scsj-a.png


+ 0 - 0
src/assets/image/bottomMenuIcon/上传数据.png → public/static/images/bottomMenuIcon/scsj.png


+ 0 - 0
src/assets/image/bottomMenuIcon/申请任务-a.png → public/static/images/bottomMenuIcon/sqrw-a.png


+ 0 - 0
src/assets/image/bottomMenuIcon/申请任务.png → public/static/images/bottomMenuIcon/sqrw.png


+ 0 - 0
src/assets/image/bottomMenuIcon/同屏对比-a.png → public/static/images/bottomMenuIcon/tpdb-a.png


+ 0 - 0
src/assets/image/bottomMenuIcon/同屏对比.png → public/static/images/bottomMenuIcon/tpdb.png


+ 0 - 0
src/assets/image/bottomMenuIcon/我的任务-a.png → public/static/images/bottomMenuIcon/wdrw-a.png


+ 0 - 0
src/assets/image/bottomMenuIcon/我的任务.png → public/static/images/bottomMenuIcon/wdrw.png


+ 0 - 0
src/assets/image/bottomMenuIcon/疑点审计-a.png → public/static/images/bottomMenuIcon/ydsj-a.png


+ 0 - 0
src/assets/image/bottomMenuIcon/疑点审计.png → public/static/images/bottomMenuIcon/ydsj.png


+ 0 - 0
src/assets/image/bottomMenuIcon/自定义模型-a.png → public/static/images/bottomMenuIcon/zdymx-a.png


+ 0 - 0
src/assets/image/bottomMenuIcon/自定义模型.png → public/static/images/bottomMenuIcon/zdymx.png


+ 272 - 0
src/components/common/BottomMenuSvg.vue

@@ -0,0 +1,272 @@
+<template>
+  <div class="test">
+    <svg id="svgBox" @click="changeShowBottomMenusStatus()" width="300" height="180" viewBox="0 0 410 314" version="1.1" xmlns="http://www.w3.org/2000/svg">
+      <!-- 内阴影定义 -->
+      <filter id="innershadow" x="0" y="0">
+        <feComponentTransfer in="SourceAlpha">
+          <feFuncA type="table" tableValues="1 0" />
+        </feComponentTransfer>
+        <feGaussianBlur stdDeviation="5" />
+        <feOffset dx="0" dy="0" result="offsetblur" />
+        <feFlood floodColor="#000000" floodOpacity="1" result="color" />
+        <feComposite in2="offsetblur" operator="in" />
+        <feComposite in2="SourceAlpha" operator="in" />
+        <feMerge>
+          <feMergeNode in="SourceGraphic" />
+          <feMergeNode />
+        </feMerge>
+      </filter>
+      <!-- 正常边框渐变定义 -->
+      <defs>
+        <!-- 内容透明定义 -->
+        <linearGradient id="grad1" x1="0%" y1="100%" x2="100%" y2="100%">
+          <stop offset="0%" style="stop-color: #27ffff; stop-opacity: 0" />
+          <stop offset="100%" style="stop-color: #27ffff; stop-opacity: 0.5" />
+        </linearGradient>
+        <!-- 内容渐变定义 -->
+        <linearGradient id="grad2" x1="0%" y1="0%" x2="0%" y2="100%">
+          <stop offset="0%" style="stop-color: #27cdff; stop-opacity: 0" />
+          <stop offset="100%" style="stop-color: #27cdff; stop-opacity: 0.5" />
+        </linearGradient>
+        <!-- 第二层中部定义 -->
+        <linearGradient id="grad2-2" x1="0%" y1="0%" x2="0%" y2="100%">
+          <stop offset="0%" style="stop-color: #27cdffaa; stop-opacity: 1" />
+          <stop offset="100%" style="stop-color: #27cdffaa; stop-opacity: 1" />
+        </linearGradient>
+        <!-- 左深右浅 -->
+        <linearGradient id="grad2-3" x1="100%" y1="0%" x2="0%" y2="100%">
+          <stop offset="0%" style="stop-color: #74ffff; stop-opacity: 1" />
+          <stop offset="100%" style="stop-color: #0037ff; stop-opacity: 1" />
+        </linearGradient>
+        <linearGradient id="grad2-4" x1="100%" y1="100%" x2="100%" y2="0%">
+          <stop offset="0%" style="stop-color: #27ffffaa; stop-opacity: 1" />
+          <stop offset="100%" style="stop-color: #27cdff; stop-opacity: 0" />
+        </linearGradient>
+        <linearGradient id="grad2-5" x1="100%" y1="100%" x2="100%" y2="0%">
+          <stop offset="0%" style="stop-color: #27ffff; stop-opacity: 1" />
+          <stop offset="100%" style="stop-color: #27cdff; stop-opacity: 0" />
+        </linearGradient>
+        <!-- 浅色圆环 -->
+        <linearGradient id="grad3" x1="0%" y1="0%" x2="0%" y2="100%">
+          <stop offset="0%" style="stop-color: #74ffff64; stop-opacity: 0.5" />
+          <stop offset="100%" style="stop-color: #74ffff; stop-opacity: 1" />
+        </linearGradient>
+        <!-- 深色圆环 -->
+        <linearGradient id="grad4" x1="0%" y1="0%" x2="0%" y2="100%">
+          <stop offset="0%" style="stop-color: #00aaff64; stop-opacity: 0.1" />
+          <stop offset="100%" style="stop-color: #00244d; stop-opacity: 1" />
+        </linearGradient>
+        <!-- 圆盘面渐变颜色 -->
+        <linearGradient id="shipGrad1" x1="100%" y1="0%" x2="0%" y2="0%">
+          <stop offset="0%" style="stop-color: #5dd8d8; stop-opacity: 1" />
+          <stop offset="100%" style="stop-color: #0037ff; stop-opacity: 1" />
+        </linearGradient>
+        <!-- ship内环背景渐变定义 -->
+        <radialGradient id="coludFill" cx="50%" cy="50%" r="50%" fx="50%" fy="50%">
+          <stop offset="80%" style="stop-color: #00000000; stop-opacity: 0" />
+          <stop offset="100%" style="stop-color: #27cdff; stop-opacity: 1" />
+        </radialGradient>
+      </defs>
+      <symbol>
+        <g id="Upath1">
+          <path d="M 0 0 L 100 0 L 100 50 Q 100,60 50,62 Q 0,60 0,50 L 0 50 z " fill="url(#grad2-4)" />
+          <path d="M 38 25 L 62 25 L 62 50 Q 62,53 50,53 Q 38,53 38,50 L 38 50 z " fill="url(#grad2-5)" />
+          <path class="svgPath index1" d="M 5 0 L 7 0 L 7 10 L 5 10 z" fill="url(#grad2-5)" />
+          <path class="svgPath index2" d="M 15 0 L 17 0 L 17 10 L 15 10 z" fill="url(#grad2-5)" />
+          <path class="svgPath index3" d="M 25 0 L 27 0 L 27 10 L 25 10 z" fill="url(#grad2-5)" />
+          <path class="svgPath index4" d="M 35 0 L 37 0 L 37 10 L 35 10 z" fill="url(#grad2-5)" />
+          <path class="svgPath index5" d="M 45 0 L 47 0 L 47 10 L 45 10 z" fill="url(#grad2-5)" />
+          <path class="svgPath index6" d="M 55 0 L 57 0 L 57 10 L 55 10 z" fill="url(#grad2-5)" />
+          <path class="svgPath index7" d="M 65 0 L 67 0 L 67 10 L 65 10 z" fill="url(#grad2-5)" />
+          <path class="svgPath index8" d="M 40 10 L 42 10 L 42 15 L 40 15 z" fill="url(#grad2-5)" />
+          <path class="svgPath index9" d="M 50 10 L 52 10 L 52 15 L 50 15 z" fill="url(#grad2-5)" />
+          <path class="svgPath index10" d="M 60 10 L 62 10 L 62 15 L 60 15 z" fill="url(#grad2-5)" />
+          <path class="svgPath index11" d="M 75 0 L 77 0 L 77 10 L 75 10 z" fill="url(#grad2-5)" />
+          <path class="svgPath index12" d="M 85 0 L 87 0 L 87 10 L 85 10 z" fill="url(#grad2-5)" />
+          <path class="svgPath index13" d="M 95 0 L 97 0 L 97 10 L 95 10 z" fill="url(#grad2-5)" />
+        </g>
+      </symbol>
+      <!-- 底部圆饼外环 -->
+      <ellipse cx="210" cy="268" rx="180" ry="45" stroke="url(#grad3)" fill="url(#grad1)" style="stroke-width: 4" />
+      <!-- 底部圆饼中环 -->
+      <ellipse
+        class="strokeDashoffset2"
+        cx="210"
+        cy="268"
+        rx="157"
+        ry="40"
+        stroke="url(#grad3)"
+        stroke-dasharray="50,5"
+        style="fill: #00000000; stroke-width: 2"
+      />
+      <!-- 底部圆饼内环 -->
+      <ellipse
+        class="strokeDashoffset2"
+        cx="210"
+        cy="258"
+        rx="117"
+        ry="30"
+        stroke="url(#grad3)"
+        stroke-dasharray="5,5"
+        style="fill: #00000000; stroke-width: 2"
+      />
+      <!-- 第二层底部台座 -->
+      <ellipse cx="210" cy="250" rx="90.6" ry="22.4" stroke="url(#grad3)" style="fill: #00244d; stroke-width: 10" />
+      <!-- 第二层底部外环 -->
+      <ellipse cx="210" cy="248" rx="93.6" ry="23.4" stroke="url(#grad4)" fill="url(#shipGrad1)" style="stroke-width: 2" />
+      <!-- 第二层底部中环 -->
+      <ellipse
+        class="strokeDashoffset3"
+        cx="210"
+        cy="247"
+        rx="80"
+        ry="20"
+        stroke="url(#grad3)"
+        style="fill: #00000000; stroke-width: 2"
+      />
+      <!-- 第二层底部中内环 -->
+      <ellipse
+        class="strokeDashoffset2"
+        cx="210"
+        cy="247"
+        rx="75"
+        ry="18"
+        stroke="url(#grad3)"
+        style="fill: #00000000; stroke-width: 1"
+      />
+      <!-- 第二层底部内环 -->
+      <ellipse cx="210" cy="246" rx="45" ry="10" stroke="url(#grad3)" fill="url(#grad2-2)" style="stroke-width: 0" />
+      <!-- 第二层内环外圆饼 -->
+      <ellipse cx="210" cy="246" rx="50" ry="12" stroke="url(#grad3)" fill="url(#grad2-2)" style="stroke-width: 0" />
+      <!-- 第二层内环内圆饼 -->
+      <ellipse cx="210" cy="246" rx="28" ry="7" stroke="url(#grad3)" fill="url(#grad2-3)" style="stroke-width: 0" />
+      <ellipse cx="210" cy="246" rx="25" ry="6" stroke="url(#grad3)" fill="url(#shipGrad1)" style="stroke-width: 0" />
+      <ellipse cx="210" cy="246" rx="15" ry="4" stroke="url(#grad3)" fill="url(#grad2-3)" style="stroke-width: 0" />
+      <ellipse cx="210" cy="246" rx="12" ry="3" stroke="url(#grad3)" fill="#74ffff" style="stroke-width: 0" />
+      <!-- 方形聚光效果 -->
+      <use x="160" y="196" width="100" height="50" xlink:href="#Upath1" />
+    </svg>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "BottomMenuSvg",
+  components: {},
+  data() {
+    return {};
+  },
+  mounted() {},
+  /**
+   * data.type: 布局方式【lr:左右布局;other:上下布局】,默认为lr(非必填)
+   * data.title: 标题(必填)
+   * data.value: 值(必填)
+   * data.unit: 单位
+   */
+  props: ["data"],
+  methods: {
+    changeShowBottomMenusStatus(){
+        this.$emit('changeShowBottomMenusStatus');
+    }
+  },
+  watch: {}
+};
+</script>
+
+<style>
+.test {
+  display: flex;
+  position: relative;
+  justify-content: center;
+}
+#svgBox {
+  cursor: pointer;
+  position: absolute;
+  bottom: 0px;
+}
+svg .strokeDashoffset2 {
+  stroke-dasharray: 10;
+  stroke-dashoffset: 0;
+  animation: dash 5s linear infinite;
+}
+svg .strokeDashoffset3 {
+  stroke-dasharray: 8;
+  stroke-dashoffset: 0;
+  animation: dash2 3s linear infinite;
+}
+svg .svgPath {
+  transform: rotate(-90deg);
+  offset-path: path("M0 0 L0 40");
+  offset-distance: 0%;
+  opacity: 0;
+}
+svg .index1 {
+  animation: ball 2.2s linear 0s infinite;
+}
+svg .index2 {
+  animation: ball 0.7s linear 0.3s infinite;
+}
+svg .index3 {
+  animation: ball 1.8s linear 0.9s infinite;
+}
+svg .index4 {
+  animation: ball 2.2s linear 1.1s infinite;
+}
+svg .index5 {
+  animation: ball 2.5s linear 1.7s infinite;
+}
+svg .index6 {
+  animation: ball 2s linear 1.9s infinite;
+}
+svg .index7 {
+  animation: ball 0.4s linear 0.1s infinite;
+}
+svg .index8 {
+  animation: ball 0.5s linear 0.2s infinite;
+}
+svg .index9 {
+  animation: ball 1.4s linear 0.7s infinite;
+}
+svg .index10 {
+  animation: ball 1.6s linear 0.8s infinite;
+}
+svg .index11 {
+  animation: ball 1s linear 0.5s infinite;
+}
+svg .index12 {
+  animation: ball 1.5s linear 0.7s infinite;
+}
+svg .index13 {
+  animation: ball 2s linear 1.3s infinite;
+}
+@keyframes dash {
+  from {
+    stroke-dashoffset: 100;
+  }
+  to {
+    stroke-dashoffset: 0;
+  }
+}
+@keyframes dash2 {
+  from {
+    stroke-dashoffset: 0;
+  }
+  to {
+    stroke-dashoffset: 100;
+  }
+}
+@keyframes ball {
+  0% {
+    offset-distance: 0%;
+    opacity: 0;
+  }
+  50% {
+    offset-distance: 50%;
+    opacity: 1;
+  }
+  100% {
+    offset-distance: 100%;
+    opacity: 0;
+  }
+}
+</style>

+ 261 - 0
src/components/common/BottomMenus.vue

@@ -0,0 +1,261 @@
+<template>
+  <div id="bottomMenus">
+    <BottomMenuSvg id="svgBox" @changeShowBottomMenusStatus="changeShowBottomMenusStatus()" />
+    <div
+      id="menusBox"
+      :style="{ width: showBottomMenusStatus ? '981px' : '0px', height: showBottomMenusStatus ? '200px' : '0px' ,border: showBottomMenusStatus ? '1px solid #00aaff' : 'none'}"
+    >
+      <div
+        class="bottomMenus_box"
+        v-for="(item, index) in menus"
+        :key="index"
+        :style="{ width: item.width ? item.width : 'auto' }"
+      >
+        <div class="bottomMenus_box_title">{{ item.title }}</div>
+        <div class="bottomMenus_box_main">
+          <div
+            class="colBtuMenu"
+            @click="changeBottomMenu(item.index, subItem.index)"
+            v-for="(subItem, subIndex) in item.submenu"
+            :key="subIndex"
+          >
+            <div :class="ifMenuIndex(item.index, subItem.index) ? 'colBtuMenuShadow' : ''"></div>
+            <el-image
+              class="BtuMenu"
+              v-show="ifMenuIndex(item.index, subItem.index)"
+              :src="returnBgImage(subItem.bgImage + '-a')"
+            ></el-image>
+            <el-image
+              class="BtuMenu"
+              v-show="!ifMenuIndex(item.index, subItem.index)"
+              :src="returnBgImage(subItem.bgImage)"
+            ></el-image>
+            <div class="BtuMenu_title" :style="{ color: ifMenuIndex(item.index, subItem.index) ? '#00f5ff' : '#FFFFFF' }">
+              {{ subItem.title }}
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import BottomMenuSvg from "./BottomMenuSvg.vue";
+export default {
+  name: "BottomMenus",
+  components: { BottomMenuSvg },
+  data() {
+    return {
+      showBottomMenusStatus: false,
+      menus: [
+        {
+          index: 0,
+          width: "164px",
+          title: "任务申请",
+          submenu: [
+            { index: 0, title: "申请任务", bgImage: "sqrw" },
+            { index: 1, title: "我的任务", bgImage: "wdrw" }
+          ]
+        },
+        {
+          index: 1,
+          width: "509px",
+          title: "疑点分析",
+          submenu: [
+            { index: 0, title: "疑点审计", bgImage: "ydsj" },
+            { index: 1, title: "标记疑点", bgImage: "bjyd" },
+            { index: 2, title: "同屏对比", bgImage: "tpdb" },
+            { index: 3, title: "卷帘对比", bgImage: "jldb" },
+            { index: 4, title: "上传数据", bgImage: "scsj" },
+            { index: 5, title: "自定义模型", bgImage: "zdymx" }
+          ]
+        },
+        {
+          index: 2,
+          width: "94px",
+          title: "疑点报告",
+          submenu: [{ index: 0, title: "报告输出", bgImage: "bgsc" }]
+        },
+        {
+          index: 3,
+          width: "94px",
+          title: "现场勘查",
+          submenu: [{ index: 0, title: "发到手机", bgImage: "fdsj" }]
+        }
+      ]
+    };
+  },
+  mounted() {},
+  /**
+   * title: 标题(必填)
+   */
+  props: [],
+  methods: {
+    ifMenuIndex(index, subIndex) {
+      return this.$store.state.bottomMenuIndexs.index == index && this.$store.state.bottomMenuIndexs.subIndex == subIndex;
+    },
+    changeBottomMenu(index, subIndex) {
+      this.$store.commit("changeBottomMenu", { index: index, subIndex: subIndex });
+    },
+    returnBgImage(bgImage, index, subIndex) {
+      if (this.$store.state.bottomMenuIndexs.index == index && this.$store.state.bottomMenuIndexs.subIndex == subIndex) {
+        return "/static/images/bottomMenuIcon/" + bgImage + "-a.png";
+      } else {
+        return "/static/images/bottomMenuIcon/" + bgImage + ".png";
+      }
+    },
+    changeShowBottomMenusStatus() {
+      this.showBottomMenusStatus = !this.showBottomMenusStatus;
+    }
+  },
+  watch: {}
+};
+</script>
+
+<style lang="less" scoped>
+@borderColor: #00aaff;
+@topTitleMinLeft: transparent;
+// 底部菜单
+#bottomMenus {
+  position: absolute;
+  display: flex;
+  flex-direction: column-reverse;
+  align-content: center;
+  align-items: center;
+  width: 100%;
+  height: 100%;
+  -moz-user-select: none;
+  -webkit-user-select: none;
+  -ms-user-select: none;
+  -khtml-user-select: none;
+  user-select: none;
+  overflow: hidden;
+  // svgBox
+  #svgBox {
+    width: 220px;
+    height: 70px;
+    overflow: hidden;
+    z-index: 100000;
+  }
+}
+// menusBox
+#menusBox {
+  background-color: rgba(0, 47, 86, 0.6);
+  z-index: 99999;
+  border: 1px solid #00aaff;
+  position: absolute;
+  bottom: 60px;
+  display: flex;
+  flex-wrap: nowrap;
+  align-content: center;
+  justify-content: space-evenly;
+  align-items: center;
+  transition: width 0.2s, height 0.5s;
+  &::before {
+    content: "";
+    position: absolute;
+    bottom: -30px;
+    width: 100%;
+    height: 30px;
+    background-image: linear-gradient(to top, #00aaff, #00aaff32);
+    clip-path: polygon(0 0, 100% 0, 50% 100%, 0 0);
+  }
+}
+.bottomMenus {
+  &_box {
+    overflow: hidden;
+    height: 155px;
+    position: relative;
+    background: linear-gradient(to left, #00aaff, #00aaff) left top no-repeat,
+      linear-gradient(to bottom, #00aaff, #00aaff) left top no-repeat,
+      linear-gradient(to left, #00aaff, #00aaff) right top no-repeat,
+      linear-gradient(to bottom, #00aaff, #00aaff) right top no-repeat,
+      linear-gradient(to left, #00aaff, #00aaff) left bottom no-repeat,
+      linear-gradient(to bottom, #00aaff, #00aaff) left bottom no-repeat,
+      linear-gradient(to left, #00aaff, #00aaff) right bottom no-repeat,
+      linear-gradient(to left, #00aaff, #00aaff) right bottom no-repeat;
+    background-size: 3px 21px, 21px 3px, 3px 21px, 21px 3px;
+    display: flex;
+    flex-wrap: nowrap;
+    align-content: center;
+    justify-content: space-evenly;
+    align-items: center;
+    flex-direction: column;
+    &::before {
+      content: "";
+      position: absolute;
+      width: 100%;
+      height: 100%;
+      background-color: rgba(0, 54, 179, 0.3);
+      z-index: 9999;
+    }
+    &_title {
+      width: 100%;
+      height: 40px;
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      background-image: linear-gradient(to left, @topTitleMinLeft, @borderColor, @topTitleMinLeft);
+      font-size: 16px;
+      font-family: pingfangSC;
+      font-weight: 300;
+      color: #FFFFFF;
+      line-height: 60px;
+      z-index: 99999;
+    }
+    &_main {
+      width: 100%;
+      display: flex;
+      flex-wrap: nowrap;
+      align-content: center;
+      justify-content: space-evenly;
+      align-items: center;
+      .colBtuMenu {
+        display: flex;
+        flex-wrap: nowrap;
+        align-content: center;
+        flex-direction: column;
+        justify-content: space-evenly;
+        align-items: center;
+        position: relative;
+        cursor: pointer;
+        z-index: 99999;
+        &:hover {
+          &::before {
+            content: "";
+            position: absolute;
+            width: 110%;
+            height: 110%;
+            border-radius: 10px;
+            z-index: 999;
+            box-shadow: 0px 0px 5px 1px #00aaff;
+          }
+        }
+        .colBtuMenuShadow {
+          content: "";
+          position: absolute;
+          width: 110%;
+          height: 110%;
+          border-radius: 10px;
+          z-index: 999;
+          box-shadow: 0px 0px 5px 3px #00aaff;
+        }
+        .BtuMenu {
+          width: 50px;
+          height: 50px;
+          background-repeat: no-repeat;
+          background-size: 100% 100%;
+        }
+        & > .BtuMenu_title {
+          font-size: 14px;
+          font-family: pingfangSC;
+          font-weight: bold;
+          color: #ffffff;
+          line-height: 22px;
+        }
+      }
+    }
+  }
+}
+</style>

+ 12 - 11
src/store/index.js

@@ -2,30 +2,31 @@ import Vue from 'vue'
 import Vuex from 'vuex'
 
 Vue.use(Vuex)
-
+const menus = false;
 export default new Vuex.Store({
   state: {
     navSelect: { index: "1", name: "首页", subIndex: "" },
-    leftMenuIndex: -1
-  },
-  getters: {
-    getNavSelect(state){
-      return state.navSelect;
-    },
-    getLeftMenuIndex(state){
-      return state.leftMenuIndex;
-    }
+    leftMenuIndex: -1,
+    bottomMenuIndexs: {index: -1,subIndex: -1}
   },
+  getters: {},
   mutations: {
     changeNavSelect(state,navSelect){
       state.navSelect = navSelect;
     },
     changeLeftMenuIndex(state,leftMenuIndex){
-      if(state.leftMenuIndex == leftMenuIndex){
+      if(state.leftMenuIndex == leftMenuIndex && menus){
         state.leftMenuIndex = -1;
       }else{
         state.leftMenuIndex = leftMenuIndex;
       }
+    },
+    changeBottomMenu(state,bottomMenuIndex){
+      if(bottomMenuIndex.index == state.bottomMenuIndexs.index && bottomMenuIndex.subIndex == state.bottomMenuIndexs.subIndex && menus){
+        state.bottomMenuIndexs = {index: -1,subIndex: -1}
+      }else{
+        state.bottomMenuIndexs = bottomMenuIndex
+      }
     }
   },
   actions: {

+ 60 - 116
src/views/HomeView.vue

@@ -19,7 +19,7 @@
           type: 'card',
           title: '历年频发问题Top10',
           titleWidth: 85,
-          boxWidth: '400',
+          boxWidth: '400'
         }"
       >
         <template slot="top"><TopCard :dataSize="10" /></template>
@@ -29,11 +29,7 @@
           <!-- <h2>浦东新区</h2> -->
           <div class="droplet-box-title">浦东新区</div>
           <div class="droplet-box">
-            <div
-              class="droplet-box-item"
-              v-for="item in townCollection"
-              :key="item.name"
-            >
+            <div class="droplet-box-item" v-for="item in townCollection" :key="item.name">
               <div class="problem-num">{{ item.num }} 个</div>
               <div class="problem-img"></div>
               <div class="problem-title">{{ item.name }}</div>
@@ -56,10 +52,7 @@
         <div class="selected-icon" @click="showLayers"></div>
         <div class="layers-control-icon" @click="selectLayers"></div>
         <div class="searchbox">
-          <el-input
-            placeholder="请输入地址、地块名称等"
-            v-model="analysis.searchInput"
-          ></el-input>
+          <el-input placeholder="请输入地址、地块名称等" v-model="analysis.searchInput"></el-input>
         </div>
       </div>
       <div id="ComprehensiveContainer-left">
@@ -112,9 +105,8 @@
       <MenuCard :menuData="menus.left[6]"> </MenuCard>
     </div>
     <!-- 底部菜单 2 -- 疑点筛查 -->
-    <div id="bottomMenus" v-if="$ifMenu('2', '')">
-      <div>我是底部菜单svg</div>
-      <div>我是底部菜单</div>
+    <div id="leftMenusB" v-if="$ifMenu('2', '')">
+      <BottomMenus />
     </div>
     <!-- 中部菜单列 -->
     <div id="mainMenus" v-if="$ifMenu('1', '')">
@@ -158,21 +150,14 @@
           type: 'chart',
           title: '图例',
           boxWidth: '150',
-          boxHeight: '180',
+          boxHeight: '180'
         }"
         ><div class="legend-container">
           <div class="left-container">
-            <div
-              class="legend-icon"
-              v-for="(item, index) in legendData"
-              :key="index"
-              :style="{ background: item }"
-            ></div>
+            <div class="legend-icon" v-for="(item, index) in legendData" :key="index" :style="{ background: item }"></div>
           </div>
           <div class="right-container">
-            <div class="lengend-title" v-for="item in buttonData" :key="item">
-              {{ item }} 类
-            </div>
+            <div class="lengend-title" v-for="item in buttonData" :key="item">{{ item }} 类</div>
           </div>
         </div>
       </MenuCard>
@@ -185,8 +170,7 @@
             <TagCard :data="tagCardData3"></TagCard>
           </div>
         </template>
-        <template slot="bottom">
-          <ChartCard :title="'近三年林地面积变化'" /> </template
+        <template slot="bottom"> <ChartCard :title="'近三年林地面积变化'" /> </template
       ></MenuCard>
       <MenuCard :menuData="menus.right[1]" v-if="$ifMenu('1', '')">
         <template slot="top">
@@ -196,8 +180,7 @@
             <TagCard :data="tagCardData"></TagCard>
           </div>
         </template>
-        <template slot="bottom">
-          <ChartCard :title="'近三年审计项目变化'" /> </template
+        <template slot="bottom"> <ChartCard :title="'近三年审计项目变化'" /> </template
       ></MenuCard>
       <MenuCard :menuData="menus.right[2]" v-if="$ifMenu('1', '')">
         <template slot="top">
@@ -210,8 +193,7 @@
             <TagCard :data="tagCardData3"></TagCard>
           </div>
         </template>
-        <template slot="bottom">
-          <ChartCard :title="'近三年土地类问题变化'" /> </template
+        <template slot="bottom"> <ChartCard :title="'近三年土地类问题变化'" /> </template
       ></MenuCard>
       <MenuCard :menuData="menus.right[4]" v-if="$ifMenu('2', '1')">
         <template slot="top">
@@ -227,18 +209,13 @@ import Header from "@/components/layout/Header.vue";
 import MenuCard from "@/components/layout/MenuCard";
 import NewSelect from "@/components/common/NewSelect.vue";
 import BarChart from "@/components/chart/BarChart.vue";
-import {
-  street,
-  streetLocation,
-  soilData,
-  waterData,
-  forestryData,
-} from "@/config/common";
+import { street, streetLocation, soilData, waterData, forestryData } from "@/config/common";
 import publicFun from "@/utils/publicFunction.js";
 import TagCard from "@/components/common/TagCard";
 import ChartCard from "@/components/common/ChartCard.vue";
 import TagTableCard from "@/components/common/TagTableCard";
 import TopCard from "@/components/common/TopCard";
+import BottomMenus from "@/components/common/BottomMenus";
 // 镇域专题组件
 export default {
   name: "HomeView",
@@ -252,6 +229,7 @@ export default {
     ChartCard,
     TagTableCard,
     TopCard,
+    BottomMenus
   },
   data() {
     return {
@@ -259,19 +237,19 @@ export default {
         type: "tb",
         title: "土地资源",
         value: 100,
-        unit: "公顷",
+        unit: "公顷"
       },
       tagCardData2: {
         type: "tb",
         title: "土地资源面积",
         value: 172,
-        unit: "公顷",
+        unit: "公顷"
       },
       tagCardData3: {
         type: "lr",
         title: "林地面积",
         value: 654,
-        unit: "公顷",
+        unit: "公顷"
       },
       testTitle: "土地资源",
       activeIndex: 1,
@@ -286,7 +264,7 @@ export default {
             title: "基本农田被违规占用",
             titleWidth: 81,
             boxHeight: 236,
-            imageUrl: "https://s1.ax1x.com/2022/11/16/zZY1cq.png",
+            imageUrl: "/static/images/2.png"
           },
           {
             type: "imageMenu",
@@ -294,7 +272,7 @@ export default {
             title: "基本农田种林",
             titleWidth: 81,
             boxHeight: 236,
-            imageUrl: "https://s1.ax1x.com/2022/11/16/zZY3j0.png",
+            imageUrl: "/static/images/3.png"
           },
           {
             type: "imageMenu",
@@ -302,7 +280,7 @@ export default {
             title: "基本农田抛荒",
             titleWidth: 81,
             boxHeight: 236,
-            imageUrl: "https://s1.ax1x.com/2022/11/16/zZYl3n.png",
+            imageUrl: "/static/images/1.png"
           },
           {
             type: "imageMenu",
@@ -310,8 +288,8 @@ export default {
             title: "一般耕地被违规占用",
             titleWidth: 81,
             boxHeight: 236,
-            imageUrl: "https://s1.ax1x.com/2022/11/16/zZYQ9s.png",
-          },
+            imageUrl: "/static/images/4.png"
+          }
         ],
         main: [
           {
@@ -319,16 +297,16 @@ export default {
             title: "浦东新区自然资源分布TOP10",
             boxWidth: "360",
             boxHeight: "370",
-            boxBackground: "rgba(0,39,77,0.6)",
-          },
+            boxBackground: "rgba(0,39,77,0.6)"
+          }
         ],
         right: [
           { type: "card", title: "资金投入情况", titleWidth: 64 },
           { type: "card", title: "资源环境项目", titleWidth: 64 },
           { type: "card", title: "历年频发问题TOP5", titleWidth: 81 },
           { type: "card", title: "土地类问题", titleWidth: 60 },
-          { type: "card", title: "土地类问题TOP5", titleWidth: 81 },
-        ],
+          { type: "card", title: "土地类问题TOP5", titleWidth: 81 }
+        ]
       },
       // 首页饼图相关
       buttonData: ["A", "B", "C"],
@@ -338,19 +316,19 @@ export default {
         soil: [],
         water: [],
         forestry: [],
-        categoryData:[]
+        categoryData: []
       },
       BData: {
         soil: [],
         water: [],
         forestry: [],
-        categoryData:[]
+        categoryData: []
       },
       CData: {
         soil: [],
         water: [],
         forestry: [],
-        categoryData:[]
+        categoryData: []
       },
       streetSelectVal: "全部街道",
       streetOptions: [],
@@ -359,12 +337,12 @@ export default {
         { name: "土地资源问题", num: 67 },
         { name: "水资源问题", num: 37 },
         { name: "林地资源问题", num: 60 },
-        { name: "生态资源问题", num: 55 },
+        { name: "生态资源问题", num: 55 }
       ],
       // 综合分析
       analysis: {
-        searchInput: "",
-      },
+        searchInput: ""
+      }
     };
   },
   methods: {
@@ -379,19 +357,19 @@ export default {
           this.soil = this.AData.soil;
           this.water = this.AData.water;
           this.forestry = this.AData.forestry;
-          this.categoryData = this.AData.categoryData
+          this.categoryData = this.AData.categoryData;
           break;
         case "B":
           this.soil = this.BData.soil;
           this.water = this.BData.water;
           this.forestry = this.BData.forestry;
-          this.categoryData = this.BData.categoryData
+          this.categoryData = this.BData.categoryData;
           break;
         case "C":
           this.soil = this.CData.soil;
           this.water = this.CData.water;
           this.forestry = this.CData.forestry;
-          this.categoryData = this.CData.categoryData
+          this.categoryData = this.CData.categoryData;
           break;
       }
     },
@@ -415,7 +393,7 @@ export default {
     // 综合分析 - 折叠
     collapsePanelEvent() {},
     // 综合分析 - 关闭面板
-    closeEvent() {},
+    closeEvent() {}
   },
   created() {
     // 目录
@@ -430,19 +408,10 @@ export default {
     let CDataArr = [];
     // 街道排序
     for (let i in category) {
-      let ADataSum =
-        soilData[category[i]].A +
-        waterData[category[i]].A +
-        forestryData[category[i]].A;
-      let BDataSum =
-        soilData[category[i]].B +
-        waterData[category[i]].B +
-        forestryData[category[i]].B;
+      let ADataSum = soilData[category[i]].A + waterData[category[i]].A + forestryData[category[i]].A;
+      let BDataSum = soilData[category[i]].B + waterData[category[i]].B + forestryData[category[i]].B;
 
-      let CDataSum =
-        soilData[category[i]].C +
-        waterData[category[i]].C +
-        forestryData[category[i]].C;
+      let CDataSum = soilData[category[i]].C + waterData[category[i]].C + forestryData[category[i]].C;
       ADataArr.push({ name: category[i], sum: ADataSum });
       BDataArr.push({ name: category[i], sum: BDataSum });
       CDataArr.push({ name: category[i], sum: CDataSum });
@@ -453,40 +422,40 @@ export default {
     CDataArr.sort(publicFun.compare("sum"));
 
     // 按A,B,C分出各自资源的排序数组
-    ADataArr.forEach((item) => {
+    ADataArr.forEach(item => {
       this.AData.soil.push(soilData[item.name].A);
       this.AData.water.push(waterData[item.name].A);
       this.AData.forestry.push(forestryData[item.name].A);
-      this.AData.categoryData.push(item.name)
+      this.AData.categoryData.push(item.name);
     });
 
-    BDataArr.forEach((item) => {
+    BDataArr.forEach(item => {
       this.BData.soil.push(soilData[item.name].B);
       this.BData.water.push(waterData[item.name].B);
       this.BData.forestry.push(forestryData[item.name].B);
-      this.BData.categoryData.push(item.name)
+      this.BData.categoryData.push(item.name);
     });
 
-    CDataArr.forEach((item) => {
+    CDataArr.forEach(item => {
       this.CData.soil.push(soilData[item.name].C);
       this.CData.water.push(waterData[item.name].C);
       this.CData.forestry.push(forestryData[item.name].C);
-      this.CData.categoryData.push(item.name)
+      this.CData.categoryData.push(item.name);
     });
 
     this.soil = this.AData.soil;
     this.water = this.AData.water;
     this.forestry = this.AData.forestry;
-    this.categoryData = this.AData.categoryData
+    this.categoryData = this.AData.categoryData;
 
     // 街道下拉框
     for (let key in street) {
       this.streetOptions.push({
         value: street[key],
-        label: street[key],
+        label: street[key]
       });
     }
-  },
+  }
 };
 </script>
 <style lang="less" scoped>
@@ -763,29 +732,12 @@ export default {
     display: none; /* Chrome Safari */
   }
 }
-// 底部菜单
-#bottomMenus {
-  position: absolute;
-  display: flex;
-  flex-direction: column-reverse;
-  align-content: center;
-  align-items: center;
+// 底部菜单定位
+#leftMenusB {
+  position:absolute;
+  top: 0;
   width: 100%;
   height: 100%;
-  // svg
-  &>div:nth-child(1){
-    width: 981px;
-    height: 60px;
-    z-index: 99999;
-  }
-  // menusBox
-  &>div:nth-child(2){
-    width: 981px;
-    height: 200px;
-    background-color: rgba(0,47,86,0.6);
-    z-index: 99999;
-    border: 1px solid #00aaff;
-  }
 }
 #mainMenus {
   position: absolute;
@@ -936,22 +888,14 @@ export default {
     transform: translate(-50%, -50%) rotate(45deg);
     width: 110px;
     height: 100px;
-    background: linear-gradient(to left, @commonBorderColor, @commonBorderColor)
-        left top no-repeat,
-      linear-gradient(to bottom, @commonBorderColor, @commonBorderColor) left
-        top no-repeat,
-      linear-gradient(to left, @commonBorderColor, @commonBorderColor) right top
-        no-repeat,
-      linear-gradient(to bottom, @commonBorderColor, @commonBorderColor) right
-        top no-repeat,
-      linear-gradient(to left, @commonBorderColor, @commonBorderColor) left
-        bottom no-repeat,
-      linear-gradient(to bottom, @commonBorderColor, @commonBorderColor) left
-        bottom no-repeat,
-      linear-gradient(to left, @commonBorderColor, @commonBorderColor) right
-        bottom no-repeat,
-      linear-gradient(to left, @commonBorderColor, @commonBorderColor) right
-        bottom no-repeat;
+    background: linear-gradient(to left, @commonBorderColor, @commonBorderColor) left top no-repeat,
+      linear-gradient(to bottom, @commonBorderColor, @commonBorderColor) left top no-repeat,
+      linear-gradient(to left, @commonBorderColor, @commonBorderColor) right top no-repeat,
+      linear-gradient(to bottom, @commonBorderColor, @commonBorderColor) right top no-repeat,
+      linear-gradient(to left, @commonBorderColor, @commonBorderColor) left bottom no-repeat,
+      linear-gradient(to bottom, @commonBorderColor, @commonBorderColor) left bottom no-repeat,
+      linear-gradient(to left, @commonBorderColor, @commonBorderColor) right bottom no-repeat,
+      linear-gradient(to left, @commonBorderColor, @commonBorderColor) right bottom no-repeat;
     background-size: 6px 6px, 6px 6px, 6px 6px, 6px 6px;
   }
 }