import request from '@/utils/request'

export function login(username, password) {
  return request({
    url: '',
    method: 'post',
    data: {
      type: '1',
      name: '菜单系统模块_用户名密码_查询数据_new2',
      param: `用户名=${username}&密码=${password}`
    }
  })
}
export function getInfo(token) {
  return request({
    url: '',
    method: 'post',
    data: {
      type: '1',
      name: `菜单系统模块_获取角色模块_查询数据`,
      param: `角色编号=${token}`
    }
  })
}
export function getRoleInfo(id) {
  return request({
    url: '',
    method: 'post',
    data: {
      type: '1',
      name: `CATL_三级权限_查询节点`,
      param: `人员编号=${id}`
    }
  })
}
// 查询按钮功能实现
export function editPassword(num1, num2, num3, num4) {
  return request({
    url: '',
    method: 'post',
    data: {
      type: '2',
      name: '账号信息_修改密码_MESWORK',
      param: '考勤编号=' + num1 + '=int&原始密码=' + num2 + '=string&新密码=' + num3 + '=string&返回=' + num4 + '=string=output'
    }
  })
}
export function cloudEditPassword(num1, num2) {
  return request({
    url: '',
    method: 'post',
    data: {
      type: '2',
      name: '人事档案管理_人员名单_云上改密码',
      param: 'id=' + num1 + '=int&新密码=' + num2 + '=string'
    }
  })
}
