BIP移动端只能查看到自己的数据

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,
        }]
           
      }
    ];
});

  

 

posted @ 2024-01-30 18:15  龙旋风  阅读(22)  评论(0编辑  收藏  举报