import request from '@/assets/js/utils/request'

// 创建申请画面的选择标段的列表数据
export function getTenderAndPackageList(data) {
  return request({
    url:
        '/bidprocurement/expertscloud-extract/extract/expertExtractApply/getTenderAndPackageList',
    method: 'post',
    data
  })
}

// 项目经理提交、保存或者修改抽取申请相关信息
export function submitOrsaveExtractApplyByTenderManager(data) {
  return request({
    url:
        '/bidprocurement/expertscloud-extract/extract/expertExtractApply/submitOrsaveExtractApplyByTenderManager',
    method: 'post',
    data
  })
}
// 专家评标专业树
export function expertPurcatalogCategorySpecial(data) {
  return request({
    url:
        '/bidprocurement/expertscloud-expert/common/expertPurcatalogCategorySpecial/queryExpertSepcialLisByUserId?parentId=' +
        data,
    method: 'post'
  })
}

// 根据申请id获取申请详情
export function getExtractExpertDetailById(id) {
  return request({
    url:
        '/bidprocurement/expertscloud-extract/extract/expertExtractApply/getExtractExpertDetailById' +
        '?id=' +
        id,
    method: 'post'
  })
}

// 根据专家用户id获取专家成果信息
export function getExpertAchievementById(data) {
  return request({
    url: '/bidprocurement/expertscloud-expert/info/exptExpertAchievementController/getExpertAchievementById',
    method: 'post',
    data
  })
}
// 获取已经存在的专家单位
export function getAlreadyExistExpertComName(data) {
  return request({
    url:
      '/bidprocurement/expertscloud-expert/info/exptExpertInfoController/getAlreadyExistExpertComName',
    method: 'post',
    data
  })
}

// 选择专家列表
export function getExpertList(data) {
  return request({
    url: '/bidprocurement/expertscloud-extract/extract/expertExtractApply/getExpertList',
    method: 'post',
    data
  })
}

// 选择专家库列表
export function getExpertCompanyList(data) {
  return request({
    url:
      '/bidprocurement/expertscloud-extract/extract/expertExtractApply/getExpertCompanyList',
    method: 'post',
    data
  })
}

// 选择部门列表
export function getExpertDepartList(data) {
  return request({
    url:
      '/bidprocurement/expertscloud-extract/extract/expertExtractApply/getExpertDepartList',
    method: 'post',
    data
  })
}

// 回避部门列表
export function getDetailExpertAvoidDepartList(data) {
  return request({
    url:
      '/bidprocurement/expertscloud-extract/extract/expertExtractApply/getDetailExpertAvoidDepartList?applyId=' +
      data,
    method: 'post'
  })
}

// 专家库列表
export function getDetailExpertCompanyList(data) {
  return request({
    url:
      '/bidprocurement/expertscloud-extract/extract/expertExtractApply/getDetailExpertCompanyList?applyId=' +
      data,
    method: 'post'
  })
}

// 申请人申请列表数据
export function getExtractExpertApplyListByCreateUser(data) {
  return request({
    url:
      '/bidprocurement/expertscloud-extract/extract/expertExtractApply/getExtractExpertApplyListByCreateUser',
    method: 'post',
    data
  })
}
// 管理员删除抽取申请相关信息
export function adminDeleteTBExpertExtractApplyInfobyid(data) {
  return request({
    url:
      '/bidprocurement/expertscloud-extract/extract/expertExtractApply/adminDeleteTBExpertExtractApplyInfobyid',
    method: 'post',
    data
  })
}
// 管理员撤回抽取申请信息
export function withdrawTBExpertExtractApplyInfobyid(data) {
  return request({
    url:
      '/bidprocurement/expertscloud-expert/expertManage/expertManageController/withdrawTBExpertExtractApplyInfobyid',
    method: 'post',
    data
  })
}

// 管理员审核抽取申请信息
export function adminAuditExtractApply(data) {
  return request({
    url:
      '/bidprocurement/expertscloud-extract/extract/expertExtractApply/adminAuditExtractApply',
    method: 'post',
    data
  })
}
// 管理员导出抽取专家基本信息
export function adminExportExtractExpertBaseInfo(data) {
  return request({
    url:
      '/bidprocurement/expertscloud-expert/expertManage/expertManageController/adminExportExtractExpertBaseInfo',
    method: 'post',
    data: data,
    responseType: 'blob'
  })
}

// 添加指定专家
export function saveExpertByApplyId(data) {
  return request({
    url:
      '/bidprocurement/expertscloud-extract/extract/expertExtractApply/saveExpertByApplyId',
    method: 'post',
    data
  })
}

// 补抽画面根据申请id查询抽取条件记录
export function getExtractExpertConditionHistoryById(id) {
  return request({
    url:
      '/bidprocurement/expertscloud-extract/extract/expertExtractApply/getExtractExpertConditionHistoryById?id=' +
      id,
    method: 'post'
  })
}

// 补抽画面根据申请id查询抽取条件记录
export function saveCondition(data) {
  return request({
    url: '/bidprocurement/expertscloud-extract/extract/expertExtractApply/saveCondition',
    method: 'post',
    data
  })
}
