@@ -0,0 +1,8 @@ | |||
import http from '@/http' | |||
export const getVerificationCode = data => http.post('/api/v1/verification/send', data) // 获取验证码 | |||
export const logout = data => http.post('/api/v1/user/auth/logout', data) // 退出登录 | |||
// export const scanQrcode = data => http.post(`/api/v1/user/auth/login?credential=${data.credential}&loginType=DING_QR_LOGIN`, data) // 账号密码的登陆方式java | |||
export const scanQrcode = data => http.post(`/api/v1/user/auth/login?credential=${data.credential}&identifier=${data.identifier}&loginType=${data.loginType}`, data) // 写死账号密码的登陆方式java | |||
export const singleLogin = data => http.post('/api/v1/user/auth/common-login', data, { 'Content-Type': 'application/x-www-form-urlencoded' }) // 单点登录 | |||
@@ -0,0 +1,3 @@ | |||
import http from '@/http' | |||
export const cockpitStats = params => http.get('/api/v1/dashboard/cockpit-stats', { params }) |
@@ -0,0 +1,19 @@ | |||
import http from '@/http' | |||
export const downFileById = params => | |||
http.get('/file/download', { params, responseType: 'blob' }) // 根据文件id下载(单个) | |||
export const districtList = params => http.get('/api/v1/region/tree', { params }) // 区划树 | |||
export const getOrgLine = params => http.get('/api/v1/gov-business-strip/get-child-list', { params }) // 获取条线标签的的树状结构 | |||
export const userMenu = params => | |||
http.get('/api/v1/menu/myMenu', { params })// 查询当前登录用户的菜单 | |||
export const dictAll = data => http.post('/api/v1/meta/dictionary/list', data) // 字典 | |||
export const getDictionaryTree = data => http.post('/api/v1/meta/tag', data) // 获取专家标签的树状结构 | |||
export const findUrlById = data => http.post('/file/findUrlEntryById', data) // 根据文件id,获取文件临时的访问路径 | |||
export const downloadToPdfStream = params => | |||
http.get('/api/v1/wps-convert/downloadToPdfStream', { params, responseType: 'blob' }) // 根据文件ID预览PDF文件 | |||
export const getOrganizationByCode = code => http.get(`/api/v1/irs/org/getOrganizationByCode/${code}`) // 获取企业信息 | |||
export const getBusinessstripLine = code => http.get(`/api/v1/belong-org/business-strip/list`) // 专家条线 | |||
@@ -0,0 +1,5 @@ | |||
import http from '@/http' | |||
export const list = params => http.get('/api/v1/application/to-register-app-project-list', { params }) // 待应用预注册的项目应用列表 | |||
export const pushProjectApp = data => http.post('/api/v1/irs/app/push-project-app', data) // 推送项目和应用关系 | |||
@@ -0,0 +1,11 @@ | |||
import http from '@/http' | |||
const apiLists = { | |||
1: '/api/v1/declared/construction/contract/project-list', // 待合同备案项目列表 | |||
2: '/api/v1/declared/construction/contract/project-list-perfect'// 已经完善合同的项目列表 | |||
} | |||
export const list = (state, params) => http.get(apiLists[state], { params }) // 合同备案列表 | |||
export const submitContract = data => http.post('/api/v1/declared/construction/submit-contract', data) // 合同备案提交 | |||
export const contractDetail = projectId => http.get(`/api/v1/declared/construction/contract/detail/${projectId}`) // 合同备案详情 | |||
export const supplement = data => http.post('/api/v1/declared/construction/supplement', data) // 补充实际支付金额 | |||
@@ -0,0 +1,5 @@ | |||
import http from '@/http' | |||
export const list = params => http.get('/api/v1/declared/delayed/project-list', { params }) // 延期申请项目列表 | |||
export const delayedApply = data => http.post('/api/v1/declared/delayed/apply', data) // 延期申请 | |||
export const delayedDetail = projectId => http.get(`/api/v1/declared/delayed/detail/${projectId}`) // 延期申请详情 |
@@ -0,0 +1,6 @@ | |||
import http from '@/http' | |||
export const list = params => http.get('/api/v1/declared/final-acc/project-list', { params }) // 终验列表 | |||
export const submitFinal = (state, data) => http.post(`/api/v1/declared/final-acc/${state === 2 ? 're' : ''}start-process`, data) // 终验提交 | |||
export const finalDetail = projectId => http.get(`/api/v1/declared/final-acc/detail/${projectId}`) // 终验详情 | |||
@@ -0,0 +1,52 @@ | |||
import http from '@/http' | |||
export const saveDraft = data => http.post('/api/v1/declared/save-to-draft', data) | |||
// 草稿列表java | |||
export const draftList = params => http.get('/api/v1/declared/draft', { params }) | |||
// 草稿详情java | |||
export const getDraftDetail = params => http.get(`/api/v1/declared/draft/${params.id}`) | |||
export const getProjectDetail = params => http.get(`/api/v1/project/lib/${params.id}`) | |||
// 项目列表 | |||
export const getProjectList = params => http.get('/api/v1/declared/list', { params })// 项目列表java | |||
// 预审申报java | |||
export const preExamineDeclare = data => http.post('/api/v1/prequalification/start', data) | |||
// 项目预审列表java | |||
export const getPreExamineList = params => http.get('/api/v1/prequalification/list', { params }) | |||
// 核心业务数据查询java | |||
export const getCoreBusinessData = params => http.get('/api/v1/declared/core-biz', { params }) | |||
export const getProjectConfigInfo = params => http.get(`/api/v1/sys/form/${params.regionCode}`) | |||
// 建设方案申报列表java | |||
export const getConstructionDeclarePlan = params => http.get('/api/v1/construction/list', { params }) | |||
// 建设方案-申报方案java | |||
export const declareConstructionScheme = data => http.post('/api/v1/construction/start', data) | |||
// 可调整项目列表java | |||
export const projectAdjustmentList = params => http.get('/api/v1/project/adjustment/list', { params }) | |||
const exportList = { | |||
1: '/api/v1/declared/export', // 项目申报导出 | |||
2: '/api/v1/prequalification/export', // 预审项目导出 | |||
3: '/api/v1/construction/export', // 建设方案申报导出 | |||
4: '/api/v1/project/adjustment/export', // 内容调整导出 | |||
5: '/api/v1/project/renewal/exportRenewalDeclare', // 续建项目资金库导出 | |||
6: '/api/v1/declared/purchase/export', // 采购备案导出 | |||
7: '/api/v1/declared/construction/contract/export', // 合同备案导出 | |||
8: '/api/v1/declared/construction/pre-ins/export', // 初验导出 | |||
9: '/api/v1/declared/final-acc/export', // 终验导出 | |||
10: '/api/v1/declared/delayed/export' // 延期项目导出 | |||
} | |||
export const declareExport = (state, params) => | |||
http.get(exportList[state], { params, responseType: 'blob' }) // 导出列表 | |||
const projectStartList = { | |||
1: '/api/v1/declared/start', // 项目申报-新增 | |||
2: '/api/v1/declared/restart' // 重新申报 | |||
} | |||
export const projectStart = (state, data) => http.post(projectStartList[state], data) | |||
export const applicationList = params => http.get('/api/v1/irs/application-list', { params }) // irs应用列表 | |||
export const piotTasks = params => http.get('/api/v1/irs/piot-tasks', { params }) // 试点任务列表 | |||
export const govStripList = params => http.get('/api/v1/gov-business-strip/list', { params }) // 获取省级条线列表 | |||
export const removeProject = (projectCode) => http.post(`/api/v1/declared/remove/${projectCode}`) // 删除项目 | |||
@@ -0,0 +1,6 @@ | |||
import http from '@/http' | |||
export const list = params => http.get('/api/v1/declared/construction/pre-ins/project-list', { params }) // 初验列表 | |||
export const submitPreIns = data => http.post('/api/v1/declared/construction/submit-pre-ins', data) // 初验备案提交 | |||
export const preInsDetail = projectId => http.get(`/api/v1/declared/construction/pre-ins/detail/${projectId}`) // 初验备案详情 | |||
@@ -0,0 +1,19 @@ | |||
import http from '@/http' | |||
const listUrl = { | |||
1: '/api/v1/gov-project-collection/operation/list', | |||
2: '/api/v1/gov-project-collection/operation/draft-list' | |||
}, | |||
detaillUrl = { | |||
1: '/api/v1/gov-project-collection/operation/detail/', | |||
2: '/api/v1/gov-project-collection/operation/draft-detail/' | |||
}, | |||
delUrl = { | |||
1: '/api/v1/gov-project-collection/operation/remove/', | |||
2: '/api/v1/gov-project-collection/operation/draft-remove/' | |||
} | |||
export const list = (state, params) => http.get(listUrl[state], { params }) // 列表 | |||
export const save = data => http.post(`/api/v1/gov-project-collection/operation/save`, data) // 保存 | |||
export const detail = (state, id) => http.get(`${detaillUrl[state]}${id}`) // 详情 | |||
export const del = (state, id) => http.post(`${delUrl[state]}${id}`) // 删除 | |||
export const draftSave = data => http.post(`/api/v1/gov-project-collection/operation/draft`, data) // 草稿保存 |
@@ -0,0 +1,8 @@ | |||
import http from '@/http' | |||
export const purchaseList = params => http.get('/api/v1/declared/purchase/project-list', { params }) // 采购备案列表 | |||
export const submitResult = data => http.post('/api/v1/declared/purchase/submit-result', data) // 采购备案提交 | |||
export const purchaseDetail = projectId => http.get(`/api/v1/declared/purchase/detail/${projectId}`) // 采购备案详情 | |||
export const pushOperation = data => http.post(`/api/v1/declared/operation/push-operation`, data) // 填写实施计划 | |||
export const operationDetail = projectId => http.get(`/api/v1/declared/operation/detail/${projectId}`) // 实施详情 | |||
@@ -0,0 +1,10 @@ | |||
import http from '@/http' | |||
export const renewalDeclared = data => http.post('/api/v1/project/renewal/declared', data) // 项目续建资金申报 | |||
export const renewalDeclaredDetail = id => http.get(`/api/v1/project/renewal/${id}`) // 项目续建资金申报详情 | |||
export const libAllList = params => http.get(`/api/v1/project/lib/all-list`, { params }) // 关联项目列表 | |||
export const renewalProjectList = params => http.get(`/api/v1/project/renewal/project-list`, { params }) // 关联项目列表 | |||
export const convertToCollection = projectCode => http.get(`/api/v1/project/lib/convert-to-collection/${projectCode}`) // 申报项目转化为项目归集 | |||
@@ -0,0 +1,11 @@ | |||
import http from '@/http' | |||
export const listReviewProject = params => http.get('/api/v1/meeting/listReviewProject', { params }) // 评审会议列表 | |||
export const save = data => http.post('/api/v1/expertReview/save', data) // 提交评审意见 | |||
export const listForGroupLeader = ({ projectId, meetingId }) => http.get(`/api/v1/expertReview/listForGroupLeader/${projectId}/${meetingId}`) // 组员意见 | |||
export const templatesById = params => http.get('/api/v1/reviewTemplateSettings/templates', { params }) // 根据模版ID获取评审模版批量 | |||
export const expertReviewDetail = ({ projectId, userId }) => http.get(`/api/v1/expertReview/detail/${projectId}/${userId}`) // 专家评审意见 | |||
export const meetingListForLeave = params => http.get('/api/v1/meeting/expert/meetingListForLeave', { params }) // 会议请假列表 | |||
export const leaveSave = data => http.post('/api/v1/leave/save', data) // 请假 | |||
@@ -0,0 +1,15 @@ | |||
import http from '@/http' | |||
export const getExpertList = data => http.post('/api/v1/expert/expert-library/list', data) // 专家库列表 | |||
export const expertSignUp = data => http.post('/api/v1/expert/basic-info-submit', data) // 填写基本信息接口(专家报名使用) | |||
export const expertEdit = data => http.post('/api/v1/expert/basic-info-modify', data) // 专家信息编辑 | |||
export const getDictionaryList = data => http.post('/api/v1/meta/tag-tyoe/list', data) // 获取字典数据 这个接口是看,都有哪些字典数据用的 | |||
export const getDictionaryTree = data => http.post('/api/v1/meta/tag', data) // 获取专家标签的树状结构 | |||
export const getDeputyActivityRecord = params => http.get('/api/v1/meeting/expert/meetingList', { params }) // 履职记录 | 专家会议列表 | |||
export const zzdInfo = data => http.post('/api/v1/expert/get-zzd-info', data) // 获取浙政钉用户信息 | |||
export const registration = data => http.post('/api/v1/expert/registration', data) // 专家报名 | |||
export const judgeSubmit = data => http.post('/api/v1/meeting/expert-judge/submit', data) // 履职评价 | |||
export const judgeDetail = meetingExpertId => http.get(`/api/v1/meeting/expert-judge/detail/${meetingExpertId}`) // 查看履职评价 | |||
export const delivery = userId => http.post(`/api/v1/expert/delivery/${userId}`) // 删除 | |||
export const modifyApply = data => http.post('/api/v1/expert/modify-apply', data) // 专家信息编辑申请 | |||
@@ -0,0 +1,7 @@ | |||
import http from '@/http' | |||
export const getExpertVerifyList = data => http.post('/api/v1/apply/meta/list', data) // 审核列表筛选java | |||
export const submitVerifyResult = data => http.post('/api/v1/apply/meta/result', data) // 提交审核结果java | |||
export const getExpertVerifyDetail = params => http.get(`/api/v1/apply/meta/detail/${params.applyId}`) // 获取审核详情java | |||
export const getExpertDetail = params => http.get('/api/v1/expert/admin/detail', { params }) // 获取专家详情java | |||
export const modifyDetail = params => http.get('/api/v1/expert/modify/detail', { params }) // 审核获取专家修改后的信息 |
@@ -0,0 +1,30 @@ | |||
import http from '@/http' | |||
export const getReviewMeetingList = params => http.get('/api/v1/meeting/listReviewProject', { params }) // 会议评审列表java | |||
export const getMeetingProjectList = params => http.get('/api/v1/meeting/option/project', { params }) // 评审会议项目列表java | |||
export const createMeeting = data => http.post('/api/v1/meeting/create', data) // 新建会议java | |||
export const meetingList = params => http.get('/api/v1/meeting/manager/meetingList', { params }) // 评审会议列表 | |||
export const meetingBasicInfo = meetingId => http.get(`/api/v1/meeting/basicInfo/${meetingId}`) // 会议详情-基本信息 | |||
export const meetingInviteRuleDetail = meetingId => http.get(`/api/v1/meeting/inviteRuleDetail/${meetingId}`) // 会议详情-抽取规则 | |||
export const projects = meetingId => http.get(`/api/v1/meeting/${meetingId}/projects`) // 会议关联项目 | |||
export const inviteExpertList = meetingId => http.get(`/api/v1/meeting/inviteExpertList/${meetingId}`) // 抽取情况 | |||
export const expertConfirm = data => http.post(`/api/v1/meeting/expert/confirm`, data) // 确认参加 | |||
export const setUpHeadman = data => http.post(`/api/v1/meeting/setUpHeadman`, data) // 设置组长 | |||
export const stopInvite = meetingId => http.get(`/api/v1/meeting/stopInvite/${meetingId}`) // 停止抽取 | |||
export const confirmedRoster = data => http.post(`/api/v1/meeting/confirmedRoster`, data) // 重发短信 | |||
export const expertRelease = data => http.post(`/api/v1/meeting/expert/release`, data) // 释放专家 | |||
export const meetingCancel = data => http.post(`/api/v1/meeting/cancel`, data) // 取消会议 | |||
export const batchAppoint = data => http.post(`/api/v1/meeting/expert/batchAppoint`, data) // 补充专家 | |||
export const convertToAppoint = data => http.post(`/api/v1/meeting/convertToAppoint`, data) // 转为指定抽取 | |||
export const continueInvite = data => http.post(`/api/v1/meeting/continueInvite`, data) // 续抽 | |||
export const listReview = ({ projectId, meetingId }) => http.get(`/api/v1/expertReview/list/${projectId}/${meetingId}`) // 所有组员意见以及最终意见 | |||
export const expertRemove = data => http.post(`/api/v1/meeting/expertRemove`, data) // 指定专家-移除 | |||
const exportUrl = { | |||
1: '/api/v1/meeting/export/laborFeeAuditTable/', | |||
2: '/api/v1/meeting/export/expertFeeTable/', | |||
3: '/api/v1/meeting/export/expertInviteTable/', | |||
4: '/api/v1/meeting/export/expertReviewTable/' | |||
} | |||
export const exportTable = (state, meetingId) => http.get(`${exportUrl[state]}${meetingId}`, { responseType: 'blob' }) // 导出 |
@@ -0,0 +1,5 @@ | |||
import http from '@/http' | |||
export const template = ({ templateType, regionCode }) => http.get(`/api/v1/reviewTemplateSettings/template/${templateType}/${regionCode}`) // 根据模板类型获取模板 | |||
export const save = data => http.post('/api/v1/reviewTemplateSettings/modify', data) // 保存模板 | |||
@@ -0,0 +1,16 @@ | |||
import http from '@/http' | |||
export const getWorkbenchData = params => | |||
http.get('/api/v1/workbench', { params })// 获取工作台数据 | |||
export const getInfoList = params => | |||
http.get('/api/v1/notify/list', { params })// 通知列表 | |||
export const getInfoDetail = params => | |||
http.get('/api/v1/notify/detail/{id}', { params })// 通知详情 | |||
export const infoReceived = data => http.post(`/api/v1/notify/read/${data.id}`, data) // 通知已读 | |||
export const guidancDetail = params => | |||
http.get('/api/v1/sys/user-guidanc/detail', { params })// 通知列表 | |||
export const dashboardList = params => | |||
http.get('/api/v1/notice/dashboard/list', { params })// 公告列表 | |||
export const urging = recordId => | |||
http.post(`/api/v1/workbench/urging/${recordId}`)// 催办 | |||
@@ -0,0 +1,11 @@ | |||
import http from '@/http' | |||
export const list = params => http.get('/api/v1/app-appraisal/list', { params }) // 应用绩效评价计划列表 | |||
const listUrl = { | |||
1: '/api/v1/app-appraisal/unEvaluate-list/', | |||
2: '/api/v1/app-appraisal/evaluated-list/' | |||
} | |||
export const projectList = (state, planId, params) => http.get(`${listUrl[state]}${planId}`, { params }) // 待整改列表 | |||
export const save = data => http.post('/api/v1/app-appraisal/save', data) // 保存分数 | |||
export const detail = (appId, planId) => http.get(`/api/v1/app-appraisal/detail/${planId}/${appId}`) // 详情 | |||
@@ -0,0 +1,24 @@ | |||
import http from '@/http' | |||
const listUrl = { | |||
1: '/api/v1/performance-appraisal/plan/list', | |||
2: '/api/v1/performance-appraisal/audit/submit-list' | |||
} | |||
export const list = (sate, params) => http.get(listUrl[sate], { params }) // 评价计划列表 | |||
export const detail = id => http.get(`/api/v1/performance-appraisal/plan/detail/${id}`) // 评价计划详情 | |||
export const edit = data => http.post(`/api/v1/performance-appraisal/plan/edit`, data) // 评价计划编辑 | |||
export const create = data => http.post(`/api/v1/performance-appraisal/plan/create`, data) // 评价计划新建 | |||
export const del = id => http.post(`/api/v1/performance-appraisal/plan/delete/${id}`) // 评价计划删除 | |||
export const groupList = (id, params) => http.get(`/api/v1/performance-appraisal/plan/group/list/${id}`, { params }) // 评价计划分组列表 | |||
export const groupSave = data => http.post(`/api/v1/performance-appraisal/plan/group/save`, data) // 评价计划分组保存 | |||
export const groupDel = id => http.post(`/api/v1/performance-appraisal/plan/group/delete/${id}`) // 评价计划分组删除 | |||
export const groupDetail = id => http.get(`/api/v1/performance-appraisal/plan/group/detail/${id}`) // 评价计划分组详情 | |||
export const addProject = data => http.post(`/api/v1/performance-appraisal/plan/addProject`, data) // 添加待评价项目判断项目是否可以添加 | |||
export const addApplication = data => http.post(`/api/v1/performance-appraisal/plan/addApplication`, data) // 添加待评价应用判断应用是否可以添加 | |||
export const planProjectList = params => http.get(`/api/v1/performance-appraisal/plan/project-list`, { params }) // 评价计划内待分组项目列表 | |||
export const finalProjectList = params => http.get(`/api/v1/performance-appraisal/plan/final-project-list`, { params }) // 终验项目列表 | |||
export const finalAppList = params => http.get(`/api/v1/performance-appraisal/plan/final-application-list`, { params }) // 终验应用列表 | |||
export const filterProjects = params => http.get('/api/v1/performance-appraisal/plan/filter-projects', { params }) // 筛选项目 | |||
// export const auditSubmitList = params => http.get('/api/v1/performance-appraisal/audit/submit-list', { params }) // 审核列表 | |||
@@ -0,0 +1,6 @@ | |||
import http from '@/http' | |||
export const list = params => http.get('/api/v1/verify/list', { params }) // 核查-评价计划列表 | |||
export const groupProjectList = (groupId, params) => http.get(`/api/v1/verify/group-project-list/${groupId}`, { params }) // 核查用户所在分组核查项目列表 | |||
export const submitVerify = data => http.post(`/api/v1/verify/submit-verify`, data) // 核查提交 | |||
@@ -0,0 +1,44 @@ | |||
import http from '@/http' | |||
// 项目指标模板 | |||
const listUrl = { | |||
1: '/api/v1/indicator-config/project/index/template/list', | |||
2: '/api/v1/performance-appraisal/audit/submit-list', | |||
3: '/api/v1/indicator-config/project/index/template/draft/list' | |||
} | |||
export const list = (state, params) => http.get(listUrl[state], { params }) // 项目指标配置模板列表 | |||
export const save = data => http.post(`/api/v1/indicator-config/project/index/template/save`, data) // 项目指标配置模板新建 | |||
export const draftSave = data => http.post(`/api/v1/indicator-config/project/index/template/draft`, data) // 项目指标配置模板暂存 | |||
export const draftDetail = id => http.get(`/api/v1/indicator-config/project/index/template/draft/detail/${id}`) // 项目指标配置模板草稿详情 | |||
export const detail = id => http.get(`/api/v1/indicator-config/project/index/template/detail/${id}`) // 项目指标配置模板详情 | |||
export const enable = (templateId, state) => http.put(`/api/v1/indicator-config/project/index/${templateId}/active/${state}`) // 项目指标配置模板启用、禁用 | |||
export const del = id => http.post(`/api/v1/indicator-config/project/index/template/delete/${id}`) // 项目指标配置模板删除 | |||
export const copy = id => http.post(`/api/v1/indicator-config/project/index/template/copy/${id}`) // 项目指标配置模板复制 | |||
// 项目指标库 | |||
export const indexList = params => http.get('/api/v1/indicator-config/project/index/list', { params }) // 项目指标库列表 | |||
export const indexSave = data => http.post(`/api/v1/indicator-config/project/index/save`, data) // 项目指标新建 | |||
export const indexDetail = id => http.post(`/api/v1/indicator-config/project/index/detail/${id}`) // 项目指标详情 | |||
export const indexDel = id => http.post(`/api/v1/indicator-config/project/index/delete/${id}`) // 项目指标删除 | |||
// 应用指标 | |||
export const appIndexList = params => http.get('/api/v1/indicator-config/app/index/list', { params }) // 应用指标库列表 | |||
export const appIndexDel = id => http.post(`/api/v1/indicator-config/app/index/delete/${id}`) // 应用指标删除 | |||
export const appIndexDetail = id => http.post(`/api/v1/indicator-config/app/index/detail/${id}`) // 应用指标详情 | |||
export const appEnable = (appId, state) => http.put(`/api/v1/indicator-config/app/index/${appId}/active/${state}`) // 项目指标配置模板启用、禁用 | |||
export const appIndexSave = data => http.post(`/api/v1/indicator-config/app/index/save`, data) // 应用指标新建 | |||
// 项目标签管理 | |||
export const tagList = params => http.get('/api/v1/project-indicator-tag/list', { params }) // 标签列表 | |||
export const tagSave = data => http.post(`/api/v1/project-indicator-tag/save`, data) // 标签保存 | |||
export const tagDel = id => http.post(`/api/v1/project-indicator-tag/delete/${id}`) // 标签删除 | |||
export const tagFuzzyMatch = params => http.get(`/api/v1/project-indicator-tag/fuzzy-match`, { params }) // 指标模糊匹配 | |||
// 模板类型 | |||
export const templateTypePage = params => http.get('/api/v1/performance-appraisal/template-type/page', { params }) // 列表 | |||
export const templateTypeList = params => http.get('/api/v1/performance-appraisal/template-type/list', { params }) // 不分页列表 | |||
export const templateTypeDetail = id => http.get(`/api/v1/performance-appraisal/template-type/detail/${id}`) // 模板类型详情 | |||
export const templateTypeSave = data => http.post(`/api/v1/performance-appraisal/template-type/save`, data) // 保存 | |||
export const templateTypeDel = id => http.post(`/api/v1/performance-appraisal/template-type/remove/${id}`) // 标签删除 | |||
@@ -0,0 +1,6 @@ | |||
import http from '@/http' | |||
export const list = params => http.get('/api/v1/performance-appraisal/consultation-form/list', { params }) // 咨询单管理列表 | |||
export const recordList = formId => http.get(`/api/v1/performance-appraisal/consultation-form/record-list/${formId}`) // 咨询单管理记录列表(某一个咨询单所有记录) | |||
export const uploadReplay = data => http.post('/api/v1/performance-appraisal/consultation-form/upload-replay', data) // 咨询单管理-(自评人)上传回复单 | |||
export const doAudit = data => http.post('/api/v1/performance-appraisal/consultation-form/do-audit', data) // 咨询单管理-(复评人)审核 |
@@ -0,0 +1,6 @@ | |||
import http from '@/http' | |||
export const list = params => http.get('/api/v1/performance-appraisal/audit/list', { params }) // 绩效审核列表信息 | |||
export const auditDetail = id => http.get(`/api/v1/performance-appraisal/audit/detail/${id}`) // 绩效审核详情 | |||
export const doAudit = data => http.post(`/api/v1/performance-appraisal/audit/do-audit`, data) // 审核操作 | |||
@@ -0,0 +1,11 @@ | |||
import http from '@/http' | |||
export const list = params => http.get('/api/v1/rectify/list', { params }) // 当前用户的绩效评价整改计划列表 | |||
const listUrl = { | |||
1: '/api/v1/rectify/unRectify-list/', | |||
2: '/api/v1/rectify/rectified-list/' | |||
} | |||
export const projectList = (state, planId, params) => http.get(`${listUrl[state]}${planId}`, { params }) // 待整改列表 | |||
export const fillResult = data => http.post('/api/v1/rectify/fill-out-result', data) // 填写整改情况 | |||
export const detail = (planId, projectCode) => http.get(`/api/v1/rectify/get-rectify-detail/${planId}/${projectCode}`) // 整改详情 | |||
@@ -0,0 +1,6 @@ | |||
import http from '@/http' | |||
export const list = params => http.get('/api/v1/re-appraisal/list', { params }) // 复评评价计划列表 | |||
export const groupProjectList = (groupId, params) => http.get(`/api/v1/re-appraisal/group-project-list/${groupId}`, { params }) // 复评用户所在分组复评项目列表 | |||
export const submitReAppraisal = data => http.post(`/api/v1/re-appraisal/submit-reAppraisal`, data) // 人工复评提交 | |||
@@ -0,0 +1,10 @@ | |||
import http from '@/http' | |||
export const list = params => http.get('/api/v1/rectify-audit/list', { params }) // 当前用户的绩效评价整改审核计划列表 | |||
const listUrl = { | |||
1: '/api/v1/rectify-audit/unAudit-list/', | |||
2: '/api/v1/rectify-audit/audited-list/' | |||
} | |||
export const projectList = (state, planId, params) => http.get(`${listUrl[state]}${planId}`, { params }) // 待整改列表 | |||
export const submit = data => http.post('/api/v1/rectify-audit/submit', data) // 提交整改审核结果 | |||
@@ -0,0 +1,10 @@ | |||
import http from '@/http' | |||
// 待我审核、已审核列表 | |||
const listUrl = { | |||
1: '/api/v1/self-appraisal/todo-list', | |||
2: '/api/v1/self-appraisal/done-list' | |||
} | |||
export const list = (state, params) => http.get(`${listUrl[state]}`, { params }) | |||
export const getSealedPdf = (data) => http.post(`/api/v1/self-appraisal/getSealedPdf`, data) // 盖章 | |||
@@ -0,0 +1,9 @@ | |||
// 当前绩效评价待自评列表、已自评待确认列表、已确认列表 | |||
import http from '@/http' | |||
const listUrl = { | |||
1: '/api/v1/self-appraisal/pending-list', | |||
2: '/api/v1/self-appraisal/to-confirm', | |||
3: '/api/v1/self-appraisal/confirmed' | |||
} | |||
export const selfProList = (state, params) => http.get(`${listUrl[state]}`, { params }) |
@@ -0,0 +1,32 @@ | |||
import http from '@/http' | |||
export const list = params => http.get('/api/v1/self-appraisal/list', { params }) // 单位绩效评价计划列表 | |||
// 当前绩效评价待自评列表、已自评列表 | |||
const listUrl = { | |||
1: '/api/v1/self-appraisal/pending-list/', | |||
2: '/api/v1/self-appraisal/appraisaled-list/' | |||
} | |||
export const selfProList = (state, planId, params) => http.get(`${listUrl[state]}${planId}`, { params }) | |||
export const templateDetail = projectCode => http.get(`/api/v1/self-appraisal/get-appraisal-template-detail/${projectCode}`) // 获取自评模版详情 | |||
export const submitSelfAppraisal = data => http.post(`/api/v1/self-appraisal/submit-self-appraisal`, data) // 提交自评 | |||
export const editSelfAppraisal = data => http.post(`/api/v1/self-appraisal/edit-self-appraisal`, data) // 重新修改自评 | |||
const exportUrls = { | |||
1: '/api/v1/self-appraisal/score/export', | |||
2: '/api/v1/re-appraisal/score/export', | |||
3: '/api/v1/verify/score/export' | |||
} | |||
export const exportScore = (state, params) => http.get(exportUrls[state], { params, responseType: 'blob' }) // 导出 | |||
export const selfAppasialGetNotSealedPdf = (data) => http.post(`/api/v1/self-appraisal/getNotSealedPdf`, data) | |||
// 暂存 | |||
const draftUrls = { | |||
1: '/api/v1/self-appraisal/draft-self-appraisal', | |||
2: '/api/v1/re-appraisal/draft-reAppraisal', | |||
3: '/api/v1/verify/draft-verify' | |||
} | |||
export const saveDraft = (state, data) => http.post(draftUrls[state], data) // 评分暂存 | |||
export const draftDetail = params => http.get(`/api/v1/self-appraisal/get-draft`, { params }) // -获取草稿评分详情 | |||
@@ -0,0 +1,3 @@ | |||
import http from '@/http' | |||
export const portrait = projectCode => http.get(`/api/v1/dashboard/project-portrait/${projectCode}`) // 项目画像 |
@@ -0,0 +1,22 @@ | |||
import http from '@/http' | |||
const listUrl = { | |||
1: '/api/v1/gov-project-collection/list', | |||
2: '/api/v1/gov-project-collection/draft-list' | |||
}, | |||
delUrl = { | |||
1: '/api/v1/gov-project-collection/remove/', | |||
2: '/api/v1/gov-project-collection/draft-remove/' | |||
}, | |||
detaillUrl = { | |||
1: '/api/v1/gov-project-collection/detail/', | |||
2: '/api/v1/gov-project-collection/draft-detail/' | |||
} | |||
export const list = (state, params) => http.get(listUrl[state], { params }) // 列表 | |||
export const del = (state, id) => http.post(`${delUrl[state]}${id}`) // 删除 | |||
export const detail = (state, id) => http.get(`${detaillUrl[state]}${id}`) // 详情 | |||
export const save = data => http.post(`/api/v1/gov-project-collection/save`, data) // 保存 | |||
export const dictionary = () => http.get(`/api/v1/gov-project-collection/dictionary`) // 字典集 | |||
export const draftSave = data => http.post(`/api/v1/gov-project-collection/draft`, data) // 项目归集草稿保存 | |||
@@ -0,0 +1,8 @@ | |||
import http from '@/http' | |||
export const tagList = (areaCode, params) => http.get(`/api/v1/portrait/tag/list/${areaCode}`, { params }) // 标签列表 | |||
export const save = data => http.post(`/api/v1/portrait/tag/save`, data) // 保存标签 | |||
export const saveToProject = data => http.post(`/api/v1/portrait/tag/save-to-project`, data) // 设置标签到项目 | |||
export const removeProject = data => http.post(`/api/v1/portrait/tag/remove-tag-to-project`, data) // 删除项目的标签 | |||
export const del = id => http.post(`/api/v1/portrait/tag/delete/${id}`) // 删除标签 | |||
@@ -0,0 +1,7 @@ | |||
import http from '@/http' | |||
export const list = params => http.get('/api/v1/safety-risk/person-monitor/list', { params }) // 安全人员监控列表 | |||
export const personSave = data => http.post('/api/v1/safety-risk/person-monitor/save', data) // 安全人员监控保存 | |||
export const detail = projectCode => http.get(`/api/v1/safety-risk/detail/${projectCode}`) // 安全人员监控列表 | |||
export const supplierSave = data => http.post('/api/v1/safety-risk/supplier-safety-qualification/save', data) // 供应商安全资质保存 | |||
@@ -0,0 +1,20 @@ | |||
import http from '@/http' | |||
export const list = params => | |||
http.get('/api/v1/annualPlan/list', { params }) // 年度计划列表 | |||
export const defer = data => | |||
http.post('/api/v1/annualPlan/suspendAnnualPlan', data) // 年度计划-暂缓 | |||
export const projectApprove = data => | |||
http.post('/api/v1/annualPlan/projectApproved', data) // 立项批复 | |||
export const startDeclare = data => | |||
http.post('/api/v1/annualPlan/startProjectDeclared', data) // 年度计划-开启方案申报 | |||
export const annualPlanImport = data => | |||
http.post('/api/v1/annualPlan/importAnnualPlan', data) // 年度计划-导入 | |||
export const exportEditTable = params => | |||
http.get('/api/v1/annualPlan/exportAnnualPlanEditTable', { params }) // 年度计划-导出编辑表 | |||
export const exportAnnualPlanEditTable = data => | |||
http.post('/api/v1/annualPlan/exportModifyList', data, { responseType: 'blob' }) // 导出年度计划库【编辑表|列表】java | |||
export const annualPlanModify = data => | |||
http.post('/api/v1/annualPlan/modify', data) // 年度计划-编辑 | |||
export const projectExcel = data => | |||
http.post('/api/v1/annualPlan/exportList', data, { responseType: 'blob' }) // 项目库导出 |
@@ -0,0 +1,3 @@ | |||
import http from '@/http' | |||
export const list = params => | |||
http.get('/api/v1/irs/project/list', { params }) // 项目IRS档案列表 |
@@ -0,0 +1,31 @@ | |||
import http from '@/http' | |||
// export const list = params => | |||
// http.get('/api/v1/project/lib/list', { params }) // 项目库列表 | |||
export const list = params => | |||
http.get('/api/v1/project/lib/lib-list', { params }) // 项目库列表 | |||
export const projectExcel = data => | |||
http.post('/api/v1/project/lib/exportList', data, { responseType: 'blob' }) // 项目库导出 | |||
export const projectDetail = id => | |||
http.get(`/api/v1/project/lib/${id}`) // 项目详情 | |||
export const proDetail = projectCode => | |||
http.get(`/api/v1/project/lib/detail/${projectCode}`) // 项目详情(包括历史归集项目) | |||
export const processSchedule = projectId => | |||
http.get(`/api/v1/project/lib/processSchedule/${projectId}`) // 项目流程进度条 | |||
export const expertReviewDetail = projectCode => | |||
http.get(`/api/v1/expertReview/detail/${projectCode}`) // 所以专家评审意见 | |||
export const appList = params => | |||
http.get('/api/v1/project/lib/application/list', { params }) // 应用列表 | |||
export const appReport = appCode => | |||
http.get(`/api/v1/application/get-report/${appCode}`) // 获取应用 试运行报告 | |||
export const historyList = id => | |||
http.get(`/api/v1/project/lib/history-list/${id}`) // 项目历史记录 | |||
export const wantReadDetail = instanceId => http.get(`/api/v1/file-manage/project-file/wantRead-detail/${instanceId}`) // 延期申请详情 | |||
export const constructDetail = id => | |||
http.get(`/api/v1/project/lib/construct/${id}`) // 建设方案申报详情 | |||
export const prePlanDetail = id => | |||
http.get(`/api/v1/project/lib/prePlan/${id}`) // 初步方案详情 | |||
export const delayList = projectId => | |||
http.get(`/api/v1/declared/delayed/delay-list/${projectId}`) // 延期信息列表 |
@@ -0,0 +1,6 @@ | |||
import http from '@/http' | |||
export const renewalProjectList = params => http.get('/api/v1/project/renewal/list', { params }) // 续建项目资金库列表java | |||
export const renewalProjectExport = params => http.get('/api/v1/project/renewal/export', { params, responseType: 'blob' }) // 续建项目资金库列表导出java | |||
export const renewalProjectAsscess = data => http.post('/api/v1/project/renewal/audit', data) // 续建项目审核java | |||
export const renewalProjectDelete = data => http.delete(`/api/v1/project/renewal/delete/${data.projectRenewalId}`) // 续建项目删除java |
@@ -0,0 +1,7 @@ | |||
import http from '@/http' | |||
export const list = params => http.get('/api/v1/review-checklist/list', { params }) // 审查清单列表 | |||
export const approve = data => http.post(`/api/v1/review-checklist/approve`, data) // 审查清单审核 | |||
export const summaryList = projectCode => http.get(`/api/v1/review-checklist/summary-list/${projectCode}`) // 查看某个项目的意见汇总 | |||
export const summary = projectCode => http.post(`/api/v1/review-checklist/summary/${projectCode}`) // 意见汇总提交 | |||
@@ -0,0 +1,16 @@ | |||
import http from '@/http' | |||
export const docGroup = params => | |||
http.get('/api/v1/file-manage/documentation/group/list', { params })// 资料文档分组 | |||
export const docList = params => | |||
http.get('/api/v1/file-manage/documentation/list', { params })// 资料文档列表 | |||
export const delDoc = id => | |||
http.post(`/api/v1/file-manage/documentation/delete/${id}`)// 删除资料文档 | |||
export const addDoc = data => | |||
http.post(`/api/v1/file-manage/documentation/add`, data)// 添加资料文档 | |||
export const addGroup = data => | |||
http.post(`/api/v1/file-manage/documentation/group/add`, data)// 添加分组 | |||
export const delGroup = id => | |||
http.post(`/api/v1/file-manage/documentation/group/delete/${id}`)// 删除分组 |
@@ -0,0 +1,8 @@ | |||
import http from '@/http' | |||
export const list = params => | |||
http.get('/api/v1/file-manage/project-file/list', { params })// 档案列表 | |||
export const wantRead = projectId => | |||
http.post(`/api/v1/file-manage/project-file/want-read/${projectId}`)// 借阅 | |||
export const download = projectId => | |||
http.post(`/api/v1/file-manage/project-file/download/${projectId}`, undefined, { responseType: 'blob' })// 借阅 |
@@ -0,0 +1,4 @@ | |||
import http from '@/http' | |||
export const earlyWarning = params => | |||
http.get(`/api/v1/statistics/early-warning`, { params }) // 预警统计 |
@@ -0,0 +1,4 @@ | |||
import http from '@/http' | |||
export const expert = params => | |||
http.get(`/api/v1/statistics/expert`, { params }) // 专家统计 |
@@ -0,0 +1,4 @@ | |||
import http from '@/http' | |||
export const performance = params => | |||
http.get(`/api/v1/statistics/performance`, { params }) // 绩效统计 |
@@ -0,0 +1,7 @@ | |||
import http from '@/http' | |||
export const detail = params => | |||
http.get(`/api/v1/process/statistics/detail`, { params }) // 流程统计详情 | |||
export const list = params => | |||
http.get(`/api/v1/process/statistics/list`, { params }) // 流程统计详情列表 |
@@ -0,0 +1,4 @@ | |||
import http from '@/http' | |||
export const fund = params => | |||
http.get(`/api/v1/statistics/fund`, { params }) // 项目资金统计 |
@@ -0,0 +1,4 @@ | |||
import http from '@/http' | |||
export const projectCost = params => | |||
http.get(`/api/v1/statistics/project-cost`, { params }) // 项目成本统计 |
@@ -0,0 +1,5 @@ | |||
import http from '@/http' | |||
export const statisticsProject = params => | |||
http.get(`/api/v1/statistics/project`, { params }) // 项目统计 |
@@ -0,0 +1,4 @@ | |||
import http from '@/http' | |||
export const meeting = params => | |||
http.get(`/api/v1/statistics/meeting`, { params }) // 评审会议统计 |
@@ -0,0 +1,6 @@ | |||
import http from '@/http' | |||
export const detail = areaCode => http.get(`/api/v1/sys/early-warning/detail/${areaCode}`) // 预警规则详情 | |||
export const save = data => http.post(`/api/v1/sys/early-warning/save`, data) // 预警规则保存 | |||
export const record = (ruleType, params) => http.get(`/api/v1/sys/early-warning/records/${ruleType}`, { params }) // 预警记录查询 |
@@ -0,0 +1,26 @@ | |||
import http from '@/http' | |||
// export const procdefBizForm = data => | |||
// http.post('/ls_workflow_rebuild/api/v1/procdef/biz_form', data) // 根据业务编号查询流程 | |||
export const processConfigDetail = params => | |||
http.get(`/api/v1/sys/procdef/detail/${params.formId}`)// 系统流程配置详情java | |||
export const procdefUnit = params => | |||
http.get('/api/v1/organization/procdef/list', { params }) // 根据单位编号查询流程java | |||
export const procdefList = data => | |||
http.post('/ls_workflow_rebuild/api/v1/procdef/list', data) // 主流程列表 | |||
export const processConfigList = params => | |||
http.get('/api/v1/sys/procdef/list', { params })// 主流程列表java | |||
export const processStatusSet = data => | |||
http.put(`/api/v1/sys/procdef/${data.formId}/active/${data.state}`, data) // 系统流程配置发启用(禁用)java | |||
export const procdefSave = data => | |||
http.post('/api/v1/organization/procdef/save', data) // 单位流程保存java | |||
export const systemProcessSave = data => | |||
http.post('/api/v1/sys/procdef/save', data) // 系统流程保存java | |||
export const systemProcessRelease = formId => | |||
http.post(`/api/v1/sys/procdef/deploy/${formId}`) // 系统流程发布java | |||
export const procEnable = data => | |||
http.put(`/api/v1/organization/procdef/enable/${data.processDefId}`, data) // 流程启用java | |||
export const procDisable = data => | |||
http.put(`/api/v1/organization/procdef/disable/${data.processDefId}`, data) // 流程禁用java | |||
export const procDefRelease = data => | |||
http.post(`/api/v1/organization/procdef/deploy/${data.processDefId}`, data) // 流程配置发布java |
@@ -0,0 +1,10 @@ | |||
import http from '@/http' | |||
// export const list = params => http.get('/api/company/list', { params }) // 企业列表 | |||
// export const add = data => http.post('/api/company/save', data) // 新增企业 | |||
// export const edit = data => http.post('/api/company/modify', data) // 编辑企业 | |||
// export const detail = params => http.get('/api/company/details', { params }) // 企业详情 | |||
// export const del = data => http.post('/api/company/remove', data) // 删除企业 | |||
export const getFormConfig = params => | |||
http.get(`/api/v1/sys/form/${params.regionCode}`)// 系统表单获取java | |||
export const saveFormConfig = data => http.post('/api/v1/sys/form/modify', data) // 保存系统表单配置java |
@@ -0,0 +1,17 @@ | |||
import http from '@/http' | |||
// export const list = params => http.post('/api/menu/list', { params }) // 菜单列表 | |||
// export const add = data => http.post('/api/menu/save', data) // 新增菜单 | |||
// export const edit = data => http.post('/api/menu/modify', data) // 编辑菜单 | |||
// export const del = data => http.post('/api/menu/remove', data) // 删除菜单 | |||
// export const list = data => http.post('/ls_user_rebuild/api/v1/menu/list', data) // 菜单列表 | |||
export const save = data => http.post('/ls_user_rebuild/api/v1/menu/save', data) // 菜单保存 | |||
export const editMenuDetail = data => http.post('/api/v1/menu/modify', data) // 编辑菜单java | |||
export const saveNewMenu = data => http.post('/api/v1/menu/save', data) // 保存新菜单java | |||
export const getSystemAllMenuList = params => http.get('/api/v1/menu/list', { params }) // 查询系统所有的菜单java | |||
export const getMenuDetail = params => http.get('/api/v1/menu/myMenu', { params }) // 查询菜单详情java | |||
export const menuAll = data => http.post('/ls_user_rebuild/api/v1/menu/all', data) // 所有菜单 | |||
// export const menuDel = data => http.post('/ls_user_rebuild/api/v1/menu/delete', data) // 删除菜单 | |||
export const menuDel = data => http.post('/api/v1/menu/remove', data) // 删除菜单java | |||
@@ -0,0 +1,14 @@ | |||
import http from '@/http' | |||
export const getNoticeList = params => | |||
http.get('/api/v1/notice/manage/list', { params })// 公告管理列表 | |||
export const detail = id => | |||
http.get(`/api/v1/notice/detail/${id}`) // 公告详情 | |||
export const save = data => | |||
http.post('/api/v1/notice/save', data) // 新增公告 | |||
export const del = data => | |||
http.delete('/api/v1/notice/del', { data }) // 删除公告 | |||
export const noticeEnabled = data => | |||
http.post('/api/v1/notice/enabled', data) // 禁用启用 | |||
export const topped = data => | |||
http.post('/api/v1/notice/topped', data) // 置顶 |
@@ -0,0 +1,5 @@ | |||
// import http from '@/http' | |||
// export const list = data => http.post('/api/v1/region/tree', data) // 地域列表 | |||
// export const save = data => http.post('/api/v1/region/save', data) // 保存修改地域信息 | |||
// export const del = data => http.delete('/api/v1/region/delete', { data }) // 删除地域信息 |
@@ -0,0 +1,13 @@ | |||
import http from '@/http' | |||
export const list = data => http.post('/ls_user_rebuild/api/v1/rules/list', data) // 角色列表 | |||
export const getUserRoleList = params => | |||
http.get('/api/v1/role/list', { params })// 角色列表查询java | |||
export const getUserRoleDetail = params => | |||
http.get('/api/v1/role/details', { params })// 查询角色详情java | |||
export const getDataPermissionMenu = params => | |||
http.get('/api/v1/menu/listByDataScope', { params })// 查询系统所有数据权限的菜单java | |||
export const save = data => http.post('/ls_user_rebuild/api/v1/rules/save', data) // 角色保存 | |||
export const editRole = data => http.post('/api/v1/role/modify', data) // 编辑角色java | |||
export const saveNewRole = data => http.post('/api/v1/role/save', data) // 保存新角色java | |||
export const del = data => http.post('/api/v1/role/remove', data) // 删除角色java |
@@ -0,0 +1,3 @@ | |||
import http from '@/http' | |||
export const list = data => http.post('/optLog/page', data) // 日志列表 |
@@ -0,0 +1,21 @@ | |||
import http from '@/http' | |||
export const getUnitList = data => http.post('/api/v1/organization/list', data) // 单位列表java | |||
export const getOrgLevelByLevel = params => http.post(params.parentCode ? `/api/v1/organization/get-child-list?parentCode=${params.parentCode}` : '/api/v1/organization/get-child-list?parentCode') // 获取组织架构的树状结构(单位筛选列表)java | |||
/** | |||
* @param {object} data - 接口参数 | |||
* @param {boolean} data.needMember - 是否需要组织成员列表 | |||
* @param {string} data.parentCode - 父组织code | |||
* */ | |||
export const getOrgOrUser = data => http.post('/api/v1/organization/synthesize-list', data) // 获取组织架构的树状结构(单位筛选列表)java | |||
/** | |||
* @param {object} data - 接口参数 | |||
* @param {boolean} data.needMember - 是否需要组织成员列表 | |||
* @param {string} data.parentCode - 父组织code | |||
* */ | |||
export const getOrgTree = data => http.post('/api/v1/organization/tree-list', data) // 获取组织架构的树状结构(单位筛选列表)java | |||
export const getFinancialCode = data => http.post('/api/v1/fiscal-code/fiscal-and-seal/get-configure', data) // 获取财政编码 | |||
export const fiscalAndSealSet = data => http.post('/api/v1/fiscal-code/fiscal-and-seal/configure', data) // 财政/印章编码配置java |
@@ -0,0 +1,11 @@ | |||
import http from '@/http' | |||
export const userList = data => http.post('/api/v1/user-info/list', data) // 用户列表搜索java | |||
export const userEdit = data => http.post('api/v1/user-info/detail/edit', data) // 用户详情编辑java | |||
export const userStatusSet = data => http.post('/api/v1/user-info/disable-enable', data) // 用户禁用/启用java | |||
export const replaceLogin = data => http.post('/api/v1/user/auth/agent-login', data, { 'Content-Type': 'application/x-www-form-urlencoded' }) // 代登录 | |||
export const userDetail = data => http.post('/api/v1/user-info/detail', data) // 用户详情java | |||
// export const del = data => http.post('/api/user/remove', data) // 删除用户 | |||
export const currentUserInfo = data => http.post('/api/v1/user-info/current-user-info', data) // 获取当前登录的用户信息 | |||
export const controlledRoles = data => http.post('/api/v1/user-info/controlled/role-list', data) // 获取用户可控角色列表 | |||
@@ -0,0 +1,21 @@ | |||
import http from '@/http' | |||
// 待办中心列表 | |||
const centerList = { | |||
1: '/api/v1/todo-center/todo-list', | |||
2: '/api/v1/todo-center/ido-list', | |||
3: '/api/v1/todo-center/my-submitted-list', | |||
4: '/api/v1/todo-center/ccme-list' | |||
} | |||
export const toDoCenterList = (state, params) => http.get(centerList[state], { params }) | |||
export const exportExc = (state, data) => http.post(centerList[state] + '/export', data, { responseType: 'blob' }) | |||
export const progressDetail = params => http.get(`/api/v1/todo-center/progress/detail`, { params }) // 流程审核详情 | |||
export const projectDetail = id => http.get(`/api/v1/project/lib/${id}`) // 项目详情 | |||
export const handler = data => http.post('/api/v1/todo-center/handler', data) // 处理 | |||
export const adjustAndHandle = data => http.post('/api/v1/todo-center/adjustAndHandle', data) // 被退回项目内容调整并通过 | |||
export const notSealedPdf = data => http.post(`/api/v1/todo-center/getNotSealedPdf`, data) // 获取未盖章pdf | |||
export const signSeal = data => http.post('/api/v1/todo-center/getSealedPdf', data) // 盖章 | |||
export const getTodoNums = params => http.get(`/api/v1/todo-center/getTodoNums`, { params }) // 待办数量统计 | |||
export const saveAuditOpinoin = data => http.post('/api/v1/todo-center/saveAuditOpinion', data) // 保存处理意见 | |||
export const changeRecordDetail = id => http.get(`/api/v1/project/lib/change-record/${id}`) // 项目历史版本变更字段详情 | |||
export const getConstructionSuggestions = data => http.post('/api/v1/construction/construction-suggestions', data) // 审批建设方案专家建议提交 | |||
@@ -0,0 +1,9 @@ | |||
import http from '@/http' | |||
export const procdefDetail = params => | |||
http.get(`/api/v1/organization/procdef/detail/${params.processDefId}`) // 流程详情java | |||
// export const procdefDetail = data => | |||
// http.post('/ls_workflow_rebuild/api/v1/procdef/detail', data) // 流程详情 | |||
export const delById = data => | |||
http.post(`/api/v1/organization/procdef/delete/${data.processDefId}`, data) // 删除流程java | |||
@@ -0,0 +1,9 @@ | |||
import http from '@/http' | |||
export const sealList = data => http.post('/ls_project_rebuild/api/v1/seal/getSealList', data) // 印章列表 | |||
export const sealManagerList = data => http.post('/ls_project_rebuild/api/v1/sealManager/getSealList', data) // 从系统管理进入印章列表 | |||
export const sealSave = data => http.post('/ls_project_rebuild/api/v1/seal/sealSave', data) // 印章保存 | |||
export const sealManagerSave = data => http.post('/ls_project_rebuild/api/v1/sealManager/sealSave', data) // 从系统管理进入印章保存 | |||
export const sealDel = data => http.post('/ls_project_rebuild/api/v1/seal/del', data) // 印章删除、禁用 | |||
export const sealManagerDel = data => http.post('/ls_project_rebuild/api/v1/sealManager/del', data) // 从系统管理进入印章删除、禁用 | |||
@@ -0,0 +1,125 @@ | |||
import axios from 'axios' | |||
import { ElMessage } from 'element-plus' | |||
// 让请求在浏览器中允许跨域携带cookie | |||
import Cookie from 'js-cookie' | |||
axios.defaults.withCredentials = true | |||
// axios.defaults.baseURL = import.meta.env.MODE === 'development' ? '/pm' : '' | |||
axios.defaults.baseURL = '/pm' | |||
// 使用自定义配置新建一个 axios 实例 | |||
const http = axios.create() | |||
// 正在进行中的请求列表 | |||
const reqList = [] | |||
/** | |||
* 阻止重复请求 | |||
* @param {array} reqList - 请求缓存列表 | |||
* @param {string} url - 当前请求地址 | |||
* @param {function} cancel - 请求中断函数 | |||
* @param {string} errorMessage - 请求中断时需要显示的错误信息 | |||
*/ | |||
const stopRepeatRequest = function (reqList, url, cancel, errorMessage) { | |||
const errorMsg = errorMessage || '' | |||
for (let i = 0; i < reqList.length; i++) { | |||
if (reqList[i] === url) { | |||
cancel(errorMsg) | |||
return | |||
} | |||
} | |||
reqList.push(url) | |||
} | |||
/** | |||
* 允许某个请求可以继续进行 | |||
* @param {array} reqList 全部请求列表 | |||
* @param {string} url 请求地址 | |||
*/ | |||
const allowRequest = function (reqList, url) { | |||
for (let i = 0; i < reqList.length; i++) { | |||
if (reqList[i] === url) { | |||
reqList.splice(i, 1) | |||
break | |||
} | |||
} | |||
} | |||
// 请求拦截器,例如请求的时候在头部加上请求的token | |||
http.interceptors.request.use( | |||
config => { | |||
let cancel | |||
// 设置cancelToken对象 | |||
config.cancelToken = new axios.CancelToken(function (c) { | |||
cancel = c | |||
}) | |||
// 阻止重复请求。当上个请求未完成时,相同的请求不会进行 | |||
if (config.url === '/auth/info' || config.url === '/api/dict/all') { | |||
stopRepeatRequest(reqList, config.url, cancel, '请求中断!') | |||
} | |||
return config | |||
}, | |||
error => { | |||
return Promise.reject(error) | |||
} | |||
) | |||
// 响应拦截器 | |||
http.interceptors.response.use( | |||
response => { | |||
// 增加延迟,相同请求不得在短时间内重复发送 | |||
setTimeout(() => { | |||
allowRequest(reqList, response.config.url) | |||
}, 1000) | |||
if (response.status === 200) { | |||
return Promise.resolve(response.data) | |||
} | |||
}, | |||
error => { | |||
if (!axios.isCancel(error)) { | |||
setTimeout(() => { | |||
allowRequest(reqList, error.config.url) | |||
}, 1000) | |||
} | |||
if (error.response) { | |||
ElMessage.closeAll() | |||
// 网络超时异常处理 | |||
if ( | |||
error.code === 'ECONNABORTED' || | |||
error.message === 'Network Error' || | |||
error.message.includes('timeout') | |||
) { | |||
ElMessage({ | |||
type: 'error', | |||
message: '请求超时,请稍后重试' | |||
}) | |||
// 服务器状态码不是200的情况,这些自定义(需要与后台商量返回) | |||
} else if (error.response.status === 401) { | |||
ElMessage({ | |||
type: 'error', | |||
message: error.response.data.message || '用户信息过期,请重新登陆' | |||
}) | |||
// 清除token | |||
Cookie.remove('token') | |||
localStorage.clear() | |||
// 跳转登录 | |||
setTimeout(() => { | |||
window.location.href = '/login' | |||
}, 500) | |||
} else if (error.response.status <= 400 <= 500) { | |||
ElMessage({ | |||
type: 'error', | |||
message: | |||
error.response.data.message || | |||
`服务器无法处理请求!(${error.response.status})!` | |||
}) | |||
} else { | |||
ElMessage({ | |||
type: 'error', | |||
message: | |||
error.response.data.message || | |||
`服务器出错(${error.response.status})!` | |||
}) | |||
} | |||
} | |||
return Promise.reject(error) | |||
} | |||
) | |||
export default http |
@@ -0,0 +1,123 @@ | |||
import { createRouter, createWebHistory } from 'vue-router' | |||
// import Cookie from 'js-cookie' | |||
import routes from './routes' | |||
import store from '@/store' | |||
import NProgress from 'nprogress' | |||
import 'nprogress/nprogress.css' | |||
import { storeToRefs } from 'pinia' | |||
NProgress.configure({ showSpinner: false }) // 进度环显示/隐藏 | |||
const router = createRouter({ | |||
history: createWebHistory(), // hash 模式,想要改为history 模式可以使用createWebHistory | |||
routes | |||
}) | |||
// 路由守卫 | |||
const filterNoName = (item) => { | |||
item.forEach(i => { | |||
if (i.children?.length) { | |||
i.children = filterNoName(i.children) | |||
} | |||
}) | |||
return item.filter(i => i.name && i.path) | |||
} | |||
let registerRouteFresh = true | |||
router.beforeEach(async (to, from, next) => { | |||
NProgress.start() | |||
if (to.name === 'expertEnroll') { | |||
store.dictStore.setDictStore()// 获取字典 | |||
store.dictStore.setTagStore()// 获取标签字典 | |||
} | |||
if (to.name !== 'login' && to.name !== 'commonLogin' && to.name !== 'expertEnroll') { | |||
const menus = await store.menuStore.setMenuStore() | |||
!registerRouteFresh && await store.userStore.setUserStore() // 获取用户信息 | |||
store.dictStore.setDictStore()// 获取字典 | |||
store.dictStore.setTagStore()// 获取标签字典 | |||
/* | |||
如果首次或者刷新界面,next(...to, replace: true)会循环遍历路由, | |||
如果to找不到对应的路由那么他会再执行一次beforeEach((to, from, next))直到找到对应的路由, | |||
我们的问题在于页面刷新以后异步获取数据,直接执行next()感觉路由添加了但是在next()之后执行的, | |||
所以我们没法导航到相应的界面。这里使用变量registerRouteFresh变量做记录,直到找到相应的路由以后, | |||
把值设置为false然后走else执行next(),整个流程就走完了,路由也就添加完了。 | |||
*/ | |||
if (registerRouteFresh) { | |||
menus.forEach(item => { | |||
item = { | |||
...item, | |||
children: item.children ? filterNoName(item.children) : [] | |||
} | |||
router.addRoute('index', item) | |||
}) | |||
router.addRoute({ path: '/', name: '/', redirect: menus[0].path }) | |||
if (!router.getRoutes().find(i => i.component === '/:pathMatch(.*)*')) { | |||
router.addRoute({ | |||
path: '/:pathMatch(.*)*', | |||
redirect: menus[0].path | |||
}) | |||
} | |||
next({ ...to, replace: true }) | |||
registerRouteFresh = false | |||
} else { | |||
if (!to.meta.isShowTag) { | |||
if (from.path !== '/' && to.meta.topMenu !== from.meta.topMenu) { | |||
store.appStore.clearTag() | |||
} | |||
store.appStore.addTag({ | |||
name: to.meta.title, | |||
path: to.path.split('/')[to.path.split('/').length - 1], | |||
query: to.query, | |||
params: to.params | |||
}) | |||
} | |||
next() | |||
} | |||
} else { | |||
console.log(333) | |||
next() | |||
} | |||
// } | |||
}) | |||
// 动态修改路由过度动画 | |||
router.afterEach((to) => { | |||
const userInfo = storeToRefs(store.userStore).userInfo || {} | |||
if (userInfo.value && userInfo.value.accountId) { | |||
console.log(to) | |||
window.aplus_queue.push({ | |||
action: 'aplus.setMetaInfo', | |||
arguments: ['_hold', 'BLOCK'] | |||
}) | |||
window.aplus_queue.push({ | |||
action: 'aplus.sendPV', | |||
arguments: [ | |||
{ | |||
is_auto: false | |||
}, | |||
{ | |||
sapp_id: '43032', | |||
sapp_name: 'lsxmglxt', | |||
_user_id: userInfo.value.accountId, | |||
_user_nick: userInfo.value.realName, | |||
page_id: to.fullPath, | |||
page_name: to.meta.title || '丽水信息化项目管理系统', | |||
page_url: location.host + to.fullPath | |||
} | |||
] | |||
}) | |||
window.aplus_queue.push({ | |||
action: 'aplus.setMetaInfo', | |||
arguments: ['_user_nick', userInfo.value.realName] | |||
}) | |||
window.aplus_queue.push({ | |||
action: 'aplus.setMetaInfo', | |||
arguments: ['_user_id', userInfo.value.accountId.toString()] | |||
}) | |||
window.aplus_queue.push({ | |||
action: 'aplus.setMetaInfo', | |||
arguments: ['_hold', 'START'] | |||
}) | |||
} | |||
NProgress.done() | |||
}) | |||
export default router |
@@ -0,0 +1,56 @@ | |||
const routes = [ | |||
{ | |||
path: '/', | |||
name: '/', | |||
redirect: '/home' | |||
}, | |||
{ | |||
path: '/login', | |||
name: 'login', | |||
component: () => import('@/pages/login/index.vue') | |||
}, | |||
{ | |||
path: '/commonLogin', | |||
name: 'commonLogin', | |||
component: () => import('@/pages/commonLogin/index.vue') | |||
}, | |||
{ | |||
path: '/fileView', | |||
name: 'fileView', | |||
component: () => import('@/components/fileView/index.vue') | |||
}, | |||
{ | |||
path: '/expertEnroll', | |||
name: 'expertEnroll', | |||
component: () => import('@/pages/expertEnroll/index.vue') | |||
}, | |||
{ | |||
path: '/cockpit', | |||
name: 'cockpit', | |||
component: () => import('@/pages/cockpit/index.vue') | |||
}, | |||
{ | |||
path: '/portraitScreen', | |||
name: 'portraitScreen', | |||
component: () => import('@/pages/portraitScreen/index.vue') | |||
}, | |||
// { | |||
// path: '/403', | |||
// name: '403', | |||
// component: () => import('@/pages/403/index.vue') | |||
// }, | |||
// { | |||
// path: '/404', | |||
// name: '404', | |||
// component: () => import('@/pages/404/index.vue') | |||
// }, | |||
{ | |||
path: '/index', | |||
name: 'index', | |||
redirect: '/404', | |||
component: () => import('@/components/layout/index.vue'), | |||
children: [] | |||
} | |||
] | |||
export default routes |
@@ -0,0 +1,19 @@ | |||
import { useMenuStore } from '@/store/modules/menu' | |||
import { useUserStore } from '@/store/modules/user' | |||
import { useDictStore } from '@/store/modules/dictionaries' | |||
import { useAppStore } from '@/store/modules/app' | |||
import { useCountStore } from '@/store/modules/counts' | |||
const store = {} | |||
/** | |||
* 注册全局状态库 | |||
*/ | |||
export const registerStore = () => { | |||
store.menuStore = useMenuStore() | |||
store.userStore = useUserStore() | |||
store.dictStore = useDictStore() | |||
store.appStore = useAppStore() | |||
store.countStore = useCountStore() | |||
} | |||
export default store |
@@ -0,0 +1,46 @@ | |||
import { defineStore } from 'pinia' | |||
import router from '@/router' | |||
export const useAppStore = defineStore('app', { | |||
state: () => { | |||
return { | |||
tagNavList: [], | |||
fromWhere: '' | |||
} | |||
}, | |||
getters: { | |||
}, | |||
actions: { | |||
addTag (page) { | |||
if (!this.tagNavList.some(i => i.path === page.path)) { this.tagNavList.push(page) } | |||
}, | |||
removeTag (path) { | |||
const idx = this.tagNavList.findIndex(r => r.path === path) | |||
const currPath = router.currentRoute.value.path.split('/')[router.currentRoute.value.path.split('/').length - 1] | |||
if (this.tagNavList.length > 1 && this.tagNavList[idx].path === currPath) { | |||
router.push({ | |||
name: this.tagNavList[idx + (!idx ? 1 : -1)].path, | |||
query: this.tagNavList[idx + (!idx ? 1 : -1)].query || {}, | |||
params: this.tagNavList[idx + (!idx ? 1 : -1)].params || {} | |||
}) | |||
} | |||
this.tagNavList.splice(idx, 1) | |||
}, | |||
clearTag () { | |||
this.tagNavList = [] | |||
}, | |||
writeDownLocation (location) { | |||
this.fromWhere = location | |||
} | |||
}, | |||
persist: { | |||
enabled: true, | |||
strategies: [ | |||
{ | |||
key: 'app', | |||
storage: localStorage, | |||
paths: ['tagNavList'] | |||
} | |||
] | |||
} | |||
}) |
@@ -0,0 +1,49 @@ | |||
import { defineStore } from 'pinia' | |||
import { getInfoList } from '@/http/apis/home' | |||
import { getTodoNums } from '@/http/apis/toDoCenter/todoList' | |||
export const useCountStore = defineStore('countConfig', { | |||
state: () => { | |||
return { | |||
projectCount: 0, | |||
notAppendNum: 0, | |||
appendNum: 0, | |||
totalNum: 0, | |||
infoList: [] | |||
} | |||
}, | |||
getters: {}, | |||
actions: { | |||
setCountStore (data) { | |||
return new Promise((resolve, reject) => { | |||
getInfoList({ readed: false }) | |||
.then(res => { | |||
this.infoList = res.data.records | |||
// console.log('this.infoList', this.infoList) | |||
this.projectCount = res.data.total | |||
resolve(res.data) | |||
}) | |||
.catch(err => { | |||
reject(err) | |||
}) | |||
}) | |||
}, | |||
setTodoNumsStore () { | |||
return new Promise((resolve, reject) => { | |||
getTodoNums() | |||
.then(res => { | |||
this.notAppendNum = res.data?.notAppendNum || 0 | |||
this.appendNum = res.data?.appendNum || 0 | |||
this.totalNum = res.data?.totalNum || 0 | |||
resolve(res.data) | |||
}) | |||
.catch(err => { | |||
reject(err) | |||
}) | |||
}) | |||
} | |||
}, | |||
persist: { | |||
storage: localStorage, | |||
paths: ['projectCount', 'infoList'] | |||
} | |||
}) |
@@ -0,0 +1,597 @@ | |||
import { defineStore } from 'pinia' | |||
import { generateRoute, treeMap } from '@/utils/generateRoute' | |||
import { userMenu } from '@/http/apis/commonApi' | |||
// const menuArr = [ | |||
// { | |||
// path: '/home', | |||
// name: 'home', | |||
// component: '/home', | |||
// meta: { | |||
// topMenu: 'home', | |||
// title: '工作台', | |||
// isShowTag: false | |||
// } | |||
// }, | |||
// { | |||
// path: '/toDoCenter', | |||
// name: 'toDoCenter', | |||
// component: '/secondView', | |||
// redirect: '/toDoCenter/waitMeToHandle', | |||
// meta: { | |||
// topMenu: 'toDoCenter', | |||
// title: '待办中心', | |||
// isShowTag: false | |||
// }, | |||
// children: [ | |||
// { | |||
// path: 'waitMeToHandle', | |||
// name: 'waitMeToHandle', | |||
// component: '/toDoCenter/waitMeToHandle', | |||
// meta: { | |||
// topMenu: 'toDoCenter', | |||
// title: '待我处理', | |||
// uIcon: 'unselected-sec-menu', | |||
// activeIcon: 'selected-sec-menu', | |||
// isShowTag: true | |||
// } | |||
// }, | |||
// { | |||
// path: 'handleDuringExamine', | |||
// name: 'handleDuringExamine', | |||
// component: '/toDoCenter/handleDuringExamine', | |||
// meta: { | |||
// topMenu: 'toDoCenter', | |||
// activeMenu: 'waitMeToHandle', | |||
// title: '处理页(审核中)', | |||
// isShowTag: true, | |||
// hidden: true | |||
// } | |||
// }, | |||
// { | |||
// path: 'handleAfterGiveBack', | |||
// name: 'handleAfterGiveBack', | |||
// component: '/toDoCenter/handleAfterGiveBack', | |||
// meta: { | |||
// topMenu: 'toDoCenter', | |||
// title: '处理页(被退回)', | |||
// activeMenu: 'waitMeToHandle', | |||
// isShowTag: true, | |||
// hidden: true | |||
// } | |||
// }, | |||
// { | |||
// path: 'haveHandled', | |||
// name: 'haveHandled', | |||
// component: '/toDoCenter/haveHandled', | |||
// meta: { | |||
// topMenu: 'toDoCenter', | |||
// title: '我已处理', | |||
// uIcon: 'unselected-sec-menu', | |||
// activeIcon: 'selected-sec-menu', | |||
// isShowTag: true | |||
// } | |||
// }, | |||
// { | |||
// path: 'haveHandledDetail', | |||
// name: 'haveHandledDetail', | |||
// component: '/toDoCenter/handleDuringExamine', | |||
// meta: { | |||
// topMenu: 'toDoCenter', | |||
// title: '详情', | |||
// activeMenu: 'haveHandled', | |||
// isShowTag: true, | |||
// hidden: true | |||
// } | |||
// }, | |||
// { | |||
// path: 'initiatedByMe', | |||
// name: 'initiatedByMe', | |||
// component: '/toDoCenter/initiatedByMe', | |||
// meta: { | |||
// topMenu: 'toDoCenter', | |||
// title: '我发起的', | |||
// uIcon: 'unselected-sec-menu', | |||
// activeIcon: 'selected-sec-menu', | |||
// isShowTag: true | |||
// } | |||
// }, | |||
// { | |||
// path: 'initiatedByMeDetail', | |||
// name: 'initiatedByMeDetail', | |||
// component: '/toDoCenter/handleDuringExamine', | |||
// meta: { | |||
// topMenu: 'toDoCenter', | |||
// title: '详情', | |||
// activeMenu: 'initiatedByMeDetail', | |||
// isShowTag: true, | |||
// hidden: true | |||
// } | |||
// }, | |||
// { | |||
// path: 'copyMine', | |||
// name: 'copyMine', | |||
// component: '/toDoCenter/copyMine', | |||
// meta: { | |||
// topMenu: 'toDoCenter', | |||
// title: '抄送我的', | |||
// uIcon: 'unselected-sec-menu', | |||
// activeIcon: 'selected-sec-menu', | |||
// isShowTag: true | |||
// } | |||
// }, | |||
// { | |||
// path: 'copyMineDetail', | |||
// name: 'copyMineDetail', | |||
// component: '/toDoCenter/handleDuringExamine', | |||
// meta: { | |||
// topMenu: 'toDoCenter', | |||
// title: '详情', | |||
// activeMenu: 'copyMine', | |||
// isShowTag: true, | |||
// hidden: true | |||
// } | |||
// }, | |||
// { | |||
// path: 'stamp', | |||
// name: 'stamp', | |||
// component: '/toDoCenter/stamp', | |||
// meta: { | |||
// topMenu: 'toDoCenter', | |||
// title: '盖章', | |||
// activeMenu: 'waitMeToHandle', | |||
// hidden: true, | |||
// isShowTag: true | |||
// } | |||
// } | |||
// ] | |||
// }, | |||
// { | |||
// path: '/declareManage', | |||
// name: 'declareManage', | |||
// component: '/secondView', | |||
// redirect: '/declareManage/projectDeclare', | |||
// meta: { | |||
// topMenu: 'declareManage', | |||
// title: '申报管理', | |||
// isShowTag: false | |||
// }, | |||
// children: [ | |||
// { | |||
// path: 'projectDeclare', | |||
// name: 'projectDeclare', | |||
// component: '/declareManage/projectDeclare', | |||
// meta: { | |||
// topMenu: 'declareManage', | |||
// title: '项目申报', | |||
// uIcon: 'unselected-sec-menu', | |||
// activeIcon: 'selected-sec-menu', | |||
// isShowTag: true | |||
// } | |||
// }, | |||
// { | |||
// path: 'declarePage', | |||
// name: 'declarePage', | |||
// component: '/declareManage/projectDeclare/declarePage', | |||
// meta: { | |||
// topMenu: 'declareManage', | |||
// title: '申报页面', | |||
// isShowTag: true, | |||
// hidden: true | |||
// } | |||
// }, | |||
// { | |||
// path: 'draftDetails', | |||
// name: 'draftDetails', | |||
// component: '/declareManage/projectDeclare/draftDetails', | |||
// meta: { | |||
// topMenu: 'declareManage', | |||
// title: '草稿详情', | |||
// isShowTag: true, | |||
// hidden: true | |||
// } | |||
// }, | |||
// { | |||
// path: 'preexaminationdeclare', | |||
// name: 'preexaminationdeclare', | |||
// component: '/declareManage/preExaminationDeclare', | |||
// meta: { | |||
// topMenu: 'declareManage', | |||
// title: '预审申报', | |||
// uIcon: 'unselected-sec-menu', | |||
// activeIcon: 'selected-sec-menu', | |||
// isShowTag: true | |||
// } | |||
// }, | |||
// { | |||
// path: 'constructionPlanDeclare', | |||
// name: 'constructionPlanDeclare', | |||
// component: '/declareManage/constructionPlanDeclare', | |||
// meta: { | |||
// topMenu: 'declareManage', | |||
// title: '建设方案申报', | |||
// uIcon: 'unselected-sec-menu', | |||
// activeIcon: 'selected-sec-menu', | |||
// isShowTag: true, | |||
// isChildren: true | |||
// } | |||
// }, | |||
// { | |||
// path: 'projectAdjustment', | |||
// name: 'projectAdjustment', | |||
// component: '/declareManage/projectAdjustment', | |||
// meta: { | |||
// topMenu: 'declareManage', | |||
// title: '项目内容调整', | |||
// uIcon: 'unselected-sec-menu', | |||
// activeIcon: 'selected-sec-menu', | |||
// isShowTag: true, | |||
// isChildren: true | |||
// } | |||
// } | |||
// ] | |||
// }, | |||
// { | |||
// path: '/projectStoreManage', | |||
// name: 'projectStoreManage', | |||
// component: '/secondView', | |||
// redirect: '/projectStoreManage/projectStore', | |||
// meta: { | |||
// topMenu: 'projectstoremanage', | |||
// title: '项目库管理', | |||
// isShowTag: false | |||
// }, | |||
// children: [ | |||
// { | |||
// path: 'projectStore', | |||
// name: 'projectStore', | |||
// component: '/projectStoreManage/projectStore', | |||
// meta: { | |||
// topMenu: 'projectStoreManage', | |||
// title: '项目库', | |||
// uIcon: 'unselected-sec-menu', | |||
// activeIcon: 'selected-sec-menu', | |||
// isShowTag: true | |||
// } | |||
// }, | |||
// { | |||
// path: 'projectDetail', | |||
// name: 'projectDetail', | |||
// component: '/projectStoreManage/projectStore/projectDetail', | |||
// meta: { | |||
// topMenu: 'projectStoreManage', | |||
// title: '项目详情', | |||
// uIcon: 'unselected-sec-menu', | |||
// activeIcon: 'selected-sec-menu', | |||
// isShowTag: true, | |||
// hidden: true | |||
// } | |||
// }, | |||
// { | |||
// path: 'annualPlanStore', | |||
// name: 'annualPlanStore', | |||
// component: '/projectStoreManage/annualPlanStore', | |||
// meta: { | |||
// topMenu: 'projectStoreManage', | |||
// title: '年度计划库', | |||
// uIcon: 'unselected-sec-menu', | |||
// activeIcon: 'selected-sec-menu', | |||
// isShowTag: true | |||
// } | |||
// }, | |||
// { | |||
// path: 'edit', | |||
// name: 'edit', | |||
// component: '/projectStoreManage/annualPlanStore/edit', | |||
// meta: { | |||
// topMenu: 'projectStoreManage', | |||
// title: '编辑', | |||
// uIcon: 'unselected-sec-menu', | |||
// activeIcon: 'selected-sec-menu', | |||
// isShowTag: true, | |||
// hidden: true | |||
// } | |||
// }, | |||
// { | |||
// path: 'annualPlanSupplementStore', | |||
// name: 'annualPlanSupplementStore', | |||
// component: '/projectStoreManage/annualPlanSupplementStore', | |||
// meta: { | |||
// topMenu: 'projectStoreManage', | |||
// title: '年度计划增补库', | |||
// uIcon: 'unselected-sec-menu', | |||
// activeIcon: 'selected-sec-menu', | |||
// isShowTag: true | |||
// } | |||
// } | |||
// ] | |||
// }, | |||
// { | |||
// path: '/annualPlan', | |||
// name: 'annualPlan', | |||
// component: '/annualPlan', | |||
// meta: { | |||
// topMenu: 'annualPlan', | |||
// title: '年度计划', | |||
// isShowTag: false | |||
// } | |||
// }, | |||
// { | |||
// path: '/recordManage', | |||
// name: 'recordManage', | |||
// component: '/recordManage', | |||
// meta: { | |||
// topMenu: 'recordManage', | |||
// title: '档案管理', | |||
// isShowTag: false | |||
// } | |||
// }, | |||
// { | |||
// path: '/expertManage', | |||
// name: 'expertManage', | |||
// component: '/expertManage', | |||
// meta: { | |||
// topMenu: 'expertManage', | |||
// title: '专家管理', | |||
// isShowTag: false | |||
// } | |||
// }, | |||
// { | |||
// path: '/projectCollection', | |||
// name: 'projectCollection', | |||
// component: '/projectCollection', | |||
// meta: { | |||
// topMenu: 'projectCollection', | |||
// title: '项目归集', | |||
// isShowTag: false | |||
// } | |||
// }, | |||
// { | |||
// path: '/performanceEvaluation', | |||
// name: 'performanceEvaluation', | |||
// component: '/performanceEvaluation', | |||
// meta: { | |||
// topMenu: 'performanceEvaluation', | |||
// title: '绩效评价', | |||
// isShowTag: false | |||
// } | |||
// }, | |||
// { | |||
// path: '/statisticAnalysis', | |||
// name: 'statisticAnalysis', | |||
// component: '/statisticAnalysis', | |||
// meta: { | |||
// topMenu: 'statisticAnalysis', | |||
// title: '统计分析', | |||
// isShowTag: false | |||
// } | |||
// }, | |||
// { | |||
// path: '/unitSet', | |||
// name: 'unitSet', | |||
// component: '/secondView', | |||
// redirect: '/unitSet/flowPathConfiguration', | |||
// meta: { | |||
// topMenu: 'unitSet', | |||
// title: '单位设置', | |||
// isShowTag: false | |||
// }, | |||
// children: [ | |||
// { | |||
// path: 'flowPathConfiguration', | |||
// name: 'flowPathConfiguration', | |||
// component: '/unitSet/flowPathConfiguration', | |||
// meta: { | |||
// topMenu: 'unitSet', | |||
// title: '流程配置', | |||
// // uIcon: 'unselected-sec-menu', | |||
// // activeIcon: 'selected-sec-menu', | |||
// isShowTag: true | |||
// } | |||
// }, | |||
// { | |||
// path: 'unitConfigEdit', | |||
// name: 'unitConfigEdit', | |||
// component: '/unitSet/flowPathConfiguration/configEdit', | |||
// meta: { | |||
// topMenu: 'unitSet', | |||
// activeMenu: 'flowPathConfiguration', | |||
// title: '编辑配置', | |||
// hidden: true | |||
// } | |||
// }, | |||
// { | |||
// path: 'memberManage', | |||
// name: 'memberManage', | |||
// component: '/unitSet/memberManage', | |||
// meta: { | |||
// topMenu: 'unitSet', | |||
// title: '成员管理', | |||
// isShowTag: true | |||
// } | |||
// }, | |||
// { | |||
// path: 'sealConfiguration', | |||
// name: 'sealConfiguration', | |||
// component: '/unitSet/sealConfiguration', | |||
// meta: { | |||
// topMenu: 'unitSet', | |||
// title: '印章配置', | |||
// // uIcon: 'unselected-sec-menu', | |||
// // activeIcon: 'selected-sec-menu', | |||
// isShowTag: true | |||
// } | |||
// }, | |||
// { | |||
// path: 'fiscalCodeSet', | |||
// name: 'fiscalCodeSet', | |||
// component: '/unitSet/fiscalCodeSet', | |||
// meta: { | |||
// topMenu: 'unitSet', | |||
// title: '财政编码设置', | |||
// // uIcon: 'unselected-sec-menu', | |||
// // activeIcon: 'selected-sec-menu', | |||
// isShowTag: true | |||
// } | |||
// } | |||
// // { | |||
// // path: 'unitConfiguration', | |||
// // name: 'unitConfiguration', | |||
// // component: | |||
// // '/systemManage/unitManage/unitConfiguration', | |||
// // meta: { | |||
// // topMenu: 'systemManage', | |||
// // activeMenu: 'unitManage', | |||
// // title: '单位配置', | |||
// // isShowTag: false, | |||
// // hidden: true | |||
// // } | |||
// // } | |||
// ] | |||
// }, | |||
// { | |||
// path: '/systemManage', | |||
// name: 'systemManage', | |||
// component: '/secondView', | |||
// redirect: '/systemManage/userManage', | |||
// meta: { | |||
// topMenu: 'systemManage', | |||
// title: '系统管理', | |||
// isShowTag: false | |||
// }, | |||
// children: [ | |||
// { | |||
// path: 'userManage', | |||
// name: 'userManage', | |||
// component: '/systemManage/userManage', | |||
// meta: { | |||
// topMenu: 'systemManage', | |||
// title: '用户管理', | |||
// uIcon: 'unselected-sec-menu', | |||
// activeIcon: 'selected-sec-menu', | |||
// isShowTag: true | |||
// } | |||
// }, | |||
// { | |||
// path: 'flowConfiguration', | |||
// name: 'flowConfiguration', | |||
// component: '/systemManage/flowConfiguration', | |||
// meta: { | |||
// topMenu: 'systemManage', | |||
// title: '流程配置', | |||
// uIcon: 'unselected-sec-menu', | |||
// activeIcon: 'selected-sec-menu', | |||
// isShowTag: true | |||
// } | |||
// }, | |||
// { | |||
// path: 'configEdit', | |||
// name: 'configEdit', | |||
// component: '/systemManage/flowConfiguration/configEdit', | |||
// meta: { | |||
// topMenu: 'systemManage', | |||
// activeMenu: 'flowConfiguration', | |||
// title: '编辑配置', | |||
// hidden: true | |||
// } | |||
// }, | |||
// { | |||
// path: 'formConfiguration', | |||
// name: 'formConfiguration', | |||
// component: '/systemManage/formConfiguration', | |||
// meta: { | |||
// topMenu: 'systemManage', | |||
// title: '表单配置', | |||
// uIcon: 'unselected-sec-menu', | |||
// activeIcon: 'selected-sec-menu', | |||
// isShowTag: true | |||
// } | |||
// }, | |||
// { | |||
// path: 'unitManage', | |||
// name: 'unitManage', | |||
// component: '/systemManage/unitManage', | |||
// meta: { | |||
// topMenu: 'systemManage', | |||
// title: '单位管理', | |||
// uIcon: 'unselected-sec-menu', | |||
// activeIcon: 'selected-sec-menu', | |||
// isShowTag: true | |||
// } | |||
// }, | |||
// { | |||
// path: 'unitConfiguration', | |||
// name: 'unitConfiguration', | |||
// component: | |||
// '/systemManage/unitManage/unitConfiguration', | |||
// meta: { | |||
// topMenu: 'systemManage', | |||
// activeMenu: 'unitManage', | |||
// title: '单位配置', | |||
// isShowTag: false, | |||
// hidden: true | |||
// } | |||
// }, | |||
// { | |||
// path: 'menuManage', | |||
// name: 'menuManage', | |||
// component: '/systemManage/menuManage', | |||
// meta: { | |||
// topMenu: 'systemManage', | |||
// title: '菜单管理', | |||
// uIcon: 'unselected-sec-menu', | |||
// activeIcon: 'selected-sec-menu', | |||
// isShowTag: true | |||
// } | |||
// }, | |||
// { | |||
// path: 'roleManage', | |||
// name: 'roleManage', | |||
// component: '/systemManage/roleManage', | |||
// meta: { | |||
// topMenu: 'systemManage', | |||
// title: '角色管理', | |||
// uIcon: 'unselected-sec-menu', | |||
// activeIcon: 'selected-sec-menu', | |||
// isShowTag: true | |||
// } | |||
// }, | |||
// { | |||
// path: 'systemLog', | |||
// name: 'systemLog', | |||
// component: '/systemManage/systemLog', | |||
// meta: { | |||
// topMenu: 'systemManage', | |||
// title: '系统日志', | |||
// uIcon: 'unselected-sec-menu', | |||
// activeIcon: 'selected-sec-menu', | |||
// isShowTag: true | |||
// } | |||
// } | |||
// ] | |||
// } | |||
// ] | |||
export const useMenuStore = defineStore('menuConfig', { | |||
state: () => { | |||
return { | |||
menuArr: [] | |||
} | |||
}, | |||
getters: {}, | |||
actions: { | |||
setMenuStore () { | |||
return new Promise((resolve, reject) => { | |||
userMenu().then(res => { | |||
this.menuArr = res.data.map(i => treeMap(i)) | |||
resolve(generateRoute(this.menuArr)) | |||
}).catch(err => { | |||
reject('err', err) | |||
}) | |||
}) | |||
} | |||
}, | |||
persist: { | |||
storage: localStorage, | |||
paths: ['menuArr'] | |||
} | |||
}) |
@@ -0,0 +1,48 @@ | |||
import { defineStore } from 'pinia' | |||
import { currentUserInfo } from '@/http/apis/systemManage/userManage' | |||
import { getUserRoleList } from '@/http/apis/systemManage/roleManage' | |||
export const useUserStore = defineStore('userConfig', { | |||
state: () => { | |||
return { | |||
userInfo: {}, | |||
roleList: [] | |||
} | |||
}, | |||
getters: { | |||
roleListDict () { | |||
const opt = this.roleList?.map(item => ({ id: item.id, name: item.name })) | |||
return opt || [] | |||
} // 用户角色 | |||
}, | |||
actions: { | |||
setUserStore () { | |||
return new Promise((resolve, reject) => { // 获取当前用户信息 | |||
currentUserInfo() | |||
.then(res => { | |||
this.userInfo = { ...res.data } | |||
resolve(res.data) | |||
}) | |||
.catch(err => { | |||
reject(err) | |||
}) | |||
}) | |||
}, | |||
setRoleStore () { | |||
return new Promise((resolve, reject) => { | |||
getUserRoleList({ pageSize: 100, pageNumber: 1 }) | |||
.then(res => { | |||
this.roleList = res.data.records | |||
resolve(res.data) | |||
}) | |||
.catch(err => { | |||
reject(err) | |||
}) | |||
}) | |||
} | |||
}, | |||
persist: { | |||
storage: localStorage, | |||
paths: ['userInfo'] | |||
} | |||
}) |
@@ -0,0 +1,31 @@ | |||
// 导出excel文件 | |||
import FileSaver from 'file-saver' | |||
import XLSX from 'xlsx' | |||
export const exportExcel = (dom) => { | |||
var xlsxParam = { raw: true } | |||
/* 从表生成工作簿对象 */ | |||
var wb = XLSX.utils.table_to_book( | |||
dom, | |||
xlsxParam | |||
) | |||
/* 获取二进制字符串作为输出 */ | |||
var wbout = XLSX.write(wb, { | |||
bookType: 'xlsx', | |||
bookSST: true, | |||
type: 'array' | |||
}) | |||
try { | |||
FileSaver.saveAs( | |||
// Blob 对象表示一个不可变、原始数据的类文件对象。 | |||
// Blob 表示的不一定是JavaScript原生格式的数据。 | |||
// File 接口基于Blob,继承了 blob 的功能并将其扩展使其支持用户系统上的文件。 | |||
// 返回一个新创建的 Blob 对象,其内容由参数中给定的数组串联组成。 | |||
new Blob([wbout], { type: 'application/octet-stream' }), | |||
// 设置导出文件名称 | |||
'sheetjs.xlsx' | |||
) | |||
} catch (e) { | |||
if (typeof console !== 'undefined') console.log(e, wbout) | |||
} | |||
return wbout | |||
} |
@@ -0,0 +1,53 @@ | |||
const modules = import.meta.glob('/src/pages/**/*.vue') // 匹配pages下所有vue文件,默认懒加载模式 | |||
const loadComponent = component => { | |||
return modules[`/src/pages${component}/index.vue`] // 进行动态导入 | |||
} | |||
const changeMenu = list => { | |||
return list.map(item => ({ | |||
...item, | |||
component: loadComponent(item.component), | |||
redirect: item.children ? item.redirect : null, | |||
children: | |||
item.children && item.children.length ? changeMenu(item.children) : null | |||
})) | |||
} | |||
const keepAliveRoutes = ['projectStore'] | |||
const getRedirect = (obj) => { | |||
if (obj.name !== 'home' && obj.level === 1 && obj.children?.length) { | |||
if (obj.children[0]?.children?.filter(i => i.menuType === 'MENU')?.length) { | |||
return obj.path + '/' + obj.children[0].path + '/' + obj.children[0].children[0].path | |||
} else { | |||
return obj.path + '/' + obj.children[0].path | |||
} | |||
} else { | |||
return undefined | |||
} | |||
} | |||
export const generateRoute = menus => { | |||
// 动态添加路由 | |||
return changeMenu(menus) | |||
} | |||
export const treeMap = obj => { | |||
const haveChildren = Array.isArray(obj.children) && obj.children.length | |||
return { | |||
path: obj.path, | |||
name: obj.name, | |||
component: obj.component, | |||
redirect: getRedirect(obj), | |||
meta: { | |||
topMenu: obj.topMenu, | |||
activeMenu: obj.activeMenu, | |||
title: obj.title, | |||
activeIcon: obj.icon, | |||
uIcon: 'un' + obj.icon, | |||
hidden: obj.hidden === 1, | |||
isShowTag: obj.isShowTag === 1, | |||
menuType: obj.menuType, | |||
keepAlive: keepAliveRoutes.includes(obj.name) | |||
}, | |||
children: haveChildren ? obj.children.map(item => treeMap(item)) : null | |||
} | |||
} |
@@ -0,0 +1,52 @@ | |||
import store from '@/store' | |||
const userInfo = store.userStore.userInfo || {} | |||
const codes = userInfo.userRoleInfoList.map(i => i.code) // 当前用户角色 | |||
/** | |||
* 获取当前用户角色是否有权限看到地区树 | |||
* @param roles 用户的角色 | |||
* @param type 默认是or或者,and并且 | |||
*/ | |||
export const getIsShowRegionTree = (roles, type = 'or') => { | |||
var result = type === 'and' | |||
roles.forEach(data => { | |||
if (codes.includes(data) && type === 'or') { | |||
result = true | |||
} else if (!codes.includes(data) && type === 'and') { | |||
result = false | |||
} | |||
}) | |||
return result | |||
} | |||
/** | |||
* 获取当前用户角色的地区树的参数 | |||
* @param roles: {[key:string]:boolean}需要判断的角色,key:角色code,value:是否否只是本级 | |||
*/ | |||
export const getTreeParams = (roles) => { | |||
if (codes.includes('SUPER_ADMIN') && Object.keys(roles).includes('SUPER_ADMIN')) { // 超管 | |||
return { | |||
regionCode: 330500, | |||
regionLevel: 2 | |||
} | |||
} else if (codes.includes('VISITOR') && Object.keys(roles).includes('VISITOR')) { // 访客 | |||
return { | |||
regionCode: 330500, | |||
regionLevel: 2 | |||
} | |||
} else if (codes.includes('REGION_MANAGER') && Object.keys(roles).includes('REGION_MANAGER')) { // 区管 | |||
return { | |||
regionCode: Number(userInfo.regionCode), | |||
regionLevel: userInfo.regionCode === '330500' && !roles['REGION_MANAGER'] ? 2 : 3 | |||
} | |||
} else if (codes.includes('EXPERT_ADMIN') && Object.keys(roles).includes('EXPERT_ADMIN')) { // 专家管理员 | |||
return { | |||
regionCode: Number(userInfo.regionCode), | |||
regionLevel: userInfo.regionCode === '330500' && !roles['EXPERT_ADMIN'] ? 2 : 3 | |||
} | |||
} else { | |||
return { | |||
regionCode: Number(userInfo.regionCode), | |||
regionLevel: 3 | |||
} | |||
} | |||
} |
@@ -0,0 +1,34 @@ | |||
import store from '@/store' | |||
/** | |||
* 审查清单模块只有丽水市本级区域,角色:区域管理员,超级管理员,陈超、刘晓峰、施伟谊、吴巍、王茜、吴雨鑫、刘点笑,可以查看。 | |||
*/ | |||
const userInfo = store.userStore.userInfo || {} | |||
const codes = userInfo.userRoleInfoList.map(i => i.code) // 当前用户角色 | |||
export const getIsShowReviewCheck = (onlyUser) => { | |||
const employeeCodes = import.meta.env.MODE === 'production' ? [ | |||
'GE_dce116d65ffe48a3aee6c14c1c5a3031', | |||
'GE_573158a366554bdbb483f8f93d594bf7', | |||
'GE_fe1cd568b453456ead00f471ecddf6a2', | |||
'GE_fc1e28e29b5a4cf39c7b7c83278db6f4', | |||
'GE_a4c2c56ed3204600805e0f7b7dca9044', | |||
'GE_16580afcdf7d4d379fd3690ba47f3b58', | |||
'GE_9c901c85eaeb42abbb485b7aa4d4358f' | |||
] : [ | |||
'GE_051f5e34c0c4467b873cde517a21669b', | |||
'GE_6dc0e5a3513d41f684b6b01aeb94d887', | |||
'GE_39be254f6cb84ad0b30c9bd5bda657d7', | |||
'GE_809a061236b941d281446df6f14dc8f0', | |||
'GE_c3e4d8e8067b4fce91b28b570cffc67a', | |||
'GE_6168943503de45919c42d46e05b24fa1', | |||
'GE_e68c7af513474eaa959b7ce7141a4d9f' | |||
] | |||
if (onlyUser) { | |||
return employeeCodes.includes(userInfo.employeeCode) | |||
} | |||
if (userInfo.regionCode === '330500' && (codes.includes('SUPER_ADMIN') || codes.includes('REGION_MANAGER') || employeeCodes.includes(userInfo.employeeCode))) { | |||
return true | |||
} else { | |||
return false | |||
} | |||
} |
@@ -0,0 +1,47 @@ | |||
// 获取时间差 | |||
export default function getTimeDiffer (date1, date2, type) { | |||
const date3 = date1.getTime() - date2.getTime() // 时间差的毫秒数 | |||
let result = 0 | |||
switch (type) { | |||
case 'd': | |||
result = date3 / (1000 * 60 * 60 * 24) | |||
break | |||
case 'h': | |||
result = date3 / (1000 * 60 * 60) | |||
break | |||
case 'm': | |||
result = date3 / (1000 * 60) | |||
break | |||
case 's': | |||
result = date3 / 1000 | |||
break | |||
default: | |||
break | |||
} | |||
return result | |||
} | |||
// 计算两个时间之间的时间差 多少天时分秒 | |||
export const intervalTime = (startTime, endTime) => { | |||
var date1 = startTime // 开始时间 | |||
var date2 = endTime // 结束时间 | |||
var date3 = (date2 - date1) // 时间差的毫秒数 | |||
// 计算出相差天数 | |||
var days = Math.floor(date3 / (24 * 3600 * 1000)) | |||
if (days < 0) { | |||
days = days * (-1) | |||
} | |||
// 计算出小时数 | |||
var leave1 = date3 % (24 * 3600 * 1000) // 计算天数后剩余的毫秒数 | |||
var hours = Math.floor(leave1 / (3600 * 1000)) | |||
// 计算相差分钟数 | |||
// var leave2 = leave1 % (3600 * 1000) // 计算小时数后剩余的毫秒数 | |||
// var minutes = Math.floor(leave2 / (60 * 1000)) | |||
// 计算相差秒数 | |||
// var leave3 = leave2 % (60 * 1000) // 计算分钟数后剩余的毫秒数 | |||
// var seconds = Math.round(leave3 / 1000) | |||
// return days + "天 " + hours + "小时 " + minutes + " 分钟" + seconds + " 秒" | |||
return days + '天 ' + hours + '小时 ' | |||
} |
@@ -0,0 +1,50 @@ | |||
import JSEncrypt from 'jsencrypt' | |||
var publicKey = '-----BEGIN PUBLIC KEY-----\n' + | |||
'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC9eF6XIgicrt7gp5lcMAAAAzNd' + | |||
'xESvUZaLX83HJp7QmUrH6BqBlshOE3YW5J+3o/QNyfwWhjaWXBxeMOJqbj1PZxv2' + | |||
'60td2MBBy392FE2crBeJ796bJKvfR4q0CBrhMeTtUZcUXj26qjjnQQCK+8+1Hkbc' + | |||
'BOeCXPcZKv/yH2PiswIDAQAB\n' + | |||
'-----END PUBLIC KEY-----' | |||
var privateKey = '-----BEGIN RSA PRIVATE KEY-----\n' + | |||
'MIICXwIBAAKBgQC9eF6XIgicrt7gp5lcMAAAAzNdxESvUZaLX83HJp7QmUrH6BqB' + | |||
'lshOE3YW5J+3o/QNyfwWhjaWXBxeMOJqbj1PZxv260td2MBBy392FE2crBeJ796b' + | |||
'JKvfR4q0CBrhMeTtUZcUXj26qjjnQQCK+8+1HkbcBOeCXPcZKv/yH2PiswIDAQAB' + | |||
'AoGBAIVDN0yXfHUvrcVXPE+R1z4rAiLuW9zvxrIK1UJAkK1pVCacwp/o/MOlfoaF' + | |||
'kSzp3UshiPQSvCwvZyh8u5NeLDIJ8fA8qN/T1uC3NQ+2oWnuDFnyLYDCGsZaR7cu' + | |||
'wD91lXnCO/49dlhovugigBjqaM0ynpu2iWimwjQgp873Y7jZAkEA5FLg1jV8S4I0' + | |||
'n0NYfNk23WF2WRiWi1uJ35VehWlXJVEbUA7NtNFK/ziulVQPW1zit9MjGxmm9Buf' + | |||
'yRPDuCpr7QJBANRv005r9409DHeM6XXWTqENZH+iVHbFp2xsVOQ3BbzSBqVhX/v/' + | |||
'vpjqhgbIHbXGx7IfeFmlEympet27jgPz9R8CQQC0Wb7dlVv77PqR/slLvOw4jD7G' + | |||
'e8SWiZTrdfo2mZHLmThg0YCtXlDGLsjAjaifu0wedfmZ83ZMBfH+C82ikGe1AkEA' + | |||
'qaLmXJAQrOMcCncmkidgwHB+WQFaa0GoUQcsvtRFK6OXFQbt68AsBdX40n+IYfhq' + | |||
'zI0ewI71/2XLrDYx0GxFxwJBAJIgX4feOJPRBCzX1Ky2Fs5J3b9jRw0fFxlsBauq' + | |||
'xKazEQmpcSkEKvkL63VpcJTtqRwlGhtFsiWsxsp1p3z008w=\n' + | |||
'-----END RSA PRIVATE KEY-----' | |||
// const generateKeys = () => { | |||
// const rsa = new JSEncrypt() | |||
// const keypair = rsa.getKey() | |||
// publicKey = keypair.getPublicKey() | |||
// privateKey = keypair.getPrivateKey() | |||
// | |||
// console.log('公钥:', publicKey) | |||
// console.log('私钥:', privateKey) | |||
// } | |||
// 加密 | |||
export function encrypt (txt) { | |||
const encryptor = new JSEncrypt() | |||
encryptor.setPublicKey(publicKey) // 设置公钥 | |||
// encryptor.setPrivateKey(privateKey) // 设置公钥 | |||
// console.log(encryptor.encrypt('1698824468777')) | |||
// console.log(encryptor.decrypt('MWv5TkZ0NcQibD6iNPGTEgZXMltKO8BKPCQe20zAwHArmOXsUBLyb2ZrizvjsjpzbSH6ALyk0mgEpNu4k+0Dw9WExMvJWm5OM/zQpmR9X48DQlmEicQbIzLbtVWRT3YlQmWs/jrPs0+W7rL+dYdjycy/EydWSFeM/pmYpZFhh6A=')) | |||
return encryptor.encrypt(txt) // 对数据进行加密 | |||
} | |||
// 解密 | |||
export function decrypt (txt) { | |||
const encryptor = new JSEncrypt() | |||
encryptor.setPrivateKey(privateKey) // 设置私钥 | |||
console.log(encryptor.decrypt('OJICrMZSv7VeT/LCivgUzsTWCDhRPzmtaoMB77aLwXPnGj5VVbHSjA3MohPGABuHF0aCh/rdNT8K1j5CK0c6lKeoyw015vCND/AW1LhcVXZR1FioM8IW70FpM3CcDViNetQCXP9XaCAnFpeeALnRzIGoW6kVpmjiTFYaVvBZluc=')) | |||
return encryptor.decrypt(txt) // 对数据进行解密 | |||
} |
@@ -0,0 +1,113 @@ | |||
/** | |||
* 图片: | |||
.jpeg格式:image/jpeg | |||
.png格式: image/png | |||
.gif格式: image/gif | |||
音频: | |||
.mp3格式:audio/mpeg | |||
视频: | |||
.mp4格式:video/mp4 | |||
.m3u8格式:application/x-mpegURL | |||
.mov格式:video/x-ms-wmv | |||
.avi格式:video/x-msvideo | |||
.flv格式:video/x-flv | |||
.wmv格式:video/x-ms-wmv | |||
文本: | |||
.xls格式:application/vnd.ms-excel | |||
.xlsx格式:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet | |||
.doc格式:application/msword | |||
.docx格式:application/vnd.openxmlformats-officedocument.wordprocessingml.document | |||
.txt格式:text/plain | |||
.pdf格式:application/pdf | |||
.ppt格式:application/vnd.ms-powerpoint | |||
.zip格式:application/zip | |||
.rar格式:application/x-rar | |||
*/ | |||
import { ElMessage } from 'element-plus' | |||
import { downFileById, downloadToPdfStream } from '@/http/apis/commonApi' | |||
export const handleFileSuccess = (res, fileList, onefile, fn) => { | |||
if (res.code !== 200) { | |||
ElMessage.error('上传失败!') | |||
const index = fileList.findIndex(i => i.response.code !== 200) | |||
fileList.splice(index, 1) | |||
} | |||
if (onefile && fileList.length > 1) { | |||
ElMessage.error('只能上传一个文件!') | |||
fileList.shift() | |||
} | |||
// fileList.forEach(async i => { | |||
// i.fileUrlById = await downloadFileUrl(i.response.data.id) | |||
// }) | |||
fn && fn() | |||
} | |||
export const handleFileError = error => { | |||
ElMessage.error(error.message ? JSON.parse(error.message) : '上传失败!') | |||
} | |||
export const fileTypes = ['wps', 'pdf', 'doc', 'docx'] | |||
// export const fileTypes = ['application/pdf', 'application/msword', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/wps-office.wps', 'application/wps-office.doc', 'application/wps-office.docx', 'application/wpsoffice'] | |||
export const fileDesc = 'pdf、word' | |||
export const fileFormatVerification = (file, { types, size }) => { | |||
const fileTypes = file.name.substring(file.name.lastIndexOf('.') + 1).toLocaleLowerCase() | |||
const isType = types.indexOf(fileTypes) !== -1 | |||
const isSize = size ? file.size / 1024 <= size : true | |||
if (!isType) { | |||
ElMessage.error('上传文件格式错误!') | |||
} | |||
if (!isSize) { | |||
ElMessage.error( | |||
`上传文件大小不能超过 ${size >= 1024 ? size / 1024 : size}${ | |||
size >= 1024 ? 'M' : 'KB' | |||
}!` | |||
) | |||
} | |||
return isType && isSize | |||
} | |||
export const handleFileExceed = (fileList) => { | |||
ElMessage.warning(`该处只可上传${fileList.length}个文件`) | |||
} | |||
export const handleFilePreview = (file) => { | |||
window.open(`/fileView?id=${file?.response?.data?.id}`, '_blank') | |||
} | |||
// 编辑回显附件 | |||
export const reviewFileParam = (files) => { | |||
let fileList = [] | |||
if (files) { | |||
fileList = files?.map?.(item => ({ | |||
uid: item?.id, | |||
name: item?.originalFileName, | |||
status: 'success', | |||
url: item?.url, | |||
response: { | |||
data: item | |||
} | |||
})) || [] | |||
} | |||
return JSON.parse(JSON.stringify(fileList)) | |||
} | |||
// 提交附件 | |||
export const changFilesParam = (files) => { | |||
let fileList = [] | |||
if (files && files.length) { | |||
fileList = files.map(item => { | |||
return item.response ? item.response?.data : { ...item } | |||
}) | |||
} | |||
return fileList | |||
} | |||
export const downloadFileUrl = async fileId => { | |||
const res = await downFileById({ fileId }) | |||
const url = URL.createObjectURL(res) | |||
return url | |||
} | |||
export const downloadToPdfStreamFileUrl = async fileId => { | |||
const res = await downloadToPdfStream({ fileId }) | |||
const url = URL.createObjectURL(res) | |||
return url | |||
} | |||
@@ -0,0 +1,24 @@ | |||
import { ref } from 'vue' | |||
export default function () { | |||
const exportLoading = ref(false), | |||
exportData = async (func) => { | |||
exportLoading.value = true | |||
const res = await func() | |||
const url = URL.createObjectURL(res) | |||
const link = document.createElement('a') | |||
link.style.display = 'none' | |||
link.href = url | |||
document.body.appendChild(link) | |||
link.click() | |||
document.body.removeChild(link) | |||
window.URL.revokeObjectURL(url) | |||
exportLoading.value = false | |||
} | |||
return { | |||
exportLoading, | |||
exportData | |||
} | |||
} |