ソースを参照

添加消息中心路由

zhangyu 4 年 前
コミット
5f4c4d789f

+ 9 - 3
src/layout/components/Navbar/MessageSever/MsgAllDetails.vue

@@ -33,7 +33,7 @@
                         <template slot-scope="scope">
                             <div>
                                 <i
-                                    :class="iconClassMap[scope.row.Type] ? iconClassMap[scope.row.Type] : 'msg-icon el-icon-warning warning-color'"
+                                    :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>
@@ -81,7 +81,7 @@
 <script lang="ts">
 import { messgeQuery, messgeUpdate } from "@/api/messagecenter";
 import { Component, Vue } from "vue-property-decorator";
-import Bus from "@/utils/bus.js";
+import Bus from "@/utils/bus.ts";
 import { UserModule } from "@/store/modules/user";
 
 @Component({
@@ -143,7 +143,7 @@ export default class extends Vue {
                     name: "project",
                 },
             ],
-            filters: `userId='${this.userId}';type!='refresh'`,
+            filters: `userId='${this.userId}';type!='Refresh'`,
             orders: "createTime desc, id asc",
             pageNumber: this.page.pageNumber,
             pageSize: this.page.pageSize,
@@ -197,6 +197,7 @@ export default class extends Vue {
 
 <style scoped lang='scss'>
 .box {
+    height: 100%;
     .condition {
         padding: 10px;
         display: flex;
@@ -212,6 +213,11 @@ export default class extends Vue {
                 text-decoration: none;
             }
         }
+
+        .right {
+            text-align: right;
+            margin-top: 10px;
+        }
     }
 }
 

+ 1 - 1
src/layout/components/Navbar/MessageSever/index.vue

@@ -302,7 +302,7 @@ export default class extends Vue {
      */
     private allDetails() {
         this.noticeListShow = false;
-        this.$router.push({ path: "/allDetails" });
+        this.$router.push({ path: "/allDetails/index" });
     }
 }
 </script>

+ 19 - 0
src/router/index.ts

@@ -50,6 +50,25 @@ export default new Router({
       ]
     },
     {
+      path: "/allDetails",
+      component: Layout,
+      meta:{
+        hidden: true
+      },
+      children: [
+        {
+          path: "index",
+          component: () =>
+            import(
+              /* webpackChunkName: "project" */ "@/layout/components/Navbar/MessageSever/MsgAllDetails.vue"
+            ),
+          meta: {
+            title: "消息中心"
+          }
+        }
+      ]
+    },
+    {
       path: "/manage",
       component: Layout,
       meta: {