import axios from '@/utils/axios'

export default {
  /**
   * 获取专利数据库列表
   */
  getProjectList(data) {
    return axios.post('/v1/project/user', data)
  },
  /**
   * 根据ID获取专利数据库
   */
  getProject(params) {
    return axios.get('/v2/project/getProjectById',{ params })
  },
  /**
   * 获取专利数据库列表V2
   */
  getProjectListV2(data) {
    return axios.post('/v2/project/list', data)
  },
  /**
   * 分类统计
   */
  getScenarioAndTypeTotal(params) {
    return axios.get('/v2/project/total', params)
  },
  /**
   * 获取专利数据库状态统计
   */
  getProjectStatusTotal(params) {
    return axios.get('/v2/project/status/total', params)
  },
  /**
   * 获取专利数据库类型统计
   */
  getProjectTypeTotal(params) {
    return axios.get('/v2/project/type/total', { params })
  },
  /**
   * 新增专利数据库
   */
  addProject(data) {
    return axios.post('/v2/project/add', data)
  },
  /**
   * 编辑专利数据库
   */
  editProject(data) {
    return axios.post('/v2/project/edit', data)
  },
  /**
   * 删除专利数据库
   */
  deleteProject(params) {
    return axios({
      url: '/v2/project/delete',
      method: 'post',
      params: params
    })
  },
  /**
   * 专利数据库图表数据
   */
  getProjectChartData(params) {
    return axios.get('/v2/project/chartData', { params })
  },
  /**
   * 专利数据库专利导入
   */
  importProjectPatent(data) {
    return axios.post('/v2/project/import/patent', data)
  },
  /**
   * 专利数据库附件列表
   */
  getProjectFileList(params) {
    return axios.get('/v2/project/file/list', { params })
  },
  /**
   * 编辑专利数据库附件
   */
  editProjectFile(data) {
    return axios.post('/v2/project/file/edit', data)
  },
  /**
   * 新增专利数据库附件
   */
  addProjectFile(data) {
    return axios.post('/v2/project/file/add', data)
  },
  /**
   * 删除专利数据库附件
   */
  deleteProjectFile(params) {
    return axios({
      url: '/v2/project/file/delete',
      method: 'post',
      params: params
    })
  },
  /**
   * 获取专利数据库成员列表
   */
  getProjectUserList(params) {
    return axios.get('/v2/project/user/list', { params })
  },
  /**
   * 新增专利数据库成员
   */
  addProjectUser(data) {
    return axios.post('/v2/project/user/add', data)
  },
  /**
   * 编辑专利数据库成员
   */
  editProjectUser(data) {
    return axios.post('/v2/project/user/edit', data)
  },
  /**
   * 删除专利数据库成员
   */
  deleteProjectUser(params) {
    return axios({
      url: '/v2/project/user/delete',
      method: 'post',
      params: params
    })
  },
  /**
   * 分享专利数据库
   */
  projectShare({ id, data }) {
    return axios.post('/v2/project/share?id=' + id, data)
  },
  /**
   * 获取专利数据库字段列表
   */
  getProjectFieldList(params) {
    return axios.get('/v2/project/field/list', { params })
  },
  /**
   * 新增专利数据库字段
   */
  addProjectField(data) {
    return axios.post('/v2/project/field/add', data)
  },
  /**
   * 编辑专利数据库字段
   */
  editProjectField(data) {
    return axios.post('/v2/project/field/edit', data)
  },
  /**
   * 删除专利数据库字段
   */
  deleteProjectField(params) {
    return axios({
      url: '/v2/project/field/delete',
      method: 'post',
      params: params
    })
  },
  /**
   * 导入专利数据库字段
   */
  importProjectField(params) {
    return axios({
      url: '/v2/project/field/import',
      method: 'post',
      params: params
    })
  },
  /**
   * 复制专利数据库字段
   */
  copyProjectField(params) {
    return axios({
      url: '/v2/project/field/copy',
      method: 'post',
      params: params
    })
  },
  /**
   * 获取专利数据库字段选项列表
   */
  getProjectFieldOptionList(params) {
    return axios.get('/v2/project/field/option/list', { params })
  },
  /**
   * 新增专利数据库字段选项
   */
  addProjectFieldOption(data) {
    return axios.post('/v2/project/field/option/add', data)
  },
  /**
   * 编辑专利数据库字段选项
   */
  editProjectFieldOption(data) {
    return axios.post('/v2/project/field/option/edit', data)
  },
  /**
   * 更新专利数据库字段选项
   */
  updateProjectFieldOption(data) {
    return axios.post('/v2/project/field/option/update', data)
  },
  /**
   * 删除专利数据库字段选项
   */
  deleteProjectFieldOption(params) {
    return axios({
      url: '/v2/project/field/option/delete',
      method: 'post',
      params: params
    })
  },
  /**
   * 获取专利数据库文件夹列表
   */
  getProjectFolderList(params) {
    return axios.get('/v2/project/folder/list', { params })
  },
  /**
   * 新增专利数据库文件夹
   */
  addProjectFolder(data) {
    return axios.post('/v2/project/folder/add', data)
  },
  /**
   * 编辑专利数据库文件夹
   */
  editProjectFolder({ data, projectId }) {
    return axios.post('/v2/project/folder/edit?projectId=' + projectId, data)
  },
  /**
   * 删除专利数据库文件夹
   */
  deleteProjectFolder(params) {
    return axios({
      url: '/v2/project/folder/delete',
      method: 'post',
      params: params
    })
  },
  /**
   * 获取专利查询树
   */
  getProjectFieldTree(params) {
    return axios.get('/v2/project/field/tree', { params })
  },
  /**
   * 更新文件夹专利
   */
  updateProjectFolderPatent(data) {
    return axios.post('/v2/project/folder/patent', data)
  },
  /**
   * 专利数据库自定义字段
   */
  getProjectCustomField(params) {
    return axios.get('/v2/project/field/custom', { params })
  },
  /**
   * 自定义字段
   */
  getProjectCustomFieldById(params) {
    return axios.get('/v2/project/field/' + params)
  },
  /**
   * 导出专利数据库数据
   */
  exportProject(data) {
    return axios.post('/v2/project/export', data)
  },
  /**
   * 导出专利数据库信息列表
   */
  exportProjectList(params) {
    return axios({
      url: '/v2/project/export/list',
      method: 'post',
      responseType: 'blob',
      params: params
    })
  },
  /**
   * 获取专利数据库导出记录
   */
  getProjectExportList(params) {
    return axios.get('/v2/project/export/list', { params })
  },
  /**
   * 删除专利数据库导出记录
   */
  deleteProjectExport(params) {
    return axios({
      url: '/v2/project/export/delete',
      method: 'post',
      params: params
    })
  },
  /**
   * 获取专利数据库字段排序
   */
  getProjectFieldOrder(params) {
    return axios.get('/v2/project/field/order', { params })
  },
  /**
   * 设置专利数据库字段排序
   */
  setProjectFieldOrder(data) {
    return axios.post('/v2/project/field/order', data)
  },
  /**
   * 导入专利数据库数据
   */
  importProjectData(params) {
    return axios({
      url: '/v2/project/import',
      method: 'post',
      params: params
    })
  },
  /**
   * 判断是否存在导入任务
   */
  getProjectImportPageList(params) {
    return axios.get('/v2/project/import/list', { params })
  },
  /**
   * 获取导入任务记录
   */
  getProjectImportStatusList(params) {
    return axios.get('/v2/project/import/status', { params })
  },
  /**
   * 获取进行中导入ID
   */
  getProjectImportOngoing(params) {
    return axios.get('/v2/project/import/ongoing', { params })
  },
  /**
   * 删除导入记录
   */
  deleteProjectImport(params) {
    return axios({
      url: '/v2/project/import/delete',
      method: 'post',
      params: params
    })
  },
  /**
   * 删除专利数据库专利
   */
  deleteProjectPatent(params) {
    return axios({
      url: '/v2/project/patent/delete',
      method: 'post',
      params: params
    })
  },
  /**
   * 删除文件夹专利
   */
  deleteProjectFolderPatent(params) {
    return axios({
      url: '/v2/project/folder/patent/delete',
      method: 'post',
      params: params
    })
  },
  /**
   * 导入专利数据库Excel文件
   */
  importProjectExcel(data) {
    return axios.post('/v2/project/importExcel', data)
  },
 

  //查询九大场景对应的事件数量
  queryApplicationScenarioEventNumber(params){
    return axios.get('/v2/event/queryApplicationScenarioEventNumber',{params})
  },
  //根据应用场景Id查询事件清单
  queryByApplicationScenario(params){
    return axios.post('/v2/event/queryEvents',params)
  },
  //根据应用场景和事件id查询专利数据库数量
  queryInvestigationTypeProjectNumber(params){
    return axios.post('/v2/event/queryInvestigationTypeProjectNumber',params)
  },
}
