import request from '@/utils/request'
import qs from 'qs'

//查询个人信息
export function getOneself(data) {
  return request({
    url: '/user/getOneself',
    method: 'post',
    data
  })
}

//修改跟人信息
export function update(data) {
  return request({
    url: '/user/update',
    method: 'post',
    data
  })
}

//修改密码
export function passwordReset(data) {
  return request({
    url: '/user/passwordReset',
    method: 'post',
    data:qs.stringify(data)
  })
}

//添加员工
export function insertStaff(data) {
  return request({
    url: '/user/insertStaff',
    method: 'post',
    data
  })
}
//查询员工
export function secletStaff(data) {
  return request({
    url: '/user/secletStaff',
    method: 'post',
    data
  })
}
//强制修改员工密码
export function staffpassword(data) {
  return request({
    url: '/user/staffpassword',
    method: 'post',
    data:qs.stringify(data)
  })
}
//获取全部员工不带分页
export function secletAllStaff(data) {
  return request({
    url: '/user/secletAllStaff',
    method: 'post',
    data
  })
}
//修改员工权限
export function updateRole(data){
  return request({
    url:'/user/updatastaffrole',
    method:'post',
    data:data
  })
}