初始化hrm代码

This commit is contained in:
Chengliang 2023-09-26 16:58:23 +08:00
parent 3c950521a2
commit ebc0f8bebe
40 changed files with 852 additions and 345 deletions

View File

@ -36,8 +36,8 @@ export default class SensitiveWordProcess extends React.Component {
const { senstiveWordProcessStore: { topStore, formStore: { form }, searchGroupProps, authorityStore } } = this.props; const { senstiveWordProcessStore: { topStore, formStore: { form }, searchGroupProps, authorityStore } } = this.props;
return ( return (
<Authority ecId={`${this && this.props && this.props.ecId || ''}_Authority@0nbcjs`} store={authorityStore}> <Authority store={authorityStore}>
<Top ecId={`${this && this.props && this.props.ecId || ''}_Top@h78vuy`} store={topStore}> <Top store={topStore}>
<div className='sensitiveWordProcess'> <div className='sensitiveWordProcess'>
{form.render(searchGroupProps)} {form.render(searchGroupProps)}
</div> </div>

View File

@ -173,7 +173,7 @@ class Full extends React.Component {
labelCol={{ span: `${field.labelcol}` }} labelCol={{ span: `${field.labelcol}` }}
wrapperCol={{ span: `${field.fieldcol}` }}> wrapperCol={{ span: `${field.fieldcol}` }}>
{dom} {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>, </WeaFormItem>,
colSpan: 1, colSpan: 1,
hide: hide hide: hide

View File

@ -2,7 +2,7 @@ import React from 'react';
import { inject, observer } from 'mobx-react'; import { inject, observer } from 'mobx-react';
import { Button, Spin, Icon } from 'antd' import { Button, Spin, Icon } from 'antd'
import isEmpty from 'lodash/isEmpty' 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 { WeaSwitch } from 'comsMobx'
import UploadAvatar from '../../../../pc4public/hrm/uploadAvatar' import UploadAvatar from '../../../../pc4public/hrm/uploadAvatar'
const getKey = WeaTools.getKey; const getKey = WeaTools.getKey;
@ -18,19 +18,9 @@ class Simple extends React.Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = { 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) { componentWillReceiveProps (nextProps) {
const { hrmAdd } = this.props; const { hrmAdd } = this.props;
const { conditionInfo } = hrmAdd; const { conditionInfo } = hrmAdd;
@ -46,7 +36,7 @@ class Simple extends React.Component {
} }
componentDidUpdate () { componentDidUpdate () {
const { hrmAdd } = this.props; const { hrmAdd } = this.props;
const { updateScroll,formSimple } = hrmAdd; const { updateScroll } = hrmAdd;
if (updateScroll) { if (updateScroll) {
if (this.refs.scrollBar) { if (this.refs.scrollBar) {
setTimeout(() => { setTimeout(() => {
@ -58,26 +48,9 @@ class Simple extends React.Component {
setTimeout(() => { setTimeout(() => {
$(".input-tip").attr("title", $(".input-tip").text()) $(".input-tip").attr("title", $(".input-tip").text())
}, 0) }, 0)
if (this.deptInfo) {
const {id,name}= this.deptInfo;
formSimple.updateFields({
departmentid:{
value: id,
valueSpan: name,
valueObj: [
{
id,
name
}
]
}
})
}
} }
componentDidMount () { componentDidMount () {
this.init(); this.init();
console.log(self.frameElement);
} }
init = () => { init = () => {
@ -146,7 +119,7 @@ class Simple extends React.Component {
labelCol={{ span: `${field.labelcol}` }} labelCol={{ span: `${field.labelcol}` }}
wrapperCol={{ span: `${field.fieldcol}` }}> wrapperCol={{ span: `${field.fieldcol}` }}>
{dom} {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>, </WeaFormItem>,
colSpan: 1, colSpan: 1,
hide: hide hide: hide
@ -161,17 +134,9 @@ class Simple extends React.Component {
render () { render () {
const { hrmAdd } = this.props; const { hrmAdd } = this.props;
const { title, loading,isUsedAsSingle,jobtitleVisible,formSimple,closeJobtitleDialog} = hrmAdd; const { title, loading } = hrmAdd;
let dialogHeight = window.innerHeight - 250; let dialogHeight = window.innerHeight - 250;
if (dialogHeight > 660) dialogHeight = 660; 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`} return <WeaDialog ecId={`${this && this.props && this.props.ecId || ''}_WeaDialog@5hvnq9`}
{...this.props} {...this.props}
closable closable
@ -184,64 +149,21 @@ class Simple extends React.Component {
moreBtn={{ datas: [] }} moreBtn={{ datas: [] }}
> >
<Spin ecId={`${this && this.props && this.props.ecId || ''}_Spin@gfpue4`} spinning={loading}> <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"> <WeaNewScroll ecId={`${this && this.props && this.props.ecId || ''}_WeaNewScroll@56svjo`} height={dialogHeight} ref="scrollBar">
{com} {this.getSearchs()}
</WeaNewScroll> </WeaNewScroll>
</Spin> </Spin>
</WeaDialog> </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>
)
}
} }
getBtns = () => { getBtns = () => {
const { hrmAdd } = this.props; const { hrmAdd } = this.props;
const { canSave,isUsedAsSingle } = hrmAdd; const { canSave } = hrmAdd;
return [ 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>), </div>),
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@whckot@1`} type="primary" disabled={!canSave} onClick={this.save}>{i18n.button.save()}</Button>), (<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; return btns;
} }

View File

@ -223,7 +223,7 @@ class Main extends React.Component {
labelCol={{span: `${window.HrmLabelCol}`}} labelCol={{span: `${window.HrmLabelCol}`}}
wrapperCol={{span: `${window.HrmWrapperCol}`}}> wrapperCol={{span: `${window.HrmWrapperCol}`}}>
{dom} {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>), </WeaFormItem></div>),
colSpan: 1 colSpan: 1
}); });
@ -274,7 +274,7 @@ class Main extends React.Component {
labelCol={{span: `${window.HrmLabelCol}`}} labelCol={{span: `${window.HrmLabelCol}`}}
wrapperCol={{span: `${window.HrmWrapperCol}`}}> wrapperCol={{span: `${window.HrmWrapperCol}`}}>
{dom} {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>), </WeaFormItem>),
colSpan: 2 colSpan: 2
}); });

View File

@ -14,8 +14,7 @@ import {
WeaTab, WeaTab,
WeaNewScroll, WeaNewScroll,
WeaAlertPage, WeaAlertPage,
WeaAvatar, WeaAvatar
WeaLeftRightLayout
} from 'ecCom' } from 'ecCom'
import isEmpty from 'lodash/isEmpty' import isEmpty from 'lodash/isEmpty'
import * as mobx from 'mobx'; import * as mobx from 'mobx';
@ -34,10 +33,8 @@ import {
WeaPopoverHrm WeaPopoverHrm
} from 'ecCom'; } from 'ecCom';
import TopButton from '../../coms/topButton'; import TopButton from '../../coms/topButton';
import { i18n } from '../../public/i18n'; import {i18n} from '../../public/i18n';
import { addContentPath } from '../../util/index.js' import {addContentPath} from '../../util/index.js'
const TabPane = Tabs.TabPane;
const { ua } = WeaTools; const { ua } = WeaTools;
const isIE9 = ua.browser === "IE" const isIE9 = ua.browser === "IE"
@ -51,7 +48,7 @@ class Main extends React.Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = { this.state = {
weaWorkplanLoaded: false, weaWorkplanLoaded:false,
rightMenu: [] rightMenu: []
} }
} }
@ -68,9 +65,9 @@ class Main extends React.Component {
componentWillMount() { componentWillMount() {
// 异步加载日程模块静态资源 // 异步加载日程模块静态资源
eventRegister.loadModule('f_workplan', () => { eventRegister.loadModule('f_workplan', ()=> {
this.setState({ weaWorkplanLoaded: true }); this.setState({weaWorkplanLoaded:true});
}, () => { }); }, ()=> {});
} }
componentDidMount() { componentDidMount() {
@ -96,7 +93,7 @@ class Main extends React.Component {
}); });
} }
setParentRightMenu = rightMenu => this.setState({ rightMenu }) setParentRightMenu = rightMenu => this.setState({rightMenu})
getTabChildren() { getTabChildren() {
const { const {
@ -118,20 +115,20 @@ class Main extends React.Component {
if (tabKey === t.key) { if (tabKey === t.key) {
if (t.isIframe) { if (t.isIframe) {
isIframe = true; isIframe = true;
if (t.key == 'iframe-9-workplansearch') { // 日程模块加载方式 if(t.key == 'iframe-9-workplansearch'){ // 日程模块加载方式
const selectedUser = t.url.split('?')[1].split('&')[1].split('=')[1]; const selectedUser = t.url.split('?')[1].split('&')[1].split('=')[1];
this.state.weaWorkplanLoaded && window.weaWorkplan && window.weaWorkplan.com ? 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' } }} /> 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 { }else{
ifame = <iframe className="card-iframe" style={{ height: window.innerHeight - 175 }} src={addContentPath(t.url)}></iframe> ifame = <iframe className="card-iframe" style={{height:window.innerHeight-175}} src={addContentPath(t.url)}></iframe>
} }
} }
} }
}); });
return ( return (
<WeaNewScroll ecId={`${this && this.props && this.props.ecId || ''}_WeaNewScroll@4jxjh8`} className={innerPage ? 'hrm-card-hastop' : 'hrm-card-notop'}> <WeaNewScroll ecId={`${this && this.props && this.props.ecId || ''}_WeaNewScroll@4jxjh8`} className={innerPage?'hrm-card-hastop' : 'hrm-card-notop'}>
{isIframe ? ifame : children} {isIframe ? ifame : children}
</WeaNewScroll> </WeaNewScroll>
); );
@ -164,61 +161,47 @@ class Main extends React.Component {
} }
} }
if (verified) { if (verified) {
if (hasRight) { if(hasRight){
if (verified && isAdmin) { if (verified && isAdmin) {
return ( 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) { if (verified && !isAdmin) {
const avatarProps = { userId }; const avatarProps = {userId};
if (info.requestParams) Object.assign(avatarProps, { requestParams: JSON.parse(info.requestParams) }); if(info.requestParams) Object.assign(avatarProps, {requestParams: JSON.parse(info.requestParams)});
return ( 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} > <WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@uojsrt`} datas={rightMenu} >
<div style={{ height: '100%' }}> <div style={{height:'100%'}}>
<WeaPopoverHrm ecId={`${this && this.props && this.props.ecId || ''}_WeaPopoverHrm@kadp5g`} /> <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' style={{height:"100%",background: '#ffff'}}>
<div className="hrm-my-card-top-wapper" style={{ minHeight: 60 }}> <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"}> !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%' }}> <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 ? 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> <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' }}> <span style={{paddingLeft:10,paddingRight:14, display:'inline-block'}}>
{/* <img className='hrm-my-card-top-title-img' src={info.messagerurl || portraitDefalut} alt="" onClick={showPortraitSetting}/> */} {/* <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}> <span className='hrm-my-card-top-avatar' style={{top: '-2px'}} onClick={showPortraitSetting}>
<WeaAvatar ecId={`${this && this.props && this.props.ecId || ''}_WeaAvatar@m37dbo`} <WeaAvatar ecId={`${this && this.props && this.props.ecId || ''}_WeaAvatar@m37dbo`}
// userId={userId} // userId={userId}
{...avatarProps} {...avatarProps}
ref={result => { ref={result => {
if (updateSuccess && result) { if(updateSuccess && result) {
result.requestParams && result.requestParams(userId); result.requestParams && result.requestParams(userId);
setState({ updateSuccess: false }); setState({updateSuccess: false});
} }
}} }}
/> />
</span> </span>
</span> </span>
} }
<span style={{ display: 'inline-block', verticalAlign: 'top' }} className='hrm-my-card-top-title-info'> <span style={{display:'inline-block',verticalAlign:'top'}} className='hrm-my-card-top-title-info'>
<div style={{ fontSize: 14 }}> <div style={{fontSize:14}}>
<span style={{ paddingRight: 5 }}>{info.lastname} { <span style={{paddingRight:5}}>{info.lastname} {
info.workcode ? 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> <span>({info.workcode.indexOf('desensitization__') > -1 ? <WeaInput ecId={`${this && this.props && this.props.ecId || ''}_WeaInput@m09slu`} value={info.workcode} viewArre={1} /> : info.workcode})</span>
@ -227,15 +210,15 @@ class Main extends React.Component {
null null
}</span> }</span>
{ {
info.sex && <span className={info.sex.value == '1' ? 'icon-coms-women femaleColor' : 'icon-coms-men maleColor'} title={info.sex.name}></span> info.sex && <span className={info.sex.value=='1'?'icon-coms-women femaleColor':'icon-coms-men maleColor'} title={info.sex.name}></span>
} }
</div> </div>
{ {
info.orginfo ? info.orginfo ?
<div className='orgInfo' <div className='orgInfo'
dangerouslySetInnerHTML={{ __html: info.orginfo }} /> dangerouslySetInnerHTML={{__html:info.orginfo}} />
: :
<div className='orgInfo'> <div className = 'orgInfo'>
&nbsp; &nbsp;
</div> </div>
} }
@ -250,18 +233,25 @@ class Main extends React.Component {
dropMenuDatas={hrmCard.topRightMenus && hrmCard.topRightMenus()} dropMenuDatas={hrmCard.topRightMenus && hrmCard.topRightMenus()}
/> />
</div> </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()} {this.getTabChildren()}
</div> </div>
{uploadPortrailAuth && <PortraitSetting ecId={`${this && this.props && this.props.ecId || ''}_PortraitSetting@vck80h`} store={hrmCard} />} {uploadPortrailAuth && <PortraitSetting ecId={`${this && this.props && this.props.ecId || ''}_PortraitSetting@vck80h`} store={hrmCard}/>}
</div> </div>
</WeaRightMenu> </WeaRightMenu>
</WeaLeftRightLayout>
) )
} }
} else { }else{
return (<WeaAlertPage ecId={`${this && this.props && this.props.ecId || ''}_WeaAlertPage@a7bbha`} > return (<WeaAlertPage ecId={`${this && this.props && this.props.ecId || ''}_WeaAlertPage@a7bbha`} >
<div style={{ color: '#000' }}> <div style={{color : '#000'}}>
{i18n.message.authFailed()} {i18n.message.authFailed()}
</div> </div>
</WeaAlertPage> </WeaAlertPage>
@ -275,7 +265,7 @@ class Main extends React.Component {
const { const {
hrmCard hrmCard
} = this.props; } = this.props;
this.setState({ rightMenu: [] }) this.setState({rightMenu: []})
hrmCard.setTopButtons(null); hrmCard.setTopButtons(null);
hrmCard.setTopRightMenus(null); hrmCard.setTopRightMenus(null);
hrmCard.setTopShowDropIcon(false); hrmCard.setTopShowDropIcon(false);

View File

@ -8,8 +8,8 @@ export default class Content extends Component{
render(){ render(){
return ( return (
<div className='content'> <div className='content'>
<Form ecId={`${this && this.props && this.props.ecId || ''}_Form@0pwmop`} store={this.props.store} /> <Form store={this.props.store} />
<TableData ecId={`${this && this.props && this.props.ecId || ''}_TableData@nk0k0h`} store={this.props.store} /> <TableData store={this.props.store} />
</div> </div>
) )
} }

View File

@ -21,8 +21,8 @@ export default class Form extends Component{
} }
items.push({ items.push({
com: ( com: (
<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@2xkutm@${j}`} {...itemProps}> <WeaFormItem {...itemProps}>
<WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@mf5372@${j}`} fieldConfig={field} form={form} /> <WeaSwitch fieldConfig={field} form={form} />
</WeaFormItem> </WeaFormItem>
), ),
col col
@ -39,7 +39,7 @@ export default class Form extends Component{
groupArr.push( groupArr.push(
( (
<WeaSearchGroup ecId={`${this && this.props && this.props.ecId || ''}_WeaSearchGroup@pr042o`} {...groupProps} /> <WeaSearchGroup {...groupProps} />
) )
); );
}); });

View File

@ -10,8 +10,8 @@ export default class TableData extends Component{
return ( return (
<div className='table_container' style={{display: edit ? 'none' : 'block'}}> <div className='table_container' style={{display: edit ? 'none' : 'block'}}>
<WeaTab ecId={`${this && this.props && this.props.ecId || ''}_WeaTab@qsg8zk`} {...tabProps} /> <WeaTab {...tabProps} />
<WeaTable ecId={`${this && this.props && this.props.ecId || ''}_WeaTable@64ul9f`} {...tableProps}/> <WeaTable {...tableProps}/>
</div> </div>
) )
} }

View File

@ -30,15 +30,15 @@ export default class Finance extends Component{
let com; let com;
if(fromcard){ if(fromcard){
com = ( com = (
<WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@pxe5hg`} datas={topProps.dropMenuDatas}> <WeaRightMenu datas={topProps.dropMenuDatas}>
<Content ecId={`${this && this.props && this.props.ecId || ''}_Content@pzgnr9`} store={store} /> <Content store={store} />
</WeaRightMenu> </WeaRightMenu>
) )
}else{ }else{
com = ( com = (
<WeaTop ecId={`${this && this.props && this.props.ecId || ''}_WeaTop@tog55a`} {...topProps}> <WeaTop {...topProps}>
<WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@fcxnug`} datas={topProps.dropMenuDatas}> <WeaRightMenu datas={topProps.dropMenuDatas}>
<Content ecId={`${this && this.props && this.props.ecId || ''}_Content@j7qze4`} store={store} /> <Content store={store} />
</WeaRightMenu> </WeaRightMenu>
</WeaTop> </WeaTop>
) )
@ -46,7 +46,7 @@ export default class Finance extends Component{
return ( return (
<div className='hrm_finance'> <div className='hrm_finance'>
<Authority ecId={`${this && this.props && this.props.ecId || ''}_Authority@lulowc`} store={store}> <Authority store={store}>
{com} {com}
</Authority> </Authority>
</div> </div>

View File

@ -24,7 +24,8 @@ export default class Detailed extends Component {
onChange = (params) => { onChange = (params) => {
const {newOutSide} = this.props; const {newOutSide} = this.props;
const {getData} = newOutSide; 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); getData(params);
} }
} }

View File

@ -40,7 +40,7 @@ class BarChart extends React.Component {
} }
if (this.props.option !== nextProps.option) { 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); this.setBarWidth(nextProps);
} }
} }
@ -79,20 +79,8 @@ class BarChart extends React.Component {
} }
let s = (h - (b + t)) / l; let s = (h - (b + t)) / l;
if (nextProps.option[0].series) {
nextProps.option[0].series[0].barWidth = s * 0.9; 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].barWidth = s * 0.9;
nextProps.option[1].series[0].label = {
normal:{
color: "#333",
position: "top",
show: true
}
}
}
this.setState({ this.setState({
optionL: nextProps.option[0], optionL: nextProps.option[0],
@ -241,13 +229,14 @@ class BarChart extends React.Component {
</Row> </Row>
<Row ecId={`${this && this.props && this.props.ecId || ''}_Row@wzibn3`}> <Row ecId={`${this && this.props && this.props.ecId || ''}_Row@wzibn3`}>
<Col ecId={`${this && this.props && this.props.ecId || ''}_Col@nr376a`}> <Col ecId={`${this && this.props && this.props.ecId || ''}_Col@nr376a`}>
<div style={{height: 340}}> {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')}/> <WeaEchart ecId={`${this && this.props && this.props.ecId || ''}_WeaEchart@wec1sj`} ref="echart1" option={optionL} useDefault={false} chartAction={ (chart) => this.chartAction(chart, 'left')}/>
</div> </div>
{!Object.keys(optionL).length && <div style={{position: 'absolute', top: 100, left: '50%', marginLeft: -24, textAlign: 'center'}}> : <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: 50}}><i className='icon-coms-blank'></i></div>
<div style={{fontSize: 15, color:'#B2B2B2'}}>{i18n.message.dataNone()}</div> <div style={{fontSize: 15, color:'#B2B2B2'}}>{i18n.message.dataNone()}</div>
</div>} </div>
}
</Col> </Col>
</Row> </Row>
</div> </div>
@ -266,10 +255,10 @@ class BarChart extends React.Component {
</Row> </Row>
<Row ecId={`${this && this.props && this.props.ecId || ''}_Row@btr5lt`}> <Row ecId={`${this && this.props && this.props.ecId || ''}_Row@btr5lt`}>
<Col ecId={`${this && this.props && this.props.ecId || ''}_Col@i6xciu`}> <Col ecId={`${this && this.props && this.props.ecId || ''}_Col@i6xciu`}>
<div style={{height: 340}}> {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')}/> <WeaEchart ecId={`${this && this.props && this.props.ecId || ''}_WeaEchart@vljy8j`} ref="echart2" option={optionR} useDefault={false} chartAction={ (chart) => this.chartAction(chart, 'right')}/>
</div> </div>
{!Object.keys(optionR).length && <div style={{position: 'absolute', top: 100, left: '50%', marginLeft: -24, textAlign: 'center'}}> : <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: 50}}><i className='icon-coms-blank'></i></div>
<div style={{fontSize: 15, color:'#B2B2B2'}}>{i18n.message.dataNone()}</div> <div style={{fontSize: 15, color:'#B2B2B2'}}>{i18n.message.dataNone()}</div>
</div>} </div>}

View File

@ -91,7 +91,6 @@ class ChangeRelatedReport extends React.Component {
hrmChangeReport.pathToTitle(); hrmChangeReport.pathToTitle();
hrmChangeReport.getCurWindowWidth(); hrmChangeReport.getCurWindowWidth();
hrmChangeReport.setColIdUnusualStatus(); hrmChangeReport.setColIdUnusualStatus();
hrmChangeReport.optionReset();
} }
init() { init() {

View File

@ -26,7 +26,7 @@ import {
} from 'ecCom'; } from 'ecCom';
import ImportResult from './ImportResult' import ImportResult from './ImportResult'
import ImportHistory from './ImportHistory' import ImportHistory from './ImportHistory'
import {addContentPath} from '../../../../util/index.js' import {addContentPath} from '../../util/index.js'
const getLabel = WeaLocaleProvider.getLabel; const getLabel = WeaLocaleProvider.getLabel;
@observer @observer

View File

@ -62,7 +62,6 @@ export class HrmAdd {
@observable searchsValue = "";//存储快捷搜索的值 @observable searchsValue = "";//存储快捷搜索的值
showFormFields = []; showFormFields = [];
@observable dialogDefShow = '';//默认弹窗控制变量 @observable dialogDefShow = '';//默认弹窗控制变量
@observable isUsedAsSingle = false;
@action setSearchsValue = (v) => { @action setSearchsValue = (v) => {
this.searchsValue = v; this.searchsValue = v;
@ -574,17 +573,7 @@ export class HrmAdd {
'type': 'simple' '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(); this.update();
}
} else { } else {
message.warning(data.message); message.warning(data.message);
callback && callback(); callback && callback();

View File

@ -325,7 +325,6 @@ export class HrmChangeReport {
if (!this.dpId && !this.yearmonth && !this.contractTypeId && this.isEmptyObject(adSearchParams) && !this.singleSearchCondition) { if (!this.dpId && !this.yearmonth && !this.contractTypeId && this.isEmptyObject(adSearchParams) && !this.singleSearchCondition) {
p = { p = {
cmd: cmd, cmd: cmd,
yearmonth:this.deptDatas,
...this.params ...this.params
}; };
} }

View File

@ -166,10 +166,10 @@ export class HrmSecondaryVerify {
const key = secondaryPwd1 ? 'secondaryPwd1' : 'newSecondaryPwd1'; const key = secondaryPwd1 ? 'secondaryPwd1' : 'newSecondaryPwd1';
form.validateForm().then(f => { form.validateForm().then(f => {
if (f.isValid) { if (f.isValid) {
// if (newSecondaryPwd1 && !isOldPwdPass) { if (newSecondaryPwd1 && !isOldPwdPass) {
// form.showError('oldSecondaryPwd', getLabel('504374', "旧密码校验不通过!")); form.showError('oldSecondaryPwd', getLabel('504374', "旧密码校验不通过!"));
// return; return;
// } }
if (isEqualToLoginPass) { if (isEqualToLoginPass) {
form.showError(key, getLabel('504375', "二次验证密码不能和登录密码相同")); form.showError(key, getLabel('504375', "二次验证密码不能和登录密码相同"));

View File

@ -772,7 +772,7 @@ class HrmSpaGroup {
isSingle: false, isSingle: false,
onChange: datas => { onChange: datas => {
this.memberIds = datas; this.memberIds = datas;
datas && this.saveDialogForm(); this.saveDialogForm();
} }
} }
} }

View File

@ -73,7 +73,7 @@ export class HrmSystemCard {
this.getSearchCondition(); this.getSearchCondition();
this.getTableInfo('1'); this.getTableInfo('1');
}else{ }else{
// document.title = i18n.label.resourceCard() document.title = i18n.label.resourceCard()
} }
}); });
} }
@ -128,7 +128,7 @@ export class HrmSystemCard {
this.hrmName = data.hrmName; this.hrmName = data.hrmName;
// this.form1 = new WeaForm(); // this.form1 = new WeaForm();
// this.form1.initFormFields(data.condition); // this.form1.initFormFields(data.condition);
// document.title = i18n.label.resourceCard() + '-' + data.hrmName; document.title = i18n.label.resourceCard() + '-' + data.hrmName;
}); });
} }

View File

@ -83,11 +83,3 @@
} }
} }
} }
.hrm-addsimple-single{
height: 100%;
& > div:first-child{
height: calc(~"100% - 61px");
overflow: auto;
}
}

View File

@ -134,9 +134,28 @@ const loginSync = (params) => {
} }
} }
queryParams = toJS(queryParams) || {} ; queryParams = toJS(queryParams);
if(queryParams && queryParams.appid && queryParams.service){
const {appid,service} = queryParams ; 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 const {plugin} = params
@ -200,8 +219,6 @@ const loginSync = (params) => {
logintype: logintype, logintype: logintype,
messages: messages, messages: messages,
isie: isIE9, isie: isIE9,
appid:appid,
service:service,
...plugin ...plugin
}).then((result) => { }).then((result) => {
if ('access_token' in result && typeof result.access_token === 'string' && result.access_token !== '') { if ('access_token' in result && typeof result.access_token === 'string' && result.access_token !== '') {
@ -214,22 +231,11 @@ const loginSync = (params) => {
userpassword = result.user_token; userpassword = result.user_token;
} }
const onSuccess = () => {
if(success && typeof success == 'function'){
success(loginid, userpassword, result);
}
}
if (result.loginstatus == 'true') { if (result.loginstatus == 'true') {
const {isRemoveSession} = result ; if (success && typeof success == 'function') {
if(isRemoveSession == '1'){
onSuccess() ;
return ;
}else if (success && typeof success == 'function') {
message.destroy(); message.destroy();
if(logintype==2){ if(logintype==2){
checkWeakPassword(()=>onSuccess()); checkWeakPassword(()=>success(loginid, userpassword, result));
}else{ }else{
WeaTools.callApi('/api/hrm/login/remindLogin', 'POST', {logintype: logintype}).then((result) => { WeaTools.callApi('/api/hrm/login/remindLogin', 'POST', {logintype: logintype}).then((result) => {
if (result.status == '1') { if (result.status == '1') {
@ -263,11 +269,11 @@ const loginSync = (params) => {
return; return;
}, },
onCancel() { onCancel() {
checkWeakPassword(()=>onSuccess()); checkWeakPassword(()=>success(loginid, userpassword, result));
}, },
}); });
} else { } else {
checkWeakPassword(()=>onSuccess()); checkWeakPassword(()=>success(loginid, userpassword, result));
} }
} else { } else {
confirm({ confirm({
@ -286,7 +292,7 @@ const loginSync = (params) => {
}); });
} }
} else { } else {
checkWeakPassword(()=>onSuccess()); checkWeakPassword(()=>success(loginid, userpassword, result));
} }
} }
} }

View File

@ -1000,8 +1000,6 @@ class main extends React.Component {
return content; return content;
}; };
let e9headerHeight = $(".e9header-right").height() || 80;
let coms = [ let coms = [
<div style={query.fromcard ? { display: "none" } : { display: "" }}> <div style={query.fromcard ? { display: "none" } : { display: "" }}>
<WeaTop ecId={`${this && this.props && this.props.ecId || ''}_WeaTop@8mum9v@1`} <WeaTop ecId={`${this && this.props && this.props.ecId || ''}_WeaTop@8mum9v@1`}
@ -1187,7 +1185,7 @@ class main extends React.Component {
)} )}
</div> </div>
<WeaNewScroll ecId={`${this && this.props && this.props.ecId || ''}_WeaNewScroll@873va8@scroll`} <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" className="bt"
> >
{!hasRight && ( {!hasRight && (

View File

@ -10,7 +10,6 @@ import {
} from 'ecCom'; } from 'ecCom';
@inject('commonStore') @inject('commonStore')
@inject('hrmOriginalPunchRecord')
@observer @observer
export default class RadioGroup extends React.Component { export default class RadioGroup extends React.Component {
constructor(props) { constructor(props) {
@ -34,7 +33,7 @@ export default class RadioGroup extends React.Component {
} = radioGroup; } = radioGroup;
return ( 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)}/>
) )
} }
} }

View File

@ -51,9 +51,8 @@ export default class CalendarComs extends Component{
const d = date.getDayOfMonth(); const d = date.getDayOfMonth();
const select = moment(date.time); const select = moment(date.time);
calendarData = toJS(calendarData); calendarData = toJS(calendarData);
let formatDate = `${date.getYear()}-${(date.getMonth()+1+'').padLeft(2,0)}-${ (date.getDayOfMonth()+'').padLeft(2,0)}` let data = calendarData[select.format('YYYY-MM-DD')];
let data = calendarData[formatDate]; let holiday = holidayData[select.format('YYYY-MM-DD')];
let holiday = holidayData[formatDate];
let content = ( let content = (
<span> <span>
{holiday && <span className="tip" style={{color: holiday.isWorkday ? '#FF1B10' : '#1B9B12'}}>{holiday.tip}</span>} {holiday && <span className="tip" style={{color: holiday.isWorkday ? '#FF1B10' : '#1B9B12'}}>{holiday.tip}</span>}

View File

@ -108,7 +108,7 @@ class Table extends React.Component {
} = table; } = table;
const { const {
// height: rgHeight height: rgHeight
} = radioGroup; } = radioGroup;
const { const {
@ -121,8 +121,6 @@ class Table extends React.Component {
leftMenuBarWidth, leftMenuBarWidth,
} = this.state; } = this.state;
const rgHeight = jquery(".wea-radio-group").height();
//滚动区域的宽度 公式:窗口宽度 - (左侧菜单栏宽度 + GAP ) //滚动区域的宽度 公式:窗口宽度 - (左侧菜单栏宽度 + GAP )
const PADDINGLEFT = 20; const PADDINGLEFT = 20;
const scrollWidth = browserWidth - (leftMenuBarWidth + 2 * PADDINGLEFT); const scrollWidth = browserWidth - (leftMenuBarWidth + 2 * PADDINGLEFT);

View File

@ -374,7 +374,6 @@ export class HrmAttendanceDailyReport extends HrmBaseStore {
} }
break; break;
} }
this.showHasNotAccount = ((['4', '5', '6', '7', '9'].indexOf(params.status || '')) > -1);
this.getKQReport(this.getQueryParams(1)); this.getKQReport(this.getQueryParams(1));
} }

View File

@ -399,7 +399,6 @@ class HrmAttendanceMonthReport4Template extends HrmBaseStore {
displaySetting = {} displaySetting = {}
rangeConditions = []; rangeConditions = [];
custConditions = [];
rangeKeys = {} rangeKeys = {}
@computed get radioGroupConfig(){ @computed get radioGroupConfig(){
@ -447,16 +446,15 @@ class HrmAttendanceMonthReport4Template extends HrmBaseStore {
@action getCondition = async () => { @action getCondition = async () => {
const data = await api.getSearchCondition(); const data = await api.getSearchCondition();
if(data.status == '1'){ if(data.status == '1'){
const {conditions = [], cusCondition = [], showColumns: cascader} = data; const {conditions, showColumns: cascader} = data;
let arr = [...conditions, ...cusCondition];
this.cascader = cascader; this.cascader = cascader;
this.rangeKeys = {}; this.rangeKeys = {};
this.rangeConditions = arr.map(condition => { this.rangeConditions = conditions.map(condition => {
const {domkey} = condition; const {domkey} = condition;
Object.assign(this.rangeKeys, {[domkey]: []}) Object.assign(this.rangeKeys, {[domkey]: []})
let options = condition.options; let options = condition.options;
let selectLinkageDatas = condition.selectLinkageDatas; let selectLinkageDatas = condition.selectLinkageDatas;
selectLinkageDatas && Object.keys(selectLinkageDatas).map(k => { Object.keys(selectLinkageDatas).map(k => {
const {conditionType, domkey: linkdomkey} = selectLinkageDatas[k]; const {conditionType, domkey: linkdomkey} = selectLinkageDatas[k];
this.rangeKeys[domkey].push(...linkdomkey); this.rangeKeys[domkey].push(...linkdomkey);
if(conditionType == 'BROWSER'){ if(conditionType == 'BROWSER'){
@ -645,7 +643,7 @@ class HrmAttendanceMonthReport4Template extends HrmBaseStore {
} }
break; break;
} }
this.showHasNotAccount = ((['4', '5', '6', '7', '9'].indexOf(params.status || '')) > -1);
this.getKQReport(this.getQueryParams()); this.getKQReport(this.getQueryParams());
}catch(e){ }catch(e){

View File

@ -36,11 +36,6 @@ class HrmOriginalPunchRecord {
//*************头部************** //*************头部**************
@observable isNoAccountShow = false; @observable isNoAccountShow = false;
@action onRadioGroupChangeHandle = (params) => {
this.isNoAccountShow = ((['4', '5', '6', '7', '9'].indexOf(params.status || '')) > -1);
commonStore.exportActiveParams(params);
}
@action clickIcon = (bool) => { @action clickIcon = (bool) => {
this.isNoAccountShow = bool; this.isNoAccountShow = bool;

View File

@ -61,7 +61,6 @@ export class HrmShift {
@action changeDateTabHandler = (key) => { @action changeDateTabHandler = (key) => {
this.dateTabkey = key; this.dateTabkey = key;
this.getData();
} }
@action changeDateHandler = (v) => { @action changeDateHandler = (v) => {

View File

@ -280,7 +280,6 @@ class HrmVacationBalanceReportCopy {
} }
@action exportActiveParams = (params) => { @action exportActiveParams = (params) => {
this.isNoAccountShow = ((['4', '5', '6', '7', '9'].indexOf(params.status || '')) > -1);
this.radioGroup.activeParams = params; this.radioGroup.activeParams = params;
this.chainCall(); this.chainCall();

View File

@ -500,7 +500,7 @@ export const getIconColor = type => {
let res = {}; let res = {};
if (type == 'ALL') { if (type == 'ALL') {
res.color = '#2DB7F5'; res.color = '#2DB7F5';
res.name = getLabel(82857, '全部'); res.name = (window.e9_locale.userLanguage == "8") ? "All type" : getLabel(82857, '全部');
res.icon = 'icon-Human-resources-all'; res.icon = 'icon-Human-resources-all';
} }
if (type == 'NORMAL') { if (type == 'NORMAL') {
@ -522,31 +522,31 @@ export const getIconColor = type => {
} }
if (type == 'ABSENT') { if (type == 'ABSENT') {
res.color = '#FC4B6C'; res.color = '#FC4B6C';
res.name = getLabel('20085', "旷工"); res.name = (window.e9_locale.userLanguage == "8") ? "Truancy" : getLabel('20085', "旷工");
res.bcolor = '#FFE6EB'; res.bcolor = '#FFE6EB';
res.icon = 'icon-Human-resources-Absenteeism'; res.icon = 'icon-Human-resources-Absenteeism';
} }
if (type == 'NOSIGN') { if (type == 'NOSIGN') {
res.color = '#BD10E0'; res.color = '#BD10E0';
res.name = getLabel('20086', "漏签"); res.name = (window.e9_locale.userLanguage == "8") ? "Forget" :getLabel('20086', "漏签");
res.bcolor = '#FAECFD'; res.bcolor = '#FAECFD';
res.icon = 'icon-Human-resources-check'; res.icon = 'icon-Human-resources-check';
} }
if (type == 'LEAVE') { if (type == 'LEAVE') {
res.color = '#2DB7F5'; res.color = '#2DB7F5';
res.name = getLabel('670', "请假"); res.name = (window.e9_locale.userLanguage == "8") ? "Leave" : getLabel('670', "请假");
res.bcolor = '#EFFAFF'; res.bcolor = '#EFFAFF';
res.icon = 'icon-Human-resources-leave'; res.icon = 'icon-Human-resources-leave';
} }
if (type == 'EVECTION') { if (type == 'EVECTION') {
res.color = '#30BE3A'; res.color = '#30BE3A';
res.name = getLabel('20084', "出差"); res.name = (window.e9_locale.userLanguage == "8") ? "Business Trip" :getLabel('20084', "出差");
res.bcolor = '#EFFAF0'; res.bcolor = '#EFFAF0';
res.icon = 'icon-Human-resources-business-travel'; res.icon = 'icon-Human-resources-business-travel';
} }
if (type == 'OUTDAYS') { if (type == 'OUTDAYS') {
res.color = '#4F8CFF'; res.color = '#4F8CFF';
res.name = getLabel('24058', "公出"); res.name =(window.e9_locale.userLanguage == "8") ? "Business Out" : getLabel('24058', "公出");
res.bcolor = '#DFEBFF'; res.bcolor = '#DFEBFF';
res.icon = 'icon-Human-resources-work'; res.icon = 'icon-Human-resources-work';
} }

View File

@ -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

30
pc4public/portal/_rc/.gitignore vendored Normal file
View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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.

View File

@ -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
![alt](https://tfsimg.alipay.com/images/T19vReXg0oXXXXXXXX.png)
## 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
[![rc-menu](https://nodei.co/npm/rc-menu.png)](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.

View File

@ -0,0 +1 @@
module.exports = require('./src/');

View File

@ -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"
]
}

View File

@ -12,8 +12,8 @@ class SettingButton extends React.Component {
render() { render() {
return ( return (
<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@fcu65c`} label={this.props.label} labelCol={{ span: 10 }} wrapperCol={{ span: 14 }}> <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"> <div className="wea-custom-setting-btn" onClick={this.props.onSetting}>
<i className="icon-coms-Flow-setting" onClick={this.props.onSetting}/> <i className="icon-coms-Flow-setting" />
</div> </div>
</WeaFormItem> </WeaFormItem>
); );

View File

@ -1,10 +1,9 @@
.wea-custom-setting-btn { .wea-custom-setting-btn {
color: #b2b2b2; color: #b2b2b2;
font-size: 16px; font-size: 16px;
}
.wea-custom-setting-btn i{
cursor: pointer; cursor: pointer;
} }
.wea-custom-setting-btn i:hover {
.wea-custom-setting-btn:hover {
color: #2db7f5; color: #2db7f5;
} }