Commit c1e330b9 by zhangleyuan

feat:增加参数

parent 6b2e7cf5
......@@ -24,6 +24,9 @@ function MemberTree(props) {
if(props.departmentId){
params.departmentId = props.departmentId;
}
if(props.nowTreeDepType){
params.nowTreeDepType = props.nowTreeDepType;
}
StoreService.getDepartmentUserNotPage(params).then((res) => {
let { departmentVOList=[]} = res.result;
let _treeData = handleData(departmentVOList);
......
......@@ -209,7 +209,12 @@ class NewChooseMembersModal extends React.Component {
}
getCompleteOptionData=(value)=>{
console.log('treeDepType',this.props.treeDepType);
if(!value){
this.setState({
searchUserResultList:{}
})
return
}
this.setState({
queryName:value
})
......@@ -252,7 +257,7 @@ class NewChooseMembersModal extends React.Component {
}
render() {
const {type,treeDepType,selectDep={}} = this.props;
const {type,treeDepType,selectDep={},addDepType=''} = this.props;
const { id=''} = selectDep;
const {selectUserList,selectObject,visible,openSetModal,searchUserResultList} = this.state;
const title = type === 'USER' ? '添加员工' : '添加学员';
......@@ -291,7 +296,7 @@ class NewChooseMembersModal extends React.Component {
{/* {this.Complete()} */}
<SearchUser onChange={(value)=>{this.getCompleteOptionData(value)}} data={searchUserResultList} onSelect={(record,type)=>{this.confirmSearchSelect(record,type)}}/>
<div className='container-left-body-table'>
<MemberTree departmentId={id} treeDepType={treeDepType} onSelect={(record)=>{this.treeSelect(record)}} selectUserList={selectUserList}/>
<MemberTree departmentId={id} treeDepType={treeDepType} nowTreeDepType={addDepType} onSelect={(record)=>{this.treeSelect(record)}} selectUserList={selectUserList} />
</div>
</div>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment