import { defHttp } from '/@/utils/http/axios';
import {
  PageParams,
  operateList,
  sceneMoveParams,
  sceneControlParams,
  RentListGetResultModel,
  checkDownLoadResult,
  sceneDownloadResult,
  ResultDetail,
  addCameraParams,
  updateParams,
  overallDelete,
} from './model';
import { Result } from '/#/axios';

enum Api {
  pageList = '/service/manage/news/pageNews',
  newDisplay = '/service/manage/news/display',
  newPutTop = '/service/manage/news/putTop',
  newUpdateNews = '/service/manage/news/updateNews',
  newAddNews = '/service/manage/news/addNews',
  newDelete = '/service/manage/news/delete',
  publicNews = '/service/manage/news/publicNews',
  newGetNewsDetail = '/service/manage/news/getNewsDetail',
  //招聘
  employNoteList = '/service/manage/employNote/list',
  addOrUpdate = '/service/manage/employNote/addOrUpdate',
  employNoteDelete = '/service/manage/employNote/delete',
  employNoteIsPush = '/service/manage/employNote/isPush',
  employNoteIsTop = '/service/manage/employNote/isTop',
  //留言
  intercomMessageList = '/service/manage/intercomMessage/list',
  intercomMessageHandle = '/service/manage/intercomMessage/handle',

  operateSceneList = '/service/manage/scene/list',
  sceneMove = '/service/manage/scene/move',
  sceneDelete = '/service/manage/scene/delete',
  qjsceneDelete = '/service/manage/overall/delete',
  sceneDownload = '/service/manage/scene/downScene',
  sceneCopy = '/service/manage/scene/copy',
  checkDownLoad = '/service/manage/scene/checkDownLoad',
  downloadProcess = '/service/manage/scene/downloadProcess',
  rebuildScene = '/service/manage/scene/rebuildScene',
  overallList = '/service/manage/overall/list',
  overallDelete = '/service/manage/overall/delete',
  agentAuditList = '/service/manage/agentAudit/list',
  agentAuditHandle = '/service/manage/agentAudit/handle',
  sceneApplyList = '/service/manage/sceneApply/list',
  sendEmail = '/service/manage/sceneApply/sendEmail',
  sceneApplyHandle = '/service/manage/sceneApply/handle',
  getInfoMail = '/service/manage/getInfo',
  updateMail = '/service/manage/update',
  caseaddOrUpdate = '/service/manage/case/addOrUpdate',
  caseList = '/service/manage/case/list',
  caseDel = '/service/manage/case/del',
  caseRelease = '/service/manage/case/isShow',
  caseWithdraw = '/service/manage/case/release',
  getAuthList = '/service/manage/jy/sceneUserAuth/getAuthList',
  getByRyId = '/service/manage/jy/user/getByRyId',
  addAuth = '/service/manage/jy/sceneUserAuth/addAuth',
  delAuth = '/service/manage/jy/sceneUserAuth/delAuth',
  checkAuthOther = '/service/manage/jy/sceneUserAuth/checkAuthOther',
}

/**
 * @description: Get sample list value
 */

export const agentAuditList = (params: PageParams) =>
  defHttp.post<RentListGetResultModel>({
    url: Api.agentAuditList,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
export const agentAuditHandle = (params: PageParams) =>
  defHttp.post<RentListGetResultModel>({
    url: Api.agentAuditHandle,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
export const sendEmail = (params: PageParams) =>
  defHttp.post<RentListGetResultModel>({
    url: Api.sendEmail,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
export const sceneApplyList = (params: PageParams) =>
  defHttp.post<RentListGetResultModel>({
    url: Api.sceneApplyList,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
export const sceneApplyHandle = (params: PageParams) =>
  defHttp.post<RentListGetResultModel>({
    url: Api.sceneApplyHandle,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });

export const caseListApi = (params: PageParams) =>
  defHttp.post<RentListGetResultModel>({
    url: Api.caseList,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });

export const caseaddOrUpdateApi = (params: PageParams) =>
  defHttp.post<RentListGetResultModel>({
    url: Api.caseaddOrUpdate,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });

export const casePublicApi = (params: PageParams) =>
  defHttp.get<RentListGetResultModel>({
    url: Api.caseWithdraw,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
export const caseReleaseApi = (params: PageParams) =>
  defHttp.get<RentListGetResultModel>({
    url: Api.caseRelease,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
export const caseDelApi = (params: PageParams) =>
  defHttp.post<RentListGetResultModel>({
    url: Api.caseDel,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
export const ListApi = (params: PageParams) =>
  defHttp.post<RentListGetResultModel>({
    url: Api.pageList,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
//显示隐藏
export const NewDisplay = (params: PageParams) =>
  defHttp.post<RentListGetResultModel>({
    url: Api.newDisplay,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });

//新闻管理/修改是否置顶
export const NewPutTop = (params: PageParams) =>
  defHttp.post<RentListGetResultModel>({
    url: Api.newPutTop,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
//新闻管理/获取新闻详情
export const NewsDetail = (params: PageParams) =>
  defHttp.post<ResultDetail>({
    url: Api.newGetNewsDetail,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });

//邮件模板设置
export const getInfoMail = (params: PageParams) =>
  defHttp.get<ResultDetail>({
    url: Api.getInfoMail,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });

//邮件模板设置
export const updateMail = (params: PageParams) =>
  defHttp.post<ResultDetail>({
    url: Api.updateMail,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
//新闻管理/修改是否发布
export const NewPublicNews = (params: PageParams) =>
  defHttp.post<RentListGetResultModel>({
    url: Api.publicNews,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });

//新闻管理/新增新闻
export const newAddNews = (params: PageParams) =>
  defHttp.post<RentListGetResultModel>({
    url: Api.newAddNews,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });

//新闻管理/新增新闻
export const newUpdateNews = (params: PageParams) =>
  defHttp.post<RentListGetResultModel>({
    url: Api.newUpdateNews,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });

//新闻管理/新增新闻
export const newDelete = (params: PageParams) =>
  defHttp.post<RentListGetResultModel>({
    url: Api.newDelete,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });

export const operateSceneList = (params: operateList) =>
  defHttp.post<Result>({
    url: Api.operateSceneList,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
export const overallList = (params: overallList) =>
  defHttp.post<Result>({
    url: Api.overallList,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
export const overallDelete = (params: overallList) =>
  defHttp.post<Result>({
    url: Api.overallDelete,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
export const sceneMove = (params: sceneMoveParams) =>
  defHttp.post<Result>({
    url: Api.sceneMove,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
export const rebuildScene = (params: sceneControlParams) =>
  defHttp.get<Result>({
    url: Api.rebuildScene,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
export const sceneDelete = (params: sceneControlParams) =>
  defHttp.post<Result>({
    url: Api.sceneDelete,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });

export const qjsceneDelete = (params: overallDelete) =>
  defHttp.post<Result>({
    url: Api.qjsceneDelete,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
export const checkDownLoad = (params: sceneControlParams) =>
  defHttp.get<checkDownLoadResult>({
    url: Api.checkDownLoad,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
export const sceneDownload = (params: sceneControlParams) =>
  defHttp.get<sceneDownloadResult>({
    url: Api.sceneDownload,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
export const downloadProcess = (params: sceneControlParams) =>
  defHttp.get<sceneDownloadResult>({
    url: Api.downloadProcess,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
export const sceneCopy = (params: sceneControlParams) =>
  defHttp.post<Result>({
    url: Api.sceneCopy,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
// 招聘管理/列表
export const employNoteList = (params: PageParams) =>
  defHttp.post<RentListGetResultModel>({
    url: Api.employNoteList,
    params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
// 招聘管理/新增或修改
export const addOrUpdate = (params: PageParams) =>
  defHttp.post<RentListGetResultModel>({
    url: Api.addOrUpdate,
    params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });

// 招聘管理/删除
export const employNoteDelete = (params: PageParams) =>
  defHttp.post<RentListGetResultModel>({
    url: Api.employNoteDelete,
    params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
// 招聘管理/发布撤回
export const employNoteIsPush = (params: addCameraParams) =>
  defHttp.post<RentListGetResultModel>({
    url: Api.employNoteIsPush,
    params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
// 招聘管理/置顶撤回
export const employNoteIsTop = (params: addCameraParams) =>
  defHttp.post<RentListGetResultModel>({
    url: Api.employNoteIsTop,
    params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
// 留言管理/列表
export const intercomMessageList = (params: updateParams) =>
  defHttp.post<Result>({
    url: Api.intercomMessageList,
    params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
// 留言管理/列表
export const intercomMessageHandle = (params: updateParams) =>
  defHttp.post<Result>({
    url: Api.intercomMessageHandle,
    params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });

// 根据场景码获取授权用户列表
export const getAuthList = (params) =>
  defHttp.post<Result>({
    url: Api.getAuthList,
    params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });

// 根据警员ID获取用户列表
export const getByRyId = (params) =>
  defHttp.post<Result>({
    url: Api.getByRyId,
    params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });

// 根据警员ID获取用户列表
export const addAuth = (params) =>
  defHttp.post<Result>({
    url: Api.addAuth,
    params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });

// 根据警员ID获取用户列表
export const checkAuthOtherApi = (params) =>
  defHttp.post<Result>({
    url: Api.checkAuthOther,
    params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });

// 根据警员ID获取用户列表
export const delAuth = (params) =>
  defHttp.post<Result>({
    url: Api.delAuth,
    params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
