import React, { Component } from 'react'; import {observer} from 'mobx-react'; import { Timeline, Icon } from 'antd'; import { WeaLocaleProvider, WeaAlertPage } from 'ecCom'; import isEmpty from 'lodash/isEmpty'; import {addContentPath, carousel} from '../../util/index'; import LocationInfo from './LocationInfo'; const getLabel = WeaLocaleProvider.getLabel; @observer export default class TimeLineView extends Component{ onClickHandle = signInfo => { this.props.store.showLocationInfo(signInfo); } render(){ const {store} = this.props; const {timeData, hasRight, doCarousel} = store; if(!hasRight){ return (
{getLabel('517102', "你无权查看该人员的外勤数据")}
) } let themeFontSize = 12; try{ themeFontSize = parseInt(JSON.parse(localStorage['theme-themeInfo']).themeFontSize); }catch(e){ themeFontSize = 12; } return (
{ timeData && timeData.map((item, i) => { return (
12 ? 'dateLarge' : ''}`} style={{backgroundImage: `url(${addContentPath('/hrm/hrm_e9/image/timeline.png')})`}}>{item.date}
{ isEmpty(item.items) ? (
{getLabel('386505',"当天无外勤签到记录")}
) : item.items.map((signInfo, i) => { return (
{signInfo.name} {signInfo.time} {signInfo.signTitle}
{/* 备注 */} {signInfo.information &&
} {/* 图片 */} {signInfo.pics &&
{ signInfo.pics.map((pic, index)=> { return (
doCarousel(mobx.toJS(signInfo.pics),index)}/>
) }) }
} { signInfo.crm && signInfo.crm.length > 0 &&
{ signInfo.crm.map((d, i) => { return (
{d}
) }) }
} this.onClickHandle({...signInfo, date: item.date})}> {signInfo.title}
) }) }
) }) }
) } }