Compare commits
No commits in common. "7175b6c6dbf33912c3239f912bc94ebdf191aa79" and "105d904e21325f7fea30d4dbd6e9d864338629ff" have entirely different histories.
7175b6c6db
...
105d904e21
@ -7,7 +7,6 @@ import { connect } from 'dva';
|
||||
import moment from 'moment';
|
||||
|
||||
class SEConfigPage extends React.Component {
|
||||
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
@ -27,16 +26,12 @@ class SEConfigPage extends React.Component {
|
||||
DEP_TRAIN_PLAN_START_TIME: null,
|
||||
DEP_TRAIN_PLAN_END_TIME: null,
|
||||
TRAIN_SURVEY_TRIGGER_TIME: null,
|
||||
APPROVAL_ROLE_ID: null,
|
||||
optionsSelect: null
|
||||
},
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
componentDidMount() {
|
||||
this.ini();
|
||||
// this.loadData();
|
||||
this.loadData();
|
||||
}
|
||||
BtnClose = () => {
|
||||
if (typeof this.props.closeFn != "undefined")
|
||||
@ -47,25 +42,6 @@ class SEConfigPage extends React.Component {
|
||||
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 = () => {
|
||||
let json = initFilter(this.props.login.OrgId);
|
||||
json.Parameter22 = this.props.data.ORG_ID_HV;
|
||||
@ -75,7 +51,6 @@ class SEConfigPage extends React.Component {
|
||||
url: 'SE/SEConfig/Entities',
|
||||
onComplete: (ret) => {
|
||||
if (ret && ret.length > 0) {
|
||||
ret[0].optionsSelect = this.state.data.optionsSelect
|
||||
this.setState({ data: ret[0] });
|
||||
}
|
||||
}
|
||||
@ -116,31 +91,9 @@ 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() {
|
||||
const { data } = this.state;
|
||||
const dateFormat = 'MM-DD';
|
||||
const { Option } = Select;
|
||||
return <>
|
||||
<div style={{ padding: '10px' }}>
|
||||
<Button style={{ marginLeft: '8px' }} onClick={() => this.onSave()} icon="save" type="primary" loading={this.state.isLoading}>保存</Button>
|
||||
@ -307,7 +260,7 @@ class SEConfigPage extends React.Component {
|
||||
</tr>
|
||||
<tr>
|
||||
<td colSpan={4} rowSpan={1} >公司培训计划触发时间</td>
|
||||
<td colSpan={8} rowSpan={1} >
|
||||
<td colSpan={20} rowSpan={1} >
|
||||
<DatePicker
|
||||
format={dateFormat}
|
||||
value={data.DEP_TRAIN_PLAN_START_TIME ? moment(data.DEP_TRAIN_PLAN_START_TIME) : null}
|
||||
@ -318,41 +271,8 @@ class SEConfigPage extends React.Component {
|
||||
}}
|
||||
/>
|
||||
</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>
|
||||
|
||||
{/*
|
||||
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>
|
||||
<td colSpan={4} rowSpan={1} >部门培训计划发起时间</td>
|
||||
<td colSpan={20} rowSpan={1} >
|
||||
|
||||
Loading…
Reference in New Issue
Block a user