ComboTree添加onchange事件监听后无法响应选中问题

提问 未结 1 8001
悬赏:20飞吻
 <div class="topjui-row">
<div class="topjui-col-sm12">
<label class="topjui-form-label">责任部门</label>
<div class="topjui-input-block">
<input type="text" name="OrganizeId" id="OrganizeId"
data-toggle="topjui-combotree"
data-options="
prompt:'必填',
textField:'text',
multiple:false,
required:true,
url:usercenterHost+'/api/usercenter/treeorganizesbycode',
expandUrl:usercenterHost+'/api/usercenter/treechildrenorganizesbycode?pid={id}',
getFatherIdsUrl:usercenterHost+'/api/usercenter/getfatheridsbycode?uuid={id}'">
</div>
</div>
</div>
<div class="topjui-row">
<div class="topjui-col-sm12">
<label class="topjui-form-label">责任岗位</label>
<div class="topjui-input-block">
<input type="text" name="PostId" id="PostId" data-toggle="topjui-combobox"
data-options="valueField:'id'">
</div>
</div>
</div>

<script>
$(function () {
$("#OrganizeId").iCombotree({
onChange: function (newValue, oldValue) {
$('#PostId').iCombobox('reload', usercenterHost + 'api/usercenter/postsbyorganizecode?orcode=' + newValue);
}
})
});
</script>
做了一个监听责任部门combotree的onchange方法,会出现如下两个问题:
1.责任部门下拉框会出现每10次有2-3次无法选中任何选项的问题
2.无法选中父级别的选项,去掉onchange监听就可以

帮看看这样写有啥问题么
回帖
回帖须知