初始化hrm代码
This commit is contained in:
parent
3c950521a2
commit
ebc0f8bebe
|
|
@ -36,8 +36,8 @@ export default class SensitiveWordProcess extends React.Component {
|
|||
const { senstiveWordProcessStore: { topStore, formStore: { form }, searchGroupProps, authorityStore } } = this.props;
|
||||
|
||||
return (
|
||||
<Authority ecId={`${this && this.props && this.props.ecId || ''}_Authority@0nbcjs`} store={authorityStore}>
|
||||
<Top ecId={`${this && this.props && this.props.ecId || ''}_Top@h78vuy`} store={topStore}>
|
||||
<Authority store={authorityStore}>
|
||||
<Top store={topStore}>
|
||||
<div className='sensitiveWordProcess'>
|
||||
{form.render(searchGroupProps)}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -173,7 +173,7 @@ class Full extends React.Component {
|
|||
labelCol={{ span: `${field.labelcol}` }}
|
||||
wrapperCol={{ span: `${field.fieldcol}` }}>
|
||||
{dom}
|
||||
{field.domkey[0] == 'workcode' && <AttachToNumberField ecId={`${this && this.props && this.props.ecId || ''}_AttachToNumberField@jzwjg9`} field={field} form={formFull}/>}
|
||||
{field.domkey[0] == 'workcode' && <AttachToNumberField field={field} form={formFull}/>}
|
||||
</WeaFormItem>,
|
||||
colSpan: 1,
|
||||
hide: hide
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import React from 'react';
|
|||
import { inject, observer } from 'mobx-react';
|
||||
import { Button, Spin, Icon } from 'antd'
|
||||
import isEmpty from 'lodash/isEmpty'
|
||||
import { WeaDialog, WeaSearchGroup, WeaTools, WeaNewScroll, WeaFormItem,WeaDialogFooter } from 'ecCom';
|
||||
import { WeaDialog, WeaSearchGroup, WeaTools, WeaNewScroll, WeaFormItem } from 'ecCom';
|
||||
import { WeaSwitch } from 'comsMobx'
|
||||
import UploadAvatar from '../../../../pc4public/hrm/uploadAvatar'
|
||||
const getKey = WeaTools.getKey;
|
||||
|
|
@ -18,19 +18,9 @@ class Simple extends React.Component {
|
|||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
time: new Date().getTime(),
|
||||
time: new Date().getTime()
|
||||
}
|
||||
this.deptInfo=null;
|
||||
}
|
||||
|
||||
componentWillMount() {
|
||||
const {location,hrmAdd } = this.props;
|
||||
if (location && location.query && location.query.name) {
|
||||
hrmAdd.isUsedAsSingle = true;
|
||||
this.deptInfo = location.query;
|
||||
}
|
||||
}
|
||||
|
||||
componentWillReceiveProps (nextProps) {
|
||||
const { hrmAdd } = this.props;
|
||||
const { conditionInfo } = hrmAdd;
|
||||
|
|
@ -46,7 +36,7 @@ class Simple extends React.Component {
|
|||
}
|
||||
componentDidUpdate () {
|
||||
const { hrmAdd } = this.props;
|
||||
const { updateScroll,formSimple } = hrmAdd;
|
||||
const { updateScroll } = hrmAdd;
|
||||
if (updateScroll) {
|
||||
if (this.refs.scrollBar) {
|
||||
setTimeout(() => {
|
||||
|
|
@ -58,26 +48,9 @@ class Simple extends React.Component {
|
|||
setTimeout(() => {
|
||||
$(".input-tip").attr("title", $(".input-tip").text())
|
||||
}, 0)
|
||||
|
||||
if (this.deptInfo) {
|
||||
const {id,name}= this.deptInfo;
|
||||
formSimple.updateFields({
|
||||
departmentid:{
|
||||
value: id,
|
||||
valueSpan: name,
|
||||
valueObj: [
|
||||
{
|
||||
id,
|
||||
name
|
||||
}
|
||||
]
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
componentDidMount () {
|
||||
this.init();
|
||||
console.log(self.frameElement);
|
||||
}
|
||||
|
||||
init = () => {
|
||||
|
|
@ -146,7 +119,7 @@ class Simple extends React.Component {
|
|||
labelCol={{ span: `${field.labelcol}` }}
|
||||
wrapperCol={{ span: `${field.fieldcol}` }}>
|
||||
{dom}
|
||||
{field.domkey[0] == 'workcode' && <AttachToNumberField ecId={`${this && this.props && this.props.ecId || ''}_AttachToNumberField@zowvrn`} field={field} form={formSimple}/>}
|
||||
{field.domkey[0] == 'workcode' && <AttachToNumberField field={field} form={formSimple}/>}
|
||||
</WeaFormItem>,
|
||||
colSpan: 1,
|
||||
hide: hide
|
||||
|
|
@ -161,87 +134,36 @@ class Simple extends React.Component {
|
|||
|
||||
render () {
|
||||
const { hrmAdd } = this.props;
|
||||
const { title, loading,isUsedAsSingle,jobtitleVisible,formSimple,closeJobtitleDialog} = hrmAdd;
|
||||
const { title, loading } = hrmAdd;
|
||||
let dialogHeight = window.innerHeight - 250;
|
||||
if (dialogHeight > 660) dialogHeight = 660;
|
||||
|
||||
let scrollProps = {};
|
||||
if (!isUsedAsSingle) {
|
||||
scrollProps.height = dialogHeight
|
||||
}
|
||||
|
||||
let com = this.getSearchs()
|
||||
if (!isUsedAsSingle) {
|
||||
return <WeaDialog ecId={`${this && this.props && this.props.ecId || ''}_WeaDialog@5hvnq9`}
|
||||
{...this.props}
|
||||
closable
|
||||
className="hrm-addsimple"
|
||||
style={{ width: 800, height: dialogHeight }}
|
||||
title={title()}
|
||||
icon="icon-coms-hrm"
|
||||
iconBgcolor='#217346'
|
||||
buttons={this.getBtns()}
|
||||
moreBtn={{ datas: [] }}
|
||||
>
|
||||
<Spin ecId={`${this && this.props && this.props.ecId || ''}_Spin@gfpue4`} spinning={loading}>
|
||||
<WeaNewScroll ecId={`${this && this.props && this.props.ecId || ''}_WeaNewScroll@56svjo`} {...scrollProps} ref="scrollBar">
|
||||
{com}
|
||||
return <WeaDialog ecId={`${this && this.props && this.props.ecId || ''}_WeaDialog@5hvnq9`}
|
||||
{...this.props}
|
||||
closable
|
||||
className="hrm-addsimple"
|
||||
style={{ width: 800, height: dialogHeight }}
|
||||
title={title()}
|
||||
icon="icon-coms-hrm"
|
||||
iconBgcolor='#217346'
|
||||
buttons={this.getBtns()}
|
||||
moreBtn={{ datas: [] }}
|
||||
>
|
||||
<Spin ecId={`${this && this.props && this.props.ecId || ''}_Spin@gfpue4`} spinning={loading}>
|
||||
<WeaNewScroll ecId={`${this && this.props && this.props.ecId || ''}_WeaNewScroll@56svjo`} height={dialogHeight} ref="scrollBar">
|
||||
{this.getSearchs()}
|
||||
</WeaNewScroll>
|
||||
</Spin>
|
||||
</WeaDialog>
|
||||
}else{
|
||||
return (
|
||||
<div className="hrm-addsimple-single">
|
||||
<div>{com}</div>
|
||||
<WeaDialogFooter ecId={`${this && this.props && this.props.ecId || ''}_WeaDialogFooter@tsmpx0`} buttons={this.getBtns()}/>
|
||||
{
|
||||
jobtitleVisible && (
|
||||
<WeaDialog ecId={`${this && this.props && this.props.ecId || ''}_WeaDialog@fw8u8f`}
|
||||
onCancel={closeJobtitleDialog}
|
||||
icon='icon-coms-hrm'
|
||||
iconBgcolor='#217346'
|
||||
title={i18n.label['531838']()}
|
||||
callback={
|
||||
datas => {
|
||||
const {
|
||||
id,
|
||||
jobtitlemark
|
||||
} = datas;
|
||||
|
||||
formSimple.updateFields({
|
||||
jobtitle: {
|
||||
value: id,
|
||||
valueSpan: jobtitlemark,
|
||||
valueObj: [{
|
||||
id,
|
||||
name: jobtitlemark
|
||||
}]
|
||||
}
|
||||
});
|
||||
|
||||
closeJobtitleDialog();
|
||||
|
||||
}
|
||||
}
|
||||
url={'/spa/hrm/engine.html#/hrmengine/posts?type=0'}
|
||||
visible={jobtitleVisible}
|
||||
style={{ width: 600, height: 500 }}
|
||||
/>
|
||||
)
|
||||
}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
</WeaDialog>
|
||||
}
|
||||
|
||||
getBtns = () => {
|
||||
const { hrmAdd } = this.props;
|
||||
const { canSave,isUsedAsSingle } = hrmAdd;
|
||||
const { canSave } = hrmAdd;
|
||||
return [
|
||||
(!isUsedAsSingle && <div className="ext-link" style={{ float: 'left', cursor: 'pointer' }} onClick={this.openFullmode}>{i18n.button.fullModle()}<Icon ecId={`${this && this.props && this.props.ecId || ''}_Icon@u1u3nk@0`} type="double-right" />
|
||||
(<div className="ext-link" style={{ float: 'left', cursor: 'pointer' }} onClick={this.openFullmode}>{i18n.button.fullModle()}<Icon ecId={`${this && this.props && this.props.ecId || ''}_Icon@u1u3nk@0`} type="double-right" />
|
||||
</div>),
|
||||
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@whckot@1`} type="primary" disabled={!canSave} onClick={this.save}>{i18n.button.save()}</Button>),
|
||||
(!isUsedAsSingle && <Button ecId={`${this && this.props && this.props.ecId || ''}_Button@ybuf84@2`} type="primary" disabled={!canSave} onClick={this.doSaveAndNew}>{i18n.button.saveAndCreate()}</Button>),
|
||||
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@ybuf84@2`} type="primary" disabled={!canSave} onClick={this.doSaveAndNew}>{i18n.button.saveAndCreate()}</Button>),
|
||||
]
|
||||
return btns;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -223,7 +223,7 @@ class Main extends React.Component {
|
|||
labelCol={{span: `${window.HrmLabelCol}`}}
|
||||
wrapperCol={{span: `${window.HrmWrapperCol}`}}>
|
||||
{dom}
|
||||
{field.domkey[0] == 'workcode' && <AttachToNumberField ecId={`${this && this.props && this.props.ecId || ''}_AttachToNumberField@351zxr`} field={field} form={form} isEdit={true} useId={hrmId}/>}
|
||||
{field.domkey[0] == 'workcode' && <AttachToNumberField field={field} form={form} isEdit={true} useId={hrmId}/>}
|
||||
</WeaFormItem></div>),
|
||||
colSpan: 1
|
||||
});
|
||||
|
|
@ -274,7 +274,7 @@ class Main extends React.Component {
|
|||
labelCol={{span: `${window.HrmLabelCol}`}}
|
||||
wrapperCol={{span: `${window.HrmWrapperCol}`}}>
|
||||
{dom}
|
||||
{field.domkey[0] == 'workcode' && <AttachToNumberField ecId={`${this && this.props && this.props.ecId || ''}_AttachToNumberField@7k1pbu`} field={field} form={form} isEdit={true}/>}
|
||||
{field.domkey[0] == 'workcode' && <AttachToNumberField field={field} form={form} isEdit={true}/>}
|
||||
</WeaFormItem>),
|
||||
colSpan: 2
|
||||
});
|
||||
|
|
|
|||
|
|
@ -14,8 +14,7 @@ import {
|
|||
WeaTab,
|
||||
WeaNewScroll,
|
||||
WeaAlertPage,
|
||||
WeaAvatar,
|
||||
WeaLeftRightLayout
|
||||
WeaAvatar
|
||||
} from 'ecCom'
|
||||
import isEmpty from 'lodash/isEmpty'
|
||||
import * as mobx from 'mobx';
|
||||
|
|
@ -34,10 +33,8 @@ import {
|
|||
WeaPopoverHrm
|
||||
} from 'ecCom';
|
||||
import TopButton from '../../coms/topButton';
|
||||
import { i18n } from '../../public/i18n';
|
||||
import { addContentPath } from '../../util/index.js'
|
||||
|
||||
const TabPane = Tabs.TabPane;
|
||||
import {i18n} from '../../public/i18n';
|
||||
import {addContentPath} from '../../util/index.js'
|
||||
|
||||
const { ua } = WeaTools;
|
||||
const isIE9 = ua.browser === "IE"
|
||||
|
|
@ -51,7 +48,7 @@ class Main extends React.Component {
|
|||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
weaWorkplanLoaded: false,
|
||||
weaWorkplanLoaded:false,
|
||||
rightMenu: []
|
||||
}
|
||||
}
|
||||
|
|
@ -68,9 +65,9 @@ class Main extends React.Component {
|
|||
|
||||
componentWillMount() {
|
||||
// 异步加载日程模块静态资源
|
||||
eventRegister.loadModule('f_workplan', () => {
|
||||
this.setState({ weaWorkplanLoaded: true });
|
||||
}, () => { });
|
||||
eventRegister.loadModule('f_workplan', ()=> {
|
||||
this.setState({weaWorkplanLoaded:true});
|
||||
}, ()=> {});
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
|
|
@ -96,7 +93,7 @@ class Main extends React.Component {
|
|||
});
|
||||
}
|
||||
|
||||
setParentRightMenu = rightMenu => this.setState({ rightMenu })
|
||||
setParentRightMenu = rightMenu => this.setState({rightMenu})
|
||||
|
||||
getTabChildren() {
|
||||
const {
|
||||
|
|
@ -118,22 +115,22 @@ class Main extends React.Component {
|
|||
if (tabKey === t.key) {
|
||||
if (t.isIframe) {
|
||||
isIframe = true;
|
||||
if (t.key == 'iframe-9-workplansearch') { // 日程模块加载方式
|
||||
if(t.key == 'iframe-9-workplansearch'){ // 日程模块加载方式
|
||||
const selectedUser = t.url.split('?')[1].split('&')[1].split('=')[1];
|
||||
this.state.weaWorkplanLoaded && window.weaWorkplan && window.weaWorkplan.com ?
|
||||
ifame = <window.weaWorkplan.com.MyWorkPlan ecId={`${this && this.props && this.props.ecId || ''}_undefined@ai7pco`} location={{ query: { hidesidebar: 'true', hideheader: 'true', selectedUser: selectedUser, fromcard: 'true' } }} />
|
||||
:
|
||||
''
|
||||
} else {
|
||||
ifame = <iframe className="card-iframe" style={{ height: window.innerHeight - 175 }} src={addContentPath(t.url)}></iframe>
|
||||
ifame = <window.weaWorkplan.com.MyWorkPlan ecId={`${this && this.props && this.props.ecId || ''}_undefined@ai7pco`} location={{query:{hidesidebar: 'true',hideheader: 'true', selectedUser:selectedUser, fromcard:'true'}}}/>
|
||||
:
|
||||
''
|
||||
}else{
|
||||
ifame = <iframe className="card-iframe" style={{height:window.innerHeight-175}} src={addContentPath(t.url)}></iframe>
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
return (
|
||||
<WeaNewScroll ecId={`${this && this.props && this.props.ecId || ''}_WeaNewScroll@4jxjh8`} className={innerPage ? 'hrm-card-hastop' : 'hrm-card-notop'}>
|
||||
{isIframe ? ifame : children}
|
||||
</WeaNewScroll>
|
||||
<WeaNewScroll ecId={`${this && this.props && this.props.ecId || ''}_WeaNewScroll@4jxjh8`} className={innerPage?'hrm-card-hastop' : 'hrm-card-notop'}>
|
||||
{isIframe ? ifame : children}
|
||||
</WeaNewScroll>
|
||||
);
|
||||
}
|
||||
render() {
|
||||
|
|
@ -164,107 +161,100 @@ class Main extends React.Component {
|
|||
}
|
||||
}
|
||||
if (verified) {
|
||||
if (hasRight) {
|
||||
if(hasRight){
|
||||
if (verified && isAdmin) {
|
||||
return (
|
||||
<SystemCard ecId={`${this && this.props && this.props.ecId || ''}_SystemCard@vmf9rw`} {...this.props} id={this.props.params.hrmId} />
|
||||
<SystemCard ecId={`${this && this.props && this.props.ecId || ''}_SystemCard@vmf9rw`} {...this.props} id={this.props.params.hrmId}/>
|
||||
)
|
||||
}
|
||||
if (verified && !isAdmin) {
|
||||
const avatarProps = { userId };
|
||||
if (info.requestParams) Object.assign(avatarProps, { requestParams: JSON.parse(info.requestParams) });
|
||||
const avatarProps = {userId};
|
||||
if(info.requestParams) Object.assign(avatarProps, {requestParams: JSON.parse(info.requestParams)});
|
||||
return (
|
||||
<WeaLeftRightLayout
|
||||
isNew={true}
|
||||
leftWidth={96}
|
||||
leftCom={<WeaTab ecId={`${this && this.props && this.props.ecId || ''}_WeaTab@9d23zw`}
|
||||
type='line'
|
||||
keyParam='key'
|
||||
datas={toJS(tabInfo)}
|
||||
selectedKey={tabKey}
|
||||
onChange={v => {
|
||||
this.tabsOnChange(v);
|
||||
}}
|
||||
tabPosition="left"
|
||||
/>}
|
||||
>
|
||||
<WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@uojsrt`} datas={rightMenu} >
|
||||
<div style={{ height: '100%' }}>
|
||||
<WeaPopoverHrm ecId={`${this && this.props && this.props.ecId || ''}_WeaPopoverHrm@kadp5g`} />
|
||||
<div className='hrm-my-card' style={{ height: "100%", background: '#ffff' }}>
|
||||
<div className="hrm-my-card-top-wapper" style={{ minHeight: 60 }}>
|
||||
<WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@uojsrt`} datas={rightMenu} >
|
||||
<div style={{height:'100%'}}>
|
||||
<WeaPopoverHrm ecId={`${this && this.props && this.props.ecId || ''}_WeaPopoverHrm@kadp5g`} />
|
||||
<div className='hrm-my-card' style={{height:"100%",background: '#ffff'}}>
|
||||
<div className="hrm-my-card-top-wapper" style={{minHeight: 60}}>
|
||||
{
|
||||
!isEmpty(info) && <Row ecId={`${this && this.props && this.props.ecId || ''}_Row@rwtu3g`} className={"hrm-my-card-top"}>
|
||||
<Col ecId={`${this && this.props && this.props.ecId || ''}_Col@lq1pi0`} span="24" className='hrm-my-card-top-title' style={{paddingLeft:14,paddingTop:7,height:'100%'}}>
|
||||
{
|
||||
!isEmpty(info) && <Row ecId={`${this && this.props && this.props.ecId || ''}_Row@rwtu3g`} className={"hrm-my-card-top"}>
|
||||
<Col ecId={`${this && this.props && this.props.ecId || ''}_Col@lq1pi0`} span="24" className='hrm-my-card-top-title' style={{ paddingLeft: 14, paddingTop: 7, height: '100%' }}>
|
||||
{
|
||||
info.shortname != null && info.shortname.trim().length > 0 ?
|
||||
<div className='hrm-my-card-top-title-img hrm-my-card-top-title-shortname' onClick={showPortraitSetting}>{info.shortname}</div>
|
||||
:
|
||||
<span style={{ paddingLeft: 10, paddingRight: 14, display: 'inline-block' }}>
|
||||
{/* <img className='hrm-my-card-top-title-img' src={info.messagerurl || portraitDefalut} alt="" onClick={showPortraitSetting}/> */}
|
||||
<span className='hrm-my-card-top-avatar' style={{ top: '-2px' }} onClick={showPortraitSetting}>
|
||||
<WeaAvatar ecId={`${this && this.props && this.props.ecId || ''}_WeaAvatar@m37dbo`}
|
||||
// userId={userId}
|
||||
{...avatarProps}
|
||||
ref={result => {
|
||||
if (updateSuccess && result) {
|
||||
result.requestParams && result.requestParams(userId);
|
||||
setState({ updateSuccess: false });
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</span>
|
||||
</span>
|
||||
}
|
||||
<span style={{ display: 'inline-block', verticalAlign: 'top' }} className='hrm-my-card-top-title-info'>
|
||||
<div style={{ fontSize: 14 }}>
|
||||
<span style={{ paddingRight: 5 }}>{info.lastname} {
|
||||
info.workcode ?
|
||||
(
|
||||
<span>({info.workcode.indexOf('desensitization__') > -1 ? <WeaInput ecId={`${this && this.props && this.props.ecId || ''}_WeaInput@m09slu`} value={info.workcode} viewArre={1} /> : info.workcode})</span>
|
||||
)
|
||||
:
|
||||
null
|
||||
}</span>
|
||||
{
|
||||
info.sex && <span className={info.sex.value == '1' ? 'icon-coms-women femaleColor' : 'icon-coms-men maleColor'} title={info.sex.name}></span>
|
||||
info.shortname != null && info.shortname.trim().length > 0 ?
|
||||
<div className='hrm-my-card-top-title-img hrm-my-card-top-title-shortname' onClick={showPortraitSetting}>{info.shortname}</div>
|
||||
:
|
||||
<span style={{paddingLeft:10,paddingRight:14, display:'inline-block'}}>
|
||||
{/* <img className='hrm-my-card-top-title-img' src={info.messagerurl || portraitDefalut} alt="" onClick={showPortraitSetting}/> */}
|
||||
<span className='hrm-my-card-top-avatar' style={{top: '-2px'}} onClick={showPortraitSetting}>
|
||||
<WeaAvatar ecId={`${this && this.props && this.props.ecId || ''}_WeaAvatar@m37dbo`}
|
||||
// userId={userId}
|
||||
{...avatarProps}
|
||||
ref={result => {
|
||||
if(updateSuccess && result) {
|
||||
result.requestParams && result.requestParams(userId);
|
||||
setState({updateSuccess: false});
|
||||
}
|
||||
</div>
|
||||
{
|
||||
info.orginfo ?
|
||||
<div className='orgInfo'
|
||||
dangerouslySetInnerHTML={{ __html: info.orginfo }} />
|
||||
:
|
||||
<div className='orgInfo'>
|
||||
|
||||
</div>
|
||||
}
|
||||
</span>
|
||||
</Col>
|
||||
</Row>
|
||||
}}
|
||||
/>
|
||||
</span>
|
||||
</span>
|
||||
}
|
||||
<TopButton ecId={`${this && this.props && this.props.ecId || ''}_TopButton@br79o7`}
|
||||
buttons={hrmCard.topButtons && hrmCard.topButtons()}
|
||||
buttonSpace={10}
|
||||
showDropIcon={hrmCard.topShowDropIcon}
|
||||
dropMenuDatas={hrmCard.topRightMenus && hrmCard.topRightMenus()}
|
||||
/>
|
||||
</div>
|
||||
|
||||
{this.getTabChildren()}
|
||||
</div>
|
||||
{uploadPortrailAuth && <PortraitSetting ecId={`${this && this.props && this.props.ecId || ''}_PortraitSetting@vck80h`} store={hrmCard} />}
|
||||
</div>
|
||||
</WeaRightMenu>
|
||||
</WeaLeftRightLayout>
|
||||
<span style={{display:'inline-block',verticalAlign:'top'}} className='hrm-my-card-top-title-info'>
|
||||
<div style={{fontSize:14}}>
|
||||
<span style={{paddingRight:5}}>{info.lastname} {
|
||||
info.workcode ?
|
||||
(
|
||||
<span>({info.workcode.indexOf('desensitization__') > -1 ? <WeaInput ecId={`${this && this.props && this.props.ecId || ''}_WeaInput@m09slu`} value={info.workcode} viewArre={1} /> : info.workcode})</span>
|
||||
)
|
||||
:
|
||||
null
|
||||
}</span>
|
||||
{
|
||||
info.sex && <span className={info.sex.value=='1'?'icon-coms-women femaleColor':'icon-coms-men maleColor'} title={info.sex.name}></span>
|
||||
}
|
||||
</div>
|
||||
{
|
||||
info.orginfo ?
|
||||
<div className='orgInfo'
|
||||
dangerouslySetInnerHTML={{__html:info.orginfo}} />
|
||||
:
|
||||
<div className = 'orgInfo'>
|
||||
|
||||
</div>
|
||||
}
|
||||
</span>
|
||||
</Col>
|
||||
</Row>
|
||||
}
|
||||
<TopButton ecId={`${this && this.props && this.props.ecId || ''}_TopButton@br79o7`}
|
||||
buttons={hrmCard.topButtons && hrmCard.topButtons()}
|
||||
buttonSpace={10}
|
||||
showDropIcon={hrmCard.topShowDropIcon}
|
||||
dropMenuDatas={hrmCard.topRightMenus && hrmCard.topRightMenus()}
|
||||
/>
|
||||
</div>
|
||||
<WeaTab ecId={`${this && this.props && this.props.ecId || ''}_WeaTab@9d23zw`}
|
||||
type='editable-inline'
|
||||
keyParam='key'
|
||||
datas={toJS(tabInfo)}
|
||||
selectedKey={tabKey}
|
||||
onChange={ v => {
|
||||
this.tabsOnChange(v);
|
||||
}}
|
||||
/>
|
||||
{this.getTabChildren()}
|
||||
</div>
|
||||
{uploadPortrailAuth && <PortraitSetting ecId={`${this && this.props && this.props.ecId || ''}_PortraitSetting@vck80h`} store={hrmCard}/>}
|
||||
</div>
|
||||
</WeaRightMenu>
|
||||
)
|
||||
}
|
||||
} else {
|
||||
}else{
|
||||
return (<WeaAlertPage ecId={`${this && this.props && this.props.ecId || ''}_WeaAlertPage@a7bbha`} >
|
||||
<div style={{ color: '#000' }}>
|
||||
{i18n.message.authFailed()}
|
||||
<div style={{color : '#000'}}>
|
||||
{i18n.message.authFailed()}
|
||||
</div>
|
||||
</WeaAlertPage>
|
||||
</WeaAlertPage>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
@ -275,7 +265,7 @@ class Main extends React.Component {
|
|||
const {
|
||||
hrmCard
|
||||
} = this.props;
|
||||
this.setState({ rightMenu: [] })
|
||||
this.setState({rightMenu: []})
|
||||
hrmCard.setTopButtons(null);
|
||||
hrmCard.setTopRightMenus(null);
|
||||
hrmCard.setTopShowDropIcon(false);
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ export default class Content extends Component{
|
|||
render(){
|
||||
return (
|
||||
<div className='content'>
|
||||
<Form ecId={`${this && this.props && this.props.ecId || ''}_Form@0pwmop`} store={this.props.store} />
|
||||
<TableData ecId={`${this && this.props && this.props.ecId || ''}_TableData@nk0k0h`} store={this.props.store} />
|
||||
<Form store={this.props.store} />
|
||||
<TableData store={this.props.store} />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@ export default class Form extends Component{
|
|||
}
|
||||
items.push({
|
||||
com: (
|
||||
<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@2xkutm@${j}`} {...itemProps}>
|
||||
<WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@mf5372@${j}`} fieldConfig={field} form={form} />
|
||||
<WeaFormItem {...itemProps}>
|
||||
<WeaSwitch fieldConfig={field} form={form} />
|
||||
</WeaFormItem>
|
||||
),
|
||||
col
|
||||
|
|
@ -39,7 +39,7 @@ export default class Form extends Component{
|
|||
|
||||
groupArr.push(
|
||||
(
|
||||
<WeaSearchGroup ecId={`${this && this.props && this.props.ecId || ''}_WeaSearchGroup@pr042o`} {...groupProps} />
|
||||
<WeaSearchGroup {...groupProps} />
|
||||
)
|
||||
);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@ export default class TableData extends Component{
|
|||
|
||||
return (
|
||||
<div className='table_container' style={{display: edit ? 'none' : 'block'}}>
|
||||
<WeaTab ecId={`${this && this.props && this.props.ecId || ''}_WeaTab@qsg8zk`} {...tabProps} />
|
||||
<WeaTable ecId={`${this && this.props && this.props.ecId || ''}_WeaTable@64ul9f`} {...tableProps}/>
|
||||
<WeaTab {...tabProps} />
|
||||
<WeaTable {...tableProps}/>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,15 +30,15 @@ export default class Finance extends Component{
|
|||
let com;
|
||||
if(fromcard){
|
||||
com = (
|
||||
<WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@pxe5hg`} datas={topProps.dropMenuDatas}>
|
||||
<Content ecId={`${this && this.props && this.props.ecId || ''}_Content@pzgnr9`} store={store} />
|
||||
<WeaRightMenu datas={topProps.dropMenuDatas}>
|
||||
<Content store={store} />
|
||||
</WeaRightMenu>
|
||||
)
|
||||
}else{
|
||||
com = (
|
||||
<WeaTop ecId={`${this && this.props && this.props.ecId || ''}_WeaTop@tog55a`} {...topProps}>
|
||||
<WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@fcxnug`} datas={topProps.dropMenuDatas}>
|
||||
<Content ecId={`${this && this.props && this.props.ecId || ''}_Content@j7qze4`} store={store} />
|
||||
<WeaTop {...topProps}>
|
||||
<WeaRightMenu datas={topProps.dropMenuDatas}>
|
||||
<Content store={store} />
|
||||
</WeaRightMenu>
|
||||
</WeaTop>
|
||||
)
|
||||
|
|
@ -46,7 +46,7 @@ export default class Finance extends Component{
|
|||
|
||||
return (
|
||||
<div className='hrm_finance'>
|
||||
<Authority ecId={`${this && this.props && this.props.ecId || ''}_Authority@lulowc`} store={store}>
|
||||
<Authority store={store}>
|
||||
{com}
|
||||
</Authority>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -24,7 +24,8 @@ export default class Detailed extends Component {
|
|||
onChange = (params) => {
|
||||
const {newOutSide} = this.props;
|
||||
const {getData} = newOutSide;
|
||||
if(params.dataScope =="0" || params.subcomId || params.resourceId || params.deptId || params.dataScope =="4" || params.allLevel){
|
||||
const flag = params.dataScope =="0" || params.subcomId || params.resourceId || params.deptId || params.dataScope =="4" || params.allLevel;
|
||||
if(flag){
|
||||
getData(params);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ class BarChart extends React.Component {
|
|||
}
|
||||
|
||||
if (this.props.option !== nextProps.option) {
|
||||
if (!this.isEmptyObject(nextProps.gridData) && !this.isEmptyObject(nextProps.option[0]) || !this.isEmptyObject(nextProps.option[1])) {
|
||||
if (!this.isEmptyObject(nextProps.gridData) && !this.isEmptyObject(nextProps.option[0]) && !this.isEmptyObject(nextProps.option[1])) {
|
||||
this.setBarWidth(nextProps);
|
||||
}
|
||||
}
|
||||
|
|
@ -78,21 +78,9 @@ class BarChart extends React.Component {
|
|||
t = 60;
|
||||
}
|
||||
let s = (h - (b + t)) / l;
|
||||
|
||||
if (nextProps.option[0].series) {
|
||||
nextProps.option[0].series[0].barWidth = s * 0.9;
|
||||
}
|
||||
if (nextProps.option[1].series) {
|
||||
nextProps.option[1].series[0].barWidth = s * 0.9;
|
||||
nextProps.option[1].series[0].label = {
|
||||
normal:{
|
||||
color: "#333",
|
||||
position: "top",
|
||||
show: true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
nextProps.option[0].series[0].barWidth = s * 0.9;
|
||||
nextProps.option[1].series[0].barWidth = s * 0.9;
|
||||
|
||||
this.setState({
|
||||
optionL: nextProps.option[0],
|
||||
|
|
@ -241,13 +229,14 @@ class BarChart extends React.Component {
|
|||
</Row>
|
||||
<Row ecId={`${this && this.props && this.props.ecId || ''}_Row@wzibn3`}>
|
||||
<Col ecId={`${this && this.props && this.props.ecId || ''}_Col@nr376a`}>
|
||||
<div style={{height: 340}}>
|
||||
<WeaEchart ecId={`${this && this.props && this.props.ecId || ''}_WeaEchart@wec1sj`} ref="echart1" option={optionL} useDefault={false} chartAction={ (chart) => this.chartAction(chart, 'left')}/>
|
||||
</div>
|
||||
{!Object.keys(optionL).length && <div style={{position: 'absolute', top: 100, left: '50%', marginLeft: -24, textAlign: 'center'}}>
|
||||
<div style={{fontSize: 50}}><i className='icon-coms-blank'></i></div>
|
||||
<div style={{fontSize: 15, color:'#B2B2B2'}}>{i18n.message.dataNone()}</div>
|
||||
</div>}
|
||||
{isChartsShow[0] ? <div style={{height: 340}}>
|
||||
<WeaEchart ecId={`${this && this.props && this.props.ecId || ''}_WeaEchart@wec1sj`} ref="echart1" option={optionL} useDefault={false} chartAction={ (chart) => this.chartAction(chart, 'left')}/>
|
||||
</div>
|
||||
: <div style={{position: 'absolute', top: 100, left: '50%', marginLeft: -24, textAlign: 'center'}}>
|
||||
<div style={{fontSize: 50}}><i className='icon-coms-blank'></i></div>
|
||||
<div style={{fontSize: 15, color:'#B2B2B2'}}>{i18n.message.dataNone()}</div>
|
||||
</div>
|
||||
}
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
|
|
@ -266,13 +255,13 @@ class BarChart extends React.Component {
|
|||
</Row>
|
||||
<Row ecId={`${this && this.props && this.props.ecId || ''}_Row@btr5lt`}>
|
||||
<Col ecId={`${this && this.props && this.props.ecId || ''}_Col@i6xciu`}>
|
||||
<div style={{height: 340}}>
|
||||
<WeaEchart ecId={`${this && this.props && this.props.ecId || ''}_WeaEchart@vljy8j`} ref="echart2" option={optionR} useDefault={false} chartAction={ (chart) => this.chartAction(chart, 'right')}/>
|
||||
</div>
|
||||
{!Object.keys(optionR).length && <div style={{position: 'absolute', top: 100, left: '50%', marginLeft: -24, textAlign: 'center'}}>
|
||||
<div style={{fontSize: 50}}><i className='icon-coms-blank'></i></div>
|
||||
<div style={{fontSize: 15, color:'#B2B2B2'}}>{i18n.message.dataNone()}</div>
|
||||
</div>}
|
||||
{isChartsShow[1] ? <div style={{height: 340}}>
|
||||
<WeaEchart ecId={`${this && this.props && this.props.ecId || ''}_WeaEchart@vljy8j`} ref="echart2" option={optionR} useDefault={false} chartAction={ (chart) => this.chartAction(chart, 'right')}/>
|
||||
</div>
|
||||
: <div style={{position: 'absolute', top: 100, left: '50%', marginLeft: -24, textAlign: 'center'}}>
|
||||
<div style={{fontSize: 50}}><i className='icon-coms-blank'></i></div>
|
||||
<div style={{fontSize: 15, color:'#B2B2B2'}}>{i18n.message.dataNone()}</div>
|
||||
</div>}
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -91,7 +91,6 @@ class ChangeRelatedReport extends React.Component {
|
|||
hrmChangeReport.pathToTitle();
|
||||
hrmChangeReport.getCurWindowWidth();
|
||||
hrmChangeReport.setColIdUnusualStatus();
|
||||
hrmChangeReport.optionReset();
|
||||
}
|
||||
|
||||
init() {
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ import {
|
|||
} from 'ecCom';
|
||||
import ImportResult from './ImportResult'
|
||||
import ImportHistory from './ImportHistory'
|
||||
import {addContentPath} from '../../../../util/index.js'
|
||||
import {addContentPath} from '../../util/index.js'
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
@observer
|
||||
|
|
|
|||
|
|
@ -62,7 +62,6 @@ export class HrmAdd {
|
|||
@observable searchsValue = "";//存储快捷搜索的值
|
||||
showFormFields = [];
|
||||
@observable dialogDefShow = '';//默认弹窗控制变量
|
||||
@observable isUsedAsSingle = false;
|
||||
|
||||
@action setSearchsValue = (v) => {
|
||||
this.searchsValue = v;
|
||||
|
|
@ -574,17 +573,7 @@ export class HrmAdd {
|
|||
'type': 'simple'
|
||||
});
|
||||
}
|
||||
let dialogMapper = top.window.dialogMapper;
|
||||
|
||||
if (dialogMapper) {
|
||||
for(let id in dialogMapper){
|
||||
let dialog = dialogMapper[id];
|
||||
dialog.close();
|
||||
dialog.callback({});
|
||||
}
|
||||
}else{
|
||||
this.update();
|
||||
}
|
||||
} else {
|
||||
message.warning(data.message);
|
||||
callback && callback();
|
||||
|
|
|
|||
|
|
@ -325,7 +325,6 @@ export class HrmChangeReport {
|
|||
if (!this.dpId && !this.yearmonth && !this.contractTypeId && this.isEmptyObject(adSearchParams) && !this.singleSearchCondition) {
|
||||
p = {
|
||||
cmd: cmd,
|
||||
yearmonth:this.deptDatas,
|
||||
...this.params
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -166,10 +166,10 @@ export class HrmSecondaryVerify {
|
|||
const key = secondaryPwd1 ? 'secondaryPwd1' : 'newSecondaryPwd1';
|
||||
form.validateForm().then(f => {
|
||||
if (f.isValid) {
|
||||
// if (newSecondaryPwd1 && !isOldPwdPass) {
|
||||
// form.showError('oldSecondaryPwd', getLabel('504374', "旧密码校验不通过!"));
|
||||
// return;
|
||||
// }
|
||||
if (newSecondaryPwd1 && !isOldPwdPass) {
|
||||
form.showError('oldSecondaryPwd', getLabel('504374', "旧密码校验不通过!"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (isEqualToLoginPass) {
|
||||
form.showError(key, getLabel('504375', "二次验证密码不能和登录密码相同"));
|
||||
|
|
|
|||
|
|
@ -772,7 +772,7 @@ class HrmSpaGroup {
|
|||
isSingle: false,
|
||||
onChange: datas => {
|
||||
this.memberIds = datas;
|
||||
datas && this.saveDialogForm();
|
||||
this.saveDialogForm();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ export class HrmSystemCard {
|
|||
this.getSearchCondition();
|
||||
this.getTableInfo('1');
|
||||
}else{
|
||||
// document.title = i18n.label.resourceCard()
|
||||
document.title = i18n.label.resourceCard()
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -128,7 +128,7 @@ export class HrmSystemCard {
|
|||
this.hrmName = data.hrmName;
|
||||
// this.form1 = new WeaForm();
|
||||
// this.form1.initFormFields(data.condition);
|
||||
// document.title = i18n.label.resourceCard() + '-' + data.hrmName;
|
||||
document.title = i18n.label.resourceCard() + '-' + data.hrmName;
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -82,12 +82,4 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.hrm-addsimple-single{
|
||||
height: 100%;
|
||||
& > div:first-child{
|
||||
height: calc(~"100% - 61px");
|
||||
overflow: auto;
|
||||
}
|
||||
}
|
||||
|
|
@ -134,9 +134,28 @@ const loginSync = (params) => {
|
|||
}
|
||||
}
|
||||
|
||||
queryParams = toJS(queryParams) || {} ;
|
||||
|
||||
const {appid,service} = queryParams ;
|
||||
queryParams = toJS(queryParams);
|
||||
if(queryParams && queryParams.appid && queryParams.service){
|
||||
queryParams.loginid=loginid;
|
||||
queryParams.userpassword=userpasswordRsa;
|
||||
queryParams.isRememberAccount = params.isRememberAccount ? '1':'0' ;
|
||||
queryParams.isRememberPassword = params.isRememberPassword ? '1':'0' ;
|
||||
queryParams.validatecode=validatecode;
|
||||
queryParams.validateCodeKey=validateCodeKey ;
|
||||
queryParams.languid=langid ;
|
||||
let tmps = [];
|
||||
jQuery("body").append("<form name='ssoForm'></form>");
|
||||
let form = jQuery("form[name='ssoForm']")
|
||||
form.attr("action", (window.ecologyContentPath||'')+'/login/VerifyLoginWeaversso.jsp');
|
||||
form.attr("method", "post");
|
||||
form.attr("style", "display:none");
|
||||
for (let key in queryParams) {
|
||||
form.append("<input type='text' name='" + key + "' value = '" + queryParams[key] + "'></input>");
|
||||
}
|
||||
//跳转到sso
|
||||
form.submit();
|
||||
return;
|
||||
}
|
||||
|
||||
const {plugin} = params
|
||||
|
||||
|
|
@ -200,8 +219,6 @@ const loginSync = (params) => {
|
|||
logintype: logintype,
|
||||
messages: messages,
|
||||
isie: isIE9,
|
||||
appid:appid,
|
||||
service:service,
|
||||
...plugin
|
||||
}).then((result) => {
|
||||
if ('access_token' in result && typeof result.access_token === 'string' && result.access_token !== '') {
|
||||
|
|
@ -214,22 +231,11 @@ const loginSync = (params) => {
|
|||
userpassword = result.user_token;
|
||||
}
|
||||
|
||||
const onSuccess = () => {
|
||||
if(success && typeof success == 'function'){
|
||||
success(loginid, userpassword, result);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (result.loginstatus == 'true') {
|
||||
const {isRemoveSession} = result ;
|
||||
if(isRemoveSession == '1'){
|
||||
onSuccess() ;
|
||||
return ;
|
||||
}else if (success && typeof success == 'function') {
|
||||
if (success && typeof success == 'function') {
|
||||
message.destroy();
|
||||
if(logintype==2){
|
||||
checkWeakPassword(()=>onSuccess());
|
||||
checkWeakPassword(()=>success(loginid, userpassword, result));
|
||||
}else{
|
||||
WeaTools.callApi('/api/hrm/login/remindLogin', 'POST', {logintype: logintype}).then((result) => {
|
||||
if (result.status == '1') {
|
||||
|
|
@ -263,11 +269,11 @@ const loginSync = (params) => {
|
|||
return;
|
||||
},
|
||||
onCancel() {
|
||||
checkWeakPassword(()=>onSuccess());
|
||||
checkWeakPassword(()=>success(loginid, userpassword, result));
|
||||
},
|
||||
});
|
||||
} else {
|
||||
checkWeakPassword(()=>onSuccess());
|
||||
checkWeakPassword(()=>success(loginid, userpassword, result));
|
||||
}
|
||||
} else {
|
||||
confirm({
|
||||
|
|
@ -286,7 +292,7 @@ const loginSync = (params) => {
|
|||
});
|
||||
}
|
||||
} else {
|
||||
checkWeakPassword(()=>onSuccess());
|
||||
checkWeakPassword(()=>success(loginid, userpassword, result));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1000,8 +1000,6 @@ class main extends React.Component {
|
|||
return content;
|
||||
};
|
||||
|
||||
let e9headerHeight = $(".e9header-right").height() || 80;
|
||||
|
||||
let coms = [
|
||||
<div style={query.fromcard ? { display: "none" } : { display: "" }}>
|
||||
<WeaTop ecId={`${this && this.props && this.props.ecId || ''}_WeaTop@8mum9v@1`}
|
||||
|
|
@ -1187,7 +1185,7 @@ class main extends React.Component {
|
|||
)}
|
||||
</div>
|
||||
<WeaNewScroll ecId={`${this && this.props && this.props.ecId || ''}_WeaNewScroll@873va8@scroll`}
|
||||
height={window.innerHeight - e9headerHeight - 10 - $(".wea-new-top-wapper").height() - $(".wea-tab").height() - $(".picker-wrapper").height() - 10 - $(".pt-menu-horizontal").height()}
|
||||
height={window.innerHeight - $(".e9header-right").height() - 10 - $(".wea-new-top-wapper").height() - $(".wea-tab").height() - $(".picker-wrapper").height() - 10 - $(".pt-menu-horizontal").height()}
|
||||
className="bt"
|
||||
>
|
||||
{!hasRight && (
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ import {
|
|||
} from 'ecCom';
|
||||
|
||||
@inject('commonStore')
|
||||
@inject('hrmOriginalPunchRecord')
|
||||
@observer
|
||||
export default class RadioGroup extends React.Component {
|
||||
constructor(props) {
|
||||
|
|
@ -34,7 +33,7 @@ export default class RadioGroup extends React.Component {
|
|||
} = radioGroup;
|
||||
|
||||
return (
|
||||
config.length > 0 && <WeaRadioGroup ecId={`${this && this.props && this.props.ecId || ''}_WeaRadioGroup@vd0ovj`} config={toJS(config)} ref={ref => setRef(ref,'radioGroup')} onChange={this.props.hrmOriginalPunchRecord.onRadioGroupChangeHandle}/>
|
||||
config.length > 0 && <WeaRadioGroup ecId={`${this && this.props && this.props.ecId || ''}_WeaRadioGroup@vd0ovj`} config={toJS(config)} ref={ref => setRef(ref,'radioGroup')} onChange={params => this.handleRadioGroupChange(params)}/>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
@ -51,9 +51,8 @@ export default class CalendarComs extends Component{
|
|||
const d = date.getDayOfMonth();
|
||||
const select = moment(date.time);
|
||||
calendarData = toJS(calendarData);
|
||||
let formatDate = `${date.getYear()}-${(date.getMonth()+1+'').padLeft(2,0)}-${ (date.getDayOfMonth()+'').padLeft(2,0)}`
|
||||
let data = calendarData[formatDate];
|
||||
let holiday = holidayData[formatDate];
|
||||
let data = calendarData[select.format('YYYY-MM-DD')];
|
||||
let holiday = holidayData[select.format('YYYY-MM-DD')];
|
||||
let content = (
|
||||
<span>
|
||||
{holiday && <span className="tip" style={{color: holiday.isWorkday ? '#FF1B10' : '#1B9B12'}}>{holiday.tip}</span>}
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ class Table extends React.Component {
|
|||
} = table;
|
||||
|
||||
const {
|
||||
// height: rgHeight
|
||||
height: rgHeight
|
||||
} = radioGroup;
|
||||
|
||||
const {
|
||||
|
|
@ -121,8 +121,6 @@ class Table extends React.Component {
|
|||
leftMenuBarWidth,
|
||||
} = this.state;
|
||||
|
||||
const rgHeight = jquery(".wea-radio-group").height();
|
||||
|
||||
//滚动区域的宽度 公式:窗口宽度 - (左侧菜单栏宽度 + GAP )
|
||||
const PADDINGLEFT = 20;
|
||||
const scrollWidth = browserWidth - (leftMenuBarWidth + 2 * PADDINGLEFT);
|
||||
|
|
|
|||
|
|
@ -374,7 +374,6 @@ export class HrmAttendanceDailyReport extends HrmBaseStore {
|
|||
}
|
||||
break;
|
||||
}
|
||||
this.showHasNotAccount = ((['4', '5', '6', '7', '9'].indexOf(params.status || '')) > -1);
|
||||
this.getKQReport(this.getQueryParams(1));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -399,7 +399,6 @@ class HrmAttendanceMonthReport4Template extends HrmBaseStore {
|
|||
|
||||
displaySetting = {}
|
||||
rangeConditions = [];
|
||||
custConditions = [];
|
||||
rangeKeys = {}
|
||||
|
||||
@computed get radioGroupConfig(){
|
||||
|
|
@ -447,16 +446,15 @@ class HrmAttendanceMonthReport4Template extends HrmBaseStore {
|
|||
@action getCondition = async () => {
|
||||
const data = await api.getSearchCondition();
|
||||
if(data.status == '1'){
|
||||
const {conditions = [], cusCondition = [], showColumns: cascader} = data;
|
||||
let arr = [...conditions, ...cusCondition];
|
||||
this.cascader = cascader;
|
||||
const {conditions, showColumns: cascader} = data;
|
||||
this.cascader = cascader;
|
||||
this.rangeKeys = {};
|
||||
this.rangeConditions = arr.map(condition => {
|
||||
this.rangeConditions = conditions.map(condition => {
|
||||
const {domkey} = condition;
|
||||
Object.assign(this.rangeKeys, {[domkey]: []})
|
||||
let options = condition.options;
|
||||
let selectLinkageDatas = condition.selectLinkageDatas;
|
||||
selectLinkageDatas && Object.keys(selectLinkageDatas).map(k => {
|
||||
Object.keys(selectLinkageDatas).map(k => {
|
||||
const {conditionType, domkey: linkdomkey} = selectLinkageDatas[k];
|
||||
this.rangeKeys[domkey].push(...linkdomkey);
|
||||
if(conditionType == 'BROWSER'){
|
||||
|
|
@ -645,7 +643,7 @@ class HrmAttendanceMonthReport4Template extends HrmBaseStore {
|
|||
}
|
||||
break;
|
||||
}
|
||||
this.showHasNotAccount = ((['4', '5', '6', '7', '9'].indexOf(params.status || '')) > -1);
|
||||
|
||||
this.getKQReport(this.getQueryParams());
|
||||
}catch(e){
|
||||
|
||||
|
|
|
|||
|
|
@ -36,11 +36,6 @@ class HrmOriginalPunchRecord {
|
|||
//*************头部**************
|
||||
@observable isNoAccountShow = false;
|
||||
|
||||
@action onRadioGroupChangeHandle = (params) => {
|
||||
this.isNoAccountShow = ((['4', '5', '6', '7', '9'].indexOf(params.status || '')) > -1);
|
||||
commonStore.exportActiveParams(params);
|
||||
}
|
||||
|
||||
@action clickIcon = (bool) => {
|
||||
this.isNoAccountShow = bool;
|
||||
|
||||
|
|
|
|||
|
|
@ -61,7 +61,6 @@ export class HrmShift {
|
|||
|
||||
@action changeDateTabHandler = (key) => {
|
||||
this.dateTabkey = key;
|
||||
this.getData();
|
||||
}
|
||||
|
||||
@action changeDateHandler = (v) => {
|
||||
|
|
|
|||
|
|
@ -280,7 +280,6 @@ class HrmVacationBalanceReportCopy {
|
|||
}
|
||||
|
||||
@action exportActiveParams = (params) => {
|
||||
this.isNoAccountShow = ((['4', '5', '6', '7', '9'].indexOf(params.status || '')) > -1);
|
||||
this.radioGroup.activeParams = params;
|
||||
|
||||
this.chainCall();
|
||||
|
|
|
|||
|
|
@ -500,7 +500,7 @@ export const getIconColor = type => {
|
|||
let res = {};
|
||||
if (type == 'ALL') {
|
||||
res.color = '#2DB7F5';
|
||||
res.name = getLabel(82857, '全部');
|
||||
res.name = (window.e9_locale.userLanguage == "8") ? "All type" : getLabel(82857, '全部');
|
||||
res.icon = 'icon-Human-resources-all';
|
||||
}
|
||||
if (type == 'NORMAL') {
|
||||
|
|
@ -522,31 +522,31 @@ export const getIconColor = type => {
|
|||
}
|
||||
if (type == 'ABSENT') {
|
||||
res.color = '#FC4B6C';
|
||||
res.name = getLabel('20085', "旷工");
|
||||
res.name = (window.e9_locale.userLanguage == "8") ? "Truancy" : getLabel('20085', "旷工");
|
||||
res.bcolor = '#FFE6EB';
|
||||
res.icon = 'icon-Human-resources-Absenteeism';
|
||||
}
|
||||
if (type == 'NOSIGN') {
|
||||
res.color = '#BD10E0';
|
||||
res.name = getLabel('20086', "漏签");
|
||||
res.name = (window.e9_locale.userLanguage == "8") ? "Forget" :getLabel('20086', "漏签");
|
||||
res.bcolor = '#FAECFD';
|
||||
res.icon = 'icon-Human-resources-check';
|
||||
}
|
||||
if (type == 'LEAVE') {
|
||||
res.color = '#2DB7F5';
|
||||
res.name = getLabel('670', "请假");
|
||||
res.name = (window.e9_locale.userLanguage == "8") ? "Leave" : getLabel('670', "请假");
|
||||
res.bcolor = '#EFFAFF';
|
||||
res.icon = 'icon-Human-resources-leave';
|
||||
}
|
||||
if (type == 'EVECTION') {
|
||||
res.color = '#30BE3A';
|
||||
res.name = getLabel('20084', "出差");
|
||||
res.name = (window.e9_locale.userLanguage == "8") ? "Business Trip" :getLabel('20084', "出差");
|
||||
res.bcolor = '#EFFAF0';
|
||||
res.icon = 'icon-Human-resources-business-travel';
|
||||
}
|
||||
if (type == 'OUTDAYS') {
|
||||
res.color = '#4F8CFF';
|
||||
res.name = getLabel('24058', "公出");
|
||||
res.name =(window.e9_locale.userLanguage == "8") ? "Business Out" : getLabel('24058', "公出");
|
||||
res.bcolor = '#DFEBFF';
|
||||
res.icon = 'icon-Human-resources-work';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
# top-most EditorConfig file
|
||||
root = true
|
||||
|
||||
# Unix-style newlines with a newline ending every file
|
||||
[*.{js,css}]
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
*.iml
|
||||
*.log
|
||||
.idea/
|
||||
.ipr
|
||||
.iws
|
||||
*~
|
||||
~*
|
||||
*.diff
|
||||
*.patch
|
||||
*.bak
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
.project
|
||||
.*proj
|
||||
.svn/
|
||||
*.swp
|
||||
*.swo
|
||||
*.pyc
|
||||
*.pyo
|
||||
.build
|
||||
node_modules
|
||||
.cache
|
||||
dist
|
||||
assets/**/*.css
|
||||
build
|
||||
lib
|
||||
es
|
||||
coverage
|
||||
yarn.lock
|
||||
package-lock.json
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
language: node_js
|
||||
|
||||
sudo: false
|
||||
|
||||
notifications:
|
||||
email:
|
||||
- yiminghe@gmail.com
|
||||
|
||||
node_js:
|
||||
- 6.0.0
|
||||
|
||||
before_install:
|
||||
- |
|
||||
if ! git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '(\.md$)|(^(docs|examples))/'
|
||||
then
|
||||
echo "Only docs were updated, stopping build process."
|
||||
exit
|
||||
fi
|
||||
npm install npm@3.x -g
|
||||
phantomjs --version
|
||||
script:
|
||||
- |
|
||||
if [ "$TEST_TYPE" = test ]; then
|
||||
npm test
|
||||
else
|
||||
npm run $TEST_TYPE
|
||||
fi
|
||||
env:
|
||||
matrix:
|
||||
- TEST_TYPE=lint
|
||||
- TEST_TYPE=test
|
||||
- TEST_TYPE=coverage
|
||||
|
|
@ -0,0 +1,92 @@
|
|||
# History
|
||||
----
|
||||
## 7.0.2 / 2018-05-03
|
||||
|
||||
- Better aria-* attributes support.
|
||||
- Improve Menu performance by avoiding unnecessary updates.
|
||||
- Minor key shortcut bug fixes.
|
||||
- Support passing props through to MenuItem list item
|
||||
|
||||
## 6.0.0 / 2017-10-30
|
||||
|
||||
- Replace openSubMenuOnMouseEnter/closeSubMenuOnMouseLeave with triggerSubMenuAction
|
||||
- Add subMenuCloseDelay and subMenuOpenDelay
|
||||
- Refactor with rc-trigger
|
||||
|
||||
## 5.1.0 / 2016-09-12
|
||||
|
||||
- Add dom for submenu arrow
|
||||
|
||||
## 5.0.0 / 2016-08-19
|
||||
|
||||
- remove onOpen/onClose, support onOpenChange(openKeys: string[])
|
||||
|
||||
## 4.13.0 / 2016-07-22
|
||||
|
||||
- support submenu-selected
|
||||
|
||||
## 4.12 / 2016-05-05
|
||||
|
||||
- make submenu active only title is hovered when inline
|
||||
|
||||
## 4.11.0 / 2016-04-27
|
||||
|
||||
- add onMouseEnter/onTitleMouseLeave/onTitleClick/...
|
||||
|
||||
## 4.10.0 / 2016-01-20
|
||||
|
||||
- use es6 export
|
||||
|
||||
## 4.9.0 / 2015-12-25
|
||||
- add keyPath to onOpen/onClose argument info
|
||||
|
||||
## 4.6.0 / 2015-09-16
|
||||
- add keyPath to onClick argument info
|
||||
|
||||
## 4.5.0 / 2015-09-14
|
||||
- does not hide submenu when click(use onClick to set openKeys to [] if you want)
|
||||
|
||||
## 4.4.0 / 2015-08-13
|
||||
- add openAnimation/openTransitionName prop
|
||||
|
||||
## 4.3.0 / 2015-08-13
|
||||
- make selectedKeys openedKeys controllable
|
||||
- add closeSubMenuOnMouseLeave/onOpen/onClose props
|
||||
|
||||
## 4.1.0 / 2015-08-11
|
||||
- remove openOnHover for SubMenu
|
||||
- add openSubMenuOnMouseEnter prop for Menu
|
||||
|
||||
## 4.0.0 / 2015-08-10
|
||||
|
||||
- add props: mode (horizontal, vertical, inline) for Menu
|
||||
- add defaultSelectedKeys, make selectedKeys controllable
|
||||
- change param of onSelect onDeselect
|
||||
|
||||
## 3.5.0 / 2015-08-06
|
||||
|
||||
add props: vertical/horizontal for Menu, align for SubMenu
|
||||
|
||||
## 3.4.0 / 2015-06-17
|
||||
|
||||
`improved` [#9](https://github.com/react-component/menu/issues/9) allow not set key for menuitem
|
||||
|
||||
`new` [#10](https://github.com/react-component/menu/issues/10) support MenuItemGroup
|
||||
|
||||
## 3.3.0 / 2015-06-08
|
||||
|
||||
`new` add Menu.Divider Component
|
||||
|
||||
## 3.1.0 / 2015-03-26
|
||||
|
||||
`improved` [#5](https://github.com/react-component/menu/issues/5) support selected and disabled for menuitem simultaneously
|
||||
|
||||
## 3.0.0 / 2015-03-17
|
||||
|
||||
support react 0.13 and es6
|
||||
|
||||
## 2.2.0 / 2015-01-29
|
||||
|
||||
`new` [#3](https://github.com/react-component/menu/issues/3) support scrollIntoView if menu is scrollable
|
||||
|
||||
`new` [#2](https://github.com/react-component/menu/issues/2) support multiple prop and onDeselect callback
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014-present yiminghe
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
|
@ -0,0 +1,376 @@
|
|||
# rc-menu
|
||||
---
|
||||
|
||||
react menu component. port from https://github.com/kissyteam/menu
|
||||
|
||||
|
||||
[![NPM version][npm-image]][npm-url]
|
||||
[![build status][travis-image]][travis-url]
|
||||
[![Test coverage][coveralls-image]][coveralls-url]
|
||||
[![gemnasium deps][gemnasium-image]][gemnasium-url]
|
||||
[![node version][node-image]][node-url]
|
||||
[![npm download][download-image]][download-url]
|
||||
|
||||
[npm-image]: http://img.shields.io/npm/v/rc-menu.svg?style=flat-square
|
||||
[npm-url]: http://npmjs.org/package/rc-menu
|
||||
[travis-image]: https://img.shields.io/travis/react-component/menu.svg?style=flat-square
|
||||
[travis-url]: https://travis-ci.org/react-component/menu
|
||||
[coveralls-image]: https://img.shields.io/coveralls/react-component/menu.svg?style=flat-square
|
||||
[coveralls-url]: https://coveralls.io/r/react-component/menu?branch=master
|
||||
[gemnasium-image]: http://img.shields.io/gemnasium/react-component/menu.svg?style=flat-square
|
||||
[gemnasium-url]: https://gemnasium.com/react-component/menu
|
||||
[node-image]: https://img.shields.io/badge/node.js-%3E=_0.10-green.svg?style=flat-square
|
||||
[node-url]: http://nodejs.org/download/
|
||||
[download-image]: https://img.shields.io/npm/dm/rc-menu.svg?style=flat-square
|
||||
[download-url]: https://npmjs.org/package/rc-menu
|
||||
|
||||
|
||||
## Screenshot
|
||||
|
||||

|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```jsx
|
||||
import Menu, {SubMenu, MenuItem} from 'rc-menu';
|
||||
ReactDOM.render(<Menu>
|
||||
<MenuItem>1</MenuItem>
|
||||
<SubMenu title="2">
|
||||
<MenuItem>2-1</MenuItem>
|
||||
</SubMenu>
|
||||
</Menu>, container);
|
||||
```
|
||||
|
||||
## install
|
||||
|
||||
[](https://npmjs.org/package/rc-menu)
|
||||
|
||||
## API
|
||||
|
||||
### Menu props
|
||||
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 100px;">name</th>
|
||||
<th style="width: 50px;">type</th>
|
||||
<th style="width: 50px;">default</th>
|
||||
<th>description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>className</td>
|
||||
<td>String</td>
|
||||
<td></td>
|
||||
<td>additional css class of root dom node</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>mode</td>
|
||||
<td>String</td>
|
||||
<td>vertical</td>
|
||||
<td>one of ["horizontal","inline","vertical-left","vertical-right"]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>activeKey</td>
|
||||
<td>Object</td>
|
||||
<th></th>
|
||||
<td>initial and current active menu item's key.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>defaultActiveFirst</td>
|
||||
<td>Boolean</td>
|
||||
<th>false</th>
|
||||
<td>whether active first menu item when show if activeKey is not set or invalid</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>multiple</td>
|
||||
<td>Boolean</td>
|
||||
<th>false</th>
|
||||
<td>whether allow multiple select</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>selectable</td>
|
||||
<td>Boolean</td>
|
||||
<th>true</th>
|
||||
<td>allow selecting menu items</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>selectedKeys</td>
|
||||
<td>String[]</td>
|
||||
<th>[]</th>
|
||||
<td>selected keys of items</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>defaultSelectedKeys</td>
|
||||
<td>String[]</td>
|
||||
<th>[]</th>
|
||||
<td>initial selected keys of items</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>openKeys</td>
|
||||
<td>String[]</td>
|
||||
<th>[]</th>
|
||||
<td>open keys of SubMenuItem</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>defaultOpenKeys</td>
|
||||
<td>String[]</td>
|
||||
<th>[]</th>
|
||||
<td>initial open keys of SubMenuItem</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>onSelect</td>
|
||||
<td>function({key:String, item:ReactComponent, domEvent:Event, selectedKeys:String[]})</td>
|
||||
<th></th>
|
||||
<td>called when select a menu item</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>onClick</td>
|
||||
<td>function({key:String, item:ReactComponent, domEvent:Event, keyPath: String[]})</td>
|
||||
<th></th>
|
||||
<td>called when click a menu item</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>onOpenChange</td>
|
||||
<td>(openKeys:String[]) => void</td>
|
||||
<th></th>
|
||||
<td>called when open/close sub menu</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>onDeselect</td>
|
||||
<td>function({key:String, item:ReactComponent, domEvent:Event, selectedKeys:String[]})</td>
|
||||
<th></th>
|
||||
<td>called when deselect a menu item. only called when allow multiple</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>triggerSubMenuAction</td>
|
||||
<td>Enum { hover, click }</td>
|
||||
<th>hover</th>
|
||||
<td>which action can trigger submenu open/close</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>openAnimation</td>
|
||||
<td>{enter:function,leave:function}|String</td>
|
||||
<th></th>
|
||||
<td>animate when sub menu open or close. see rc-animate for object type.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>openTransition</td>
|
||||
<td>String</td>
|
||||
<th></th>
|
||||
<td>css transitionName when sub menu open or close</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>subMenuOpenDelay</td>
|
||||
<td>Number</td>
|
||||
<th>0</th>
|
||||
<td>delay time to show popup sub menu. unit: s</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>subMenuCloseDelay</td>
|
||||
<td>Number</td>
|
||||
<th>0.1</th>
|
||||
<td>delay time to hide popup sub menu. unit: s</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>forceSubMenuRender</td>
|
||||
<td>Boolean</td>
|
||||
<th>false</th>
|
||||
<td>whether to render submenu even if it is not visible</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>getPopupContainer</td>
|
||||
<td>Function(menuDOMNode): HTMLElement</td>
|
||||
<th>() => document.body</th>
|
||||
<td>Where to render the DOM node of popup menu when the mode is horizontal or vertical</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
### Menu.Item props
|
||||
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 100px;">name</th>
|
||||
<th style="width: 50px;">type</th>
|
||||
<th style="width: 50px;">default</th>
|
||||
<th>description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>className</td>
|
||||
<td>String</td>
|
||||
<td></td>
|
||||
<td>additional css class of root dom node</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>disabled</td>
|
||||
<td>Boolean</td>
|
||||
<th>false</th>
|
||||
<td>no effect for click or keydown for this item</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>key</td>
|
||||
<td>Object</td>
|
||||
<th></th>
|
||||
<td>corresponding to activeKey</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>onMouseEnter</td>
|
||||
<td>Function({eventKey, domEvent})</td>
|
||||
<th></th>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>onMouseLeave</td>
|
||||
<td>Function({eventKey, domEvent})</td>
|
||||
<th></th>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
### Menu.SubMenu props
|
||||
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 100px;">name</th>
|
||||
<th style="width: 50px;">type</th>
|
||||
<th style="width: 50px;">default</th>
|
||||
<th>description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>className</td>
|
||||
<td>String</td>
|
||||
<td></td>
|
||||
<td>additional css class of root dom node</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>title</td>
|
||||
<td>String/ReactElement</td>
|
||||
<td></td>
|
||||
<td>sub menu's content</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>key</td>
|
||||
<td>Object</td>
|
||||
<th></th>
|
||||
<td>corresponding to activeKey</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>disabled</td>
|
||||
<td>Boolean</td>
|
||||
<th>false</th>
|
||||
<td>no effect for click or keydown for this item</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>onMouseEnter</td>
|
||||
<td>Function({eventKey, domEvent})</td>
|
||||
<th></th>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>onMouseLeave</td>
|
||||
<td>Function({eventKey, domEvent})</td>
|
||||
<th></th>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>onTitleMouseEnter</td>
|
||||
<td>Function({eventKey, domEvent})</td>
|
||||
<th></th>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>onTitleMouseLeave</td>
|
||||
<td>Function({eventKey, domEvent})</td>
|
||||
<th></th>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>onTitleClick</td>
|
||||
<td>Function({eventKey, domEvent})</td>
|
||||
<th></th>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>popupOffset</td>
|
||||
<td>Array</td>
|
||||
<th></th>
|
||||
<td>The offset of the popup submenu, in an x, y coordinate array. e.g.: `[0,15]`</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
### Menu.Divider props
|
||||
|
||||
none
|
||||
|
||||
### Menu.ItemGroup props
|
||||
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 100px;">name</th>
|
||||
<th style="width: 50px;">type</th>
|
||||
<th style="width: 50px;">default</th>
|
||||
<th>description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>title</td>
|
||||
<td>String|React.Element</td>
|
||||
<th></th>
|
||||
<td>title of item group</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>children</td>
|
||||
<td>React.Element[]</td>
|
||||
<th></th>
|
||||
<td>MenuItems belonged to this group</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
## Development
|
||||
|
||||
```
|
||||
npm install
|
||||
npm start
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
http://localhost:8001/examples/index.md
|
||||
|
||||
online example: http://react-component.github.io/menu/examples/
|
||||
|
||||
|
||||
## Test Case
|
||||
|
||||
```
|
||||
npm test
|
||||
npm run chrome-test
|
||||
```
|
||||
|
||||
## Coverage
|
||||
|
||||
```
|
||||
npm run coverage
|
||||
```
|
||||
|
||||
open coverage/ dir
|
||||
|
||||
|
||||
## License
|
||||
|
||||
rc-menu is released under the MIT license.
|
||||
|
|
@ -0,0 +1 @@
|
|||
module.exports = require('./src/');
|
||||
|
|
@ -0,0 +1,88 @@
|
|||
{
|
||||
"name": "rc-menu",
|
||||
"version": "7.0.3",
|
||||
"description": "menu ui component for react",
|
||||
"keywords": [
|
||||
"react",
|
||||
"react-component",
|
||||
"menu",
|
||||
"ui",
|
||||
"react-menu"
|
||||
],
|
||||
"files": [
|
||||
"es",
|
||||
"lib",
|
||||
"assets/*.css"
|
||||
],
|
||||
"main": "./lib/index",
|
||||
"module": "./es/index",
|
||||
"homepage": "http://github.com/react-component/menu",
|
||||
"maintainers": [
|
||||
"yiminghe@gmail.com",
|
||||
"hualei5280@gmail.com"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git@github.com:react-component/menu.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "http://github.com/react-component/menu/issues"
|
||||
},
|
||||
"licenses": "MIT",
|
||||
"config": {
|
||||
"port": 8010
|
||||
},
|
||||
"scripts": {
|
||||
"build": "rc-tools run build",
|
||||
"compile": "rc-tools run compile --babel-runtime",
|
||||
"gh-pages": "rc-tools run gh-pages",
|
||||
"start": "rc-tools run server",
|
||||
"start:preact": "DEMO_ENV=preact rmc-tools run server",
|
||||
"pub": "rc-tools run pub --babel-runtime",
|
||||
"lint": "rc-tools run lint",
|
||||
"lint:fix": "rc-tools run lint --fix",
|
||||
"test": "jest",
|
||||
"prepublish": "rc-tools run guard",
|
||||
"coverage": "jest --coverage && cat ./coverage/lcov.info | coveralls"
|
||||
},
|
||||
"jest": {
|
||||
"setupFiles": [
|
||||
"./tests/setup.js"
|
||||
],
|
||||
"collectCoverageFrom": [
|
||||
"src/**/*"
|
||||
],
|
||||
"snapshotSerializers": [
|
||||
"enzyme-to-json/serializer"
|
||||
],
|
||||
"transform": {
|
||||
"\\.jsx?$": "./node_modules/rc-tools/scripts/jestPreprocessor.js"
|
||||
}
|
||||
},
|
||||
"devDependencies": {
|
||||
"coveralls": "^2.11.15",
|
||||
"enzyme": "^3.0.0",
|
||||
"enzyme-adapter-react-16": "^1.0.2",
|
||||
"enzyme-to-json": "^3.0.1",
|
||||
"jest": "^21.0.0",
|
||||
"pre-commit": "1.x",
|
||||
"rc-tools": "7.x",
|
||||
"react": "^16.0.0",
|
||||
"react-dom": "^16.0.0",
|
||||
"react-test-renderer": "^16.0.0",
|
||||
"rmc-tools": "^0.0.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"babel-runtime": "6.x",
|
||||
"classnames": "2.x",
|
||||
"dom-scroll-into-view": "1.x",
|
||||
"mini-store": "^1.1.0",
|
||||
"prop-types": "^15.5.6",
|
||||
"rc-animate": "2.x",
|
||||
"rc-trigger": "^2.3.0",
|
||||
"rc-util": "^4.1.0"
|
||||
},
|
||||
"pre-commit": [
|
||||
"lint"
|
||||
]
|
||||
}
|
||||
|
|
@ -12,8 +12,8 @@ class SettingButton extends React.Component {
|
|||
render() {
|
||||
return (
|
||||
<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@fcu65c`} label={this.props.label} labelCol={{ span: 10 }} wrapperCol={{ span: 14 }}>
|
||||
<div className="wea-custom-setting-btn">
|
||||
<i className="icon-coms-Flow-setting" onClick={this.props.onSetting}/>
|
||||
<div className="wea-custom-setting-btn" onClick={this.props.onSetting}>
|
||||
<i className="icon-coms-Flow-setting" />
|
||||
</div>
|
||||
</WeaFormItem>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
.wea-custom-setting-btn {
|
||||
color: #b2b2b2;
|
||||
font-size: 16px;
|
||||
}
|
||||
.wea-custom-setting-btn i{
|
||||
cursor: pointer;
|
||||
}
|
||||
.wea-custom-setting-btn i:hover {
|
||||
|
||||
.wea-custom-setting-btn:hover {
|
||||
color: #2db7f5;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue