import http from '@/service'

// 分页获取资讯列表
export function getListApi(params: any) {
  return http.get(`/admin/wmscorepackage/selectWmScorePackageLists`, { params })
}

// 关联服务企业
export function getListCsoByIdApi() {
  return http.get(`/admin/wmdaagent/listCsoById`)
}

// 获取通过的计划包
export function getPlanListApi(params: any) {
  return http.get(`/admin/plan/list`, { params })
}

// 选择可分配甲方
export function selectKfpjfApi(params: any) {
  return http.get(`/admin/wmscorepackage/selectKfpjf`, { params })
}

// 保存执行包
export function wmscorepackageSaveApi(data: any) {
  return http.post(`/admin/wmscorepackage/saves`, data)
}

// 编辑 updateByIds
export function wmscorepackageUpdateByIdsApi(data: any) {
  return http.post(`/admin/wmscorepackage/updateByIds`, data)
}

// 获取详情
export function getSelectWmScorePackageApi(data: any) {
  return http.post(`/admin/wmscorepackage/selectWmScorePackage`, data)
}

// 根据关联服务企业显示对应得执行包
export function getSelectRelationScoreIdApi(params: any) {
  return http.get(`/admin/wmscorepackage/selectRelationScoreId`, { params })
}

// 终止企业执行包
export function stopWmScorePackageApi(data: any) {
  return http.post(`/admin/wmscorepackage/stopWmScorePackage`, data)
}

//  终止个人执行包
export function updateEnableApi(params: any) {
  return http.get(`/admin/wmscorepackage/updateEnable`, { params })
}


//  获取企业
export function getListAncestorApi(params: any) {
  return http.get(`/admin/dept/list/ancestor`, { params })
}
