//未入库档案著名
import request from '@/utils/request'

//树
export const getTree = data => {
  return request({
    url: '/point-strategy/v/classTree/getClassTreeByClassName',
    method: 'post',
    data
  })
}

//根据门类id查询表名和界面信息，包含界面的新增，查询条件，查询列表
export const getTable = params => {
  return request({
    url: '/point-strategy/v/classTree/selectMenuClassId',
    method: 'post',
    params
  })
}
//动态查询文书简化
export const getOneTable = data => {
  return request({
    url: '/point-strategy/v/docSimple/selectObject',
    method: 'post',
    data
  })
}


// 二次查询
export const secondaryQuery = data => {
  return request({
    url: '/point-strategy/v/docSimple/secondaryQuery',
    method: 'post',
    data
  })
}

//根据门类名称获取门类树22
export const getClassTreeByClassName22 = data => {
  return request({
    url: '/point-strategy/v/classTree/getClassTreeByClassName22',
    method: 'post',
    data,
  })
}

//动态查询文书简化--授权电子借阅--查看功能特有
export const getOneTableAuth = data => {
  return request({
    url: '/point-strategy/v/docSimple/electronicView',
    method: 'post',
    data
  })
}

//删除表格
export const delectTable = data => {
  return request({
    url: '/point-strategy/v/docSimple/deleteObject',
    method: 'post',
    data
  })
}
// 入库-提交审批
export const submitApply = data => {
  return request({
    url: '/point-strategy/v/approveApply/submitApply',
    method: 'post',
    data
  })
}
// 查询报表类型
export const selectUreportList = data => {
  return request({
    url: '/point-strategy/v/dict/selectUreportList',
    method: 'post',
    data
  })
}
// 生成报表
export const reportPdf = params => {
  return request({
    url: '/point-strategy/v/ureport/reportPdf',
    method: 'post',
    params
  })
}
// 生成报表
export const horizontalPdf = params => {
  return request({
    url: '/point-strategy/v/ureport/horizontalPdf',
    method: 'post',
    params
  })
}
// 四性检测
export const fourCheck = data => {
  return request({
    url: '/point-strategy/v/fourCheck/itemCheck',
    method: 'post',
    data
  })
}
// 查询设置
export const getSettingField = params => {
  return request({
    url: '/point-strategy/v/directorySequenceTree/getSettingField',
    method: 'post',
    params
  })
}
// 查询设置-保存
export const saveSettingField = data => {
  return request({
    url: '/point-strategy/v/directorySequenceTree/addData',
    method: 'post',
    data
  })
}
// 查询设置-保存 搜索字段
export const querySettings = data => {
  return request({
    url: '/point-strategy/v/tentityInterface/querySettings',
    method: 'post',
    data
  })
}
// 左侧目录序列树
export const getDirTree = data => {
  return request({
    url: '/point-strategy/v/directorySequenceTree/fetchSequenceTree',
    method: 'post',
    data
  })
}
// 左侧目录序列树-加载子节点
export const findTreeChildren = data => {
  return request({
    url: '/point-strategy/v/directorySequenceTree/findTreeChildren',
    method: 'post',
    data
  })
}
// 左侧目录序列树-查询右侧表格
export const getPageBySequence = data => {
  return request({
    url: '/point-strategy/v/directorySequenceTree/getPageBySequence',
    method: 'post',
    data
  })
}
// 已入库收藏夹-左侧目录序列树-查询右侧表格
export const getPageBySequenceFavorites = data => {
  return request({
    url: '/point-strategy/v/directorySequenceTree/getPageBySequenceFavorites',
    method: 'post',
    data
  })
}
// 质检-新增批次
export const insertBatch = (data, params) => {
  return request({
    url: '/point-strategy/v/QualityInspectionBatchController/insertRecord',
    method: 'post',
    data,
    params
  })
}
// 质检-根据entityId获取tableName和tableChnName等
export const getTableChnName = params => {
  return request({
    url: '/point-strategy/v/QualityInspectionBatchController/selectTableNameAndTableChnNameByEntityId',
    method: 'post',
    params
  })
}

//保存
export const saveObject = data => {
  return request({
    url: '/point-strategy/v/docSimple/saveObject',
    method: 'post',
    data
  })
}
//保存
export const updateObject = data => {
  return request({
    url: '/point-strategy/v/docSimple/updateObject',
    method: 'post',
    data
  })
}

//批量修改控制标识
export const updateObject2 = data => {
  return request({
    url: '/point-strategy/v/docSimple/updateObject2',
    method: 'post',
    data
  })
}

//出入回收站
export const updateTempFileObject = data => {
  return request({
    url: '/point-strategy/v/docSimple/updateTempFileObject',
    method: 'post',
    data
  })
}
//修改原文数量
export const updateTempArchiveFileNumObject = data => {
  return request({
    url: '/point-strategy/v/docSimple/updateTempArchiveFileNumObject',
    method: 'post',
    data
  })
}
//动态删除案卷
export const deleteObjectAnjuan = params => {
  return request({
    url: '/point-strategy/v/docSimple/deleteObjectAnjuan',
    method: 'post',
    params
  })
}
//档号设置查询
export const getList = data => {
  return request({
    url: '/point-strategy/v/archiveNoFormat/getList',
    method: 'post',
    data
  })
}
//导出档案
export const exportExcel = params => {
  return request({
    url: '/point-strategy/v/fileManage/downloadExcel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}

//导出档案携带token
export const downloadExcelToken = params => {
  return request({
    url: '/point-strategy/v/fileManage/downloadExcelToken',
    method: 'get',
    params,
    responseType: 'blob'
  })
}

//导出档案携带token
export const downloadExcelToken2 = params => {
  return request({
    url: '/point-strategy/v/fileManage/downloadExcelToken2',
    method: 'get',
    params,
    responseType: 'blob'
  })
}

//归档范围自动生成
export const autoArchiveScope = params => {
  return request({
    url: '/point-strategy/v/archiveScope/autoArchiveScope',
    method: 'post',
    params,
  })
}
//删除
export const deleteData = data => {
  return request({
    url: '/point-strategy/v/fileManage/deleteData',
    method: 'post',
    data,
  })
}
//自动增加件号
export const autoPieceNo = params => {
  return request({
    url: '/point-strategy/v/archiveNoFormat/autoPieceNo',
    method: 'post',
    params,
  })
}
//自动增加案卷号
export const autoYearFolderNo = params => {
  return request({
    url: '/point-strategy/v/archiveNoFormat/autoYearFolderNo',
    method: 'post',
    params,
  })
}
//添加扫描
export const addScan = params => {
  return request({
    url: '/point-strategy/v/fileScan/addScan',
    method: 'post',
    params,
  })
}
//批量替换
export const replaceObject = data => {
  return request({
    url: '/point-strategy/v/docSimple/replaceObject',
    method: 'post',
    data,
  })
}
//批量修改
export const updateAllObject = data => {
  return request({
    url: '/point-strategy/v/docSimple/updateAllObject',
    method: 'post',
    data,
  })
}
//门类修改
export const classSettings = data => {
  return request({
    url: '/point-strategy/v/tentityInterface/classSettings',
    method: 'post',
    data,
  })
}

// 电子借阅车
export const jycSubmitApply = data => {
  return request({
    url: '/point-strategy/v/approveApply/jycSubmitApply',
    method: 'post',
    data,
  })
}

// 查询页数与原文数不匹配问题
export const checkFileImgNum = data => {
  return request({
    url: '/point-strategy/v/fileManage/checkFileImgNum',
    method: 'post',
    data,
  })
}

// 原文向下移动
export const moveDown = data => {
  return request({
    url: '/point-strategy/v/docSimple/moveDown',
    method: 'post',
    params:data,
  })
}

// 原文向上移动
export const moveUp = data => {
  return request({
    url: '/point-strategy/v/docSimple/moveUp',
    method: 'post',
    params:data,
  })
}

// 原文重命名
export const rename = data => {
  return request({
    url: '/point-strategy/v/docSimple/rename',
    method: 'post',
    params:data,
  })
}


// 查看原文
export const showImg = params => {
  return request({
    url: '/point-strategy/v/archiveFile/showImg',
    method: 'get',
    params,
    responseType:'blob'

  })
}

// 查询业务日志列表
export const queryBusinessBehaviorPage = params => {
  return request({
    url: '/point-strategy/v/operLogger/queryBusinessBehaviorPage',
    method: 'get',
    params,
  })
}

/** 添加数字签名 */
export const addElectronicSignature = data => {
  return request({
    url: '/point-strategy/v/archiveFile/addElectronicSignature',
    method: 'post',
    params:data,
  })
}


