Browse Source

更改bug

Limengbo 6 years ago
parent
commit
db93db9044

+ 1 - 1
src/router/index.js

@@ -30,7 +30,7 @@ export const constantRouterMap = [
     hidden: true,
     children: [{
       path: 'dashboard',
-      component: () => import('@/views/dashboard/index')
+      component: () => import('@/views/allFile/index')
     }]
   },
 

+ 3 - 4
src/utils/request.js

@@ -5,8 +5,8 @@ import { getToken } from '@/utils/auth'
 
 // 创建axios实例
 const service = axios.create({
-  baseURL: process.env.BASE_API, // api 的 base_url
-  timeout: 5000 // 请求超时时间
+  baseURL: process.env.BASE_API // api 的 base_url
+  // timeout: 5000 // 请求超时时间
 })
 
 // request拦截器
@@ -31,13 +31,12 @@ service.interceptors.response.use(
      * code为非20000是抛错 可结合自己业务进行修改
      */
     const res = response.data
-    if (res.code !== 200) {
+    if (res.code !== 200 && res.code !== 401) {
       Message({
         message: res.message,
         type: 'error',
         duration: 5 * 1000
       })
-
       // 50008:非法的token; 50012:其他客户端登录了;  50014:Token 过期了;
       // if (res.code === 50008 || res.code === 50012 || res.code === 50014) {
       //   MessageBox.confirm(

+ 1 - 1
src/views/allFile/index.vue

@@ -27,7 +27,7 @@
         <template slot-scope="scope">{{ scope.row.task.gmtCreated }}</template>
       </el-table-column>
     </el-table>
-    <div class="page">
+    <div v-if="joinUserList.length !== 0" class="page">
       <el-pagination
         :total="totalSize"
         background

+ 11 - 10
src/views/browse/index.vue

@@ -5,15 +5,11 @@
       :data="logList.logList"
       tooltip-effect="dark"
       style="width: 100%"
-      @selection-change="handleSelectionChange"
       @row-click="detail">
       <el-table-column
-        type="selection"
-        width="55"/>
-      <el-table-column
         :label="title">
         <template slot-scope="scope">
-          <img :src="(scope.row.taskFile.fileType == 'png' || scope.row.taskFile.fileType == 'jpg') ? scope.row.taskFile.path : '../../../static/fileimg/'+scope.row.taskFile.fileType+'.png'" alt="file_icon" style="vertical-align: middle; margin-right: 10px">
+          <img :src="(scope.row.taskFile.fileType == 'png' || scope.row.taskFile.fileType == 'jpg') ? scope.row.taskFile.path : imgUrl(scope.row)" alt="file_icon" style="vertical-align: middle; margin-right: 10px">
           <span>{{ scope.row.taskFile.fileName }}</span>
         </template>
       </el-table-column>
@@ -24,7 +20,7 @@
         <template slot-scope="scope">{{ scope.row.taskFile.gmtCreated }}</template>
       </el-table-column>
     </el-table>
-    <div class="page">
+    <div v-if="logList.logList.length !== 0" class="page">
       <el-pagination
         :total="logList.logSize"
         background
@@ -38,13 +34,16 @@
 import { mapGetters } from 'vuex'
 import { parseTime } from '@/utils/index'
 import { addViewLog } from '@/api/table'
+// const xls = require('@/assets/fileimg/xls.png')
+// console.log(1111, xls)
 // import axios from 'axios'
 
 export default {
   data() {
     return {
       title: '',
-      multipleSelection: []
+      multipleSelection: [],
+      'xls': require('@/assets/fileimg/xls.png')
     }
   },
 
@@ -72,9 +71,6 @@ export default {
         })
       })
     },
-    handleSelectionChange(val) {
-      this.multipleSelection = val
-    },
     detail(row) {
       const link = document.createElement('a')
       link.style.display = 'none'
@@ -93,6 +89,11 @@ export default {
           this.logList.logList[index].taskFile.fileType = item.taskFile.path.slice(item.taskFile.path.lastIndexOf('.') + 1)
         })
       })
+    },
+    imgUrl(url) {
+      if (url.taskFile.fileType) {
+        return require(`@/assets/fileimg/${url.taskFile.fileType}.png`)
+      }
     }
   }
 }

+ 4 - 2
src/views/layout/components/Navbar.vue

@@ -10,7 +10,7 @@
     <!--<hamburger :toggle-click="toggleSideBar" :is-active="sidebar.opened" class="hamburger-container"/>-->
     <breadcrumb />
     <div class="user">
-      <a href="">客户端下载</a>
+      <a href="https://efunimgs.ai160.com/sharedWhiteBoard/智能共享白板.msi">客户端下载</a>
       <el-dropdown class="avatar-container" trigger="click">
         <div class="avatar-wrapper">
           <img :src="avatar+'?imageView2/1/w/80/h/80'" class="user-avatar">
@@ -26,7 +26,7 @@
             </el-dropdown-item>
           </router-link>
           -->
-          <el-dropdown-item divided>
+          <el-dropdown-item divided style="border: 0">
             <span style="display:block;" @click="logout">退出</span>
           </el-dropdown-item>
         </el-dropdown-menu>
@@ -74,6 +74,7 @@ export default {
     a {
       font-size: 16px;
       color: #4883FB;
+      margin-right: 15px;
     }
   }
   .user-avatar,
@@ -100,6 +101,7 @@ export default {
         width: 40px;
         height: 40px;
         border-radius: 10px;
+        margin-right: 10px;
       }
       .el-icon-caret-bottom {
         position: absolute;