import request from '@/utils/request'
import state from '@/store'
import router from '@/router'

export function InitRolefunction() {
  return request({
    url: '',
    method: 'post',
    data: {
      UserID: state.state.user.id,
      ModularID: router.currentRoute.path,
      type: '1',
      name: '菜单系统模块_项目角色_查询数据_MESWORK'
    }
  })
}
export function deleteData(code) {
  return request({
    url: '',
    method: 'post',
    data: {
      UserID: state.state.user.id,
      ModularID: router.currentRoute.path,
      type: 2,
      name: '菜单系统模块_项目角色_删除_MESWORK',
      param: '角色编号=' + code + '=int'
    }
  })
}
export function searchTable(num) {
  return request({
    url: '',
    method: 'post',
    data: {
      UserID: state.state.user.id,
      ModularID: router.currentRoute.path,
      type: '1',
      name: '菜单系统模块_项目角色_查询数据_MESWORK',
      param: '角色功能=' + num + '=string'
    }
  })
}
export function addData(code) {
  return request({
    url: '',
    method: 'post',
    data: {
      UserID: state.state.user.id,
      ModularID: router.currentRoute.path,
      type: 2,
      name: '菜单系统模块_项目角色_增加_MESWORK',
      param: '角色功能=' + code + '=string'
    }
  })
}
export function addData2(code1, num1) {
  return request({
    url: '',
    method: 'post',
    data: {
      UserID: state.state.user.id,
      ModularID: router.currentRoute.path,
      type: 2,
      name: '菜单系统模块_项目角色_修改数据_MESWORK',
      param: '角色功能=' + code1 + '&角色编号=' + num1
    }
  })
}

