Sfoglia il codice sorgente

修改机房title和tab

shaun-sheep 4 anni fa
parent
commit
2028b80d58
3 ha cambiato i file con 51 aggiunte e 23 eliminazioni
  1. 1 1
      src/components/Rotation/src/rotation.vue
  2. 24 8
      src/store/index.js
  3. 26 14
      src/views/room/index.vue

+ 1 - 1
src/components/Rotation/src/rotation.vue

@@ -53,7 +53,7 @@ export default {
         if (this.type == 2) {
             this.changePic(1)
         }
-        if (this.rotation.length > 0) {
+        if (this.rotation && this.rotation.length > 0) {
             console.log(this.rotation.length)
         }
         this.getImgInfo()

+ 24 - 8
src/store/index.js

@@ -1,7 +1,13 @@
 import Vue from 'vue'
 import Vuex from 'vuex'
-import { login, queryFloor, queryfmapID } from '@/api/login.js'
-import { queryBrand } from '@/api/public.js'
+import {
+    login,
+    queryFloor,
+    queryfmapID
+} from '@/api/login.js'
+import {
+    queryBrand
+} from '@/api/public.js'
 import axios from 'axios'
 import router from '../router'
 
@@ -148,8 +154,12 @@ export default new Vuex.Store({
     },
     actions: {
         // 获取项目列表、userId
-        async getUserInfo({ commit }, palyload) {
-            await login({ returnTree: true }).then((res) => {
+        async getUserInfo({
+            commit
+        }, palyload) {
+            await login({
+                returnTree: true
+            }).then((res) => {
                 // 获取用户当前权限
                 if (res.result === 'success') {
                     commit('STOREACCESSLEVEL', res.level)
@@ -160,7 +170,9 @@ export default new Vuex.Store({
                         commit('SETPLAZENAME', data.plazaName)
                         localStorage.setItem('PLAZAID', data.plazaId)
                         commit('STOREPLAZAID', data.plazaId)
-                        router.push({ path: './home/homepage' })
+                        router.push({
+                            path: './home/homepage'
+                        })
                     } else {
                         if (level === 0) {
                             if (res.treeData[0].ccode) {
@@ -168,9 +180,13 @@ export default new Vuex.Store({
                                 commit('STOREPLAZAID', res.treeData[0].ccode)
                                 commit('SETPLAZENAME', res.treeData[0].cname)
                             }
-                            router.push({ path: './home/homepage' })
+                            router.push({
+                                path: './home/homepage'
+                            })
                         } else {
-                            router.push({ path: './group' })
+                            router.push({
+                                path: './group'
+                            })
                         }
                     }
                     // commit('SETISREQUESTtAUTH', false)
@@ -214,4 +230,4 @@ export default new Vuex.Store({
         },
     },
     modules: {},
-})
+})

+ 26 - 14
src/views/room/index.vue

@@ -878,6 +878,31 @@ export default {
 </script>
 <style lang="less" scoped>
 .compute-box {
+    /deep/ .el-dialog {
+        // padding: 16px 20px 20px;
+        overflow: hidden;
+        .el-dialog__header {
+            padding: 0;
+            font-size: 16px;
+            font-family: PingFangSC-Medium, PingFang SC;
+            font-weight: 500;
+            color: rgba(0, 0, 0, 0.85);
+            height: 60px;
+            line-height: 60px;
+            background: #f1f2f2;
+            padding-left: 20px;
+            // padding-bottom: 16px;
+        }
+        .el-dialog__headerbtn {
+            top: 0;
+        }
+        .el-dialog__body {
+            padding: 0 24px;
+            .is-active {
+                background: rgba(2, 91, 170, 0.15);
+            }
+        }
+    }
     .compute-zf {
         width: 15px;
         height: 13px;
@@ -971,26 +996,13 @@ export default {
 </style>
 <style lang="less">
 .compute-box {
-    .el-dialog {
-        padding: 16px 20px 20px;
-        overflow: hidden;
-        .el-dialog__header {
-            padding: 0;
-            font-size: 16px;
-            font-family: PingFangSC-Medium, PingFang SC;
-            font-weight: 500;
-            color: rgba(0, 0, 0, 0.85);
-            line-height: 24px;
-            padding-bottom: 16px;
-        }
-    }
     .compute-tab {
         .el-dialog__title {
             font-size: 16px;
             font-family: PingFangSC-Medium, PingFang SC;
             font-weight: 500;
             color: rgba(0, 0, 0, 0.85);
-            line-height: 24px;
+            line-height: 60px;
         }
         .el-dialog__body {
             padding: 0 24px;