Просмотр исходного кода

Merge branch 'mw2' of http://61.161.152.110:10101/r/electronic-map into tjj2

# Conflicts:
#	src/App.vue
darker 4 лет назад
Родитель
Сommit
97eb482f10

+ 2 - 553
src/App.vue

@@ -1,10 +1,6 @@
 <template>
-  <!-- <div v-if="!showSisView && isLogined" class="main"> -->
-    <div  class="main" v-if="!showSisView && isLogined">
-    <!-- <div v-if="token !==''" class="main"> -->
   <div v-if="!showSisView && isLogined" class="main">
     <div class="header-body">
-      <div class="header-title" >
       <div class="header-title">
         <svg
           version="1.1"
@@ -237,7 +233,6 @@ l16.229-16.229l16.229,16.229l42.867-42.867C115.034,45.228,109.133,42.189,102.956
         </svg>
       </div>
       <div class="header-menu-body">
-        <Header  @onMenuClick="HeaderMenuClick" />
         <Header @onMenuClick="HeaderMenuClick" />
       </div>
     </div>
@@ -247,14 +242,14 @@ l16.229-16.229l16.229,16.229l42.867-42.867C115.034,45.228,109.133,42.189,102.956
       @mouseenter="showMenu"
       @mouseleave="hideMenu"
     >
-      <Menu  :root="root" />
       <Menu :root="root" />
     </div>
     <div class="main-body">
       <router-view />
     </div>
   </div>
-  <div v-else class="login">
+  <login-page v-if="!showSisView && !isLogined" @onLogin="login" />
+  <div v-else-if="!isLogined" class="login">
     <login-page />
   </div>
   <!-- <login-page v-if="!showSisView && !isLogined" @onLogin="login" /> -->
@@ -264,8 +259,6 @@ l16.229-16.229l16.229,16.229l42.867-42.867C115.034,45.228,109.133,42.189,102.956
    </div> -->
  
   <sisView v-else-if="showSisView" />
-  <login-page v-if="!showSisView && !isLogined" @onLogin="login" />
-  <sisView v-if="showSisView" />
 </template>
 
 <script>
@@ -291,29 +284,13 @@ export default {
       // 当前子系统
       root: "",
       isLogined: true,
-      token:localStorage.getItem("token"),
       showSisView: false,
       memuCloseTimeout: null,
     };
   },
- beforeCreate(){
-   let authToken = localStorage.getItem('authToken')
-   console.log('authToken:', authToken)
-  if (authToken === null || authToken === "") {
-		// document.querySelector('body').setAttribute("style","background-image:url('./assets/login.jpg')")
-    document.querySelector('body').setAttribute("style","background-color:#040c0b;background-size:auto;background-image:url('./assets/login.jpg')")
-		} else {
-			document.querySelector('body').setAttribute("style","background-image:url('./assets/background.png');background-size:cover")
-		}
- },
 
   created() {
     let that = this;
-
-    console.log("token:",that.token)
-    that.$nextTick(()=>{
-      //判断页面是否登录
-    })
     // that.$nextTick(() => {
     //   that.API.requestData({
     //     isMust: false, // 请求是否携带 token ,默认为 true ,可缺省
@@ -331,11 +308,6 @@ export default {
     //         method: "POST", // 请求方式,默认为 GET ,可缺省
     //         subUrl: "admin/usermenu", // 请求接口地址,必传项
     //         success() {
-    //           that.BASE.showMsg({
-    //             msg: "登陆成功",
-    //             type: "success",
-    //           });
-    //           that.$router.push('/'); // 跳转到首页
     //           // that.BASE.showMsg({
     //           //   msg: "登陆成功",
     //           //   type: "success",
@@ -364,28 +336,13 @@ export default {
       }, 500);
     },
     login(params) {
-      // if (params.username && params.password ) 
-      // {
-      //   this.isLogined = true;
-      //   }else{
-      //  this.isLogined=false
-      // }
-       if (params.username && params.password && params.token ) 
-      {
-        // this.isLogined = true;
-        this.token = params.token
-        }
-      console.log('params:',params)
-      // this.$router.push('/monitor/home')
       if (params.username && params.password) this.isLogined = true;
     },
   },
 
   watch: {
     $route(res) {
-      console.log('resRoute:',res)
       this.showSisView = res.fullPath === "/sisView";
-      // this.isLogined = res.path !=='/login'
     },
   },
 };
@@ -456,7 +413,6 @@ body {
     height: calc(100vh - @headerHeight);
     top: @headerHeight;
     background-color: fade(#192a26, 75%);
-    z-index: 99;
     z-index: 3000;
     opacity: 0;
     transition: opacity 0.2s;
@@ -486,511 +442,4 @@ body {
     // }
   }
 }
-.login{
-  width: 100vw;
-  height: 100%;
-  display: flex;
-  flex-wrap: wrap;
-  overflow: hidden;
-  background-image: url("./assets/login.jpg");
-  background-color: #040c0b;
-    opacity: 0.2;
-    position: absolute;
-}
-</style>
-<template>
-  <!-- <div v-if="!showSisView && isLogined" class="main"> -->
-    <div  class="main" v-if="!showSisView && isLogined">
-    <!-- <div v-if="token !==''" class="main"> -->
-    <div class="header-body">
-      <div class="header-title" >
-        <svg
-          version="1.1"
-          xmlns="http://www.w3.org/2000/svg"
-          xmlns:xlink="http://www.w3.org/1999/xlink"
-          x="0px"
-          y="0px"
-          width="16.667vh"
-          height="3.704vh"
-          viewBox="0 0 377.437 91.615"
-          enable-background="new 0 0 377.437 91.615"
-          xml:space="preserve"
-        >
-          <g id="图层_1">
-            <g>
-              <path
-                id="XMLID_489_"
-                fill="#FFF"
-                d="M148.946,81.252c-6.114,0-10.656-4.561-10.656-10.33v-0.061c0-5.708,4.448-10.389,10.833-10.389c3.919,0,6.269,1.265,8.197,3.103l-2.912,3.241c-1.602-1.407-3.233-2.266-5.315-2.266c-3.503,0-6.025,2.811-6.025,6.256v0.055c0,3.444,2.463,6.313,6.025,6.313c2.378,0,3.833-0.915,5.468-2.35l2.909,2.84C155.329,79.877,152.955,81.252,148.946,81.252z"
-              />
-              <polygon
-                id="XMLID_488_"
-                fill="#FFF"
-                points="173.271,60.817 173.271,68.472 164.839,68.472 164.839,60.817 160.263,60.817 160.263,80.907 164.839,80.907 164.839,72.547 173.271,72.547 173.271,80.907 177.843,80.907 177.843,60.817"
-              />
-              <path
-                id="XMLID_486_"
-                fill="#FFF"
-                d="M195.929,80.907l-10.063-12.77v12.77h-4.516v-20.09h4.214l9.743,12.373V60.817h4.514v20.09H195.929z"
-              />
-              <path
-                id="XMLID_484_"
-                fill="#FFF"
-                d="M304.535,81.252c-6.47,0-10.928-4.39-10.928-10.33v-0.061c0-5.708,4.606-10.389,10.901-10.389c3.741,0,5.992,0.845,8.429,2.482l-2.564,3.243c-1.789-1.208-3.028-1.694-6.012-1.646c-3.325,0.055-5.967,2.839-5.967,6.256v0.055c0,3.676,2.607,6.374,6.291,6.374c1.664,0,3.146-0.401,4.307-1.206v-2.871h-2.908v-3.817h7.332v8.725C311.277,79.817,308.336,81.252,304.535,81.252z"
-              />
-              <path
-                id="XMLID_482_"
-                fill="#FFF"
-                d="M245.533,80.907l-10.063-12.77v12.77h-4.515v-20.09h4.213l9.744,12.373V60.817h4.513v20.09H245.533z"
-              />
-              <path
-                id="XMLID_480_"
-                fill="#FFF"
-                d="M321.476,80.907v-8.793l-6.949-11.297h5.346l4.361,7.936l4.397-7.936h5.196l-6.951,11.238v8.853H321.476z"
-              />
-              <polygon
-                fill="#FFF"
-                points="228.012,64.895 228.012,60.817 211.357,60.817 211.357,80.907 228.012,80.907 228.012,76.83 215.967,76.83 215.967,72.831 226.732,72.831 226.732,68.753 215.967,68.753 215.967,64.895 "
-              />
-              <polygon
-                fill="#FFF"
-                points="269.557,64.895 269.557,60.817 252.902,60.817 252.902,80.907 269.557,80.907 269.557,76.83 257.511,76.83 257.511,72.831 268.277,72.831 268.277,68.753 257.511,68.753 257.511,64.895 "
-              />
-              <path
-                fill="#FFF"
-                d="M291.333,80.907l-3.983-7.74c2.177-1.005,3.696-3.265,3.696-5.896v0c0-3.564-2.784-6.454-6.22-6.454H272.98v20.09h4.57v-7.182h5.515l3.695,7.182H291.333z M277.55,64.895h6.774c1.265,0,2.29,1.064,2.29,2.376v0c0,1.312-1.025,2.376-2.29,2.376h-6.774V64.895z"
-              />
-            </g>
-            <g>
-              <g>
-                <path
-                  id="XMLID_479_"
-                  fill="#FFF"
-                  d="M167.55,39.067h-1.561c-0.546-2.03-1.035-3.547-1.82-5.373l-4.36-0.004
-c0.771,2.025,1.339,3.833,1.692,5.377h-3.128v-6.282h8.215v-3.861h-8.215v-4.49h8.393v-3.899h-21.599v3.899h8.101v4.49h-7.686
-v3.861h7.686v6.282h-8.758v3.976h23.04V39.067z"
-                />
-                <path
-                  id="XMLID_476_"
-                  fill="#FFF"
-                  d="M170.113,14.394l-28.202,0.001c-2.03,0-3.621,1.457-3.621,3.316l0.002,28.005c0.001,2.115,1.9,3.424,3.66,3.424h28.409c0.824,0,1.732-0.351,2.432-0.939c0.807-0.679,1.251-1.602,1.251-2.596l-0.001-27.778C174.042,15.742,172.5,14.394,170.113,14.394z M168.858,18.367v26.724l-25.463,0V18.369L168.858,18.367z"
-                />
-              </g>
-              <g>
-                <path
-                  id="XMLID_475_"
-                  fill="#FFF"
-                  d="M234.621,16.644h-4.845l2.238,5.092h-6.883l4.632-7.075h-5.637l-4.689,7.134c-0.575,0.918-0.678,1.757-0.296,2.503c0.463,0.803,1.204,1.227,2.21,1.26l14.021-0.001c0.056-0.004,1.374-0.119,1.961-1.121c0.408-0.696,0.352-1.623-0.169-2.754C236.499,20.237,234.621,16.644,234.621,16.644z"
-                />
-                <path
-                  id="XMLID_471_"
-                  fill="#FFF"
-                  d="M236.358,27.874c-0.485-0.513-1.212-0.773-2.16-0.773h-11.46c-2.727,0-2.758,2.355-2.758,2.379v19.587h4.861v-6.638h7.269v2.625h-4.913v3.937l6.701-0.002c2.039,0,3.072-0.957,3.072-2.843l-0.001-16.651C236.971,29.456,237.012,28.565,236.358,27.874z M232.11,30.884v2.218h-7.269v-2.218H232.11z M232.11,36.658v2.215h-7.269v-2.215
-H232.11z"
-                />
-                <path
-                  id="XMLID_470_"
-                  fill="#FFF"
-                  d="M242.25,30.455l13.047,0.002v-4.014h-10.943V25.07c7.277-2.622,11.396-9.303,11.396-9.303h-5.433c0,0-2.434,3.517-5.964,4.758v-5.864h-5.064l0.002,13.225C239.291,29.519,240.369,30.455,242.25,30.455z"
-                />
-                <path
-                  id="XMLID_469_"
-                  fill="#FFF"
-                  d="M244.353,37.835v-6.236h-5.023l0.002,14.284c0,2.032,1.009,3.106,2.918,3.106l13.047,0v-4.051h-10.943v-2.266c6.72-2.542,11.458-10.166,11.458-10.166h-5.463C250.348,32.507,248.039,36.192,244.353,37.835z"
-                />
-              </g>
-              <path
-                fill="#FFF"
-                d="M183.913,20.6h25.993v5.788h4.901l-0.001-6.153c0-2.054-1.338-3.382-3.409-3.382h-11.566v-2.773h-5.542v2.773h-11.27c-2.447,0-3.967,1.296-3.967,3.382v6.153h4.861L183.913,20.6z M206.875,37.054h2.163l4.669-9.237H208.6l-3.441,6.245c-0.656-1.251-1.267-2.746-1.791-4.375h-2.899c-0.464-0.776-1.154-1.718-1.886-2.574c0.149-0.216,0.356-0.573,0.622-1.043l0.016-0.028h9.064v-3.709h-22.71v3.709h7.542c-3.771,2.954-11.774,4.27-13.435,4.518v4.199c1.49-0.195,9.366-1.363,15.546-4.938c0.19,0.258,0.519,0.775,0.69,1.048c-4.112,4.071-14.113,5.95-16.236,6.312v4.247c1.536-0.243,10.602-1.82,17.617-6.536c0.08,0.459,0.094,0.901,0.158,1.861c-4.899,3.313-9.952,5.405-17.775,7.207v4.28c1.733-0.309,11.518-2.4,17.775-6.687v2.684c0,0.691-0.642,1.331-1.338,1.321h-5.732v3.891h7.327c2.973,0,4.516-1.455,4.516-4.354v-7.226c2.196,3.848,6.276,8.845,13.004,10.846v-4.457C213.257,43.436,208.773,40.441,206.875,37.054z"
-              />
-              <g>
-                <polygon
-                  id="XMLID_468_"
-                  fill="#FFF"
-                  points="268.998,32.332 264.811,23.662 259.317,23.662 263.189,32.332"
-                />
-                <polygon
-                  id="XMLID_467_"
-                  fill="#FFF"
-                  points="268.756,22.309 264.964,14.394 259.558,14.394 263.006,22.309 "
-                />
-                <path
-                  fill="#FFF"
-                  d="M268.529,34.2h-5.266l-0.025,0.219c-0.008,0.072-1.178,6.718-4.536,14.771h5.556c3.063-6.815,4.233-14.631,4.242-14.717
-L268.529,34.2z"
-                />
-                <path
-                  id="XMLID_463_"
-                  fill="#FFF"
-                  d="M295.075,32.643l-0.001-9.424c0-1.685-1.122-2.613-3.159-2.613h-4.069v-1.97h8.552v-3.861l-23.179,0
-c-2.138,0-3.314,1.033-3.314,2.907v15.127c0.094,4.181-0.5,10.588-2.858,16.035l-0.149,0.346h5.222l0.062-0.157
-c1.788-4.525,2.667-10.194,2.667-15.55V18.636h8.272v1.97l-3.532,0c-1.978,0-3.045,1.346-3.045,2.613v9.389
-c0,2.487,1.452,2.83,3.021,2.83h3.995v9.957h-2.495v3.861l4.273,0c1.978,0,3.205-1.082,3.205-2.822V35.439h3.268
-C293.461,35.439,295.075,35.223,295.075,32.643z M290.214,24.198v2.064h-8.812l-0.001-2.064H290.214z M290.214,29.819v2.064
-h-8.811v-2.064H290.214z"
-                />
-                <path
-                  id="XMLID_462_"
-                  fill="#FFF"
-                  d="M281.646,37.1c-1.886,0-3.186,0-4.351,0c-0.627,5.028-3.023,11.032-3.023,11.032h4.543
-C278.815,48.132,281.02,43.161,281.646,37.1z"
-                />
-                <path
-                  fill="#FFF"
-                  d="M294.034,37.1h-4.363c0.198,1.057,1.316,6.682,3.187,11.032h4.584C295.631,43.114,294.361,38.359,294.034,37.1z"
-                />
-              </g>
-              <path
-                fill="#FFF"
-                d="M337.303,37.937h-15.507v-1.854h13.598v-3.657h-12.877v-1.711h11.708V27.22h-11.708v-1.464h11.83v-3.575h-11.83v-1.527
-h12.887v-3.737h-12.847c-0.535-2.42-0.683-2.698-0.683-2.698h-5.107c0.16,0.604,0.42,1.602,0.686,2.698h-7
-c0.766-1.27,0.968-2.103,1.056-2.698l-4.921,0c-0.208,0.749-1.412,4.409-5.522,6.996v4.682c1.223-0.327,1.979-0.9,2.491-1.249
-v8.921c0,0.873,0.251,1.537,0.746,1.975c0.768,0.681,1.833,0.543,1.844,0.539h10.504v1.854h-15.305v3.938h5.432
-c-0.691,1.998-3.551,6.909-3.551,6.909h5.647c0,0,2.693-4.816,3.358-6.909h4.418v7.381h5.146v-7.381h4.416
-c0.857,2.406,3.469,6.909,3.469,6.909h5.637c0,0-2.983-5.131-3.66-6.909h5.646V37.937z M317.453,32.427H308.5v-1.711h8.953V32.427
-z M317.453,27.22H308.5v-1.464h8.953V27.22z M317.453,22.181H308.5v-1.527h8.953V22.181z"
-              />
-              <g>
-                <path
-                  fill="#FFF"
-                  id="XMLID_459_"
-                  d="M377.435,18.514c0-2.424-1.459-3.814-4.004-3.814l-27.645,0.001c-2.516,0-3.901,1.322-3.901,3.723
-l0.005,27.152c0,2.556,1.81,3.449,4.039,3.449l0.046,0.003l27.269-0.003c2.292,0,4.193-0.972,4.193-3.449L377.435,18.514z
- M372.292,44.977h-25.341V18.675l25.34-0.003L372.292,44.977z"
-                />
-                <path
-                  fill="#FFF"
-                  d="M366.732,23.889v-4.182h-5.146v4.182h-12.902v4.052h8.563c-1.48,3.031-5.104,7.505-8.642,9.59v4.647
-c6.305-2.621,10.252-7.973,12.981-12.76v10.448h-6.755v4.014h7.576c2.708,0,4.325-1.467,4.325-3.923V27.941h4.158v-4.052H366.732
-z"
-                />
-              </g>
-            </g>
-            <g>
-              <linearGradient
-                id="SVGID_1_"
-                gradientUnits="userSpaceOnUse"
-                x1="61.5049"
-                y1="30.1548"
-                x2="61.5049"
-                y2="66.792"
-              >
-                <stop offset="0" style="stop-color: #f6ab00" />
-                <stop offset="0.5" style="stop-color: #d84c14" />
-                <stop offset="0.75" style="stop-color: #cc2a1c" />
-                <stop offset="1" style="stop-color: #c11920" />
-              </linearGradient>
-              <path
-                fill="url(#SVGID_1_)"
-                d="M102.96,39.692L77.737,64.915l-2.879-2.878l23.934-23.932c-6.846-2.449-14.003-4.243-21.396-5.306
-			L61.508,48.687l-2.879-2.879l13.626-13.625c-3.539-0.341-7.127-0.518-10.756-0.518c-5.668,0-11.237,0.427-16.676,1.249
-			L31.928,45.808l16.229,16.229l-2.879,2.878L26.171,45.808l11.593-11.593C25.018,37,13.093,41.981,2.406,48.742l42.873,42.874
-			l16.229-16.229l16.229,16.229l42.867-42.867C115.039,45.228,109.138,42.189,102.96,39.692z"
-              />
-              <path
-                id="XMLID_457_"
-                fill="none"
-                d="M122.614,44.877l-12.419-12.419L77.737,64.915l-2.879-2.878l31.538-31.538
-			c0.509-0.508,0.509-1.332,0-1.84l-12.43-12.431L61.508,48.687l-2.879-2.879L90.26,14.176c0.456-0.456,0.456-1.196,0-1.652
-			L77.737,0L31.928,45.808l16.229,16.229l-2.879,2.878L26.171,45.808l31.467-31.466c0.547-0.547,0.547-1.435,0-1.982L45.279,0
-			L0.374,44.906c-0.498,0.498-0.498,1.306,0,1.804l44.905,44.905l16.229-16.229l16.229,16.229l44.877-44.876
-			C123.128,46.225,123.128,45.391,122.614,44.877z"
-              />
-            </g>
-          </g>
-          <g id="图层_3">
-            <path
-              id="XMLID_458_"
-              fill="#C11920"
-              d="M122.614,44.877l-12.419-12.419L77.737,64.915l-2.879-2.878l31.538-31.538
-c0.509-0.508,0.509-1.332,0-1.84l-12.43-12.431L61.508,48.687l-2.879-2.879L90.26,14.176c0.456-0.456,0.456-1.196,0-1.652L77.737,0
-L31.928,45.808l16.229,16.229l-2.879,2.878L26.171,45.808l31.467-31.466c0.547-0.547,0.547-1.435,0-1.982L45.279,0L0.374,44.906
-c-0.498,0.498-0.498,1.306,0,1.804l44.905,44.905l16.229-16.229l16.229,16.229l44.877-44.876
-C123.128,46.225,123.128,45.391,122.614,44.877z"
-            />
-          </g>
-          <g id="图层_2">
-            <linearGradient
-              id="SVGID_2_"
-              gradientUnits="userSpaceOnUse"
-              x1="61.5"
-              y1="30.1548"
-              x2="61.5"
-              y2="66.792"
-            >
-              <stop offset="0" style="stop-color: #f6ab00" />
-              <stop offset="0.5" style="stop-color: #d84c14" />
-              <stop offset="0.75" style="stop-color: #cc2a1c" />
-              <stop offset="1" style="stop-color: #c11920" />
-            </linearGradient>
-            <path
-              fill="url(#SVGID_2_)"
-              d="M102.956,39.692L77.732,64.915l-2.879-2.878l23.934-23.932c-6.846-2.449-14.003-4.243-21.396-5.306
-L61.503,48.687l-2.879-2.879L72.25,32.182c-3.539-0.341-7.127-0.518-10.756-0.518c-5.668,0-11.237,0.427-16.676,1.249
-L31.923,45.808l16.229,16.229l-2.879,2.878L26.167,45.808l11.593-11.593C25.013,37,13.088,41.981,2.401,48.742l42.873,42.874
-l16.229-16.229l16.229,16.229l42.867-42.867C115.034,45.228,109.133,42.189,102.956,39.692z"
-            />
-          </g>
-          <g id="图层_4"></g>
-        </svg>
-      </div>
-      <div class="header-menu-body">
-        <Header  @onMenuClick="HeaderMenuClick" />
-      </div>
-    </div>
-    <div
-      class="menu-body"
-      :class="{ hover: isShowMenu }"
-      @mouseenter="showMenu"
-      @mouseleave="hideMenu"
-    >
-      <Menu  :root="root" />
-    </div>
-    <div class="main-body">
-      <router-view />
-    </div>
-  </div>
-  <div v-else class="login">
-    <login-page />
-  </div>
-  <!-- <login-page v-if="!showSisView && !isLogined" @onLogin="login" /> -->
-   <!-- <div v-else-if="token == ''">
-    {{token}}
- <login-page  @onLogin="login" />
-   </div> -->
- 
-  <sisView v-else-if="showSisView" />
-  <div v-else-if="!isLogined" class="login">
-    <login-page />
-  </div>
-  <!-- <login-page v-if="!showSisView && !isLogined" @onLogin="login" /> -->
-   <!-- <div v-else-if="token == ''">
-    {{token}}
- <login-page  @onLogin="login" />
-   </div> -->
- 
-  <sisView v-else-if="showSisView" />
-</template>
-
-<script>
-// 导入header.vue文件
-import Menu from "@/views/layout/Menu.vue";
-import Header from "@/views/layout/Header.vue";
-
-import { mapMutations } from "vuex";
-
-import LoginPage from "./views/layout/login-page.vue";
-import sisView from "./views/sisView/index.vue";
-export default {
-  components: {
-    Menu,
-    Header,
-    LoginPage,
-    sisView,
-  },
-
-  data() {
-    return {
-      isShowMenu: false,
-      // 当前子系统
-      root: "",
-      isLogined: true,
-      token:localStorage.getItem("token"),
-      showSisView: false,
-      memuCloseTimeout: null,
-    };
-  },
- beforeCreate(){
-   let authToken = localStorage.getItem('authToken')
-   console.log('authToken:', authToken)
-  if (authToken === null || authToken === "") {
-		// document.querySelector('body').setAttribute("style","background-image:url('./assets/login.jpg')")
-    document.querySelector('body').setAttribute("style","background-color:#040c0b;background-size:auto;background-image:url('./assets/login.jpg')")
-		} else {
-			document.querySelector('body').setAttribute("style","background-image:url('./assets/background.png');background-size:cover")
-		}
- },
-  created() {
-    let that = this;
-
-    console.log("token:",that.token)
-    that.$nextTick(()=>{
-      //判断页面是否登录
-    })
-    // that.$nextTick(() => {
-    //   that.API.requestData({
-    //     isMust: false, // 请求是否携带 token ,默认为 true ,可缺省
-    //     method: "POST", // 请求方式,默认为 GET ,可缺省
-    //     subUrl: "admin/loginvue", // 请求接口地址,必传项
-    //     data: {
-    //       username: "admin",
-    //       password: "admin",
-    //     },
-    //     success(res) {
-    //       localStorage.setItem("authToken", res.data.authToken);
-    //       localStorage.setItem("username", res.data.user.laborName);
-
-    //       that.API.requestData({
-    //         method: "POST", // 请求方式,默认为 GET ,可缺省
-    //         subUrl: "admin/usermenu", // 请求接口地址,必传项
-    //         success() {
-    //           that.BASE.showMsg({
-    //             msg: "登陆成功",
-    //             type: "success",
-    //           });
-    //           that.$router.push('/'); // 跳转到首页
-    //         },
-    //       });
-    //     },
-    //   });
-    // });
-  },
-
-  methods: {
-    // 切换子系统事件
-    HeaderMenuClick(data) {
-      this.root = data.id;
-    },
-    showMenu() {
-      this.isShowMenu = true;
-      this.memuCloseTimeout && clearTimeout(this.memuCloseTimeout);
-    },
-    hideMenu() {
-      const that = this;
-      this.memuCloseTimeout = setTimeout(function () {
-        that.isShowMenu = false;
-      }, 500);
-    },
-    login(params) {
-      // if (params.username && params.password ) 
-      // {
-      //   this.isLogined = true;
-      //   }else{
-      //  this.isLogined=false
-      // }
-       if (params.username && params.password && params.token ) 
-      {
-        // this.isLogined = true;
-        this.token = params.token
-        }
-      console.log('params:',params)
-      // this.$router.push('/monitor/home')
-    },
-  },
-
-  watch: {
-    $route(res) {
-      console.log('resRoute:',res)
-      this.showSisView = res.fullPath === "/sisView";
-      // this.isLogined = res.path !=='/login'
-    },
-  },
-};
-</script>
-
-<style lang="less">
-@import "./assets/styles/main.less";
-
-* {
-  box-sizing: border-box;
-
-  &::-webkit-scrollbar {
-    width: 6px;
-    height: 6px;
-  }
-
-  &::-webkit-scrollbar-track-piece {
-    background-color: rgba(255, 255, 255, 0.05);
-    -webkit-border-radius: 4px;
-  }
-
-  &::-webkit-scrollbar-thumb {
-    background-color: fade(@gray, 75);
-    -webkit-border-radius: 4px;
-    outline: none;
-    outline-offset: 0px;
-    border: none;
-  }
-}
-
-body {
-  margin: 0;
-  background: #fff;
-  color: #fff;
-  background-image: url("./assets/background.png");
-  background-size: cover;
-  font-size: @fontsize;
-  font-family: @defalut-font-family;
-}
-@menuWidth: 5.37vh;
-@headerHeight: 4.63vh;
-.main {
-  width: 100vw;
-  height: 100%;
-  display: flex;
-  flex-wrap: wrap;
-  overflow: hidden;
-  .header-body {
-    // background: radial-gradient(closest-corner at 22% 40%, #2d5a47, #040d0a, #040d0a);
-    flex: 0 0 100%;
-    width: 100%;
-    display: flex;
-    flex-direction: row;
-    height: @headerHeight;
-    border-bottom: 1px solid #142b29;
-    .header-title {
-      margin: auto;
-      color: #fff;
-    }
-    .header-menu-body {
-      flex-grow: 1;
-    }
-  }
-  .menu-body {
-    position: absolute;
-    flex: 0 0 @menuWidth;
-    width: @menuWidth;
-    height: calc(100vh - @headerHeight);
-    top: @headerHeight;
-    background-color: fade(#192a26, 75%);
-    z-index: 99;
-    opacity: 0;
-    transition: opacity 0.2s;
-    transition-timing-function: ease-in;
-    transform: translate(-@menuWidth);
-
-    &:hover,
-    &.hover {
-      opacity: 1;
-      transition: opacity 0.2s;
-      transition-timing-function: ease-out;
-      transform: translate(0);
-    }
-  }
-  .main-body {
-    flex: 0 0 calc(100vw);
-    max-width: calc(100vw);
-    height: calc(100vh - @headerHeight);
-    padding: 1.481vh;
-    // transition: flex 0.1s, margin-left 0.1s;
-    // transition-timing-function: ease-in-out;
-    // &.show-menu {
-    //   flex: 0 0 calc(100vw - @menuWidth);
-    //   margin-left: @menuWidth;
-    //   transition: flex 0.1s, margin-left 0.1s;
-    //   transition-timing-function: ease-in-out;
-    // }
-  }
-}
-.login{
-  width: 100vw;
-  height: 100%;
-  display: flex;
-  flex-wrap: wrap;
-  overflow: hidden;
-  background-image: url("./assets/login.jpg");
-  background-color: #040c0b;
-    opacity: 0.2;
-    position: absolute;
-}
 </style>

+ 9 - 1
src/components/coms/table/table3.vue

@@ -16,6 +16,7 @@
       :width="col.width"
       :min-width="col.minWidth"
       :sortable="col.sortable"
+	  :sort-orders="sortOrder"
       :sort-by="col.field + '.count'"
       :show-overflow-tooltip="!col.slot"
       :fixed="col.fixed"
@@ -39,7 +40,7 @@
     v-if="pageable"
     @current-change="handleCurrentChange"
     :current-page="currentPage"
-    :page-size="pageSize"
+    v-modal:page-size="selfPageSize"
     :total="data.total"
     v-bind="elPaggingProps"
   >
@@ -135,6 +136,12 @@ export default {
       if (this.pageable) return this.currentPage * this.pageSize;
       else return this.data.data.length;
     },
+	sortOrder:{
+	  type:Array,
+	  default:()  =>{
+		return ['descending', 'ascending', null]
+	  }
+	}
   },
   // 函数
   methods: {
@@ -157,6 +164,7 @@ export default {
   },
   created() {
     // 创建后
+	this.selfPageSize = this.pageSize
   },
   beforeMount() {
     // 渲染前

+ 6 - 7
src/views/HealthControl/Health5.vue

@@ -72,17 +72,16 @@ export default {
         subUrl: "healthmain/findHealthMatrixMap",
         success(res) {
           if (res.code == 200) {
-            //以下解析顺序不可变
+            that.stationsList.push(res.data.fczbmap.MHS_FDC)
             that.stationsList.push(res.data.fczbmap.NSS_FDC)
-            that.stationsList.push(res.data.fczbmap.XS_FDC)
-            that.stationsList.push(res.data.fczbmap.SBQ_FDC)
             that.stationsList.push(res.data.fczbmap.QS_FDC)
-            that.stationsList.push(res.data.fczbmap.MHS_FDC)
+            that.stationsList.push(res.data.fczbmap.SBQ_FDC)
+            that.stationsList.push(res.data.fczbmap.XS_FDC)
+            that.windturbineList.push(res.data.fjmap[0]) //麻黄山
             that.windturbineList.push(res.data.fjmap[1]) //牛首山
-            that.windturbineList.push(res.data.fjmap[4]) //香山
-            that.windturbineList.push(res.data.fjmap[3]) //石板泉
             that.windturbineList.push(res.data.fjmap[2]) //青山
-            that.windturbineList.push(res.data.fjmap[0]) //麻黄山
+            that.windturbineList.push(res.data.fjmap[3]) //石板泉
+            that.windturbineList.push(res.data.fjmap[4]) //香山
           }
         },
       });

+ 4 - 4
src/views/Home/Home.vue

@@ -188,7 +188,7 @@
                   </td>
                   <td class="value green">
                      <!-- {{ wpId === "0" ? jczbmap.jpeyhl  : gxkmap.nyxxs }} -->
-                    {{ wpId === "0" ? jczbmap.jpeyhl * 10000 : gxkmap.nyxxs }}
+                    {{ wpId === "0" ? jczbmap.jpeyhl : gxkmap.nyxxs }}
                   </td>
                   <!-- <td class="unit gray">
                     {{ wpId === "0" ? "万吨" : "小时" }}
@@ -203,7 +203,7 @@
                   </td>
                   <td class="value green">
                     <!-- {{ wpId === "0" ? jczbmap.jpeyht  : gxkmap.ndxkyss }} -->
-                     {{ wpId === "0" ? (jczbmap.jpeyht * 10000).toFixed(0) : gxkmap.ndxkyss }}
+                     {{ wpId === "0" ? jczbmap.jpeyht : gxkmap.ndxkyss }}
                   </td>
                   <!-- <td class="unit gray">{{ wpId === "0" ? "万吨" : "%" }}</td> -->
                   <td class="unit gray">{{ wpId === "0" ? "吨" : "%" }}</td>
@@ -214,7 +214,7 @@
                   </td>
                   <td class="value green">
                     <!-- {{ wpId === "0" ? jczbmap.jys  : gxkmap.ngzxs }} -->
-                     {{ wpId === "0" ? (jczbmap.jys * 10000).toFixed(0) : gxkmap.ngzxs }}
+                     {{ wpId === "0" ? jczbmap.jys : gxkmap.ngzxs }}
                   </td>
                   <!-- <td class="unit gray">
                     {{ wpId === "0" ? "万吨" : "小时" }}
@@ -229,7 +229,7 @@
                   </td>
                   <td class="value green">
                     <!-- {{ wpId === "0" ? jczbmap.jybm  : gxkmap.ndjxs }} -->
-                      {{ wpId === "0" ? jczbmap.jybm * 10000 : gxkmap.ndjxs }}
+                      {{ wpId === "0" ? jczbmap.jybm : gxkmap.ndjxs }}
                   </td>
                   <!-- <td class="unit gray">
                     {{ wpId === "0" ? "万吨" : "小时" }}

+ 235 - 43
src/views/NewPages/alarm-center-1.vue

@@ -112,6 +112,35 @@
       custom-class="modal"
       :close-on-click-modal="false"
     >
+    <div class="searchForm">
+       <el-select
+        @change="searchTime(selectValue)"
+        class="inputs"
+        v-model="selectValue"
+        placeholder="请选择"
+      >
+        <el-option
+          v-for="item in timeoptions"
+          :key="item.value"
+          :label="item.label"
+          :value="item.value"
+        >
+        </el-option>
+      </el-select>
+      <div class="choose">
+        <button class="btn"
+          @click="switchChange(60)"
+        >
+          等间隔
+        </button>
+        <button class="btn"
+          @click="switchChange(0)"
+        >
+          原始数据
+        </button>
+      </div>
+    </div>
+     
       <multiple-y-line-chart-normal
         height="500px"
         :list="Analysis"
@@ -125,15 +154,19 @@
 <script>
 import Panel3 from "../../components/coms/panel/panel3.vue";
 import Table3 from "../../components/coms/table/table3.vue";
-import MultipleYLineChartNormal from "../../components/chart/line/multiple-y-line-chart-normal.vue";
+import MultipleYLineChartNormal from "./multiple-y-line-chart-normal.vue";
 export default {
   components: { Panel3, Table3, MultipleYLineChartNormal },
   data() {
     return {
-      dialogTitle:"",
+      dialogTitle: "",
       dialogVisible: false,
+      switchFlag: false,
+      chooseTime: [],
       wpvalue: "",
       wpid: "",
+      wtId:"",
+      descName:"",
       AnalysisName: "",
       AnalysisUnit: "",
       Analysis: [
@@ -159,6 +192,33 @@ export default {
           position: "right",
         },
       ],
+      selectValue: "60",
+      timeoptions: [
+        {
+          value: "60",
+          label: "一分钟",
+        },
+        {
+          value: "300",
+          label: "五分钟",
+        },
+        {
+          value: "600",
+          label: "十分钟",
+        },
+        {
+          value: "1800",
+          label: "三十分钟",
+        },
+        {
+          value: "3600",
+          label: "一小时",
+        },
+        {
+          value: "86400",
+          label: "一天",
+        },
+      ],
       wpoptions: "",
       options: [],
       cascaderOptions: [],
@@ -263,23 +323,43 @@ export default {
     //对比
     showChart(column) {
       let that = this;
-      that.dialogTitle =  column.column.name
+      that.dialogTitle = column.column.name;
+      that.wtId = column.row.name;
+      that.descName = column.column.name;
       // console.log('column:',column)
       // console.log('name:',column.column.name)
       // console.log('wtid:',column.row.name)
       // console.log('starttime:',new Date(that.startdate).getTime())
       // console.log('endtime:',new Date(that.enddate).getTime())
       that.dialogVisible = true;
+      that.requestDetailData(
+        that.wpvalue,
+        that.startdate,
+        that.enddate,
+        0,
+        column.row.name,
+        column.column.name
+      );
+    },
+    requestDetailData(station, startTs, endTs, interval, wtId, name) {
+      let that = this;
       that.API.requestData({
         method: "GET",
         subUrl: "/analysis/detail",
         data: {
-          station: that.wpvalue,
-          startTs: new Date(that.startdate).getTime(),
-          endTs: new Date(that.enddate).getTime(),
-          interval: 360,
-          wtId: column.row.name,
-          name: column.column.name,
+          // station: that.wpvalue,
+          // startTs: new Date(that.startdate).getTime(),
+          // endTs: new Date(that.enddate).getTime(),
+          // // interval: 360,
+          // interval:1,
+          // wtId: column.row.name,
+          // name: column.column.name,
+          station: station,
+          startTs: new Date(startTs).getTime(),
+          endTs: new Date(endTs).getTime(),
+          interval: interval,
+          wtId: wtId,
+          name: name,
         },
         success(res) {
           console.log("resAnalysis:", res);
@@ -302,33 +382,47 @@ export default {
             let aList1 = [
               {
                 title: "",
+                // yAxisIndex:"",
                 smooth: true,
                 value: [],
               },
             ];
-            aKey1.forEach((keyEle, keyIndex) => {
-              res.data.forEach((rEle) => {
-                rEle.data.forEach((tEle) => {
-                  aList1[keyIndex].title = res.data[0].name
-                  aList1[keyIndex].value.push({
-                    text: new Date(tEle.ts).formatDate("hh:mm"),
-                    value: tEle[keyEle],
-                  });
-                });
-              });
-            });
+                      aKey1.forEach((keyEle,keyIndex)=>{
+            // console.log('keyindex:',res.data[keyIndex]);
+            aList1[keyIndex].title = res.data[keyIndex].name;
+            res.data[keyIndex].data.forEach((rEle)=>{
+              aList1[keyIndex].value.push({
+                text:new Date(rEle.ts).formatDate("hh:mm"),
+                value:rEle.doubleValue
+              })
+            })
+          })
+            // aKey1.forEach((keyEle, keyIndex) => {
+            //   res.data.forEach((rEle) => {
+            //     rEle.data.forEach((tEle) => {
+            //       alist1[keyIndex].yAxisIndex = keyIndex;
+            //       aList1[keyIndex].title = res.data[0].name;
+            //       aList1[keyIndex].value.push({
+            //         text: new Date(tEle.ts).formatDate("hh:mm"),
+            //         value: tEle[keyEle],
+            //       });
+            //     });
+            //   });
+            // });
             that.Analysis = aList1;
             console.log("that.Analysis1:", that.Analysis);
           } else if (res.data.length == 2) {
             let aKey2 = ["doubleValue", "doubleValue"];
             let aList2 = [
               {
-                title: "",
+               title: "", 
+              //  yAxisIndex:"",
                 smooth: true,
                 value: [],
               },
               {
                 title: "",
+                // yAxisIndex:"",
                 smooth: true,
                 value: [],
               },
@@ -359,17 +453,34 @@ export default {
             });
             that.AnalysisYAxises = yaxises1;
             console.log("AnalysisYAxises:", that.AnalysisYAxises);
-            aKey2.forEach((keyEle, keyIndex) => {
-              res.data.forEach((rEle) => {
-                aList2[keyIndex].title=res.data[keyIndex].name
-                rEle.data.forEach((tEle) => {
-                  aList2[keyIndex].value.push({
-                    text: new Date(tEle.ts).formatDate("hh:mm"),
-                    value: tEle[keyEle],
-                  });
-                });
-              });
-            });
+                    aKey2.forEach((keyEle,keyIndex)=>{
+            // console.log('keyindex:',res.data[keyIndex]);
+            aList2[keyIndex].title = res.data[keyIndex].name;
+            res.data[keyIndex].data.forEach((rEle)=>{
+              aList2[keyIndex].value.push({
+                text:new Date(rEle.ts).formatDate("hh:mm"),
+                value:rEle.doubleValue
+              })
+            })
+          })
+            // res.data.forEach((rEle,rIndex)=>{
+            //   console.log('rele:',rEle)
+            // })
+            // aKey2.forEach((keyEle, keyIndex) => {
+            //   res.data.forEach((rEle) => {
+            //     // alist2[keyIndex].yAxisIndex = keyIndex;
+            //     aList2[keyIndex].title = res.data[keyIndex].name;
+            //     rEle.data.forEach((tEle,tIndex) => {
+            //         console.log('res.data[keyIndex].data[tIndex].doubleValue2:',res.data)
+            //       aList2[keyIndex].value.push({
+            //         text: new Date(tEle.ts).formatDate("hh:mm"),
+            //         // value: tEle[keyEle],
+            //         // value:res.data[keyIndex].data[tIndex].doubleValue
+                  
+            //       });
+            //     });
+            //   });
+            // });
 
             that.Analysis = aList2;
             console.log("that.Analysis2:", that.Analysis);
@@ -383,21 +494,25 @@ export default {
             let aList4 = [
               {
                 title: "",
+                // yAxisIndex:"",
                 smooth: true,
                 value: [],
               },
               {
                 title: "",
+                // yAxisIndex:"",
                 smooth: true,
                 value: [],
               },
               {
                 title: "",
+                // yAxisIndex:"",
                 smooth: true,
                 value: [],
               },
               {
                 title: "",
+                // yAxisIndex:"",
                 smooth: true,
                 value: [],
               },
@@ -428,23 +543,92 @@ export default {
             });
             that.AnalysisYAxises = yaxises2;
             console.log("AnalysisYAxises:", that.AnalysisYAxises);
-            aKey4.forEach((keyEle, keyIndex) => {
-              res.data.forEach((rEle) => {
-                aList4[keyIndex].title = res.data[keyIndex].name
-                rEle.data.forEach((tEle) => {
-                  aList4[keyIndex].value.push({
-                    text: new Date(tEle.ts).formatDate("hh:mm"),
-                    value: tEle[keyEle],
-                  });
-                });
-              });
-            });
+          aKey4.forEach((keyEle,keyIndex)=>{
+            // console.log('keyindex:',res.data[keyIndex]);
+            aList4[keyIndex].title = res.data[keyIndex].name;
+            res.data[keyIndex].data.forEach((rEle)=>{
+              aList4[keyIndex].value.push({
+                text:new Date(rEle.ts).formatDate("hh:mm"),
+                value:rEle.doubleValue
+              })
+            })
+          })
+            // aKey4.forEach((keyEle, keyIndex) => {
+            //   res.data.forEach((rEle) => {
+            //     // aList4[keyIndex].yAxisIndex = keyIndex;
+            //     aList4[keyIndex].title = res.data[keyIndex].name;
+            //     rEle.data.forEach((tEle,tIndex) => {
+            //         console.log('res.data[keyIndex].data[tIndex].doubleValue4:',res.data)
+            //       aList4[keyIndex].value.push({
+            //         text: new Date(tEle.ts).formatDate("hh:mm"),
+            //         // value: tEle[keyEle],
+            //         // value:res.data[keyIndex].data[tIndex].doubleValue
+            //       });
+            //     });
+            //   });
+            // });
             that.Analysis = aList4;
             console.log("that.Analysis4:", that.Analysis);
+          }else if (res.data.length == 0) {
+             that.dialogVisible = false;
+                that.BASE.showMsg({
+          type: "warning",
+          msg: "暂无数据",
+        });
           }
+
         },
       });
     },
+    //切换数据类型
+    switchChange(interval) {
+      if(interval == 0){
+        this.requestDetailData(this.wpvalue,this.startdate,this.enddate,0,this.wtId,this.descName)
+      }
+      else if(interval == 60){
+        this.requestDetailData(this.wpvalue,this.startdate,this.enddate,60,this.wtId,this.descName)
+      }
+      // this.switchFlag = !this.switchFlag;
+      // this.selectValue = "60";
+      // this.searchTime();
+      // const loading = this.$loading({
+      //   lock: true,
+      //   text: "数据加载中",
+      //   spinner: "el-icon-loading",
+      //   background: "rgba(0, 0, 0, 0.7)",
+      // });
+      // setTimeout(() => {
+      //   loading.close();
+      // }, 1000);
+    },
+    searchTime(values) {
+      console.log("values:", values);
+      this.requestDetailData(this.wpvalue,this.startdate,this.enddate,values,this.wtId,this.descName)
+      // let times = [];
+      // this.chooseTime.forEach((item) => {
+      //   times.push(dayjs(item).valueOf());
+      // });
+      // times.length > 0
+      //   ? this.switchFlag
+      //     ? this.$emit("original-data", times)
+      //     : this.$emit("search-data", times, Number(this.selectValue))
+      //   : this.$message({
+      //       showClose: true,
+      //       message: "请选择查询日期",
+      //       center: true,
+      //       type: "error",
+      //     });
+      // if (values) {
+      //     this.$message({
+      //         showClose: true,
+      //         center: true,
+      //         message: '下载中'
+      //     });
+      //     setTimeout(() => {
+      //         this.export()
+      //     }, 2000)
+      // }
+    },
     tabSelect(tab) {},
 
     async search() {
@@ -617,5 +801,13 @@ export default {
       }
     }
   }
+  .searchForm{
+    display: flex;
+    margin-left: 36px;
+    .inputs{
+      width: 15%;
+    margin-right: 18px;
+    }
+  }
 }
 </style>

+ 16 - 2
src/views/NewPages/multiple-y-line-chart-normal.vue

@@ -286,6 +286,7 @@ export default {
             id: "",
             chart: null,
             color: ["#323E6F", "#1DA0D7", "#05BB4C", "#EDB32F", "#DB5520"],
+        
         };
     },
     computed: {
@@ -296,9 +297,19 @@ export default {
         },
         xdata() {
             console.log('this.list[0].value:',this.list)
-            return this.list[0]?.value.map((t) => {
+            if(this.list.length > 1){
+                this.list[1].value.forEach((lEle,lIndex)=>{
+                    console.log( this.list[1].value.indexOf(this.list[1].value[lIndex].text == "00:00") )
+                })
+                  return this.list[1]?.value.map((t) => {
                 return t.text;
             });
+            }else if(this.list.length == 1){
+    return this.list[0]?.value.map((t) => {
+                return t.text;
+            });
+            }
+        
         },
         yAxis() {
             let result = [];
@@ -419,6 +430,9 @@ console.log('yResult:',result)
                         type: "category",
                         boundaryGap: false,
                         axisLabel: {
+                            interval: (Number((this.xdata.length / 8).toFixed(0)) > 2) ? Number((this.xdata.length / 8).toFixed(0)) : 0,
+                                showMinLabel: true,
+                                showMaxLabel: true,
                             formatter: "{value}",
                             fontSize: 12,
                             textStyle: {
@@ -467,4 +481,4 @@ console.log('yResult:',result)
     height: 100%;
     display: inline-block;
 }
-</style>
+</style>

+ 4 - 4
src/views/sisView/index.vue

@@ -1,9 +1,9 @@
 <template>
   <div class="sisViewBox">
     <div class="viewItem">
-      <clock :width="330" :height="280" />
+      <clock :width="330" :height="300" />
       <div class="viewTitle">综<br /><br />合<br /><br />参<br /><br />数</div>
-      <div class="contentBox" style="height: 280px;">
+      <div class="contentBox" style="height: 300px;">
         <div class="contentItem">
           <div class="itemName size5">装机容量</div>
           <div class="itemNum">{{items.zjrl}}</div>
@@ -363,10 +363,10 @@ export default {
     display: flex;
     justify-content: start;
     align-items: center;
-    margin: 10px 0;
+    margin:15px 0 0 0;
 
     &:first-child {
-      margin: 0 0 10px 0;
+      margin: 0;
     }
 
     .viewTitle {