|
|
@@ -23,14 +23,6 @@ import {getIntValue, getStrValue, isObjEmpty} from "../../utils/common";
|
|
|
class LeaveAddCPage extends Component {
|
|
|
componentDidMount() {
|
|
|
this.node.scrollIntoView();
|
|
|
- /*getOrganization(ORGANIZATION_TEACHER, this.props.userInfo.userId, false)
|
|
|
- .then(organization => {
|
|
|
- this.setState({
|
|
|
- targetData: organization.teachers,
|
|
|
- })
|
|
|
- }).catch(error => {
|
|
|
-
|
|
|
- })*/
|
|
|
this.getOrganization()
|
|
|
}
|
|
|
|
|
|
@@ -71,7 +63,7 @@ class LeaveAddCPage extends Component {
|
|
|
const targetProps = {
|
|
|
targetData: this.state.targetData,
|
|
|
targetValues: this.state.targetList,
|
|
|
- title: '提交对象',
|
|
|
+ title: '接收人',
|
|
|
targetCount: this.state.targetCount,
|
|
|
onTargetChange: this.onTargetChange.bind(this),
|
|
|
onTargetFocus: this.onTargetFocus.bind(this),
|
|
|
@@ -81,7 +73,7 @@ class LeaveAddCPage extends Component {
|
|
|
const defaultTargetProps = {
|
|
|
targetData: [],
|
|
|
targetValues: this.state.targetList,
|
|
|
- title: '提交对象',
|
|
|
+ title: '接收人',
|
|
|
targetCount: this.state.targetCount,
|
|
|
onTargetChange: this.onTargetChange.bind(this),
|
|
|
onTargetFocus: this.onTargetFocus.bind(this),
|
|
|
@@ -136,17 +128,8 @@ class LeaveAddCPage extends Component {
|
|
|
beforeUpload={this.beforeUpload.bind(this)}
|
|
|
handleChange={this.handleChange.bind(this)}
|
|
|
/>
|
|
|
-
|
|
|
- {/*<div className="flex_center margin_top_20">*/}
|
|
|
- {/*<center><Button type="button" className="btn btn-primary comBtn_sty"*/}
|
|
|
- {/*onClick={this.onSubmitClick}>提交</Button></center>*/}
|
|
|
- {/*</div>*/}
|
|
|
<Button className='commonButton' type='primary' style={{margin: '35px'}}
|
|
|
onClick={this.onSubmitClick}>提交</Button>
|
|
|
- {/*<div*/}
|
|
|
- {/*onClick={this.clickLeaveList.bind(this)}*/}
|
|
|
- {/*className="leave-history flex_center text_underline">*/}
|
|
|
- {/*请假记录*/}
|
|
|
{/*</div>*/}
|
|
|
</div>
|
|
|
)
|
|
|
@@ -232,7 +215,7 @@ class LeaveAddCPage extends Component {
|
|
|
Toast.loading('', 0)
|
|
|
|
|
|
fetchGet(API.getAllTeacher, {
|
|
|
- schoolId: this.props.userInfo.user.userFunId,
|
|
|
+ schoolId: this.props.userInfo.user.schoolId,
|
|
|
// schoolId:1
|
|
|
}).then(response => {
|
|
|
Toast.hide()
|
|
|
@@ -250,17 +233,17 @@ class LeaveAddCPage extends Component {
|
|
|
title: getStrValue(teacherObj, 'teacherName'),
|
|
|
userId: getIntValue(teacherObj, 'teacherId'),
|
|
|
userPhone: getStrValue(teacherObj, 'userPhone'),
|
|
|
- value: getStrValue(teacherObj, 'teacherName') + `-1-${index}`,
|
|
|
- key: `1-${index}`,
|
|
|
- selectable:false
|
|
|
+ value: getStrValue(teacherObj, 'teacherName') + `-0-${index}`,
|
|
|
+ key: `0-${index}`,
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
|
|
|
targetData.push({
|
|
|
title: `全体老师`,
|
|
|
- value: `1`,
|
|
|
- key: `1`,
|
|
|
+ value: `0`,
|
|
|
+ key: `0`,
|
|
|
+ selectable:false,
|
|
|
children: teacherData,
|
|
|
})
|
|
|
}
|
|
|
@@ -290,19 +273,10 @@ class LeaveAddCPage extends Component {
|
|
|
|
|
|
onTargetFocus = (e) => {
|
|
|
if (isObjEmpty(this.state.targetData)) {
|
|
|
- /* getOrganization(ORGANIZATION_TEACHER, this.props.userInfo.userId, false)
|
|
|
- .then(organization => {
|
|
|
- this.setState({
|
|
|
- targetData: organization.teachers,
|
|
|
- })
|
|
|
- }).catch(error => {
|
|
|
-
|
|
|
- })*/
|
|
|
this.getOrganization()
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
onTargetChange = (value, label, checkNodes, count) => {
|
|
|
this.checkNodes = checkNodes
|
|
|
this.setState({
|