chris 3 年 前
コミット
20982edce0

+ 2 - 1
src/router/index.js

@@ -37,7 +37,8 @@ const mainRoutes = {
     { path: '/theme', component: _import('common/theme'), name: 'theme', meta: { title: '主题' } },
     { path: '/msg-center', component: _import('modules/msg-center/notice'), name: 'msgCenter', meta: { title: '我的消息中心' } },
     { path: '/msg-announcement', component: _import('modules/msg-center/announcement'), name: 'msgAnnouncement', meta: { title: '公告消息' } },
-    { path: '/msg-approve', component: _import('modules/msg-center/approve'), name: 'msgApprove', meta: { title: '审批消息' } }
+    { path: '/msg-approve', component: _import('modules/msg-center/approve'), name: 'msgApprove', meta: { title: '审批消息' } },
+    { path: '/msg-work', component: _import('modules/works/work'), name: 'msgWork', meta: { title: '我的工作台' } }
     // { path: '/demo-echarts', component: _import('demo/echarts'), name: 'demo-echarts', meta: { title: 'demo-echarts', isTab: true } },
     // { path: '/demo-ueditor', component: _import('demo/ueditor'), name: 'demo-ueditor', meta: { title: 'demo-ueditor', isTab: true } }
   ],

+ 6 - 0
src/utils/msg.js

@@ -14,6 +14,12 @@ export function routeMsg (that, row) {
         noticeId: row.noticeId,
         businessId: row.businessId
       }}})
+  } else if (row.type === 3) {
+    that.$router.push({name: 'msgWork',
+      params: {notice: {
+        noticeId: row.noticeId,
+        businessId: row.businessId
+      }}})
   } else {
     that.$message.warning('消息类型不支持')
   }

+ 4 - 1
src/views/common/msg.vue

@@ -5,7 +5,7 @@
 
 <script>
   import {parseJsonStr} from '@/utils/common'
-  import {routeMsg, readNotices} from '@/utils/msg'
+  import {readNotice, routeMsg, readNotices} from '@/utils/msg'
   export default {
     name: 'msg',
     data () {
@@ -87,6 +87,9 @@
       // 跳转到消息页面
       detail (row) {
         routeMsg(this, row)
+        if (row.type === 3) {
+          readNotice(this, row.noticeId)
+        }
         if (this.notify) {
           this.notify.close()
         }

+ 1 - 1
src/views/modules/msg-center/approve.vue

@@ -152,7 +152,7 @@
     },
     watch: {
       listenNotice: function (notice) {
-        console.log('notice = ' + JSON.stringify(notice))
+        // console.log('notice = ' + JSON.stringify(notice))
         if (!notice) return
         this.dataForm.noticeId = notice.noticeId
         this.dataForm.businessId = notice.businessId