import request from '@birt/funclib/AxiosUtil'
import { getResData } from "@birt/api/user";
export default {
  methods:{
    loadMethodC(store, loadCdion, option, resolve) {
      setTimeout(() => {
        let me = this;
        getResData().then(res => {
          if (res.status == 200) {
            me.resData = res.dataPack;
            me.addOpetionData(me.resData, me.rData);
            console.log("resources 2222222", me.resData);
            option = option || {};
            resolve.call(store, me.resData, option);
          }
        });
      }, 50);
    },
    //  根据用户查询反查
    getPermissionByUer(params){
      return request({
        url: '/sys/auth/query-all-user',
        method: 'post',
        data:params
      })
    },
    //  根据功能查询反查
    getPermissionByResAll(params){
      return request({
        url: '/sys/auth/query-all-res',
        method: 'post',
        data:params
      })
    }
  }
}