weaver_trunk_cli/pc4mobx/hrmAttendance/components/shift/ConditionBar.js

25 lines
1.2 KiB
JavaScript
Raw Normal View History

2024-12-11 15:32:14 +08:00
import React, {Component} from 'react';
import {observer} from 'mobx-react';
import {WeaLocaleProvider, WeaDatePicker} from 'ecCom';
const getLabel = WeaLocaleProvider.getLabel;
@observer
export default class ConditionBar extends Component{
render(){
const {store} = this.props;
const {dateTabkey, pDate, changeDateTabHandler, changeDateHandler, getData} = store;
return (
<div className='conditionBar'>
{
[{title:getLabel('26577',"年"),key:"1"}, {title:getLabel(6076, '月'),key:"2"}].map((item,index)=> (
<div style={(index == 1 && window.e9_locale.userLanguage == "8") ? {marginRight: 20} : {}} className={`dateType ${dateTabkey == item.key ? 'dateType-active' : ''}`} onClick={() => changeDateTabHandler(item.key)}>{item.title}</div>
))
}
<div>
<WeaDatePicker ecId={`${this && this.props && this.props.ecId || ''}_WeaDatePicker@s8foc7`} arrow type={dateTabkey == '1' ? 'year': 'month'} date={pDate} onChange={changeDateHandler}/>
<i className="icon-coms-Refresh" onClick={() => getData()}/>
</div>
</div>
)
}
}