Browse Source

消息中心健壮性处理

zhangyu 5 years ago
parent
commit
c2a6099eef

+ 3 - 3
src/framework/components/messagesever/index.vue

@@ -2,7 +2,7 @@
  * @Author: zhangyu
  * @Date: 2019-08-26 15:22:13
  * @Info: 
- * @LastEditTime: 2019-10-31 14:38:27
+ * @LastEditTime: 2019-11-13 15:46:29
  -->
 <template>
   <div class="notification-box" v-clickOutside="handleClose" @click="handleClickRead">
@@ -22,11 +22,11 @@
               <li class="noticeList_item" v-for="item in messageList" :key="item.Id" :title="item.Content.Message?item.Content.Message:''">
                 <div class="noticeItem_box">
                   <div class="noticeItem_text">
-                    <i :class="iconClassMap[item.Type]?iconClassMap[item.Type]:'msg-icon el-icon-info info-color'"></i>
+                    <i :class="iconClassMap[item.Type]?iconClassMap[item.Type]:'msg-icon el-icon-warning warning-color'"></i>
                     <p><span>{{`【${moduleMap[item.Module]?moduleMap[item.Module]:item.Module}】 `}}</span>{{item.Title?item.Title:""}}</p>
                   </div>
                   <div class="noticeItem_time">
-                    <span class="proname">{{item.Project[0].ProjName}}</span>
+                    <span class="proname">{{item.Project[0].ProjLocalName || ''}}</span>
                     {{item.CreateTime}}
                     <el-link v-for="(btn, index) in item.Content.ButtonList?item.Content.ButtonList:[]"
                       style="float:right;font-size:12px;margin-left:5px;" type="primary" :key="index"

+ 9 - 4
src/framework/components/messagesever/msgAllDetails.vue

@@ -10,10 +10,15 @@
               <el-badge class="item" type="warning" is-dot v-if="!scope.row.Read"></el-badge>
             </template>
           </el-table-column>
-          <el-table-column prop="Title" label="标题内容" width="600"></el-table-column>
+          <el-table-column prop="Title" label="标题内容" min-width="300" show-overflow-tooltip></el-table-column>
+          <el-table-column label="项目">
+            <template slot-scope="scope">
+              {{ scope.row.Project[0].ProjLocalName }}
+            </template>
+          </el-table-column>
           <el-table-column label="模块" width="200">
             <template slot-scope="scope">
-              {{ moduleMap[scope.row.Module] }}
+              {{ moduleMap[scope.row.Module]?moduleMap[scope.row.Module]:scope.row.Module }}
             </template>
           </el-table-column>
           <el-table-column prop="CreateTime" label="消息时间">
@@ -21,8 +26,8 @@
           <el-table-column label="消息类型">
             <template slot-scope="scope">
               <div>
-                <i :class="iconClassMap[scope.row.Type]?iconClassMap[scope.row.Type]:'msg-icon el-icon-info info-color'" style="font-size:14px;"></i>
-                <span>{{ typeMap[scope.row.Type] }}</span>
+                <i :class="iconClassMap[scope.row.Type]?iconClassMap[scope.row.Type]:'msg-icon el-icon-warning warning-color'" style="font-size:14px;"></i>
+                <span>{{ typeMap[scope.row.Type]?typeMap[scope.row.Type]:scope.row.Type }}</span>
               </div>
             </template>
           </el-table-column>

+ 9 - 9
src/router/system.js

@@ -85,19 +85,19 @@ const OwnerManage = () =>
     import ('@/views/market/owner/manage')
 
 export default [
-    { path: '/', name: '', component: LayoutMain, children: [{ path: '', name: 'blank', component: Dasboard }] },
+    { 
+        path: '/', 
+        name: '', 
+        component: LayoutMain, 
+        children: [
+            { path: '', name: 'blank', component: Dasboard },
+            { path: 'allDetails', name: "allDetails", component: MsgAllDetails, meta: { keepAlive: false, breadcrumbs: [{ label: '消息中心' }] } }
+        ] 
+    },
     //{ path: '/login', name: 'Login', component: Login },
     { path: '/auth', name: 'auth', component: auth },
     { path: '/noUser', name: 'noUser', component: noUser },
     // 业务空间数据导入工具
-    {
-        path: '/',
-        name: '',
-        component: LayoutMain,
-        children: [
-            { path: 'allDetails', name: "allDetails", component: MsgAllDetails, meta: { keepAlive: false, breadcrumbs: [{ label: '消息中心' }] } }
-        ]
-    },
     { path: '/dataUtil', name: 'dataUtil', component: LayoutMain, children: [{ path: 'index', component: dataUtil }] },
     // 平台管理
     {