/**
 * 工作台
 */

import http from '../http'
import { https } from '../https'
// import { https } from '../https'

export default {
  // page
  pageExpAllot: data =>
    http.post('soil/v1/entrust/page_exp_allot', data).then(res => res),
  pageExpAllotHis: data =>
    http.post('soil/v1/entrust/page_exp_allot_his', data).then(res => res),
  // 试验任务分配按样品分配分页列表
  pageExpAllotSample: data =>
    http.post('soil/v1/sample/page_exp_allot_sample', data).then(res => res),
  pageExpAllotSampleHis: data =>
    http
      .post('soil/v1/sample/page_exp_allot_sample_his', data)
      .then(res => res),
  // 试验任务按样品分配-试验项目分配操作
  allotExp: data =>
    http.post('soil/v1/experiment/allot_exp', data).then(res => res),
  changeExpAllot: data =>
    http.post('soil/v1/experiment/change_exp_allot', data).then(res => res),
  // 试验任务分配样品对应检测项目分页列表
  pageAllot: data =>
    http.post('soil/v1/experiment/page_allot', data).then(res => res),
  pageAllotHis: data =>
    http.post('soil/v1/experiment/page_allot_his', data).then(res => res),
  pageExpTest: data =>
    http.post('soil/v1/entrust/page_exp_test', data).then(res => res),
  pageExpTestHis: data =>
    http.post('soil/v1/entrust/page_exp_test_his', data).then(res => res),
  samplePage: data => http.post('soil/v1/sample/page', data).then(res => res),
  pageExpTestSample: data =>
    http.post('soil/v1/sample/page_exp_test_sample', data).then(res => res),
  pageExpAuditSample: data =>
    http.post('soil/v1/sample/page_exp_audit_sample', data).then(res => res),
  pageExpCheckSample: data =>
    http.post('soil/v1/sample/page_exp_check_sample', data).then(res => res),
  pageItem: data => http.post('soil/v1/experiment/page', data).then(res => res),
  pageAllotByExp: data =>
    http.post('soil/v1/experiment/page_allot_by_exp', data).then(res => res),
  pageAllotByExpHis: data =>
    http
      .post('soil/v1/experiment/page_allot_by_exp_his', data)
      .then(res => res),
  pageExperimentAllot: data =>
    http.post('soil/v1/experiment/page_exp_allot', data).then(res => res),
  pageExperimentAllotHis: data =>
    http.post('soil/v1/experiment/page_exp_allot_his', data).then(res => res),
  pageTestByExp: data =>
    http.post('soil/v1/experiment/page_test_by_exp', data).then(res => res),
  pagePrepareByExp: data =>
    http.post('soil/v1/experiment/page_prepare_by_exp', data).then(res => res),
  pageExperimentTest: data =>
    http.post('soil/v1/experiment/page_exp_test', data).then(res => res),
  pageExpPrepare: data =>
    http.post('soil/v1/experiment/page_exp_prepare', data).then(res => res),
  zTree: data =>
    http.post('/print/v1/template_category/ztree', data).then(res => res),
  templatePage: data =>
    http.post('/print/v1/template/page', data).then(res => res),
  checkLimit: data =>
    http.post('/env/v1/env_item/check_limit', data).then(res => res),
  searchItem: data =>
    http
      .post('/env/v1/env_item/search_all_common_sample_count', data)
      .then(res => res),
  saveItem: data =>
    http
      .post('soil/v1/original_record/save_original_record', data)
      .then(res => res),
  recordPage: data =>
    http.post('soil/v1/original_record/page', data).then(res => res),
  pageTest: data =>
    http.post('soil/v1/experiment/page_test', data).then(res => res),
  pageCheck: data =>
    http.post('soil/v1/experiment/page_check', data).then(res => res),
  pageAudit: data =>
    http.post('soil/v1/experiment/page_audit', data).then(res => res),
  updateItem: data =>
    http
      .post('soil/v1/original_record/update_original_record', data)
      .then(res => res),
  pageOriginalExp: data =>
    http.post('soil/v1/experiment/page_original_exp', data).then(res => res),
  // 查看指标分页列表
  itemPage: data => http.post('soil/v1/item/page', data).then(res => res),
  itemSave: data => http.post('soil/v1/item/', data).then(res => res),
  itemEdit: data =>
    http.put('soil/v1/item/' + data.id, data.obj).then(res => res),
  itemGetById: data => http.get('soil/v1/item/' + data).then(res => res),
  itemDelete: data => http.delete('soil/v1/item/?ids=' + data).then(res => res),
  endExp: data =>
    http.post('soil/v1/experiment/end_exp?ids=' + data).then(res => res),
  endExpIds: data =>
    http.post('soil/v1/experiment/end_exp', data).then(res => res),
  pageExpCheck: data =>
    http.post('soil/v1/entrust/page_exp_check', data).then(res => res),
  endExpCheck: data =>
    http.post('soil/v1/experiment/end_exp_check', data).then(res => res),
  endExpAudit: data =>
    http.post('soil/v1/experiment/end_exp_audit', data).then(res => res),
  pageCheckByExp: data =>
    http.post('soil/v1/experiment/page_check_by_exp', data).then(res => res),
  pageExpByCheck: data =>
    http.post('soil/v1/experiment/page_exp_check', data).then(res => res),
  pageExpAudit: data =>
    http.post('soil/v1/entrust/page_exp_audit', data).then(res => res),
  pageAuditByExp: data =>
    http.post('soil/v1/experiment/page_audit_by_exp', data).then(res => res),
  pageExpByAudit: data =>
    http.post('soil/v1/experiment/page_exp_audit', data).then(res => res),
  auditBack: data =>
    http.post('soil/v1/experiment/exp_audit_back', data).then(res => res),
  checkBack: data =>
    http.post('soil/v1/experiment/exp_check_back', data).then(res => res),
  // 添加设备信息
  addExpEquip: data =>
    https
      .post('soil/v1/experiment_rel_equip/add_exp_equip', JSON.stringify(data))
      .then(res => res),
  equipPage: data =>
    http.post('soil/v1/experiment_rel_equip/page', data).then(res => res),
  deleteEquip: data =>
    http.delete('soil/v1/experiment_rel_equip/?ids=' + data).then(res => res),
  pageExpCheckHis: data =>
    http.post('soil/v1/entrust/page_exp_check_his', data).then(res => res),
  pageExpTestSampleHis: data =>
    http.post('soil/v1/sample/page_exp_test_sample_his', data).then(res => res),
  // 数据复核历史任务  试样分页列表
  pageExpCheckSampleHis: data =>
    http
      .post('soil/v1/sample/page_exp_check_sample_his', data)
      .then(res => res),
  // 数据审核 按照样品审核 右侧分页列表
  pageExpAuditSampleHis: data =>
    http
      .post('soil/v1/sample/page_exp_audit_sample_his', data)
      .then(res => res),
  collectDataPage: data =>
    http.post('soil/v1/experiment_collect_data/page', data).then(res => res),
  collectFilePage: data =>
    http.post('soil/v1/experiment_collect_file/page', data).then(res => res),
  pageExpAuditHis: data =>
    http.post('soil/v1/entrust/page_exp_audit_his', data).then(res => res),
  deleteRecord: data =>
    http.delete('soil/v1/original_record/?ids=' + data).then(res => res),
  expReportPage: data =>
    http.post('soil/v1/exp_report/page', data).then(res => res),
  deleteReport: data =>
    http.delete('soil/v1/exp_report/?ids=' + data).then(res => res)
}
