import {
  get,
  post,
  put,
  Delete,
  deleteForm,
  postForm,
  postFormJ,
  expoertExcel,
  getExcel,
  downloadExcel
} from "../request/http.js"
import { prototype } from "events"
const v1 = `/gastric-cancer${process.env.VUE_APP_MOD || ""}-user`
const user = `/gastric-cancer-user`
const ewellDefectData = `/gastric-cancer-data`
const wjy = `/wjy-cancer-gather`
const im = `/gastric-cancer-im`
export const API = {
  //获取短信验证码
  getSmsCode: (data) => {
    return get(`${user}/sms/code?phone=${data}`, data)
  },
  //验证码实时验证
  postValidate: function(data) {
    return post(
      `${user}/code/validate?validateKey=${data.validateKey}&validateText=${
        data.validateText
      }`
    )
  },
  //短信验证码登录
  postSmsCode: (data) => {
    return post(`${user}/user/sms/login`, data)
  },
  //门户登录
  getPortalInfo: (data) => {
    return get(`${user}/user/portal/info`, data)
  },

  // 登录
  login: function(data) {
    return post(`${user}/user/login`, data)
  },
  //退出登录
  loginout: function() {
    return get(`${user}/user/logout`)
  },
  //获取验证码图片
  getCodeValidate: function(data) {
    return post(
      `${user}/code/validate?validateKey=${data.validateKey}&validateText=${
        data.validateText
      }`
    )
  },
  //获取省市
  getProvince: function() {
    return get(`${user}/province/list`)
  },
  //注册
  register: function(data) {
    return post(`${user}/user/register`, data)
  },
  // 获取导航信息
  getNavigation: () => {
    return get(`${user}/role/getRolePerByUser`)
  },
  // 修改密码
  editPassword: (data) => {
    return postForm(`${user}/user/editPwd`, data)
  },
  //重置密码
  resetPassword: (data) => {
    return postForm(`${user}/user/recoverPwd`, data)
  },
  //重置密码
  listDoctors: (name) => {
    return get(`${user}/user/doctors?name=${name}`)
  },

  /**
   *
  角色模块
   *
   **/
  // 获取角色列表
  getRolePage: (data) => {
    return get(`${user}/role/page`, data)
  },
  delRole: (id) => {
    return Delete(`${user}/role?id=${id}`)
  },
  //新增修改角色
  saveRole: function(data) {
    return post(`${user}/role`, data)
  },
  /**
   *
  数据上报模块
   *
   **/
  // 一键上报
  syncReport: (data) => {
    return post(`${ewellDefectData}/sync`, data)
  },
  // 获取病种列表
  getTemplateResources: () => {
    return get(`${ewellDefectData}/template/resources`)
  },
  // 获取病种列表id
  getTemplateResourcesById: (id) => {
    return get(`${ewellDefectData}/template/resources/${id}`)
  },
  // 导入excel
  setExcel: (data) => {
    return postForm(`${ewellDefectData}/importOrExport/importReportData`, data)
  },
  /**
*
数据审核
*
**/
  //审核最终诊断
  auditReport: (id) => {
    return put(`${ewellDefectData}/report/audit?id=${id}`)
  },
  /**
  *
  账号信息模块
  *
  **/
  // 获取用户列表
  getUserList: (data) => {
    return post(`${user}/user/list`, data)
  },
  // 用户审核
  toExamine: (data) => {
    return postForm(`${user}/user/review`, data)
  },
  // 用户修改状态 1 正常 0 禁止 2 删除
  editUser: (data) => {
    return postForm(`${user}/user/editStatus`, data)
  },
  //修改用户信息
  putUserInfo: (data) => {
    return put(`${user}/user/`, data)
  },
  // 获取医院
  getReportHospital: (data) => {
    return get(`${user}/user/hospital${data}`)
  },
  //获取当前用户所在的医院列表
  getUserHospitials(data = {}) {
    return get(`${user}/user/hospitals`, data)
  },
  //切换医院
  switchHospital: (data) => {
    return post(`${user}/user/switch/hospital?hospitalId=${data.id}`, data)
  },

  //数据导出
  exportData: (data) => {
    return expoertExcel(
      `${ewellDefectData}/importOrExport/exportReportData`,
      data
    )
  },
  //按照缺陷类型查询
  searchtype: (data) => {
    return get(`${ewellDefectData}/report/selectReportDataManageList${data}`)
  },
  delteItem: (data) => {
    return postForm(`${ewellDefectData}/report/updateReportStatusById`, data)
  },
  //数据管理回显
  dataManageShow: (id) => {
    return get(`${ewellDefectData}/report/selectReportDataManageList?id=${id}`)
  },
  //获取上报医院
  getReportHospitial() {
    return get(`${ewellDefectData}/report/getReportHospital`)
  },
  //数据管理编辑
  dataManageEdite: (data) => {
    return post(`${ewellDefectData}/report/updateReportData}`, data)
  },
  //数据管理审核
  reviewDara: (data) => {
    return postForm(`${ewellDefectData}/report/updateReportStatusById`, data)
  },

  /**
   * 系统公告
   */
  //公告新建
  saveAnnouncement: (data) => {
    return post(`${ewellDefectData}/announcement`, data)
  },
  //发布/删除公告
  updateAnnouncementStatus: (data) => {
    return postForm(
      `${ewellDefectData}/announcement/updateAnnouncementStatus`,
      data
    )
  },
  //编辑公告
  updateAnnouncementData: (data) => {
    return put(`${ewellDefectData}/announcement`, data)
  },
  //公告详情
  getAnnouncementDetail: (id) => {
    return get(
      `${ewellDefectData}/announcement/selectAnnouncementById?id=${id}`
    )
  },
  //公告列表
  getAnnouncementList: (data) => {
    return get(`${ewellDefectData}/announcement/page`, data)
  },

  //置顶公告
  putAnnouncementTop: (data) => {
    return put(`${ewellDefectData}/announcement/top`, data)
  },
  //撤销置顶公告
  putAnnouncementCancelTop: (id) => {
    return put(`${ewellDefectData}/announcement/cancel/top?id=${id}`)
  },
  /**
   居民中心
  */
  //  居民列表

  getResidentList: (data) => {
    return get(`${wjy}/residents/page`, data)
  },
  //居民入组
  getResidentGroup: (data) => {
    return get(`${wjy}/residents/screening`, data)
  },
  //居民中心查看报告 筛查中心筛查档案查询
  getResidentReport: (data) => {
    return get(`${ewellDefectData}/report`, data)
  },
  /**
   查询id
  */
  //通过身份证找资料
  getResidentPatient: (data) => {
    return get(`${wjy}/residents/patient`, data)
  },
  /**
   * 医院管理
   */
  //医院列表
  getHospitalPage: (data) => {
    return get(`${user}/hospital/page`, data)
  },
  //添加医院权限
  addHospitalPermiss: (data) => {
    return post(`${user}/hospital/permission`, data)
  },
  // 查看已经提交申请材料的医院列表(未审核的)
  getRegisteredHospitalPage: (data) => {
    return get(`${user}/hospital/pageRegisteredHospital`, data)
  },
  //查看医院申请材料
  getRegisteredHospitalById: (data) => {
    return get(`${user}/hospital/showRegisteredHospitalById`, data)
  },
  //修改医院信息
  modifyHosipital: (data) => {
    return post(`${user}/hospital/modifyHospital`, data)
  },
  //删除医院列表
  deleteHospital: (id) => {
    return Delete(`${user}/hospital?hospitalId=${id}`, id)
  },

  //联盟管理员审核
  unionVerify: (data) => {
    return post(`${user}/user/unionVerify`, null, data)
  },
  //平台管理员审核
  platformVerify: (data) => {
    return post(`${user}/user/platformVerify`, null, data)
  },
  // 查看医院申请材料（当前医院）
  getRegisteredData: () => {
    return get(`${user}/hospital/showRegisteredHospital`)
  },
  //上传PDF
  uploadAPI: (data) => {
    return post(`${ewellDefectData}/announcement/uploadPdf`, data)
  },
  //单文件上传
  uploadFile: (data) => {
    return post(`${ewellDefectData}/upload`, data)
  },
  //数据分析 获取echarts数据
  getEchartsData: (data) => {
    return post(`ewell-tumors-analysis/echar/reportData`, data)
  },
  //用户管理  医院管理员 增加修改用户
  addUser: (data) => {
    return post(`${user}/user/hospitalAccount`, data)
  },
  //门户 增加修改用户
  addPortalUser: (data) => {
    return post(`${user}/user/portal/addOrUpdate`, data)
  },
  //门户 用户审核
  portalCheck: (data) => {
    return post(`${user}/user/portal/check`, data)
  },
  // 添加已存在用户到当前医院
  addUserExist: (data) => {
    return post(`${user}/user/exist`, data)
  },
  // 将用户从当前医院中移除
  removeUser: (data) => {
    return Delete(`${user}/user/hospital`, data)
  },
  //门户 将用户从当前医院中移除
  removePortalUser: (data) => {
    return get(`${user}/user/portal/delete`, data)
  },
  modUser: (data) => {
    return put(`${user}/user/hospitalAccount`, data)
  },
  //用户管理
  userList: (data) => {
    return get(`${user}/user/hospitalAccount${data}`)
  },
  //用户管理列表 门户
  portalUserList: (data) => {
    return post(`${user}/user/portal/list`, data)
  },
  getUserOthers: (data) => {
    return get(`${user}/user/others`, data)
  },
  // 获取数据管理列表
  getReportList: (data) => {
    return post(`${ewellDefectData}/report/selectReportDataManageList`, data)
  },

  // 批量设置随访
  batchSetFollowup: (data) => {
    return post(`${ewellDefectData}/report/batch/followup`, data)
  },

  // 获取数据管理列表(医院)
  getReportHospitalList: (data) => {
    return post(`${ewellDefectData}/report/hospital`, data)
  },
  // 获取数据管理列表（联盟）
  getReportAllianceList: (data) => {
    return post(`${ewellDefectData}/report/alliance`, data)
  },
  getDraftList: (data) => {
    return get(`${ewellDefectData}/report/selectReportDraftList${data}`)
  },
  //获取上报图片
  getReportImg: (id) => {
    return get(`/zuul${ewellDefectData}/report/downloadImage?id=${id}`)
  },
  //删除草稿箱数据
  deleteDraft: (id) => {
    return get(`${ewellDefectData}/report/deleteDraft?id=${id}`)
  },
  //数据下载
  downloadEcxel: (data) => {
    return downloadExcel(`${ewellDefectData}/report/downloadEcxel`, data)
  },
  /**
   * 随访医生管理
   */
  // 随访医生分页列表
  getSysDoctorPage: (data) => {
    return get(`${user}/sys/doctor/page`, data)
  },
  //医生下拉选择列表
  getHospSelect: (data) => {
    return get(`${user}/hospital/select`, data)
  },
  //随访医生新增接口
  postSysDoctor: (data) => {
    return post(`${user}/sys/doctor`, data)
  },
  //随访医生修改接口
  putSysDoctor: (data) => {
    return put(`${user}/sys/doctor`, data)
  },
  //随访医生批量删除
  removeDoc: (data) => {
    return deleteForm(`${user}/sys/doctor`, data)
  },
  /**
   * 医院管理
   */
  //停用启用医院
  switchHospitalStatus: (id) => {
    return get(`${user}/hospital/switch/${id}`)
  },
  //新建医院
  saveHospital: (data) => {
    return post(`${user}/hospital`, data)
  },
  //医院编辑
  updateHospital: (data) => {
    return put(`${user}/hospital`, data)
  },
  /**
   * 枚举管理
   */
  //枚举字典查询
  getEnumeratePage: (data) => {
    return get(`${ewellDefectData}/enumerate/page`, data)
  },
  //添加枚举字典
  addEnumerate: (data) => {
    return post(`${ewellDefectData}/enumerate`, data)
  },
  //编辑枚举字典
  updateEnumerate: (data) => {
    return put(`${ewellDefectData}/enumerate`, data)
  },
  //根据代码code查询枚举字典明细
  getEnumerateByCode: (code) => {
    return get(`${ewellDefectData}/enumerate/${code}`)
  },
  //根据代码codes查询枚举字典明细
  getEnumerateList: (data) => {
    return post(`${ewellDefectData}/enumerate/codes`, data)
  },

  //添加枚举明细
  addEnumerateItem: (data) => {
    return post(`${ewellDefectData}/enumerate/item`, data)
  },
  //修改枚举明细
  updateEnumerateItem: (data) => {
    return put(`${ewellDefectData}/enumerate/item`, data)
  },
  //删除枚举明细
  delEnumerateItem: (data) => {
    return Delete(`${ewellDefectData}/enumerate/item`, data)
  },
  /**
   * 菜单管理
   */
  //权限菜单列表
  getPermissionPage: (data) => {
    return get(`${user}/permission/page`, data)
  },
  //权限菜单树
  getPermissionTree: (data) => {
    return get(`${user}/permission/tree`, data)
  },
  //添加菜单
  addMenu: (data) => {
    return post(`${user}/permission`, data)
  },
  //编辑菜单
  updateMenu: (data) => {
    return put(`${user}/permission`, data)
  },
  //删除菜单
  delMenu: (data) => {
    return Delete(`${user}/permission`, data)
  },
  /**
   * 短信管理
   */
  // 批量发送短信
  setNoticeBatch: (data) => {
    return post(`${ewellDefectData}/sms/notice/batch`, data)
  },
  //短信通知模 分页列表
  getSmsTemplatePage: (data) => {
    return get(`${ewellDefectData}/sms/notice/template/page`, data)
  },
  // 新增短信模板
  addSmsTemplate: (data) => {
    return post(`${ewellDefectData}/sms/notice/template`, data)
  },
  // 编辑短信模板
  updateSmsTemplate: (data) => {
    return put(`${ewellDefectData}/sms/notice/template`, data)
  },
  // 删除短信模板
  deleteSmsTemplate: (templateId) => {
    return Delete(`${ewellDefectData}/sms/notice/template/${templateId}`)
  },
  // 停用、启用短信模板
  switchSmsTemplate: (id) => {
    return post(`${ewellDefectData}/sms/notice/template/switch/${id}`)
  },
  // 短信模板审核
  checkSmsTemplate: (data) => {
    return post(`${ewellDefectData}/sms/notice/template/audit`, data)
  },
  //短信记录分页列表
  getSmsNoticePage: (data) => {
    return get(`${ewellDefectData}/sms/notice/page`, data)
  },
  /**
   * 小程序用户管理
   */
  //小程序用户管理分页列表
  getWechatUserPage: (data) => {
    return get(`${user}/wechat/user/page`, data)
  },
  //小程序用户详情页，成员列表接口
  getWechatPatients: (openid) => {
    return get(`${ewellDefectData}/wx/report/families?openid=${openid}`)
  },

  /**
   * 小程序通知管理
   */
  //通知模模板分页列表
  getNoticeTemplatePage: (data) => {
    return get(`${ewellDefectData}/mini/program/notice/template/page`, data)
  },
  // 新增模板
  addNoticeTemplate: (data) => {
    return post(`${ewellDefectData}/mini/program/notice/template`, data)
  },
  // 编辑模板
  updateNoticeTemplate: (data) => {
    return put(`${ewellDefectData}/mini/program/notice/template`, data)
  },
  // 删除模板
  delNoticeTemplate: (id) => {
    return Delete(`${ewellDefectData}/mini/program/notice/template/${id}`)
  },
  //通知记录page
  getNoticeRecordPage: (data) => {
    return get(`${ewellDefectData}/mini/program/notice/page`, data)
  },
  // 停用启用模板
  modifyNoticeTemplate: (id) => {
    return post(`${ewellDefectData}/mini/program/notice/template/switch/${id}`)
  },
  // 流程模板List
  getAllResources: (data) => {
    return get(`${ewellDefectData}/template/getAllResources`, data)
  },
  //添加医院流程
  postResource: (data) => {
    return post(`${ewellDefectData}/resource`, data)
  },
  //编辑医院流程
  putResource: (data) => {
    return put(`${ewellDefectData}/resource`, data)
  },
  //删除医院流程
  delResource: (id) => {
    return Delete(`${ewellDefectData}/resource?id=${id}`)
  },
  //科普文章列表
  getArticlePage: (data) => {
    return post(`${ewellDefectData}/article/page`, data)
  },
  //添加科普文章
  addArticle: (data) => {
    return post(`${ewellDefectData}/article`, data)
  },
  //编辑科普文章
  editArticle: (data) => {
    return put(`${ewellDefectData}/article`, data)
  },
  //发布/撤消发布
  switchArticle: (id) => {
    return post(`${ewellDefectData}/article/publishing?id=${id}`)
  },
  //删除
  delArticle: (id) => {
    return Delete(`${ewellDefectData}/article/${id}`)
  },
  // 文章详情
  getArticleDetail: (id) => {
    return get(`${ewellDefectData}/article/${id}`)
  },

  //excel 数据导入
  excelDataImport: (id) => {
    return post(`${ewellDefectData}/importOrExport/import?excelId=${id}`)
  },
  //excel 数据导入记录分页列表
  getImportPage: (data) => {
    return get(`${ewellDefectData}/import/page`, data)
  },
  //excel 数据导入记录详情分页列表
  getImportDetailPage: (data) => {
    return get(`${ewellDefectData}/import/detail/page`, data)
  },
  // 撤消导入
  delImport: (id) => {
    return Delete(`${ewellDefectData}/importOrExport/rollback?excelId=${id}`)
  },
  //excel导入结果下载
  excelExportDetail: (data) => {
    return get(`${ewellDefectData}/import/detail/export`, data)
  },
  // excel导入模板下载
  getImportTemplate: (data) => {
    return get(`${ewellDefectData}/importOrExport/template`, data)
  },
  // 导入原文件下载
  getImportFile: (data) => {
    return get(`${ewellDefectData}/import/file`, data)
  },
  // 知情同意书列表
  getConsentPage: (data) => {
    return get(`${ewellDefectData}/consent/page`, data)
  },
  // 知情同意书添加
  addConsent: (data) => {
    return post(`${ewellDefectData}/consent`, data)
  },
  // 知情同意书编辑
  editConsent: (data) => {
    return put(`${ewellDefectData}/consent`, data)
  },
  // 知情同意书删除
  delConsent: (id) => {
    return Delete(`${ewellDefectData}/consent?id=${id}`)
  },
  // 知情同意书状态切换
  switchConsent: (id) => {
    return put(`${ewellDefectData}/consent/switch?id=${id}`)
  },
  /**
     工作台
  */
  // 疾病统计
  getStatisticsDiseases: (data) => {
    return get(`${ewellDefectData}/screening/statistics/diseases`, data)
  },
  // 统计当年每月筛查数据
  getStatisticsMonthly: (data) => {
    return get(`${ewellDefectData}/screening/statistics/monthly`, data)
  },
  // 疾病分类统计
  getStatisticsDiseasesType: (data) => {
    return get(`${ewellDefectData}/screening/statistics/diseasesType`, data)
  },
  // 年龄性别分布
  getStatisticsPatientAgeAndSex: (data) => {
    return get(`${ewellDefectData}/screening/statistics/patientAgeAndSex`, data)
  },
  // 随访患者列表
  getFollowupReport: (data) => {
    return get(`${ewellDefectData}/report/coming/followup`, data)
  },
  /**
     筛查沟通
  */

  // 获取历史消息
  getGroupMsgByGroupId: (id, data) => {
    return get(`${im}/im/group/getPageGroupMsgByGroupId/${id}`, data)
  },
  // 获取消息列表
  getStatusList: (id, data) => {
    return get(
      `${im}/im/group/getPageGroupUserStatusListByHospitalId/${id}`,
      data
    )
  },
  // 根据groupId将组内C端发送的信息设为已读
  controlGroupMsgIsRead: (id) => {
    return get(`${im}/im/group/controlGroupMsgIsRead/${id}`)
  },
  /**
      数据上报（改）
  */

  // 温州上报
  saveReportData: (data) => {
    return postForm(`${ewellDefectData}/report/submitReportData`, data)
  },
  // 重大疾病筛查数据填报
  submitReportData: (data) => {
    return postFormJ(`${ewellDefectData}/report/submitReportData`, data)
  },
  // 上报数据获取
  getReportData: (id) => {
    return get(`${ewellDefectData}/report/selectReportBySampleId?id=${id}`)
  },
  /**
      系统日志
  */
  // 系统日志list
  getSyslogPage: (data) => {
    return get(`${user}/syslog/page`, data)
  },

  /**
   最终诊断列表
   */
  //  分类列表
  getFinalDiseases: () => {
    return get(`${ewellDefectData}/final-disease`)
  },
  /**
   疾病分类管理
  */
  //  分类列表
  getDiseaseGroupList: (data) => {
    return get(`${ewellDefectData}/disease-group/list`, data)
  },
  //  新增数据分类
  postDiseaseGroupList: (data) => {
    return post(`${ewellDefectData}/disease-group`, data)
  },
  // 修改数据分类
  putDiseaseGroup: (data) => {
    return put(`${ewellDefectData}/disease-group`, data)
  },
  // 修改数据分类
  delDiseaseGroup: (id) => {
    return Delete(`${ewellDefectData}/disease-group/${id}`)
  },
  // 下载数据
  exportGastric: (data) => {
    return downloadExcel(`${ewellDefectData}/export/gastric`, data)
  },
  //  新增数据分类
  getUserGroup: (data) => {
    return post(`${im}/im/user/group`, data)
  },
  // 将患者移出分组
  removeDiseaseGroup: (data) => {
    return put(`${ewellDefectData}/disease-group/push`, data)
  },
  /**
 疾病管理-随访规则
*/
  // 随访规则分组列表查询
  getFollowupRuleList: (data) => {
    return get(`${ewellDefectData}/followup-rule/page`, data)
  },
  //  新增随访规则
  postFollowupRule: (data) => {
    return post(`${ewellDefectData}/followup-rule`, data)
  },
  // 修改随访规则
  putFollowupRule: (data) => {
    return put(`${ewellDefectData}/followup-rule`, data)
  },
  //删除随访规则
  delFollowupRule: (id) => {
    return Delete(`${ewellDefectData}/followup-rule/${id}`)
  },
  //更改随访规则停用、启用状态
  switchFollowupRule: (id) => {
    return put(`${ewellDefectData}/followup-rule/${id}`)
  },
  /**
 数据分析-新
*/
  //数据概览-格子
  postOverview: (data) => {
    return post(`${ewellDefectData}/screen/data/overview`, data)
  },
  //数据下穿-地图
  postDataDetail: (data) => {
    return post(`${ewellDefectData}/screen/data/detail`, data)
  },
  /**
 数据分析
*/
  //grid指标1
  getGastricScreening: (data) => {
    return get(`${ewellDefectData}/screening/statistics/workbench`, data)
  },
  //===============筛查工作进展分析===============
  //病理检查率趋势
  getPathologyTendency: (data) => {
    return get(
      `${ewellDefectData}/screening/statistics/pathology/tendency`,
      data
    )
  },
  //内镜趋势
  getEndoscopeTendency: (data) => {
    return get(
      `${ewellDefectData}/screening/statistics/endoscope/tendency`,
      data
    )
  },
  //中高危风险趋势
  getRiskTendency: (data) => {
    return get(`${ewellDefectData}/screening/statistics/risk/tendency`, data)
  },
  //筛查目标人群趋势
  getScreeningTendency: (data) => {
    return get(
      `${ewellDefectData}/screening/statistics/screening/tendency`,
      data
    )
  },
  //初筛趋势
  getFirstTendency: (data) => {
    return get(`${ewellDefectData}/screening/statistics/first/tendency`, data)
  },
  //筛查趋势
  getCoverTendency: (data) => {
    return get(`${ewellDefectData}/screening/statistics/cover/tendency`, data)
  },
  //街道筛查工作进展漏斗
  getScreeningFunnel: (data) => {
    return get(`${ewellDefectData}/screening/statistics/screening/funnel`, data)
  },
  //===============筛查人群透视分析===============

  //中高危风险人数趋势
  getRiskCountTendency: (data) => {
    return get(
      `${ewellDefectData}/screening/statistics/risk/count/tendency`,
      data
    )
  },
  //性别人数趋势
  getGenderCountTendency: (data) => {
    return get(
      `${ewellDefectData}/screening/statistics/gender/count/tendency`,
      data
    )
  },
  /********bar **********/
  //人群地域分析
  getAreaTendency: (data) => {
    return get(`${ewellDefectData}/screening/statistics/area/tendency`, data)
  },
  //**********分布**********
  //筛查人群风险程度分布
  getRiskDistribution: (data) => {
    return get(
      `${ewellDefectData}/screening/statistics/area/risk/distribution`,
      data
    )
  },
  //筛查人群性别分布
  getGenderDistribution: (data) => {
    return get(
      `${ewellDefectData}/screening/statistics/area/gender/distribution`,
      data
    )
  },
  //疾病分布
  getDiseaseDistribution: (data) => {
    return get(
      `${ewellDefectData}/screening/statistics/disease/distribution`,
      data
    )
  },
  //慢病
  getChronicDistribution: (data) => {
    return get(
      `${ewellDefectData}/screening/statistics/chronic/distribution`,
      data
    )
  },
  //===============各村表格===============
  //各村筛查情况
  getAreaWorkbench: (data) => {
    return get(`${ewellDefectData}/screening/statistics/area/workbench`, data)
  },
  //===============地图=====================
  getMap: (data) => {
    return get(`${ewellDefectData}/screening/statistics/screening/map`, data)
  },

  /**
嵌入页面
*/
  //嵌入页面患者详情接口
  getScreeningColon: (data) => {
    return get(`${ewellDefectData}/api/screening/colon`, data)
  },
  //嵌入页面患者确认筛查接口
  getScreeningConfirm: (data) => {
    return post(`${ewellDefectData}/api/screening/confirm`, data)
  },
  //嵌入页面患者问卷编辑接口
  getScreeningQ: (data) => {
    return post(`${ewellDefectData}/api/screening/questionnaire`, data)
  },
  //嵌入页面数据解密接口
  getAuthDecrypt: (data) => {
    return post(`${user}/api/auth/decrypt`, data)
  },
  //嵌入页面当前用户引导页提醒状态查看接口
  getUserRemind: (data) => {
    return get(`${user}/user/remind`, data)
  },
  //嵌入页面当前用户引导页已提醒记录接口
  postUserRemind: (data) => {
    return post(`${user}/user/remind`, data)
  },

  /**
  入组人群管理
  */
  //入组人群分页接口
  getScreeningPre: (data) => {
    return get(`${ewellDefectData}/screening/pre`, data)
  },
  //随机采样
  getScreeningSample: (data) => {
    return get(`${ewellDefectData}/screening/sample`, data)
  },
  //列表页签
  getPreCount: (data) => {
    return get(`${ewellDefectData}/screening/preCount`, data)
  },
  //随机抽样默认数据 记录中断的抽样
  getScreenSampleList: (data) => {
    return get(`${ewellDefectData}/screening/sample/list`, data)
  },
  //档案核验
  getScreenCheck: (data) => {
    return get(`${ewellDefectData}/screening/sample/check`, data)
  },
  //抽样结束
  getSampleFinish: (data) => {
    return get(`${ewellDefectData}/screening/sample/finish`, data)
  },
  /************  嵌入页面：随访管理接口   *********** */
  // 获取token
  getToken: (data) => {
    return post(`${user}/api/auth/token`, data)
  },
  getjkadList: (data) => {
    return get(
      `${ewellDefectData}/jkda/colon/visits?pageNum=${data.current}&pageSize=${
        data.size
      }`,
      data
    )
  },
  getjkadInfo: (data) => {
    return get(
      `${ewellDefectData}/jkda/colon/mini/ques?patientId=${data}`,
      data
    )
  },
  // 问卷提交
  sendjkadInfo: (data) => {
    return post(`${ewellDefectData}/jkda/colon/ques`, data)
  },
  // 患者信息问卷接口
  //
  // 问卷单独回显
  getQuestionnaire: (data) => {
    return get(`${ewellDefectData}/wenzhou/ques?code=${data}`)
  },
  sendQuestionnaire: (data) => {
    return post(`${ewellDefectData}/wenzhou/ques`, data)
  },
  // 问卷中的溯源
  getNlp: (data) => {
    return get(`${ewellDefectData}/patient/report/nlp?patientId=${data}`)
  },
  // 健康温州嵌入页面
  getWzToken: (data) => {
    return post(`${user}/api/auth/wjy/token?sign=${data.sign}`)
  },
  // 获取列表
  getWzList: (data) => {
    return get(
      `${ewellDefectData}/screening/patient/page?pageNum=${
        data.pageNum
      }&pageSize=${data.pageSize}`
    )
  },
  // ! 内镜筛查接口 start
  // 获取内镜列表
  getCheckList: (data) => {
    return post(`${ewellDefectData}/patient/check/list`, data)
  },
  // 获取内镜详情
  getCheckDetail: (data) => {
    return get(`${ewellDefectData}/patient/check/detail?id=${data.id}`)
  },
  // 数据溯源
  getNlpSource: (data) => {
    return get(
      `${ewellDefectData}/patient/report/nlp?patientId=${data.patientId}`
    )
  },
  // 新增电话沟通
  addPhone: (data) => {
    return post(`${ewellDefectData}/sys/communicate/phone/add`, data)
  },
  // 电话沟通记录
  phoneRecords: (data) => {
    return post(`${ewellDefectData}/sys/communicate/phone/list`, data)
  },
  //模板列表
  messageList: (data) => {
    return get(
      `${ewellDefectData}/sys/communicate/message/template/list?scenario=${
        data.scenario
      }`
    )
  },
  addMessage: (data) => {
    return post(`${ewellDefectData}/sys/communicate/message/template/add`, data)
  },
  //短信沟通记录
  messageRecord: (data) => {
    return post(`${ewellDefectData}/sys/communicate/message/list`, data)
  },
  //短信发送
  sendMessage: (data) => {
    return post(`${ewellDefectData}/sys/communicate/message/send`, data)
  },
  //// 内镜筛查接口 end
  //*  字段映射    */
  getFiledMap: (data) => {
    return get(
      `${wjy}/field-mapping/page?pageNum=${data.pageNum}&pageSize=${
        data.pageSize
      }&sourceTableCode=${data.sourceTableCode}&sourceFieldCode=${
        data.sourceFieldCode
      }&targetTableCode=${data.targetTableCode}&targetFieldCode=${
        data.targetFieldCode
      }&process=${data.process}`,
      data
    )
  },
  deleteField: (id) => {
    return Delete(`${wjy}/field-mapping?id=${id}`)
  },
  addField: (data) => {
    return post(`${wjy}/field-mapping`, data)
  },
  putField: (data) => {
    return put(`${wjy}/field-mapping`, data)
  }
  ////字段映射  end
  /**** */
}
