cmp.selectOrg2 类
轻表单选择
构造函数
cmp.selectOrg2
cmp.selectOrg2
(
-
id
-
options
)
Object
参数:
名称 | 类型 | 标识 | 描述 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id
| String | 必选 | 选人组件唯一标识,如果该id对应页面上的控件的id,则选人组件会主动给该控件绑定点击事件,点击后进行选人业务 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
options
| Object | 必选 | 配置参数
|
返回值:
[Object]
选人组件对象
示例:
<script>
//======================轻表单选人====================================//
cmp.selectOrg("memberID",{
type:2,
fillBackData:[],
minSize:-1,
maxSize:-1,
selectType:"member",
multitype:false,
lightOptsChange:false, *
fillback: null,
excludeData:[{id:181818,name:"杨海",type:"member",disable:true}],
label:["dept","org","post","team","extP"],
vj:false,
callback:function(result){
result = cmp.parseJSON(result);
for(var i = 0;i< result.length; i ++){
console.log(cmp.parseJSON(result[i]));
}
},
closeCallback:function(){
//TODO
}
});
//===================================轻表单选部门===========================================//
cmp.selectOrg("departmentID",{
type:2,
fillBackData:[],
minSize:-1,
maxSize:-1,
selectType:"department",
lightOptsChange:false,
fillback: null,
excludeData:[{id:181818,name:"测试部",type:"department",disable:true}],
callback:function(result){
result = cmp.parseJSON(result);
for(var i = 0;i< result.length; i ++){
console.log(cmp.parseJSON(result[i]));
}
},
closeCallback:function(){
//TODO
}
});
//===================================轻表单选单位===========================================//
cmp.selectOrg("accountID",{
type:2,
fillBackData:[],
minSize:-1,
maxSize:-1,
selectType:"account",
lightOptsChange:false,
fillback: null,
excludeData:[{id:181818,name:"致远成都分公司",type:"account",disable:true}],
callback:function(result){
result = cmp.parseJSON(result);
for(var i = 0;i< result.length; i ++){
console.log(cmp.parseJSON(result[i]));
}
},
closeCallback:function(){
//TODO
}
});
//===================================轻表单选职务===========================================//
cmp.selectOrg("levelID",{
type:2,
fillBackData:[],
minSize:-1,
maxSize:-1,
selectType:"level",
lightOptsChange:false,
fillback: null,
excludeData:[{id:181818,name:"高手",type:"level",disable:true}],
callback:function(result){
result = cmp.parseJSON(result);
for(var i = 0;i< result.length; i ++){
console.log(cmp.parseJSON(result[i]));
}
},
closeCallback:function(){
//TODO
}
});
//===================================轻表单选岗位===========================================//
cmp.selectOrg("postID",{
type:2,
fillBackData:[],
minSize:-1,
maxSize:-1,
selectType:"post",
lightOptsChange:false,
fillback: null,
excludeData:[{id:181818,name:"测试岗",type:"post",disable:true}],
callback:function(result){
result = cmp.parseJSON(result);
for(var i = 0;i< result.length; i ++){
console.log(cmp.parseJSON(result[i]));
}
},
closeCallback:function(){
//TODO
}
});
</script>