Merge pull request 'feature/cl' (#40) from feature/cl into dev

Reviewed-on: http://221.226.25.34:3000/liang.cheng/trunk/pulls/40
This commit is contained in:
liang.cheng 2023-08-02 17:16:37 +08:00
commit c7425736df
27 changed files with 249 additions and 79 deletions

View File

@ -311,8 +311,7 @@ export default class CompanyExtend extends React.Component {
onAnimationEnd={() => console.log('onAnimationEnd')} />
</div>
)
}
catch (e) {
} catch (e) {
return <WeaAlertPage ecId={`${this && this.props && this.props.ecId || ''}_WeaAlertPage@h1wgnu`}>
<div style={{ color: '#000' }}>{i18n.message.authFailed()}</div>
</WeaAlertPage>

View File

@ -355,16 +355,24 @@ export default class Company extends React.Component {
const menu = (
<Menu>
<Menu.Item key="1" disabled={record.isUsed === 0 ? false : true} style={record.isUsed === 0 ?{display:'block'} :{display:'none'}}>
<a href='javascript:void(0);' onClick={() => { _this.doDel(record.id) }}>删除</a>
<a href='javascript:void(0);' onClick={() => {
_this.doDel(record.id)
}}>删除</a>
</Menu.Item>
<Menu.Item key="2">
<a href='javascript:void(0);' onClick={() => { _this.select(record.id) }}>联查部门</a>
<a href='javascript:void(0);' onClick={() => {
_this.select(record.id)
}}>联查部门</a>
</Menu.Item>
<Menu.Item key="3">
<a href='javascript:void(0);' onClick={() => { _this.view(record.id) }}>查看</a>
<a href='javascript:void(0);' onClick={() => {
_this.view(record.id)
}}>查看</a>
</Menu.Item>
<Menu.Item key="4">
<a href='javascript:void(0);' onClick={() => { _this.transfer(record.id) }}>转移</a>
<a href='javascript:void(0);' onClick={() => {
_this.transfer(record.id)
}}>转移</a>
</Menu.Item>
{/* <Menu.Item key="5">
<a href='javascript:void(0);' onClick={() => { _this.version(record) }}>另存为版本</a>
@ -435,7 +443,9 @@ export default class Company extends React.Component {
} = company;
const btn = [
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@bx87i8`} type="primary" onClick={() => { company.setCurrent(1); company.setPageSize(10); company.getTableInfo(); company.setPanelStatus(false) }}>{i18n.button.search()}</Button>),
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@bx87i8`} type="primary" onClick={() => {
company.setCurrent(1); company.setPageSize(10); company.getTableInfo(); company.setPanelStatus(false)
}}>{i18n.button.search()}</Button>),
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@218ju6`} onClick={() => form.reset()}>{i18n.button.reset()}</Button>),
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@5u9mfz`} onClick={() => company.setPanelStatus(false)}>{i18n.button.cancel()}</Button>),
];

View File

@ -97,8 +97,12 @@ export default class NewPopconfirm extends React.Component {
} = this.props
const a = form.getFormParams();
const buttons = [
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@jd6baw`} type="primary" onClick={() => {save();this.setState({value:form.getFormParams().moveType})}} disabled={loading}>{i18n.button.ok()}</Button>),
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@jd6baw`} type="primary" onClick={() => {this.setState({value:form.getFormParams().moveType});onCancel()}} disabled={loading}>{i18n.button.cancel()}</Button>)
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@jd6baw`} type="primary" onClick={() => {
save();this.setState({value:form.getFormParams().moveType})
}} disabled={loading}>{i18n.button.ok()}</Button>),
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@jd6baw`} type="primary" onClick={() => {
this.setState({value:form.getFormParams().moveType});onCancel()
}} disabled={loading}>{i18n.button.cancel()}</Button>)
];
return (
@ -109,7 +113,9 @@ export default class NewPopconfirm extends React.Component {
visible={visible}
closable={true}
hasScroll={true}
onCancel={() => {this.setState({value:"0"});onCancel()}}
onCancel={() => {
this.setState({value:"0"});onCancel()
}}
buttons={buttons}
style={{ width: width, height: height }}
>

View File

@ -384,22 +384,34 @@ export default class Department extends React.Component {
const menu = (
<Menu>
<Menu.Item key="0">
<a href='javascript:void(0);' onClick={() => { _this.view(record.id) }}>查看</a>
<a href='javascript:void(0);' onClick={() => {
_this.view(record.id)
}}>查看</a>
</Menu.Item>
<Menu.Item key="1" disabled={record.isUsed === 0 ? false : true} style={record.isUsed === 0 ? { display: 'block' } : { display: 'none' }}>
<a href='javascript:void(0);' onClick={() => { _this.doDel(record.id) }}>删除</a>
<a href='javascript:void(0);' onClick={() => {
_this.doDel(record.id)
}}>删除</a>
</Menu.Item>
<Menu.Item key="2">
<a href='javascript:void(0);' onClick={() => { _this.merge(record.id) }}>合并</a>
<a href='javascript:void(0);' onClick={() => {
_this.merge(record.id)
}}>合并</a>
</Menu.Item>
<Menu.Item key="3">
<a href='javascript:void(0);' onClick={() => { _this.transfer(record.id) }}>转移</a>
<a href='javascript:void(0);' onClick={() => {
_this.transfer(record.id)
}}>转移</a>
</Menu.Item>
<Menu.Item key="4">
<a href='javascript:void(0);' onClick={() => { _this.select(record.id) }}>联查岗位</a>
<a href='javascript:void(0);' onClick={() => {
_this.select(record.id)
}}>联查岗位</a>
</Menu.Item>
<Menu.Item key="5">
<a href='javascript:void(0);' onClick={() => { _this.copy(record.id) }}>复制</a>
<a href='javascript:void(0);' onClick={() => {
_this.copy(record.id)
}}>复制</a>
</Menu.Item>
{/* <Menu.Item key="6">
<a href='javascript:void(0);' onClick={() => { _this.version(record) }}>另存为版本</a>
@ -459,7 +471,9 @@ export default class Department extends React.Component {
} = department;
const btn = [
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@bx87i8`} type="primary" onClick={() => { department.setCurrent(1); department.setPageSize(10); department.getTableInfo(); department.setPanelStatus(false) }}>{i18n.button.search()}</Button>),
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@bx87i8`} type="primary" onClick={() => {
department.setCurrent(1); department.setPageSize(10); department.getTableInfo(); department.setPanelStatus(false)
}}>{i18n.button.search()}</Button>),
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@218ju6`} onClick={() => form.reset()}>{i18n.button.reset()}</Button>),
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@5u9mfz`} onClick={() => department.setPanelStatus(false)}>{i18n.button.cancel()}</Button>),
];

View File

@ -199,7 +199,9 @@ export default class ManagerDetach extends React.Component {
} = managerDetach;
const btn = [
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@bx87i8`} type="primary" onClick={() => { managerDetach.getTableInfo(); managerDetach.setPanelStatus(false) }}>{i18n.button.search()}</Button>),
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@bx87i8`} type="primary" onClick={() => {
managerDetach.getTableInfo(); managerDetach.setPanelStatus(false)
}}>{i18n.button.search()}</Button>),
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@218ju6`} onClick={() => form2.reset()}>{i18n.button.reset()}</Button>),
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@5u9mfz`} onClick={() => managerDetach.setPanelStatus(false)}>{i18n.button.cancel()}</Button>),
];

View File

@ -64,8 +64,8 @@ export default class FieldDef extends Component {
isJobTreeNode
} = store;
const classes = classnames({
['tabPane']: true,
['tabPane-include']: resetClass
'tabPane': true,
'tabPane-include': resetClass
})
const {
groupInfoFrom,
@ -105,7 +105,9 @@ export default class FieldDef extends Component {
}
const rMenu = [...rightMenu, ...store.getBasicMenus(this.props.logSmallType, this.props.targetId)]
return (
<div className={classes} ref={dom => { this.tabDom = dom }}>
<div className={classes} ref={dom => {
this.tabDom = dom
}}>
<WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@43qdk8`} datas={rMenu}>
<WeaTableEdit ecId={`${this && this.props && this.props.ecId || ''}_WeaTableEdit@5fu5eh`} tableProps={tableProps} viewAttr={3} rowKey={'fieldidrowKey'}
ref={(editTable) => setEditTable(editTable, 'fieldDef')}

View File

@ -64,7 +64,9 @@ export default class FormInfo extends Component {
const showCheckbox = field.checkbox || false;
let label = field.label;
if (showCheckbox)
label = <WeaCheckbox ecId={`${this && this.props && this.props.ecId || ''}_WeaCheckbox@1id63c@${index}`} content={label} value={field.checkboxValue} onChange={(v) => {field.checkboxValue = v === '1'; onSelectedChangeHandle && onSelectedChangeHandle(field, v)}}/>
label = <WeaCheckbox ecId={`${this && this.props && this.props.ecId || ''}_WeaCheckbox@1id63c@${index}`} content={label} value={field.checkboxValue} onChange={(v) => {
field.checkboxValue = v === '1'; onSelectedChangeHandle && onSelectedChangeHandle(field, v)
}}/>
let coms;
if (customerRender == null) {

View File

@ -146,7 +146,9 @@ export default class DatasImport extends React.Component {
} else if (domkey[0] === 'exportData') {
const href = datasImport.operateType === 'add' ? field.otherParams.fileVal[0].add : field.otherParams.fileVal[0].update;
if (datasImport.importType === 'matrix') {
dom = <a onClick={() => { getTemplateUrl(datasImport.otherParams.matrixid, datasImport.operateType, importParams) }}>{i18n.label.importTemplate()}</a>
dom = <a onClick={() => {
getTemplateUrl(datasImport.otherParams.matrixid, datasImport.operateType, importParams)
}}>{i18n.label.importTemplate()}</a>
} else
dom = <a href={addContentPath(href)}>{i18n.label.importTemplate()}</a>;
} else if (domkey[0] == 'excelfile' || domkey[0] == 'importfile') {
@ -179,14 +181,18 @@ export default class DatasImport extends React.Component {
style={{ width: 200 }}
options={field.options}
value={datasImport.importParams[domkey[0]] || field.value || val}
onChange={(v) => { datasImport.setParam(domkey[0], v) }}
onChange={(v) => {
datasImport.setParam(domkey[0], v)
}}
/>
} else if (domkey[0] == 'importType') {
dom = <WeaSelect ecId={`${this && this.props && this.props.ecId || ''}_WeaSelect@holhhb`}
style={{ width: 200 }}
options={field.options}
value={datasImport.operateType}
onChange={(v) => { datasImport.operateType = v }}
onChange={(v) => {
datasImport.operateType = v
}}
/>
} else {
dom = <WeaInput ecId={`${this && this.props && this.props.ecId || ''}_WeaInput@rg6f3p`} hasBorder={true} viewAttr={1} value={field.value} />
@ -209,13 +215,17 @@ export default class DatasImport extends React.Component {
const href = datasImport.operateType === 'add' ? url.add : url.update;
let dom;
if (datasImport.importType === 'matrix') {
dom = <a onClick={() => { getTemplateUrl(datasImport.otherParams.matrixid, datasImport.operateType, importParams) }}>{i18n.label.importTemplate()}</a>
dom = <a onClick={() => {
getTemplateUrl(datasImport.otherParams.matrixid, datasImport.operateType, importParams)
}}>{i18n.label.importTemplate()}</a>
} else
dom = <a href={addContentPath(href)}>{i18n.label.importTemplate()}</a>;
p = (<p>{i18n.label.downLoadTemplete()}{dom}</p>);
} else if (url != null) {
if (datasImport.importType === 'matrix') {
p = (<p>{i18n.label.downLoadTemplete()}<a onClick={() => { getTemplateUrl(datasImport.otherParams.matrixid, datasImport.operateType) }}>{i18n.label.importTemplate()}</a></p>);
p = (<p>{i18n.label.downLoadTemplete()}<a onClick={() => {
getTemplateUrl(datasImport.otherParams.matrixid, datasImport.operateType)
}}>{i18n.label.importTemplate()}</a></p>);
} else
p = (<p>{i18n.label.downLoadTemplete()}<a href={addContentPath(url)}>{i18n.label.importTemplate()}</a></p>);
} else {

View File

@ -147,7 +147,9 @@ export default class ImportResource extends React.Component {
} else if (domkey[0] === 'exportData') {
const href = hrmImportResource.operateType === 'add' ? field.otherParams.fileVal[0].add : field.otherParams.fileVal[0].update;
if(hrmImportResource.importType === 'matrix'){
dom = <a onClick={() => {getTemplateUrl(hrmImportResource.otherParams.matrixid, hrmImportResource.operateType, importParams)}}>{i18n.label.importTemplate()}</a>
dom = <a onClick={() => {
getTemplateUrl(hrmImportResource.otherParams.matrixid, hrmImportResource.operateType, importParams)
}}>{i18n.label.importTemplate()}</a>
}else
dom = <a href={addContentPath(href)}>{i18n.label.importTemplate()}</a>;
} else if (domkey[0] == 'excelfile' || domkey[0] == 'importfile') {
@ -180,14 +182,18 @@ export default class ImportResource extends React.Component {
style={{width: 200}}
options={field.options}
value={hrmImportResource.importParams[domkey[0]] || field.value || val}
onChange={(v) => { hrmImportResource.setParam(domkey[0], v)}}
onChange={(v) => {
hrmImportResource.setParam(domkey[0], v)
}}
/>
} else if (domkey[0] == 'importType') {
dom = <WeaSelect ecId={`${this && this.props && this.props.ecId || ''}_WeaSelect@holhhb`}
style={{width: 200}}
options={field.options}
value={hrmImportResource.operateType}
onChange={(v) => { hrmImportResource.operateType = v }}
onChange={(v) => {
hrmImportResource.operateType = v
}}
/>
} else {
dom = <WeaInput ecId={`${this && this.props && this.props.ecId || ''}_WeaInput@rg6f3p`} hasBorder={true} viewAttr={1} value={field.value}/>
@ -210,13 +216,17 @@ export default class ImportResource extends React.Component {
const href = hrmImportResource.operateType === 'add' ? url.add : url.update;
let dom;
if(hrmImportResource.importType === 'matrix'){
dom = <a onClick={() => {getTemplateUrl(hrmImportResource.otherParams.matrixid, hrmImportResource.operateType, importParams)}}>{i18n.label.importTemplate()}</a>
dom = <a onClick={() => {
getTemplateUrl(hrmImportResource.otherParams.matrixid, hrmImportResource.operateType, importParams)
}}>{i18n.label.importTemplate()}</a>
}else
dom = <a href={addContentPath(href)}>{i18n.label.importTemplate()}</a>;
p = (<p>{i18n.label.downLoadTemplete()}{dom}</p>);
} else if (url != null) {
if(hrmImportResource.importType === 'matrix'){
p = (<p>{i18n.label.downLoadTemplete()}<a onClick={() => {getTemplateUrl(hrmImportResource.otherParams.matrixid, hrmImportResource.operateType)}}>{i18n.label.importTemplate()}</a></p>);
p = (<p>{i18n.label.downLoadTemplete()}<a onClick={() => {
getTemplateUrl(hrmImportResource.otherParams.matrixid, hrmImportResource.operateType)
}}>{i18n.label.importTemplate()}</a></p>);
}else
p = (<p>{i18n.label.downLoadTemplete()}<a href={addContentPath(url)}>{i18n.label.importTemplate()}</a></p>);
} else {

View File

@ -121,8 +121,12 @@ class ImportLog extends React.Component {
showSearchAd
} = hrmImportResource;
const btn = [
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@a9qnqh`} type="primary" onClick={()=>{hrmImportResource.doSearch();hrmImportResource.showSearchAd=false}}>{i18n.button.search()}</Button>),
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@bi5gen`} type="ghost" onClick={()=>{form.reset();}}>{i18n.button.reset()}</Button>),
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@a9qnqh`} type="primary" onClick={()=>{
hrmImportResource.doSearch();hrmImportResource.showSearchAd=false
}}>{i18n.button.search()}</Button>),
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@bi5gen`} type="ghost" onClick={()=>{
form.reset();
}}>{i18n.button.reset()}</Button>),
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@co57et`} type="ghost" onClick={()=>hrmImportResource.showSearchAd=false}>{i18n.button.cancel()}</Button>)
]
return (
@ -135,7 +139,9 @@ class ImportLog extends React.Component {
iconBgcolor="#217346"
visible={visibleImportLog}
closable={true}
onCancel={() => { this.cancel()} }
onCancel={() => {
this.cancel()
} }
//buttons={buttons}
style={{width: 970, height: 510}}
>
@ -151,7 +157,9 @@ class ImportLog extends React.Component {
}
}
>{this.getSearchs()}</div>}
setShowSearchAd={bool => {hrmImportResource.showSearchAd = bool}}
setShowSearchAd={bool => {
hrmImportResource.showSearchAd = bool
}}
hideSearchAd={() => hrmImportResource.showSearchAd = false}
advanceHeight={200}
hasMask={false}

View File

@ -150,7 +150,9 @@ class ImportResult extends React.Component {
<div className="hrm-import-process"><Spin ecId={`${this && this.props && this.props.ecId || ''}_Spin@u5jll2`} tip={i18n.message.serverImportProcessing()}></Spin></div>
}
<div className="wea-new-table">
<WeaNewScroll ecId={`${this && this.props && this.props.ecId || ''}_WeaNewScroll@iflhfl`} height={340} ref={(scroll)=>{hrmImportResource.setScrollTarget(scroll)}}>
<WeaNewScroll ecId={`${this && this.props && this.props.ecId || ''}_WeaNewScroll@iflhfl`} height={340} ref={(scroll)=>{
hrmImportResource.setScrollTarget(scroll)
}}>
<Table ecId={`${this && this.props && this.props.ecId || ''}_Table@quyttr`} dataSource={toJS(importProcessLogDatas)} columns={toJS(importResultColumns)} pagination={false} />
</WeaNewScroll>
</div>

View File

@ -1,7 +1,7 @@
/**
* @Author: 程亮
* @Date: 2022-05-26 14:05:59
* @LastEditTime: 2022-12-16 16:36:59
* @LastEditTime: 2023-08-02 17:09:24
* @Description:
* @FilePath: /trunk/src4js/pc4mobx/organization/components/job/Job.js
*/
@ -18,7 +18,7 @@ import {
WeaRightMenu,
WeaTable,
WeaLeftRightLayout,
WeaOrgTree
WeaOrgTree, WeaDialog
} from 'ecCom'
import {
Row,
@ -42,7 +42,7 @@ import '../../style/common.less';
import NewAndEditDialog from '../NewAndEditDialog';
import NewWeaTableDialog from '../NewWeaTableDialog';
import { renderNoright } from '../../util';
import { renderNoright } from '../../util';
@ -156,7 +156,7 @@ export default class Job extends React.Component {
} = this.props;
confirm({
title: i18n.confirm.defaultTitle(),
content: this.getCopyForm({isCopy:false}),
content: this.getCopyForm({ isCopy: false }),
okText: i18n.button.ok(),
cancelText: i18n.button.cancel(),
onOk() {
@ -169,7 +169,7 @@ export default class Job extends React.Component {
}
copy(id) {
copy(id) {
const {
job
} = this.props;
@ -180,7 +180,7 @@ export default class Job extends React.Component {
job.setIds(keys);
confirm({
title: i18n.confirm.defaultTitle(),
content: this.getCopyForm({isCopy:true}),
content: this.getCopyForm({ isCopy: true }),
okText: i18n.button.ok(),
cancelText: i18n.button.cancel(),
onOk() {
@ -205,7 +205,7 @@ export default class Job extends React.Component {
let formParams = form2.getFormParams();
let condition = params.isCopy ? copyCondition : mergeCondition;
const {
isFormInit
isFormInit
} = form2;
let arr = [];
isFormInit && condition.map(c => {
@ -350,13 +350,19 @@ export default class Job extends React.Component {
const menu = (
<Menu>
<Menu.Item key="0">
<a href='javascript:void(0);' onClick={() => { _this.view(record.id) }}>查看</a>
<a href='javascript:void(0);' onClick={() => {
_this.view(record.id)
}}>查看</a>
</Menu.Item>
<Menu.Item key="1">
<a href='javascript:void(0);' onClick={() => { _this.doDel(record.id) }}>删除</a>
<Menu.Item key="1">
<a href='javascript:void(0);' onClick={() => {
_this.doDel(record.id)
}}>删除</a>
</Menu.Item>
<Menu.Item key="2">
<a href='javascript:void(0);' onClick={() => { _this.select(record.id) }}>联查人员</a>
<a href='javascript:void(0);' onClick={() => {
_this.select(record.id)
}}>联查人员</a>
</Menu.Item>
{/* <Menu.Item key="3">
<a href='javascript:void(0);' onClick={() => { _this.merge(record.id) }}>合并</a>
@ -414,7 +420,9 @@ export default class Job extends React.Component {
} = job;
const btn = [
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@bx87i8`} type="primary" onClick={() => { job.setCurrent(1); job.setPageSize(10); job.getTableInfo(); job.setPanelStatus(false) }}>{i18n.button.search()}</Button>),
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@bx87i8`} type="primary" onClick={() => {
job.setCurrent(1); job.setPageSize(10); job.getTableInfo(); job.setPanelStatus(false)
}}>{i18n.button.search()}</Button>),
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@218ju6`} onClick={() => form.reset()}>{i18n.button.reset()}</Button>),
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@5u9mfz`} onClick={() => job.setPanelStatus(false)}>{i18n.button.cancel()}</Button>),
];
@ -563,8 +571,8 @@ export default class Job extends React.Component {
const {
isPanelShow, jobTitleName, conditionNum, visible, condition, form,
tableStore, dataSource, columns, loading, date, nEdialogTitle, dialogLoading,
form1, isEdit, newVisible,selectedRowKeys, total, current, pageSize, init,
defaultShowLeft,form2,hasRight
form1, isEdit, newVisible, selectedRowKeys, total, current, pageSize, init,
defaultShowLeft, form2, hasRight, jobtitleVisible
} = job;
if (hasRight === false) {
@ -573,7 +581,7 @@ export default class Job extends React.Component {
const rowSelection = {
selectedRowKeys:selectedRowKeys,
selectedRowKeys: selectedRowKeys,
onChange(selectedRowKeys, selectedRows) {
job.setSelectedRowKeys(selectedRowKeys);
},
@ -673,9 +681,40 @@ export default class Job extends React.Component {
conditionLen={2}
save={() => this.handleSave()}
onCancel={() => job.setNewVisible(false)}
saveAndSetting = {() => this.handleSaveAndSetting()}
saveAndSetting={() => this.handleSaveAndSetting()}
moduleName={"job"}
/>
<WeaDialog ecId={`${this && this.props && this.props.ecId || ''}_WeaDialog@fw8u8f`}
onCancel={() => job.jobtitleVisible = false}
icon='icon-coms-hrm'
iconBgcolor='#217346'
title={"添加岗位"}
callback={
datas => {
const {
id,
jobtitlemark
} = datas;
form1.updateFields({
ec_jobTitle: {
value: id,
valueSpan: jobtitlemark,
valueObj: [{
id,
name: jobtitlemark
}]
}
});
job.jobtitleVisible = false;
}
}
url={'/spa/hrm/engine.html#/hrmengine/posts?type=0'}
visible={jobtitleVisible}
style={{ width: 600, height: 500 }}
/>
</div>
)
}

View File

@ -79,7 +79,9 @@ export default class LogView extends React.Component {
columns.forEach((c, index) => {
if (c.dataIndex == 'message') {
c.render = function (text, record) {
return <a href='javascript:void(0);' className="common" onClick={() => { _this.doView(record) }}>查看</a>
return <a href='javascript:void(0);' className="common" onClick={() => {
_this.doView(record)
}}>查看</a>
}
};
})
@ -141,7 +143,9 @@ export default class LogView extends React.Component {
} = logViewStore;
const btn = [
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@bx87i8`} type="primary" onClick={() => { logViewStore.getTableInfo(); this.setState({ showSearchAd: false }) }}>{i18n.button.search()}</Button>),
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@bx87i8`} type="primary" onClick={() => {
logViewStore.getTableInfo(); this.setState({ showSearchAd: false })
}}>{i18n.button.search()}</Button>),
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@218ju6`} onClick={() => form.reset()}>{i18n.button.reset()}</Button>),
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@5u9mfz`} onClick={() => this.setState({ showSearchAd: false })}>{i18n.button.cancel()}</Button>),
];
@ -176,7 +180,9 @@ export default class LogView extends React.Component {
<WeaTab ecId={`${this && this.props && this.props.ecId || ''}_WeaTab@9c3zts`}
searchType={['advanced']}
showSearchAd={showSearchAd}
setShowSearchAd={bool => { this.setState({ showSearchAd: bool }) }}
setShowSearchAd={bool => {
this.setState({ showSearchAd: bool })
}}
advanceHeight={161}
searchsAd={showSearchAd ? this.getPanelComponents() : <div></div>}
buttonsAd={this.getTabBtn()}

View File

@ -149,14 +149,18 @@ export default class StepDialog extends React.Component {
style={{ width: 200 }}
options={field.options}
value={newImport.importParams[domkey[0]] || field.value || val}
onChange={(v) => { newImport.setParam(domkey[0], v) }}
onChange={(v) => {
newImport.setParam(domkey[0], v)
}}
/>
} else if (domkey[0] == 'importType') {
dom = <WeaSelect ecId={`${this && this.props && this.props.ecId || ''}_WeaSelect@holhhb`}
style={{ width: 200 }}
options={field.options}
value={newImport.operateType}
onChange={(v) => { newImport.operateType = v }}
onChange={(v) => {
newImport.operateType = v
}}
/>
} else if (domkey[0] == 'excelfile' || domkey[0] == 'importfile') {
dom = (<div>

View File

@ -211,7 +211,9 @@ export default class JobGrade extends React.Component {
} = jobGrade;
const btn = [
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@bx87i8`} type="primary" onClick={() => { jobGrade.getTableInfo(); jobGrade.setPanelStatus(false) }}>{i18n.button.search()}</Button>),
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@bx87i8`} type="primary" onClick={() => {
jobGrade.getTableInfo(); jobGrade.setPanelStatus(false)
}}>{i18n.button.search()}</Button>),
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@218ju6`} onClick={() => form2.reset()}>{i18n.button.reset()}</Button>),
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@5u9mfz`} onClick={() => jobGrade.setPanelStatus(false)}>{i18n.button.cancel()}</Button>),
];

View File

@ -196,7 +196,9 @@ export default class JobLevel extends React.Component {
} = jobLevel;
const btn = [
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@bx87i8`} type="primary" onClick={() => { jobLevel.getTableInfo(); jobLevel.setPanelStatus(false) }}>{i18n.button.search()}</Button>),
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@bx87i8`} type="primary" onClick={() => {
jobLevel.getTableInfo(); jobLevel.setPanelStatus(false)
}}>{i18n.button.search()}</Button>),
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@218ju6`} onClick={() => form2.reset()}>{i18n.button.reset()}</Button>),
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@5u9mfz`} onClick={() => jobLevel.setPanelStatus(false)}>{i18n.button.cancel()}</Button>),
];

View File

@ -200,7 +200,9 @@ export default class RankScheme extends React.Component {
} = rankScheme;
const btn = [
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@bx87i8`} type="primary" onClick={() => { rankScheme.getTableInfo(); rankScheme.setPanelStatus(false) }}>{i18n.button.search()}</Button>),
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@bx87i8`} type="primary" onClick={() => {
rankScheme.getTableInfo(); rankScheme.setPanelStatus(false)
}}>{i18n.button.search()}</Button>),
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@218ju6`} onClick={() => form2.reset()}>{i18n.button.reset()}</Button>),
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@5u9mfz`} onClick={() => rankScheme.setPanelStatus(false)}>{i18n.button.cancel()}</Button>),
];

View File

@ -256,7 +256,9 @@ export default class ResourceBasicInfo extends React.Component {
} = resourceBasicInfo;
const btn = [
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@bx87i8`} type="primary" onClick={() => { resourceBasicInfo.getTableInfo(); resourceBasicInfo.setPanelStatus(false) }}>{i18n.button.search()}</Button>),
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@bx87i8`} type="primary" onClick={() => {
resourceBasicInfo.getTableInfo(); resourceBasicInfo.setPanelStatus(false)
}}>{i18n.button.search()}</Button>),
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@218ju6`} onClick={() => form2.reset()}>{i18n.button.reset()}</Button>),
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@5u9mfz`} onClick={() => resourceBasicInfo.setPanelStatus(false)}>{i18n.button.cancel()}</Button>),
];

View File

@ -187,7 +187,9 @@ export default class ResourceCard extends React.Component {
// 找到锚点
let anchorElement = document.getElementById(anchorName);
// 如果对应id的锚点存在就跳转到锚点
if (anchorElement) { anchorElement.scrollIntoView({ block: 'start', behavior: 'smooth' }); }
if (anchorElement) {
anchorElement.scrollIntoView({ block: 'start', behavior: 'smooth' });
}
}
}
@ -263,7 +265,9 @@ export default class ResourceCard extends React.Component {
{
data.buttons.slice(0,3).map((item,index) => {
return (
<Button className='item' onClick={() => { window.open(item.url.replaceAll("${id}",data.user.id),"_self")}}>{item.name}</Button>
<Button className='item' onClick={() => {
window.open(item.url.replaceAll("${id}",data.user.id),"_self")
}}>{item.name}</Button>
)
})
}
@ -279,35 +283,45 @@ export default class ResourceCard extends React.Component {
</div>
<div className='data'>
<Row type="flex" justify="space-between" style={{ height: '100%' }}>
<Col className='ant-col' span={4} onClick={() => { window.open(`/spa/workflow/static/index.html#/main/workflow/listDoing?resourceid=${data.user.ecId}`)}}>
<Col className='ant-col' span={4} onClick={() => {
window.open(`/spa/workflow/static/index.html#/main/workflow/listDoing?resourceid=${data.user.ecId}`)
}}>
<img src="/hrm/hrm_e9/image/workflow.png" alt="" />
<div>
<p>流程总数</p>
<p>{data.statistical.workflowCount}</p>
</div>
</Col>
<Col className='ant-col' span={4} onClick={() => { window.open(`/spa/document/static/index.html#/main/document/search?viewcondition=2&doccreaterid=${data.user.ecId}`)}}>
<Col className='ant-col' span={4} onClick={() => {
window.open(`/spa/document/static/index.html#/main/document/search?viewcondition=2&doccreaterid=${data.user.ecId}`)
}}>
<img src="/hrm/hrm_e9/image/doc.png" alt="" />
<div >
<p>文档总数</p>
<p>{data.statistical.docCount}</p>
</div>
</Col>
<Col className='ant-col' span={4} onClick={() => { window.open(`/spa/crm/static/index.html#/main/crm/customer/hrmView?searchHrmId=${data.user.ecId}`)}}>
<Col className='ant-col' span={4} onClick={() => {
window.open(`/spa/crm/static/index.html#/main/crm/customer/hrmView?searchHrmId=${data.user.ecId}`)
}}>
<img src="/hrm/hrm_e9/image/custom.png" alt="" />
<div>
<p>我的客户</p>
<p>{data.statistical.cusCount}</p>
</div>
</Col>
<Col className='ant-col' span={4} onClick={() => { window.open(`/spa/cowork/static/index.html#/main/cowork/hrmview?searchHrmid=${data.user.ecId}`) }}>
<Col className='ant-col' span={4} onClick={() => {
window.open(`/spa/cowork/static/index.html#/main/cowork/hrmview?searchHrmid=${data.user.ecId}`)
}}>
<img src="/hrm/hrm_e9/image/cowork.png" alt="" />
<div>
<p>我的协作</p>
<p>{data.statistical.collaborationCount}</p>
</div>
</Col>
<Col className='ant-col' span={4} onClick={() => { window.open(`/spa/blog/static/index.html#/user/${data.user.ecId}`) }}>
<Col className='ant-col' span={4} onClick={() => {
window.open(`/spa/blog/static/index.html#/user/${data.user.ecId}`)
}}>
<img src="/hrm/hrm_e9/image/weibo.png" alt="" />
<div>
<p>微博总数</p>

View File

@ -328,7 +328,9 @@ export default class Resource extends React.Component {
} = resource;
const btn = [
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@bx87i8`} type="primary" onClick={() => { resource.getTableInfo(); resource.setPanelStatus(false) }}>{i18n.button.search()}</Button>),
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@bx87i8`} type="primary" onClick={() => {
resource.getTableInfo(); resource.setPanelStatus(false)
}}>{i18n.button.search()}</Button>),
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@218ju6`} type="primary" onClick={() => this.saveTemplate()}>{i18n.button.saveTemplate()}</Button>),
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@218ju7`} type="primary" onClick={() => resource.openSearchDialog(true)}>{i18n.button.conditionSet()}</Button>),
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@218ju8`} onClick={() => form2.reset()}>{i18n.button.reset()}</Button>),

View File

@ -195,7 +195,9 @@ export default class Sequence extends React.Component {
} = sequence;
const btn = [
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@bx87i8`} type="primary" onClick={() => { sequence.getTableInfo(); sequence.setPanelStatus(false) }}>{i18n.button.search()}</Button>),
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@bx87i8`} type="primary" onClick={() => {
sequence.getTableInfo(); sequence.setPanelStatus(false)
}}>{i18n.button.search()}</Button>),
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@218ju6`} onClick={() => form2.reset()}>{i18n.button.reset()}</Button>),
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@5u9mfz`} onClick={() => sequence.setPanelStatus(false)}>{i18n.button.cancel()}</Button>),
];

View File

@ -217,7 +217,9 @@ export default class Staff extends React.Component {
} = staff;
const btn = [
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@bx87i8`} type="primary" onClick={() => { staff.getTableInfo(); staff.setPanelStatus(false) }}>{i18n.button.search()}</Button>),
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@bx87i8`} type="primary" onClick={() => {
staff.getTableInfo(); staff.setPanelStatus(false)
}}>{i18n.button.search()}</Button>),
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@218ju6`} onClick={() => form2.reset()}>{i18n.button.reset()}</Button>),
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@5u9mfz`} onClick={() => staff.setPanelStatus(false)}>{i18n.button.cancel()}</Button>),
];

View File

@ -195,7 +195,9 @@ export default class StaffScheme extends React.Component {
} = staffScheme;
const btn = [
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@bx87i8`} type="primary" onClick={() => { staffScheme.getTableInfo(); staffScheme.setPanelStatus(false) }}>{i18n.button.search()}</Button>),
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@bx87i8`} type="primary" onClick={() => {
staffScheme.getTableInfo(); staffScheme.setPanelStatus(false)
}}>{i18n.button.search()}</Button>),
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@218ju6`} onClick={() => form2.reset()}>{i18n.button.reset()}</Button>),
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@5u9mfz`} onClick={() => staffScheme.setPanelStatus(false)}>{i18n.button.cancel()}</Button>),
];

View File

@ -156,7 +156,7 @@ export class DepartmentStore {
updateForbiddenTag(checked, id) {
let params = {
forbiddenTag: checked,
canceled: checked,
id: id
}
Api.updateForbiddenTag(params).then(response => {

View File

@ -710,7 +710,9 @@ export class FieldDefinedStore extends HrmBaseStore {
this.refreshMainTabComponent = new Date().getTime();
this.spinning = false;
this.refreshMainTabComponent = new Date().getTime();
}, error => {this.spinning = false;})
}, error => {
this.spinning = false;
})
}
@ -873,7 +875,7 @@ export class FieldDefinedStore extends HrmBaseStore {
this.formTarget.typeInfoFrom.validateForm().then(f => {
if (f.isValid) {
let params = {
... this.formTarget.typeInfoFrom.getFormParams(),
...this.formTarget.typeInfoFrom.getFormParams(),
id: this.selectedTreeNodeInfo.domid
}
api.changeTypeInfo(this.moduleName, params).then(response => {

View File

@ -68,6 +68,8 @@ export class JobStore {
@observable selectTreeNodeInfo;
saveAndSetting = false;
@observable jobtitleVisible = false;
@action initData() {
this.getHasRight();
this.refresh();
@ -208,8 +210,11 @@ export class JobStore {
Api.getJobForm(this.selectTreeNodeInfo).then(res => {
if (res.code === 200) {
this.setDialogLoadingStatus(false);
res.data.condition && this.setCondition(res.data.condition);
res.data.condition && this.form1.initFormFields(res.data.condition);
if(res.data.condition) {
let condition = this.processCondition(res.data.condition)
this.setCondition(condition);
this.form1.initFormFields(condition);
}
} else {
message.warning(res.msg);
}
@ -218,6 +223,19 @@ export class JobStore {
})
}
processCondition = (condition) => {
condition.map(c => c.items.map(item => {
if (item.domkey[0] === "ec_jobTitle") {
item.otherParams = {
addOnClick: () => {
this.setJobtitleVisible(true);
}
}
}
}));
return condition;
}
@action("复制表单") getCopyForm() {
let params = {};
Api.getCopyForm(params).then(res => {
@ -351,6 +369,10 @@ export class JobStore {
this.jobTitleName = val;
}
setJobtitleVisible(val) {
this.jobtitleVisible = val;
}
isEmptyObject(obj) {
for (let key in obj) {
return false;

View File

@ -98,7 +98,9 @@ export const renderNoData = () => (
//对象非空判断
export const isEmpty = (obj) =>{
for(var n in obj){return false}
for(var n in obj){
return false
}
return true;
}