From a215e733fafb2887c55072c0b9f40ad176c38ce0 Mon Sep 17 00:00:00 2001 From: wyx Date: Tue, 7 Feb 2023 11:46:44 +0800 Subject: [PATCH 1/7] =?UTF-8?q?feat:=E5=A2=9E=E5=8A=A0=E9=A1=B9=E7=9B=AE/?= =?UTF-8?q?=E8=B7=AF=E5=BE=84=E5=9B=BE-=E5=A4=96=E9=83=A8=E8=80=83?= =?UTF-8?q?=E8=AF=95=E5=88=97=E8=A1=A8=E8=AF=A6=E6=83=85=E5=8F=8A=E5=AF=BC?= =?UTF-8?q?=E5=87=BA=E6=95=B0=E6=8D=AE=E6=8E=A5=E5=8F=A3=E6=8E=A5=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/indexTaskManage.js | 5 +- .../project/ProjectExternalExamManage.vue | 89 +++++++++++-------- .../RouterExaminationExternalManage.vue | 60 +++++-------- 3 files changed, 80 insertions(+), 74 deletions(-) diff --git a/src/api/indexTaskManage.js b/src/api/indexTaskManage.js index 9a9b70ca..d4753cb2 100644 --- a/src/api/indexTaskManage.js +++ b/src/api/indexTaskManage.js @@ -45,4 +45,7 @@ export const AttendanceLeave = (obj) => http.post('/stu/task/attendance/leave', export const AttendanceSign = (obj) => http.post('/stu/task/attendance/sign', obj) // 查询项目管理的信息 -export const QueryProjectManageDetail = (obj) => http.post('/project/management/queryProjectManageDetail', obj) \ No newline at end of file +export const QueryProjectManageDetail = (obj) => http.post('/project/management/queryProjectManageDetail', obj) + +// 获取外部考试信息的接口 +export const QueryExternalExamManageDetail = (obj) => http.post('/admin/external/exam/manage/queryExternalExamManageDetail', obj) diff --git a/src/components/drawers/project/ProjectExternalExamManage.vue b/src/components/drawers/project/ProjectExternalExamManage.vue index 27e21d9b..0de0c7c7 100644 --- a/src/components/drawers/project/ProjectExternalExamManage.vue +++ b/src/components/drawers/project/ProjectExternalExamManage.vue @@ -125,7 +125,6 @@ import ExportAchievement from "../ExportAchievement.vue"; import * as api from '../../../api/indexTaskManage'; - // import * as api from "../../../api/index"; export default { name: "ProjectExternalExamManage", components: { @@ -165,13 +164,13 @@ }, { id: 2, - value: "10", - label: "未通过", + value: "1", + label: "进行中", }, { id: 3, - value: "1", - label: "已通过", + value: "9", + label: "已完成", }, ], selectedRowKeys: [], @@ -184,15 +183,15 @@ tablecolumns: [ { title: "工号", - dataIndex: "studentUserNo", - key: "studentUserNo", - width: 60, + dataIndex: "studentCode", + key: "studentCode", + width: 120, align: "center", className: "h head", customRender: (text) => { return (
- {text.record.studentUserNo?text.record.studentUserNo:"-"} + {text.record.studentCode?text.record.studentCode:"-"}
); }, @@ -202,8 +201,8 @@ dataIndex: "studentName", key: "studentName", width: 50, - align: "left", - className: "h head", + align: "center", + className: "h", customRender: (text) => { return (
@@ -219,7 +218,6 @@ width: 60, align: "center", ellipsis: true, - className: "h", customRender: (text) => { return (
@@ -235,7 +233,7 @@ width: 60, align: "center", ellipsis: true, - className: "h", + className: "h", customRender: (text) => { return (
@@ -245,25 +243,25 @@ }, }, { - title: "考试次数", - dataIndex: "num", - key: "num", + title: "学员关卡", + dataIndex: "currentStageId", + key: "currentStageId", width: 60, align: "center", ellipsis: true, - className: "h", - customRender: (text) => { - return ( + className: "h", + customRender: () => { + return (
- {text.record.num?text.record.num:"-"} + {props.levelName}
); }, }, { - title: "成绩", - dataIndex: "examinationScore", - key: "examinationScore", + title: "考试次数", + dataIndex: "testNumber", + key: "testNumber", width: 60, align: "center", ellipsis: true, @@ -271,7 +269,23 @@ customRender: (text) => { return (
- {text.record.examinationScore?text.record.examinationScore:"-"} + {text.record.testNumber?text.record.testNumber:"-"} +
+ ); + }, + }, + { + title: "成绩", + dataIndex: "score", + key: "score", + width: 60, + align: "center", + ellipsis: true, + className: "h", + customRender: (text) => { + return ( +
+ {text.record.score?text.record.score:"-"}
); }, @@ -279,8 +293,8 @@ { title: "完成时间", - dataIndex: "examinationSubmitTime", - key: "examinationSubmitTime", + dataIndex: "finishedTime", + key: "finishedTime", width: 60, align: "center", ellipsis: true, @@ -288,20 +302,20 @@ customRender: (text) => { return (
- {text.record.examinationSubmitTime?text.record.examinationSubmitTime:"-"} + {text.record.finishedTime?text.record.finishedTime:"-"}
); }, }, { title: "任务状态", - dataIndex: "finishStatus", - key: "finishStatus", + dataIndex: "status", + key: "status", width: 60, align: "center", ellipsis: true, className: "h", - customRender: ({record:{finishStatus}}) => ({1:'通过',2:'未通过'}[finishStatus] || '未开始'), + customRender: ({record:{status}}) => ({0:'未开始',1:'进行中',9:'已完成'}[status] || '未开始'), }, ], loadingData: true @@ -318,6 +332,7 @@ const afterVisibleChange = (bol) => { if (bol == true) { state.loadingData = true; + console.log(props.datasource) getData(); } }; @@ -348,17 +363,17 @@ // 获取数据 function getData() { - api.AssessmentManagementMessage({ + api.QueryExternalExamManageDetail({ + chapterId: props.datasource.stageId, pageNo: state.currentPage, pageSize: state.pageSize, - currentStageId: props.datasource.stageId, - type: 1, - pid: props.datasource.projectId, - taskId: props.datasource.projectTaskId, - taskType: props.datasource.type, status: state.projectName, studentName: state.name, + targetId: props.datasource.projectId, + taskId: props.datasource.projectTaskId, + type: 2, }).then(res=>{ + console.log(res) state.tabledata = res.data.data.records; state.tableDataTotal = res.data.data.total; state.loadingData = false; @@ -387,7 +402,7 @@ {/* 导出数据 */} function exportData() { - window.open(`${process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?currentStageId=${props.datasource.stageId}&type=${1}&pid=${props.datasource.projectId}&taskId=${props.datasource.projectTaskId}&taskType=${props.datasource.type}`) + window.open(`${process.env.VUE_APP_BASE_API}/admin/external/exam/manage/exportExternalExam?chapterId=${props.datasource.stageId}&type=${2}&targetId=${props.datasource.projectId}&taskId=${props.datasource.projectTaskId}`) } return { diff --git a/src/components/drawers/router/RouterExaminationExternalManage.vue b/src/components/drawers/router/RouterExaminationExternalManage.vue index cc160b3b..a27c753d 100644 --- a/src/components/drawers/router/RouterExaminationExternalManage.vue +++ b/src/components/drawers/router/RouterExaminationExternalManage.vue @@ -168,13 +168,13 @@ }, { id: 2, - value: "10", - label: "未通过", + value: "1", + label: "进行中", }, { id: 3, - value: "1", - label: "已通过", + value: "9", + label: "已完成", }, ], selectedRowKeys: [], @@ -187,15 +187,15 @@ tablecolumns: [ { title: "工号", - dataIndex: "studentUserNo", - key: "studentUserNo", + dataIndex: "studentCode", + key: "studentCode", width: 120, align: "center", className: "h head", customRender: (text) => { return (
- {text.record.studentUserNo?text.record.studentUserNo:"-"} + {text.record.studentCode?text.record.studentCode:"-"}
); }, @@ -264,8 +264,8 @@ }, { title: "考试次数", - dataIndex: "num", - key: "num", + dataIndex: "testNumber", + key: "testNumber", width: 60, align: "center", ellipsis: true, @@ -273,7 +273,7 @@ customRender: (text) => { return (
- {text.record.num?text.record.num:"-"} + {text.record.testNumber?text.record.testNumber:"-"}
); }, @@ -289,7 +289,7 @@ customRender: (text) => { return (
- {text.record.examinationScore?text.record.examinationScore:"-"} + {text.record.score?text.record.score:"-"}
); }, @@ -297,8 +297,8 @@ { title: "完成时间", - dataIndex: "examinationSubmitTime", - key: "examinationSubmitTime", + dataIndex: "finishedTime", + key: "finishedTime", width: 60, align: "center", ellipsis: true, @@ -306,20 +306,20 @@ customRender: (text) => { return (
- {text.record.examinationSubmitTime?text.record.examinationSubmitTime:"-"} + {text.record.finishedTime?text.record.finishedTime:"-"}
); }, }, { title: "任务状态", - dataIndex: "finishStatus", - key: "finishStatus", + dataIndex: "status", + key: "status", width: 60, align: "center", ellipsis: true, className: "h", - customRender: ({record:{finishStatus}}) => ({1:'通过',2:'未通过'}[finishStatus] || '未开始'), + customRender: ({record:{status}}) => ({0:'未开始',1:'进行中',9:'已完成'}[status] || '未开始'), }, ], loadingData: true @@ -366,17 +366,17 @@ // 获取数据 function getData() { - api.AssessmentManagementMessage({ + api.QueryExternalExamManageDetail({ + chapterId: props.datasource.chapterId, pageNo: state.currentPage, pageSize: state.pageSize, - currentStageId: props.datasource.chapterId, - type: 2, - pid: props.datasource.routerId, - taskId: props.datasource.routerTaskId, - taskType: props.datasource.type, status: state.projectName, studentName: state.name, + targetId: props.datasource.routerId, + taskId: props.datasource.routerTaskId, + type: 1, }).then(res=>{ + console.log(res) state.tabledata = res.data.data.records; state.tableDataTotal = res.data.data.total; state.loadingData = false; @@ -406,19 +406,7 @@ {/* 导出数据 */} function exportData() { - // window.open(`${process.env.VUE_APP_BASE_API}/admin/exam/manage/exportExam?chapterId=${props.datasource.chapterId}&targetId=${props.datasource.routerId}&taskId=${props.datasource.courseId}&type=${1}`) - window.open(`${process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?currentStageId=${props.datasource.chapterId}&type=${2}&pid=${props.datasource.routerId}&taskId=${props.datasource.routerTaskId}&taskType=${props.datasource.type}`) - - {/* api.ExportExam({ - "chapterId": props.datasource.chapterId, - "targetId": props.datasource.routerId, - "taskId": props.datasource.courseId, - "type": 1 - }).then(res=>{ - console.log(res) - }).catch(err=>{ - console.log(err) - }) */} + window.open(`${process.env.VUE_APP_BASE_API}/admin/external/exam/manage/exportExternalExam?chapterId=${props.datasource.chapterId}&type=${1}&targetId=${props.datasource.routerId}&taskId=${props.datasource.routerTaskId}`) } return { ...toRefs(state), From 71d348f4e91c77680f232aad719c827c24fe4912 Mon Sep 17 00:00:00 2001 From: wyx Date: Tue, 7 Feb 2023 15:02:00 +0800 Subject: [PATCH 2/7] =?UTF-8?q?feat:=E5=A2=9E=E5=8A=A0=E9=A1=B9=E7=9B=AE/?= =?UTF-8?q?=E5=AD=A6=E4=B9=A0=E8=B7=AF=E5=BE=84=E5=9B=BE-=E6=B5=8B?= =?UTF-8?q?=E8=AF=84=E4=BB=BB=E5=8A=A1-PDF=E7=8A=B6=E6=80=81=E5=B1=95?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/drawers/project/ProjectEvalManage.vue | 6 +++--- src/components/drawers/router/RouterEvaluationManage.vue | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/drawers/project/ProjectEvalManage.vue b/src/components/drawers/project/ProjectEvalManage.vue index d625e0c4..a93119eb 100644 --- a/src/components/drawers/project/ProjectEvalManage.vue +++ b/src/components/drawers/project/ProjectEvalManage.vue @@ -297,8 +297,8 @@ export default { }, { title: "PDF状态", - dataIndex: "PDFstatus", - key: "PDFstatus", + dataIndex: "finishStatus", + key: "finishStatus", width: 60, align: "center", ellipsis: true, @@ -306,7 +306,7 @@ export default { customRender: (text) => { return (
- {text.record.PDFstatus?text.record.PDFstatus:"-"} + {text.record.finishStatus == 0 || text.record.finishStatus==null ? "未生成" :text.record.finishStatus == 1 ?"已生成":"未生成"}
); }, diff --git a/src/components/drawers/router/RouterEvaluationManage.vue b/src/components/drawers/router/RouterEvaluationManage.vue index b52580b4..4c1747db 100644 --- a/src/components/drawers/router/RouterEvaluationManage.vue +++ b/src/components/drawers/router/RouterEvaluationManage.vue @@ -294,8 +294,8 @@ export default { }, { title: "PDF状态", - dataIndex: "PDFstatus", - key: "PDFstatus", + dataIndex: "finishStatus", + key: "finishStatus", width: 60, align: "center", ellipsis: true, @@ -303,7 +303,7 @@ export default { customRender: (text) => { return (
- {text.record.PDFstatus?text.record.PDFstatus:"-"} + {text.record.finishStatus == 0 || text.record.finishStatus==null ? "未生成" :text.record.finishStatus == 1 ?"已生成":"未生成"}
); }, From 66e21e8692b18195cff65c24523d9195ea4b6717 Mon Sep 17 00:00:00 2001 From: yuping <82253452@qq.com> Date: Tue, 7 Feb 2023 16:58:44 +0800 Subject: [PATCH 3/7] =?UTF-8?q?--demand=20=E6=9D=83=E9=99=90=E5=88=97?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 9 +++++++++ src/api/ThirdApi.js | 3 ++- src/store/index.js | 3 +++ src/utils/utils.js | 4 +--- src/views/courselibrary/CoursewareManage.vue | 2 +- 5 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/App.vue b/src/App.vue index 5ae4044b..7fd4f129 100644 --- a/src/App.vue +++ b/src/App.vue @@ -28,6 +28,8 @@ import BreadCrumb from "@/components/BreadCrumb"; import zhCN from "ant-design-vue/es/locale/zh_CN"; import * as api1 from "@/api/index1"; import * as api2 from "@/api/index"; +import {boeRequest} from "@/api/request"; +import {USER_PERMISSION} from "@/api/ThirdApi"; const store = useStore(); const isLogin = ref(false); @@ -60,6 +62,7 @@ function init() { initDict("projectPic"); initDict("sysType"); getMemberInfo(); + getUserPermission(); } function unloadHandler() { @@ -102,6 +105,12 @@ async function initDict(key, localStory = false) { store.commit("SET_DICT", {key, data: list}); } +function getUserPermission(){ + boeRequest(USER_PERMISSION,{permissionType:'PAGE'}).then(res=>{ + store.commit("SET_PERMISSION", res.result.flatMap(t=>t?.permissionPageList.map(s=>s.url))); + }) +} + const getDictList = (param) => api1.getDictTree({setCode: param,}).then((res) => res.data.data);