feat:增加总积分

This commit is contained in:
lixg
2023-02-09 09:35:07 +08:00
parent 2a026d81ce
commit 6272bb3223
8 changed files with 250 additions and 19 deletions

9
.env
View File

@@ -23,3 +23,12 @@ VUE_APP_COURSE_STUDY=//u-pre.boe.com/pc/course/studyindex?id=
# 导入学员模板 # 导入学员模板
VUE_APP_UP_LOAD_STUDENT_TEMPLATE=导入学员模版-1673963663229.xlsx VUE_APP_UP_LOAD_STUDENT_TEMPLATE=导入学员模版-1673963663229.xlsx
#在线
VITE_BOE_ONLINE_CLASS_URL=//u-pre.boe.com/pc/course/studyindex?id=
#案例
VITE_BOE_CASS_DETAIL_URL=//u-pre.boe.com/pc/case/detail?id=
#考试
VITE_BOE_EXAM_DETAIL_URL=//u-pre.boe.com/pc/exam/test?id=
#h5的基本url
VUE_APP_H5=//u-pre.boe.com/mobile/student-h5

View File

@@ -7,4 +7,8 @@ VUE_APP_LOGIN_URL=//u-pre.boe.com/web
VUE_APP_BOE_API_URL=//u-pre.boe.com VUE_APP_BOE_API_URL=//u-pre.boe.com
# 导入学员模板 # 导入学员模板
VUE_APP_UP_LOAD_STUDENT_TEMPLATE=导入学员模版-1673963663229.xlsx VUE_APP_UP_LOAD_STUDENT_TEMPLATE=导入学员模版-1673963663229.xlsx
#在线
VITE_BOE_ONLINE_CLASS_URL=//u-pre.boe.com/pc/course/studyindex?id=
VITE_BOE_CASS_DETAIL_URL=//u-pre.boe.com/pc/case/detail?id=
VITE_BOE_EXAM_DETAIL_URL=//u-pre.boe.com/pc/exam/test?id=

View File

@@ -14,3 +14,6 @@ VUE_APP_IFRAME_STUDENT_URL=//u.boe.com/pc/loading
VUE_APP_COURSE_STUDY=//u.boe.com/pc/course/studyindex?id= VUE_APP_COURSE_STUDY=//u.boe.com/pc/course/studyindex?id=
VUE_APP_UP_LOAD_STUDENT_TEMPLATE=导入学员模版-1673963663229.xlsx VUE_APP_UP_LOAD_STUDENT_TEMPLATE=导入学员模版-1673963663229.xlsx
VITE_BOE_ONLINE_CLASS_URL=//u.boe.com/pc/course/studyindex?id=
VITE_BOE_CASS_DETAIL_URL=//u.boe.com/pc/case/detail?id=
VITE_BOE_EXAM_DETAIL_URL=//u.boe.com/pc/exam/test?id=

View File

@@ -13,4 +13,7 @@ VUE_APP_IFRAME_STUDENT_URL=//u.boe.com/pc-release/loading
VUE_APP_COURSE_STUDY=//u.boe.com/pc-release/course/studyindex?id= VUE_APP_COURSE_STUDY=//u.boe.com/pc-release/course/studyindex?id=
VUE_APP_UP_LOAD_STUDENT_TEMPLATE=导入学员模版-1673963663229.xlsx VUE_APP_UP_LOAD_STUDENT_TEMPLATE=导入学员模版-1673963663229.xlsx
VITE_BOE_ONLINE_CLASS_URL=//u.boe.com/pc-release/course/studyindex?id=
VITE_BOE_CASS_DETAIL_URL=//u.boe.com/pc-release/case/detail?id=
VITE_BOE_EXAM_DETAIL_URL=//u.boe.com/pc-release/exam/test?id=

View File

@@ -2,7 +2,7 @@
* @Author: lixg lixg@dongwu-inc.com * @Author: lixg lixg@dongwu-inc.com
* @Date: 2022-11-04 22:45:31 * @Date: 2022-11-04 22:45:31
* @LastEditors: lixg lixg@dongwu-inc.com * @LastEditors: lixg lixg@dongwu-inc.com
* @LastEditTime: 2023-02-06 15:11:40 * @LastEditTime: 2023-02-09 09:28:39
* @FilePath: /fe-manage/src/api/index1.js * @FilePath: /fe-manage/src/api/index1.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */
@@ -209,4 +209,6 @@ export const getTaskList = (obj) => http.get('/admin/project/getTaskList', { par
//查看证书学员列表 //查看证书学员列表
export const stuCertList = (obj) => http.get('/admin/certificate/stuCertList', { params: obj }) export const stuCertList = (obj) => http.get('/admin/certificate/stuCertList', { params: obj })
//更新学员证书 //更新学员证书
export const updateStuCert = (obj) => http.post('/admin/certificate/updateStuCert', obj) export const cancelOrAuth = (obj) => http.post('/admin/certificate/cancelOrAuth', obj)
//获取项目总积分
export const allPoints = (obj) => http.get('/points/project/allPoints', { params: obj })

View File

@@ -458,8 +458,25 @@ export default {
getStageList(); getStageList();
getTaskList(); getTaskList();
getTaskExam(); getTaskExam();
allPoints();
} }
}; };
//获取项目积分
const allPoints = () => {
let obj = {
projectId: props.projectId,
};
api
.allPoints(obj)
.then((res) => {
if (res.data.code === 200) {
console.log("获取项目总积分", res);
}
})
.catch((err) => {
console.log("获取总积分失败", err);
});
};
//获取阶段 //获取阶段
const getStageList = () => { const getStageList = () => {
let obj = { let obj = {

View File

@@ -179,7 +179,7 @@ export default {
<div <div
class="opa" class="opa"
onClick={() => { onClick={() => {
updateStuCert(record); cancelOrAuth(record);
}} }}
> >
<span>取消证书</span> <span>取消证书</span>
@@ -213,6 +213,7 @@ export default {
id: props.ACertificateCheckId, id: props.ACertificateCheckId,
pid: props.projectId, pid: props.projectId,
size: state.pageSize, size: state.pageSize,
current: state.currentPage,
}; };
state.tableDataTotal = -1; state.tableDataTotal = -1;
api api
@@ -244,15 +245,15 @@ export default {
state.selectTime = null; state.selectTime = null;
}; };
//取消授权 //取消证书
const updateStuCert = (text) => { const cancelOrAuth = (text) => {
console.log("text", text); console.log("text", text);
let obj = { let obj = {
id: text.record.id, ids: [text.record.id],
status: -1, status: -1,
}; };
api api
.updateStuCert(obj) .cancelOrAuth(obj)
.then((res) => { .then((res) => {
console.log("取消证书成功", res); console.log("取消证书成功", res);
if (res.data.code === 200) { if (res.data.code === 200) {

View File

@@ -326,7 +326,11 @@
<div class="onerow"> <div class="onerow">
<div class="taskmain">任务大纲</div> <div class="taskmain">任务大纲</div>
<router-link to="/leveladddetail" class="editright" v-if="checkPer(permissions)"> <router-link
to="/leveladddetail"
class="editright"
v-if="checkPer(permissions)"
>
<img <img
class="editimg" class="editimg"
src="../../assets/images/leveladd/edit.png" src="../../assets/images/leveladd/edit.png"
@@ -563,7 +567,12 @@
> >
<template #extension="{ data: { record } }"> <template #extension="{ data: { record } }">
<a-button type="link" @click="showStudent(record)">查看</a-button> <a-button type="link" @click="showStudent(record)">查看</a-button>
<a-button type="link" @click="setLevels(record)" v-if="checkPer(permissions)">调整</a-button> <a-button
type="link"
@click="setLevels(record)"
v-if="checkPer(permissions)"
>调整</a-button
>
</template> </template>
</TableStudent> </TableStudent>
<TableStudent <TableStudent
@@ -575,7 +584,12 @@
> >
<template #extension="{ data: { record } }"> <template #extension="{ data: { record } }">
<a-button type="link" @click="showStudent(record)">查看</a-button> <a-button type="link" @click="showStudent(record)">查看</a-button>
<a-button type="link" @click="setLevels(record)" v-if="checkPer(permissions)">调整</a-button> <a-button
type="link"
@click="setLevels(record)"
v-if="checkPer(permissions)"
>调整</a-button
>
</template> </template>
</TableStudent> </TableStudent>
</a-tab-pane> </a-tab-pane>
@@ -592,7 +606,12 @@
<div class="headone"> <div class="headone">
<div class="box"></div> <div class="box"></div>
<div class="onetitle">关卡内容可见可学设置</div> <div class="onetitle">关卡内容可见可学设置</div>
<div class="oneedi" @click="showbtn" v-show="twobtn" v-if="checkPer(permissions)"> <div
class="oneedi"
@click="showbtn"
v-show="twobtn"
v-if="checkPer(permissions)"
>
编辑 编辑
</div> </div>
<div v-show="twobtnn" class="twobtn"> <div v-show="twobtnn" class="twobtn">
@@ -1354,7 +1373,7 @@ import { handleLearnPath } from "../../api/index1";
import { GetRouterDetail } from "@/api/indexTask"; import { GetRouterDetail } from "@/api/indexTask";
import * as api from "../../api/index1"; import * as api from "../../api/index1";
import { editRoutered } from "../../api/indexLearningPath"; import { editRoutered } from "../../api/indexLearningPath";
import { codeUrl } from "../../api/method"; // import { codeUrl } from "../../api/method";
import TwoDimensionalCode from "../../components/TwoDimensionalCode.vue"; import TwoDimensionalCode from "../../components/TwoDimensionalCode.vue";
import TableStudent from "@/components/student/TableStudent"; import TableStudent from "@/components/student/TableStudent";
// import * as student from "@/api/student"; // import * as student from "@/api/student";
@@ -1368,7 +1387,7 @@ import RouterHomeworkManage from "../../components/drawers/router/RouterHomework
import RouterCommonManage from "../../components/drawers/router/RouterCommonManage"; import RouterCommonManage from "../../components/drawers/router/RouterCommonManage";
import RouterVoteManage from "../../components/drawers/router/RouterVoteManage"; import RouterVoteManage from "../../components/drawers/router/RouterVoteManage";
import RouterProjectManage from "../../components/drawers/router/RouterProjectManage"; import RouterProjectManage from "../../components/drawers/router/RouterProjectManage";
import {checkPer} from "@/utils/utils"; import { checkPer } from "@/utils/utils";
export default { export default {
name: "LevelAdd", name: "LevelAdd",
@@ -1889,10 +1908,10 @@ export default {
// 考试点击管理弹框 // 考试点击管理弹框
const examinationModel = (data, levelname) => { const examinationModel = (data, levelname) => {
console.log(data); console.log(data);
if(data.startTime==null && data.endTime==null){ if (data.startTime == null && data.endTime == null) {
// 外部考试 // 外部考试
state.examinationExaminaModelVisible = true; state.examinationExaminaModelVisible = true;
}else{ } else {
// 系统考试 // 系统考试
state.examinationModelVisible = true; state.examinationModelVisible = true;
} }
@@ -2555,6 +2574,179 @@ export default {
//显示二维码弹窗 //显示二维码弹窗
const showCodeModel = (item) => { const showCodeModel = (item) => {
console.log("二维码任务信息", item);
let codeUrl = "";
// 在线课 停用 -- 暂时没有在线课停用标记
if (item.type == 1) {
if (item.taskStatus == 1 || item.taskStatus == 2)
return message.error("该任务无法学习,请联系管理员进行替换。");
window.open(
window.location.protocol +
import.meta.env.VITE_BOE_ONLINE_CLASS_URL +
item.targetId,
"_top"
);
}
if (item.type == 2) {
let date1 = new Date(item.endTime).getTime();
let date2 = new Date().getTime();
if (date1 < date2) return message.warning("当前面授课已结束");
if (item.taskStatus == 1 || item.taskStatus == 2)
return message.error("该任务无法学习,请联系管理员进行替换。");
codeUrl =
window.location.protocol +
process.env.VUE_APP_H5 +
"/externalexam?courseId=" +
item.courseId;
}
if (item.type == 4) {
let date1 = new Date(item.endTime).getTime();
let date2 = new Date().getTime();
if (date1 < date2) return message.warning("当前作业已结束");
codeUrl =
window.location.protocol +
process.env.VUE_APP_H5 +
"/homeworkpage?courseId=" +
item.courseId +
"&type=2&id=" +
item.routerTaskId;
}
// 考试 停用
if (item.type == 5) {
if (item.taskStatus == 1 || item.taskStatus == 2)
return message.error("该任务无法学习,请联系管理员进行替换。");
// 此处判断外部考试跳转
if (item.startTime == null || item.endTime == null) {
codeUrl =
window.location.protocol +
process.env.VUE_APP_H5 +
"/externalexam?courseId=" +
item.courseId;
}
}
// 直播结束时间
if (item.type == 6) {
let date1 = new Date(item.endTime).getTime();
let date2 = new Date().getTime();
if (date1 < date2) return message.warning("当前直播已结束");
codeUrl =
window.location.protocol +
process.env.VUE_APP_H5 +
"/livebroadcast?courseId=" +
item.courseId +
"&type=2&id=" +
item.routerTaskId;
}
// 外链
if (item.type == 7) {
codeUrl =
window.location.protocol +
process.env.VUE_APP_H5 +
"/outerchain?courseId=" +
item.courseId +
"&type=2&id=" +
item.routerTaskId +
"&status=" +
item.status +
"&chapterOrStageId=" +
item.chapterId +
"&infoId=" +
state.routerId;
}
//讨论
if (item.type == 8) {
codeUrl =
window.location.protocol +
process.env.VUE_APP_H5 +
"/discusspage?courseId=" +
item.courseId +
"&type=2&id=" +
item.routerTaskId;
}
//活动
if (item.type == 9) {
let date1 = new Date(item.endTime).getTime();
let date2 = new Date().getTime();
if (date1 < date2) return message.warning("当前活动已结束");
codeUrl =
window.location.protocol +
process.env.VUE_APP_H5 +
"/activitiespage?courseId=" +
item.courseId +
"&type=2&id=" +
item.routerTaskId;
}
//活动
if (item.type == 10) {
codeUrl =
window.location.protocol +
process.env.VUE_APP_H5 +
"/evaluation?courseId=" +
item.courseId +
"&evaType=" +
item.evaType +
"&targetId=" +
item.targetId;
}
// 评估 停用
if (item.type == 11) {
if (item.taskStatus == 1 || item.taskStatus == 2)
return message.error("该任务无法学习,请联系管理员进行替换。");
codeUrl =
window.location.protocol +
process.env.VUE_APP_H5 +
"/investigatage?courseId=" +
item.courseId +
"&type=2&id=" +
item.routerTaskId +
"&chapterOrStageId=" +
item.chapterId +
"&infoId=" +
state.routerId;
}
// 投票
if (item.type == 12) {
codeUrl =
window.location.protocol +
process.env.VUE_APP_H5 +
"/ballotpage?courseId=" +
item.courseId +
"&btype=2&id=" +
item.routerTaskId +
"&chapterOrStageId=" +
item.chapterId +
"&infoId=" +
state.routerId;
}
// 项目
if (item.type == 13) {
codeUrl =
window.location.protocol +
process.env.VUE_APP_H5 +
"/projectdetails?courseId=" +
item.courseId
}
// let path = {
// 1: window.location.protocol + import.meta.env.VITE_BOE_ONLINE_CLASS_URL, //在线
// 2: "/faceteach",
// 3: window.location.protocol + import.meta.env.VITE_BOE_CASS_DETAIL_URL, //案例
// 4: "/homeworkpage",
// 5: window.location.protocol + import.meta.env.VITE_BOE_EXAM_DETAIL_URL, //考试
// 6: "/livebroadcast",
// 7: "/outerchain", //外联
// 8: "/discusspage",
// 9: "/moreactive",
// 10: "/evaluation", //测评
// 11: "/surveydetail",
// 12: "/ballotpage",
// 13: "/projectdetails",
// };
state.codevisible = true; state.codevisible = true;
let obj = { let obj = {
title: "[" + checkType(item.type) + "]二维码", title: "[" + checkType(item.type) + "]二维码",
@@ -2569,7 +2761,7 @@ export default {
let obj = { let obj = {
title: "[学习路径]二维码", title: "[学习路径]二维码",
name: state.styTitle, name: state.styTitle,
url: codeUrl, // url: codeUrl,
}; };
state.codeInfo = obj; state.codeInfo = obj;
}; };
@@ -2733,7 +2925,7 @@ export default {
setLevels, setLevels,
selectProjectName4, selectProjectName4,
changeLevel, changeLevel,
checkPer checkPer,
}; };
}, },
}; };