viewModel.on("beforeSearch", function (args) { debugger; //根据用户ID查询员工ID var proxykey1 = cb.rest.DynamicProxy.create({ ensure: { url: '/wuser/getCurrentUser', method: 'POST', options: { domainKey: "sanxia" } } }); let currentStaff = proxykey1.ensureSync()//同步调用 let user = { userId :currentStaff.data } var proxykey = cb.rest.DynamicProxy.create({ ensure: { url: '/PrintPersonInformation/getStaffId?code='+user['userId']+'&certNo=""', method: 'GET', options: { domainKey: "sanxia" } } }); let staff = proxykey.ensureSync();//同步调用 args.params.condition.simpleVOs=[ { "logicOp": "and", "conditions": [{ "field": "staff_id", "op": "eq", "value1": staff.result.staffId, }] } ]; });
标签:查看,cb,userId,ensureSync,rest,let,移动,BIP,staff From: https://www.cnblogs.com/LFxanla/p/17997712