Explorar el Código

fix:修改消息列表对文件发放已读的逻辑

liujiayin hace 2 años
padre
commit
8fd1f69a96
Se han modificado 1 ficheros con 22 adiciones y 5 borrados
  1. 22 5
      src/views/platform/message/inner/receive.vue

+ 22 - 5
src/views/platform/message/inner/receive.vue

@@ -162,14 +162,22 @@ export default {
                             icon: 'ibps-icon-reply-all',
                             label: '回复',
                             hidden: function (row, index) {
-                                return (row.canreply === 0 || row.messageType === 'system' || row.messageType === 'bulletin')
+                                return (row.canreply === 0 || row.messageType === 'system' || row.messageType === 'bulletin'|| row.subject =='文件发放通知')
                             }
                         },
                         {
-                            key: 'remove'
+                            key: 'remove',
+                            hidden: function (row, index) {
+                                console.log('row',row)
+                                return (row.subject =='文件发放通知')
+                            }
                         },
                         {
-                            key: 'detail'
+                            key: 'detail',
+                             hidden: function (row, index) {
+                                console.log('row',row)
+                                return (row.subject =='文件发放通知')
+                            }
                         }
                     ]
                 }
@@ -248,10 +256,19 @@ export default {
                     this.search()
                     break
                 case 'markRead': // 标记为已读
-                    ActionUtils.selectedMultiRecord(selection).then(id => {
+                    try {
+                         data.forEach(el => {
+                        if(el.subject='文件发放通知'){
+                            throw new Error('所选数据存在文件发放通知,文件发放通知请勿点击已读。')
+                        }
+                         ActionUtils.selectedMultiRecord(selection).then(id => {
                         this.handleAlreadyRead(id)
                         // this.isEnvelope = false
-                    }).catch(() => { })
+                        }).catch(() => { })
+                    });
+                    } catch (error) {
+                        ActionUtils.warning(error.message) 
+                    }
                     break
                 case 'reply': // 回复
                     ActionUtils.selectedRecord(selection).then(id => {