import http from '@/service'

//
export function getListApi(params: any) {
  return http.get(`/admin/wmscorepackage/getScorePackagePage`, { params })
}

export function getTypeidPersonalApi() {
  return http.get(`/admin/dict/type/typeid_personal`)
}

export function getObjectScopeListApi(roleId: string) {
  return http.get(`/admin/user/list/available?role=${roleId}`)
}

export function getWmscorepackageSnApi() {
  return http.get(`/admin/wmscorepackage/sn`)
}

export function getPackageScopeListApi() {
  return http.get(`/admin/team/list-package-user-scope`)
}

// 关联服务企业
export function getAllParentDeptApi() {
  return http.get(`/admin/dept/getAllParentDept`)
}

// 获取关联任务执行包
export function getRelationScoreListApi(params: any) {
  return http.get('/admin/wmscorepackage/getRelationScoreList', { params })
}

// 发包
export function addWmScorePackageApi(data: any) {
  return http.post('/admin/wmscorepackage/addWmScorePackage', data)
}

// 获取执行包任务类型
export function selectByScorePackageIdById(params: any) {
  return http.get('/admin/wmscoretasktype/selectByScorePackageId', { params })
}

// 关联服务企业
export function getListAncestor() {
  return http.get(`/admin/dept/list/ancestor`)
}
