//name名稱 不能和 comboboxName的名稱同樣
{ display: "部門", name: "dept", newline: false, width: 250, type:"select", cssClass: "field",attr: { op: "in",ltype:"select"},comboboxName: "deptSelect",
options: {
onButtonClick: function (){
if($("[name=deptType]").val() == deptTypeId){
return;
}
deptTypeId=$("[name=deptType]").val();//獲取值
var urlTree= rootPath+'/dataProject/getHrDeptTreeByCategoryId?deptTypeId='+deptTypeId+'&category_id='+category_id;
//treeSelect.reload();//有效果,不能動態
treeSelect.clear();
treeSelect.loadData('', urlTree, '');//能夠動態
},
selectBoxWidth: 350,
selectBoxHeight: 350,
valueField: '_id',
textField: 'name',
treeLeafOnly:false, //只對樹葉節點有效
autocomplete:true, //自動完成,點擊按鈕能夠自動 下拉顯示數據
tree: {
url: rootPath+'/dataProject/getHrDeptTreeByCategoryId?deptTypeId=all',
checkbox: false,
isExpand:false,
nodeWidth : 150,
childIcon:'folder',
idFieldName:'_id',
textFieldName:'name',
onSuccess:function(data){
treeSelect=this;
}
}
}
}css
treeSelect.cancelSelect(); //取消選擇 樹下拉 取消選擇 node