import request from '@/utils/request'

// 获取授权列表数据
export function getAuthLists(params) {
  return request({
    url: 'workorderapi/api/cusauthmanage/getlistbypage',
    method: 'get',
    params
  })
}

// 获取授权详情数据
export function getAuth(id) {
  return request({
    url: 'workorderapi/api/cusauthmanage/getsingle',
    method: 'get',
    params: {
      id
    }
  })
}

// 添加授权数据
export function addAuth(data) {
  return request({
    url: 'workorderapi/api/cusauthmanage/add',
    method: 'post',
    data
  })
}

// 编辑授权数据
export function editAuth(data) {
  return request({
    url: 'workorderapi/api/cusauthmanage/update',
    method: 'post',
    data
  })
}

// 删除授权数据
export function deleteAuth(ids) {
  return request({
    url: 'workorderapi/api/cusauthmanage/delete',
    method: 'post',
    data: {
      ids
    }
  })
}

// 获取授权到期提醒
export function getAuthReminder(daykind) {
  return request({
    url: 'workorderapi/api/cusauthmanage/gettxlist',
    method: 'get',
    params: {
      daykind // 日期类型，传值0为获取到期前15天信息，1为到期当天
    }
  })
}

// （post）导入授权信息 workorderapi/api/cusauthmanage/importexcel
