import request from "@/utils/request.js";

// 按当前用户目录查询已映射机构非药物项目（分页）
export function getMappedNondrugItemList(data) {
  return request({
    url:
      "/basis/stitutionsnondrugMgr/mappedNondrugItemList?pageNum=" +
      data.pageNum +
      "&pageSize=" +
      data.pageSize,
    method: "post",
    data,
  });
}

// 获取机构非药物项目详情
export function getNondrugItemDetail(pid) {
  return request({
    url: "/basis/stitutionsnondrugMgr/getNondrugItem/" + pid,
    method: "get",
  });
}

// 适宜技术协定方列表
export function getSuitableTechList(data) {
  return request({
    url:
      "/basis/suitableTechnologyAccordMgr/listPain?pageNum=" +
      data.pageNum +
      "&pageSize=" +
      data.pageSize,
    method: "post",
    data,
  });
}

// 适宜技术协定方分组列表
export function getSuitableTechGroupedList(data) {
  return request({
    url: "/basis/suitableTechnologyAccordMgr/listGrouped",
    method: "post",
    data,
  });
}

// 适宜技术协定方医派信息查询
export function getPreSectInfo() {
  return request({
    url: "/basis/suitableTechnologyAccordMgr/getPreSectInfo",
    method: "get",
  });
}

// 适宜技术协定方保存
export function saveSuitableTech(data) {
  return request({
    url: "/basis/suitableTechnologyAccordMgr/save",
    method: "post",
    data,
  });
}

// 适宜技术协定方详情
export function getSuitableTechInfo(pid) {
  return request({
    url: "/basis/suitableTechnologyAccordMgr/info",
    method: "post",
    data: { pid },
  });
}

// 适宜技术协定方删除
export function deleteSuitableTech(data) {
  return request({
    url: "/basis/suitableTechnologyAccordMgr/delete",
    method: "post",
    data,
  });
}

// 适宜技术协定方启用/禁用
export function changeSuitableTechStatus(data) {
  return request({
    url: "/basis/suitableTechnologyAccordMgr/changeStatus",
    method: "post",
    data,
  });
}

// 本地专家适宜技术启用/禁用
export function changeLocalExpertTechStatus(data) {
  return request({
    url: "/basis/localExpertSuitableTechnologyMgr/changeStatus",
    method: "post",
    data,
  });
}

// 本地适宜技术协定方列表
export function getLocalSuitableTechList(data) {
  return request({
    url:
      "/basis/localExpertSuitableTechnologyMgr/listPain?pageNum=" +
      data.pageNum +
      "&pageSize=" +
      data.pageSize,
    method: "post",
    data,
  });
}

// 本地适宜技术协定方保存
export function saveLocalSuitableTech(data) {
  return request({
    url: "/basis/localExpertSuitableTechnologyMgr/save",
    method: "post",
    data,
  });
}

// 本地适宜技术协定方详情
export function getLocalSuitableTechInfo(pid) {
  return request({
    url: "/basis/localExpertSuitableTechnologyMgr/info",
    method: "post",
    data: { pid },
  });
}

// 本地适宜技术协定方删除
export function deleteLocalSuitableTech(data) {
  return request({
    url: "/basis/localExpertSuitableTechnologyMgr/delete",
    method: "post",
    data,
  });
}
