08335 / hivui-platform-template
hivui平台项目模板
Newer
Older
hivui-platform-template / project / hivuiBirt / mixins / permission_check.js
import request from '@birt/funclib/AxiosUtil'
import { addPermission, getResData, getOrgData, getRoleData,getDataAccess } 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?pn = ' + pn,
        method: 'post',
        data:params
      })
    },
    //  根据功能查询反查
    getPermissionByResAll(params){
      return request({
        url: '/sys/auth/query-all-res?pn = ' + pn,
        method: 'post',
        data:params
      })
    }
  }
}