import axios from 'axios'; // var baseURL='https://www.scxjc.club' var baseURL = '' axios.interceptors.request.use( config => { const token = localStorage.getItem('token'); // if (config.url.indexOf('downloadzip') >= 0) { // if (token) { // 判断是否存在token,如果存在的话,则每个http header都加上token // config.headers.Authorization = `${token}`; // } else { // //未登录 // window.location.hash = "/login"; // } // } return config; }, err => { return Promise.reject(err); }); axios.interceptors.response.use(function(response) { // console.log(response.headers) // IE 8-9 if (response.data == null && response.config.responseType === 'json' && response.request.responseText != null) { try { // eslint-disable-next-line no-param-reassign response.data = JSON.parse(response.request.responseText); } catch (e) { // ignored } } // 对响应数据做点什么 if (response.data.code == 401) { // window.location.hash = "/login"; // window.location.hash = "/"; } if (response.data.code == 305) { // window.location.hash = "/"; } return response; }, function(error) { // 对响应错误做点什么 if (error.request.status == 403) { // window.location.hash = "/login"; window.location.hash = "/"; } // console.log(Object.getOwnPropertyNames(error)) // console.log(error.request,error.message) return Promise.reject(error); }); export default { //登录 login: params => { return axios.post(`${baseURL}/api/account/login`, params); }, logout: params => { return axios.post(`${baseURL}/api/account/logout`, params); }, // 全局账号信息 getAccountInfo: params => { return axios.get(`${baseURL}/api/account/info`) }, // 验证码 getCode: params => { return axios.get(`${baseURL}/api/account/imgcode`) }, // 四封审读 getWorksheetList: params => { return axios.get(`${baseURL}/api/admin/examine/worksheet/list`, { params: params }) }, getWorkflowList: params => { return axios.get(`${baseURL}/api/admin/examine/workflow/list`, { params: params }) }, addWorksheet: params => { return axios.post(`${baseURL}/api/admin/examine/worksheet`, params) }, updateWorksheet: params => { return axios.put(`${baseURL}/api/admin/examine/worksheet`, params) }, delWorksheet: params => { return axios.delete(`${baseURL}/api/admin/examine/worksheet`, { params: params }) }, activeWorksheet: params => { return axios.put(`${baseURL}/api/admin/examine/worksheet/active`, params) }, getWorkflow: params => { return axios.get(`${baseURL}/api/admin/examine/workflow`, { params: params }) }, //新建审读 addWorkflow: params => { return axios.post(`${baseURL}/api/admin/examine/workflow/record`, params) }, // 任务分配 getWorkflowassignList: params => { return axios.get(`${baseURL}/api/admin/examine/workflow/assign/list`, { params: params }) }, assignWorkflow: params => { return axios.put(`${baseURL}/api/admin/examine/workflow/assign`, params) }, //审核组成员 getWorkexpertList: params => { return axios.get(`${baseURL}/api/admin/examine/worksheet/expert/list`, { params: params }) }, addWorksheetexpert: params => { return axios.post(`${baseURL}/api/admin/examine/worksheet/expert/add`, params) }, delWorksheetexpert: params => { return axios.delete(`${baseURL}/api/admin/examine/worksheet/expert/del`, { params: params }) }, //专家列表 searchExamineList: params => { return axios.get(`${baseURL}/api/admin/examine/expert/search`, { params: params }) }, //年份列表 journalyearList: params => { return axios.get(`${baseURL}/api/admin/map/journalyear/list`, { params: params }) }, journalissueList: params => { return axios.get(`${baseURL}/api/admin/map/journalissue/list`, { params: params }) }, //新建年份 addYear: params => { return axios.post(`${baseURL}/api/admin/map/journalyear`, params) }, updateYear: params => { return axios.put(`${baseURL}/api/admin/map/journalyear`, params) }, delYear: params => { return axios.delete(`${baseURL}/api/admin/map/journalyear`, { params: params }) }, //期号 addJournalissue: params => { return axios.post(`${baseURL}/api/admin/map/journalissue`, params) }, updateJournalissue: params => { return axios.put(`${baseURL}/api/admin/map/journalissue`, params) }, delJournalissue: params => { return axios.delete(`${baseURL}/api/admin/map/journalissue`, { params: params }) }, //消息接收人 receiverList: params => { return axios.get(`${baseURL}/api/admin/examine/journalusers/search`, { params: params }) }, // 获取用户待选期刊列表 getUserJournals: () => { return axios.get(`${baseURL}/api/admin/user/journals`) }, // 获取用户待选角色列表 getUserRoles: () => { return axios.get(`${baseURL}/api/admin/user/roles`) }, //新增管理员 addUser: params => { return axios.post(`${baseURL}/api/admin/user`, params); }, // 修改管理员 editUser: params => { return axios.put(`${baseURL}/api/admin/user`, params); }, // 删除管理员 delUser: params => { return axios.delete(`${baseURL}/api/admin/user`, { params: params }); }, // 获取角色权限 getUserPermissions: () => { return axios.get(`${baseURL}/api/admin/user/permissions`) }, // 新增表单模板 addTemplate: params => { return axios.post(`${baseURL}/api/admin/message/template`, params); }, // 编辑表单模板 editTemplate: params => { return axios.put(`${baseURL}/api/admin/message/template`, params); }, editTemplateStatus: params => { return axios.put(`${baseURL}/api/admin/message/template/status`, params); }, // 删除表单模板 delTemplate: params => { return axios.delete(`${baseURL}/api/admin/message/template`, { params: params }); }, // 获取模板详情 getTemplate: params => { return axios.get(`${baseURL}/api/admin/message/template`, { params: params }); }, // 获取模板列表 getTemplateList: params => { return axios.get(`${baseURL}/api/admin/message/template/list`, { params: params }) }, //获取所有模板列表 getAllTemplateList: params => { return axios.get(`${baseURL}/api/admin/message/template/all`, { params: params }) }, // 新增角色 addRole: params => { return axios.post(`${baseURL}/api/admin/role`, params); }, // 修改角色 editRole: params => { return axios.put(`${baseURL}/api/admin/role`, params); }, delRole: params => { return axios.delete(`${baseURL}/api/admin/role`, { params: params }); }, // 获取角色列表 getRoleList: params => { return axios.get(`${baseURL}/api/admin/role/list`, { params: params }); }, // 获取角色详情 getRoleInfo: params => { return axios.get(`${baseURL}/api/admin/role`, { params: params }); }, //导出 getJournalData: params => { return axios.get(`${baseURL}/api/admin/journal/download`, { params: params, responseType: "blob" }); }, //专家相关 // 新增专家 addExpert: params => { return axios.post(`${baseURL}/api/admin/examine/expert`, params); }, // 修改专家 editExpert: params => { return axios.put(`${baseURL}/api/admin/examine/expert`, params); }, delExpert: params => { return axios.delete(`${baseURL}/api/admin/examine/expert`, { params: params }); }, // 获取专家列表 getExpertList: params => { return axios.get(`${baseURL}/api/admin/examine/expert/list`, { params: params }); }, // 获取专家详情 getExpertInfo: params => { return axios.get(`${baseURL}/api/admin/examine/expert`, { params: params }); }, // 专业搜索 getSubjectList: params => { return axios.get(`${baseURL}/api/admin/subject/search`, { params: params }); }, // 期刊搜索 getJournalList: params => { return axios.get(`${baseURL}/api/admin/journal/search`, { params: params }); }, // 单位搜索 getBranchList: params => { return axios.get(`${baseURL}/api/admin/branch/search`, { params: params }); }, // 院所 getCollegeList: params => { return axios.get(`${baseURL}/api/admin/organizer/search`, { params: params }); }, // 编辑部账号 addJournalUsers: params => { return axios.post(`${baseURL}/api/admin/examine/journalusers`, params); }, // 修改专家 editJournalUsers: params => { return axios.put(`${baseURL}/api/admin/examine/journalusers`, params); }, delJournalUsers: params => { return axios.delete(`${baseURL}/api/admin/examine/journalusers`, { params: params }); }, // 获取专家列表 getJournalUsersList: params => { return axios.get(`${baseURL}/api/admin/examine/journalusers/list`, { params: params }); }, // 获取专家详情 getJournalUsersInfo: params => { return axios.get(`${baseURL}/api/admin/examine/journalusers`, { params: params }); }, // 我的工作组 getGroupList: params => { return axios.get(`${baseURL}/api/admin/examine/group/list`, { params: params }); }, // 获取工作组成员 getGroupMember: params => { return axios.get(`${baseURL}/api/admin/examine/group/member`, { params: params }); }, // 专家审读工作统计 getExpertWorkflowAnalysis: params => { return axios.get(`${baseURL}/api/admin/examine/expert/analysis`, { params: params }); }, // 专家审读工作统计导出 downloadExpertWorkflowAnalysis: params => { return axios.get(`${baseURL}/api/admin/examine/expert/analysis/download`, { params: params, responseType: "blob" }); }, // 注册期刊账号 registJournalUsers: params => { return axios.post(`${baseURL}/api/admin/examine/journalusers/regist`, params); }, // 注册专家账号 registExpertUsers: params => { return axios.post(`${baseURL}/api/admin/examine/expert/regist`, params); }, // 审核专家账号 examineExpertUsers: params => { return axios.post(`${baseURL}/api/admin/examine/expert/examine`, params); }, // 数据统计相关 getMessageSurveyAnalyse: params => { return axios.get(`${baseURL}/api/admin/message/survey/analyse`, { params: params }); }, getMessageSurveyAnalyseOut: params => { return axios.get(`${baseURL}/api/admin/message/survey/analyse/out`, { params: params }); }, getMessageSurveyQuestionAnalyse: params => { return axios.get(`${baseURL}/api/admin/message/survey/question/analyse`, { params: params }); }, downloadSurveyResult: params => { return axios.get(`${baseURL}/api/admin/message/survey/result/download`, { params: params, responseType: "blob" }); }, downloadSurveyResultOut: params => { return axios.get(`${baseURL}/api/admin/message/survey/result/download/out`, { params: params, responseType: "blob" }); }, downloadAnalyseAll: params => { return axios.get(`${baseURL}/api/admin/message/survey/result/download/all`, { params: params, responseType: "blob" }); }, downloadAnalyseItem: params => { return axios.post(`${baseURL}/api/admin/message/survey/result/download/item`, params, { responseType: "blob" }); }, showAnalyseItem: params => { return axios.get(`${baseURL}/api/admin/message/survey/result/show/item`, { params: params }); }, // // 催办提醒 cuiJournalUserPost: params => { return axios.post(`${baseURL}/api/admin/examine/workflow/cui`, params); }, // 下载四封图片 downloadFourFace: params => { return axios.post(`${baseURL}/api/admin/examine/workflow/fourface/download`, params, { responseType: "blob" }); }, // 修改密码 changePassword: params => { return axios.post(`${baseURL}/api/account/changepwd`, params); }, //审读列表 mapList: params => { return axios.get(`${baseURL}/api/admin/map/mapreview/list`, { params: params }) }, //修改审读禁用启用 updateMapActive: params => { return axios.put(`${baseURL}/api/admin/map/mapreview/active`, params) }, //单位列表 getOrganizerList: params => { return axios.get(`${baseURL}/api/admin/organizer/search`, { params: params }) }, //审读专家列表 getMapExpertList: params => { return axios.get(`${baseURL}/api/admin/map/mapreview/expert/list`, { params: params }) }, // 增加审读 insertMap: params => { return axios.post(`${baseURL}/api/admin/map/mapreview`, params); }, // update审读 updateMap: params => { return axios.put(`${baseURL}/api/admin/map/mapreview`, params); }, //添加审读专家 addExpert: params => { return axios.post(`${baseURL}/api/admin/map/mapreview/expert`, params); }, //删除审读专家 delMapExpert: params => { return axios.delete(`${baseURL}/api/admin/map/mapreview/expert`, { params: params }); }, //审读期刊统计列表 mapJournalList: params => { return axios.get(`${baseURL}/api/admin/map/mapreview/journal/list`, { params: params }) }, //审读图片列表 getMapImgList: params => { return axios.get(`${baseURL}/api/admin/map/mapreview/img/list`, { params: params }) }, //审读期刊详情 getMapImgDetail: params => { return axios.get(`${baseURL}/api/admin/map/mapreview/journal/detail`, { params: params }) }, //审读统计列表 getMapDataStatistic: params => { return axios.get(`${baseURL}/api/admin/map/mapreview/journal/statistic`, { params: params }) }, //审读统计导出 getMapDataExport: params => { return axios.get(`${baseURL}/api/admin/map/mapreview/journal/statistic/export`, { params: params, responseType: "blob" }) }, //删除期刊审读 delJournalMap: params => { return axios.delete(`${baseURL}/api/admin/map/mapreview/journal`, { params: params }); }, //删除审读 delMap: params => { return axios.delete(`${baseURL}/api/admin/map/mapreview`, { params: params }); }, //审读 recordExpert: params => { return axios.post(`${baseURL}/api/admin/map/mapreview/img/record`, params); }, //枚举 getDefault: params => { return axios.get(`${baseURL}/api/admin/map/mapreview/default`, { params: params }) }, //专家列表 getExpertListSearch: params => { return axios.get(`${baseURL}/api/admin/examine/expert/search`, { params: params }) }, //任务列表 getAssignList: params => { return axios.get(`${baseURL}/api/admin/map/mapreview/journal/assign/list`, { params: params }) }, //任务分配 setMapAssign: params => { return axios.post(`${baseURL}/api/admin/map/mapreview/journal/assign`, params); }, //任务催办 setMapAssignUrge: params => { return axios.post(`${baseURL}/api/admin/map/mapreview/journal/urge`, params); }, //撤回审读 delMapRecord: params => { return axios.delete(`${baseURL}/api/admin/map/mapreview/img/record`, { params: params }); }, //学术列表 getScienceViewList: params => { return axios.get(`${baseURL}/api/admin/aca/acareview/list`, { params: params }) }, //修改学术启用禁用 updateScienceViewActive: params => { return axios.put(`${baseURL}/api/admin/aca/acareview/active`, params); }, //新建学术审读 setScienceView: params => { return axios.post(`${baseURL}/api/admin/aca/acareview`, params); }, //修改学术 updateScienceView: params => { return axios.put(`${baseURL}/api/admin/aca/acareview`, params); }, //删除学术审读 delScienceView: params => { return axios.delete(`${baseURL}/api/admin/aca/acareview`, { params: params }); }, //学术学科列表 getScienceSubList: params => { return axios.get(`${baseURL}/api/admin/aca/acareview/subject/list`, { params: params }) }, //设置学科审读专家 setScienceSubExpert: params => { return axios.put(`${baseURL}/api/admin/aca/acareview/subject/assign`, params); }, //学术不端专家列表 getScienceExpert: params => { return axios.get(`${baseURL}/api/admin/aca/acareview/expert/list`, { params: params }); }, //学术不端枚举 getScienceDefault: params => { return axios.get(`${baseURL}/api/admin/aca/acareview/default`, { params: params }); }, //学术期刊列表 getSciencejourList: params => { return axios.get(`${baseURL}/api/admin/aca/acareview/journal/list`, { params: params }); }, //催办 pressScience: params => { return axios.post(`${baseURL}/api/admin/aca/acareview/journal/urge`, params); }, //学术wenzhang列表 getScienceArtList: params => { return axios.get(`${baseURL}/api/admin/aca/acareview/article/list`, { params: params }); }, //学术文章详情 getScienceArtDetail: params => { return axios.get(`${baseURL}/api/admin/aca/acareview/article`, { params: params }); }, //学术任务分配列表 getScienceAssignList: params => { return axios.get(`${baseURL}/api/admin/aca/acareview/journal/assign/list`, { params: params }); }, //期刊任务分配 setJourScienceAssign: params => { return axios.post(`${baseURL}/api/admin/aca/acareview/journal/assign`, params); }, //学术审读 setScienceArtRecord: params => { return axios.post(`${baseURL}/api/admin/aca/acareview/article/record`, params); }, //学术期刊数据导出 exportScienceJourList: params => { return axios.get(`${baseURL}/api/admin/aca/acareview/expert/statistic/export`, { params: params }); }, //专家审读数据统计列表 getExpertStaticList: params => { return axios.get(`${baseURL}/api/admin/aca/acareview/expert/statistic`, { params: params }); }, //删除文章审读 delScienceActView: params => { return axios.delete(`${baseURL}/api/admin/aca/acareview/article/record`, { params: params }); }, //小结列表 getSumarryList: params => { return axios.get(`${baseURL}/api/admin/message/survey/sumarry/analyse`, { params: params }); }, //新加评分规则 setScoreRule: params => { return axios.post(`${baseURL}/api/admin/mark/markrule`, params); }, //修改规则 updateScoreRule: params => { return axios.put(`${baseURL}/api/admin/mark/markrule`, params); }, //列表 getScoreRuleList: params => { return axios.get(`${baseURL}/api/admin/mark/markrule/list`, { params: params }); }, //权重列表 getWeightList: params => { return axios.get(`${baseURL}/api/admin/mark/markweight/list`, { params: params }); }, //修改权重 updateWeight: params => { return axios.put(`${baseURL}/api/admin/mark/markweight`, params); }, //新增权重 setWeight: params => { return axios.post(`${baseURL}/api/admin/mark/markweight`, params); }, //新增评分 setScore: params => { return axios.post(`${baseURL}/api/admin/mark/automark`, params); }, //修改评分 updateScore: params => { return axios.put(`${baseURL}/api/admin/mark/automark`, params); }, //评分列表 getScoreList: params => { return axios.get(`${baseURL}/api/admin/mark/automark/list`, { params: params }); }, //导出小结列表 downloadSumarryList: params => { return axios.post(`${baseURL}/api/admin/message/survey/sumarry/analyse/download`, params, { responseType: "blob" }); }, //评分详情列表接口 getSocreDetailList: params => { return axios.get(`${baseURL}/api/admin/mark/automark/result/list`, { params }); }, //删除评分详情 delScoreDetailList: params => { return axios.delete(`${baseURL}/api/admin/mark/automark/result/list`, { params: params }); }, //删除评分 delScoreList: params => { return axios.delete(`${baseURL}/api/admin/mark/automark`, { params: params }); }, //删除评分规则 delScoreRule: params => { return axios.delete(`${baseURL}/api/admin/mark/markrule`, { params: params }); }, delScoreWeiht: params => { return axios.delete(`${baseURL}/api/admin/mark/markweight`, { params: params }); }, //评分统计 getScoreEcharts: params => { return axios.get(`${baseURL}/api/admin/mark/automark/result/analyse`, { params }); }, //统计报表 getScoreStatement: params => { return axios.get(`${baseURL}/api/admin/mark/automark/result/statistic`, { params }); }, //首页工作组统计 getGroupIndex: params => { return axios.get(`${baseURL}/api/admin/index/group/statistic`, { params }); }, //首页 getIndexMapList: params => { return axios.get(`${baseURL}/api/admin/index/mapgroup/list`, { params }); }, //首页学术 getIndexScienList: params => { return axios.get(`${baseURL}/api/admin/index/acagroup/list`, { params }); }, //首页四封 getIndexSfList: params => { return axios.get(`${baseURL}/api/admin/index/fourgroup/list`, { params }); }, //工作组专家列表 getMapExpertList: params => { return axios.get(`${baseURL}/api/admin/index/mapgroup/expert/list`, { params }); }, //学术工作组专家列表 getSciExpertList: params => { return axios.get(`${baseURL}/api/admin/index/acagroup/expert/list`, { params }); }, //四封工作组专家列表 getSfExpertList: params => { return axios.get(`${baseURL}/api/admin/index/fourgroup/expert/list`, { params }); }, //文件列表 getMapFileList: params => { return axios.get(`${baseURL}/api/admin/map/mapreview/zipfile/list`, { params }); }, //学术文件列表 getAcaFileList: params => { return axios.get(`${baseURL}/api/admin/aca/acareview/zipfile/list`, { params }); }, //删除统计报表 delAutoMark: params => { return axios.delete(`${baseURL}automark/result`, { params: params }); }, //导出 indexMapExport: params => { return axios.get(`${baseURL}/api/admin/index/mapgroup/expert/list/download`, { params, responseType: "blob" }); }, indexAcaExport: params => { return axios.get(`${baseURL}/api/admin/index/acagroup/expert/list/download`, { params, responseType: "blob" }); }, indexSfExport: params => { return axios.get(`${baseURL}/api/admin/index/fourgroup/expert/list/download`, { params, responseType: "blob" }); }, lastMapExport: params => { return axios.get(`${baseURL}/api/admin/map/mapreview/img/list/download`, { params, responseType: "blob" }); }, lastAcaTwoExport: params => { return axios.get(`${baseURL}/api/admin/aca/acareview/journal/list/download`, { params, responseType: "blob" }); }, expertAcaExport: params => { return axios.get(`${baseURL}/api/admin/aca/acareview/expert/statistic/export`, { params, responseType: "blob" }); }, scoreDetailExport: params => { return axios.get(`${baseURL} /api/admin/mark/automark/result/download`, { params, responseType: "blob" }); }, //上传文件 addMapreviewMapfile: params => { return axios.post(`${baseURL}/api/admin/map/mapreview/addmapfile`, params); }, // 重新解析 flushMapfile: params => { return axios.post(`${baseURL}/api/admin/map/mapreview/flushmapfile`, params); }, //上传学术不端文件 addACAreviewACAfile: params => { return axios.post(`${baseURL}/api/admin/aca/acareview/addacafile`, params); }, // 重新解析 flushACAfile: params => { return axios.post(`${baseURL}/api/admin/aca/acareview/flushacafile`, params); }, // 编辑学术不端文章 updateACAArticle: params => { return axios.put(`${baseURL}/api/admin/aca/acareview/article`, params); }, //重新分配 resetExpertUser: params => { return axios.put(`${baseURL}/api/admin/aca/acareview/resetexpertuser`, params); }, //撤回重新审读 rebackMapReview: params => { return axios.put(`${baseURL}/api/admin/map/mapreview/img/reback`, params); }, //撤回重新审读 delMapImgDetail: params => { return axios.delete(`${baseURL}/api/admin/map/mapreview/img`, { params: params }); }, // 同意初审意见 agreeFirst: params => { return axios.post(`${baseURL}/api/admin/map/mapreview/img/agreefirst`, params); }, // 下载学术不端审读结果 downloadAcaReviewResult: params => { return axios.get(`${baseURL} /api/admin/aca/acareview/downloadresult`, { params, responseType: "blob" }); }, // 重新分配 resetAssign: params => { return axios.put(`${baseURL}/api/admin/map/mapreview/reset/assign`, params); }, // 重重置审读 resetRecord: params => { return axios.put(`${baseURL}/api/admin/map/mapreview/reset/record`, params); }, }