xusl 9 meses atrás
pai
commit
491779ca02

+ 11 - 1
ipp-ap/src/router/page/index.js

@@ -259,5 +259,15 @@ export default [
   {
     path: '*',
     redirect: '/404',
-  }
+  },
+  {
+    path: '/dashboard',
+    component: Layout,
+    children: [{
+      path: 'index',
+      name: 'dashboard',
+      component: () =>
+        import ( /* webpackChunkName: "views" */ '@/page/index/index')
+    }],
+  },
 ]

+ 1 - 1
ipp-ap/src/store/modules/common.js

@@ -8,7 +8,7 @@ const common = {
     isShade: false,
     screen: -1,
     isLock: getStore({ name: 'isLock' }) || false,
-    showTag: true,
+    showTag: false,
     showCollapse: true,
     showFullScren: true,
     website: website

+ 3 - 3
ipp-ap/src/styles/sidebar.scss

@@ -1,7 +1,7 @@
 .avue-sidebar {
-    user-select: none; 
+    user-select: none;
     position: relative;
-    padding-top: 74px;
+    padding-top: 54px;
     height: 100%;
     position: relative;
     background-color: #20222a;
@@ -98,4 +98,4 @@
             }
         }
     }
-}
+}

+ 34 - 0
ipp-ap/src/util/request.js

@@ -0,0 +1,34 @@
+import axios from 'axios'
+import store from '@/store'
+
+// create an axios instance
+const service = axios.create({
+  baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url
+  // withCredentials: true, // send cookies when cross-domain requests
+  timeout: 1000 * 60 * 10 // request timeout
+})
+
+// request interceptor
+service.interceptors.request.use(
+  config => {
+    // do something before request is sent
+    if (store.getters.token) {
+      // let each request carry token
+      // ['X-Token'] is a custom headers key
+      // please modify it according to the actual situation
+      const isToken = (config.headers || {}).isToken === false
+      let token =  store.getters.access_token
+      if (token && !isToken) {
+        config.headers['Authorization'] =  token// token
+      }
+    }
+    return config
+  },
+  error => {
+    // do something with request error
+    console.log(error) // for debug
+    return Promise.reject(error)
+  }
+)
+
+export default service

+ 1 - 1
ipp-ap/src/views/homePage/index.vue

@@ -189,7 +189,7 @@
       },
 
       push() {
-        this.$router.push({path: '/idp/data/forecastpowerdata/index'})
+        this.$router.push({path: '/dashboard'})
       },
       formatStationCode(row) {
         const electricfield = this.electricfieldList.find(w => w.stationCode === row.stationCode)

+ 3 - 5
ipp-ap/src/views/idp/system/sysUser/index.vue

@@ -3,9 +3,9 @@
   <div class="app-container">
     <div>
       <el-card>
-        <div slot="header" class="clearfix">
-          <b><span>用户管理</span></b>
-        </div>
+<!--        <div slot="header" class="clearfix">-->
+<!--          <b><span>用户管理</span></b>-->
+<!--        </div>-->
 
         <div class="filter-container">
           <el-button type="primary" size="small" style="round-clip: 10px" @click="insertEvent"
@@ -416,9 +416,7 @@
             }else{
               this.formData.menu = ''
             }
-            alert(this.isEdit)
             if (this.isEdit) {
-              console.log(this.formData)
               // 编辑保存
               this.$axios.put('/sysUser/', this.formData).then(res => {
                 this.$message({