import React from 'react';
// import moment from 'moment'
import './index.less'

const Index = (props) => {
    const {data} = props
    return (
        <div className="todo-card" onClick={props.onClick}>
            <div className="todo-title pos-aline">
                <div className="pos-aline">
                    <div className="todo-tag pos-aline">
                      {props.name}
                    </div>
                    <p style={{flex: 1}}>{data.BT}</p>
                </div>
                <span>
                    <img
                        alt=""
                        className="todo-read-png"
                        src={props.data && props.data.FLAG === 'D' ? '/img/read.png' : '/img/unread.png'}
                    />
                </span>
            </div>
            <div className="todo-content">
                <p>当前状态：{data.BLLX}</p>
                <p style={{marginTop: 15}}>发送人员：{data.FROMUSER_ALIASED}</p>
            </div>
            <div className="todo-footer">
                <div>
                    <p className="pos-aline"><img alt="" src="/img/time.png" className="footer-mes-img"/>更新时间：{data.JZRQ}</p>
                    <p className="pos-aline footer-mes-sec"><img alt="" src="/img/time-2.png" className="footer-mes-img"/>发起时间：{data.SWRQ}</p>
                </div>
                {props.data && props.data.JJCD !=='无' && props.data.JJCD ==='紧急' &&  (
                    <img
                        alt=""
                        className="todo-footer-img"
                        src={'/img/serious.png'}
                    />
                )}

            </div>
        </div>
    );
};

export default Index;
