BIP给多选参照赋默认值
//资源申请详情03--页面初始化 viewModel.on('afterMount', function (data) { //获取查询区模型 let filterViewModelInfo = viewModel.getCache('FilterViewModel'); filterViewModelInfo.getParams().autoLoad = false; //原来默认查询功能关闭 filterViewModelInfo.on('afterInit', function(data){ //获取参照模型 let filterReferModel = filterViewModelInfo.get('zysq_peroson').getFromModel(); var proxy = cb.rest.DynamicProxy.create({ ensure: { url: '/authScheSet/checkUnique', method: 'GET', options: { domainKey: 'yjoa-appservice' } } }); // 调用 proxy.ensure({}, function(err, result) { if (err && err.message) { console.log(err); } else { if (result.status == 200) { console.log(result.status) } else { var myFilter = {"isExtend": true,simpleVOs:[]}; let value = []; value.push('1786214140580200456'); value.push("1794876007284473864"); myFilter.simpleVOs.push({ field: 'id', op: 'in', value1: value }); //设置过滤条件 filterReferModel.setFilter(myFilter); let item = viewModel.getCache('FilterViewModel').get('zysq_peroson').getFromModel(); cb.utils.triggerReferBrowse(item, [{ field:'id', op:'in',value1:value}]); // 给多选参照赋值 filterViewModelInfo.get("search").fireEvent("click");//自动触发点击查询按钮功能 } } }); }) });