集团管理静态页面
This commit is contained in:
parent
67304df567
commit
811c9da4d1
|
|
@ -4,11 +4,11 @@ import {
|
|||
} from 'ecCom'
|
||||
|
||||
export const getSearchList = (params) => {
|
||||
return WeaTools.callApi('/api/bs/hrmorganization/level/getLevelTable', 'GET', params);
|
||||
return WeaTools.callApi('/api/bs/hrmorganization/sequence/getSequenceTable', 'GET', params);
|
||||
}
|
||||
|
||||
export const deleteTableData = (params) => {
|
||||
return fetch('/api/bs/hrmorganization/level/deleteByIds', {
|
||||
return fetch('/api/bs/hrmorganization/sequence/deleteByIds', {
|
||||
method: 'POST',
|
||||
mode: 'cors',
|
||||
headers: {
|
||||
|
|
@ -19,11 +19,11 @@ export const deleteTableData = (params) => {
|
|||
}
|
||||
|
||||
export const getAdvanceSearchCondition = (params) => {
|
||||
return WeaTools.callApi('/api/bs/hrmorganization/level/getSearchCondition', 'GET', params);
|
||||
return WeaTools.callApi('/api/bs/hrmorganization/sequence/getSearchCondition', 'GET', params);
|
||||
}
|
||||
|
||||
export const add = (params) => {
|
||||
return fetch('/api/bs/hrmorganization/level/saveLevel', {
|
||||
return fetch('/api/bs/hrmorganization/sequence/saveSequence', {
|
||||
method: 'POST',
|
||||
mode: 'cors',
|
||||
headers: {
|
||||
|
|
@ -33,19 +33,19 @@ export const add = (params) => {
|
|||
})
|
||||
}
|
||||
|
||||
// export const edit = (params) => {
|
||||
// return fetch('/api/bs/hrmorganization/scheme/updateScheme', {
|
||||
// method: 'POST',
|
||||
// mode: 'cors',
|
||||
// headers: {
|
||||
// 'Content-Type': 'application/json'
|
||||
// },
|
||||
// body: JSON.stringify(params)
|
||||
// })
|
||||
// }
|
||||
export const edit = (params) => {
|
||||
return fetch('/api/bs/hrmorganization/sequence/updateSequence', {
|
||||
method: 'POST',
|
||||
mode: 'cors',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
})
|
||||
}
|
||||
|
||||
export const updateForbiddenTag = (params) => {
|
||||
return fetch('/api/bs/hrmorganization/level/updateForbiddenTagById', {
|
||||
return fetch('/api/bs/hrmorganization/sequence/updateForbiddenTagById', {
|
||||
method: 'POST',
|
||||
mode: 'cors',
|
||||
headers: {
|
||||
|
|
@ -55,15 +55,15 @@ export const updateForbiddenTag = (params) => {
|
|||
})
|
||||
}
|
||||
|
||||
export const getLevelForm = (params) => {
|
||||
return WeaTools.callApi('/api/bs/hrmorganization/level/getLevelForm', 'GET', params);
|
||||
export const getSequenceForm = (params) => {
|
||||
return WeaTools.callApi('/api/bs/hrmorganization/sequence/getSequenceForm', 'GET', params);
|
||||
}
|
||||
|
||||
export const getTabInfo = (params) => {
|
||||
return WeaTools.callApi('/api/bs/hrmorganization/level/getTabInfo', 'GET', params);
|
||||
return WeaTools.callApi('/api/bs/hrmorganization/sequence/getTabInfo', 'GET', params);
|
||||
}
|
||||
|
||||
|
||||
export const getHasRight = (params) => {
|
||||
return WeaTools.callApi('/api/bs/hrmorganization/scheme/getTableBtn', 'GET', params);
|
||||
return WeaTools.callApi('/api/bs/hrmorganization/sequence/getHasRight', 'GET', params);
|
||||
}
|
||||
|
|
@ -24,6 +24,8 @@ export default class NewAndEditDialog extends React.Component {
|
|||
super(props);
|
||||
this.state = {
|
||||
width: 700,
|
||||
enable: props.enable
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -39,24 +41,41 @@ export default class NewAndEditDialog extends React.Component {
|
|||
isFormInit && condition.map(c => {
|
||||
c.items.map((field, index) => {
|
||||
arr.push(<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@jacv6v@${index}`}
|
||||
label={`${field.label}`}
|
||||
labelCol={{span: `${field.labelcol}`}}
|
||||
error={form.getError(field)}
|
||||
tipPosition="bottom"
|
||||
wrapperCol={{span: `${field.fieldcol}`}}>
|
||||
{<WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@7vxyfr@${index}`} fieldConfig={field} form={form} formParams={form.getFormParams()} />}
|
||||
</WeaFormItem>)
|
||||
label={`${field.label}`}
|
||||
labelCol={{ span: `${field.labelcol}` }}
|
||||
error={form.getError(field)}
|
||||
tipPosition="bottom"
|
||||
wrapperCol={{ span: `${field.fieldcol}` }}>
|
||||
{<WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@7vxyfr@${index}`} fieldConfig={field} form={form} formParams={form.getFormParams()} />}
|
||||
</WeaFormItem>)
|
||||
})
|
||||
})
|
||||
return <div className="wea-form-item-group">{arr}</div>
|
||||
}
|
||||
|
||||
onChange = data => {
|
||||
if(this.state.enable && data.schemeId) {
|
||||
const {
|
||||
condition,
|
||||
form,
|
||||
bindChangeEnvent,
|
||||
} = this.props;
|
||||
bindChangeEnvent(data.schemeId.value);
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
onBlur = data => {
|
||||
//console.log("onBlur 回调", data);
|
||||
};
|
||||
|
||||
|
||||
getSearchGroupForm() {
|
||||
const {
|
||||
condition,
|
||||
form,
|
||||
isFormInit,
|
||||
domkey,
|
||||
isEdit
|
||||
} = this.props;
|
||||
|
||||
|
|
@ -67,15 +86,16 @@ export default class NewAndEditDialog extends React.Component {
|
|||
_arr.push({
|
||||
com: (
|
||||
<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@merei2@${index}`}
|
||||
label={`${field.label}`}
|
||||
labelCol={{span: `${field.labelcol}`}}
|
||||
error={form.getError(field)}
|
||||
tipPosition="bottom"
|
||||
wrapperCol={{span: `${field.fieldcol}`}}
|
||||
underline={isEdit?false:true}
|
||||
>
|
||||
<WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@5r6c5a@${index}`} fieldConfig={field} form={form} formParams={form.getFormParams()} />
|
||||
</WeaFormItem>
|
||||
label={`${field.label}`}
|
||||
labelCol={{ span: `${field.labelcol}` }}
|
||||
error={form.getError(field)}
|
||||
tipPosition="bottom"
|
||||
wrapperCol={{ span: `${field.fieldcol}` }}
|
||||
underline={isEdit ? false : true}
|
||||
>
|
||||
<WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@5r6c5a@${index}`} fieldConfig={field} form={form} formParams={form.getFormParams()} onChange={this.onChange}
|
||||
onBlur={this.onBlur} />
|
||||
</WeaFormItem>
|
||||
),
|
||||
colSpan: 1
|
||||
})
|
||||
|
|
@ -115,17 +135,17 @@ export default class NewAndEditDialog extends React.Component {
|
|||
visible={visible}
|
||||
closable={true}
|
||||
hasScroll={true}
|
||||
onCancel={() => onCancel() }
|
||||
buttons={isEdit?buttons:buttons.slice(1,2)}
|
||||
style={{width: width, height: height}}
|
||||
onCancel={() => onCancel()}
|
||||
buttons={isEdit ? buttons : buttons.slice(1, 2)}
|
||||
style={{ width: width, height: height }}
|
||||
>
|
||||
{
|
||||
loading ? <div className='hrm-loading-center-small'>
|
||||
<Spin ecId={`${this && this.props && this.props.ecId || ''}_Spin@4ygl4a`} spinning={loading}></Spin>
|
||||
</div>
|
||||
: <div className={conditionLen > 1 ? '' : 'hrm-dialog-form'}>
|
||||
{conditionLen > 1 ? this.getSearchGroupForm() : this.getForm()}
|
||||
</div>
|
||||
loading ? <div className='hrm-loading-center-small'>
|
||||
<Spin ecId={`${this && this.props && this.props.ecId || ''}_Spin@4ygl4a`} spinning={loading}></Spin>
|
||||
</div>
|
||||
: <div className={conditionLen > 1 ? '' : 'hrm-dialog-form'}>
|
||||
{conditionLen > 1 ? this.getSearchGroupForm() : this.getForm()}
|
||||
</div>
|
||||
}
|
||||
</WeaDialog>
|
||||
)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,224 @@
|
|||
import React from 'react'
|
||||
import * as mobx from 'mobx'
|
||||
import {
|
||||
inject,
|
||||
observer,
|
||||
} from 'mobx-react'
|
||||
import {
|
||||
WeaTop,
|
||||
WeaTab,
|
||||
WeaFormItem,
|
||||
WeaRightMenu,
|
||||
} from 'ecCom'
|
||||
import {
|
||||
Row,
|
||||
Col,
|
||||
Spin,
|
||||
Modal,
|
||||
Button,
|
||||
message,
|
||||
Switch
|
||||
} from 'antd'
|
||||
import {
|
||||
WeaSwitch,
|
||||
WeaTableNew
|
||||
} from 'comsMobx'
|
||||
import {
|
||||
i18n
|
||||
} from '../../public/i18n';
|
||||
|
||||
import '../../style/common.less';
|
||||
|
||||
import NewAndEditDialog from '../NewAndEditDialog';
|
||||
|
||||
|
||||
const toJS = mobx.toJS;
|
||||
const confirm = Modal.confirm;
|
||||
|
||||
|
||||
@inject('group')
|
||||
@observer
|
||||
export default class Group extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
}
|
||||
|
||||
componentWillMount() {
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.init();
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps) {
|
||||
const {
|
||||
group
|
||||
} = this.props;
|
||||
|
||||
if (this.props.location.key !== nextProps.location.key) {
|
||||
this.init();
|
||||
}
|
||||
}
|
||||
|
||||
init() {
|
||||
const {
|
||||
group
|
||||
} = this.props;
|
||||
group.getGroupForm();
|
||||
group.getHasRight();
|
||||
}
|
||||
|
||||
getTopMenuBtns() {
|
||||
const {
|
||||
group
|
||||
} = this.props;
|
||||
const {
|
||||
topMenu,
|
||||
tableStore
|
||||
} = group;
|
||||
|
||||
let btns = [];
|
||||
topMenu.map((item, i) => {
|
||||
btns.push(<Button type='primary' onClick={() => this.handleClick(item)}>{item.menuName}</Button>);
|
||||
});
|
||||
return btns;
|
||||
}
|
||||
|
||||
getDropMenuDatas() {
|
||||
const {
|
||||
group
|
||||
} = this.props;
|
||||
const {
|
||||
rightMenu
|
||||
} = group;
|
||||
|
||||
let menus = [];
|
||||
toJS(rightMenu).map((item, index) => {
|
||||
let obj = {
|
||||
key: item.menuFun,
|
||||
icon: <i className={`${item.menuIcon}`} />,
|
||||
content: item.menuName,
|
||||
}
|
||||
if (item.menuFun == 'collection' || item.menuFun == 'help' || item.menuFun == 'pageAddress') {
|
||||
obj.disabled = true;
|
||||
}
|
||||
menus.push(obj);
|
||||
})
|
||||
return menus;
|
||||
}
|
||||
|
||||
|
||||
|
||||
doEdit(id) {
|
||||
const {
|
||||
group
|
||||
} = this.props;
|
||||
|
||||
group.setNeDialogTitle(i18n.label.editGroup());
|
||||
group.setVisible(true);
|
||||
group.getForm();
|
||||
}
|
||||
|
||||
|
||||
handleSave() {
|
||||
const {
|
||||
group
|
||||
} = this.props;
|
||||
group.edit();
|
||||
}
|
||||
|
||||
handleMenuClick(key) {
|
||||
this[key] && this[key]();
|
||||
}
|
||||
|
||||
handleClick(item) {
|
||||
this[item.menuFun] && this[item.menuFun]();
|
||||
}
|
||||
|
||||
|
||||
changeData(key) {
|
||||
const {
|
||||
group
|
||||
} = this.props;
|
||||
group.changeData(key);
|
||||
}
|
||||
|
||||
getFormField() {
|
||||
const {
|
||||
group
|
||||
} = this.props;
|
||||
const { form1, groupCondition } = group;
|
||||
|
||||
const { isFormInit } = form1;
|
||||
const formParams = form1.getFormParams();
|
||||
let items = [];
|
||||
isFormInit && toJS(groupCondition).map(c => {
|
||||
c.items.map((fields, index) => {
|
||||
items.push(<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@zzk1d0@${index}`}
|
||||
underline={true}
|
||||
label={`${fields.label}`}
|
||||
labelCol={{ span: 8 }}
|
||||
wrapperCol={{ span: 16 }}>
|
||||
<WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@p0qhmz@${index}`} fieldConfig={fields} form={form1} formParams={formParams} />
|
||||
</WeaFormItem>);
|
||||
});
|
||||
});
|
||||
return <div className="wea-form-item-group">{items}</div>;
|
||||
}
|
||||
|
||||
|
||||
|
||||
render() {
|
||||
|
||||
const {
|
||||
group
|
||||
} = this.props;
|
||||
const {
|
||||
nEdialogTitle, visible, condition, form, dialogLoading, isEdit, topTab, selectedKey
|
||||
} = group;
|
||||
|
||||
return (
|
||||
<div ref='page' style={{ height: '100%' }}>
|
||||
<WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@k6oc4u`}
|
||||
datas={this.getDropMenuDatas()}
|
||||
onClick={key => this.handleMenuClick(key)}
|
||||
>
|
||||
<WeaTop ecId={`${this && this.props && this.props.ecId || ''}_WeaTop@bj98s7`}
|
||||
title={i18n.label.groupInfo()}
|
||||
icon={<i className='icon-coms-hrm' />}
|
||||
iconBgcolor='#217346'
|
||||
loading={true}
|
||||
buttons={this.getTopMenuBtns()}
|
||||
showDropIcon={true}
|
||||
dropMenuDatas={this.getDropMenuDatas()}
|
||||
onDropMenuClick={(e) => this.handleMenuClick(e)}
|
||||
>
|
||||
<WeaTab ecId={`${this && this.props && this.props.ecId || ''}_WeaTab@9c3zts`}
|
||||
datas={topTab}
|
||||
keyParam="viewCondition" //主键
|
||||
selectedKey={selectedKey}
|
||||
onChange={this.changeData.bind(this)}
|
||||
/>
|
||||
<div className='organization-group'>
|
||||
{this.getFormField()}
|
||||
</div>
|
||||
</WeaTop>
|
||||
</WeaRightMenu>
|
||||
<NewAndEditDialog ecId={`${this && this.props && this.props.ecId || ''}_NewAndEditDialog@q4rrwm`}
|
||||
title={nEdialogTitle}
|
||||
visible={visible}
|
||||
condition={toJS(condition)}
|
||||
form={form}
|
||||
isFormInit={form.isFormInit}
|
||||
loading={dialogLoading}
|
||||
isEdit={isEdit}
|
||||
height={250}
|
||||
conditionLen={3}
|
||||
save={() => this.handleSave()}
|
||||
onCancel={() => group.setVisible(false)}
|
||||
enable={false} //是否开启字段联动
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
@ -407,6 +407,8 @@ export default class JobGrade extends React.Component {
|
|||
conditionLen={3}
|
||||
save={() => this.handleSave()}
|
||||
onCancel={() => jobGrade.setVisible(false)}
|
||||
enable={true} //是否开启字段联动
|
||||
bindChangeEnvent={val => jobGrade.updateConditions(val)}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
|
|
|
|||
|
|
@ -407,6 +407,7 @@ export default class JobLevel extends React.Component {
|
|||
conditionLen={3}
|
||||
save={() => this.handleSave()}
|
||||
onCancel={() => jobLevel.setVisible(false)}
|
||||
enable={false} //是否开启字段联动
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
|
|
|
|||
|
|
@ -393,6 +393,7 @@ export default class RankScheme extends React.Component {
|
|||
conditionLen={3}
|
||||
save={() => this.handleSave()}
|
||||
onCancel={() => rankScheme.setVisible(false)}
|
||||
enable={false} //是否开启字段联动
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
|
|
|
|||
|
|
@ -254,7 +254,7 @@ export default class Sequence extends React.Component {
|
|||
} = this.props;
|
||||
|
||||
sequence.setNeDialogTitle(i18n.label.editSequence());
|
||||
sequence.setLevelId(id);
|
||||
sequence.setSequenceId(id);
|
||||
sequence.setIsNew(false);
|
||||
sequence.setVisible(true);
|
||||
sequence.getForm();
|
||||
|
|
@ -358,7 +358,7 @@ export default class Sequence extends React.Component {
|
|||
onClick={key => this.handleMenuClick(key)}
|
||||
>
|
||||
<WeaTop ecId={`${this && this.props && this.props.ecId || ''}_WeaTop@bj98s7`}
|
||||
title={i18n.label.levelName()}
|
||||
title={i18n.label.sequenceName()}
|
||||
icon={<i className='icon-coms-hrm' />}
|
||||
iconBgcolor='#217346'
|
||||
loading={true}
|
||||
|
|
@ -407,6 +407,7 @@ export default class Sequence extends React.Component {
|
|||
conditionLen={3}
|
||||
save={() => this.handleSave()}
|
||||
onCancel={() => sequence.setVisible(false)}
|
||||
enable={false} //是否开启字段联动
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import RankScheme from './components/postionrank/RankScheme';
|
|||
import JobLevel from './components/postionrank/JobLevel';
|
||||
import JobGrade from './components/postionrank/JobGrade';
|
||||
import Sequence from './components/sequence/Sequence';
|
||||
import Group from './components/group/group';
|
||||
|
||||
import stores from './stores';
|
||||
import './style/index';
|
||||
|
|
@ -27,6 +28,7 @@ const Routes = (
|
|||
<Route key='joblevel' path='joblevel' component={JobLevel} />
|
||||
<Route key='jobgrade' path='jobgrade' component={JobGrade} />
|
||||
<Route key='sequence' path='sequence' component={Sequence} />
|
||||
<Route key='group' path='group' component={Group} />
|
||||
</Route>
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -122,6 +122,9 @@ export const i18n = {
|
|||
sequenceName: () => getLabel(385936, '岗位序列'),
|
||||
newSequence: () => getLabel(386246, '新建岗位序列'),
|
||||
editSequence: () => getLabel(386247, '编辑岗位序列'),
|
||||
groupInfo: () => getLabel(385936, '总部'),
|
||||
editGroup: () => getLabel(386247, '编辑总部'),
|
||||
|
||||
|
||||
|
||||
authorizationGroup: () => getLabel(492, '权限组'),
|
||||
|
|
|
|||
|
|
@ -0,0 +1,458 @@
|
|||
import {
|
||||
observable,
|
||||
action
|
||||
} from 'mobx';
|
||||
import * as mobx from 'mobx';
|
||||
import * as Api from '../apis/group'; // 引入API接口文件
|
||||
import {
|
||||
WeaForm
|
||||
} from 'comsMobx';
|
||||
import {
|
||||
Modal,
|
||||
message,
|
||||
} from 'antd'
|
||||
import {
|
||||
i18n
|
||||
} from '../public/i18n';
|
||||
|
||||
const toJS = mobx.toJS;
|
||||
|
||||
export class GroupStore {
|
||||
@observable topMenu = []
|
||||
@observable rightMenu = [];
|
||||
@observable condition = [];
|
||||
@observable groupCondition = [];
|
||||
@observable isEdit = true;
|
||||
@observable form = new WeaForm();
|
||||
@observable form1 = new WeaForm();
|
||||
@observable nEdialogTitle = '';
|
||||
@observable visible = false;
|
||||
@observable dialogLoading = true;
|
||||
@observable selectedKey = 1;
|
||||
@observable topTab = [];
|
||||
@observable date = '';
|
||||
|
||||
@action
|
||||
getGroupForm() {
|
||||
let params = {
|
||||
viewattr: 1
|
||||
}
|
||||
//api
|
||||
let condition = [
|
||||
{
|
||||
"title": "总部信息",
|
||||
"defaultshow": true,
|
||||
"items": [
|
||||
{
|
||||
"belong": "PC",
|
||||
"checkbox": false,
|
||||
"checkboxValue": false,
|
||||
"colSpan": 2,
|
||||
"conditionType": "INPUT",
|
||||
"dateGroup": false,
|
||||
"defaultDisplayInBar": false,
|
||||
"detailtype": 1,
|
||||
"domkey": [
|
||||
"companyname"
|
||||
],
|
||||
"entSearch": false,
|
||||
"fieldcol": 16,
|
||||
"hasBorder": false,
|
||||
"helpfulTipProps": {},
|
||||
"hide": false,
|
||||
"isBase64": false,
|
||||
"isQuickSearch": false,
|
||||
"label": "总部名称",
|
||||
"labelcol": 8,
|
||||
"length": 0,
|
||||
"maxFilesNumber": 0,
|
||||
"maxUploadSize": 0,
|
||||
"multiSelection": false,
|
||||
"multiple": false,
|
||||
"otherParams": {
|
||||
"inputType": "multilang",
|
||||
"isBase64": true
|
||||
},
|
||||
"precision": 0,
|
||||
"rules": "required|string",
|
||||
"secretLimit": false,
|
||||
"showOrder": 0,
|
||||
"showTime": false,
|
||||
"stringLength": 0,
|
||||
"supportCancel": false,
|
||||
"tipPosition": "bottom",
|
||||
"value": "E9TEST",
|
||||
"valueList": [],
|
||||
"viewAttr": 1
|
||||
},
|
||||
{
|
||||
"belong": "PC",
|
||||
"checkbox": false,
|
||||
"checkboxValue": false,
|
||||
"colSpan": 2,
|
||||
"conditionType": "INPUT",
|
||||
"dateGroup": false,
|
||||
"defaultDisplayInBar": false,
|
||||
"detailtype": 1,
|
||||
"domkey": [
|
||||
"companydesc"
|
||||
],
|
||||
"entSearch": false,
|
||||
"fieldcol": 16,
|
||||
"hasBorder": false,
|
||||
"helpfulTipProps": {},
|
||||
"hide": false,
|
||||
"isBase64": false,
|
||||
"isQuickSearch": false,
|
||||
"label": "总部全称",
|
||||
"labelcol": 8,
|
||||
"length": 0,
|
||||
"maxFilesNumber": 0,
|
||||
"maxUploadSize": 0,
|
||||
"multiSelection": false,
|
||||
"multiple": false,
|
||||
"otherParams": {
|
||||
"inputType": "multilang",
|
||||
"isBase64": true
|
||||
},
|
||||
"precision": 0,
|
||||
"rules": "required|string",
|
||||
"secretLimit": false,
|
||||
"showOrder": 0,
|
||||
"showTime": false,
|
||||
"stringLength": 0,
|
||||
"supportCancel": false,
|
||||
"tipPosition": "bottom",
|
||||
"value": "E9TEST",
|
||||
"valueList": [],
|
||||
"viewAttr": 1
|
||||
},
|
||||
{
|
||||
"belong": "PC",
|
||||
"checkbox": false,
|
||||
"checkboxValue": false,
|
||||
"colSpan": 2,
|
||||
"conditionType": "INPUT",
|
||||
"dateGroup": false,
|
||||
"defaultDisplayInBar": false,
|
||||
"detailtype": 1,
|
||||
"domkey": [
|
||||
"companyweb"
|
||||
],
|
||||
"entSearch": false,
|
||||
"fieldcol": 16,
|
||||
"hasBorder": false,
|
||||
"helpfulTipProps": {},
|
||||
"hide": false,
|
||||
"isBase64": false,
|
||||
"isQuickSearch": false,
|
||||
"label": "公司网站",
|
||||
"labelcol": 8,
|
||||
"length": 0,
|
||||
"maxFilesNumber": 0,
|
||||
"maxUploadSize": 0,
|
||||
"multiSelection": false,
|
||||
"multiple": false,
|
||||
"otherParams": {
|
||||
"inputType": "multilang",
|
||||
"isBase64": true
|
||||
},
|
||||
"precision": 0,
|
||||
"secretLimit": false,
|
||||
"showOrder": 0,
|
||||
"showTime": false,
|
||||
"stringLength": 0,
|
||||
"supportCancel": false,
|
||||
"tipPosition": "bottom",
|
||||
"value": "",
|
||||
"valueList": [],
|
||||
"viewAttr": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
this.setGroupCondition(condition);
|
||||
this.form1.initFormFields(condition);
|
||||
this.getTabInfo();
|
||||
|
||||
}
|
||||
|
||||
getTabInfo() {
|
||||
// Api.getTabInfo().then(res => {
|
||||
// if (res.code === 200) {
|
||||
// res.data.topTabs && this.setTopTab(res.data.topTabs);
|
||||
// res.data.topTabCount && this.setTopTabCount(res.data.topTabCount);
|
||||
// } else {
|
||||
// message.warning(res.msg);
|
||||
// }
|
||||
// }, error => {
|
||||
// message.warning(error.msg);
|
||||
// })
|
||||
const topTab = [
|
||||
{
|
||||
"title": "总部信息",
|
||||
"viewCondition": "1"
|
||||
}
|
||||
]
|
||||
this.setTopTab(topTab)
|
||||
}
|
||||
|
||||
|
||||
@action
|
||||
getHasRight() {
|
||||
const rightMenu = [
|
||||
{
|
||||
"isTop": "1",
|
||||
"menuFun": "doEdit",
|
||||
"menuIcon": "icon-coms-edit",
|
||||
"menuName": "编辑",
|
||||
"type": "BTN_EDIT"
|
||||
}
|
||||
]
|
||||
const topMenu = [
|
||||
{
|
||||
"isTop": "1",
|
||||
"menuFun": "doEdit",
|
||||
"menuIcon": "icon-coms-edit",
|
||||
"menuName": "编辑",
|
||||
"type": "BTN_EDIT"
|
||||
}
|
||||
]
|
||||
this.setTopMenu(topMenu);
|
||||
this.setRightMenu(rightMenu);
|
||||
// Api.getHasRight().then(res => {
|
||||
// if (res.code === 200) {
|
||||
// res.data.rightMenu && this.setRightMenu(res.data.rightMenu);
|
||||
// res.data.topMenu && this.setTopMenu(res.data.topMenu);
|
||||
// } else {
|
||||
// message.warning(res.msg);
|
||||
// }
|
||||
// }, error => {
|
||||
// message.warning(error.msg);
|
||||
// })
|
||||
}
|
||||
|
||||
|
||||
edit() {
|
||||
|
||||
// let params = { ...this.form.getFormParams(), id: this.schemeId };
|
||||
// this.form.validateForm().then(f => {
|
||||
// if (f.isValid) {
|
||||
// Api.edit(params).then(response => {
|
||||
// return response.json()
|
||||
// }).then(data => {
|
||||
// if (data.code === 200) {
|
||||
// message.success(data.msg);
|
||||
// this.getTableInfo();
|
||||
// this.setVisible(false);
|
||||
// } else {
|
||||
// message.warning(data.msg);
|
||||
// }
|
||||
// }).catch(error => {
|
||||
// message.warning(error.msg);
|
||||
// })
|
||||
// } else {
|
||||
// f.showErrors();
|
||||
// this.setDate(new Date());
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
getForm() {
|
||||
let params = {
|
||||
viewattr: 2
|
||||
}
|
||||
|
||||
|
||||
const condition = [
|
||||
{
|
||||
"title": "总部信息",
|
||||
"defaultshow": true,
|
||||
"items": [
|
||||
{
|
||||
"belong": "PC",
|
||||
"checkbox": false,
|
||||
"checkboxValue": false,
|
||||
"colSpan": 2,
|
||||
"conditionType": "INPUT",
|
||||
"dateGroup": false,
|
||||
"defaultDisplayInBar": false,
|
||||
"detailtype": 1,
|
||||
"domkey": [
|
||||
"companyname"
|
||||
],
|
||||
"entSearch": false,
|
||||
"fieldcol": 16,
|
||||
"hasBorder": false,
|
||||
"helpfulTipProps": {},
|
||||
"hide": false,
|
||||
"isBase64": false,
|
||||
"isQuickSearch": false,
|
||||
"label": "总部名称",
|
||||
"labelcol": 8,
|
||||
"length": 0,
|
||||
"maxFilesNumber": 0,
|
||||
"maxUploadSize": 0,
|
||||
"multiSelection": false,
|
||||
"multiple": false,
|
||||
"otherParams": {
|
||||
"inputType": "multilang",
|
||||
"isBase64": true
|
||||
},
|
||||
"precision": 0,
|
||||
"rules": "required|string",
|
||||
"secretLimit": false,
|
||||
"showOrder": 0,
|
||||
"showTime": false,
|
||||
"stringLength": 0,
|
||||
"supportCancel": false,
|
||||
"tipPosition": "bottom",
|
||||
"value": "E9TEST",
|
||||
"valueList": [],
|
||||
"viewAttr": 3
|
||||
},
|
||||
{
|
||||
"belong": "PC",
|
||||
"checkbox": false,
|
||||
"checkboxValue": false,
|
||||
"colSpan": 2,
|
||||
"conditionType": "INPUT",
|
||||
"dateGroup": false,
|
||||
"defaultDisplayInBar": false,
|
||||
"detailtype": 1,
|
||||
"domkey": [
|
||||
"companydesc"
|
||||
],
|
||||
"entSearch": false,
|
||||
"fieldcol": 16,
|
||||
"hasBorder": false,
|
||||
"helpfulTipProps": {},
|
||||
"hide": false,
|
||||
"isBase64": false,
|
||||
"isQuickSearch": false,
|
||||
"label": "总部全称",
|
||||
"labelcol": 8,
|
||||
"length": 0,
|
||||
"maxFilesNumber": 0,
|
||||
"maxUploadSize": 0,
|
||||
"multiSelection": false,
|
||||
"multiple": false,
|
||||
"otherParams": {
|
||||
"inputType": "multilang",
|
||||
"isBase64": true
|
||||
},
|
||||
"precision": 0,
|
||||
"rules": "required|string",
|
||||
"secretLimit": false,
|
||||
"showOrder": 0,
|
||||
"showTime": false,
|
||||
"stringLength": 0,
|
||||
"supportCancel": false,
|
||||
"tipPosition": "bottom",
|
||||
"value": "E9TEST",
|
||||
"valueList": [],
|
||||
"viewAttr": 3
|
||||
},
|
||||
{
|
||||
"belong": "PC",
|
||||
"checkbox": false,
|
||||
"checkboxValue": false,
|
||||
"colSpan": 2,
|
||||
"conditionType": "INPUT",
|
||||
"dateGroup": false,
|
||||
"defaultDisplayInBar": false,
|
||||
"detailtype": 1,
|
||||
"domkey": [
|
||||
"companyweb"
|
||||
],
|
||||
"entSearch": false,
|
||||
"fieldcol": 16,
|
||||
"hasBorder": false,
|
||||
"helpfulTipProps": {},
|
||||
"hide": false,
|
||||
"isBase64": false,
|
||||
"isQuickSearch": false,
|
||||
"label": "公司网站",
|
||||
"labelcol": 8,
|
||||
"length": 0,
|
||||
"maxFilesNumber": 0,
|
||||
"maxUploadSize": 0,
|
||||
"multiSelection": false,
|
||||
"multiple": false,
|
||||
"otherParams": {
|
||||
"inputType": "multilang",
|
||||
"isBase64": true
|
||||
},
|
||||
"precision": 0,
|
||||
"secretLimit": false,
|
||||
"showOrder": 0,
|
||||
"showTime": false,
|
||||
"stringLength": 0,
|
||||
"supportCancel": false,
|
||||
"tipPosition": "bottom",
|
||||
"value": "",
|
||||
"valueList": [],
|
||||
"viewAttr": 2
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
this.setCondition(condition);
|
||||
this.form.initFormFields(condition);
|
||||
this.setDialogLoadingStatus(false);
|
||||
// this.setDialogLoadingStatus(true);
|
||||
|
||||
// Api.getSchemeForm(params).then(res => {
|
||||
// if (res.code === 200) {
|
||||
// this.setDialogLoadingStatus(false);
|
||||
// res.data.condition && this.setCondition(res.data.condition);
|
||||
// res.data.condition && this.form.initFormFields(res.data.condition);
|
||||
// } else {
|
||||
// message.warning(res.msg);
|
||||
// }
|
||||
// }, error => {
|
||||
// message.warning(error.msg);
|
||||
// })
|
||||
}
|
||||
|
||||
changeData(key) {
|
||||
this.setSelectedKey(key);
|
||||
}
|
||||
|
||||
|
||||
setVisible(bool) {
|
||||
this.visible = bool;
|
||||
}
|
||||
|
||||
setGroupCondition(groupCondition) {
|
||||
this.groupCondition = groupCondition
|
||||
}
|
||||
|
||||
setCondition(condition) {
|
||||
this.condition = condition;
|
||||
}
|
||||
|
||||
setTopMenu(topMenu) {
|
||||
this.topMenu = topMenu;
|
||||
}
|
||||
|
||||
setRightMenu(rightMenu) {
|
||||
this.rightMenu = rightMenu;
|
||||
}
|
||||
|
||||
setTopTab(topTab) {
|
||||
this.topTab = topTab;
|
||||
}
|
||||
|
||||
setNeDialogTitle(title) {
|
||||
this.nEdialogTitle = title;
|
||||
}
|
||||
|
||||
setDialogLoadingStatus(bool) {
|
||||
this.dialogLoading = bool;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,10 +1,13 @@
|
|||
|
||||
import { SimpleOrgStore } from './tree/simple_org';
|
||||
import {StandardOrgStore} from './tree/standard_org'
|
||||
import {StandardOrgStore} from './tree/standard_org';
|
||||
import {RankSchemeStore} from './rankscheme';
|
||||
import {JobLevelStore} from './joblevel';
|
||||
import {JobGradeStore} from './jobgrade';
|
||||
import {SequenceStore} from './sequence'
|
||||
import {SequenceStore} from './sequence';
|
||||
import {GroupStore} from './group';
|
||||
|
||||
|
||||
|
||||
module.exports = {
|
||||
simpleOrgStore: new SimpleOrgStore(),
|
||||
|
|
@ -13,4 +16,6 @@ module.exports = {
|
|||
jobLevel: new JobLevelStore(),
|
||||
jobGrade: new JobGradeStore(),
|
||||
sequence: new SequenceStore(),
|
||||
group: new GroupStore()
|
||||
|
||||
};
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ export class JobGradeStore {
|
|||
@observable selectedKey = -1;
|
||||
@observable topTab = [];
|
||||
@observable topTabCount = {};
|
||||
@observable key = '';//
|
||||
|
||||
|
||||
|
||||
|
|
@ -238,6 +239,42 @@ export class JobGradeStore {
|
|||
});
|
||||
}
|
||||
|
||||
updateConditions(val) {
|
||||
let currenttime = Date.now();
|
||||
let key = `schemId_${currenttime}`;
|
||||
const lastKey = this.key;
|
||||
// let conditions = [];
|
||||
// this.condition[0].items.map(item => {
|
||||
// if(item.domkey[0] === 'levelId') {
|
||||
// Reflect.deleteProperty(item.browserConditionParam.dataParams,lastKey)
|
||||
// this.setKey(key);
|
||||
// //completeParams conditionDataParams
|
||||
// item.browserConditionParam.dataParams = {
|
||||
// [key]:val,
|
||||
// ...item.browserConditionParam.dataParams,
|
||||
// currenttime: currenttime
|
||||
// }
|
||||
// }
|
||||
// conditions.push(item);
|
||||
// })
|
||||
|
||||
Reflect.deleteProperty(this.condition[0].items[4].browserConditionParam.dataParams,lastKey)
|
||||
this.setKey(key);
|
||||
this.condition[0].items[4].browserConditionParam.dataParams = {
|
||||
[key]:val,
|
||||
...this.condition[0].items[4].browserConditionParam.dataParams,
|
||||
currenttime: currenttime
|
||||
}
|
||||
this.form.updateFields({
|
||||
levelId: {
|
||||
value: ''
|
||||
}
|
||||
});
|
||||
|
||||
this.setCondition(this.condition);
|
||||
}
|
||||
|
||||
|
||||
changeData(key) {
|
||||
this.setSelectedKey(key);
|
||||
this.getTableInfo();
|
||||
|
|
@ -337,4 +374,8 @@ export class JobGradeStore {
|
|||
this.rightMenu = rightMenu;
|
||||
}
|
||||
|
||||
setKey (key) {
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -123,7 +123,6 @@ export class RankSchemeStore {
|
|||
|
||||
edit() {
|
||||
let params = { ...this.form.getFormParams(), id: this.schemeId };
|
||||
debugger
|
||||
this.form.validateForm().then(f => {
|
||||
if (f.isValid) {
|
||||
Api.edit(params).then(response => {
|
||||
|
|
|
|||
|
|
@ -66,17 +66,17 @@ export class SequenceStore {
|
|||
viewcondition:this.selectedKey
|
||||
};
|
||||
}
|
||||
// Api.getSearchList(params).then(res => {
|
||||
// if (res.code === 200) {
|
||||
// res.data.datas && this.tableStore.getDatas(res.data.datas, 1);
|
||||
// } else {
|
||||
// message.warning(res.msg);
|
||||
// }
|
||||
// }, error => {
|
||||
// message.warning(error.msg);
|
||||
// })
|
||||
// //获取tab信息
|
||||
// this.getTabInfo();
|
||||
Api.getSearchList(params).then(res => {
|
||||
if (res.code === 200) {
|
||||
res.data.datas && this.tableStore.getDatas(res.data.datas, 1);
|
||||
} else {
|
||||
message.warning(res.msg);
|
||||
}
|
||||
}, error => {
|
||||
message.warning(error.msg);
|
||||
})
|
||||
//获取tab信息
|
||||
this.getTabInfo();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -85,68 +85,68 @@ export class SequenceStore {
|
|||
let params = {
|
||||
ids: this.ids
|
||||
};
|
||||
// Api.deleteTableData(params).then(response => {
|
||||
// return response.json()
|
||||
// }).then(data => {
|
||||
// if (data.code === 200) {
|
||||
// message.success(i18n.message.deleteSuccess());
|
||||
// this.getTableInfo();
|
||||
// } else {
|
||||
// message.warning(data.msg);
|
||||
// }
|
||||
// }).catch(error => {
|
||||
// message.warning(error.msg);
|
||||
// })
|
||||
Api.deleteTableData(params).then(response => {
|
||||
return response.json()
|
||||
}).then(data => {
|
||||
if (data.code === 200) {
|
||||
message.success(i18n.message.deleteSuccess());
|
||||
this.getTableInfo();
|
||||
} else {
|
||||
message.warning(data.msg);
|
||||
}
|
||||
}).catch(error => {
|
||||
message.warning(error.msg);
|
||||
})
|
||||
}
|
||||
|
||||
save() {
|
||||
let params = {
|
||||
...this.form.getFormParams()
|
||||
};
|
||||
// this.form.validateForm().then(f => {
|
||||
// if (f.isValid) {
|
||||
// Api.add(params).then(response => {
|
||||
// return response.json()
|
||||
// }).then(data => {
|
||||
// if (data.code === 200) {
|
||||
// message.success(data.msg);
|
||||
// this.getTableInfo();
|
||||
// this.setVisible(false);
|
||||
// } else {
|
||||
// message.warning(data.msg);
|
||||
// }
|
||||
// }).catch(error => {
|
||||
// message.warning(error.msg);
|
||||
// })
|
||||
// } else {
|
||||
// f.showErrors();
|
||||
// this.setDate(new Date());
|
||||
// }
|
||||
// });
|
||||
this.form.validateForm().then(f => {
|
||||
if (f.isValid) {
|
||||
Api.add(params).then(response => {
|
||||
return response.json()
|
||||
}).then(data => {
|
||||
if (data.code === 200) {
|
||||
message.success(data.msg);
|
||||
this.getTableInfo();
|
||||
this.setVisible(false);
|
||||
} else {
|
||||
message.warning(data.msg);
|
||||
}
|
||||
}).catch(error => {
|
||||
message.warning(error.msg);
|
||||
})
|
||||
} else {
|
||||
f.showErrors();
|
||||
this.setDate(new Date());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
edit() {
|
||||
let params = { ...this.form.getFormParams(), id: this.sequenceId };
|
||||
// this.form.validateForm().then(f => {
|
||||
// if (f.isValid) {
|
||||
// Api.edit(params).then(response => {
|
||||
// return response.json()
|
||||
// }).then(data => {
|
||||
// if (data.code === 200) {
|
||||
// message.success(data.msg);
|
||||
// this.getTableInfo();
|
||||
// this.setVisible(false);
|
||||
// } else {
|
||||
// message.warning(data.msg);
|
||||
// }
|
||||
// }).catch(error => {
|
||||
// message.warning(error.msg);
|
||||
// })
|
||||
// } else {
|
||||
// f.showErrors();
|
||||
// this.setDate(new Date());
|
||||
// }
|
||||
// });
|
||||
this.form.validateForm().then(f => {
|
||||
if (f.isValid) {
|
||||
Api.edit(params).then(response => {
|
||||
return response.json()
|
||||
}).then(data => {
|
||||
if (data.code === 200) {
|
||||
message.success(data.msg);
|
||||
this.getTableInfo();
|
||||
this.setVisible(false);
|
||||
} else {
|
||||
message.warning(data.msg);
|
||||
}
|
||||
}).catch(error => {
|
||||
message.warning(error.msg);
|
||||
})
|
||||
} else {
|
||||
f.showErrors();
|
||||
this.setDate(new Date());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
changeData(key) {
|
||||
|
|
@ -159,17 +159,17 @@ export class SequenceStore {
|
|||
forbiddenTag: checked,
|
||||
id: id
|
||||
}
|
||||
// Api.updateForbiddenTag(params).then(response => {
|
||||
// return response.json()
|
||||
// }).then(data => {
|
||||
// if (data.code === 200) {
|
||||
// message.success(data.msg);
|
||||
// } else {
|
||||
// message.warning(data.msg);
|
||||
// }
|
||||
// }).catch(error => {
|
||||
// message.warning(error.msg);
|
||||
// })
|
||||
Api.updateForbiddenTag(params).then(response => {
|
||||
return response.json()
|
||||
}).then(data => {
|
||||
if (data.code === 200) {
|
||||
message.success(data.msg);
|
||||
} else {
|
||||
message.warning(data.msg);
|
||||
}
|
||||
}).catch(error => {
|
||||
message.warning(error.msg);
|
||||
})
|
||||
}
|
||||
|
||||
getForm() {
|
||||
|
|
@ -177,7 +177,7 @@ export class SequenceStore {
|
|||
id: this.sequenceId
|
||||
}
|
||||
this.setDialogLoadingStatus(true);
|
||||
Api.getLevelForm(params).then(res => {
|
||||
Api.getSequenceForm(params).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.setDialogLoadingStatus(false);
|
||||
res.data.condition && this.setCondition(res.data.condition);
|
||||
|
|
@ -193,31 +193,31 @@ export class SequenceStore {
|
|||
|
||||
getSearchCondition() {
|
||||
this.setScLoadingStatus(false);
|
||||
// Api.getAdvanceSearchCondition().then(res => {
|
||||
// if (res.code === 200) {
|
||||
// this.setScLoadingStatus(false);
|
||||
// res.data.conditions && this.setSearchCondition(res.data.conditions);
|
||||
// res.data.conditions && this.form2.initFormFields(res.data.conditions);
|
||||
// } else {
|
||||
// message.warning(res.msg);
|
||||
// }
|
||||
// }, error => {
|
||||
// message.warning(error.msg);
|
||||
// })
|
||||
Api.getAdvanceSearchCondition().then(res => {
|
||||
if (res.code === 200) {
|
||||
this.setScLoadingStatus(false);
|
||||
res.data.conditions && this.setSearchCondition(res.data.conditions);
|
||||
res.data.conditions && this.form2.initFormFields(res.data.conditions);
|
||||
} else {
|
||||
message.warning(res.msg);
|
||||
}
|
||||
}, error => {
|
||||
message.warning(error.msg);
|
||||
})
|
||||
}
|
||||
|
||||
@action
|
||||
getTabInfo() {
|
||||
// Api.getTabInfo().then(res => {
|
||||
// if (res.code === 200) {
|
||||
// res.data.topTabs && this.setTopTab(res.data.topTabs);
|
||||
// res.data.topTabCount && this.setTopTabCount(res.data.topTabCount);
|
||||
// } else {
|
||||
// message.warning(res.msg);
|
||||
// }
|
||||
// }, error => {
|
||||
// message.warning(error.msg);
|
||||
// })
|
||||
Api.getTabInfo().then(res => {
|
||||
if (res.code === 200) {
|
||||
res.data.topTabs && this.setTopTab(res.data.topTabs);
|
||||
res.data.topTabCount && this.setTopTabCount(res.data.topTabCount);
|
||||
} else {
|
||||
message.warning(res.msg);
|
||||
}
|
||||
}, error => {
|
||||
message.warning(error.msg);
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,22 +1,32 @@
|
|||
/* 公共样式 */
|
||||
.hrm-loading-center-small{
|
||||
position: absolute;
|
||||
top:50%;
|
||||
left:50%;
|
||||
margin-left:-8px;
|
||||
margin-top: -8px;
|
||||
}
|
||||
|
||||
.hrm-dialog-form{
|
||||
padding-top: 27px;
|
||||
padding-right: 8%;
|
||||
padding-left: 8%;
|
||||
padding-bottom: 25px;
|
||||
|
||||
.wea-upload-list-item {
|
||||
& > div{
|
||||
width: 400px !important;
|
||||
line-height: 30px;
|
||||
}
|
||||
.hrm-loading-center-small {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
margin-left: -8px;
|
||||
margin-top: -8px;
|
||||
}
|
||||
|
||||
.hrm-dialog-form {
|
||||
padding-top: 27px;
|
||||
padding-right: 8%;
|
||||
padding-left: 8%;
|
||||
padding-bottom: 25px;
|
||||
|
||||
.wea-upload-list-item {
|
||||
&>div {
|
||||
width: 400px !important;
|
||||
line-height: 30px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//集团管理
|
||||
.organization-group {
|
||||
padding-left: 25%;
|
||||
padding-right: 25%;
|
||||
padding-top: 28px;
|
||||
height: calc(100% - 47px);
|
||||
overflow: auto;
|
||||
}
|
||||
Loading…
Reference in New Issue