| | |
| | | import React, { Component } from 'react' |
| | | import { CloseOutlined } from '@ant-design/icons' |
| | | import { CloseOutlined, SoundOutlined } from '@ant-design/icons' |
| | | |
| | | import MKEmitter from '@/utils/events.js' |
| | | |
| | |
| | | |
| | | sysMessageChange = (notices) => { |
| | | this.setState({ notices }) |
| | | |
| | | if (notices.length === 0) { |
| | | this.setState({ visible: false }) |
| | | } |
| | | } |
| | | |
| | | sysMessageOpen = () => { |
| | |
| | | return ( |
| | | <div className={'mk-msg-wrap' + (visible ? ' visible' : '')}> |
| | | <div className="title"> |
| | | 消息盒子 |
| | | <SoundOutlined /> |
| | | <CloseOutlined onClick={this.close}/> |
| | | </div> |
| | | <div className="msg-list">{notices.map((item, index) => { |
| | | return <div className="msg-item" key={index} onClick={this.toMenu}> |
| | | return <div className={'msg-item ' + (item.urgent_type === 'Y' ? 'red' : '')} key={index} onClick={this.toMenu}> |
| | | <span>{item.createstaff}</span><span className="time">{item.time}</span> |
| | | <span>{item.title}</span> |
| | | </div> |