const flowPendingPrefix =
  window.flowPendingPrefix ||
  localStorage.getItem('flowPendingPrefix') ||
  '/bpm';
// 登录
export const doCaLogin = '/sso2/signIn/auth/doCaLogin'; // ca登录认证
export const doUserLogin = '/sso2/signIn/auth/doUserLogin'; // 一般的账号密码认证含验证码验证
export const doQrLogin = '/sso2/signIn/auth/doQrLogin'; // 扫码登录
export const logout = '/sso2/signIn/auth/logout'; // 退出登录
export const initLogin = '/sso2/signIn/auth/initLogin'; // 初始化登录页面参数
export const switchUserTo = '/sso2/signIn/auth/switchTo'; // 切换登录用户; 身份切换
export const changeImg = '/sso2/signIn/auth/changeImg'; // 获取图片验证码
export const getLoginCode = '/sso2/signIn/auth/getLoginCode'; // 登录获取短信、邮箱验证码
export const doCodeLogin = '/sso2/signIn/auth/doCodeLogin'; // 短信、邮箱验证码登录
export const updateCode =
  '/sso2/signIn/assembly/getSmsModifyPassVerificationCode'; // 获取短信验证码(修改密码)
export const getModifyPassCode = '/sso2/signIn/assembly/getModifyPassCode'; // 获取修改密码的短信、邮箱验证码
export const codeModifyPass = '/sso2/signIn/assembly/codeModifyPass'; // 验证码重置密码
export const loginModifyPassword = '/sso2/signIn/auth/loginModifyPassword'; // 原始密码重置密码
export const authCenter = '/sso2/authCenter/login'; // 单点登录认证中心
export const initModifyPassword = '/sso2/signIn/assembly/initModifyPassword'; // 初始化密码修改信息
export const doWechatQrLogin = '/sso2/signIn/auth/doWechatQrLogin'; // 微信扫码登录
export const getTwoFactorLoginCode = '/sso2/signIn/auth/getTwoFactorLoginCode'; // 双因素登录，通过消息中心发送登陆验证码给用户
export const doTwoFactorLogin = '/sso2/signIn/auth/doTwoFactorLogin'; // 双因素登录
export const initRetrialAuth = '/sso2/retrialAuth/initRetrialAuth'; // 初始化二级身份权限验证页面
export const getRetrialAuthCode = '/sso2/retrialAuth/getRetrialAuthCode'; // 获取二级身份验证验证码
export const scanCodeRetrialAuth = '/sso2/retrialAuth/scanCodeRetrialAuth'; // 二维码扫码验证(二级权限验证)
export const codeRetrialAuth = '/sso2/retrialAuth/codeRetrialAuth'; // 二级身份验证-验证码验证
export const doAssistanceQrLogin = '/sso2/signIn/auth/doAssistanceQrLogin'; // 二级身份验证-验证码验证

// 框架
export const userOnline = 'sys/v1/mecpSys/userOnlineListJson.dhtml'; // 在线人数列表
export const getUserAppWithTag = '/sysv3/sysUucApp/getUserAppWithTag'; // 获取应用
export const recordUserApp = '/sysv3/sysUucApp/recordUserApp'; // 记录应用点击率
export const mainConfig = '/main2/main/mainConfig'; // 获取主页面配置
export const initUserSet = '/main2/main/initUserSet'; // 获取用户信息
export const updateUserInfo = '/main2/main/updateUserInfo'; // 更新用户信息
export const getUserImgUrl = '/main2/main/getUserImgUrl'; // 获取当前用户头像地址
export const getDoorIndex = '/main2/main/getDoorIndex'; // 获取当前用户所在机构门户地址
export const refreshOnlineUsers = '/main/user/refreshOnlineUsers.dhtml'; // 在线人数
export const getQuickMenuIds = '/main2/main/getQuickMenuIds'; // 获取已绑定的快捷菜单ids; 返回; 分割的字符串
export const getApplicationIdArray = '/main2/main/getApplicationIdArray'; // 获取应用父id数组
export const getComplexApplications = '/main2/menu/getComplexApplications'; // 获取当前用户菜单; 含页签菜单格式的数据
export const getComplexApplicationsNew =
  '/main2/menu/getComplexApplicationsNew'; // 获取当前用户应用菜单; 含页签菜单格式的数据
export const getUserCustomInfo = '/main2/main/getUserCustomInfo'; // 获取主题样式
export const updateUserCustomInfo = '/main2/main/updateUserCustomInfo'; // 更新主题样式
// 框架 - 系统消息
export const sysMsgPage = '/main2/notify/sysMsgPage'; // 获取系统消息
export const ignoreSysMsg = '/main2/notify/ignoreSysMsg'; // 忽略系统消息
export const ignoreAllSysMsg = '/main2/notify/ignoreAllSysMsg'; // 忽略全部系统消息
// 框架 - 搜索
export const searchType = '/oceansearch/v2/search/catalog'; // 搜索分类类型

// 系统参数
export const getSysParam = '/sys/systemSetting/getSysParam.dhtml'; // 获取系统参数

// 附件相关
export const getAdjunctProperties =
  '/main2/mecpfileManagement/getAdjunctProperties'; // 获取附件扩展类型大小
export const uploads = '/main2/mecpfileManagement/upload'; // 上传接口
export const uploadOnlyOne = '/main2/mecpfileManagement/uploadOnlyOne'; // 上传接口(覆盖之前文件)
export const getAdjunctFileInfos =
  '/main2/mecpfileManagement/getAdjunctFileInfos'; // 附件列表
export const uploadSort = '/main2/mecpfileManagement/sort'; // 根据附件的ids排序附件
export const downloadByAdjunctId =
  '/main2/mecpfileManagement/downloadByAdjunctId'; // 下载附件
export const uploadDownloads = '/main2/mecpfileManagement/uploadDownloads'; // 批量下载//
export const previewAdjunct = '/main2/mecpfileManagement/previewAdjunct'; // 预览附件
export const previewAdjunct2 = '/main2/mecpfileManagement/previewAdjunct2/'; // 预览附件(带文件名)
export const previewAdjunctOffice = '/document/webDocument/documentIndex.dhtml'; // 预览附件word excel ppt
export const delAdjunct = '/main2/mecpfileManagement/delAdjunct'; // 删除附件
// 分片上传（dochub v2），优先使用 dochubConfig 下发的同名 url，这里仅作兜底
export const chunkCheckFile = '/dochub/v2/chunk/checkFile'; // 秒传检测/断点续传查询
export const chunkUploadChunk = '/dochub/v2/chunk/uploadChunk'; // 上传单个分片
export const chunkMergeChunk = '/dochub/v2/chunk/mergeChunk'; // 合并分片并写入文档库
export const getDochubBucket = '/dochub/v2/getBucket'; // 根据桶编码获取文档中台桶配置（含分片上传开关/参数）
export const upload_updateClassify = '/main2/mecpfileManagement/updateClassify'; // 根据附件id保存该附件的分类信息
export const getDeleteAdjunctFileInfos =
  '/main2/mecpfileManagement/getDeleteAdjunctFileInfos'; // 根据业务id和附件code获取相关已删除附件的元数据列表
export const getPictureBase64 = '/main2/mecpfileManagement/getPictureBase64'; // 获取图片的base64编码
// 组织机构树
export const getSelectorOrgTree = '/sys/v1/mecpSys/getSelectorOrgTree.dhtml';
// 选择器选择内容
export const getSelectorOrgDetail =
  '/sys/v1/mecpSys/getSelectorOrgDetail.dhtml';
// 业务组织中心树
export const getOrgMainTree = '/sys/v1/mecpSys/getOrgMainTree.dhtml';
// 业务组织中心树下级
export const getSelectOrgsubids = '/sys/v1/mecpSys/getSelectOrgsubids.dhtml';
// 代码表
export const findSysCode = '/sys/v1/mecpSys/findSysCode.dhtml';
export const getDictList = '/dict/getDictDataList';

// 获取用户基本信息
export const findUserBaseInfo = '/sys/v1/mecpSys/findUserBaseInfo.dhtml';
// 说明文档
export const gethelpdoc = '/sys/v1/mecpSys/gethelpdoc.json';
// 获取当前用户信息
export const getCurrentuser = '/sys/api/getCurrentuser.dhtml';
// 获取主题JSON
export const mainDetail = '/config/configLayoutTheme/detail';
// --------------------   流程接口  --------------------------
// 获取节点信息
// export const toStartFlow = '/api/mecp/v1/mecpItask/toStartFlow.json';
export const toStartFlow = '/bpm/bpmBackend/toStartFlow';
// 暂存数据
export const tempSave = flowPendingPrefix + '/task/taskHandle/tempSave.dhtml';
// 获取常用意见
// /oa/commonOpinionsManager/getOpinionsList.dhtml  /api/v1/mecpIpending/commonOpion.json
// /api/v1/mecpIpending/commonOpion.json
export const commonOpion = '/bpm/commonOpinionsManager/list';
// 添加常用意见
export const addCommonOpion = '/bpm/commonOpinionsManager/add';
// 获取常用意见编辑信息
export const editCommonOpion = '/bpm/commonOpinionsManager/edit';
// 常用意见新增
export const saveCommonOpinion =
  flowPendingPrefix + '/commonOpinionsManager/save.dhtml';
// 常用意见修改
export const updateCommonOpinion =
  flowPendingPrefix + '/commonOpinionsManager/update.dhtml';
export const deleteCommonOpion =
  flowPendingPrefix + '/commonOpinionsManager/delete.dhtml';
// 获取选择流程
// export const getProcessDefList =
//   '/api/mecp/v1/mecpItask/getProcessDefList.json';
export const getProcessDefList = '/bpm/bpmBackend/toStartFlowIndex';
// 获取下步办理人 /api/mecp/v1/mecpItask/getNodeInfo.json
export const getNodeInfo =
  flowPendingPrefix + '/task/taskHandle/getNodeInfo.dhtml';

// 系统消息
// 通知方式
export const findCodeValues = '/bpm/bpmCommon/findCodeValues';
export const findSysParam = '/bpm/bpmCommon/findSysParam';
export const findSysCodes =
  flowPendingPrefix + '/task/taskHandle/getDefaultNotificationType.dhtml';

// 获取通知消息
export const getNotificationMsg =
  flowPendingPrefix + '/task/taskHandle/getNotificationMsg.dhtml';
// 获取审核页面数据
export const getHandleInfoHtml = '/bpm/bpmBackend/toTaskHandleIndex.dhtml';
// export const getHandleInfoHtml =
// '/bpm/bpmBackend/toTaskHandleIndex.dhtml';
// 获取节点信息(获取节点属性及办理人)
// export const getNodeInfoHtml = '/api/mecp/v1/mecpItask/getNodeInfoHtml.json';
// 提交办理
export const taskHandleHtml =
  flowPendingPrefix + '/task/taskHandle/taskHandle.dhtml';
// 获取流程图
export const getView = '/bpm/service/diagram/view.html';
// 开始流程
export const register = flowPendingPrefix + '/task/taskHandle/startFlow.dhtml';
// 获取流程列表
export const pendedhistoryList = '/api/v1/mecpIpending/pendedhistoryList.json';
// 获取审核按钮信息
// export const getHandleButtonHtml =
//   '/api/mecp/v1/mecpItask/getHandleButtonHtml.json';
// 获取驳回页面信息
export const toTaskRejectHtml = '/bpm/bpmBackend/toTaskReject';
// 驳回提交
export const taskRejectHtml = '/bpm/bpmBackend/taskReject';
// 获取分阅信息
export const toStartTaskRead = '/bpm/bpmBackend/toStartTaskRead';
// 获取分阅办理页面
export const toStartTaskReadIndex = '/bpm/bpmBackend/toTaskReadIndex';
// 分阅提交
export const taskReadHtml =
  flowPendingPrefix + '/task/taskHandle/taskRead.dhtml';
// 驳回并办结
export const rejectAndEnd =
  flowPendingPrefix + '/task/taskHandle/rejectAndEnd.dhtml';
// 核稿通知
export const toSendMsg = '/bpm/bpmBackend/toSendMsgIndex';
// 核稿通知提交
export const sendMsg = flowPendingPrefix + '/task/taskHandle/sendMsg.dhtml';
// 直接办结
export const endFlowHtml = flowPendingPrefix + '/task/taskHandle/endFlow.dhtml';
// 获取用户信息
// export const findUserBaseInfos = '/api/v1/mecpSys/findUserBaseInfo.dhtml';
// 搜索用户信息
export const handleInfo =
  flowPendingPrefix + '/task/taskHandle/handleInfo.dhtml';
// 获取当前用户信息
export const loginUserInfo = '/bpm/bpmCommon/loginUserInfo';

// WebSocket
export const wss = window.wss || '/main2/ws';
// 订阅
export const topic = '/user/topic/all';
// 流程预设
export const getPresetCustomInfo =
  flowPendingPrefix + '/task/taskHandle/getPresetCustomInfo.dhtml';
// 办理人预设
export const getPresetNodeInfo =
  flowPendingPrefix + '/task/taskHandle/getPresetNodeInfo.dhtml';
// 获取转办页面数据
export const toTaskTransferIndex = '/bpm/bpmBackend/toTaskTransferIndex';
// 转办提交按钮
export const taskTransfer =
  flowPendingPrefix + '/task/taskHandle/taskTransfer.dhtml';
// 流程预设列表
export const toPresetInfoListIndex = '/bpm/bpmBackend/toPresetInfoListIndex';
// 流程预设置为失效
export const deletePresetInfo =
  flowPendingPrefix + '/task/taskHandle/deletePresetInfo.dhtml';
// 流程列表
export const historyListJson =
  flowPendingPrefix + '/pendedhistoryManager/historyListJson.dhtml';
// 获取流程列表配置
export const pendedhistoryListJson =
  flowPendingPrefix + '/pendedhistoryManager/pendedhistoryListJson';
// 获取催办列表
export const pressListJson = flowPendingPrefix + '/wfUrgeRecord/listJson.dhtml';
// 删除流程列表节点
export const deleteFlow =
  flowPendingPrefix + '/pendedhistoryManager/delete.dhtml';
// 修改流程列表意见
export const modifyFlow =
  flowPendingPrefix + '/pendedhistoryManager/modify.dhtml';
// 是否允许启动子流程(必经节点)
export const isCanStartSubFlow =
  flowPendingPrefix + '/task/taskHandle/isCanStartSubFlow.dhtml';
// 联合审核
export const toTaskUnionExamine = '/bpm/bpmBackend/toTaskUnionExamine';
// 联合审核提交
export const taskUnionExamine =
  flowPendingPrefix + '/task/taskHandle/taskUnionExamine.dhtml';
// 征求意见
export const toTaskTakeAdvice = '/bpm/bpmBackend/toTaskTakeAdvice';
// 征求意见提交
export const taskTakeAdvice =
  flowPendingPrefix + '/task/taskHandle/taskTakeAdvice.dhtml';
// 稿件递送
export const toTaskStartDraft = '/bpm/bpmBackend/totaskStartDraft';
// 获取督办页面信息
export const toTaskSupervise = '/bpm/bpmBackend/toTaskSupervise';
// 督办提交
export const toTaskSuperviseSub = '/bpm/bpmBackend/taskSupervise';
// 稿件递送提交接口
// export const taskStartDraft = flowPendingPrefix + '/task/taskHandle/taskStartDraft.dhtml';
export const taskStartDraft =
  flowPendingPrefix + '/task/taskHandle/taskStartDraft.dhtml';
// 复核
export const toTaskReview = '/bpm/bpmBackend/toTaskReview';
// 复核提交
export const taskReview =
  flowPendingPrefix + '/task/taskHandle/taskReview.dhtml';
// 联合用印
export const toTaskUnionSeal = '/bpm/bpmBackend/toTaskUnionSeal';
// 联合用印提交
export const taskUnionSeal =
  flowPendingPrefix + '/task/taskHandle/taskUnionSeal.dhtml';
// 报送两办
export const toTwoOfficesDispatch = '/bpm/bpmBackend/toTwoOfficesDispatch';
// 报送两办提交
export const twoOfficesDispatch =
  flowPendingPrefix + '/task/taskHandle/twoOfficesDispatch.dhtml';
// 重设流程
export const toResetProcessIndex = '/bpm/bpmBackend/toResetProcessIndex';
// 提交重设流程
export const resetProcess =
  flowPendingPrefix + '/task/taskHandle/resetProcess.dhtml';
// 续办流程
export const toTaskContinuationIndex =
  '/bpm/bpmBackend/toTaskContinuationIndex';
// 续办提交
export const taskContinuation =
  flowPendingPrefix + '/task/taskHandle/taskContinuation.dhtml';
// 自由发起流程获取配置参数
export const getFreeStartFlowParams = '/bpm/bpmBackend/getFreeStartFlowParams';
// 自由发起流程提交
export const freeStartFlowWithSubmitTask =
  '/bpm/bpmBackend/freeStartFlowWithSubmitTask';
// 传阅新流程发起外单位数据校验
export const checkForeignOrgStartedCircularRead =
  '/bpm/bpmBackend/checkForeignOrgStartedCircularRead';
// 获取传阅列表
export const pendedhistoryListWithCircularReadJson =
  '/bpm/pendedhistoryManager/pendedhistoryListWithCircularReadJson';
// 获取分阅情况列表
export const fyListJson = '/bpm/pendedhistoryManager/fyListJson.dhtml';
// 获取重设记录列表
export const resetJson = '/bpm/wfResetRecord/listJson.dhtml';
// 获取删除记录列表
export const deletedListJson =
  '/bpm/pendedhistoryManager/deletedListJson.dhtml';
// 恢复删除记录
export const restoredHistory =
  '/bpm/pendedhistoryManager/restoredHistory.dhtml';
// 批量删除
export const batchDelete = '/bpm/pendedhistoryManager/batchDelete.dhtml';

// 传阅列表撤回
export const circularReadWithdraw = '/bpm/bpmBackend/circularReadWithdraw';
// 撤销分阅
export const taskReadWithDraw = '/bpm/bpmBackend/taskReadWithDraw';
// 阅转办提交流程
export const startReadTransferHandleFlowWithTaskReadEnd =
  '/bpm/bpmBackend/startReadTransferHandleFlowWithTaskReadEnd';
// 阅转办校验接口
export const checkBusinessIdStartedReadTransferHandle =
  '/bpm/bpmBackend/checkBusinessIdStartedReadTransferHandle';
// notifySend 消息发送
export const sendList = '/notify2/notifySendRecord/listJson';
export const sendInfo = '/notify2/notifySendRecord/info';
export const sendSave = '/notify2/notifySendRecord/save';
export const sendUpdate = '/notify2/notifySendRecord/update';
export const sendDelete = '/notify2/notifySendRecord/deleteById';
// 重发
export const sendBatch = '/notify2/sendRecord/reSendNotifyMessageBatch';

// 表单结构

export const formContents =
  '/lowcode/admin/online/onlineForm/getOnlineFormFromCache';
export const directStartTaskCircularRead =
  '/bpm/bpmBackend/directStartTaskCircularRead';
export const endFlowAndStartTaskCircularRead =
  '/bpm/bpmBackend/endFlowAndStartTaskCircularRead';
export const getNodeInfoForStart =
  flowPendingPrefix + '/task/taskHandle/getNodeInfoForStart.dhtml';
export const freeStartFlow = '/bpm/bpmBackend/freeStartFlow';
export const getUrgencyLevelChangedNotificationType =
  '/bpm/bpmBackend/getUrgencyLevelChangedNotificationType';
// 自由发起传阅查询
export const toFreeTaskCircularRead = '/bpm/bpmBackend/toFreeTaskCircularRead';
// 提交是否二次确认
export const isCancelSecondConfirmation =
  flowPendingPrefix + '/task/taskHandle/isCancelSecondConfirmation.dhtml';

// 自由发起传阅提交
export const freeTaskCircularRead = '/bpm/bpmBackend/freeTaskCircularRead';
// 获取排序流程
export const toDefinitionChangeSort = '/bpm/bpmBackend/toDefinitionChangeSort';
// 设置流程排序
export const setSort = '/bpm/bpmdefinition/setSort.json ';
// 查询常用菜单列表信息
export const queryUseCommonMenu = '/sys/v1/userCustom/queryUseCommonMenu.dhtml';
// 查询待办任务数量
export const getIndexCount = '/bpm/pendingIndex/getIndexCount.dhtml';
// 查询我的会议数量
export const getVoteMeetingNum =
  '/conference/v1/voteMeeting/getVoteMeetingNum.json';
// 查询待签收/据签收任务数量
export const getUserTipsInstanceNum =
  '/archives/llm/subject/getUserTipsInstanceNum';
// 查询待接收文件数量
export const getShareFilesReceiveCountNew =
  '/oa/sharefiles/receive/getShareFilesReceiveCountNew.dhtml';

// 查询左侧我的提醒和我的快捷菜单
export const queryChildMenuUrl =
  '/sys/v1/userCustom/queryChildMenu.dhtml?type=2';
