import { request } from '@/utils'
export const GetUserList = (data: any) =>
  request({
    url: `/user/list`,
    method: 'get',
    data
  })

export const PostUser = (data: any) =>
  request({
    url: `/user`,
    method: 'post',
    data,
  })

export const PutUser = (data: any) =>
  request({
    url: `/user`,
    method: 'put',
    data
  })

export const PutUserBth = (data: any) =>
  request({
    url: `/user/bth`,
    method: 'put',
    data
  })
export const DeleteUser = (data: any) =>
  request({
    url: `/user`,
    method: 'delete',
    data
  })

export const PutUserPwd = (data: { id: string, pwd: string }) =>
  request({
    url: `/user/pwd`,
    method: 'put',
    data
  })

export const GetSubDpList = () =>
  request({
    url: `/pub/sub-dp-list`,
    method: 'get',
  })

export const GetRoleDpList = () =>
  request({
    url: `/pub/role-dp-list`,
    method: 'get',
  })

export const PostUserImport = (data: any) =>
  request({
    url: `/user/import`,
    method: 'post',
    data
  })

export const GetSigninList = () =>
  request({
    url: `/user/signin-list`,
    method: 'get',
  })

export const PostUserImportSigninList = (data: any) =>
  request({
    url: `/user/import/signin-list`,
    method: 'post',
    data
  })

export const GetSigns = (uid: string) =>
  request({
    url: `/user/signs?uid=${uid}`,
    method: 'get',
  })

export const PutSigns = (uid: string, data: any) =>
  request({
    url: `/user/signs?uid=${uid}`,
    method: 'put',
    data,
  })
