whychdw
2021-09-08 d875f00dc2103a659704e5671c8692b23f525bf6
提交内容
5个文件已添加
7个文件已修改
554 ■■■■ 已修改文件
src/App.vue 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/js/tools/getPageMenu.js 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/FlexLayout.vue 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/alarmMager/alarm-dispatch.vue 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/alarmMager/components/admin-view.vue 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/alarmMager/components/alarm-bill-type.vue 81 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/alarmMager/components/maintncer-view.vue 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/alarmMager/components/wait-dispatch-alarm.vue 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/home.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/login.vue 236 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/index.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/routes.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/App.vue
@@ -1,5 +1,5 @@
<template>
  <div id="app" class='el-science-blue'>
  <div id="app" class="el-science-blue" :class="getClass">
    <router-view ref="routerView"></router-view>
  </div>
</template>
@@ -7,58 +7,65 @@
<script>
  let link;
  export default {
    name: 'App',
  name: "App",
    data() {
      return {
        fullScreen: false,
      }
    };
    },
    watch: {
      "$store.state.ukey.connect"(isConnet) {
        this.$store.dispatch("ukey/checkIsIn", isConnet);
      },
      "$store.state.ukey.isIn"(isIn) {
        this.$store.dispatch('ukey/changeId', isIn);
      this.$store.dispatch("ukey/changeId", isIn);
      },
      "$store.state.theme.activeSkin"(val) {
        if (val == 'science-blue') {
          link.href = './theme/science-blue.css';
        } else if (val == 'science-green') {
          link.href = './theme/science-green.css';
        } else if (val == 'science-black') {
          link.href = './theme/science-black.css';
      if (val == "science-blue") {
        link.href = "./theme/science-blue.css";
      } else if (val == "science-green") {
        link.href = "./theme/science-green.css";
      } else if (val == "science-black") {
        link.href = "./theme/science-black.css";
        }
        let iframes = this.$refs.routerView.$el.getElementsByTagName("iframe");
        for (let i = 0; i < iframes.length; i++) {
          iframes[i].contentDocument.getElementById("theme").href = link.href;
        }
      }
    },
    },
    mounted() {
      // 启动ukey监控
      this.$store.dispatch('ukey/load', true);
      require('./assets/css/m-elementui.css');
    this.$store.dispatch("ukey/load", true);
    require("./assets/css/m-elementui.css");
      this.appenCss();
      require('./assets/css/basic.css');
      require('./assets/css/common.css');
    require("./assets/css/basic.css");
    require("./assets/css/common.css");
    },
    methods: {
      appenCss() {
        link = document.createElement('link');
        link.type = 'text/css';
      link = document.createElement("link");
      link.type = "text/css";
        link.id = "theme";
        link.rel = 'stylesheet';
        if (this.$store.state.theme.activeSkin == 'science-blue') {
          link.href = './theme/science-blue.css';
        } else if (this.$store.state.theme.activeSkin == 'science-green') {
          link.href = './theme/science-green.css';
        } else if (this.$store.state.theme.activeSkin == 'science-black') {
          link.href = './theme/science-black.css';
      link.rel = "stylesheet";
      if (this.$store.state.theme.activeSkin == "science-blue") {
        link.href = "./theme/science-blue.css";
      } else if (this.$store.state.theme.activeSkin == "science-green") {
        link.href = "./theme/science-green.css";
      } else if (this.$store.state.theme.activeSkin == "science-black") {
        link.href = "./theme/science-black.css";
        }
        document.getElementsByTagName("head")[0].appendChild(link);
      },
    }
  }
  },
  computed: {
    getClass() {
      return {
        "no-bg": this.$route.path == "/home" ? false : true,
      };
    },
  },
};
</script>
<style>
@@ -66,4 +73,7 @@
    box-sizing: border-box;
    height: 100vh;
  }
#app.no-bg {
  background-image: none;
}
</style>
src/assets/js/tools/getPageMenu.js
@@ -290,6 +290,17 @@
            level: 1,
            childrens: [
                {
                    label: "告警派单管理",
                    name: "alarmDispatch",
                    src: "#/alarmDispatch",
                    closable: true,
                    id: 4012,
                    menuId: 4,
                    enableduse: true,
                    ord: 12,
                    level: 2,
                },
                {
                    label: "电源实时告警",
                    name: "powerRealtimeInfo",
                    src: "#/powerRealtimeInfo",
@@ -422,7 +433,7 @@
                    ord: 11,
                    level: 2,
                }
                // 最大ord=11
                // 最大ord=12
            ]
        },
        {
src/components/FlexLayout.vue
@@ -1,10 +1,13 @@
<template>
    <div
        class="flex-layout" :class=getRootClass :style="getRootStyle"
    class="flex-layout"
    :class="getRootClass"
    :style="getRootStyle"
        v-loading="loading"
        element-loading-text="拼命加载中"
        element-loading-spinner="el-icon-loading"
        element-loading-background="rgba(0, 0, 0, 0.2)">
    element-loading-background="rgba(0, 0, 0, 0.2)"
  >
        <div class="flex-layout-header">
            <slot name="header"></slot>
        </div>
@@ -22,7 +25,7 @@
    props: {
        direction: {
            type: String,
            default: '',
      default: "",
        },
        height: {
            type: String,
@@ -30,26 +33,26 @@
        },
        noBg: {
            type: Boolean,
            default: false
      default: false,
        },
        loading: {
            type: Boolean,
            default: false,
        }
    },
    },
    computed: {
        getRootClass: function() {
            return {
               'direction-row':  this.direction == 'row'?true: false
        "direction-row": this.direction == "row" ? true : false,
            };
        },
        getRootStyle: function() {
            return {
                'height': this.height,
            }
        height: this.height,
      };
        },
    }
}
  },
};
</script>
<style scoped>
@@ -74,5 +77,3 @@
    background-color: #05227200;
}
</style>
src/pages/alarmMager/alarm-dispatch.vue
New file
@@ -0,0 +1,27 @@
<template>
  <content-box class="page-root" title="派单管理">
    <admin-view v-if="userPower"></admin-view>
    <maintncer-view v-else></maintncer-view>
  </content-box>
</template>
<script>
import ContentBox from "@/components/ContentBox";
import AdminView from "./components/admin-view.vue";
import maintncerView from "@/pages/alarmMager/components/maintncer-view.vue";
export default {
  components: {
    ContentBox,
    AdminView,
    maintncerView,
  },
  data() {
    let userPower = sessionStorage.getItem("userPower");
    return {
      userPower: 1,
    };
  },
};
</script>
<style scoped></style>
src/pages/alarmMager/components/admin-view.vue
New file
@@ -0,0 +1,59 @@
<template>
  <el-tabs v-model="acTabs" tab-position="left" style="height: 100%;">
    <el-tab-pane label="待派发">
      <alarm-bill-type></alarm-bill-type>
    </el-tab-pane>
    <el-tab-pane label="已派发"></el-tab-pane>
    <el-tab-pane label="待审核"></el-tab-pane>
    <el-tab-pane label="已完成"></el-tab-pane>
  </el-tabs>
</template>
<script>
import alarmBillType from "@/pages/alarmMager/components/alarm-bill-type";
export default {
  components: {
    alarmBillType,
  },
  data() {
    return {
      acTabs: 0,
      waitHandOut: {
        data: [],
        page: {
          pageSize: 10,
          pageCurr: 0,
        },
      },
      handOuted: {
        data: [],
        page: {
          pageSize: 10,
          pageCurr: 0,
        },
      },
      waitVerity: {
        data: [],
        page: {
          pageSize: 10,
          pageCurr: 0,
        },
      },
      finishedInfo: {
        data: [],
        page: {
          pageSize: 10,
          pageCurr: 0,
        },
      },
    };
  },
  methods: {
    searchData() {},
  },
  mounted() {},
  beforeDestroy() {},
};
</script>
<style scoped></style>
src/pages/alarmMager/components/alarm-bill-type.vue
New file
@@ -0,0 +1,81 @@
<template>
  <flex-layout no-bg>
    <div class="flex-page-content">
      <el-table stripe size="small" :data="data" height="100%">
        <el-table-column
          prop="UDepartment"
          align="center"
          label="维护区"
        ></el-table-column>
        <el-table-column
          prop="UDepartment"
          align="center"
          label="维护区"
        ></el-table-column>
        <el-table-column
          prop="UDepartment"
          align="center"
          label="维护区"
        ></el-table-column>
        <el-table-column
          prop="UDepartment"
          align="center"
          label="维护区"
        ></el-table-column>
        <el-table-column
          prop="UDepartment"
          align="center"
          label="维护区"
        ></el-table-column>
      </el-table>
    </div>
    <div class="flex-page-footer" slot="footer">
      <el-pagination
        size="mini"
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
        :current-page="page.pageCurr"
        :page-sizes="[10, 20, 30, 50, 100]"
        :page-size="page.pageSize"
        layout="total, sizes, prev, pager, next, jumper"
        :total="totalNum"
      ></el-pagination>
    </div>
  </flex-layout>
</template>
<script>
export default {
  props: {
    note: {
      type: Number,
      default: 1,
    },
  },
  data() {
    return {
      data: [],
      page: {
        pageSize: 10,
        pageCurr: 0,
      },
      totalNum: 0,
    };
  },
  methods: {
    queryData() {},
    // 显示条数改变时
    handleSizeChange(val) {
      this.page.pageSize = val;
      this.queryData();
    },
    // 翻页
    handleCurrentChange(val) {
      this.page.pageCurr = val;
      this.queryData();
    },
  },
};
</script>
<style scoped></style>
src/pages/alarmMager/components/maintncer-view.vue
New file
@@ -0,0 +1,18 @@
<template>
  <el-tabs v-model="acTabs" tab-position="left" style="height: 100%;">
    <el-tab-pane label="全部"> </el-tab-pane>
    <el-tab-pane label="待处理"> </el-tab-pane>
    <el-tab-pane label="处理中"> </el-tab-pane>
    <el-tab-pane label="已完成"> </el-tab-pane>
  </el-tabs>
</template>
<script>
export default {
  data() {
    return {};
  },
};
</script>
<style scoped></style>
src/pages/alarmMager/components/wait-dispatch-alarm.vue
New file
@@ -0,0 +1,21 @@
<template>
  <el-table stripe size="small" :data="data" height="100%">
    <el-table-column
      prop="battGroupId"
      align="center"
      label="电池组ID"
    ></el-table-column>
  </el-table>
</template>
<script>
export default {
  data() {
    return {
      data: [],
    };
  },
};
</script>
<style scoped></style>
src/pages/home.vue
@@ -1,5 +1,5 @@
<template>
  <flex-layout class="page-home">
  <flex-layout class="page-home" no-bg>
    <page-header
      slot="header"
      :class="{ 'show-drawer': drawer }"
src/pages/login.vue
@@ -3,31 +3,52 @@
        <div class="login_container">
            <div class="sliderCon">
                <div class="logo">
                    <img :src="logoUrl" class="logoImg">
          <img :src="logoUrl" class="logoImg" />
                    {{ platformName }}
                </div>
                <img src="../assets/images/login-img.png" class="picImg">
        <img src="../assets/images/login-img.png" class="picImg" />
            </div>
            <div class="login_box">
                <div class="title">用户登录</div>
                <!--  登录表单区 -->
                <el-form label-width="0px" class="login_from" :model="loginForm" ref="loginFormRef">
        <el-form
          label-width="0px"
          class="login_from"
          :model="loginForm"
          ref="loginFormRef"
        >
                    <!-- 用户名 -->
                    <el-form-item prop="username">
                        <el-input class="input" v-model="loginForm.username" prefix-icon="el-icon-user"
                                  @keyup.enter.native.stop="onSubmit"></el-input>
            <el-input
              class="input"
              v-model="loginForm.username"
              prefix-icon="el-icon-user"
              @keyup.enter.native.stop="onSubmit"
            ></el-input>
                    </el-form-item>
                    <!-- 密码 -->
                    <el-form-item prop="password">
                        <el-input class="input" v-model="loginForm.password" prefix-icon="el-icon-lock" type="password"
                                  @keyup.enter.native.stop="onSubmit"></el-input>
            <el-input
              class="input"
              v-model="loginForm.password"
              prefix-icon="el-icon-lock"
              type="password"
              @keyup.enter.native.stop="onSubmit"
            ></el-input>
                    </el-form-item>
                    <el-form-item class="btns">
                        <el-button :loading="loading" type="primary" @click="onSubmit" class="loginBtn">登录</el-button>
            <el-button
              :loading="loading"
              type="primary"
              @click="onSubmit"
              class="loginBtn"
              >登录</el-button
            >
                    </el-form-item>
                    <el-form-item v-if="!register">
                        <a href="javascript:;" @click="license.show = true"
                           class="regBtn">平台注册</a>
            <a href="javascript:;" @click="license.show = true" class="regBtn"
              >平台注册</a
            >
                    </el-form-item>
                    <el-form-item v-else>
                        <a href="javascript:;" class="regBtn">已激活</a>
@@ -36,41 +57,73 @@
            </div>
            <!-- license弹框输入面板 -->
            <el-dialog
                title="平台注册提示" width="600px"
        title="平台注册提示"
        width="600px"
                :visible.sync="license.show"
                :close-on-click-modal="false" top="0"
                class="dialog-center" :modal-append-to-body="false">
                <add-license v-if="license.show" :visible.sync="license.show"></add-license>
        :close-on-click-modal="false"
        top="0"
        class="dialog-center"
        :modal-append-to-body="false"
      >
        <add-license
          v-if="license.show"
          :visible.sync="license.show"
        ></add-license>
            </el-dialog>
            <!-- 人脸登陆 -->
            <el-dialog
                title="人脸登陆" width="480px"
        title="人脸登陆"
        width="480px"
                :visible.sync="face.show"
                :close-on-click-modal="false" top="0"
                class="dialog-center" :modal-append-to-body="false">
                <face-login v-if="face.show" :visible.sync="face.show" @success="checkServeLicense"></face-login>
        :close-on-click-modal="false"
        top="0"
        class="dialog-center"
        :modal-append-to-body="false"
      >
        <face-login
          v-if="face.show"
          :visible.sync="face.show"
          @success="checkServeLicense"
        ></face-login>
            </el-dialog>
            <!-- 功能描述 -->
            <el-dialog
                title="配置清单" width="960px"
        title="配置清单"
        width="960px"
                :visible.sync="config.show"
                :close-on-click-modal="false" top="0"
                class="dialog-center" :modal-append-to-body="false">
        :close-on-click-modal="false"
        top="0"
        class="dialog-center"
        :modal-append-to-body="false"
      >
                <config-info></config-info>
            </el-dialog>
            <!--  uKey的验证 -->
            <el-dialog
                title="uKey绑定" width="750px"
        title="uKey绑定"
        width="750px"
                :visible.sync="uKey.show"
                :close-on-click-modal="false" top="0"
                class="dialog-center" :modal-append-to-body="false">
        :close-on-click-modal="false"
        top="0"
        class="dialog-center"
        :modal-append-to-body="false"
      >
                <ukey-bind v-if="uKey.show" :visible.sync="uKey.show"></ukey-bind>
            </el-dialog>
            <div class="tools-container">
                <div class="tools-item" :class="uKeyState" v-if="$CFG.uKey.value" @click="uKey.show=true">
        <div
          class="tools-item"
          :class="uKeyState"
          v-if="$CFG.uKey.value"
          @click="uKey.show = true"
        >
                    <span class="iconfont el-icon-CombinedShape"></span>
                </div>
                <div class="tools-item" v-if="$CFG.face.value" @click="face.show=true">
        <div
          class="tools-item"
          v-if="$CFG.face.value"
          @click="face.show = true"
        >
                    <span class="iconfont el-icon-renlianshibie"></span>
                </div>
                <div class="tools-item" @click="config.show=true">
@@ -82,24 +135,26 @@
            {{copyRight.data}}
        </div>
    </div>
</template>
<script>
import AddLicense from "@/pages/AddLicense";
import FaceLogin from '@/components/face/FaceLogin';
import FaceLogin from "@/components/face/FaceLogin";
import {
    login,
    initDBPool,
    checkLoginSession, uKeyLogin, getRandomFromServer, loginSignVerity
  checkLoginSession,
  uKeyLogin,
  getRandomFromServer,
  loginSignVerity,
} from "@/assets/js/api";
import ConfigInfo from "@/pages/configInfo";
import UkeyBind from "@/components/UKeyBind";
import nfdw from '@/assets/images/nfdw-log.png';
import gjdw from '@/assets/images/gjdw-log.png';
import gjdx from '@/assets/images/gjdx-log.png';
import qwh from '@/assets/images/qwh-logo.png';
import yuanchange from '@/assets/images/yuanchang_logo2.png';
import nfdw from "@/assets/images/nfdw-log.png";
import gjdw from "@/assets/images/gjdw-log.png";
import gjdx from "@/assets/images/gjdx-log.png";
import qwh from "@/assets/images/qwh-logo.png";
import yuanchange from "@/assets/images/yuanchang_logo2.png";
import platform from "@/assets/js/config";
import SoftUKey from "@/assets/js/tools/SoftUKey";
import SoftKey3W from "@/assets/js/Syunew3";
@@ -109,7 +164,7 @@
        UkeyBind,
        ConfigInfo,
        AddLicense,
        FaceLogin
    FaceLogin,
    },
    data() {
        return {
@@ -119,21 +174,21 @@
            formLabelAlign: {
                name: "",
                region: "",
                type: ""
        type: "",
            },
            /* 登录表单el-form 的 数据绑定 */
            loginForm: {
                username: "",
                password: ""
        password: "",
            },
            license: {
                show: false
        show: false,
            },
            face: {
                show: false
        show: false,
            },
            config: {
                show: false
        show: false,
            },
            uKey: {
                show: false,
@@ -141,7 +196,7 @@
            platformName: "",
            logoConfig: platform.logo,
            copyRight: platform.copyRight,
            softUKey: new SoftUKey(SoftKey3W)
      softUKey: new SoftUKey(SoftKey3W),
        };
    },
    created() {
@@ -150,7 +205,10 @@
    methods: {
        /* 初始化连接池  检测后台session*/
        async woData() {
            const [pool, sessions] = await Promise.all([initDBPool, checkLoginSession])
      const [pool, sessions] = await Promise.all([
        initDBPool,
        checkLoginSession,
      ]);
            /*   console.log('pool',pool);
                console.log('sessions',sessions); */
        },
@@ -174,10 +232,12 @@
            if (this.loginForm.username && this.loginForm.password) {
                // 开启等待框
                this.loading = true;
                login(this.loginForm.username, this.loginForm.password).then(res => {
        login(this.loginForm.username, this.loginForm.password)
          .then((res) => {
                    // 对结果进行处理
                    this.handleLogin(res);
                }).catch(error => {
          })
          .catch((error) => {
                    // 关闭等待
                    this.loading = false;
                    console.log(error);
@@ -188,7 +248,8 @@
            }
        },
        getRandomFromServer() {
            getRandomFromServer().then(res=>{
      getRandomFromServer()
        .then((res) => {
                let rs = JSON.parse(res.data.result);
                if(rs.code == 1) {
                    let randomNumber = rs.data;
@@ -196,7 +257,8 @@
                }else {
                    this.$message.error("服务器连接异常!");
                }
            }).catch(error=>{
        })
        .catch((error) => {
                this.$message.error("服务器连接异常!");
            });
        },
@@ -204,14 +266,16 @@
            let reg = new RegExp("&", "g");
            result.inPath = result.inPath.replace(reg, "%26");
            result.inPath = result.inPath.replace(/\\/g, "huodongwei");
            loginSignVerity(result).then(res=>{
      loginSignVerity(result)
        .then((res) => {
                let rs = JSON.parse(res.data.result);
                if(rs.code == 1) {
                    this.uKeyLogin();
                }else {
                    this.$message.error("UKey签名校验失败!");
                }
            }).catch(error=>{
        })
        .catch((error) => {
                this.$message.error("服务器连接异常!");
            });
        },
@@ -230,10 +294,16 @@
            if (this.loginForm.username && this.loginForm.password) {
                // 开启等待框
                this.loading = true;
                uKeyLogin(this.loginForm.username, this.loginForm.password, this.$store.state.ukey.id).then(res => {
        uKeyLogin(
          this.loginForm.username,
          this.loginForm.password,
          this.$store.state.ukey.id
        )
          .then((res) => {
                    // 对结果进行处理
                    this.handleLogin(res);
                }).catch(error => {
          })
          .catch((error) => {
                    // 关闭等待
                    this.loading = false;
                    console.log(error);
@@ -249,8 +319,9 @@
            let rs = JSON.parse(res.data.result);
            if (rs.code == 1) {
                this.$message.success("登录成功");
                sessionStorage.setItem('username', this.loginForm.username);
                sessionStorage.setItem('userId', rs.data);
        sessionStorage.setItem("username", this.loginForm.username);
        sessionStorage.setItem("userId", rs.data);
        sessionStorage.setItem("userPower", rs.data2);
                // 自动登录无法返回登录页
                if (this.$store.state.user.autoLogin) {
                    this.$router.replace("/home");
@@ -259,14 +330,16 @@
                }
                // 设置用户的权限
                this.$store.dispatch('user/getPermits');
        this.$store.dispatch("user/getPermits");
            } else {
                this.$message.error(rs.msg);
            }
        },
        checkServeLicense() {
            // 校验服务器是否注册
            this.$apis.license.checkServeLicense().then(res => {
      this.$apis.license
        .checkServeLicense()
        .then((res) => {
                let rs = JSON.parse(res.data.result);
                if (rs.code == 1) {
                    this.register = true;
@@ -275,23 +348,26 @@
                    this.license.show = true;
                    this.register = false;
                }
            }).catch(error => {
        })
        .catch((error) => {
                console.log(error);
            });
        },
        autoLogin() {     // 自动登录
            this.$apis.login.checkReferer().then(res => {
    autoLogin() {
      // 自动登录
      this.$apis.login
        .checkReferer()
        .then((res) => {
                let rs = JSON.parse(res.data.result);
                console.log(rs);
                if (rs) {
                    this.$store.dispatch('user/changeAutoLogin', 1);
            this.$store.dispatch("user/changeAutoLogin", 1);
                    this.loginForm.username = "zhdl";
                    this.loginForm.password = "123456";
                    this.normalLogin();
                }
            }).catch(error => {
            });
        })
        .catch((error) => {});
            // let pattern = /(localhost)|(www\.sw-ht\.com)/;
            // let where = document.referrer;
            // if(pattern.test(where)) {
@@ -304,7 +380,9 @@
            // }
        },
        searchPlatformName() {
            this.$apis.pageSetting.realTime.searchName().then(res=>{
      this.$apis.pageSetting.realTime
        .searchName()
        .then((res) => {
                let rs = JSON.parse(res.data.result);
                if(rs.code == 1) {
                    let data = rs.data[0];
@@ -312,12 +390,13 @@
                }else {
                    this.platformName = "蓄电池后台监控管理平台";
                }
                sessionStorage.setItem('platformName', this.platformName);
            }).catch(error=>{
          sessionStorage.setItem("platformName", this.platformName);
        })
        .catch((error) => {
                this.platformName = "蓄电池后台监控管理平台";
                sessionStorage.setItem('platformName', this.platformName);
          sessionStorage.setItem("platformName", this.platformName);
            });
        }
    },
    },
    computed: {
        uKeyState() {
@@ -358,31 +437,31 @@
            switch (logoConfig.fileName) {
                case "nfdw":
                    image = nfdw
          image = nfdw;
                    break;
                case "gjdx":
                    image = gjdx;
                    break;
                case 'qwh':
        case "qwh":
                    image = qwh;
                    break;
                case 'gjdw':
        case "gjdw":
                    image = gjdw;
                    break;
            }
            return image;
        }
    },
    },
    mounted() {
        // 初始化user的信息
        this.$store.commit('user/init');
    this.$store.commit("user/init");
        // 初始化登录状态
        sessionStorage.setItem('username', "");
    sessionStorage.setItem("username", "");
        this.checkServeLicense();
        // 自动登录
        this.autoLogin();
    }
  },
};
</script>
@@ -392,13 +471,16 @@
    line-height: 48px;
}
.el-science-blue .login_from .el-input.is-disabled .el-input__inner, .el-science-blue .login_from .el-input__inner {
.el-science-blue .login_from .el-input.is-disabled .el-input__inner,
.el-science-blue .login_from .el-input__inner {
    background-color: transparent;
    border-color: #e4e4e4;
    color: #868686;
}
.el-science-blue .login_from .el-input__prefix, .el-input__suffix, .el-science-blue .login_from .el-select .el-input .el-select__caret {
.el-science-blue .login_from .el-input__prefix,
.el-input__suffix,
.el-science-blue .login_from .el-select .el-input .el-select__caret {
    color: #007fe1;
}
</style>
@@ -424,7 +506,7 @@
    position: absolute;
    bottom: 0;
    right: 0;
    background-color: #FFFFFF;
  background-color: #ffffff;
}
.tools-container .tools-item {
@@ -433,7 +515,6 @@
}
.tools-container .tools-item:hover {
    background-color: #e4e4e4;
}
@@ -563,7 +644,6 @@
        width: 416px;
        height: 376px;
    }
}
</style>
src/router/index.js
@@ -19,9 +19,9 @@
        next();
    }
});
const routerPush = VueRouter.prototype.push
const routerPush = VueRouter.prototype.push;
VueRouter.prototype.push = function push(location) {
    return routerPush.call(this, location).catch(error=> error)
}
};
export default router;
src/router/routes.js
@@ -280,6 +280,12 @@
        component: (resolve) => require(['../pages/alarmMager/batteryrTimequery.vue'], resolve)
    },
    {
    name: 'alarmDispatch',
    path: '/alarmDispatch',
    meta: {},
    component: (resolve) => require(['../pages/alarmMager//alarm-dispatch.vue'], resolve)
},
{
        name: 'powerRealtimeInfo',
        path: '/powerRealtimeInfo',
        /* 电源实时信息告警 */