Browse Source

合并代码 解决冲突

fujunwen 4 years ago
parent
commit
3b0acad0ec

public/g.js → public/g.js~HEAD


File diff suppressed because it is too large
+ 26486 - 0
public/g.js~develop-cd-xxd


+ 5 - 0
public/index.html

@@ -16,6 +16,11 @@
             border:none!important;
             box-shadow:none!important;
         }
+        .my-leaflet-div-icon{
+            width: auto!important;
+            white-space: nowrap;
+            word-break: normal;
+        }
         .leaflet-container{
             background: #f7f9fa!important;
         }

+ 2 - 3
src/api/coreDeviceReport.js

@@ -1,15 +1,14 @@
 /*
  * @Author: your name
  * @Date: 2020-07-03 19:04:47
- * @LastEditTime: 2020-07-09 19:58:31
- * @LastEditors: your name
+ * @LastEditTime: 2020-07-12 11:15:12
+ * @LastEditors: Please set LastEditors
  * @Description: In User Settings Edit
  * @FilePath: \wanda-bm-guide\src\api\coreDeviceReport.js
  */
 
 // 核心设备报表 接口
 import httputils from '@/api/httputils'
-
 /**
  * 系统列表
  */

+ 1 - 0
src/api/equipmentList.js

@@ -1,3 +1,4 @@
+ 
 import httputils from "@/api/httputils"
 
 // 设备设施-主要设备清单

+ 1 - 0
src/main.ts

@@ -1,3 +1,4 @@
+ 
 import Vue from 'vue'
 import router from './router'
 import store from './store'

+ 53 - 47
src/router/index.js

@@ -7,10 +7,10 @@ let level = 0
 Vue.use(VueRouter)
 const routes = [
     // 登陆页面
-    // {
-    //     path: '/',
-    //     redirect: '/home/overview',        // 只有区域,及区域以上用户才能进入总部首页这一套
-    // },
+    {
+        path: '/',
+        redirect: '/home/overview',        // 只有区域,及区域以上用户才能进入总部首页这一套
+    },
     {
         path: "/404",
         component: () => import("../components/404"),
@@ -19,6 +19,10 @@ const routes = [
         path:'/group',
         component: () => import('../views/statistics/index')
     },
+    {
+        path:'/group',
+        component: () => import('../views/statistics/index')
+    },
     // home
     {
         path: '/home',
@@ -73,47 +77,49 @@ const router = new VueRouter({
     routes,
 })
 //不需要token的路由
-// const ignore = ['/404', '/legendLibrary', '/legendRules']
-// router.beforeEach(async (to, from, next) => {
-//     if (!ignore.includes(to.path)) {
-//         const token = query().token
-//         const ssoToken = store.getters['ssoToken']
-//         if (ssoToken) {
-//             // if (to.path === '/group' ||  to.path === '/home/overview') {
-//             //     next()
-//             //     return
-//             // } 
-//             store.commit('SETSSOTOKEN', ssoToken)
-//             await store.dispatch('getUserInfo', router)
-//             await store.dispatch('getFloors')
-//             await store.dispatch('getBrand')
-//             let level =store.state.accessLevel
-//             console.log(level)
-//             // if (level ===0) {
-//             //     next('/group')
-//             // } else {
-//             //     next('/home/overview')
-//             // }
-//         } else if (token) {
-//             store.commit('SETSSOTOKEN', token)
-//             await store.dispatch('getUserInfo', router)
-//             next()
-//         } else {
-//             let lastRoute = {
-//                 path: to.path,
-//                 params: to.params,
-//                 query: to.query,
-//             }
-//             store.commit('SETLASTROUTER', lastRoute)
-//             let ssoServer = 'http://oauth.wanda-dev.cn'
-//             let systemcode = 'CAD156',
-//                 signal = new Date().getTime(),
-//                 version = '1.0.0'
-//             window.location.href = `${ssoServer}/login?systemcode=${systemcode}&signal=${signal}&version=${version}`
-//         }
-//     } else {
-//         next()
-//         return
-//     }
-// })
+const ignore = ['/404', '/legendLibrary', '/legendRules']
+router.beforeEach(async (to, from, next) => {
+    if (!ignore.includes(to.path)) {
+        const token = query().token
+        const ssoToken = store.getters['ssoToken']
+        if (ssoToken) {
+            // if (to.path === '/group' ||  to.path === '/home/homepage') {
+            //     next()
+            //     return
+            // } 
+            store.commit('SETSSOTOKEN', ssoToken)
+            await store.dispatch('getUserInfo', router)
+            await store.dispatch('getFloors')
+            await store.dispatch('getBrand')
+            let level =store.state.accessLevel
+            console.log(level)
+            // if (level ===0) {
+            //     next('/group')
+            // } else {
+            //     next('/home/homepage')
+            // }
+            next()
+        } else if (token) {
+            store.commit('SETSSOTOKEN', token)
+            await store.dispatch('getUserInfo', router)
+            next()
+        } else {
+            let lastRoute = {
+                path: to.path,
+                params: to.params,
+                query: to.query,
+            }
+            store.commit('SETLASTROUTER', lastRoute)
+            let ssoServer = 'http://oauth.wanda-dev.cn'
+            let systemcode = 'CAD156',
+                signal = new Date().getTime(),
+                version = '1.0.0'
+            window.location.href = `${ssoServer}/login?systemcode=${systemcode}&signal=${signal}&version=${version}`
+            
+        }
+    } else {
+        next()
+        return
+    }
+})
 export default router

+ 10 - 17
src/views/homepage/index.vue

@@ -152,12 +152,7 @@ export default {
         navToInnerPage(item, equip) {
             this.$router.push({ path: './analysis', query: { smsxt: item.smsxt, equipId: equip.id } })
         },
-        /**
-         * 跳转到甘特图详情页
-         */
-        navToGanttPage(item, equip) {
-            this.$router.push({ path: './analysis', query: { smsxt: item.smsxt } })
-        },
+         
         /**
          * 跳转到甘特图详情页
          */
@@ -175,7 +170,6 @@ export default {
                 if (res.result == 'success') {
                     let result = res.data
                     if (result && Array.isArray(result)) {
-                        result[0].is_exception_num = 12
                         this.cardsList = result
                     }
                 }
@@ -257,7 +251,7 @@ export default {
         flex-wrap: wrap;
         justify-content: space-between;
         align-content: flex-start;
-        width: 70%;
+        width: 75%;
         .cards-item {
             width: calc(50% - 5px);
             height: 24%;
@@ -274,10 +268,7 @@ export default {
             }
             .equipment-list {
                 display: flex;
-                padding-bottom: 2rem;
-                margin-bottom: 0.8rem;
-                padding: 1rem;
-                padding-top: 0;
+                padding:0 1rem 1.2rem;
                 .equipment-item {
                     width: 33.33%;
                     padding: 0.6rem;
@@ -299,7 +290,7 @@ export default {
                         }
                         .exception-number {
                             position: absolute;
-                            right: -20px;
+                            right: -20%;
                             top: -5px;
                             height: 1.6rem;
                             border-radius: 8rem;
@@ -336,11 +327,10 @@ export default {
                 display: flex;
                 align-items: center;
                 justify-content: flex-start;
-                padding-top: 2rem;
                 border-top: 1px solid #f5f6f7;
+                height: 44%;
                 border-radius: 4px;
                 cursor: pointer;
-                padding: 2.2rem 1.4rem;
                 &:hover {
                     background: #f5f6f7;
                 }
@@ -351,7 +341,7 @@ export default {
                     img {
                         width: 4rem;
                         height: 4rem;
-                        margin-right: 1.4rem;
+                        margin:0 1rem;
                     }
                     .content {
                         border-right: 1px solid #f5f6f7;
@@ -366,6 +356,7 @@ export default {
                                 font-size: 1.2rem;
                                 color: #1f2429;
                                 font-weight: bold;
+                                white-space: nowrap;
                             }
                             em {
                                 font-weight: normal;
@@ -380,6 +371,7 @@ export default {
                             color: #8d9399;
                             font-size: 1.2rem;
                             text-align: right;
+                            white-space: nowrap;
                         }
                     }
                 }
@@ -395,7 +387,7 @@ export default {
         }
     }
     .homepage-nav-list {
-        width: calc(30% - 10px);
+        width: calc(25% - 10px);
         nav:first-child {
             height: 320px;
         }
@@ -432,6 +424,7 @@ export default {
                     }
                     article:nth-of-type(2) {
                         width: 30%;
+                        padding-left: 1.2rem;
                         white-space: nowrap;
                         overflow: hidden;
                         text-overflow: ellipsis;

File diff suppressed because it is too large
+ 495 - 570
src/views/statistics/index.vue