lishifeng
2020-09-15 ce10677f47a14879424e7f562f78442cc03cfda1
提交5
20个文件已添加
36个文件已修改
3875 ■■■■ 已修改文件
package-lock.json 151 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/index.html 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/css/common.css 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/css/m-elementui.css 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/css/theme/science-blue.css 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/iconfont/demo_index.html 115 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/iconfont/iconfont.css 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/iconfont/iconfont.eot 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/iconfont/iconfont.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/iconfont/iconfont.json 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/iconfont/iconfont.svg 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/iconfont/iconfont.ttf 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/iconfont/iconfont.woff 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/iconfont/iconfont.woff2 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/images/kfz.png 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/js/api.js 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/js/apis/dischargeTest/e61850/config.md 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/js/apis/dischargeTest/e61850/index.js 67 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/js/apis/dischargeTest/index.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/js/apis/index.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/js/axios.js 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/js/const/const_61850.js 81 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/js/const/const_9100.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/js/const/index.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/js/diagram/circuitDiagram.js 66 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/js/diagram/diagramStates.js 215 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/js/realTime.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/js/tools/GetHourRate.js 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/js/tools/GetMonomerCap.js 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/js/tools/N_TO_10H.js 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/js/tools/Timeout.js 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/js/tools/getBarNum.js 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/js/tools/index.js 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/js/tools/regEquipType.js 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/js/tools/testVal.js 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/ContentBox.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/PageHeader.vue 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/PageMenu.vue 101 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/ScienceBox.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/ThreeBtn.vue 75 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/chart/BarChart.vue 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/index.js 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/params/61850/DischargeParams.vue 365 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/params/DischargeDialogContent.vue 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/params/SystemParams.vue 151 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main.js 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/dataTest/CircuitDiagram.vue 79 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/dataTest/HomeList.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/dataTest/history.vue 39 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/dataTest/realTime.vue 609 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/home.vue 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/index.vue 234 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/index_old.vue 844 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/login.vue 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/index.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
vue.config.js 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
package-lock.json
@@ -1746,17 +1746,6 @@
          "integrity": "sha1-4a1IbmxUUBY0xsOXxcEh2qODYHw=",
          "dev": true
        },
        "ansi-styles": {
          "version": "4.2.1",
          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz",
          "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
          "dev": true,
          "optional": true,
          "requires": {
            "@types/color-name": "^1.1.1",
            "color-convert": "^2.0.1"
          }
        },
        "cacache": {
          "version": "13.0.1",
          "resolved": "https://registry.npm.taobao.org/cacache/download/cacache-13.0.1.tgz?cache=0&sync_timestamp=1594429684526&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcacache%2Fdownload%2Fcacache-13.0.1.tgz",
@@ -1783,34 +1772,6 @@
            "unique-filename": "^1.1.1"
          }
        },
        "chalk": {
          "version": "3.0.0",
          "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz",
          "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==",
          "dev": true,
          "optional": true,
          "requires": {
            "ansi-styles": "^4.1.0",
            "supports-color": "^7.1.0"
          }
        },
        "color-convert": {
          "version": "2.0.1",
          "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
          "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
          "dev": true,
          "optional": true,
          "requires": {
            "color-name": "~1.1.4"
          }
        },
        "color-name": {
          "version": "1.1.4",
          "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
          "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
          "dev": true,
          "optional": true
        },
        "find-cache-dir": {
          "version": "3.3.1",
          "resolved": "https://registry.npm.taobao.org/find-cache-dir/download/find-cache-dir-3.3.1.tgz?cache=0&sync_timestamp=1583734591888&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffind-cache-dir%2Fdownload%2Ffind-cache-dir-3.3.1.tgz",
@@ -1831,13 +1792,6 @@
            "locate-path": "^5.0.0",
            "path-exists": "^4.0.0"
          }
        },
        "has-flag": {
          "version": "4.0.0",
          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
          "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
          "dev": true,
          "optional": true
        },
        "locate-path": {
          "version": "5.0.0",
@@ -1903,16 +1857,6 @@
            "minipass": "^3.1.1"
          }
        },
        "supports-color": {
          "version": "7.2.0",
          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
          "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
          "dev": true,
          "optional": true,
          "requires": {
            "has-flag": "^4.0.0"
          }
        },
        "terser-webpack-plugin": {
          "version": "2.3.8",
          "resolved": "https://registry.npm.taobao.org/terser-webpack-plugin/download/terser-webpack-plugin-2.3.8.tgz?cache=0&sync_timestamp=1597229611059&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fterser-webpack-plugin%2Fdownload%2Fterser-webpack-plugin-2.3.8.tgz",
@@ -1928,21 +1872,6 @@
            "source-map": "^0.6.1",
            "terser": "^4.6.12",
            "webpack-sources": "^1.4.3"
          }
        },
        "vue-loader-v16": {
          "version": "npm:vue-loader@16.0.0-beta.5",
          "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.0.0-beta.5.tgz",
          "integrity": "sha512-ciWfzNefqWlmzKznCWY9hl+fPP4KlQ0A9MtHbJ/8DpyY+dAM8gDrjufIdxwTgC4szE4EZC3A6ip/BbrqM84GqA==",
          "dev": true,
          "optional": true,
          "requires": {
            "@types/mini-css-extract-plugin": "^0.9.1",
            "chalk": "^3.0.0",
            "hash-sum": "^2.0.0",
            "loader-utils": "^1.2.3",
            "merge-source-map": "^1.1.0",
            "source-map": "^0.6.1"
          }
        }
      }
@@ -11159,6 +11088,86 @@
        }
      }
    },
    "vue-loader-v16": {
      "version": "npm:vue-loader@16.0.0-beta.7",
      "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.0.0-beta.7.tgz",
      "integrity": "sha512-xQ8/GZmRPdQ3EinnE0IXwdVoDzh7Dowo0MowoyBuScEBXrRabw6At5/IdtD3waKklKW5PGokPsm8KRN6rvQ1cw==",
      "dev": true,
      "optional": true,
      "requires": {
        "@types/mini-css-extract-plugin": "^0.9.1",
        "chalk": "^3.0.0",
        "hash-sum": "^2.0.0",
        "loader-utils": "^1.2.3",
        "merge-source-map": "^1.1.0",
        "source-map": "^0.6.1"
      },
      "dependencies": {
        "ansi-styles": {
          "version": "4.2.1",
          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz",
          "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
          "dev": true,
          "optional": true,
          "requires": {
            "@types/color-name": "^1.1.1",
            "color-convert": "^2.0.1"
          }
        },
        "chalk": {
          "version": "3.0.0",
          "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz",
          "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==",
          "dev": true,
          "optional": true,
          "requires": {
            "ansi-styles": "^4.1.0",
            "supports-color": "^7.1.0"
          }
        },
        "color-convert": {
          "version": "2.0.1",
          "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
          "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
          "dev": true,
          "optional": true,
          "requires": {
            "color-name": "~1.1.4"
          }
        },
        "color-name": {
          "version": "1.1.4",
          "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
          "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
          "dev": true,
          "optional": true
        },
        "has-flag": {
          "version": "4.0.0",
          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
          "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
          "dev": true,
          "optional": true
        },
        "source-map": {
          "version": "0.6.1",
          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
          "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
          "dev": true,
          "optional": true
        },
        "supports-color": {
          "version": "7.2.0",
          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
          "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
          "dev": true,
          "optional": true,
          "requires": {
            "has-flag": "^4.0.0"
          }
        }
      }
    },
    "vue-router": {
      "version": "3.4.3",
      "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.4.3.tgz",
public/index.html
@@ -6,6 +6,10 @@
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <link rel="icon" href="<%= BASE_URL %>favicon.ico">
    <script type="text/javascript" src="//api.map.baidu.com/api?type=webgl&v=1.0&ak=AWqwD701uOy6kaLIxBY2NDjATvE6x5IG"></script>
    <script type="text/javascript" src="http://localhost:8919/baidumapv2/baidumap_offline_v2_load.js"></script>
    <script type="text/javascript" src="http://localhost:8919/baidumapv2/library/searchInfoWindow.js"></script>
    <script type="text/javascript" src="../baidumapv2/baidumap_offline_v2_load.js"></script>
    <script type="text/javascript" src="../baidumapv2/library/searchInfoWindow.js"></script>
    <title><%= htmlWebpackPlugin.options.title %></title>
  </head>
  <body>
src/assets/css/common.css
@@ -2,6 +2,9 @@
.pt4 {
    padding-top: 4px;
}
.pr16 {
    padding-right: 16px;
}
/* wdith */
.w80 {
    width: 80px;
@@ -31,6 +34,7 @@
.diagram-stc {
    width: 100%;
    height: 100%;
    overflow: hidden;
}
.diagram-flush {
    position: absolute;
@@ -38,7 +42,8 @@
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99;
    z-index: 9;
    overflow: hidden;
}
.diagram-stc canvas,
.diagram-flush canvas {
src/assets/css/m-elementui.css
@@ -18,4 +18,18 @@
}
.el-drawer:focus {
    outline: none;
}
/* dialog center */
.dialog-center {
    display: flex;
    align-items: center;
    justify-content: center;
}
.dialog-center .el-dialog {
    margin-bottom: 0;
}
.vl-notify-mask {
    z-index: 200;
}
src/assets/css/theme/science-blue.css
@@ -93,6 +93,35 @@
    color: #FFFFFF;
}
.el-science-blue .params-dialog .el-input.is-disabled .el-input__inner,
.el-science-blue .params-dialog .el-input__inner {
    background-color: #FFFFFF;
    border-color:#DCDFE6;
    color: #606266;
}
.el-science-blue .params-dialog .el-form-item__label {
    font-size: 12px;
    font-weight: bold;
}
.el-form--label-top .el-form-item__label {
    padding: 0;
}
.el-science-blue .params-dialog .el-input__inner[readonly=readonly] {
    background-color: #cccccc;
}
.el-science-blue .params-dialog .el-select {
    width: 100%;
}
.el-science-blue .params-dialog .el-select .el-input__inner[readonly=readonly] {
    background-color: #FFF;
}
.el-science-blue .params-dialog .el-form-item--mini.el-form-item,
.el-science-blue .params-dialog .el-form-item--small.el-form-item {
    margin-bottom: 8px;
}
/* table */
.el-science-blue .el-table  {
    color: #FFFFFF;
@@ -120,4 +149,24 @@
}
.el-popper[x-placement^=bottom] .popper__arrow::after {
    border-bottom-color: rgb(30, 125, 219);
}
}
/* dialog */
.el-science-blue .el-dialog__header {
    padding:8px 16px;
    background-image: linear-gradient(#62b0fa, #3497f3, #1660B9);
}
.el-science-blue .el-dialog__title {
    color: #FFFFFF;
    font-size: 14px;
    font-weight: bold;
}
.el-science-blue .el-dialog__headerbtn {
    top: 8px;
}
.el-science-blue .el-dialog__headerbtn .el-dialog__close {
    color: #FFFFFF;
}
.el-science-blue .el-dialog__body {
    padding: 0;
}
src/assets/iconfont/demo_index.html
@@ -31,6 +31,36 @@
          <ul class="icon_lists dib-box">
          
            <li class="dib">
              <span class="icon iconfont">&#xe60a;</span>
                <div class="name">User select</div>
                <div class="code-name">&amp;#xe60a;</div>
              </li>
            <li class="dib">
              <span class="icon iconfont">&#xe67a;</span>
                <div class="name">Service users</div>
                <div class="code-name">&amp;#xe67a;</div>
              </li>
            <li class="dib">
              <span class="icon iconfont">&#xe611;</span>
                <div class="name">温度</div>
                <div class="code-name">&amp;#xe611;</div>
              </li>
            <li class="dib">
              <span class="icon iconfont">&#xe607;</span>
                <div class="name">分 享</div>
                <div class="code-name">&amp;#xe607;</div>
              </li>
            <li class="dib">
              <span class="icon iconfont">&#xe608;</span>
                <div class="name">通讯</div>
                <div class="code-name">&amp;#xe608;</div>
              </li>
            <li class="dib">
              <span class="icon iconfont">&#xe6ac;</span>
                <div class="name">查找</div>
                <div class="code-name">&amp;#xe6ac;</div>
@@ -105,6 +135,51 @@
        <ul class="icon_lists dib-box">
          
          <li class="dib">
            <span class="icon iconfont el-icon-Userselect"></span>
            <div class="name">
              User select
            </div>
            <div class="code-name">.el-icon-Userselect
            </div>
          </li>
          <li class="dib">
            <span class="icon iconfont el-icon-Serviceusers"></span>
            <div class="name">
              Service users
            </div>
            <div class="code-name">.el-icon-Serviceusers
            </div>
          </li>
          <li class="dib">
            <span class="icon iconfont el-icon-wendu"></span>
            <div class="name">
              温度
            </div>
            <div class="code-name">.el-icon-wendu
            </div>
          </li>
          <li class="dib">
            <span class="icon iconfont el-icon-fenxiang"></span>
            <div class="name">
              分 享
            </div>
            <div class="code-name">.el-icon-fenxiang
            </div>
          </li>
          <li class="dib">
            <span class="icon iconfont el-icon-tongxun"></span>
            <div class="name">
              通讯
            </div>
            <div class="code-name">.el-icon-tongxun
            </div>
          </li>
          <li class="dib">
            <span class="icon iconfont el-icon-chazhao"></span>
            <div class="name">
              查找
@@ -171,6 +246,46 @@
          
            <li class="dib">
                <svg class="icon svg-icon" aria-hidden="true">
                  <use xlink:href="#el-icon-Userselect"></use>
                </svg>
                <div class="name">User select</div>
                <div class="code-name">#el-icon-Userselect</div>
            </li>
            <li class="dib">
                <svg class="icon svg-icon" aria-hidden="true">
                  <use xlink:href="#el-icon-Serviceusers"></use>
                </svg>
                <div class="name">Service users</div>
                <div class="code-name">#el-icon-Serviceusers</div>
            </li>
            <li class="dib">
                <svg class="icon svg-icon" aria-hidden="true">
                  <use xlink:href="#el-icon-wendu"></use>
                </svg>
                <div class="name">温度</div>
                <div class="code-name">#el-icon-wendu</div>
            </li>
            <li class="dib">
                <svg class="icon svg-icon" aria-hidden="true">
                  <use xlink:href="#el-icon-fenxiang"></use>
                </svg>
                <div class="name">分 享</div>
                <div class="code-name">#el-icon-fenxiang</div>
            </li>
            <li class="dib">
                <svg class="icon svg-icon" aria-hidden="true">
                  <use xlink:href="#el-icon-tongxun"></use>
                </svg>
                <div class="name">通讯</div>
                <div class="code-name">#el-icon-tongxun</div>
            </li>
            <li class="dib">
                <svg class="icon svg-icon" aria-hidden="true">
                  <use xlink:href="#el-icon-chazhao"></use>
                </svg>
                <div class="name">查找</div>
src/assets/iconfont/iconfont.css
@@ -1,10 +1,10 @@
@font-face {font-family: "iconfont";
  src: url('iconfont.eot?t=1598692571149'); /* IE9 */
  src: url('iconfont.eot?t=1598692571149#iefix') format('embedded-opentype'), /* IE6-IE8 */
  url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAS4AAsAAAAACZQAAARpAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCDMgqGMIU9ATYCJAMUCwwABCAFhG0HSxtMCBHVozOQfXFgnl/kyFxTUqhjXXjpy9+ji1T3Of/5vN5z30vmR19yAQxKKUll7gaFVrMrtOzP1pwDNipqsiRn0aN/yEMpvXw6CgAC4tTPWufxEEYguDRU3ToWeAkLWKBy0/cX/Y97p3+eBzafZbnMsbGoC7A0oCwcY2IXJVogESeiaYTn56rNFXQaCKBIUoD6Np3skAjkSQSgdfTIwZACekIGhUgqW8LKGL0gksIze40JNlqfpz+qQAJGjMgzu41oPQzN/Kn+03yRtQj9DASC5qwAxHUABxQABKBNon0cuBMvwCmf/oJmABQShjXVq8g/2H/asjzxhJSK8ocHcIyAgFKyXCOyWUIAf6rGAg7+IhYw8A/mZytOQ7gtctFQKA0VUQY0SIYMspWxaVbWari/6bSMgPz8uc6ocz7yep1ut93jcaz11euRjhNr7y2eEKX4fK4b3O6Rgaa52IjStm1bpLvUa/cW361SLt9edMebq+uLtkUohrHYHL7YULRL6v5q4NXsq0C96hBO25SgixElmma0SvmHJwh77lQGX7uXLO69Oy2nVr02+gJldtBTbxqpDnhaBz7zpfOD3jbaY3cKlODtaxv8xJMq7HePcdhJC5qtcTSCIgbKHdqejfVjp3ZFORXj6JrDEfbIbTtOHIlG0/5ye+0lc6crnyGq0bQUlKKIHs9jmhiHj2+PJIeqH1l7LNpl7qzb39TjnX4icXAlM54/07nBnz3TJbrAwU6VgxN3pqd7PcPrX9cnPBxBq1axEQqHuCRhsNII8qpR/1113oq2zqNfTMPch8dKGtp/KznO/P/T+2OJfGQ0vatZ2ipNHoNoj1f2WntIup+QkTPVA6p13l5tL2kQ9rMfzUZaefwA/x7fIa/8q3EwKsboupJWrcIP9ahM7mn/NfCX3Z48INnuID1ztR5zwlu1Ksm08DqOioOD/776e/BvKr8QSn/SsykOCk9tMa9bVwym9dMi+u6Yee3k3JFjx1JVTlxN1fhxcM1ZdWw63Yqaf2PfEjaM9g3N74G2VxZ7Xx2bjlMJbQ8MGd6QCoJm3Hgcg1kAACv+gDcDLHyVNX5+n8cAAP+wd3fbd/CfWtQODG70T1JjAPBhUuMP8FkEVOPfMgoUFtxbgoINwlckG8T4Xavx3wHRYNw5cvZJKwAL7jCfm3FGgmclkiQAMAESgZNkoAJZACJVBdhImoIiX9v1qnBTwFFcAPIsZ0BCnAMmyD3gQrxBBfITiKJ8A5uQgIPCSeE7qvR9EHdHRiVoQf8gGuqdapKdXXpDP7aK/SKL+kJOMQRlVoRTV+yRm5iT3r4SceCYOriw87BtCQamGo1kQWQ45LlLelJmqJvsHBmVoAX6B6Kh3hmtZRd5/w392CrOqPthfyGn2D0oZYoC6FXeF6o7lP7p7SsijhvnmDpwgRVbJU5gSB5Wo5FMqBAdDnJq5orKs+6V3T7uYDLZkWcvA0acBBLJhvUS1F+l0vIbe82yNrJ5XKcwqqBuMgEAAAA=') format('woff2'),
  url('iconfont.woff?t=1598692571149') format('woff'),
  url('iconfont.ttf?t=1598692571149') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */
  url('iconfont.svg?t=1598692571149#iconfont') format('svg'); /* iOS 4.1- */
  src: url('iconfont.eot?t=1599792748745'); /* IE9 */
  src: url('iconfont.eot?t=1599792748745#iefix') format('embedded-opentype'), /* IE6-IE8 */
  url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAf4AAsAAAAADoAAAAerAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCEGAqOYIw0ATYCJAMoCxYABCAFhG0HgQQbdgxRlC9SnOxngd1uAU9PeB02Fi2L/s3loE9hqrEmmsbD02H5/sxsrXR3VCpW69gKHfcAVg0lFAp5zLrAXk710yV3LlTlriw920lYUNdCE/ZOkV+yMiTfW8rCLWMLoQLYAtbh8bR/LxmbzNXsji4mBAN5bO7c3ndxFIIPu2E+dL9Xf64D61bpcvf7alWFb5Qga50O6EekvYkNC21COoXpJDX1byM6gaYFRyonl/dPECksEjjxzmgBUW5QaSkM9Z5qjdcivqmopy/pIYCv4e/Hf2hERFLJrJguHy8yOP7FPrJ2pvWQ33yebxyCKTI2gSLwH7V934GGVjyteb54BYbWmNDSr2hhvRqLycfMwvzCZSHrbRjasv/NA0VFyOpqGpIqUQXaZpXvtxr8Ym4LhV9RvwrYAvoF2Dr6ZbAqiH4sBjGeCajnYxP0S2AfYG5e3rQ9BuZAegDIe0R5StNLTYZKiHJ7253Fg73tZavzMNnc2t7a2l8SrbO4dMhqNX2qPE8JAs1xJMtOCp9gwkekcWOQs+kw3QF5nt4ukAoVdodLzY9jCdC26xAAay8GOeoue0DmSAvLkbsAWJdaHaoT5KnzEDKhgkBt4Z/ziSJ2Yn8EOnVqN1k/hGXJQ5xqF6YXIgWh/9Qzb0TCcQTLUvNHdSRDhm55MaQ1iEQ60wazDDMaQaaOMWOYXrY+1V2dGy/qLvswR0JR5oB+H0B2HZqvY6Paj0DGgz6HnQItBhEKscmdOMyrdexTVss94zB9Sdvp1C0fNqTdq9sP0dPX4Q5Bc4vz33g1sYHjtCyx8/ThLaEXBIZP3735yJmuUoHh9H6psE6ZNh84s9n+4bNTOU3btengyRCeZwR6z6lDG2uzxXtPSveZT+3bGMQ2H5lPSY8IcBdoza/qhQyjhNynv8IM33ToPQ5mM2OS4gaD1khjZ64wl5NFJy9qL9FnX9caxCITt6+LMYlwXeNBzEFvbhCBm8BWvMRxXGptviYMu1v2stp0KcnpzBVf682XJztKMDQopDnH23wAxMA2TuVwRwhEt/Nq/B0GgOjU2Il3abWV7ScJiEOH+abdYijeKdpblFnGPQc2SCmRabdup5iQGNbt2yUDOVc3D83r6W5D0sxzMdjAZMdJJtu0c+9aCSQx4y79HhltXm95Wg/n5pB6pMEfrIdpQQNSL26Ov5uAv3PzNlgSnN8Vnbg2b9tR0NFh87JdVUHsXaSlN7Cvoqo3ZJn9sp7Qikr+89YibYo7lUp765ftFOImh+6nv3qP8Fax4itX2Bh2UB3rJVNZ1yxPma0oflA6W74stUCqkkUpYyIOwEaNrHhVkfuE/SUA6qpKdoYiuSSRC34iiNjQ6nyP29mUQChsXVzDS+V/Evmet20cR0k7tbM6ItQYWhih8oY0IUxkG++BSzkBCdyC38Yttt8fvX30/1eZiR9kPxQHVmPo+59B9DuY03I75HvN94jH3rl5DgGeAQ7z+s6CpNav40tiwzJXXEiTq+9vfCVdBWgaqqDSxyoepcEokQPnXzlPxSvCi332exfVeBfvi1yE5/kMrLfKo6oLgApSHYKDKroWxJaLL4ZdFHPZL4VaqTW5ua4xK5uXYtbOU0aU6rY7MDhr35u/DPu3+TqKIP/FluX3apzH2m7XF/zTtViFq5PLN50kEJb+JRd3/VNf0HbbmN8tq+m/q/YTLC/7Hlf1uPZjIzSQvjWH46f2ebclIaa7d4yoCb1zxzMYeYigktq81wcG8lxXxsMMr+vdcNUqpNuGDGIMCMZhN0zPg4wXq45aZJajMCX/f/71PYr/i75T7CWL/wXaPbVq9OdcvubFVbhFjoXqB0TaI+CtrqTHKbYNsxwlUgjF/1ZbkR9ye8JD6Db0e8/irvRD3zVIbJWlK5RKtx3VSb41xE8tj7/g2+xLxJKag3j1PDelUtE6hqajOLO97dcHv26fmO2/EIj7yO7OOAnd/PMXVFaANvjSpLhh3cyZ/fN7BgZgcphHavLQIKDnrdozBS9IF57bsgTphFs6IquB5hTDP9gzBQ7UPLitvWumHsD3DQ7BMlh8FQAAFi36BaoNC6+gy6ouowNo/sYB9LfpnrpKK4gu3byCXkNz2+gqxvaX6FVUDgAA6A3kLbrFGqjMMya2OGX+Zof937x6h7EdZNTzHF6mHnWpaSqgSfoLKJKZXtdZuGncmaulsPjjr4um3KsmaJDZob+5+aS3hsrikxQkNfMgq1uUFuUmqGjZAlV1+6Bpw5XvlhEyLUoD694JCH3fIOn6iXOd8gcXKH9BxdS/oYrcmAZN97EZZMtymIUzQuEx4+0xN9JZ5Yz4hejkA+rQE8ToOHsvSKVxltfj1Ny5Qos0h4tyoBveK67I9fklcYK9nuMFuQ5KH+fYLlpJoiSXsXR9WHCMIMH7jTNc27i7ITmWut9bKP38A6QFPQK1CGrdXyBSMu/n6mJpD+kVtb0E93K+NKA1eGZc4e46cfoxv2THUc/edLii3lIHkrxYPmK90JIw16m+NF6f97+27h/qEiv0ZqTIUaIS1ahFPRrRjJbmXfke/di724tLj0gDIzGUgpgdos1CpNCOjLCaeeedGQXLZC4mzrybHZlKU7MdYymwMg8iPwAA') format('woff2'),
  url('iconfont.woff?t=1599792748745') format('woff'),
  url('iconfont.ttf?t=1599792748745') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */
  url('iconfont.svg?t=1599792748745#iconfont') format('svg'); /* iOS 4.1- */
}
.iconfont {
@@ -15,6 +15,26 @@
  -moz-osx-font-smoothing: grayscale;
}
.el-icon-Userselect:before {
  content: "\e60a";
}
.el-icon-Serviceusers:before {
  content: "\e67a";
}
.el-icon-wendu:before {
  content: "\e611";
}
.el-icon-fenxiang:before {
  content: "\e607";
}
.el-icon-tongxun:before {
  content: "\e608";
}
.el-icon-chazhao:before {
  content: "\e6ac";
}
src/assets/iconfont/iconfont.eot
Binary files differ
src/assets/iconfont/iconfont.js
@@ -1 +1 @@
!function(e){var t,c,n,o,l,i,s,d='<svg><symbol id="el-icon-chazhao" viewBox="0 0 1024 1024"><path d="M938.176 832.512l-214.336-214.4c-2.496-2.496-5.248-4.352-7.872-6.528 36.16-55.552 57.344-121.728 57.344-193.024C773.312 222.72 614.592 64 418.688 64 222.848 64 64 222.72 64 418.624s158.848 354.624 354.688 354.624c71.232 0 137.472-21.248 193.216-57.344 1.984 2.752 3.904 5.376 6.336 7.744l214.4 214.528C847.232 952.768 866.24 960 885.376 960s38.208-7.232 52.8-21.888C967.296 908.992 967.296 861.76 938.176 832.512M418.688 661.248c-133.76 0-242.688-108.864-242.688-242.624 0-133.76 108.928-242.688 242.688-242.688s242.624 108.928 242.624 242.688C661.312 552.384 552.448 661.248 418.688 661.248"  ></path></symbol><symbol id="el-icon-xinxi" viewBox="0 0 1024 1024"><path d="M316.16 427.52h391.68c15.36 0 28.16-12.8 28.16-28.16 0-15.36-12.8-28.16-28.16-28.16H316.16c-15.36 0-28.16 12.8-28.16 28.16 0 16.64 12.8 28.16 28.16 28.16z m111.36-195.84h167.68c46.08 0 84.48-37.12 84.48-84.48S642.56 64 596.48 64H427.52c-46.08 0-84.48 37.12-84.48 84.48s38.4 83.2 84.48 83.2z m0-111.36h167.68c15.36 0 28.16 12.8 28.16 28.16s-12.8 28.16-28.16 28.16H427.52c-15.36 0-28.16-12.8-28.16-28.16 0-15.36 12.8-28.16 28.16-28.16z m308.48 448c0-15.36-12.8-28.16-28.16-28.16H316.16c-15.36 0-28.16 12.8-28.16 28.16s12.8 28.16 28.16 28.16h391.68c15.36 0 28.16-12.8 28.16-28.16z m83.2-448h-84.48v56.32H819.2c15.36 0 28.16 12.8 28.16 28.16v672c0 15.36-12.8 28.16-28.16 28.16H203.52c-15.36 0-28.16-12.8-28.16-28.16V203.52c0-15.36 12.8-28.16 28.16-28.16h84.48V120.32h-84.48c-46.08 0-84.48 37.12-84.48 84.48v672c0 46.08 37.12 84.48 84.48 84.48H819.2c46.08 0 84.48-37.12 84.48-84.48V203.52c0-46.08-37.12-83.2-84.48-83.2zM316.16 707.84c-15.36 0-28.16 12.8-28.16 28.16 0 15.36 12.8 28.16 28.16 28.16h224c15.36 0 28.16-12.8 28.16-28.16 0-15.36-12.8-28.16-28.16-28.16H316.16z" fill="#515151" ></path></symbol><symbol id="el-icon-jinru" viewBox="0 0 1024 1024"><path d="M837.824 919.232 267.648 919.232c-67.52 0-122.176-54.656-122.176-122.176L145.472 634.176l81.472 0 0 53.248c0 83.072 67.264 150.4 150.4 150.4l350.848 0c83.008 0 150.4-67.328 150.4-150.4L878.592 336.576c0-83.072-67.392-150.4-150.4-150.4L377.344 186.176c-83.136 0-150.4 67.328-150.4 150.4l0 12.48L145.408 349.056 145.408 226.944c0-67.52 54.656-122.176 122.176-122.176l570.176 0C905.28 104.768 960 159.424 960 226.944l0 570.112C960 864.576 905.28 919.232 837.824 919.232zM471.232 308.352 715.648 512l-244.352 162.944L471.296 552.768 64 552.768 64 430.592l407.232 0L471.232 308.352z"  ></path></symbol><symbol id="el-icon-shuaxin" viewBox="0 0 1024 1024"><path d="M798.336 632.32c-16.896-11.2-35.328-13.184-43.2-5.312l-0.384-0.576c-0.256 0.704-0.704 1.344-0.96 1.984-0.128 0.128-0.32 0.192-0.384 0.32-0.384 0.512-0.512 1.152-0.704 1.664-43.776 87.808-133.952 148.288-238.656 148.288-128.32 0-235.2-90.496-260.992-211.136L294.4 608.896c0.32 0.448 0.576 1.024 0.96 1.344 9.984 9.984 32.192 3.968 49.664-13.44C362.368 579.392 368.448 557.184 358.528 547.2l0.192-0.192L250.944 439.232 250.368 439.232c-5.312-9.344-19.712-16-36.8-16s-31.488 6.656-36.8 16L176.64 439.232 67.328 548.416l0.192 0.256C59.456 559.168 65.472 580.096 82.112 596.8c16.64 16.64 37.568 22.72 48.128 14.528l0.192 0.256 43.392-43.392c26.944 163.584 169.024 288.384 340.224 288.384 132.608 0 247.488-74.944 305.152-184.704L819.2 671.872C825.408 661.76 816.192 644.16 798.336 632.32z"  ></path><path d="M941.824 427.264c-16.704-16.704-37.568-22.72-48.128-14.592L893.44 412.416l-43.392 43.456c-27.008-163.648-168.96-288.448-340.224-288.448-132.544 0-247.424 74.944-305.152 184.704L204.8 352.128C198.528 362.24 207.744 379.84 225.6 391.68c16.896 11.2 35.264 13.184 43.136 5.376l0.384 0.512C269.44 396.864 269.824 396.224 270.208 395.584c0.064-0.128 0.192-0.192 0.32-0.32 0.32-0.512 0.448-1.152 0.704-1.664C314.88 305.792 405.12 245.248 509.824 245.248c128.32 0 235.264 90.56 260.992 211.136l-41.28-41.28c-0.384-0.448-0.64-1.024-1.024-1.344-9.92-9.984-32.128-3.968-49.536 13.504-17.408 17.344-23.488 39.552-13.568 49.536l-0.192 0.256 107.776 107.712 0.576 0c5.376 9.344 19.712 16 36.736 16s31.424-6.656 36.8-16l0.256 0 109.184-109.184-0.192-0.192C964.544 464.832 958.528 443.904 941.824 427.264z"  ></path></symbol></svg>',a=(t=document.getElementsByTagName("script"))[t.length-1].getAttribute("data-injectcss");if(a&&!e.__iconfont__svg__cssinject__){e.__iconfont__svg__cssinject__=!0;try{document.write("<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>")}catch(e){console&&console.log(e)}}function h(){i||(i=!0,o())}c=function(){var e,t,c,n,o,l=document.createElement("div");l.innerHTML=d,d=null,(e=l.getElementsByTagName("svg")[0])&&(e.setAttribute("aria-hidden","true"),e.style.position="absolute",e.style.width=0,e.style.height=0,e.style.overflow="hidden",t=e,(c=document.body).firstChild?(n=t,(o=c.firstChild).parentNode.insertBefore(n,o)):c.appendChild(t))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(c,0):(n=function(){document.removeEventListener("DOMContentLoaded",n,!1),c()},document.addEventListener("DOMContentLoaded",n,!1)):document.attachEvent&&(o=c,l=e.document,i=!1,(s=function(){try{l.documentElement.doScroll("left")}catch(e){return void setTimeout(s,50)}h()})(),l.onreadystatechange=function(){"complete"==l.readyState&&(l.onreadystatechange=null,h())})}(window);
!function(c){var e,t,l,o,n,a,i,s='<svg><symbol id="el-icon-Userselect" viewBox="0 0 1024 1024"><path d="M512 431.158c-118.568 0-215.579-97.01-215.579-215.58S393.431 0 512 0s215.579 97.01 215.579 215.579S630.569 431.158 512 431.158z" fill="#5CD9EF" ></path><path d="M26.947 975.495C48.505 687.158 256 538.947 512 538.947c258.695 0 468.884 140.127 485.053 436.548 0 10.779 0 48.505-40.421 48.505H67.368c-13.473 0-40.42-32.337-40.42-48.505z" fill="#5CD9EF" ></path></symbol><symbol id="el-icon-Serviceusers" viewBox="0 0 1024 1024"><path d="M100.218349 795.959694L363.127203 652.998646v-8.368451C250.850477 558.853566 235.508316 404.037211 235.508316 279.905179a251.053548 251.053548 0 0 1 271.277306-278.948386h9.065822a251.750919 251.750919 0 0 1 271.277306 278.948386c0 126.921516-15.342161 278.948386-127.618887 367.514499v8.368452l262.211483 142.961048a69.737097 69.737097 0 0 1 36.960662 62.066016v93.447709a69.737097 69.737097 0 0 1-69.737097 69.737097H132.994784a69.737097 69.737097 0 0 1-69.737097-69.737097v-96.237193a69.737097 69.737097 0 0 1 36.960662-62.066016z m216.88237-521.633482c0 120.645177 12.552677 252.44829 109.487242 313.816934a43.237 43.237 0 0 1 18.829016 35.56592v69.737096c0 14.64479-11.855306 28.59221-36.960661 41.842258a1457.505319 1457.505319 0 0 0-255.237774 135.987338v73.921323h714.80524v-76.013435A1711.34835 1711.34835 0 0 0 614.18075 733.196307q-37.658032-20.223758-37.658032-41.842258v-69.737096a42.539629 42.539629 0 0 1 19.526387-35.56592C690.891557 526.774501 705.536347 394.971389 705.536347 274.326212a170.158516 170.158516 0 0 0-189.684903-193.869129h-9.065822c-126.224145 0-189.684903 65.552871-189.684903 193.869129z"  ></path></symbol><symbol id="el-icon-wendu" viewBox="0 0 1024 1024"><path d="M602.276 558.33c-13.947-18.441-30.136-35.081-48.574-49.023v-295.5c-0.9-84.112-69.719-152.024-153.825-151.128-83.66 0.45-150.676 67.917-151.572 151.127v295.5C137.66 593.419 116.52 751.289 200.627 861.933c40.028 52.618 98.95 87.255 164.618 96.701 12.145 1.802 23.84 2.698 35.984 2.698 54.42 0 107.049-17.54 150.226-50.375C662.994 827.3 685.48 669.425 602.275 558.33zM400.773 118.452c52.623 0 95.355 42.727 95.355 95.355V540.34l1.802 0.901c93.102 53.52 125.036 172.713 71.06 265.37-53.97 92.651-172.712 124.585-265.364 71.06-93.107-53.519-124.59-172.707-71.065-265.364a192.358 192.358 0 0 1 71.065-71.066l1.797-0.9V213.805c0.45-52.628 43.177-94.904 95.35-95.355z m474.066 86.805c0 15.293-12.595 27.888-27.889 27.888H648.602c-15.289-0.45-27.433-13.045-27.433-28.339 0.45-14.843 12.595-26.987 27.433-27.433H846.95c15.294 0 27.889 12.595 27.889 27.884z m0 132.239c0 15.293-12.595 27.884-27.889 27.884H648.602c-15.289-0.451-27.433-13.041-26.988-28.335 0.45-14.842 12.145-26.987 26.988-26.987H846.95c15.294-0.45 27.889 12.145 27.889 27.438z m0 125.036c0 15.293-12.595 27.883-27.889 27.883H648.602c-15.289 0.45-27.884-11.694-28.334-27.433-0.451-15.293 11.694-27.889 27.432-28.34h199.25a27.74 27.74 0 0 1 27.889 27.89z"  ></path><path d="M485.012 715.52c0 46.33-37.33 83.66-83.655 83.66S317.7 761.85 317.7 715.52c0-33.73 20.24-63.867 51.277-76.908V261.248a32.25 32.25 0 0 1 32.384-32.384 32.25 32.25 0 0 1 32.384 32.384v377.36c31.027 13.045 51.266 43.181 51.266 76.912z"  ></path></symbol><symbol id="el-icon-fenxiang" viewBox="0 0 1024 1024"><path d="M853.578 661.715c-65.68 0-119.381 35.158-144.39 89.736L391.713 616.41c18.518-28.693 28.692-63.85 28.692-101.764 0-15.711-1.854-31.448-5.563-46.258l202.703-157.269c26.864 20.348 61.12 32.376 99.059 32.376 91.641 0 160.128-68.46 160.128-159.097 0-90.663-68.512-159.124-160.128-159.124-91.641 0-159.2 68.46-159.2 159.124 0 23.129 4.636 44.404 12.028 62.897L382.44 390.68c-37.012-55.505-98.106-94.372-167.52-94.372A204.97 204.97 0 0 0 9.438 501.691a204.97 204.97 0 0 0 205.485 205.356c42.575 0 82.369-11.076 114.77-31.423l364.711 155.388c4.636 86.027 71.268 149.851 159.175 149.851 91.667 0 159.226-68.435 159.226-159.097 0-90.663-68.512-160.05-159.2-160.05z"  ></path></symbol><symbol id="el-icon-tongxun" viewBox="0 0 1024 1024"><path d="M560.198 975.488A48.32 48.32 0 0 1 512.006 1024a48.32 48.32 0 0 1-48.192-48.512V506.304a126.208 126.208 0 0 1-76.8-116.288c0-69.504 56-126.08 124.992-126.08s124.992 56.576 124.992 126.08c0 51.392-30.912 96.896-76.8 116.288v469.184z m152.704-848.384a307.2 307.2 0 0 1 145.92 262.912 307.2 307.2 0 0 1-145.92 262.848 47.744 47.744 0 0 1-66.304-16 48.64 48.64 0 0 1 15.808-66.56 210.56 210.56 0 0 0 100.032-180.288 210.56 210.56 0 0 0-100.032-180.288 48.64 48.64 0 0 1-15.808-66.624 48 48 0 0 1 66.304-16z m311.104 262.912a472.96 472.96 0 0 1-188.608 380.288 47.808 47.808 0 0 1-67.52-9.728 48.704 48.704 0 0 1 9.664-67.84 376.32 376.32 0 0 0 150.144-302.72 376.32 376.32 0 0 0-150.144-302.72 48.704 48.704 0 0 1-9.6-67.84 48 48 0 0 1 67.456-9.728 472.96 472.96 0 0 1 188.608 380.288z m-662.4-180.288a210.56 210.56 0 0 0-100.032 180.288c0 74.112 37.376 141.44 100.032 180.288a48.64 48.64 0 0 1 15.872 66.56 48.064 48.064 0 0 1-66.368 16 307.2 307.2 0 0 1-145.92-262.848 307.2 307.2 0 0 1 145.92-262.912 48 48 0 0 1 66.304 16 48.64 48.64 0 0 1-15.808 66.624zM246.47 692.736a48.704 48.704 0 0 1 9.6 67.84 48 48 0 0 1-67.456 9.728A472.96 472.96 0 0 1 0.006 390.016 472.96 472.96 0 0 1 188.614 9.728a48 48 0 0 1 67.52 9.728 48.704 48.704 0 0 1-9.664 67.84 376.32 376.32 0 0 0-150.144 302.72 376.32 376.32 0 0 0 150.144 302.72z"  ></path></symbol><symbol id="el-icon-chazhao" viewBox="0 0 1024 1024"><path d="M938.176 832.512l-214.336-214.4c-2.496-2.496-5.248-4.352-7.872-6.528 36.16-55.552 57.344-121.728 57.344-193.024C773.312 222.72 614.592 64 418.688 64 222.848 64 64 222.72 64 418.624s158.848 354.624 354.688 354.624c71.232 0 137.472-21.248 193.216-57.344 1.984 2.752 3.904 5.376 6.336 7.744l214.4 214.528C847.232 952.768 866.24 960 885.376 960s38.208-7.232 52.8-21.888C967.296 908.992 967.296 861.76 938.176 832.512M418.688 661.248c-133.76 0-242.688-108.864-242.688-242.624 0-133.76 108.928-242.688 242.688-242.688s242.624 108.928 242.624 242.688C661.312 552.384 552.448 661.248 418.688 661.248"  ></path></symbol><symbol id="el-icon-xinxi" viewBox="0 0 1024 1024"><path d="M316.16 427.52h391.68c15.36 0 28.16-12.8 28.16-28.16 0-15.36-12.8-28.16-28.16-28.16H316.16c-15.36 0-28.16 12.8-28.16 28.16 0 16.64 12.8 28.16 28.16 28.16z m111.36-195.84h167.68c46.08 0 84.48-37.12 84.48-84.48S642.56 64 596.48 64H427.52c-46.08 0-84.48 37.12-84.48 84.48s38.4 83.2 84.48 83.2z m0-111.36h167.68c15.36 0 28.16 12.8 28.16 28.16s-12.8 28.16-28.16 28.16H427.52c-15.36 0-28.16-12.8-28.16-28.16 0-15.36 12.8-28.16 28.16-28.16z m308.48 448c0-15.36-12.8-28.16-28.16-28.16H316.16c-15.36 0-28.16 12.8-28.16 28.16s12.8 28.16 28.16 28.16h391.68c15.36 0 28.16-12.8 28.16-28.16z m83.2-448h-84.48v56.32H819.2c15.36 0 28.16 12.8 28.16 28.16v672c0 15.36-12.8 28.16-28.16 28.16H203.52c-15.36 0-28.16-12.8-28.16-28.16V203.52c0-15.36 12.8-28.16 28.16-28.16h84.48V120.32h-84.48c-46.08 0-84.48 37.12-84.48 84.48v672c0 46.08 37.12 84.48 84.48 84.48H819.2c46.08 0 84.48-37.12 84.48-84.48V203.52c0-46.08-37.12-83.2-84.48-83.2zM316.16 707.84c-15.36 0-28.16 12.8-28.16 28.16 0 15.36 12.8 28.16 28.16 28.16h224c15.36 0 28.16-12.8 28.16-28.16 0-15.36-12.8-28.16-28.16-28.16H316.16z" fill="#515151" ></path></symbol><symbol id="el-icon-jinru" viewBox="0 0 1024 1024"><path d="M837.824 919.232 267.648 919.232c-67.52 0-122.176-54.656-122.176-122.176L145.472 634.176l81.472 0 0 53.248c0 83.072 67.264 150.4 150.4 150.4l350.848 0c83.008 0 150.4-67.328 150.4-150.4L878.592 336.576c0-83.072-67.392-150.4-150.4-150.4L377.344 186.176c-83.136 0-150.4 67.328-150.4 150.4l0 12.48L145.408 349.056 145.408 226.944c0-67.52 54.656-122.176 122.176-122.176l570.176 0C905.28 104.768 960 159.424 960 226.944l0 570.112C960 864.576 905.28 919.232 837.824 919.232zM471.232 308.352 715.648 512l-244.352 162.944L471.296 552.768 64 552.768 64 430.592l407.232 0L471.232 308.352z"  ></path></symbol><symbol id="el-icon-shuaxin" viewBox="0 0 1024 1024"><path d="M798.336 632.32c-16.896-11.2-35.328-13.184-43.2-5.312l-0.384-0.576c-0.256 0.704-0.704 1.344-0.96 1.984-0.128 0.128-0.32 0.192-0.384 0.32-0.384 0.512-0.512 1.152-0.704 1.664-43.776 87.808-133.952 148.288-238.656 148.288-128.32 0-235.2-90.496-260.992-211.136L294.4 608.896c0.32 0.448 0.576 1.024 0.96 1.344 9.984 9.984 32.192 3.968 49.664-13.44C362.368 579.392 368.448 557.184 358.528 547.2l0.192-0.192L250.944 439.232 250.368 439.232c-5.312-9.344-19.712-16-36.8-16s-31.488 6.656-36.8 16L176.64 439.232 67.328 548.416l0.192 0.256C59.456 559.168 65.472 580.096 82.112 596.8c16.64 16.64 37.568 22.72 48.128 14.528l0.192 0.256 43.392-43.392c26.944 163.584 169.024 288.384 340.224 288.384 132.608 0 247.488-74.944 305.152-184.704L819.2 671.872C825.408 661.76 816.192 644.16 798.336 632.32z"  ></path><path d="M941.824 427.264c-16.704-16.704-37.568-22.72-48.128-14.592L893.44 412.416l-43.392 43.456c-27.008-163.648-168.96-288.448-340.224-288.448-132.544 0-247.424 74.944-305.152 184.704L204.8 352.128C198.528 362.24 207.744 379.84 225.6 391.68c16.896 11.2 35.264 13.184 43.136 5.376l0.384 0.512C269.44 396.864 269.824 396.224 270.208 395.584c0.064-0.128 0.192-0.192 0.32-0.32 0.32-0.512 0.448-1.152 0.704-1.664C314.88 305.792 405.12 245.248 509.824 245.248c128.32 0 235.264 90.56 260.992 211.136l-41.28-41.28c-0.384-0.448-0.64-1.024-1.024-1.344-9.92-9.984-32.128-3.968-49.536 13.504-17.408 17.344-23.488 39.552-13.568 49.536l-0.192 0.256 107.776 107.712 0.576 0c5.376 9.344 19.712 16 36.736 16s31.424-6.656 36.8-16l0.256 0 109.184-109.184-0.192-0.192C964.544 464.832 958.528 443.904 941.824 427.264z"  ></path></symbol></svg>',d=(e=document.getElementsByTagName("script"))[e.length-1].getAttribute("data-injectcss");if(d&&!c.__iconfont__svg__cssinject__){c.__iconfont__svg__cssinject__=!0;try{document.write("<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>")}catch(c){console&&console.log(c)}}function h(){a||(a=!0,o())}t=function(){var c,e,t,l,o,n=document.createElement("div");n.innerHTML=s,s=null,(c=n.getElementsByTagName("svg")[0])&&(c.setAttribute("aria-hidden","true"),c.style.position="absolute",c.style.width=0,c.style.height=0,c.style.overflow="hidden",e=c,(t=document.body).firstChild?(l=e,(o=t.firstChild).parentNode.insertBefore(l,o)):t.appendChild(e))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(t,0):(l=function(){document.removeEventListener("DOMContentLoaded",l,!1),t()},document.addEventListener("DOMContentLoaded",l,!1)):document.attachEvent&&(o=t,n=c.document,a=!1,(i=function(){try{n.documentElement.doScroll("left")}catch(c){return void setTimeout(i,50)}h()})(),n.onreadystatechange=function(){"complete"==n.readyState&&(n.onreadystatechange=null,h())})}(window);
src/assets/iconfont/iconfont.json
@@ -6,6 +6,41 @@
  "description": "",
  "glyphs": [
    {
      "icon_id": "9184709",
      "name": "User select",
      "font_class": "Userselect",
      "unicode": "e60a",
      "unicode_decimal": 58890
    },
    {
      "icon_id": "17013249",
      "name": "Service users",
      "font_class": "Serviceusers",
      "unicode": "e67a",
      "unicode_decimal": 59002
    },
    {
      "icon_id": "13056755",
      "name": "温度",
      "font_class": "wendu",
      "unicode": "e611",
      "unicode_decimal": 58897
    },
    {
      "icon_id": "14404322",
      "name": "分 享",
      "font_class": "fenxiang",
      "unicode": "e607",
      "unicode_decimal": 58887
    },
    {
      "icon_id": "16847193",
      "name": "通讯",
      "font_class": "tongxun",
      "unicode": "e608",
      "unicode_decimal": 58888
    },
    {
      "icon_id": "169952",
      "name": "查找",
      "font_class": "chazhao",
src/assets/iconfont/iconfont.svg
@@ -20,6 +20,21 @@
  />
    <missing-glyph />
    
    <glyph glyph-name="Userselect" unicode="&#58890;" d="M512 464.842c-118.568 0-215.579 97.01-215.579 215.58S393.431 896 512 896s215.579-97.01 215.579-215.579S630.569 464.842 512 464.842zM26.947-79.495C48.505 208.842 256 357.053 512 357.053c258.695 0 468.884-140.127 485.053-436.548 0-10.779 0-48.505-40.421-48.505H67.368c-13.473 0-40.42 32.337-40.42 48.505z"  horiz-adv-x="1024" />
    <glyph glyph-name="Serviceusers" unicode="&#59002;" d="M100.218349 100.040306L363.127203 243.001354v8.368451C250.850477 337.146434 235.508316 491.962789 235.508316 616.094821a251.053548 251.053548 0 0 0 271.277306 278.948386h9.065822a251.750919 251.750919 0 0 0 271.277306-278.948386c0-126.921516-15.342161-278.948386-127.618887-367.514499v-8.368452l262.211483-142.961048a69.737097 69.737097 0 0 0 36.960662-62.066016v-93.447709a69.737097 69.737097 0 0 0-69.737097-69.737097H132.994784a69.737097 69.737097 0 0 0-69.737097 69.737097v96.237193a69.737097 69.737097 0 0 0 36.960662 62.066016z m216.88237 521.633482c0-120.645177 12.552677-252.44829 109.487242-313.816934a43.237 43.237 0 0 0 18.829016-35.56592v-69.737096c0-14.64479-11.855306-28.59221-36.960661-41.842258a1457.505319 1457.505319 0 0 1-255.237774-135.987338v-73.921323h714.80524v76.013435A1711.34835 1711.34835 0 0 1 614.18075 162.803693q-37.658032 20.223758-37.658032 41.842258v69.737096a42.539629 42.539629 0 0 0 19.526387 35.56592C690.891557 369.225499 705.536347 501.028611 705.536347 621.673788a170.158516 170.158516 0 0 1-189.684903 193.869129h-9.065822c-126.224145 0-189.684903-65.552871-189.684903-193.869129z"  horiz-adv-x="1024" />
    <glyph glyph-name="wendu" unicode="&#58897;" d="M602.276 337.67c-13.947 18.441-30.136 35.081-48.574 49.023v295.5c-0.9 84.112-69.719 152.024-153.825 151.128-83.66-0.45-150.676-67.917-151.572-151.127v-295.5C137.66 302.581 116.52 144.711 200.627 34.067c40.028-52.618 98.95-87.255 164.618-96.701 12.145-1.802 23.84-2.698 35.984-2.698 54.42 0 107.049 17.54 150.226 50.375C662.994 68.7 685.48 226.575 602.275 337.67zM400.773 777.548c52.623 0 95.355-42.727 95.355-95.355V355.66l1.802-0.901c93.102-53.52 125.036-172.713 71.06-265.37-53.97-92.651-172.712-124.585-265.364-71.06-93.107 53.519-124.59 172.707-71.065 265.364a192.358 192.358 0 0 0 71.065 71.066l1.797 0.9V682.195c0.45 52.628 43.177 94.904 95.35 95.355z m474.066-86.805c0-15.293-12.595-27.888-27.889-27.888H648.602c-15.289 0.45-27.433 13.045-27.433 28.339 0.45 14.843 12.595 26.987 27.433 27.433H846.95c15.294 0 27.889-12.595 27.889-27.884z m0-132.239c0-15.293-12.595-27.884-27.889-27.884H648.602c-15.289 0.451-27.433 13.041-26.988 28.335 0.45 14.842 12.145 26.987 26.988 26.987H846.95c15.294 0.45 27.889-12.145 27.889-27.438z m0-125.036c0-15.293-12.595-27.883-27.889-27.883H648.602c-15.289-0.45-27.884 11.694-28.334 27.433-0.451 15.293 11.694 27.889 27.432 28.34h199.25a27.74 27.74 0 0 0 27.889-27.89zM485.012 180.48c0-46.33-37.33-83.66-83.655-83.66S317.7 134.15 317.7 180.48c0 33.73 20.24 63.867 51.277 76.908V634.752a32.25 32.25 0 0 0 32.384 32.384 32.25 32.25 0 0 0 32.384-32.384v-377.36c31.027-13.045 51.266-43.181 51.266-76.912z"  horiz-adv-x="1024" />
    <glyph glyph-name="fenxiang" unicode="&#58887;" d="M853.578 234.285c-65.68 0-119.381-35.158-144.39-89.736L391.713 279.59c18.518 28.693 28.692 63.85 28.692 101.764 0 15.711-1.854 31.448-5.563 46.258l202.703 157.269c26.864-20.348 61.12-32.376 99.059-32.376 91.641 0 160.128 68.46 160.128 159.097 0 90.663-68.512 159.124-160.128 159.124-91.641 0-159.2-68.46-159.2-159.124 0-23.129 4.636-44.404 12.028-62.897L382.44 505.32c-37.012 55.505-98.106 94.372-167.52 94.372A204.97 204.97 0 0 1 9.438 394.309a204.97 204.97 0 0 1 205.485-205.356c42.575 0 82.369 11.076 114.77 31.423l364.711-155.388c4.636-86.027 71.268-149.851 159.175-149.851 91.667 0 159.226 68.435 159.226 159.097 0 90.663-68.512 160.05-159.2 160.05z"  horiz-adv-x="1024" />
    <glyph glyph-name="tongxun" unicode="&#58888;" d="M560.198-79.488A48.32 48.32 0 0 0 512.006-128a48.32 48.32 0 0 0-48.192 48.512V389.696a126.208 126.208 0 0 0-76.8 116.288c0 69.504 56 126.08 124.992 126.08s124.992-56.576 124.992-126.08c0-51.392-30.912-96.896-76.8-116.288v-469.184z m152.704 848.384a307.2 307.2 0 0 0 145.92-262.912 307.2 307.2 0 0 0-145.92-262.848 47.744 47.744 0 0 0-66.304 16 48.64 48.64 0 0 0 15.808 66.56 210.56 210.56 0 0 1 100.032 180.288 210.56 210.56 0 0 1-100.032 180.288 48.64 48.64 0 0 0-15.808 66.624 48 48 0 0 0 66.304 16z m311.104-262.912a472.96 472.96 0 0 0-188.608-380.288 47.808 47.808 0 0 0-67.52 9.728 48.704 48.704 0 0 0 9.664 67.84 376.32 376.32 0 0 1 150.144 302.72 376.32 376.32 0 0 1-150.144 302.72 48.704 48.704 0 0 0-9.6 67.84 48 48 0 0 0 67.456 9.728 472.96 472.96 0 0 0 188.608-380.288z m-662.4 180.288a210.56 210.56 0 0 1-100.032-180.288c0-74.112 37.376-141.44 100.032-180.288a48.64 48.64 0 0 0 15.872-66.56 48.064 48.064 0 0 0-66.368-16 307.2 307.2 0 0 0-145.92 262.848 307.2 307.2 0 0 0 145.92 262.912 48 48 0 0 0 66.304-16 48.64 48.64 0 0 0-15.808-66.624zM246.47 203.264a48.704 48.704 0 0 0 9.6-67.84 48 48 0 0 0-67.456-9.728A472.96 472.96 0 0 0 0.006 505.984 472.96 472.96 0 0 0 188.614 886.272a48 48 0 0 0 67.52-9.728 48.704 48.704 0 0 0-9.664-67.84 376.32 376.32 0 0 1-150.144-302.72 376.32 376.32 0 0 1 150.144-302.72z"  horiz-adv-x="1024" />
    <glyph glyph-name="chazhao" unicode="&#59052;" d="M938.176 63.488l-214.336 214.4c-2.496 2.496-5.248 4.352-7.872 6.528 36.16 55.552 57.344 121.728 57.344 193.024C773.312 673.28 614.592 832 418.688 832 222.848 832 64 673.28 64 477.376s158.848-354.624 354.688-354.624c71.232 0 137.472 21.248 193.216 57.344 1.984-2.752 3.904-5.376 6.336-7.744l214.4-214.528C847.232-56.768 866.24-64 885.376-64s38.208 7.232 52.8 21.888C967.296-12.992 967.296 34.24 938.176 63.488M418.688 234.752c-133.76 0-242.688 108.864-242.688 242.624 0 133.76 108.928 242.688 242.688 242.688s242.624-108.928 242.624-242.688C661.312 343.616 552.448 234.752 418.688 234.752"  horiz-adv-x="1024" />
    
src/assets/iconfont/iconfont.ttf
Binary files differ
src/assets/iconfont/iconfont.woff
Binary files differ
src/assets/iconfont/iconfont.woff2
Binary files differ
src/assets/images/kfz.png
src/assets/js/api.js
@@ -277,4 +277,17 @@
        url: "/yckj/zijing_sx/Batt_rtstateAction!serchBattStateRate",
        data: null
    });
}
/**
 * 检测当前用户是否在其他未知登录
 * 无参
 * @return  查询结果
 */
export const checkUserLogin = ()=>{
    return axios({
        method: "post",
        url: "/yckj/zijing_sx/LoginAction_check",
        data: null
    });
}
src/assets/js/apis/dischargeTest/e61850/config.md
New file
@@ -0,0 +1,2 @@
### 接口说明
获取参数,启动设备,停止设备的请求接口为同一个接口,后台通过num的值进行区分。
src/assets/js/apis/dischargeTest/e61850/index.js
New file
@@ -0,0 +1,67 @@
import axios from 'axios'
export default {
    /**
     * 获取参数
     *
     * @param   {[Object]}  data  查询后台需要的参数
     * json:{num:41, dev_id: 618500002}
     *
     * @return  {[Promise]}  查询结果
     */
    getParams(data) {
        // 请求后台查询内容
        return axios({
            method: 'post',
            url: '/yckj/zijing_sx/Fbs9100_setparamAction_action_serchbyDev_id',
            data: 'json='+JSON.stringify(data),
        });
    },
    /**
     * 设置参数
     *
     * @param   {[Object]}  data  设置参数的值
     *
     * @return  {[type]}        设置结果
     */
    setParams(data) {
        // 请求后台
        return axios({
            method: 'post',
            url: '/yckj/zijing_sx/Fbs9100_setparamAction_action_update61850Param',
            data: 'json='+JSON.stringify(data),
        });
    },
    /**
     * 启动测试
     *
     * @param   {[Object]}  data  查询后台需要的参数
     * json:{num: 81, dev_id: 618500002}
     *
     * @return  {[Promise]}  查询结果
     */
    start(data) {
        // 请求后台查询内容
        return axios({
            method: 'post',
            url: '/yckj/zijing_sx/Fbs9100_setparamAction_action_serchbyDev_id',
            data: 'json='+JSON.stringify(data),
        });
    },
    /**
     * 停止测试
     *
     * @param   {[Object]}  data  查询后台需要的参数
     * json:{num: 83, dev_id: 618500002}
     *
     * @return  {[Promise]}  查询结果
     */
    stop(data) {
        // 请求后台查询内容
        return axios({
            method: 'post',
            url: '/yckj/zijing_sx/Fbs9100_setparamAction_action_serchbyDev_id',
            data: 'json='+JSON.stringify(data),
        });
    },
};
src/assets/js/apis/dischargeTest/index.js
New file
@@ -0,0 +1,5 @@
import e61850 from './e61850'
export default {
    e61850
};
src/assets/js/apis/index.js
New file
@@ -0,0 +1,5 @@
import dischargeTest from './dischargeTest'
export default {
    dischargeTest
};
src/assets/js/axios.js
@@ -1,10 +1,16 @@
import Vue from 'vue';
import axios from 'axios';
import router from '@/router/index.js';
if(process.env.NODE_ENV == 'dev') {
    // 跨域请求
    axios.defaults.baseURL = 'http://127.0.0.1:8919/zijing_sx/';
}
// 添加请求拦截器
axios.interceptors.request.use(function (config) {
    if (process.env.NODE_ENV != 'dev') {
        config.url = config.url.replace('/yckj', '');
    }else {
        config.url = config.url.replace('/yckj/zijing_sx', '');
    }
    // 在发送请求之前做些什么
    return config;
@@ -18,22 +24,9 @@
    // 对响应数据做点什么
    return response;
}, function (error) {
    // 对响应错误做点什么
    if (error && error.response) {
        switch (error.response.status) {
            case 401:
                router.push("/login");
                break;
            case 403:
                router.push("/login");
                break;
            case 404:
                router.push("/login");
                break;
            default:
        }
    }
    return Promise.reject(error);
});
Vue.prototype.$axios = axios;
export default axios;
src/assets/js/const/const_61850.js
New file
@@ -0,0 +1,81 @@
export default {
    workstates: ["在线浮充","预充电","核容测试","停电放电","内阻测试","K1/D1测试", '离线养护测试', '未知'],
    alarmstates: ["继电器K1告警","通讯告警","设备过温告警","二极管D1告警"],
    stopreasons: {
        0:'设备掉电',1:'手动终止',2:'放电时间到',3:'放电容量到',4:'单体电压下限到',5:'单体温度上限到',6:'组端电压下限到',
        7:'市电中断',8:'单体模块通信异常',9:'存储数据满',10:'机内温度异常',11:'放电电流异常',12:'后台通信中断',13:'内部程序异常',
        14:'电源电压高',15:'协议转通信异常',16:'其他',27:'其他设备在工作',28:'其他设备故障停止',29:'电压过高或过低',30:'干接点故障'
    },
    failreasons: {
        0:'无', 1:'暂停',2:'正在放电测试',3:'正在等待放电',4:'正在限流充电',5:'正在直连充电',6:'正在等待充电',7:'放电时间到停止',
        8:'放电容量到停止',9:'单体电压下限到停止',10:'组端电压下限到停止',11:'市电中断停止',12:'存储数据满停止',13:'机内温度异常停止',
        14:'放电电流过流停止',15:'后台通信中断停止',16:'负载模块通信中断停止',17:'选择模块通信中断停止',18:'负载模块放电过功率停止',
        19:'内部程序异常停止',20:'市电恢复停止升压放电',21:'充电过程中市电中断',22:'组端电压下限',23:'单体温度上限到停止',24:'在线电压异常高停止',
        25:'协转通信异常停止',26:'单体通信异常停止',27:'其他设备在工作',28:'其他设备故障停止',29:'电压过高或过低',30:'干接点输入故障',
        31:'单体异常',32:'电压输入过高或过低',33: '电池电流异常', 34:'未知'
    },
    cmd: {
        start: 81,    // 启动测试
        stop: 83,    // 停止测试
        set: 40,    // 设置参数
        get: 41,    // 获取参数
    },
    testType: [
        {
            label: '核容放电',
            value: 37,
        },
        {
            label: '内阻测试',
            value: 50
        },
        {
            label: 'K1/D1测试',
            value: 72
        },
    ],
    dischargeRules: {
        DisCurr: {        // 核容电流
            pattern: /^[0-9]{1,3}$/,
            regVal: true,
            min: 1,
            max: 300,
            msg: '取值范围1~300(整数)'
        },
        DisTime: {        // 核容时长
            pattern: /^[0-9]{1,4}$/,
            regVal: true,
            min: 1,
            max: 10000,
            msg: '取值范围1~10000(整数)'
        },
        DisCap: {        // 核容容量
            pattern: /^[0-9]{1,4}$/,
            regVal: true,
            min: 1,
            max: 2000,
            msg: '取值范围1~2000(整数)'
        },
        GroupVol_Low: {        // 组端电压下限
            pattern: /^[0-9]{1,2}(\.[0-9]{0,1})?$/,
            regVal: true,
            min: 43,
            max: 54,
            msg: '取值范围43.0~54.0(保留一位小数)'
        },
        MonomerVol_Low: {        // 单体电压下限
            pattern: /^[0-9]{1,2}(\.[0-9]{0,2})?$/,
            regVal: true,
            min: 1.8,
            max: 2.25,
            msg: '取值范围1.80~2.25(保留两位小数)'
        },
        MonomerTmp_High: {        // 单体温度上限
            pattern: /^[0-9]{1,2}(\.[0-9]{0,1})?$/,
            regVal: true,
            min: 10,
            max: 60,
            msg: '取值范围10~60(保留一位小数)'
        }
    }
};
src/assets/js/const/const_9100.js
New file
@@ -0,0 +1,8 @@
export default {
    workstates: ['在线监测','放电测试','充电测试','内阻测试','未知'],
    alarmstates: [
        '无','暂停','放电测试','放电等待','限流充电','直流充电','充电等待','测试时间到',
        '测试容量到','单体下限到','组端下限到','市电异常','存储卡不足','负载温度高','电流异常','远程通信坏',
        '负载通信坏','选择通信坏','负载电流坏','内存申请坏','未知'
    ],
};
src/assets/js/const/index.js
New file
@@ -0,0 +1,7 @@
import const_9100 from './const_9100'
import const_61850 from './const_61850'
export {
    const_9100,
    const_61850,
};
src/assets/js/diagram/circuitDiagram.js
@@ -60,6 +60,8 @@
    // 绘制负载模块
    loaderMoudle(diagram, battGroup);
    // 设置页面中的文本
    setDiagramTexts(diagram);
    return diagram;
}
@@ -587,4 +589,68 @@
        ]
    });
}
function setDiagramTexts(diagram) {
    // 设备温度
    let line3 = diagram.getOption('line3').points;
    let line13 = diagram.getOption('line13').points;
    let offset1 = (line13[0][0] - line3[0][0])/2;
    diagram.text({
        id: 'devTemp',
        flush: true,
        baseline: 'top',
        align: 'center',
        fontSize: 16,
        point: [line3[0][0]+offset1, line3[0][1]+16],
        text: '设备温度:0℃'
    });
    // 电流
    let line15 = diagram.getOption('line15').points;
    let offset2 = (line15[1][0] - line15[0][0])/2;
    diagram.text({
        id: 'battCurr',
        flush: true,
        baseline: 'top',
        align: 'center',
        fontSize: 16,
        point: [line15[0][0]+offset2, line15[0][1]+16],
        text: '0.00A'
    });
    // 在线电压
    let line16 = diagram.getOption('line16').points;
    let offset3 = (line16[1][0] - line16[0][0])/2;
    diagram.text({
        id: 'onlineVol',
        flush: true,
        baseline: 'top',
        align: 'center',
        fontSize: 16,
        point: [line16[0][0]+offset3, line16[0][1]+16],
        text: '0.00V'
    });
    // 组端电压
    let line11 = diagram.getOption('line11').points;
    diagram.text({
        id: 'groupVol',
        flush: true,
        baseline: 'bottom',
        align: 'left',
        fontSize: 16,
        point: [line11[1][0]+8,line11[1][1]-4],
        text: '0.00V'
    });
    // 设置电路图类型
    diagram.text({
        id: 'type',
        flush: true,
        fontSize: 14,
        align: 'center',
        point: [diagram.width/2, 10],
        text: '设备未连接',
    });
}
export default circuitDiagram;
src/assets/js/diagram/diagramStates.js
@@ -5,6 +5,9 @@
let red = "#FF0000";
// 放电状态
function diagramStates(diagram, type) {
    // 设置电路图类型
    diagram.setOption('type', 'text', '设备状态未知');
    // 断开所有的开关
    diagram.setOption('km1', 'state', false);
    diagram.setOption('km2', 'state', false);
@@ -27,6 +30,15 @@
        case 'float':
            floatCharge(diagram);
        break;
        case 'kd':
            kdTest(diagram);
        break;
        case 'yh':
            yhTest(diagram);
        break;
        case 'break':
            diagram.setOption('type', 'text', '设备未连接');
        break;
        default:
            console.log('默认状态');
        break;
@@ -35,6 +47,9 @@
// 放电状态
function discharge(diagram) {
    // 设置电路图类型
    diagram.setOption('type', 'text', '放电状态');
    // 关闭km2和km3
    diagram.setOption('km2', 'state', true);
    diagram.setOption('km3', 'state', true);
@@ -212,6 +227,9 @@
// 充电状态
function charge(diagram) {
    // 设置电路图类型
    diagram.setOption('type', 'text', '充电状态');
    // 关闭km2和km3
    diagram.setOption('km2', 'state', true);
    diagram.setOption('km3', 'state', true);
@@ -403,6 +421,9 @@
// 浮充状态
function floatCharge(diagram) {
    // 设置电路图类型
    diagram.setOption('type', 'text', '在线浮充状态');
    // 关闭km1
    diagram.setOption('km1', 'state', true);
@@ -451,10 +472,7 @@
        id: 'line19_dot',
        fillStyle: springGreen,
        flush: true,
        points: [
            line19[1],
            line19[0]
        ],
        points: line19,
    });
    // 线条18
@@ -463,10 +481,7 @@
        id: 'line18_dot',
        fillStyle: springGreen,
        flush: true,
        points: [
            line18[1],
            line18[0]
        ],
        points: line18,
    });
    // 线条17
@@ -475,10 +490,7 @@
        id: 'line17_dot',
        fillStyle: springGreen,
        flush: true,
        points: [
            line17[1],
            line17[0]
        ],
        points: line17,
    });
    
    // 线条16
@@ -487,10 +499,7 @@
        id: 'line16_dot',
        fillStyle: springGreen,
        flush: true,
        points: [
            line16[1],
            line16[0]
        ],
        points: line16,
    });
    // 线条15
@@ -571,4 +580,178 @@
        ],
    });
}
// kd测试
function kdTest(diagram) {
    // 设置电路图类型
    diagram.setOption('type', 'text', 'K1/D1测试');
    // 关闭km1,km2
    diagram.setOption('km1', 'state', true);
    diagram.setOption('km2', 'state', true);
    // 修改充放电模块的状态
    diagram.setOption('dischargeState', 'url', lightDangerImage);
    // 绘制可移动的点
    let line1 = diagram.getOption('line1').points;
    diagram.moveDot({
        id: 'line1_dot',
        fillStyle: springGreen,
        flush: true,
        points: line1,
    });
    // 绘制可移动的点
    let line2 = diagram.getOption('line2').points;
    diagram.moveDot({
        id: 'line2_dot',
        fillStyle: springGreen,
        flush: true,
        points: line2,
    });
    // 绘制可移动的点
    let line8 = diagram.getOption('line8').points;
    let line13 = diagram.getOption('line13').points;
    diagram.moveDot({
        id: 'line8_1_dot',
        fillStyle: springGreen,
        flush: true,
        points: [
            line8[0],
            line13[0]
        ],
    });
    diagram.moveDot({
        id: 'line13_dot',
        fillStyle: springGreen,
        flush: true,
        points: line13,
    });
    // 绘制可移动的点
    let line14 = diagram.getOption('line14').points;
    diagram.moveDot({
        id: 'line14_dot',
        fillStyle: springGreen,
        flush: true,
        points: line14,
    });
    // 绘制可移动的点
    let line9 = diagram.getOption('line9').points;
    diagram.moveDot({
        id: 'line9_dot',
        fillStyle: springGreen,
        flush: true,
        points: [
            line14[1],
            line9[0]
        ],
    });
    // 绘制可移动的点
    let line7 = diagram.getOption('line7').points;
    diagram.moveDot({
        id: 'line7_dot',
        fillStyle: springGreen,
        flush: true,
        points: [
            line7[1],
            line7[0]
        ],
    });
    // 绘制可移动的点
    let line5 = diagram.getOption('line5').points;
    diagram.moveDot({
        id: 'line5_dot',
        fillStyle: springGreen,
        flush: true,
        points: line5,
    });
    // 绘制可移动的点
    let line6 = diagram.getOption('line6').points;
    diagram.moveDot({
        id: 'line6_dot',
        fillStyle: springGreen,
        flush: true,
        points: line6,
    });
}
// 离线养护模式
function yhTest(diagram) {
    // 设置电路图类型
    diagram.setOption('type', 'text', '离线养护测试');
    // 绘制移动的点
    let line17 = diagram.getOption('line17').points;
    diagram.moveDot({
        id: 'line17_dot',
        fillStyle: springGreen,
        flush: true,
        points: [
            line17[1],
            line17[0]
        ],
    });
    // 绘制移动的点
    let line16 = diagram.getOption('line16').points;
    diagram.moveDot({
        id: 'line16_dot',
        fillStyle: springGreen,
        flush: true,
        points: [
            line16[1],
            line16[0]
        ],
    });
    // 绘制移动的点
    let line21 = diagram.getOption('line21').points;
    diagram.moveDot({
        id: 'line21_dot',
        fillStyle: springGreen,
        flush: true,
        points: line21,
    });
    // 绘制移动的点
    let line22 = diagram.getOption('line22').points;
    diagram.moveDot({
        id: 'line22_dot',
        fillStyle: springGreen,
        flush: true,
        points: line22,
    });
    // 绘制移动的点
    let line19 = diagram.getOption('line19').points;
    diagram.moveDot({
        id: 'line19_dot',
        fillStyle: springGreen,
        flush: true,
        points: [
            line19[1],
            line19[0]
        ],
    });
    // 绘制移动的点
    let line18 = diagram.getOption('line18').points;
    diagram.moveDot({
        id: 'line18_dot',
        fillStyle: springGreen,
        flush: true,
        points: [
            line18[1],
            line18[0]
        ],
    });
}
export default diagramStates;
src/assets/js/realTime.js
@@ -30,7 +30,7 @@
 * 根据设备id查询设备当前的开关状态
 * json={"dev_id":910000022}
 */
export const realTimePoweOff = (params) => {
export const realTimePowerOff = (params) => {
    return axios({
        method: "post",
        url: "/yckj/zijing_sx/Fbs9100_stateAction_action_serchContactorState",
src/assets/js/tools/GetHourRate.js
New file
@@ -0,0 +1,38 @@
/**
 * 获取放电小时率
 *
 * @param   {[Number]}  stdah   标称容量
 * @param   {[Number]}  current  当前电流
 *
 * @return  {[Number]}           [return description]
 */
function GetHourRate(stdah,current)
{
    var index = 0;
    var value=[5.14, 3.06, 2.50, 2.00, 1.66, 1.46, 1.31, 1.18, 1.08, 1.00, 0.55, 0.40];
    var res;
    current = Math.abs(current);
    res = current/(stdah/10);
    if(res >= 5.14) return 1;
    else if(res <= 0.55) return 20;
    else
    {
        for(var index=0; index<10; index++)
        {
            if((res<=value[index]) && (res>value[index+1]))
                break;
            else continue;
        }
        if((value[index]-res) < (res-value[index+1]))
        {
            return (index+1);
        }
        else
        {
            if(index+2 > 10) return (20);
            else return (index+2);
        }
    }
}
export default GetHourRate;
src/assets/js/tools/GetMonomerCap.js
New file
@@ -0,0 +1,39 @@
import N_TO_10H from './N_TO_10H'
/**
 * 获取剩余容量/实际容量
 *
 * @param   {[Number]}  STDAH         标称容量
 * @param   {[Number]}  HourRate      放电小时率
 * @param   {[Number]}  SumAH         测试容量
 * @param   {[Number]}  MaxMonomerVol   单体电压最大值
 * @param   {[Number]}  MonomerVol      单体电压最大值
 * @param   {[Number]}  MonomerVolType  电池标称电压
 * @param   {[Number]}  CapType         容量类型(定值是常量)(0:实际容量,1剩余容量)
 *
 * @return  {[Number]}                  [return description]
 */
function GetMonomerCap(STDAH, HourRate, SumAH, MaxMonomerVol, MonomerVol, MonomerVolType, CapType) {
    if ((MaxMonomerVol - MonomerVolType * 0.9) <= 0)
        return 0;
    if (SumAH < 0)
        SumAH *= (-1);
    let tmp_cap;
    tmp_cap = MonomerVol - MonomerVolType * 0.9;
    tmp_cap *= (STDAH - SumAH * N_TO_10H(HourRate));
    let dt_vol = MaxMonomerVol - MonomerVolType * 0.9;
    if (dt_vol < 0.01)
        dt_vol = 0.01;
    tmp_cap = tmp_cap / dt_vol;
    if (tmp_cap < 0)
        tmp_cap = 0;
    if (CapType == 0)
        return tmp_cap;
    else if (CapType == 1)
        return (tmp_cap + SumAH * N_TO_10H(HourRate));
    else
        return ((tmp_cap + SumAH * N_TO_10H(HourRate)) * 100 / STDAH);
}
export default GetMonomerCap;
src/assets/js/tools/N_TO_10H.js
New file
@@ -0,0 +1,20 @@
function N_TO_10H(n_H)
{
    switch(n_H)
    {
        case  1 : return(1/0.55);
        case  2 : return(1/0.61);
        case  3 : return(1/0.75);
        case  4 : return(1/0.79);
        case  5 : return(1/0.833);
        case  6 : return(1/0.876);
        case  7 : return(1/0.917);
        case  8 : return(1/0.944);
        case  9 : return(1/0.974);
        case  10: return(1/1);
        case  20: return(1/1.1);
    }
    return 1.0;
}
export default N_TO_10H;
src/assets/js/tools/Timeout.js
New file
@@ -0,0 +1,43 @@
// 延时计时器
function Timeout() {
    this.timer = null;
    this.time = '';
    this.callback = '';
    this.workState = false;
}
// 开启计时器并添加
Timeout.prototype.start = function(callback, time, exe) {
    // 配置执行函数
    if(typeof callback == 'function' && typeof time == 'number') {
        this.callback = callback;
        this.time = time;
        if(exe != 'exe') {
            this.workState = true;
            callback();
        }else {
            // 已经停止了
            if(!this.workState) {
                return;
            }
            // 清除计时器
            clearTimeout(this.timer);
            this.timer = setTimeout(callback, time);
        }
    }else {
        console.warn('未完整配置参数!');
    }
};
// 开启计时器
Timeout.prototype.open = function() {
    var callback = this.callback;
    var time = this.time;
    this.start(callback, time, 'exe');
};
// 关闭计时器
Timeout.prototype.stop = function() {
    clearTimeout(this.timer);
    this.workState = false;
};
export default Timeout;
src/assets/js/tools/getBarNum.js
New file
@@ -0,0 +1,28 @@
/**
 * 获取柱状图的重要的数据
 *
 * @param   {[type]}  data  柱状图数据
 *
 * @return  {[type]}        [return description]
 */
function getBarNum(data) {
    let result = {};
    let arr = [];
    let sum = 0;
    data.forEach(item=> {
        let val = Number(item[1]);
        arr.push(val);
        sum += val;
    });
    // 获取平均值
    let avg = data.length>0?sum/data.length:0;
    return {
        min: Math.min.apply(null, arr),
        max: Math.max.apply(null, arr),
        sum: sum,
        avg: avg,
    }
}
export default getBarNum;
src/assets/js/tools/index.js
@@ -2,9 +2,24 @@
import getQueryString from './getQueryString';      // 解析地址栏
import getTreeDataByKey from './getTreeDataByKey';
import sethoubeiTime from './sethoubeiTime'  /* 计算续航时长方法 */
import Timeout from './Timeout'
import regEquipType from './regEquipType'
import GetMonomerCap from './GetMonomerCap'
import GetHourRate from './GetHourRate'
import N_TO_10H from './N_TO_10H'
import getBarNum from './getBarNum'
import testVal from './testVal'
export {
    formatSeconds,
    getQueryString,
    getTreeDataByKey,
    sethoubeiTime
    sethoubeiTime,
    Timeout,
    regEquipType,
    GetMonomerCap,
    GetHourRate,
    N_TO_10H,
    getBarNum,
    testVal
}
src/assets/js/tools/regEquipType.js
New file
@@ -0,0 +1,42 @@
/**
 * 验证设备类型
 *
 * @param   {[String, Number]}  dev_id  设备id
 * @param   {[String,Array]}  type    设备类型
 *
 * @return  {[type]}          验证结果
 */
function regEquipType(dev_id, type) {
    let patterns = {
        LD9: /^40190/,
        equip61850: /^61850/,
        BTS:/^(9100)|(9600)|(9616)/,
        BTSSreen: /^9611/,
        equip4016:/^4016/
    };
    let effectPtns = [];
    // 数据类型为字符串
    if(typeof type == 'string') {
        if(patterns[type]) {
            effectPtns.push(patterns[type]);
        }
    }else {     // 为数组时
        type.forEach(item=>{
            if(patterns[item]) {
                effectPtns.push(patterns[item]);
            }
        });
    }
    let result = false;     // 定义返回结果,默认为false
    // 遍历所有的形参
    for(let i=0; i<effectPtns.length;i++) {
        if(effectPtns[i].test(dev_id)) {
            result = true;
            break;
        }
    }
    return result;
}
export default regEquipType;
src/assets/js/tools/testVal.js
New file
@@ -0,0 +1,32 @@
/**
 * 校验数据
 *
 * @param   {[Number,String]}  val     [val description]
 * @param   {[Object]}  option  [option description]
 *
 * @return  {[Object]}          [return description]
 */
function testVal(rules, val, callback, option) {
    let result = {
        code: 1,
        msg: option.msg
    };
    // 根据正则验证数据
    result.code = option.pattern.test(val)?1:0;
    if(result.code == 1 && option.regVal) {
        let min = option.min;
        let max =option.max;
        if(min > val || max < val) {
            result.code = 0;
        }
    }
    if(result.code == 0) {
        callback(new Error(option.msg));
    }else {
        callback()
    }
}
export default testVal;
src/components/ContentBox.vue
@@ -136,7 +136,7 @@
    right: 1px;
    top: 50%;
    margin-top: -20px;
    z-index: 9999;
    z-index: 99;
    background-color: #000000;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
src/components/PageHeader.vue
@@ -6,10 +6,22 @@
                    <img src="../assets/images/yuanchang_logo.png">
                    <span>蓄电池监控平台</span>
                </div>
                <!-- <div class="info-banner">
                    <div class="info-banner-text">机房停电数:</div>
                    <div class="info-banner-val">123</div>
                </div> -->
                <div class="page-header-right" slot="footer">
                    <div class="hdw-avatar">
                        <span class="hdw-avatar-icon">
                            <i class="iconfont el-icon-Userselect"></i>
                        </span>
                        <el-dropdown @command="commandClick">
                            <span class="hdw-avatar-text">
                                {{username}}<i class="el-icon-arrow-down el-icon--right"></i>
                            </span>
                            <el-dropdown-menu slot="dropdown">
                                <el-dropdown-item>密码修改</el-dropdown-item>
                                <el-dropdown-item command="outSystem">安全退出</el-dropdown-item>
                            </el-dropdown-menu>
                        </el-dropdown>
                    </div>
                </div>
            </flex-layout>
        </div>
    </div>
@@ -17,7 +29,26 @@
<script>
export default {
    data() {
        return {
           username: sessionStorage.getItem('username'),
        }
    },
    methods: {
        outSystem() {
            this.$router.push('/login');
        },
        commandClick(name) {
            switch(name) {
                case 'outSystem':
                    this.outSystem();
                break;
                default:
                    this.$layer.msg('该功能暂未开放!');
                break;
            }
        }
    }
}
</script>
@@ -46,6 +77,34 @@
    padding-top: 8px;
    padding-bottom: 8px;
}
.hdw-avatar {
    margin-top: 10px;
    margin-right: 16px;
    cursor: pointer;
    color: #e4e3e3;
}
.hdw-avatar:hover {
    color: #FFFFFF;
}
.hdw-avatar:hover .el-icon-arrow-down {
    transform: rotate(180deg);
}
.hdw-avatar-icon {
    display: inline-block;
    padding: 8px;
    border-radius: 16px;
    background-color: #87d068;
}
.hdw-avatar-icon .iconfont {
    font-size: 16px;
}
.hdw-avatar-text {
    color: #FFFFFF;
    margin-left: 8px;
}
.hdw-avatar-text .el-icon-arrow-down {
    margin-left: 4px;
}
</style>
src/components/PageMenu.vue
@@ -63,73 +63,40 @@
                        },
                    ]
                },
                  {
                    label: '数据管理',
                    name: 'dataMager',
                    src: '',
                    icon: 'el-icon-s-help',
                    closable: false,
                    childrens: [
                        {
                            label: '电池充放电数据管理',
                            name: 'dataAdmian',
                            src: '#/dataAdmian',
                            closable: true,
                        },
                        {
                           label: '内阻测试',
                            name: 'internalTest',
                            src: '#/internalTest',
                            closable: true,
                        },
                           {
                            label: '电池放电测试',
                            name: 'dischargeTest',
                            src: '#/dischargeTest',
                            closable: true,
                        },
                        {
                           label: '电池关注管理',
                            name: 'batteryMager',
                            src: '#/batteryMager',
                            closable: true,
                        },
                    ]
                },
                   {
                    label: '告警管理',
                    name: 'alarmMager',
                    src: '',
                    icon: 'el-icon-message-solid',
                    closable: false,
                    childrens: [
                        {
                            label: '电池告警历史查询',
                            name: 'batteryrHistoryquery',
                            src: '#/batteryrHistoryquery',
                            closable: true,
                        },
                        {
                           label: '电池告警实时查询',
                            name: 'batteryrTimequery',
                            src: '#/batteryrTimequery',
                            closable: true,
                        },  {
                            label: '设备告警历史查询',
                            name: 'deviceHistoryquery',
                            src: '#/deviceHistoryquery',
                            closable: true,
                        },
                        {
                           label: '设备告警实时查询',
                            name: 'deviceTimequery',
                            src: '#/deviceTimequery',
                            closable: true,
                        },
                    ]
                },
            ]
                //   {
                //     label: '数据管理',
                //     name: 'dataMager',
                //     src: '',
                //     icon: 'el-icon-s-help',
                //     closable: false,
                //     childrens: [
                //         {
                //             label: '电池充放电数据管理',
                //             name: 'dataAdmian',
                //             src: '#/dataAdmian',
                //             closable: true,
                //         },
                //         {
                //            label: '内组测试',
                //             name: 'internalTest',
                //             src: '#/internalTest',
                //             closable: true,
                //         },
                //            {
                //             label: '电池放电测试',
                //             name: 'dischargeTest',
                //             src: '#/dischargeTest',
                //             closable: true,
                //         },
                //         {
                //            label: '电池关注管理',
                //             name: 'batteryMager',
                //             src: '#/batteryMager',
                //             closable: true,
                //         },
                //     ]
                // }
            ],
        }
    },
    methods: {
src/components/ScienceBox.vue
@@ -78,7 +78,7 @@
    border: 2px solid #34ccee;
    border-image: linear-gradient(#12566d, #197796, #6decff, #197796, #12566d) 9;
    color: #FFFFFF;
    z-index: 999;
    z-index: 9;
}
.box-content {
    height: 100%;
src/components/ThreeBtn.vue
New file
@@ -0,0 +1,75 @@
<template>
    <div class="three-btn"
    :class="{'tree-btn-disabled': disabled}"
    @click="handleClick">
        <slot></slot>
    </div>
</template>
<script>
export default {
    props: {
        disabled: {
            type: Boolean,
            default: false,
        }
    },
    methods: {
        handleClick() {
            if(!this.disabled) {
                this.$emit('click');
            }
        }
    }
}
</script>
<style scoped>
.three-btn{
    display: inline-block;
    color: rgba(255,255,255,1);
    text-decoration: none;
    background-color: rgb(5,170,219);
    font-family: 'Yanone Kaffeesatz';
    font-weight: 700;
    padding: 6px 32px;
    -webkit-border-radius: 8px;
    -moz-border-radius: 8px;
    border-radius: 8px;
    -webkit-box-shadow: 0px 9px 0px rgb(24, 137, 171), 0px 9px 25px rgba(0,0,0,.7);
    -moz-box-shadow: 0px 9px 0px rgb(24, 137, 171), 0px 9px 25px rgba(0,0,0,.7);
    box-shadow: 0px 9px 0px rgb(24, 137, 171), 0px 9px 25px rgba(0,0,0,.7);
    text-align: center;
    cursor: pointer;
    -webkit-transition: all .1s ease;
    -moz-transition: all .1s ease;
    -ms-transition: all .1s ease;
    -o-transition: all .1s ease;
    transition: all .1s ease;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
.three-btn.tree-btn-disabled {
    color: #d4d4d4;
    cursor: not-allowed;
}
.three-btn.tree-btn-disabled:active {
    -webkit-box-shadow: 0px 9px 0px rgb(24, 137, 171), 0px 9px 25px rgba(0,0,0,.7);
    -moz-box-shadow: 0px 9px 0px rgb(24, 137, 171), 0px 9px 25px rgba(0,0,0,.7);
    box-shadow: 0px 9px 0px rgb(24, 137, 171), 0px 9px 25px rgba(0,0,0,.7);
    position: relative;
    top: 0px;
}
.three-btn:active {
    -webkit-box-shadow: 0px 3px 0px rgb(24, 137, 171), 0px 3px 6px rgba(0,0,0,.9);
    -moz-box-shadow: 0px 3px 0px rgb(24, 137, 171), 0px 3px 6px rgba(0,0,0,.9);
    box-shadow: 0px 3px 0px rgb(24, 137, 171), 0px 3px 6px rgba(0,0,0,.9);
    position: relative;
    top: 6px;
}
</style>
src/components/chart/BarChart.vue
@@ -39,6 +39,14 @@
        showLabel: {
            type: Boolean,
            default: true,
        },
        maxColor: {
            type: String,
            default: 'green',
        },
        minColor:  {
            type: String,
            default: 'red',
        }
    },
    methods:{
@@ -92,7 +100,7 @@
                            if(max == -Infinity) {
                                max = 1;
                            }
                            return Math.ceil(max*1.01);
                            return Number((max+max*0.2).toFixed(2));
                        }
                    }
                ],
@@ -126,6 +134,8 @@
            if(!opt || !opt.series) {
                return [];
            }
            let minColor = this.minColor;
            let maxColor = this.maxColor;
            // 设置配置项
            let series = opt.series.map(item=>{
                let max = this.getMax(item.data);
@@ -154,9 +164,9 @@
                        color: function(value) {
                            let val = value.value[1];
                            if(val == max) {
                                return 'green';
                                return maxColor;
                            }else if(val == min) {
                                return 'red';
                                return minColor;
                            }
                        }
                    };
src/components/index.js
@@ -1,5 +1,7 @@
import Vue from 'vue'
import FlexLayout from './FlexLayout.vue'
import ThreeBtn from './ThreeBtn.vue'
// 注册全局自定义组件
Vue.component("FlexLayout", FlexLayout);
Vue.component("FlexLayout", FlexLayout);
Vue.component("ThreeBtn", ThreeBtn)
src/components/params/61850/DischargeParams.vue
New file
@@ -0,0 +1,365 @@
<template>
    <el-form
    ref="ruleForm"
    size="mini"
    label-position="top"
    :model="params"
    :rules="rules"
    class="params-dialog">
        <el-form-item label="电池组名称">
            <el-input v-model="otherParams.groupName" readonly></el-input>
        </el-form-item>
        <div class="table-layout">
            <div class="table-row">
                <div class="table-cell pr16">
                    <el-form-item label="设备ID">
                        <el-input v-model="otherParams.FBSDeviceId" readonly></el-input>
                    </el-form-item>
                </div>
                <div class="table-cell">
                    <el-form-item label="电池组信息">
                        <el-input v-model="otherParams.groupInfo" readonly></el-input>
                    </el-form-item>
                </div>
            </div>
            <div class="table-row">
                <div class="table-cell pr16">
                    <el-form-item label="电池组号">
                        <el-input v-model="otherParams.GroupIndexInFBSDevice" readonly></el-input>
                    </el-form-item>
                </div>
                <div class="table-cell">
                    <el-form-item label="测试类型">
                        <el-select v-model="params.TestCmd" placeholder="请选择">
                            <el-option
                            v-for="item in testType" :key="item.val"
                            :label="item.label"
                            :value="item.value"></el-option>
                        </el-select>
                    </el-form-item>
                </div>
            </div>
            <div class="table-row">
                <div class="table-cell pr16">
                    <el-form-item label="核容电流(1~300A)" prop="DisCurr">
                        <el-input v-model="params.DisCurr" :readonly="readOnly"></el-input>
                    </el-form-item>
                </div>
                <div class="table-cell">
                    <el-form-item label="核容时长(1~10000分钟)" prop="DisTime">
                        <el-input v-model="params.DisTime" :readonly="readOnly"></el-input>
                    </el-form-item>
                </div>
            </div>
            <div class="table-row">
                <div class="table-cell pr16">
                    <el-form-item label="核容容量(1~2000AH)" prop="DisCap">
                        <el-input v-model="params.DisCap" :readonly="readOnly"></el-input>
                    </el-form-item>
                </div>
                <div class="table-cell">
                    <el-form-item label="单体温度上限(10~60℃)" prop="MonomerTmp_High">
                        <el-input v-model="params.MonomerTmp_High" :readonly="readOnly"></el-input>
                    </el-form-item>
                </div>
            </div>
            <div class="table-row">
                <div class="table-cell pr16">
                    <el-form-item label="组端电压下限(43.0~54.0V)" prop="GroupVol_Low">
                        <el-input v-model="params.GroupVol_Low" :readonly="readOnly"></el-input>
                    </el-form-item>
                </div>
                <div class="table-cell">
                    <el-form-item label="单体电压下限(1.80~2.25V)" prop="MonomerVol_Low">
                        <el-input v-model="params.MonomerVol_Low" :readonly="readOnly"></el-input>
                    </el-form-item>
                </div>
            </div>
            <div class="table-row">
                <div class="table-cell pr16">
                    <el-form-item label="升压上限(V)">
                        <el-input v-model="params.DCVolHighLimit"></el-input>
                    </el-form-item>
                </div>
                <div class="table-cell">
                    <el-form-item label="充电电流(A)">
                        <el-input v-model="params.ChargeCurrSet"></el-input>
                    </el-form-item>
                </div>
            </div>
        </div>
        <div class="form-footer">
            <!-- <three-btn>清除告警</three-btn> -->
            <three-btn :disabled="!startTestFlag" @click="startTest">启动测试</three-btn>
            <three-btn @click="getParams(true)">读取</three-btn>
            <three-btn :disabled="!setTestFlag" @click="submitFrom">设定</three-btn>
        </div>
    </el-form>
</template>
<script>
import {
    const_61850,
} from '../../../assets/js/const/index'
import  {
    testVal
} from '../../../assets/js/tools'
export default {
    props: {
        batt: {
            type: Object,
            default() {
                return {}
            }
        }
    },
    data() {
        let cmd = const_61850.cmd;
        let testType = const_61850.testType;
        let rules = const_61850.dischargeRules;
        return {
            cmd: cmd,       // 操作命令
            testType: testType,    // 测试类型
            startTestFlag: false,       // 启动测试的状态
            setTestFlag: false,         // 设置参数的状态
            readOnly: false,
            params: {
                num: 0,
                dev_id: 0,     // 设备id
                TestCmd: 37,    // 测试类型
                DisCap: 0,     // 核容容量
                DisCurr: 0,    // 核容电流
                DisTime: 0,    // 核容时长
                GroupVol_Low: 0,    // 组端电压下限
                MonomerVol_Low: 0,  // 单体电压下限
                MonomerTmp_High: 0, // 单体温度上限
                DCVolHighLimit: 0,  // 升压上限
                ChargeCurrSet: 0, // 充电电流
            },
            rules: {
                DisCap: [{
                    validator(rule, value, callback) {
                        testVal(rule, value, callback, rules.DisCap)
                    },
                    trigger: 'change'
                }],
                DisCurr: [{
                    validator(rule, value, callback) {
                        testVal(rule, value, callback, rules.DisCurr)
                    },
                    trigger: 'change'
                }],
                DisTime: [{
                    validator(rule, value, callback) {
                        testVal(rule, value, callback, rules.DisTime)
                    },
                    trigger: 'change'
                }],
                GroupVol_Low: [{
                    validator(rule, value, callback) {
                        testVal(rule, value, callback, rules.GroupVol_Low)
                    },
                    trigger: 'change'
                }],
                MonomerVol_Low: [{
                    validator(rule, value, callback) {
                        testVal(rule, value, callback, rules.MonomerVol_Low)
                    },
                    trigger: 'change'
                }],
                MonomerTmp_High: [{
                    validator(rule, value, callback) {
                        testVal(rule, value, callback, rules.MonomerTmp_High)
                    },
                    trigger: 'change'
                }],
            },
        }
    },
    watch: {
        params: {
            handler(params) {
                if(params.TestCmd == 72 || params.TestCmd == 50) {
                    this.readOnly = true;
                }else {
                    this.readOnly = false;
                }
                this.startTestFlag = false;
            },
            deep: true,
        },
    },
    methods: {
        initParams() {
            // 初始化参数
            this.params = {
                num: 0,
                dev_id: 0,     // 设备id
                TestCmd: 37,    // 测试类型
                DisCap: 0,     // 核容容量
                DisCurr: 0,    // 核容电流
                DisTime: 0,    // 核容时长
                GroupVol_Low: 0,    // 组端电压下限
                MonomerVol_Low: 0,  // 单体电压下限
                MonomerTmp_High: 0, // 单体温度上限
                DCVolHighLimit: 0,  // 升压上限
                ChargeCurrSet: 0, // 充电电流
            };
        },
        // 获取参数
        getParams(showLoad) {
            // 定义等待框
            let loading;
            if(showLoad) {
                loading = this.$layer.loading(1);
            }
            // 启动按钮不可点击
            this.startTestFlag = false;
            // 查询后台
            this.$apis.dischargeTest.e61850.getParams({
                num: this.cmd.get,
                dev_id: this.batt.FBSDeviceId
            }).then(res=>{
                let rs = JSON.parse(res.data.result);
                if(rs.code == 1) {
                    let fsparam = rs.data[0].fsparam;
                    // 遍历参数属性并赋值
                    for(let key in this.params) {
                        this.params[key] = fsparam[key];
                    }
                    // 设置的命令和dev_id
                    this.params.num = this.cmd.set;
                    this.params.dev_id = this.batt.FBSDeviceId;
                    this.$layer.msg('读取成功!');
                    // 设置按钮可点击
                    this.setTestFlag = true;
                }else {
                    // 初始化参数
                    this.initParams();
                    // 设置按钮不可点击
                    this.setTestFlag = false;
                    this.$layer.msg('读取失败!');
                }
                // 关闭等待框
                this.$layer.close(loading);
            }).catch(error=>{
                console.log(error);
                // 初始化参数
                this.initParams();
                // 设置按钮不可点击
                this.setTestFlag = false;
                // 关闭等待框
                this.$layer.close(loading);
                this.$layer.msg('读取失败,读取请求异常!');
            });
        },
        // 提交表单设置参数
        submitFrom() {
            this.$refs.ruleForm.validate((valid) => {
                // 校验通过
                if (valid) {
                    // 设置参数
                    this.setParams();
                }else {
                    this.$layer.msg('存在校验未通过的数据!');
                    return false;
                }
            });
        },
        // 设置参数
        setParams() {
            // 等待框
            let loading = this.$layer.loading(1);
            // 请求后台
            this.$apis.dischargeTest.e61850.setParams(this.params).then(res=>{
                let rs = JSON.parse(res.data.result);
                if(rs.code == 1) {
                    // 启动按钮可点击
                    this.startTestFlag = true;
                    // 提示信息
                    this.$layer.msg('设置成功');
                }else {
                    // 启动按钮不可点击
                    this.startTestFlag = false;
                    // 提示信息
                    this.$layer.msg('设置失败!');
                }
                // 关闭等待框
                this.$layer.close(loading);
            }).catch(error=>{
                console.log(error);
                // 关闭等待框
                this.$layer.close(loading);
                // 启动按钮不可点击
                this.startTestFlag = false;
                // 提示信息
                this.$layer.msg('设置失败,设置请求异常!');
            });
        },
        // 启动
        startTest() {
            // 等待框
            let loading = this.$layer.loading(1);
            // 请求后台
            this.$apis.dischargeTest.e61850.start({
                num: this.cmd.start,
                dev_id: this.batt.FBSDeviceId,
            }).then(res=>{
                let rs = JSON.parse(res.data.result);
                if(rs.code == 1) {
                    // 提示信息
                    this.$layer.msg('启动测试成功');
                }else {
                    // 提示信息
                    this.$layer.msg('启动测试失败!');
                }
                // 关闭等待框
                this.$layer.close(loading);
            }).catch(error=>{
                console.log(error);
                // 关闭等待框
                this.$layer.close(loading);
                // 提示信息
                this.$layer.msg('启动测试失败,启动测试请求异常!');
            });
        },
        // 清除告警
        clearWarning() {
        }
    },
    computed: {
        otherParams() {
            let batt = this.batt;
            let groupInfo = '单体数量:'+this.batt.MonCount+";电压(V):"
                            +this.batt.MonVolStd+";容量(AH):"+this.batt.MonCapStd;
            return {
                groupName: batt.StationName+"-"+batt.BattGroupName,
                FBSDeviceId: batt.FBSDeviceId,
                groupInfo: groupInfo,
                GroupIndexInFBSDevice: this.batt.GroupIndexInFBSDevice+1,
            }
        }
    },
    mounted() {
        // 获取数据
        this.getParams(true);
    },
}
</script>
<style scoped>
.form-footer {
    margin-top: 16px;
    margin-bottom: 16px;
    text-align: right;
}
.form-footer .three-btn {
    margin-left: 12px;
}
</style>
src/components/params/DischargeDialogContent.vue
New file
@@ -0,0 +1,51 @@
<template>
    <div class="params-container">
        <discharge-params61850 v-if="reg61850"
        :batt="batt"></discharge-params61850>
        <div v-else class="kfz">
            <img src="../../assets/images/kfz.png">
        </div>
    </div>
</template>
<script>
import DischargeParams61850 from './61850/DischargeParams'
import {
    regEquipType
} from '../../assets/js/tools'
export default {
    components: {
        DischargeParams61850,
    },
    props: {
        batt: {
            type: Object,
            default() {
                return {}
            }
        }
    },
    computed: {
        reg61850() {
            return regEquipType(this.batt.FBSDeviceId, "equip61850");
        }
    }
}
</script>
<style scoped>
.params-container {
    padding: 8px;
    background-color: #ececec;
}
.kfz {
    text-align: center;
    height: 500px;
}
.kfz img {
    width: auto;
    height: 100%;
}
</style>
src/components/params/SystemParams.vue
New file
@@ -0,0 +1,151 @@
<template>
    <div class="params-container">
        <el-form
        ref="ruleForm"
        size="mini"
        label-position="top"
        :model="params"
        :rules="rules"
        class="params-dialog">
            <el-form-item label="电池组名称">
                <el-input v-model="otherParams.groupName" readonly></el-input>
            </el-form-item>
            <div class="table-layout">
                <div class="table-row">
                    <div class="table-cell pr16">
                        <el-form-item label="在线电压低阀值(40~57.4V)">
                            <el-input v-model="params.GroupVolSorce"></el-input>
                        </el-form-item>
                    </div>
                    <div class="table-cell">
                        <el-form-item label="浮充电流阀值(3~20A)">
                            <el-input v-model="params.CurrentTyte"></el-input>
                        </el-form-item>
                    </div>
                </div>
                <div class="table-row">
                    <div class="table-cell pr16">
                        <el-form-item label="电流异常阀值(2~5A)" prop="DisCurr">
                            <el-input v-model="params.PowerBreakChargeCurr" :readonly="readOnly"></el-input>
                        </el-form-item>
                    </div>
                    <div class="table-cell">
                        <el-form-item label="电压过高阀值(40~57.4V)" prop="DisTime">
                            <el-input v-model="params.POF_BG_Boost_VolStop" :readonly="readOnly"></el-input>
                        </el-form-item>
                    </div>
                </div>
                <div class="table-row">
                    <div class="table-cell pr16">
                        <el-form-item label="电压过低阀值(40~57.4V)" prop="DisCap">
                            <el-input v-model="params.POF_BG_Boost_VolStart" :readonly="readOnly"></el-input>
                        </el-form-item>
                    </div>
                    <div class="table-cell">
                        <el-form-item label="主从机设置">
                            <el-select v-model="MonomerOrder">
                                <el-option value="0">主机模式</el-option>
                                <el-option value="1">从机模式</el-option>
                            </el-select>
                        </el-form-item>
                    </div>
                </div>
            </div>
            <div class="form-footer">
                <three-btn @click="getParams(true)">读取</three-btn>
                <three-btn @click="submitFrom">设定</three-btn>
            </div>
        </el-form>
    </div>
</template>
<script>
import  {
    testVal
} from '../../assets/js/tools'
export default {
    props: {
        batt: {
            type: Object,
            default() {
                return {}
            }
        }
    },
    data() {
        return {
            setTestFlag: false,         // 设置参数的状态
            readOnly: false,
            params: {
                num: 0,
                dev_id: 0,     // 设备id
                GroupVolSorce: 0,      // 在线电压低阀值
                CurrentTyte: 0,        // 浮充电流阀值
                PowerBreakChargeCurr: 0,    // 电流异常阀值
                POF_BG_Boost_VolStop: 0,    // 电压过高阀值
                POF_BG_Boost_VolStart: 0,   // 电压过低阀值
                MonomerOrder: 0,        // 主从机设置
                LoaderCount: -1,        // 主从机使能
                DtCardCount: -1,        // 干接点使能
            },
            rules: {
            },
        }
    },
    methods: {
        initParams() {
            // 初始化参数
            this.params = {
                num: 0,
                dev_id: 0,     // 设备id
                GroupVolSorce: 0,      // 在线电压低阀值
                CurrentTyte: 0,        // 浮充电流阀值
                PowerBreakChargeCurr: 0,    // 电流异常阀值
                POF_BG_Boost_VolStop: 0,    // 电压过高阀值
                POF_BG_Boost_VolStart: 0,   // 电压过低阀值
                MonomerOrder: 0,        // 主从机设置
                LoaderCount: -1,        // 主从机使能
                DtCardCount: -1,        // 干接点使能
            };
        },
        // 获取参数
        getParams(showLoad) {},
        // 提交表单设置参数
        submitFrom() {},
        // 设置参数
        setParams() {},
    },
    computed: {
        otherParams() {
            let batt = this.batt;
            let groupInfo = '单体数量:'+this.batt.MonCount+";电压(V):"
                            +this.batt.MonVolStd+";容量(AH):"+this.batt.MonCapStd;
            return {
                groupName: batt.StationName+"-"+batt.BattGroupName,
                FBSDeviceId: batt.FBSDeviceId,
                groupInfo: groupInfo,
                GroupIndexInFBSDevice: this.batt.GroupIndexInFBSDevice+1,
            }
        }
    },
    mounted() {},
}
</script>
<style scoped>
.params-container {
    padding: 8px;
    background-color: #ececec;
}
.form-footer {
    margin-top: 16px;
    margin-bottom: 16px;
    text-align: right;
}
.form-footer .three-btn {
    margin-left: 12px;
}
</style>
src/main.js
@@ -19,15 +19,18 @@
// jsonp请求方式  请求tx地图接口  
import VueJsonp from 'vue-jsonp'
import apis from './assets/js/apis'
Vue.use(VueJsonp)
 
Vue.prototype.$layer = layer(Vue);
Vue.use(ElementUI);
Vue.use(ElementUI, {zIndex: 99});
Vue.config.productionTip = false
Vue.prototype.$G = G;
Vue.prototype.$apis = apis;
new Vue({
    router,
src/pages/dataTest/CircuitDiagram.vue
@@ -7,16 +7,81 @@
<script>
import circuitDiagram from '../../assets/js/diagram/circuitDiagram'
import diagramStates from '../../assets/js/diagram//diagramStates'
import diagramStates from '../../assets/js/diagram/diagramStates'
let diagram;
export default {
    props: {
        onlineVol: {        // 在线电压
            type: [String, Number],
            default: 0,
        },
        groupVol: {        // 组端电压
            type: [String, Number],
            default: 0,
        },
        battCurr: {     // 电池电流
            type: [String, Number],
            default: 0,
        },
        devTemp: {      // 设备温度
            type: [String, Number],
            default: 0,
        },
        type: {
            type: Number,
            default: -1
        }
    },
    watch: {
        onlineVol(val) {
            diagram.setOption('onlineVol', 'text', val+'V');
        },
        groupVol(val) {
            diagram.setOption('groupVol', 'text', val+'V');
        },
        battCurr(val) {
            diagram.setOption('battCurr', 'text', val+'A');
        },
        devTemp(val) {
            diagram.setOption('devTemp', 'text', '设备温度:'+val+'℃');
        },
        type(val) {
            this.setDiagramByType();
        }
    },
    methods: {
        setDiagramByType() {
            let type = this.type;
            switch(type) {
                case -1:    // 设备断开
                    diagramStates(diagram, 'break');
                break;
                case 0:     // 浮充
                    diagramStates(diagram, 'float');
                break;
                case 1:     // 放电
                    diagramStates(diagram, 'discharge');
                break;
                case 2:     // 充电
                    diagramStates(diagram, 'charge');
                break;
                case 3:    // KD测试
                    diagramStates(diagram, 'kd');
                break;
                case 4:    // 离线养护测试
                    diagramStates(diagram, 'yh');
                break;
                default:
                    diagramStates(diagram, '');
                break;
            }
        }
    },
    mounted() {
        let diagram = circuitDiagram(this.$refs.static, this.$refs.flush);
        // diagramStates(diagram, 'discharge');
        diagram = circuitDiagram(this.$refs.static, this.$refs.flush);
        //setTimeout(()=>{
            diagramStates(diagram, 'discharge');
        //}, 5000);
        // 设置充放电的类型
        this.setDiagramByType();
    }
}
</script>
src/pages/dataTest/HomeList.vue
@@ -3,7 +3,7 @@
    toggle
    @toggleChange="toggleChange" 
    style="width:320px">
        <div slot="box-tools" class="box-tools">
        <!-- <div slot="box-tools" class="box-tools">
            <el-tooltip class="item" effect="dark" content="站点信息" placement="bottom">
                <i class="iconfont el-icon-xinxi"></i>
            
@@ -11,7 +11,7 @@
            <el-tooltip class="item" effect="dark" content="站点搜索" placement="bottom">
                <i class="iconfont el-icon-chazhao"></i>
            </el-tooltip>
        </div>
        </div> -->
        <my-el-tree
        :data="data"
        :default-expanded-keys="expandedKeys"
@@ -92,7 +92,7 @@
                let home = this.addData(county.children, item.StationName3, county, item);
                // 添加空白位置占位
                home.children.push({
                    id: home.id+'temp',
                    id: home.id+Math.random(),
                    label: '数据加载中...'
                });
            });
@@ -164,7 +164,7 @@
                if(rs.code == 1) {
                    result = rs.data.map(item=>{
                        item.id = item.BattGroupId;
                        item.label = item.BattGroupName;
                        item.label = item.StationName4+"-"+item.BattGroupName;
                        item.leaf = true;
                        return item;
                    });
src/pages/dataTest/history.vue
@@ -21,7 +21,7 @@
                            <div class="table-cell text-right w80">端电压:</div>
                            <div class="table-cell">
                                <el-input v-model="top.group" placeholder="" 
                                size="small" :disabled="true"></el-input>
                                size="small" :disabled="true" style="min-width:12rem"></el-input>
                            </div>
                            <div class="table-cell text-right w80">电池电流:</div>
                            <div class="table-cell">
@@ -106,7 +106,10 @@
} from "../../assets/js/history";
import {
  formatSeconds
  formatSeconds,
  GetMonomerCap,
  GetHourRate,
  getBarNum,
} from "../../assets/js/tools";
// 端信息
@@ -116,7 +119,8 @@
  testCurr: [],
  testTimeLong: [],
  recordTime: [],
  testCap: []
  testCap: [],
  dataList: []
};
// 单体折线信息
let monLineData = {
@@ -240,6 +244,7 @@
        testTimeLong: [],
        recordTime: [],
        testCap: [],
        dataList: [],
      };
      // 单体折线信息
      monLineData = {
@@ -315,7 +320,7 @@
      monBarChart = {
        title: {
          show: true,
          text: "最大值=0V;最小值=0V;平均值=0V;累加和=0V",
          text: "最大值=0V;最小值=0V;平均值=0V",
          x: "center",
          textStyle: {
            fontSize: "14"
@@ -381,11 +386,15 @@
    },
    // 设置柱状图
    setBarChart() {
      let batt = this.batt;
      // 根据monBarData的值设置monBarChart
      let dataList = monBarData.vol;
      let index = this.getDataIndex(dataList.length, this.slider);
      if (index != -1) {
        monBarChart.series[0].data = dataList[index];
        let data = dataList[index];
        let batNum = getBarNum(data);
        monBarChart.title.text = "最大值="+batNum.max+"V;最小值="+batNum.min+"V;平均值="+batNum.avg.toFixed(3)+"V"
        monBarChart.series[0].data = data;
        // monBarChart.series[1].data = dataList[0];
      }
      // 设置柱状图
@@ -480,8 +489,7 @@
      searchHistory({
        BattGroupId: BattGroupId,
        test_record_count: count
      })
        .then(res => {
      }).then(res => {
          // 关闭等待框
          this.$layer.close(loading);
          let rs = JSON.parse(res.data.result);
@@ -502,7 +510,6 @@
    // 格式化历史信息数据
    formateHisData(data) {
      let record_time = -1; // 记录时间
      console.log(data);
      data.forEach(item => {
        let mon_num = item.mon_num;
        // 获取组端电压,在线电压,组端电流的信息和开辟一个单体柱状图
@@ -514,6 +521,7 @@
          allData.recordTime.push(record_time);
          allData.testTimeLong.push(item.test_timelong);
          allData.testCap.push(item.test_cap);
          allData.dataList.push(item);
          this.testTimeLong.push(item.test_timelong);
          // 开辟空间
          monBarData.vol.push([]);
@@ -588,21 +596,32 @@
    },
    // 设置顶部文本框的数据
    setTopData() {
      let batt = this.batt;
      // 组端电压和在线电压
      let groupVol = allData.groupVol;
      let onlineVol = allData.onlineVol;
      let testCurr = allData.testCurr;
      let testCap = allData.testCap;
      let monVols = monBarData.vol;
      let dataList = allData.dataList;
      let index = this.getDataIndex(groupVol.length, this.slider);
      if (index != -1) {
        this.top.group =
          "在线:" +
          "在线:" +
          onlineVol[index][1].toFixed(2) +
          "V;组端:" +
          "V;组端:" +
          groupVol[index][1].toFixed(2) +
          "V";
        this.top.curr = testCurr[index][1].toFixed(1) + "A";
        this.top.test_cap = testCap[index].toFixed(1) + "AH";
        // 剩余容量
        let monVol = monVols[index];
        let list = dataList[index];
        let avg_curr = list.test_timelong>0?list.test_cap*3600/list.test_timelong:list.test_curr;
        let batNum = getBarNum(monVol);
        let over_cap = GetMonomerCap(batt.MonCapStd, GetHourRate(batt.MonCapStd, avg_curr),
        list.test_cap, batNum.max, batNum.min,batt.MonVolStd, 0);
        this.top.re_cap = over_cap.toFixed(1)+'AH';
      }
    },
    // 根据百分比获取显示的数据的笔数
src/pages/dataTest/realTime.vue
@@ -54,16 +54,20 @@
          <div class="page-content-tools">
            <el-popover
            placement="bottom"
            trigger="hover">
            trigger="hover"
            v-show="showControl">
              <div class="hdw-menu-list">
                <ul>
                  <li class="hdw-menu-item"><a href="javascript:void(0);">启动核容测试</a></li>
                  <li class="hdw-menu-item"><a href="javascript:void(0);">停止测试</a></li>
                  <li class="hdw-menu-item"><a @click="dischargeDialog.show = true" href="javascript:void(0);">启动核容测试</a></li>
                  <li class="hdw-menu-item"><a @click="stopTest" href="javascript:void(0);">停止测试</a></li>
                  <!-- <li class="hdw-menu-item"><a @click="systemDialog.show = true" href="javascript:void(0);">系统参数设置</a></li>
                  <li class="hdw-menu-item"><a href="javascript:void(0);">清除告警</a></li>
                  <li class="hdw-menu-item"><a href="javascript:void(0);">启动养护/除硫</a></li>
                  <li class="hdw-menu-item"><a href="javascript:void(0);">停止养护/除硫</a></li>
                  <li class="hdw-menu-item"><a href="javascript:void(0);">启动离线养护</a></li>
                  <li class="hdw-menu-item"><a href="javascript:void(0);">停止离线养护</a></li>
                  <li class="hdw-menu-item"><a href="javascript:void(0);">重启设备</a></li>
                  <li class="hdw-menu-item"><a href="javascript:void(0);">定期重启设备</a></li>
                  <li class="hdw-menu-item"><a href="javascript:void(0);">重启设备</a></li> -->
                </ul>
              </div>
              <button class="hdw-btn" slot="reference">
@@ -74,50 +78,40 @@
          </div>
          <el-tabs v-model="acTabs" type="border-card" class="flex-layout" @tab-click="tabClick">
            <el-tab-pane label="电路拓扑图" name="eleLine">
                <science-box :top="8" :left="8" no-header>
                <science-box :top="8" :left="8" no-header v-show="stateListShow">
                  <div class="hdw-state-list table-layout">
                    <div class="table-row">
                      <div class="table-cell text-right">设备工作状态:</div>
                      <div class="table-cell">未知</div>
                    </div>
                    <div class="table-row">
                      <div class="table-cell text-right">核容终止原因:</div>
                      <div class="table-cell">无</div>
                    </div>
                    <div class="table-row">
                      <div class="table-cell text-right">通信计数:</div>
                      <div class="table-cell">0</div>
                    </div>
                    <div class="table-row">
                      <div class="table-cell text-right">通信丢包率:</div>
                      <div class="table-cell">0</div>
                    </div>
                    <div class="table-row">
                      <div class="table-cell text-right">SD卡状态:</div>
                      <div class="table-cell">正常</div>
                    </div>
                    <div class="table-row">
                      <div class="table-cell text-right">设备版本号:</div>
                      <div class="table-cell">D:8,V2.53.47</div>
                    <div v-for="state in showStateList" :key="state.text"
                    class="table-row" :class="state.type">
                      <div class="table-cell text-right">
                        <i v-if="state.icon" class="iconfont" :class="state.icon"></i>{{state.text}}
                      </div>
                      <div class="table-cell">
                        {{state.value}}{{state.unit}}
                      </div>
                    </div>
                  </div>
                </science-box>
                <circuit-diagram></circuit-diagram>
                <circuit-diagram
                :online-vol="inputs.online_vol"
                :group-vol="inputs.group_vol"
                :batt-curr="inputs.group_curr"
                :dev-temp="diagram.temp"
                :type="diagram.type"></circuit-diagram>
            </el-tab-pane>
            <el-tab-pane label="电压" name="vol">
              <bar-chart ref="vol" id="vol" unit="V"></bar-chart>
            </el-tab-pane>
            <el-tab-pane label="内阻" name="res">
              <bar-chart ref="res" id="res" unit="mΩ"></bar-chart>
              <bar-chart ref="res" id="res" unit="mΩ" max-color="red" min-color="green"></bar-chart>
            </el-tab-pane>
            <el-tab-pane label="温度" name="temp">
              <bar-chart ref="temp" id="temp" unit="℃"></bar-chart>
              <bar-chart ref="temp" id="temp" unit="℃" max-color="red" min-color="green"></bar-chart>
            </el-tab-pane>
            <el-tab-pane label="电导" name="conduct">
              <bar-chart ref="conduct" id="conduct"></bar-chart>
            </el-tab-pane>
            <el-tab-pane label="均衡电流" name="curr">
              <bar-chart ref="curr" id="curr"></bar-chart>
              <bar-chart ref="curr" id="curr" unit="A"></bar-chart>
            </el-tab-pane>
            <el-tab-pane label="数据表格" name="tblData">
              <el-table border size="small" :data="table.datas" height="100%">
@@ -134,6 +128,32 @@
        </div>
      </flex-layout>
    </content-box>
    <!-- 放电参数设置 -->
    <el-dialog
    :title="dischargeDialogTitle"
    width="700px"
    :visible.sync="dischargeDialog.show"
    :close-on-click-modal="false"
    top="0"
    class="dialog-center"
    :modal-append-to-body="false">
      <discharge-dialog-content
      v-if="dischargeDialog.show"
      :batt="batt"></discharge-dialog-content>
    </el-dialog>
    <!-- 系统参数设置 -->
    <el-dialog
    title="系统参数设置"
    width="700px"
    :visible.sync="systemDialog.show"
    :close-on-click-modal="false"
    top="0"
    class="dialog-center"
    :modal-append-to-body="false">
      <system-params
      v-if="systemDialog.show"
      :batt="batt"></system-params>
    </el-dialog>
  </flex-layout>
</template>
@@ -141,26 +161,41 @@
import ContentBox from "../../components/ContentBox";
import HomeList from "./HomeList";
import BarChart from "../../components/chart/BarChart";
import CircuitDiagram from './CircuitDiagram'
import ScienceBox from '../../components/ScienceBox'
import CircuitDiagram from "./CircuitDiagram";
import ScienceBox from "../../components/ScienceBox";
import DischargeDialogContent from '../../components/params/DischargeDialogContent'
import SystemParams from '../../components//params/SystemParams'
import { realTimeSearch, realTimeGroup, realTimeAlarm } from "../../assets/js/realTime";
import {
  realTimeSearch,
  realTimeGroup,
  realTimeAlarm,
  realTimePowerOff
} from "../../assets/js/realTime";
import {
  formatSeconds,
  sethoubeiTime,
} from '../../assets/js/tools'
  sethoubeiTime,
  Timeout,
  regEquipType,
  getBarNum
} from "../../assets/js/tools";
import { const_61850 } from "../../assets/js/const";
/* import moment from "moment"; */
let vol, res, temp, conduct, curr;
let vol, resChart, temp, conduct, currChart;
export default {
  components: {
    ContentBox,
    HomeList,
    BarChart,
    CircuitDiagram,
    ScienceBox
    ScienceBox,
    DischargeDialogContent,
    SystemParams
  },
  data() {
    return {
      username: sessionStorage.getItem('username'),
      /* 电池状态 模块 组端展示 */
      inputs: {
        group_vol: 0 /* 端电压-组端电压 */,
@@ -169,6 +204,7 @@
        batt_test_tlong: "0:00:00" /* 测试时长 */,
        rec_datetime: 0 /* 更新日期 */,
        batt_test_cap: 0 /* 测试容量 */,
        batt_rest_cap: 0, // 剩余容量
        batt_state: 0 /* 电池状态 */
      },
      acTabs: "eleLine",
@@ -201,7 +237,7 @@
          },
          {
            prop: "curr1",
            label: "均衡电流",
            label: "均衡电流(A)",
            width: ""
          }
        ],
@@ -216,7 +252,104 @@
          }
        ]
      },
      batt: {}
      batt: {},
      stateListShow: true,
      stateList: [
        {
          name: "workState",
          type: "",
          icon: "",
          text: "设备工作状态:",
          value: "在线浮充",
          show: true
        },
        {
          name: "connect",
          type: "",
          icon: "el-icon-tongxun",
          text: "设备通讯:",
          value: "正常",
          show: true
        },
        {
          name: "devTemp",
          type: "",
          icon: "el-icon-wendu",
          text: "设备温度:",
          value: "正常",
          show: true
        },
        {
          name: "contact",
          type: "",
          icon: "el-icon-fenxiang",
          text: "干接点:",
          value: "正常",
          show: false
        },
        {
          name: "stopReason",
          type: "",
          icon: "",
          text: "核容终止原因:",
          value: "未知",
          show: false
        },
        {
          name: "failReason",
          type: "",
          icon: "",
          text: "操作失败原因:",
          value: "未知",
          show: false
        },
        {
          name: "resDay",
          type: "",
          icon: "",
          text: "剩余天数:",
          value: "0",
          show: false
        },
        {
          name: "workMode",
          type: "",
          icon: "",
          text: "工作模式:",
          value: "停止",
          show: false
        },
        {
          name: "groupVol",
          type: "",
          icon: "",
          text: "组端电压:",
          value: "0",
          unit: "V",
          show: false
        },
        {
          name: "peakVol",
          type: "",
          icon: "",
          text: "峰值电压:",
          value: "0",
          unit: "V",
          show: false
        }
      ],
      timer: new Timeout(),
      diagram: {
        type: -1,
        desc: "",
        temp: 0 // 设备温度
      },
      dischargeDialog: {
        show: false
      },
      systemDialog: {
        show: false,
      },
    };
  },
  methods: {
@@ -236,7 +369,7 @@
      vol = {
        title: {
          show: true,
          text: "最大值=0V;最小值=0V;平均值=0V;累加和=0V",
          text: "最大值=0V;最小值=0V;平均值=0V",
          x: "center",
          textStyle: {
            fontSize: "14"
@@ -252,7 +385,7 @@
      };
      // 内阻
      res = {
      resChart = {
        title: {
          show: true,
          text: "最大值=0mΩ;最小值=mΩ;平均值=0mΩ",
@@ -308,7 +441,7 @@
        ]
      };
      // 均衡电流
      curr = {
      currChart = {
        title: {
          show: true,
          text: "最大值=0mA;最小值=0mA;平均值=0mA",
@@ -330,31 +463,40 @@
    },
    setChart() {
      this.$refs.vol.setOption(vol);
      this.$refs.res.setOption(res);
      this.$refs.res.setOption(resChart);
      this.$refs.temp.setOption(temp);
      this.$refs.conduct.setOption(conduct);
      this.$refs.curr.setOption(curr);
      this.$refs.curr.setOption(currChart);
    },
    startTimer() {
      this.timer.start(() => {
        this.$axios
          .all([
            this.realTimeSearch(),
            this.realTimeGroupss(),
            this.realTimePowerOffs()
          ])
          .then(() => {
            this.timer.open();
          })
          .catch(() => {
            this.timer.open();
          });
      }, 3000);
    },
    leafClick(data) {
      this.batt = data;
      /*   console.log('this.batt',this.batt); */
      this.realTimeAlarmss();
      this.realTimeGroupss();
      this.realTimeSearch();
      // 开启循环请求
      this.startTimer();
    },
    /* 查询电池告警参数 */
    realTimeAlarmss() {
      var batt = this.batt;
      console.log('batt',batt);
     realTimeAlarm({
       dev_id:batt.FBSDeviceId
     }).then(res => {
         console.log('batt.FBSDeviceId',batt.FBSDeviceId);
      realTimeAlarm({
        dev_id: batt.FBSDeviceId
      }).then(res => {
        let rsccc = JSON.parse(res.data.result);
          console.log("rsccc", rsccc);
      /*   this.inputs = rsa.data[0]; */
        /* console.log("this.inputs", this.inputs); */
      });
    },
    /* 实时组端信息 */
@@ -362,12 +504,166 @@
      var batt = this.batt;
      realTimeGroup(batt.BattGroupId).then(res => {
        let rsa = JSON.parse(res.data.result);
        /*   console.log("rsa", rsa); */
        this.inputs = rsa.data[0];
        /* console.log("this.inputs", this.inputs); */
      });
    },
    /* 查询电路图开关状态和信息 */
    realTimePowerOffs() {
      let batt = this.batt;
      // 设备为61850显示右侧的面板
      if (regEquipType(batt.FBSDeviceId, "equip61850")) {
        this.stateListShow = true;
      } else {
        this.stateListShow = false;
      }
      // 查询后台数据
      realTimePowerOff({
        dev_id: batt.FBSDeviceId
      }).then(res => {
        let rs = JSON.parse(res.data.result);
        let outTime = 2 * 60; //设备超时时间(2分钟)
        let isOutTime = true; //通讯中断        判断设备是否通讯中断    true:中断    false:正常
        if (rs.code == 1) {
          let data = rs.data[0];
          // 基础信息
          this.setEquipBase(data);
          // 判断是否超时
          var nowTime = new Date(data.note).getTime(); //当前时间
          var record = new Date(data.record_datetime).getTime();
          if (Math.abs(nowTime - record) / 1000 > outTime) {
            this.disconnect();
          } else {
            // 未超时执行逻辑
            // 设备为61850
            if (regEquipType(batt.FBSDeviceId, "equip61850")) {
              this.setEquip61850(data);
            }
          }
        } else {
          // 设备处于未连接
          this.disconnect();
        }
      });
    },
    disconnect() {
      // 设备未连接
      this.diagram.type = -1;
      this.setStateList("workState", "未连接");
      this.diagram.temp = 0;
      // 通讯状态
      this.setStateList("connect", "异常", "table-row-error");
      // 温度
      this.setStateList("devTemp", "未知", "table-row-warn");
      // 干接点
      this.setStateList("contact", "未知", "table-row-warn");
      // 核容终止原因
      this.setStateList("stopReason", "未知");
      // 操作失败原因
      this.setStateList("failReason", "未知");
    },
    // 基础信息
    setEquipBase(data) {
      // 设备的温度
      this.diagram.temp = data.dev_temp;
    },
    // 61850设备信息
    setEquip61850(data) {
      //  电路图类型
      let workstatus = parseInt(data.dev_workstate); //[0:'在线监测',1:'放电测试',2:'充电测试',3:'内阻测试',4:'未知'];
      this.diagram.desc = "";
      switch (workstatus) {
        case 0: //浮充状态拓扑图
          this.diagram.type = 0;
          this.diagram.desc = "(开关闭合)";
          break;
        case 4: //浮充状态(内阻测试)拓扑图
          this.diagram.type = 0;
          // 当前设备是否是内阻测试
          this.diagram.desc = "(开关闭合)";
          this.diagram.desc += "(内阻测试)";
          break;
        case 1: //充电状态拓扑图
          this.diagram.type = 2;
          this.diagram.desc = "(开关断开)";
          break;
        case 2: //放电状态拓扑图
          this.diagram.type = 1;
          this.diagram.desc = "(开关断开)";
          break;
        case 3: //放电状态拓扑图
          this.diagram.type = 7;
          break;
        case 5: //放电状态(KD测试)拓扑图
          this.diagram.type = 3;
          this.diagram.desc = "(开关断开)";
          this.diagram.desc += "(KD测试)";
          break;
        case 6: // 离线养护测试
          this.diagram.type = 4;
          this.diagram.desc = "离线养护测试";
          break;
        default:
          //未知
          this.diagram.type = -1;
          this.diagram.desc = "(未知)";
          break;
      }
      // 设备工作状态
      let workStates = const_61850.workstates;
      this.setStateList("workState", workStates[data.dev_workstate]);
      // 核容终止原因
      let stopReasons = const_61850.stopreasons;
      if (data.dev_workstate == 2) {
        this.setStateList("stopReason", "未知");
      } else {
        this.setStateList(
          "stopReason",
          stopReasons[data.dev_last_captest_stop_type]
        );
      }
      // 操作失败原因
      let failReasons = const_61850.failreasons;
      this.setStateList("failReason", failReasons[data.dev_alarmstate]);
      // 告警信息
      let alarms = data.dev_61850alarms.split(",");
      // alarms = ['false', 'false', 'true', 'false', 'true'];
      // 通讯状态
      if (alarms[1] == "true") {
        this.setStateList("connect", "异常", "table-row-error");
      } else {
        this.setStateList("connect", "正常", "");
      }
      // 温度
      if (alarms[2] == "true") {
        this.setStateList("devTemp", "异常", "table-row-error");
      } else {
        this.setStateList("devTemp", "正常", "");
      }
      // 干接点
      if (alarms[4] == "true") {
        this.setStateList("contact", "异常", "table-row-error");
      } else {
        this.setStateList("contact", "正常", "");
      }
    },
    // 设置stateList的值
    setStateList(name, value, type) {
      let stateList = this.stateList;
      for (let i = 0; i < stateList.length; i++) {
        let state = stateList[i];
        if (state.name == name) {
          state.value = value;
          state.type = type ? type : "";
        }
      }
    },
    /* echars图表 */
    realTimeSearch() {
      var batt = this.batt;
@@ -375,18 +671,16 @@
        BattGroupId: batt.BattGroupId
      }).then(res => {
        let rs = JSON.parse(res.data.result);
        /*   console.log("rs", rs); */
        /* 数据表格 */
        /*   let vovo = {}; */
        if (rs.code == 1) {
          this.vovo = rs.data.map(item => {
            return {
              num1: "#" + item.mon_num,
              vol1: item.mon_vol,
              res1: item.mon_res,
              temp1: item.mon_tmp
            }
              temp1: item.mon_tmp,
              conduct1: (1 / item.mon_res * 1000).toFixed(0),
              curr1: item.mon_JH_curr
            };
          });
        }
        this.table.datas = this.vovo;
@@ -398,16 +692,20 @@
            return ["#" + item.mon_num, item.mon_vol];
          });
        }
        let volBarNum = getBarNum(volTempVol);
        vol.title.text = "最大值="+volBarNum.max.toFixed(2)+"V;最小值="+volBarNum.min.toFixed(2)+"V;平均值="+volBarNum.avg.toFixed(2)+"V";
        vol.series[0].data = volTempVol;
        // 内阻
        /*     let volTempres = [];
        let volTempres = [];
        if (rs.code == 1) {
          volTempres = rs.data.map(item => {
            return ["#" + item.mon_num, item.mon_res];
          });
        }
        res.series[0].data = volTempres; */
        let resBarNum = getBarNum(volTempres);
        resChart.title.text = "最大值="+resBarNum.max.toFixed(2)+"mΩ;最小值="+resBarNum.min.toFixed(2)+"mΩ;平均值="+resBarNum.avg.toFixed(2)+"mΩ";
        resChart.series[0].data = volTempres;
        // 温度
        let volTempte = [];
@@ -416,33 +714,106 @@
            return ["#" + item.mon_num, item.mon_tmp];
          });
        }
        let tempBarNum = getBarNum(volTempte);
        temp.title.text = "最大值="+tempBarNum.max.toFixed(1)+"℃;最小值="+tempBarNum.min.toFixed(1)+"℃;平均值="+tempBarNum.avg.toFixed(1)+"℃";
        temp.series[0].data = volTempte;
        // 电导
        let conductTemp = [];
        if (rs.code == 1) {
          conductTemp = rs.data.map(item => {
            return ["#" + item.mon_num, (1 / item.mon_res * 1000).toFixed(0)];
          });
        }
        let conductBarNum = getBarNum(conductTemp);
        conduct.title.text = "最大值="+conductBarNum.max.toFixed(0)+";最小值="+conductBarNum.min.toFixed(0)+";平均值="+conductBarNum.avg.toFixed(0);
        conduct.series[0].data = conductTemp;
        // 均衡电流
        let currTemp = [];
        if (rs.code == 1) {
          currTemp = rs.data.map(item => {
            return ["#" + item.mon_num, item.mon_JH_curr];
          });
        }
        let currBarNum = getBarNum(currTemp);
        currChart.title.text = "最大值="+currBarNum.max.toFixed(1)+"mA;最小值="+currBarNum.min.toFixed(1)+"mA;平均值="+currBarNum.avg.toFixed(1)+"mA";
        currChart.series[0].data = currTemp;
        // 更新电压图表
        this.$refs.vol.setOption(vol);
        this.$refs.res.setOption(res);
        this.$refs.temp.setOption(temp);
        this.setChart();
      });
    },
    // 向父级发送同步页面的指令
    syncPage() {
      let batt = this.batt;
      let search="?province="+batt.StationName1
      +"&city="+batt.StationName2+"&county="+batt.StationName5
      +"&home="+batt.StationName3+"&batt="+batt.BattGroupId;
      window.parent.postMessage({
        cmd: "syncPage",
        params: {
          pageInfo: {
            label: '历史数据',
            name: 'history',
            src: '#/history'+search,
            closable: true,
      let search =
        "?province=" +
        batt.StationName1 +
        "&city=" +
        batt.StationName2 +
        "&county=" +
        batt.StationName5 +
        "&home=" +
        batt.StationName3 +
        "&batt=" +
        batt.BattGroupId;
      window.parent.postMessage(
        {
          cmd: "syncPage",
          params: {
            pageInfo: {
              label: "历史数据",
              name: "history",
              src: "#/history" + search,
              closable: true
            }
          }
        },
      }, "*");
        "*"
      );
    },
    // 停止测试
    stopTest() {
      this.$layer.confirm('停止测试',{icon: 3}, (index)=>{
        // 关闭询问层
        this.$layer.close(index);
        // 根据设备id进行停止
        if(regEquipType(this.batt.FBSDeviceId, 'equip61850')) {
          // 停止设备
          this.stop61850Test();
        }else {
          // 提示信息
          this.$layer.msg('未知设备类型,暂无法停止测试!');
        }
      });
    },
    // 停止61850测试
    stop61850Test() {
      // 开启等待框
      let loading = this.$layer.loading(1);
      // 请求后台
      this.$apis.dischargeTest.e61850.stop({
        num: const_61850.cmd.stop,
        dev_id: this.batt.FBSDeviceId
      }).then(res=>{
        let rs = JSON.parse(res.data.result);
        if(rs.code == 1) {
            // 提示信息
            this.$layer.msg('停止测试成功');
        }else {
            // 提示信息
            this.$layer.msg('停止测试失败!');
        }
        // 关闭等待框
        this.$layer.close(loading);
      }).catch(error=>{
        console.log(error);
        // 关闭等待框
        this.$layer.close(loading);
        // 提示信息
        this.$layer.msg('停止测试失败,停止测试请求异常!');
      });
    }
  },
  computed: {
@@ -461,23 +832,35 @@
          3: "放电",
          4: "均充"
        },
        list = {};
        list = {
          batt_state: "未知",
          group_online_vol: "在线:0.00V;组端:0.00V",
          group_curr: "0.00A",
          rec_datetime: "1982-01-01 00:00:00",
          batt_test_tlong: formatSeconds(0),
          batt_test_cap: "0Ah",
          batt_syrl_cap: "---",
          sysc: "------"
        };
      if (this.diagram.type == -1) {
        return list;
      }
      list.batt_state = obj[this.inputs.batt_state];
      list.group_online_vol = `在线:${this.inputs.online_vol.toFixed(
      list.group_online_vol = `在线:${this.inputs.online_vol.toFixed(
        2
      )}V;组端:${this.inputs.group_vol.toFixed(2)}V`;
      )}V;组端:${this.inputs.group_vol.toFixed(2)}V`;
      list.group_curr = this.inputs.group_curr.toFixed(2) + "A";
      list.rec_datetime = this.inputs.rec_datetime;
      list.batt_test_tlong = formatSeconds(this.inputs.batt_test_tlong);
      list.batt_test_cap = this.inputs.batt_test_cap.toFixed(1) + "Ah";
      list.batt_test_cap = this.inputs.batt_test_cap.toFixed(1) + "AH";
      if (this.inputs.batt_state === 2) {
        list.batt_syrl_cap = "---";
      } else {
        list.batt_syrl_cap = this.inputs.batt_test_cap.toFixed(1) + "Ah";
        list.batt_syrl_cap = this.inputs.batt_rest_cap.toFixed(1) + "AH";
      }
      if (this.inputs.batt_state === 3) {
        list.sysc = this.sethoubeiTime(
        list.sysc = sethoubeiTime(
          parseFloat(this.inputs.batt_rest_cap) /
            parseFloat(this.inputs.group_curr)
        );
@@ -485,6 +868,28 @@
        list.sysc = "------";
      }
      return list;
    },
    showStateList() {
      return this.stateList.filter(item => {
        if (item.show) {
          return item;
        }
      });
    },
    dischargeDialogTitle() {
      let batt = this.batt;
      if (regEquipType(batt.FBSDeviceId, "equip61850")) {
        return "61850放电参数设置";
      } else {
        return "未知设备(待开发)"
      }
    },
    showControl() {
      if(this.username == 'superuser' || this.username == 'admin') {
        return true;
      }else {
        return false;
      }
    }
  },
  mounted() {
@@ -494,13 +899,14 @@
    this.$nextTick(() => {
      this.$G.chartManage.resize(this.acTabs);
    });
    // 向父组件通信
    window.parent.postMessage({kk:1}, "*")
    // 屏幕缩放时触发
    window.addEventListener("resize", () => {
      this.resize();
    });
  },
  destroyed() {
    this.timer.stop();
  }
};
</script>
@@ -511,6 +917,15 @@
}
.table-cell.text-right {
  font-size: 14px;
}
.table-cell.text-right .iconfont {
  margin-right: 4px;
}
.table-row.table-row-error {
  color: #ff0000;
}
.table-row.table-row-warn {
  color: #e6a23c;
}
.table-row .table-cell {
  padding-top: 12px;
@@ -533,7 +948,7 @@
  color: #cfcfcf;
}
.box-tools .iconfont:active {
  color: #FF0000;
  color: #ff0000;
}
.page-content-tools {
  position: absolute;
@@ -554,7 +969,7 @@
  box-sizing: border-box;
  outline: none;
  margin: 0;
  transition: .1s;
  transition: 0.1s;
  font-weight: 500;
  -webkit-user-select: none;
  -moz-user-select: none;
@@ -576,11 +991,11 @@
.hdw-menu-list .hdw-menu-item:first-child {
  border-top: none;
}
.hdw-menu-item a{
.hdw-menu-item a {
  display: block;
  text-align: center;
  padding: 8px;
  color: #FFFFFF;
  color: #ffffff;
  cursor: pointer;
  background-color: rgba(30, 125, 219, 0.767);
}
src/pages/home.vue
@@ -32,6 +32,10 @@
import PageMenu from '../components/PageMenu.vue'
import ProgressBar from 'vuejs-progress-bar'
import {
    checkUserLogin
} from '../assets//js/api'
export default {
    components: {
        PageHeader,
@@ -49,6 +53,7 @@
                },
            ],
            drawer: false,
            timer: '',
        }
    },
    watch: {
@@ -131,7 +136,7 @@
            // 设置激活的导航
            this.acTabs = menu.name;
        }
        },
    },
    mounted() {
        window.addEventListener('message', (msg)=>{
src/pages/index.vue
@@ -10,7 +10,7 @@
          <i class="iconfont el-icon-chazhao" @click="dialogVisible = true"></i>
        </el-tooltip>
      </div>
      <!-- <my-el-tree @node-click="nodeClick" :data="data"></my-el-tree> -->
      <el-tree
        @node-click="nodeClick"
@@ -55,15 +55,15 @@
    </content-box>
  </flex-layout>
</template>
<script>
import Vue from "vue";
import BMapGL from "BMapGL";
import BMapGL from "BMap";
import ContentBox from "../components/ContentBox";
/* import MyElTree from "../components/MyElTree"; */
import PieChart from "../components/chart/PieChart";
import InfoWindowTest from "../components/InfoWindowTest";
import {
  searchBattState,
  searchPowerOff,
@@ -87,7 +87,7 @@
import { log } from "util";
import { async, Promise } from "q";
import { json } from "body-parser";
let chart1, chart2, chart3, chart4;
let infoWindowTest = Vue.extend(InfoWindowTest);
let showInfoWindowTest = new infoWindowTest().$mount();
@@ -127,7 +127,7 @@
      }
    };
  },
  methods: {
    // 向父级发送同步页面的指令
    syncPage() {
@@ -172,171 +172,14 @@
      done();
    },
    initMap() {
      const that = this;
      // 按住鼠标右键,修改倾斜角和角度
      this.map = new BMapGL.Map("allmap"); // 创建Map实例
      this.point = new BMapGL.Point(this.lng, this.lat); // 创建点坐标this.lng, this.lat 113.971,30.605
      this.map.centerAndZoom(this.point, 15); // 初始化地图,设置中心点坐标和地图级别
      this.map.enableScrollWheelZoom(true); // 开启鼠标滚轮缩放
      this.map.setHeading(64.5);
      this.map.setTilt(73);
      this.marker = new BMapGL.Marker(this.point); // 创建点
      this.map.addOverlay(this.marker); // 将标注添加到地图中
      //添加地图机房
      this.addseRoomlist.forEach(item => {
        this.marker = new BMapGL.Marker(
          new BMapGL.Point(item.data.longitude, item.data.latitude)
        );
         /* console.log('item.data.longitude, item.data.latitude',item.data.longitude, item.data.latitude); */
        this.map.addOverlay(this.marker);
        this.marker.addEventListener("click", e => {
          /*    console.log("this.point", this.point); */
          that.map.openInfoWindow(
            this.infoWindow,
            new BMapGL.Point(item.data.longitude, item.data.latitude)
          ); //开启信息窗口
        });
      });
      this.opts = {
        width: 350, // 信息窗口宽度
        height: 150, // 信息窗口高度
        title: `<p style="font-size: 16px;color: black;margin:2px;margin-bottom: 20px;">湖北省-武汉市-测试机房1</p>`, // 信息窗口标题* ${this.medatas.info.label}
        message: "地址信息"
      };
      this.infoWindow = new BMapGL.InfoWindow( // 创建信息窗口对象
        `<div style="color: black;padding:8px" ><div >蓄电池组告警数目:50 <a href>详情>></a></div><div style="margin-top:5px"> 蓄电池组落后数目:0 &nbsp <a href>详情>><a></div> <div style="margin-top:5px">蓄电池组延时数目:0&nbsp <a href>详情>><a></div>
          <div style="margin-top:5px"><a href="syncPage()">实时数据</a> 历史数据</div> <div style="margin-top:5px">地址: ${
            this.medatas.address
          }</div></div>` /*  */,
        this.opts
      );
      /* that.map.openInfoWindow(this.infoWindow, this.point); */
      this.onCLickMap(); //点击事件获取坐标
      /* map地图右键菜单 */
      var menu = new BMapGL.ContextMenu();
      var txtMenuItem = [
        {
          text: "搜索地址",
          callback() {}
        },
        {
          text: "放大",
          callback: function() {
            that.map.zoomIn();
          }
        },
        {
          text: "缩小",
          callback: function() {
            that.map.zoomOut();
          }
        },
        {
          text: "设置中心点",
          async callback() {
            /*  that.map.zoomCentral(); */
            /*获取地图的中心坐标并将地图移动该坐标 */
            const centerMove = await searchCoordinateMove();
            const newcenterMove = JSON.parse(centerMove.data.result).data;
            console.log("newcenterMove", newcenterMove);
            /* 设置地图默认中心坐标接口 */
            const center = await searchCoordinate({
              map_longitude: newcenterMove[0].map_longitude,
              map_latitude: newcenterMove[0].map_latitude,
              map_level: newcenterMove[0].map_level
            });
            /*      console.log("center", center); */
          }
        },
        {
          text: "查看全国",
          callback: function() {
            that.map.setZoom(5);
          }
        },
        {
          text: "设置机房",
          async callback() {
            //获取站点名
            const addSetdian = await addMapSetdian();
            const addSetmap = JSON.parse(addSetdian.data.result).data.map(
              item => {
                item.label =
                  item.StationName1 +
                  "-" +
                  item.StationName2 +
                  "-" +
                  item.StationName5 +
                  "-" +
                  item.StationName3;
                return item;
              }
            );
            // console.log("addSetdian", addSetdian);
            // console.log("addSetmap", addSetmap);
            const point = new BMapGL.Point(that.lng, that.lat);
            const marke = new BMapGL.Marker(point);
            that.map.addOverlay(marke);
            /* 可托拽的标注 */
            /*    that.marker.enableDragging();
             that.marker.addEventListener("dragend", function(e) {
              console.log("当前位置:" + e.point.lng + ", " + e.point.lat);
            }); */
            /* 设置站点窗口 */
            var opts = {
              width: "auto", // 信息窗口宽度
              height: "auto", // 信息窗口高度
              title:
                '<p style="font-size: 16px;color: black;margin:2px;margin-bottom: 10px;">设置站点位置  </p>', // 信息窗口标题
              message: "地址信息"
            };
            var geoc = new BMapGL.Geocoder(); //坐标与路名的转换
            showInfoWindowTest.homeList = addSetmap;
            // 逆地址解析,通过经纬度获取地址信息
            geoc.getLocation(marke.getPosition(), function(rs) {
              /*   console.log("rs", rs); */
              showInfoWindowTest.address = rs.address;
              showInfoWindowTest.point = marke.getPosition();
            });
            // 设置面板
            this.infoWindow = new BMapGL.InfoWindow(
              showInfoWindowTest.$el,
              opts
            );
            that.map.openInfoWindow(this.infoWindow, point);
            marke.addEventListener("click", e => {
              //左击标注
              that.map.openInfoWindow(this.infoWindow, point);
            });
          }
        }
      ];
      for (var i = 0; i < txtMenuItem.length; i++) {
        menu.addItem(
          new BMapGL.MenuItem(txtMenuItem[i].text, txtMenuItem[i].callback, {
            width: 100, // 指定菜单项的宽度
            id: "menu" + i // 指定菜单项dom的id
          })
        );
      }
      this.map.addContextMenu(menu);
      this.map.centerAndZoom(this.point, 1); // 初始化地图,设置中心点坐标和地图级别
      this.map.enableScrollWheelZoom();
            this.map.disableDoubleClickZoom();
    },
    /* loadNode 加载子树数据的方法*/
    async loadNode(node, resolve) {
      /*   console.log("node", node); */
@@ -358,11 +201,11 @@
        /* 查询市 */
        const city = await searchCity({ StationName1: node.data.label });
        //console.log('city.data.result',city.data.result);
        if (city.data.result && JSON.parse(city.data.result).code == 0) {
          return this.$message.error(JSON.parse(city.data.result).msg);
        }
        const citys = JSON.parse(city.data.result).data;
        const cityList = citys.map(item => {
          return { label: item };
@@ -376,16 +219,16 @@
          StationName2: node.data.label
        });
        //console.log(' county', county);
        if (county.data.result && JSON.parse(county.data.result).code == 0) {
          return this.$message.error(JSON.parse(county.data.result).msg);
        }
        const countys = JSON.parse(county.data.result).data;
        const countyList = countys.map(item => {
          return { label: item };
        });
        return resolve(countyList);
      } else if (node.level === 3) {
        /* room 机房信息  */
@@ -409,7 +252,7 @@
        return resolve([]);
      }
    },
    async handleInterface(node) {
      const that = this;
      const [areaRoom, batteryList] = await Promise.all([
@@ -419,6 +262,7 @@
          StationName2: node.parent.parent.data.label,
          StationName5: node.parent.data.label
        }),
        /*  查询电池组信息 */
        searchBattInfo({
          StationName1: node.parent.parent.parent.data.label,
@@ -427,7 +271,7 @@
          StationName3: node.data.label
        })
      ]);
      if (areaRoom.data.result && JSON.parse(areaRoom.data.result).code == 0) {
        return this.$message.error(JSON.parse(areaRoom.data.result).msg);
      }
@@ -461,7 +305,7 @@
          new BMapGL.Point(this.obj.longitude, this.obj.latitude)
        );
      }
      /* 信息框中的告警数延时数 接口 */
      /* const roomWarning = await searchRooms({
        StationId: this.batteryList[0].StationId
@@ -469,14 +313,14 @@
      console.log("roomWarning", roomWarning);
      const newRoomWarning = JSON.parse(roomWarning.data.result).data;
      console.log("newRoomWarning", newRoomWarning); */
      this.marker.addEventListener("click", e => {
        this.map.openInfoWindow(
          this.infoWindow,
          new BMapGL.Point(this.obj.longitude, this.obj.latitude)
        ); //开启信息窗口
      });
      //右击删除marker 菜单
      this.marker.addEventListener("rightclick", e => {
        /*   console.log('e...............',e) */
@@ -508,9 +352,9 @@
              });
              //右击删除标注
              /*  console.log("deleteMarker", deleteMarker); */
              this.map.removeOverlay(select);
              this.initMap();
            }
            this.$message({
@@ -585,7 +429,7 @@
            name: "电池信息",
            data: [
              { value: this.powerOff.sum, name: "机房停电" },
              {
                value: this.powerOff.newsum - this.powerOff.sum,
                name: "机房未停电"
@@ -594,7 +438,7 @@
          }
        ]
      };
      // 饼状图2
      chart2 = {
        // 红,黄,绿,蓝
@@ -619,7 +463,7 @@
          }
        ]
      };
      // 饼状图3
      chart3 = {
        // 红, 黄,绿,紫色
@@ -639,7 +483,7 @@
          }
        ]
      };
      // 饼状图4
      chart4 = {
        // 红, 深蓝色, 蓝,浅红,绿, 黄
@@ -671,7 +515,7 @@
          }
        ]
      };
      // 设置图表
      this.setChart();
    },
@@ -712,7 +556,7 @@
      /* console.log('this.battState',this.battState); */
      this.initChart();
    },
    /* 添加机房接口 */
    meData() {
      const that = this;
@@ -721,7 +565,7 @@
        console.log("data", data);
        that.medatas = data;
        console.log("that.medatas", that.medatas);
        this.$confirm("确认将武汉-东西湖区设置到该位置吗?", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
@@ -739,7 +583,7 @@
              latitude: data.point.lat,
              information: ""
            });
            this.$message({
              type: "success",
              message: "设置站点位置成功!"
@@ -763,7 +607,7 @@
  }
};
</script>
<style scoped  lang="less">
.box-tools {
  position: relative;
@@ -778,26 +622,26 @@
    right: 20px;
  }
}
.rooms {
  margin-bottom: 10px !important;
}
.inputSeach {
  margin-bottom: 15px !important;
}
/deep/ .el-science-blue .el-input.is-disabled .el-input__inner,
.el-science-blue .el-input__inner {
  background-color: #fff !important;
  border-color: #3ebdc9;
  z-index: 999;
}
.dialog-footer {
  margin-left: 375px;
}
.box-tools .iconfont {
  font-size: 20px;
}
@@ -842,6 +686,4 @@
.input-with-select .el-input-group__prepend {
  background-color: #fff;
}
</style>
</style>
src/pages/index_old.vue
New file
@@ -0,0 +1,844 @@
<template>
  <flex-layout direction="row" class="page-index">
    <content-box title="站点列表" slot="header" toggle style="width:320px">
      <div slot="box-tools"></div>
      <div class="box-tools" slot="box-tools">
        <el-tooltip class="item" effect="dark" content="站点信息" placement="bottom">
          <i class="iconfont el-icon-xinxi"></i>
        </el-tooltip>
        <el-tooltip class="item2" effect="dark" content="站点搜索" placement="bottom">
          <i class="iconfont el-icon-chazhao" @click="dialogVisible = true"></i>
        </el-tooltip>
      </div>
      <!-- <my-el-tree @node-click="nodeClick" :data="data"></my-el-tree> -->
      <el-tree
        @node-click="nodeClick"
        :load="loadNode"
        lazy
        class="filter-tree"
        :props="defaultProps"
      ></el-tree>
    </content-box>
    <div class="map-container">
      <div class="map-content" id="allmap"></div>
    </div>
    <content-box title="站点列表" slot="footer" style="width:380px" no-header>
      <div class="pie-list">
        <div class="pie-item">
          <pie-chart ref="chart1" id="chart1"></pie-chart>
        </div>
        <div class="pie-item">
          <pie-chart ref="chart2" id="chart2"></pie-chart>
        </div>
        <div class="pie-item">
          <pie-chart ref="chart3" id="chart3"></pie-chart>
        </div>
        <div class="pie-item">
          <pie-chart ref="chart4" id="chart4"></pie-chart>
        </div>
      </div>
      <el-dialog title="机房查询" :visible.sync="dialogVisible" width="30%">
        <div class="rooms">机房名称:/机房id</div>
        <el-input class="inputSeach" clearable v-model="inputSeach"></el-input>
        <span class="dialog-footer">
          <el-button @click="dialogVisible = false">取 消</el-button>
          <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
        </span>
      </el-dialog>
      <!-- 右键菜单搜索框 -->
      <!--  <div style="margin-top: 15px;">
  <el-input placeholder="请输入内容" v-model="input3" class="input-with-select">
    <el-button slot="append" icon="el-icon-search"></el-button>
  </el-input>
      </div>-->
    </content-box>
  </flex-layout>
</template>
<script>
import Vue from "vue";
import BMapGL from "BMapGL";
import ContentBox from "../components/ContentBox";
/* import MyElTree from "../components/MyElTree"; */
import PieChart from "../components/chart/PieChart";
import InfoWindowTest from "../components/InfoWindowTest";
import {
  searchBattState,
  searchPowerOff,
  searchBattGood,
  searchProvince,
  searchCity,
  searchCounty,
  searchStation,
  searchMapStation,
  searchBattInfo,
  searchAlarm,
  addMapStation,
  searchDeletRoom,
  searchMap,
  addMapSetdian,
  searchRooms,
  searchCoordinate,
  searchCoordinateMove,
  searchRoomLocation
} from "@/assets/js/api";
import { log } from "util";
import { async, Promise } from "q";
import { json } from "body-parser";
let chart1, chart2, chart3, chart4;
let infoWindowTest = Vue.extend(InfoWindowTest);
let showInfoWindowTest = new infoWindowTest().$mount();
export default {
  components: {
    ContentBox,
    /*   MyElTree, */
    PieChart
  },
  data() {
    return {
      medatas: {},
      inputSeach: "",
      dialogVisible: false,
      input1: "",
      input2: "",
      input3: "",
      lat: 0, //维度
      lng: 0, //经度
      cityName: "", //城市
      marker: null,
      infoWindow: null,
      map: null,
      panTo: null,
      point: null,
      obj: null,
      opts: null,
      addSeachroom: [], //地图上所有机房
      defaultProps: {
        label: "label",
        isLeaf: (data, node) => {
          if (node.level === 4) {
            // 第三层没有子节点
            return true;
          }
        }
      }
    };
  },
  methods: {
    // 向父级发送同步页面的指令
    syncPage() {
      let batt = this.batt;
      let search =
        "?province=" +
        batt.StationName1 +
        "&city=" +
        batt.StationName2 +
        "&county=" +
        batt.StationName5 +
        "&home=" +
        batt.StationName3 +
        "&batt=" +
        batt.BattGroupId;
      window.parent.postMessage(
        {
          cmd: "syncPage",
          params: {
            pageInfo: {
              label: "实时监测",
              name: "realTime",
              src: "#/real-time" + search,
              closable: true
            }
          }
        },
        "*"
      );
    },
    /* 根据机房的id查询机房的经纬度 */
    async getCityrom() {
      /*   const searchAddress = await searchRoomLocation({
        StationName1: "湖北省",
        StationName2: "武汉市",
        StationName5: "东西区",
        StationName3: "GDXG演示"
      });
      console.log("searchAddress", searchAddress); */
    },
    handleClose(done) {
      done();
    },
    initMap() {
      const that = this;
      // 按住鼠标右键,修改倾斜角和角度
      this.map = new BMapGL.Map("allmap"); // 创建Map实例
      this.point = new BMapGL.Point(this.lng, this.lat); // 创建点坐标this.lng, this.lat 113.971,30.605
      this.map.centerAndZoom(this.point, 15); // 初始化地图,设置中心点坐标和地图级别
      this.map.enableScrollWheelZoom(true); // 开启鼠标滚轮缩放
      this.map.setHeading(64.5);
      this.map.setTilt(73);
      this.marker = new BMapGL.Marker(this.point); // 创建点
      this.map.addOverlay(this.marker); // 将标注添加到地图中
      //添加地图机房
      this.addseRoomlist.forEach(item => {
        this.marker = new BMapGL.Marker(
          new BMapGL.Point(item.data.longitude, item.data.latitude)
        );
        this.map.addOverlay(this.marker);
        this.marker.addEventListener("click", e => {
          /*    console.log("this.point", this.point); */
          that.map.openInfoWindow(
            this.infoWindow,
            new BMapGL.Point(item.data.longitude, item.data.latitude)
          ); //开启信息窗口
        });
      });
      this.opts = {
        width: 350, // 信息窗口宽度
        height: 150, // 信息窗口高度
        title: `<p style="font-size: 16px;color: black;margin:2px;margin-bottom: 20px;">湖北省-武汉市-测试机房1</p>`, // 信息窗口标题* ${this.medatas.info.label}
        message: "地址信息"
      };
      this.infoWindow = new BMapGL.InfoWindow( // 创建信息窗口对象
        `<div style="color: black;padding:8px" ><div >蓄电池组告警数目:50 <a href>详情>></a></div><div style="margin-top:5px"> 蓄电池组落后数目:0 &nbsp <a href>详情>><a></div> <div style="margin-top:5px">蓄电池组延时数目:0&nbsp <a href>详情>><a></div>
          <div style="margin-top:5px"><a href="syncPage()">实时数据</a> 历史数据</div> <div style="margin-top:5px">地址: ${
            this.medatas.address
          }</div></div>` /*  */,
        this.opts
      );
      /* that.map.openInfoWindow(this.infoWindow, this.point); */
      this.onCLickMap(); //点击事件获取坐标
      /* map地图右键菜单 */
      var menu = new BMapGL.ContextMenu();
      var txtMenuItem = [
        {
          text: "搜索地址",
          callback() {}
        },
        {
          text: "放大",
          callback: function() {
            that.map.zoomIn();
          }
        },
        {
          text: "缩小",
          callback: function() {
            that.map.zoomOut();
          }
        },
        {
          text: "设置中心点",
          async callback() {
            /*  that.map.zoomCentral(); */
            /*获取地图的中心坐标并将地图移动该坐标 */
            const centerMove = await searchCoordinateMove();
            const newcenterMove = JSON.parse(centerMove.data.result).data;
            console.log("newcenterMove", newcenterMove);
            /* 设置地图默认中心坐标接口 */
            const center = await searchCoordinate({
              map_longitude: newcenterMove[0].map_longitude,
              map_latitude: newcenterMove[0].map_latitude,
              map_level: newcenterMove[0].map_level
            });
            /*      console.log("center", center); */
          }
        },
        {
          text: "查看全国",
          callback: function() {
            that.map.setZoom(5);
          }
        },
        {
          text: "设置机房",
          async callback() {
            //获取站点名
            const addSetdian = await addMapSetdian();
            const addSetmap = JSON.parse(addSetdian.data.result).data.map(
              item => {
                item.label =
                  item.StationName1 +
                  "-" +
                  item.StationName2 +
                  "-" +
                  item.StationName5 +
                  "-" +
                  item.StationName3;
                return item;
              }
            );
            // console.log("addSetdian", addSetdian);
            // console.log("addSetmap", addSetmap);
            const point = new BMapGL.Point(that.lng, that.lat);
            const marke = new BMapGL.Marker(point);
            that.map.addOverlay(marke);
            /* 可托拽的标注 */
            /*    that.marker.enableDragging();
             that.marker.addEventListener("dragend", function(e) {
              console.log("当前位置:" + e.point.lng + ", " + e.point.lat);
            }); */
            /* 设置站点窗口 */
            var opts = {
              width: "auto", // 信息窗口宽度
              height: "auto", // 信息窗口高度
              title:
                '<p style="font-size: 16px;color: black;margin:2px;margin-bottom: 10px;">设置站点位置  </p>', // 信息窗口标题
              message: "地址信息"
            };
            var geoc = new BMapGL.Geocoder(); //坐标与路名的转换
            showInfoWindowTest.homeList = addSetmap;
            // 逆地址解析,通过经纬度获取地址信息
            geoc.getLocation(marke.getPosition(), function(rs) {
              /*   console.log("rs", rs); */
              showInfoWindowTest.address = rs.address;
              showInfoWindowTest.point = marke.getPosition();
            });
            // 设置面板
            this.infoWindow = new BMapGL.InfoWindow(
              showInfoWindowTest.$el,
              opts
            );
            that.map.openInfoWindow(this.infoWindow, point);
            marke.addEventListener("click", e => {
              //左击标注
              that.map.openInfoWindow(this.infoWindow, point);
            });
          }
        }
      ];
      for (var i = 0; i < txtMenuItem.length; i++) {
        menu.addItem(
          new BMapGL.MenuItem(txtMenuItem[i].text, txtMenuItem[i].callback, {
            width: 100, // 指定菜单项的宽度
            id: "menu" + i // 指定菜单项dom的id
          })
        );
      }
      this.map.addContextMenu(menu);
    },
    /* loadNode 加载子树数据的方法*/
    async loadNode(node, resolve) {
      /*   console.log("node", node); */
      if (node.level === 0) {
        /* * 查询省 */
        const { data: province } = await searchProvince();
        // console.log("province", province);
        if (province.result && JSON.parse(province.result).code == 0) {
          return this.$message.error(JSON.parse(province.result).msg);
        }
        const list = JSON.parse(province.result).data;
        //console.log("list", list)
        const cityData = list.map(item => {
          return { label: item }; /* return出一个对象  最后得到一个数组对象 */
        });
        //  console.log("cityData", cityData)
        return resolve(cityData);
      } else if (node.level === 1) {
        /* 查询市 */
        const city = await searchCity({ StationName1: node.data.label });
        //console.log('city.data.result',city.data.result);
        if (city.data.result && JSON.parse(city.data.result).code == 0) {
          return this.$message.error(JSON.parse(city.data.result).msg);
        }
        const citys = JSON.parse(city.data.result).data;
        const cityList = citys.map(item => {
          return { label: item };
        });
        return resolve(cityList);
        /* console.log("cityList", cityList); */
      } else if (node.level === 2) {
        /* 查询区县 */
        const county = await searchCounty({
          StationName1: node.parent.data.label,
          StationName2: node.data.label
        });
        //console.log(' county', county);
        if (county.data.result && JSON.parse(county.data.result).code == 0) {
          return this.$message.error(JSON.parse(county.data.result).msg);
        }
        const countys = JSON.parse(county.data.result).data;
        const countyList = countys.map(item => {
          return { label: item };
        });
        return resolve(countyList);
      } else if (node.level === 3) {
        /* room 机房信息  */
        const room = await searchStation({
          StationName1: node.parent.parent.data.label,
          StationName2: node.parent.data.label,
          StationName5: node.data.label
        });
        /*   console.log(" room", room); */
        if (room.data.result && JSON.parse(room.data.result).code == 0) {
          return this.$message.error(JSON.parse(room.data.result).msg);
        }
        const rooms = JSON.parse(room.data.result).data;
        /* StationName3机房位置信息 */
        const roomList = rooms.map(item => {
          return { label: item.StationName3 };
        });
        return resolve(roomList);
      } else {
        /* 查询电池组信息 */
        return resolve([]);
      }
    },
    async handleInterface(node) {
      const that = this;
      const [areaRoom, batteryList] = await Promise.all([
        /* 查询地图机房信息 (结果中有机房的位置信息) */
        searchMapStation({
          StationName1: node.parent.parent.parent.data.label,
          StationName2: node.parent.parent.data.label,
          StationName5: node.parent.data.label
        }),
        /*  查询电池组信息 */
        searchBattInfo({
          StationName1: node.parent.parent.parent.data.label,
          StationName2: node.parent.parent.data.label,
          StationName5: node.parent.data.label,
          StationName3: node.data.label
        })
      ]);
      if (areaRoom.data.result && JSON.parse(areaRoom.data.result).code == 0) {
        return this.$message.error(JSON.parse(areaRoom.data.result).msg);
      }
      /*     console.log("areaRoom", areaRoom); */
      /*  console.log("batteryList", batteryList); */
      if (
        batteryList.data.result &&
        JSON.parse(batteryList.data.result).code == 0
      ) {
        return this.$message.error(JSON.parse(batteryList.data.result).msg);
      }
      const list = JSON.parse(areaRoom.data.result).data;
      this.obj = list.find(item => item.StationName3 == node.data.label); //机房坐标
      /*  console.log("obj", this.obj); */ if (
        this.obj.longitude == 0 &&
        this.obj.latitude == 0
      ) {
        this.$message.error("机房未定位");
      } else {
        this.batteryList = JSON.parse(batteryList.data.result).data; //电池组数目
        /*   console.log(" this.batteryList", this.batteryList); */
        /* 图标移动位置 */
        this.marker.setPosition(
          new BMapGL.Point(this.obj.longitude, this.obj.latitude)
        );
        /* 地图移动位置 */
        this.map.panTo(new BMapGL.Point(this.obj.longitude, this.obj.latitude));
        /* 信息框移动位置 */
        this.map.openInfoWindow(
          this.infoWindow,
          new BMapGL.Point(this.obj.longitude, this.obj.latitude)
        );
      }
      /* 信息框中的告警数延时数 接口 */
      /* const roomWarning = await searchRooms({
        StationId: this.batteryList[0].StationId
      });
      console.log("roomWarning", roomWarning);
      const newRoomWarning = JSON.parse(roomWarning.data.result).data;
      console.log("newRoomWarning", newRoomWarning); */
      this.marker.addEventListener("click", e => {
        this.map.openInfoWindow(
          this.infoWindow,
          new BMapGL.Point(this.obj.longitude, this.obj.latitude)
        ); //开启信息窗口
      });
      //右击删除marker 菜单
      this.marker.addEventListener("rightclick", e => {
        /*   console.log('e...............',e) */
        const select = that.addseRoomlist.find(
          item => this.batteryList[0].StationId === item.data.StationId
        );
        this.$confirm(
          '确认从地图上删除"武汉市-东西湖-设备1的位置信息"',
          "提示",
          {
            confirmButtonText: "确定",
            cancelButtonText: "取消",
            type: "warning"
          }
        )
          .then(async () => {
            if (select) {
              /* 右击删除当前标注 */
              const deleteMarker = await searchDeletRoom({
                num: select.data.num,
                StationId: select.data.StationId,
                StationName: select.data.StationName,
                StationName3: select.data.StationName3,
                Address: select.data.Address,
                longitude: select.data.longitude,
                latitude: select.data.latitude,
                information: select.data.information,
                FBSDeviceId: select.data.FBSDeviceId
              });
              //右击删除标注
              /*  console.log("deleteMarker", deleteMarker); */
              this.map.removeOverlay(select);
              this.initMap();
            }
            this.$message({
              type: "success",
              message: "删除成功!"
            });
          })
          .catch(() => {
            this.$message({
              type: "info",
              message: "已取消删除"
            });
          });
      });
    },
    //树形控件点击事件
    async nodeClick(current, value) {
      /*  console.log(value.level, value); */
      if (value.level > 3) {
        this.handleInterface(value);
      }
    },
    // 通过IP获取当前经纬度
    async getLocationByIp() {
      // 获取到经纬度坐标后
      // const ipRes = await this.$jsonp("http://api.map.baidu.com/location/ip", {
      //   ak: "AWqwD701uOy6kaLIxBY2NDjATvE6x5IG",
      //   coor: "bd09ll",
      //   output: "jsonp"
      // });
      const [ipRes, addSeachroom] = await Promise.all([
        this.$jsonp("http://api.map.baidu.com/location/ip", {
          ak: "AWqwD701uOy6kaLIxBY2NDjATvE6x5IG",
          coor: "bd09ll",
          output: "jsonp"
        }),
        searchMap({
          adata: { alm_cleared_type: 0, alm_id: 1 },
          bplan: { discharge_reason: 3 }
        })
      ]);
      this.address = ipRes.address; //地址
      this.lng = ipRes.content.point.x; //经度
      this.lat = ipRes.content.point.y; //纬度
      this.addseRoomlist = JSON.parse(addSeachroom.data.result);
      /*  console.log('addseRoomlist',this.addseRoomlist) */
      // 创建地图
      this.$nextTick(() => {
        this.initMap();
      });
    },
    /*点击获取当前坐标 */
    onCLickMap() {
      const that = this;
      this.map.addEventListener("rightclick", function(e) {
        /*   console.log("e", e); */
        that.lng = e.latlng.lng;
        that.lat = e.latlng.lat;
        that.cityName = e.currentTarget.cityName;
      });
    },
    initChart() {
      // 饼状图1
      chart1 = {
        //红,蓝,绿
        color: ["#FF0000", "#00FF00"],
        title: {
          text: "机房停电"
        },
        series: [
          {
            name: "电池信息",
            data: [
              { value: this.powerOff.sum, name: "机房停电" },
              {
                value: this.powerOff.newsum - this.powerOff.sum,
                name: "机房未停电"
              }
            ]
          }
        ]
      };
      // 饼状图2
      chart2 = {
        // 红,黄,绿,蓝
        color: ["#00FF00", "#FFD700", "#FF0000"],
        title: {
          text: "单体容量健康率"
        },
        series: [
          {
            name: "电池信息",
            data: [
              {
                value:
                  this.battGood.sum -
                  this.battGood.data[1] -
                  this.battGood.data[0],
                name: "单体容量健康"
              },
              { value: this.battGood.data[1], name: "单体容量更换" },
              { value: this.battGood.data[0], name: "单体容量告警" }
            ]
          }
        ]
      };
      // 饼状图3
      chart3 = {
        // 红, 黄,绿,紫色
        color: ["#FF0000", "#FFD700", "#00FF00", "#BA55D3"],
        title: {
          text: "电池状态"
        },
        series: [
          {
            name: "电池信息",
            data: [
              { value: this.battState.data[2].num, name: "放电" },
              { value: this.battState.data[3].num, name: "充电" },
              { value: this.battState.data[1].num, name: "浮充" },
              { value: this.battState.data[4].num, name: "均充" }
            ]
          }
        ]
      };
      // 饼状图4
      chart4 = {
        // 红, 深蓝色, 蓝,浅红,绿, 黄
        color: [
          "#FF0000",
          "#00008B",
          "#1E90FF",
          "#F08080",
          "#7CFC00",
          "#FFD700"
        ],
        title: {
          text: "电池告警率"
        },
        series: [
          {
            name: "电池信息",
            data: [
              { value: this.Alarm.data, name: "在线电压" },
              { value: this.Alarm.data.MonNum, name: "组端电压" },
              { value: this.Alarm.data.usr_Id, name: "充电电流" },
              { value: this.Alarm.data.alm_id, name: "放电电流" },
              { value: this.Alarm.data.alm_level, name: "单体电压" },
              {
                value: this.Alarm.data.alm_value + this.Alarm.data.BattGroupId,
                name: "容量告警"
              }
            ]
          }
        ]
      };
      // 设置图表
      this.setChart();
    },
    setChart() {
      this.$refs.chart1.setOption(chart1);
      this.$refs.chart2.setOption(chart2);
      this.$refs.chart3.setOption(chart3);
      this.$refs.chart4.setOption(chart4);
    },
    //获取echarts图表电池数据 /* 电池组健康率  机房停电信息 */
    async getBatteryData() {
      const [battGood, powerOff, battState, Alarm] = await Promise.all([
        searchBattGood(),
        searchPowerOff(),
        searchBattState(),
        searchAlarm()
      ]);
      /*  console.log('battGood',battGood); */
      /*    console.log('battState',battState); */
      /*   console.log("Alarm", Alarm); */
      if (battGood.status !== 200) {
        return this.$message.error(battGood.statusText);
      }
      if (powerOff.status !== 200) {
        return this.$message.error(powerOff.statusText);
      }
      if (
        battState.data.result &&
        JSON.parse(battState.data.result).code == 0
      ) {
        return this.$message.error(JSON.parse(battState.data.result).msg);
      }
      this.battGood = JSON.parse(battGood.data.result);
      this.powerOff = JSON.parse(powerOff.data.result);
      this.battState = JSON.parse(battState.data.result);
      this.Alarm = JSON.parse(Alarm.data.result);
      /* console.log('this.Alarm ',this.Alarm ) */
      /* console.log('this.battState',this.battState); */
      this.initChart();
    },
    /* 添加机房接口 */
    meData() {
      const that = this;
      // 添加面板点击事件
      showInfoWindowTest.$on("set-home-info", function(data) {
        console.log("data", data);
        that.medatas = data;
        console.log("that.medatas", that.medatas);
        this.$confirm("确认将武汉-东西湖区设置到该位置吗?", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning"
        })
          .then(async () => {
            //添加地图上的机房接口
            const res = await addMapStation({
              StationName1: data.info.StationName1,
              StationName2: data.info.StationName2,
              StationName5: data.info.StationName5,
              StationName3: data.info.StationName3,
              Address: data.address,
              longitude: data.point.lng,
              latitude: data.point.lat,
              information: ""
            });
            this.$message({
              type: "success",
              message: "设置站点位置成功!"
            });
          })
          .catch(() => {
            this.$message({
              type: "info",
              message: "已取消设置站点位置!"
            });
          });
      });
    }
  },
  mounted() {
    this.getLocationByIp(); // 通过IP获取当前经纬度  查询已添加到地图的机房
    this.getBatteryData(); // 初始化饼状图
    this.meData(); //添加机房接口
    this.getCityrom(); //根据机房的id查询机房的经纬度
  }
};
</script>
<style scoped  lang="less">
.box-tools {
  position: relative;
  line-height: 32px;
  .item {
    margin-right: 30px;
  }
  .item2 {
    margin-right: -20px;
    position: absolute;
    top: 4px;
    right: 20px;
  }
}
.rooms {
  margin-bottom: 10px !important;
}
.inputSeach {
  margin-bottom: 15px !important;
}
/deep/ .el-science-blue .el-input.is-disabled .el-input__inner,
.el-science-blue .el-input__inner {
  background-color: #fff !important;
  border-color: #3ebdc9;
  z-index: 999;
}
.dialog-footer {
  margin-left: 375px;
}
.box-tools .iconfont {
  font-size: 20px;
}
.box-tools .iconfont:hover {
  cursor: pointer;
  color: #cfcfcf;
}
.box-tools .iconfont:active {
  color: #ff0000;
}
.filter-tree {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
.page-index {
  color: #ffffff;
}
.map-container {
  margin-right: 4px;
  margin-left: 4px;
  box-sizing: border-box;
  height: 100%;
}
.map-content {
  height: 100%;
}
.pie-list {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  height: 100%;
}
.pie-item {
  flex: 1;
}
/*搜索框 */
.el-select .el-input {
  width: 130px;
}
.input-with-select .el-input-group__prepend {
  background-color: #fff;
}
</style>
src/pages/login.vue
@@ -43,8 +43,8 @@
      },
      /* 登录表单el-form 的 数据绑定 */
      loginForm: {
        username: "admin",
        password: "admin"
        username: "",
        password: ""
      }
    };
  },
@@ -65,9 +65,14 @@
        if (res.result && JSON.parse(res.result).code == 0)
          return this.$message.error(JSON.parse(res.result).msg);
        this.$message.success("登录成功");
        sessionStorage.setItem('username', this.loginForm.username);
        this.$router.push("/home");
      });
    }
  },
  mounted() {
    // 初始化登录状态
    sessionStorage.setItem('username', "");
  }
};
</script>
src/router/index.js
@@ -8,5 +8,12 @@
    routes
});
router.beforeEach((to, from, next)=>{
    if(to.name != 'login' && !sessionStorage.getItem('username')) {
        next('\login');
    }else {
        next();
    }
});
export default router;
vue.config.js
@@ -2,22 +2,7 @@
    publicPath: './',
    configureWebpack: config=> {
        config.externals = {
           BMapGL : "BMapGL"
           BMap: "BMap"
        }
    },
    devServer: {
        // host: 'localhost',
        port: 8080,
        open: true,   //  自动打开浏览器
        proxy: {
          '/yckj': {
           /*  target: 'http://192.168.10.222:8080/', */  // 正式环境 (公司电脑服务器)  服务器接口域名
           target:'http://localhost:8919/',     /* 本机开启的服务器 */
            changeOrigin: true,  //是否跨域
            pathRewrite: {
              '^/yckj': ''  /* 本地域名 */
            }
          }
        }
      }
}