diff --git a/.env b/.env index 409b9fb6..e1aa8cf2 100644 --- a/.env +++ b/.env @@ -4,6 +4,8 @@ VUE_APP_BASE=/manage VUE_APP_BASE_API=/manageApi # systemApi VUE_APP_SYS_API=/systemapi +# activityApi +VUE_APP_ACT_API=/activityApi # 教师节上传图片文件夹id VUE_APP_PIC_FOLDERID=1147577187794841600 # 教师节上传zip文件夹id @@ -45,5 +47,7 @@ VUE_APP_H5=//u-pre.boe.com/student-h5 VUE_APP_AVATAR_PATH=/upload/ # 旧版管理员界面 VUE_APP_OLD_MANAGE=//u-pre.boe.com/resource/index.html +# 测评管理界面 +VUE_APP_EVA_MANAGE=//u-pre.boe.com/quiz/index.html # 批量面授报名模板 VUE_APP_FACE_STUDENT_TEMPLATE=批量面授报名模版-1673963663229.xlsx \ No newline at end of file diff --git a/.env.prod b/.env.prod index 6d9bc76a..7e8fe59a 100644 --- a/.env.prod +++ b/.env.prod @@ -34,5 +34,7 @@ VUE_APP_FILE_PATH=/upload/boe/file/ VUE_APP_AVATAR_PATH=/upload/ # 旧版管理员界面 VUE_APP_OLD_MANAGE=//u.boe.com/resource/index.html +# 测评管理界面 +VUE_APP_EVA_MANAGE=//u.boe.com/quiz/index.html # 批量面授报名模板 VUE_APP_FACE_STUDENT_TEMPLATE=/file/批量面授报名模版-1679595925822.xlsx \ No newline at end of file diff --git a/.env.release b/.env.release index a38aecf3..4b339986 100644 --- a/.env.release +++ b/.env.release @@ -26,5 +26,7 @@ VUE_APP_H5=//u.boe.com/student-h5-release VUE_APP_AVATAR_PATH=/upload/ # 旧版管理员界面 VUE_APP_OLD_MANAGE=//u-pre.boe.com/resource/index.html +# 测评管理界面 +VUE_APP_EVA_MANAGE=//u-pre.boe.com/quiz/index.html # 批量面授报名模板 VUE_APP_FACE_STUDENT_TEMPLATE=批量面授报名模版-1673963663229.xlsx \ No newline at end of file diff --git a/src/api/configPublic.js b/src/api/configPublic.js index 82159f4b..d5345e8e 100644 --- a/src/api/configPublic.js +++ b/src/api/configPublic.js @@ -61,3 +61,6 @@ http.interceptors.response.use( ); export default http; +export function timeoutUpload(uploadTime) { + http.defaults.timeout = uploadTime; +} \ No newline at end of file diff --git a/src/api/evaluation.js b/src/api/evaluation.js new file mode 100644 index 00000000..191a5b84 --- /dev/null +++ b/src/api/evaluation.js @@ -0,0 +1,39 @@ +// 测评上传 +import http from "./configPublic"; +const ACTIVITYAPI = '/activityApi' +import {getCookieForName} from "@/api/method"; +//查询测评 +export const list = (obj) => http.post(`${process.env.VUE_APP_ACT_API}/evaluation/list`,obj) +//导入 +export const importList = (obj) => http.post(`${process.env.VUE_APP_ACT_API}/evaluation/import`,obj, { + headers: { "Content-Type": "multipart/form-data",token:getCookieForName("token") }, +}) +//保存 +export const save = (obj) => http.post(`${process.env.VUE_APP_ACT_API}/evaluation/save`,obj) +//保存测评详情 +export const saveEvaluationDetail = (obj) => http.post(`${process.env.VUE_APP_ACT_API}/evaluation/detail/saveEvaluationDetail`,obj) +//测评封面上传 +export const uploadImage = (obj) => http.post(`${process.env.VUE_APP_ACT_API}/evaluation/upload-image`,obj,{ + headers: { "Content-Type": "multipart/form-data",token:getCookieForName("token") }, +}) +//权限管理 +export const adminList = (obj) => http.post(`${process.env.VUE_APP_ACT_API}/permission/adminList`,obj) +//权限启用 +export const updateStatus = (obj) => http.post(`${process.env.VUE_APP_ACT_API}/permission/updateStatus`,obj) +//测评删除 +export const deleteList = (obj) => http.post(`${process.env.VUE_APP_ACT_API}/evaluation/delete`,obj) +//测评详情展示 +export const getPage = (obj) => http.post(`${process.env.VUE_APP_ACT_API}/evaluation/detail/getPage`,obj) +//测评详情删除 +export const deleteById = (obj) => http.post(`${process.env.VUE_APP_ACT_API}/evaluation/detail/deleteById`,obj) +//测评清空 +export const clear = (obj) => http.post(`${process.env.VUE_APP_ACT_API}/evaluation/clear`,obj) +//保存启用的人员信息 +export const savePermission = (obj) => http.post(`${process.env.VUE_APP_ACT_API}/permission/savePermission`,obj) +//权限列表 +export const saveLists = (obj) => http.post(`${process.env.VUE_APP_ACT_API}/permission/list`,obj) +//删除配置管理 +export const deleteId = (obj) => http.post(`${process.env.VUE_APP_ACT_API}/permission/delete`,obj) +//普通管理员权限 +export const getByUserId = (obj) => http.post(`${process.env.VUE_APP_ACT_API}/permission/getByUserId`,obj) + diff --git a/src/assets/images/evaluation/authority.png b/src/assets/images/evaluation/authority.png new file mode 100644 index 00000000..c3e97a06 Binary files /dev/null and b/src/assets/images/evaluation/authority.png differ diff --git a/src/assets/images/evaluation/check.png b/src/assets/images/evaluation/check.png new file mode 100644 index 00000000..bca4cf3e Binary files /dev/null and b/src/assets/images/evaluation/check.png differ diff --git a/src/assets/images/evaluation/delete.png b/src/assets/images/evaluation/delete.png new file mode 100644 index 00000000..cca1914b Binary files /dev/null and b/src/assets/images/evaluation/delete.png differ diff --git a/src/assets/images/evaluation/download.png b/src/assets/images/evaluation/download.png new file mode 100644 index 00000000..5b2923b3 Binary files /dev/null and b/src/assets/images/evaluation/download.png differ diff --git a/src/assets/images/evaluation/edit.png b/src/assets/images/evaluation/edit.png new file mode 100644 index 00000000..a4f666f3 Binary files /dev/null and b/src/assets/images/evaluation/edit.png differ diff --git a/src/assets/images/evaluation/empty.png b/src/assets/images/evaluation/empty.png new file mode 100644 index 00000000..7ad509b4 Binary files /dev/null and b/src/assets/images/evaluation/empty.png differ diff --git a/src/assets/images/evaluation/release.png b/src/assets/images/evaluation/release.png new file mode 100644 index 00000000..fe19d695 Binary files /dev/null and b/src/assets/images/evaluation/release.png differ diff --git a/src/assets/images/evaluation/upload.png b/src/assets/images/evaluation/upload.png new file mode 100644 index 00000000..c884119f Binary files /dev/null and b/src/assets/images/evaluation/upload.png differ diff --git a/src/assets/images/evaluation/uploads.png b/src/assets/images/evaluation/uploads.png new file mode 100644 index 00000000..ab900d3b Binary files /dev/null and b/src/assets/images/evaluation/uploads.png differ diff --git a/src/components/BreadCrumb.vue b/src/components/BreadCrumb.vue index 5d0f2c03..4f84ee0b 100644 --- a/src/components/BreadCrumb.vue +++ b/src/components/BreadCrumb.vue @@ -538,6 +538,29 @@ }, ]; } + if (n.indexOf("/evaluationupload") !== -1 || n.indexOf("/EvaluationUpload") !== -1) { + state.list = [ + { + name: "测评", + }, + { + name: '测评报告' + } + ]; + } + if (n.indexOf("/evadown") !== -1 || n.indexOf("/EvaDown") !== -1) { + state.list = [ + { + name: "测评", + }, + { + name: '测评报告' + }, + { + name: route.query.name + } + ]; + } if (n.indexOf("/download") !== -1 || n.indexOf("/download") !== -1) { state.list = [ { diff --git a/src/components/NavLeft.vue b/src/components/NavLeft.vue index 2f3a2ecd..2dd78605 100644 --- a/src/components/NavLeft.vue +++ b/src/components/NavLeft.vue @@ -422,6 +422,35 @@ 问答管理 + + + + + + + 测评 + + + 测评上传 + + + + 测评管理 + + 问答 + + 测评 + 旧版 @@ -698,7 +730,8 @@ export default { "sub19", "sub20", "sub21", - "sub22" + "sub22", + "sub23", ], openKeys: localStorage.getItem("openKeys") ? JSON.parse(localStorage.getItem("openKeys")) @@ -908,6 +941,12 @@ export default { selectedKeys: "sub14", pagename: "问答管理", }, + { + href: "/evaluationupload", + openKeys: "sub23", + selectedKeys: "sub23-1", + pagename: "测评上传", + }, { href: "/download", openKeys: "sub15", @@ -1009,7 +1048,8 @@ export default { }, ], - oldManage: window.location.protocol + process.env.VUE_APP_OLD_MANAGE + oldManage: window.location.protocol + process.env.VUE_APP_OLD_MANAGE, + evaluationManagement: window.location.protocol + process.env.VUE_APP_EVA_MANAGE }); const onOpenChange = (openKeys) => { diff --git a/src/utils/zipdownload.js b/src/utils/zipdownload.js new file mode 100644 index 00000000..d42e85c2 --- /dev/null +++ b/src/utils/zipdownload.js @@ -0,0 +1,36 @@ +import axios from 'axios' +import {getCookieForName} from "@/api/method"; + +const mimeMap = { + xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', + zip: 'application/zip' +} + +const baseUrl = process.env.VUE_APP_ACT_API +export function downLoadZip(str, filename) { + var url = baseUrl + str + axios({ + method: 'get', + url: url, + responseType: 'blob', + headers: { 'Authorization': 'Bearer ' + getCookieForName("token") } + }).then(res => { + resolveBlob(res, mimeMap.zip,filename) + }) +} +/** + * 解析blob响应内容并下载 + * @param {*} res blob响应内容 + * @param {String} mimeType MIME类型 + */ +export function resolveBlob(res, mimeType,filename) { + const link = document.createElement('a');// 创建a标签 + let blob = new Blob([res.data], { type: mimeType }); // 设置文件类型 + link.style.display = "none"; + link.href = URL.createObjectURL(blob); // 创建URL + link.setAttribute("download", `${filename}`); + document.body.appendChild(link); + link.click(); + URL.revokeObjectURL(link.href); + document.body.removeChild(link); +} diff --git a/src/views/evaluation/EvaDown.vue b/src/views/evaluation/EvaDown.vue new file mode 100644 index 00000000..a502f703 --- /dev/null +++ b/src/views/evaluation/EvaDown.vue @@ -0,0 +1,331 @@ + + + + + + 返回 + + + + + + + + 全量下载 + + + + + + + + + 搜索 + + + + 重置 + + + + + + + + + + 下载 + + + + + + 删除 + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/views/evaluation/evaluationUpload.vue b/src/views/evaluation/evaluationUpload.vue new file mode 100644 index 00000000..24abf421 --- /dev/null +++ b/src/views/evaluation/evaluationUpload.vue @@ -0,0 +1,2505 @@ + + + + + + 报告上传 + + + + + + + + + + + + 搜索 + + + + 重置 + + + + + + + + + + + handleButtonClick(record, permissionCode)" + > + + + 查看 + 上传 + 下载 + 编辑 + 删除 + 清空 + + + + + + + + + + + + + + + + + + 更多 + + + + + handleButtonClick(record, permissionCode)" + > + + + {{ getButtonTitle(permissionCode) }} + + + + + + + + + + + + + + + + + + + + + + + + 测评报告{{formData.id&&btShow?'编辑':'上传'}} + + + + + + + + + 测评标题 + + + + + + + 测评封面图片 + + + + + + + + + + + + 高宽比为16:9(如:800*450) + png或jpg图片 + 不要大于2M + + + + + 备注 + + + + + + + + + + + 报告上传 + + + + + 选择文件 + + + + + + + + + {{ {uploading: '正在上传', done: '上传完成', error: '报告错误'}[record.status] || '' }} + + + + + + + + + {{Math.floor(record.percent)}}% + + + + 记录下载 + + 删除 + + + + + + + 上传说明 + + + 1、仅支持1个zip压缩包和pdf报告上传; + 2、单个附件命名规则:测评名称+姓名+工号(名称中间用英文输入法-连接)例如:大五职业性格测评-李玉冰-00004409.pdf + + + + + + + + + + + + + + + + + 分配普通管理员 + + + + + 状态 + + + + + + + + + 搜索 + + + 添加 + + + + + + + + + 启用 + + + 禁用 + + + 删除 + + + 修改权限 + + + + + + + + + + + + + + + + + + + + + 上传结果 + 上传的测评报告总文件数{{totalNumber.totalEntries}}个,成功{{totalNumber.successfulEntries}}个,失败{{totalNumber.failedEntries}}个;请点击"记录下载"查看! + + + + + + + + + + + + + + 添加普通管理员 + + + + + + + + + + + 搜索 + + + + 重置 + + + + + + + + + + + + + + + + + + + + + 权限配置 + + + + + + + + 查看 + + + 上传 + + + 清空 + + + 编辑 + + + 下载 + + + 删除 + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/views/learningpath/LevelAdd.vue b/src/views/learningpath/LevelAdd.vue index d76cd0df..231d4871 100644 --- a/src/views/learningpath/LevelAdd.vue +++ b/src/views/learningpath/LevelAdd.vue @@ -542,7 +542,7 @@ 开课 @@ -1568,9 +1568,9 @@ export default { window.open(`${process.env.VUE_APP_BASE_API}/admin/assessment/manage/export?type=${2}&pid=${item.id}&courseId=${item.courseId}`) }; const coursePlanRef = ref(); - const openCourse = async (item,index) => { + const openCourse = async (item,key,index) => { await GetRouterDraftDetail(state.routerId).then((item)=>{ - coursePlanRef.value.openDrawer(item.data.data.chapterList[0].draftTaskList[index]); + coursePlanRef.value.openDrawer(item.data.data.chapterList[index].draftTaskList[key]); }) } const qrCodeItems = ref([]); diff --git a/src/views/projectcenter/TaskPage.vue b/src/views/projectcenter/TaskPage.vue index 7dd38377..a4c0ed38 100644 --- a/src/views/projectcenter/TaskPage.vue +++ b/src/views/projectcenter/TaskPage.vue @@ -676,7 +676,7 @@ 开课 @@ -2450,9 +2450,9 @@ export default { window.open(`${process.env.VUE_APP_BASE_API}/admin/assessment/manage/export?type=${1}&pid=${item.id}&courseId=${item.courseId}`) }; const coursePlanRef = ref(); - const openCourse = async (item,index) => { + const openCourse = async (item,key,index) => { await apitl.getDraftTask({projectId: item.projectId}).then((item)=>{ - coursePlanRef.value.openDrawer(item.data.data.stageList[0].taskDraftDtoList[index]); + coursePlanRef.value.openDrawer(item.data.data.stageList[index].taskDraftDtoList[key]); }) } const qrCodeItems = ref([]);