南昌市物联网技防平台-前端
Administrator
2021-05-08 95b7f9beab39677989ca01c184b2991407ff8881
Merge branch 'master' of http://192.168.0.105:10010/r/jfpt-Vue
4 files modified
110 ■■■■ changed files
src/page/crumbsL/crumbsL.vue 44 ●●●●● patch | view | raw | blame | history
src/page/index/top/index.vue 4 ●●● patch | view | raw | blame | history
src/page/index/top/top-menu.vue 60 ●●●● patch | view | raw | blame | history
src/views/supervisoryConsole/data.vue 2 ●●● patch | view | raw | blame | history
src/page/crumbsL/crumbsL.vue
@@ -21,9 +21,10 @@
        :key="item.path"
      >
        <div class="aaa" v-show="breadListLast.length != index + 1">
          <a href="javascript:;" @click="$router.push({ path: item.path })"
            >{{ item.name }} </a
          >&nbsp/&nbsp
          <a href="javascript:;" @click="$router.push({ path: item.path })">{{
            item.name
          }}</a
          >&nbsp;/&nbsp;
        </div>
        <div class="bbb" v-show="breadListLast.length == index + 1">
          <div>{{ item.name }}</div>
@@ -74,6 +75,7 @@
      breadListLast: [],
      sOld: -1,
      isrf: false,
      showDataL: 10,
    };
  },
  methods: {
@@ -82,25 +84,35 @@
      if (this.isrf) {
        //刷新读取localStorage
        this.breadListLast = JSON.parse(localStorage.getItem("crumbsl"));
        this.$store.commit("SET_SHOWDATAL", localStorage.getItem("crumbslname"));
      } else {
        //关闭重写
        var path = this.$route.path,
          p = path.split("/").pop(),
          n = this.$route.name,
          s = this.$store.state.common.liuState;
        var showDataL =
          n == "首页"
            ? false
            : n == "健康码管理"
            ? false
            : n == "包裹管理"
            ? false
            : n == "体温管理"
            ? false
            : n == "研判洞察"
            ? false
            : true;
        this.$store.commit("SET_SHOWDATAL", showDataL);
        // var showDataL =
        //   n == "首页"
        //     ? false
        //     : n == "健康码管理"
        //     ? false
        //     : n == "包裹管理"
        //     ? false
        //     : n == "体温管理"
        //     ? false
        //     : n == "研判洞察"
        //     ? false
        //     : true;
        this.showDataL =
          n == "数据模式"
            ? true
            : n == "地图模式"
            ? true
            : n == "卡片模式"
            ? true
            : false;
        localStorage.setItem("crumbslname", this.showDataL);
        this.$store.commit("SET_SHOWDATAL", this.showDataL);
        // console.log("path:" + p);
        // console.log("name:" + n);
src/page/index/top/index.vue
@@ -12,7 +12,9 @@
      </div>
      <div class="top-bar__title">
        <div class="top-bar__item top-bar__item--show">
          <top-menu ref="topMenu" v-if="showMenu"></top-menu>
          <!-- <top-menu ref="topMenu" v-if="showMenu"></top-menu> -->
          <top-menu ref="topMenu"></top-menu>
        </div>
        <!--去除顶部搜索栏-->
        <!--      <span class="top-bar__item"-->
src/page/index/top/top-menu.vue
@@ -1,19 +1,55 @@
<template>
  <div class="top-menu">
    <el-menu :default-active="activeIndex" mode="horizontal" text-color="#333">
      <el-menu-item index="0" @click.native="openHome(dataItem)" key="0">
      <el-menu-item index="0" @click.native="openHome(homeItem)" key="0">
        <template slot="title">
          <i style="font-size: 20px!important;" :class="dataItem.source" :title="dataItem.name"></i>
          <i
            style="font-size: 20px !important"
            :class="homeItem.source"
            :title="homeItem.name"
          ></i>
        </template>
      </el-menu-item>
      <el-menu-item index="1" @click.native="openHome(mapItem)" key="0">
      <el-menu-item
        index="1"
        @click.native="openHome(dataItem)"
        key="0"
        v-if="showMenu"
      >
        <template slot="title">
          <i style="font-size: 20px!important;"  :class="mapItem.source" :title="mapItem.name"></i>
          <i
            style="font-size: 20px !important"
            :class="dataItem.source"
            :title="dataItem.name"
          ></i>
        </template>
      </el-menu-item>
      <el-menu-item index="2" @click.native="openHome(cardItem)" key="0">
      <el-menu-item
        index="2"
        @click.native="openHome(mapItem)"
        key="0"
        v-if="showMenu"
      >
        <template slot="title">
          <i style="font-size: 20px!important;"  :class="cardItem.source" :title="cardItem.name"></i>
          <i
            style="font-size: 20px !important"
            :class="mapItem.source"
            :title="mapItem.name"
          ></i>
        </template>
      </el-menu-item>
      <el-menu-item
        index="3"
        @click.native="openHome(cardItem)"
        key="0"
        v-if="showMenu"
      >
        <template slot="title">
          <i
            style="font-size: 20px !important"
            :class="cardItem.source"
            :title="cardItem.name"
          ></i>
        </template>
      </el-menu-item>
      <!--      <el-menu-item index="0" @click.native="openHomes(ZHAJ)" key="0">-->
@@ -39,12 +75,17 @@
</template>
<script>
import { mapGetters } from "vuex";
import { mapGetters, mapState } from "vuex";
export default {
  name: "top-menu",
  data() {
    return {
      homeItem: {
        name: "首页",
        source: "el-icon-s-home",
        path: "/dataL/homeL",
      },
      dataItem: {
        name: "数据模式",
        source: "el-icon-s-data",
@@ -73,12 +114,15 @@
    this.getMenu();
  },
  computed: {
    ...mapState({
      showMenu: (state) => state.dataL.showdataL,
    }),
    ...mapGetters(["tagCurrent", "menu"]),
  },
  methods: {
    openHome(itemHome) {
      this.index.openMenu(itemHome);
      this.$store.state.common.liuState ++;
      this.$store.state.common.liuState++;
      this.$router.push({
        path: itemHome.path,
      });
src/views/supervisoryConsole/data.vue
@@ -278,7 +278,7 @@
    var that = this;
    getList().then((res) => {
      res.data.data.forEach((item) => {
        if (item.waringType == "紧急求救") {
        if (item.waringType == "一键求助") {
          that.tableData.push(item);
        }
      });