Browse Source

基础工具修改

Koishi 3 years ago
parent
commit
034eb96290

+ 1 - 1
public/static/config/modeConfig.js

@@ -16,7 +16,7 @@ const tilesMaxLevel = 18;
 const adapterUrl = "http://10.155.32.4:8011/";
 
 // 切换模块时是否提示当前模块名称(用于对内介绍项目时便捷显示模块名称)
-const showModuleName = 0;
+const showModuleName = 1;
 
 if (localTest) {
     // baseURL = "http://192.168.10.13:8082/" // 联机调试 - 石林

+ 3 - 1
src/tools/basicTool.js

@@ -12,13 +12,15 @@ export default {
    * @param {Boolean} center 消息提示内容是否居中,默认 true
    * @param {String} msg 消息提示的内容
    * @param {String} type 消息提示的类型,可选值为 ['success(成功)','warning(警告)','error(错误)',或者直接传入空字符串],默认 error
+   * @param {Number} duration 消息提示存在的时间,默认为 3 秒
    */
   showMsg(options) {
     ElMessage({
       showClose: (options.showClose == true || options.showClose == false) ? options.showClose : false,
       center: (options.center == true || options.center == false) ? options.center : true,
       message: options.msg,
-      type: (options.type || options.type === '') ? options.type : 'error'
+      type: (options.type || options.type === '') ? options.type : 'error',
+      duration: options.duration > 0 ? options.duration : 3000
     });
   },
 

+ 0 - 52
src/views/Others/index.vue

@@ -231,25 +231,6 @@
         </div>
       </el-carousel-item>
     </el-carousel>
-    <div class="downloadAppBtnBox">
-      <el-popover
-        placement="left-start"
-        title=""
-        :width="180"
-        trigger="hover"
-        content=""
-        popper-class="popoverCurrentClass"
-      >
-        <template #reference>
-          <button class="btn green">下载 APP</button>
-        </template>
-        <el-image
-          style="width: 152px; height: 150px"
-          src="./static/img/appdownload.png"
-          fit="fill"
-        />
-      </el-popover>
-    </div>
   </div>
 </template>
 
@@ -922,32 +903,6 @@ export default {
     background: #fff;
   }
 }
-
-.swiperBox {
-  position: relative;
-
-  .downloadAppBtnBox {
-    position: absolute;
-    right: 0;
-    bottom: 40px;
-
-    button.btn {
-      opacity: 0.75;
-      background: rgba(5, 187, 76, 0.2);
-      color: #05bb4c;
-      border-color: #05bb4c;
-      transition: 0.2s;
-
-      &:hover {
-        opacity: 1;
-        background: #05bb4c;
-        color: #fff;
-        border-color: rgba(5, 187, 76, 0.2);;
-        transition: 0.2s;
-      }
-    }
-  }
-}
 </style>
 
 <style lang="less">
@@ -961,11 +916,4 @@ export default {
     text-align: left;
   }
 }
-
-.popoverCurrentClass {
-  .el-popper__arrow::before {
-    background: transparent !important;
-    border-color: transparent !important;
-  }
-}
 </style>

+ 69 - 0
src/views/layout/Header.vue

@@ -11,6 +11,28 @@
         {{ menu.text }}
       </li>
     </ul>
+    <div class="downloadAppBtnBox">
+      <el-popover
+        placement="bottom"
+        title=""
+        :width="180"
+        trigger="hover"
+        content=""
+        popper-class="popoverCurrentClass"
+      >
+        <template #reference>
+          <button class="btn green">
+            <i class="el-icon-mobile-phone" />
+          </button>
+        </template>
+        <el-image
+          style="width: 152px; height: 150px"
+          src="./static/img/appdownload.png"
+          fit="fill"
+        />
+        <span class="codeTip">宁夏新能源智能综合分析系统APP下载</span>
+      </el-popover>
+    </div>
     <!-- <ul class="header-menu-dropdown" :class="{ dropdown: dropdown }">
       <li class="header-menu-dropdown-title" @click="clickMenu()"><i class="fa fa-gear"></i>菜单<i class="fa fa-sort-down down"></i></li>
       <ul class="header-menu-dropdown-list">
@@ -340,4 +362,51 @@ export default {
     }
   }
 }
+
+.header-menu {
+  .downloadAppBtnBox {
+    width: 40px;
+    height: 40px;
+    display: flex;
+    justify-content: center;
+    align-content: center;
+    margin-left: 5px;
+
+    button.btn {
+      width: 100%;
+      height: 100%;
+      color: #7a8385;
+      border-color: transparent;
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      font-weight: 700;
+      background: transparent;
+      border-radius: 50%;
+      transition: 0.2s;
+
+      &:hover {
+        color: #05bb4c;
+        transition: 0.2s;
+      }
+
+      i {
+        font-size: 16px;
+      }
+    }
+  }
+}
+
+.popoverCurrentClass {
+  .el-popper__arrow::before {
+    background: transparent !important;
+    border-color: transparent !important;
+  }
+
+  .codeTip {
+    display: inline-block;
+    margin-top: 4px;
+    text-align: center;
+  }
+}
 </style>