/*
 * @Author: guanxiaoyan guanxiaoyan@pb-station.com
 * @Deion:
 * @Date: 2023-12-27 20:36:02
 * @LastEditors: guanxiaoyan guanxiaoyan@pb-station.com
 * @LastEditTime: 2024-01-26 17:41:45
 * @FilePath: /followUp-admin/src/api/hospital/followupManage/followupSurvey.js
 */
import request from "@/utils/request";

const BASE_URL = "/sf-work/survey-temp";
// 随访管理-随访问卷列表
export function surveyPageList(query) {
  return request({
    url: `${BASE_URL}/list`,
    method: "get",
    params: query,
  });
}

// 随访管理-随访问卷-新增
export function copySurvey(data) {
  return request({
    url: `${BASE_URL}/copy`,
    method: "post",
    data,
  });
}
// 随访管理-随访问卷-复制
export function addSurvey(data) {
  return request({
    url: `${BASE_URL}/save`,
    method: "post",
    data,
  });
}
// 随访管理-随访问卷-编辑
export function editSurvey(data) {
  return request({
    url: `${BASE_URL}/save`,
    method: "patch",
    data,
  });
}

// 随访管理-随访问卷-删除
export function delSurvey(id) {
  return request({
    url: `${BASE_URL}/del/${id}`,
    method: "post",
  });
}

// 随访管理-随访问卷-下线
export function offlineSurvey(id) {
  return request({
    url: `${BASE_URL}/offline/${id}`,
    method: "patch",
  });
}

// 随访管理-随访问卷-发布
export function publishSurvey(id) {
  return request({
    url: `${BASE_URL}/publish/${id}`,
    method: "patch",
  });
}
// 随访管理-随访问卷-批量发布
export function batchPublishSurveyApi(data) {
  return request({
    url: `${BASE_URL}/batch-publish`,
    method: "post",
    data,
  });
}
// 随访管理-随访问卷-保存草稿
export function saveSurveyDraft(id) {
  return request({
    url: `${BASE_URL}/draft/${id}`,
    method: "patch",
  });
}
