Compare commits
2 Commits
105d904e21
...
7175b6c6db
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7175b6c6db | ||
|
|
9763a60eed |
@ -7,6 +7,7 @@ import { connect } from 'dva';
|
|||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
|
|
||||||
class SEConfigPage extends React.Component {
|
class SEConfigPage extends React.Component {
|
||||||
|
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
@ -26,12 +27,16 @@ class SEConfigPage extends React.Component {
|
|||||||
DEP_TRAIN_PLAN_START_TIME: null,
|
DEP_TRAIN_PLAN_START_TIME: null,
|
||||||
DEP_TRAIN_PLAN_END_TIME: null,
|
DEP_TRAIN_PLAN_END_TIME: null,
|
||||||
TRAIN_SURVEY_TRIGGER_TIME: null,
|
TRAIN_SURVEY_TRIGGER_TIME: null,
|
||||||
|
APPROVAL_ROLE_ID: null,
|
||||||
|
optionsSelect: null
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
this.loadData();
|
this.ini();
|
||||||
|
// this.loadData();
|
||||||
}
|
}
|
||||||
BtnClose = () => {
|
BtnClose = () => {
|
||||||
if (typeof this.props.closeFn != "undefined")
|
if (typeof this.props.closeFn != "undefined")
|
||||||
@ -42,6 +47,25 @@ class SEConfigPage extends React.Component {
|
|||||||
this.props.onCancel();
|
this.props.onCancel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
ini = () => {
|
||||||
|
let json = initFilter(this.props.login.OrgId);
|
||||||
|
json.Parameter22 = this.props.data.ORG_ID_HV;
|
||||||
|
var that = this
|
||||||
|
this.props.dispatch({
|
||||||
|
type: 'app/getDataByPost',
|
||||||
|
payload: json,
|
||||||
|
url: 'PF/ApprovalRole/Entities',
|
||||||
|
onComplete: (ret) => {
|
||||||
|
if (ret && ret.length > 0) {
|
||||||
|
let data = this.state.data;
|
||||||
|
data.optionsSelect = ret;
|
||||||
|
this.setState(data)
|
||||||
|
this.loadData()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
loadData = () => {
|
loadData = () => {
|
||||||
let json = initFilter(this.props.login.OrgId);
|
let json = initFilter(this.props.login.OrgId);
|
||||||
json.Parameter22 = this.props.data.ORG_ID_HV;
|
json.Parameter22 = this.props.data.ORG_ID_HV;
|
||||||
@ -51,6 +75,7 @@ class SEConfigPage extends React.Component {
|
|||||||
url: 'SE/SEConfig/Entities',
|
url: 'SE/SEConfig/Entities',
|
||||||
onComplete: (ret) => {
|
onComplete: (ret) => {
|
||||||
if (ret && ret.length > 0) {
|
if (ret && ret.length > 0) {
|
||||||
|
ret[0].optionsSelect = this.state.data.optionsSelect
|
||||||
this.setState({ data: ret[0] });
|
this.setState({ data: ret[0] });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -91,9 +116,31 @@ class SEConfigPage extends React.Component {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
onselectChange = (value) => {
|
||||||
|
debugger
|
||||||
|
let data = this.state.data;
|
||||||
|
data.APPROVAL_ROLE_ID = value;
|
||||||
|
this.setState(data)
|
||||||
|
}
|
||||||
|
|
||||||
|
onBlur = () => {
|
||||||
|
console.log('blur');
|
||||||
|
}
|
||||||
|
|
||||||
|
onFocus = () => {
|
||||||
|
console.log('focus');
|
||||||
|
}
|
||||||
|
|
||||||
|
onSearch = (val) => {
|
||||||
|
console.log('search:', val);
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { data } = this.state;
|
const { data } = this.state;
|
||||||
const dateFormat = 'MM-DD';
|
const dateFormat = 'MM-DD';
|
||||||
|
const { Option } = Select;
|
||||||
return <>
|
return <>
|
||||||
<div style={{ padding: '10px' }}>
|
<div style={{ padding: '10px' }}>
|
||||||
<Button style={{ marginLeft: '8px' }} onClick={() => this.onSave()} icon="save" type="primary" loading={this.state.isLoading}>保存</Button>
|
<Button style={{ marginLeft: '8px' }} onClick={() => this.onSave()} icon="save" type="primary" loading={this.state.isLoading}>保存</Button>
|
||||||
@ -260,7 +307,7 @@ class SEConfigPage extends React.Component {
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colSpan={4} rowSpan={1} >公司培训计划触发时间</td>
|
<td colSpan={4} rowSpan={1} >公司培训计划触发时间</td>
|
||||||
<td colSpan={20} rowSpan={1} >
|
<td colSpan={8} rowSpan={1} >
|
||||||
<DatePicker
|
<DatePicker
|
||||||
format={dateFormat}
|
format={dateFormat}
|
||||||
value={data.DEP_TRAIN_PLAN_START_TIME ? moment(data.DEP_TRAIN_PLAN_START_TIME) : null}
|
value={data.DEP_TRAIN_PLAN_START_TIME ? moment(data.DEP_TRAIN_PLAN_START_TIME) : null}
|
||||||
@ -271,8 +318,41 @@ class SEConfigPage extends React.Component {
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</td>
|
</td>
|
||||||
|
<td colSpan={4} rowSpan={1} >接收角色</td>
|
||||||
|
<td colSpan={8} rowSpan={1} >
|
||||||
|
<Select
|
||||||
|
showSearch
|
||||||
|
style={{ width: 300 }}
|
||||||
|
placeholder="请选择接收角色"
|
||||||
|
value={data.APPROVAL_ROLE_ID}
|
||||||
|
onChange={(value) => {
|
||||||
|
data.APPROVAL_ROLE_ID = value;
|
||||||
|
this.setState(data)
|
||||||
|
}}
|
||||||
|
filterOption={(input, option) =>
|
||||||
|
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||||
|
}
|
||||||
|
>
|
||||||
|
{data.optionsSelect?.map(item =>
|
||||||
|
(<Option key={item.ID} value={item.ID} label={item.NAME} >{item.NAME}</Option>)
|
||||||
|
)}
|
||||||
|
</Select>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
{/*
|
||||||
|
render: (text, record, index) => {
|
||||||
|
return <Select value={text != "-1" ? text : ""} optionFilterProp='name' onChange={(e) => this.onSelectChange(e, record, 'PLATFORM_TYPE', index)}>
|
||||||
|
{
|
||||||
|
enums && enums.CMEvaluateStatusEnum && enums.CMEvaluateStatusEnum.options ? enums.CMEvaluateStatusEnum.options.map(t => {
|
||||||
|
return <Option value={t.value}>{t.label}</Option>
|
||||||
|
}) : null
|
||||||
|
}
|
||||||
|
</Select>;
|
||||||
|
|
||||||
|
*/}
|
||||||
|
|
||||||
|
|
||||||
{/* <tr>
|
{/* <tr>
|
||||||
<td colSpan={4} rowSpan={1} >部门培训计划发起时间</td>
|
<td colSpan={4} rowSpan={1} >部门培训计划发起时间</td>
|
||||||
<td colSpan={20} rowSpan={1} >
|
<td colSpan={20} rowSpan={1} >
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user