mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-12 04:16:47 +08:00
路径图
This commit is contained in:
@@ -437,8 +437,8 @@
|
||||
{{ item.type==2 ? item.createTime !== null ? item.createTime : "-" : item.startTime !== null ? item.startTime : "-" }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="progress">
|
||||
<div class="progresstext">
|
||||
<div class="progress" v-if="item.averageScore" style="display: flex;flex-grow: 0;margin: 0;min-width: 60px;">
|
||||
<!-- <div class="progresstext">
|
||||
{{ item.finishStuNum }}/{{ item.totalStuNum }}人
|
||||
</div>
|
||||
<div style="display: flex">
|
||||
@@ -451,9 +451,65 @@
|
||||
<span class="progresstext" style="margin-left: 10px"
|
||||
>{{parseInt((item.finishStuNum / item.totalStuNum) * 100) || 0}}%</span
|
||||
>
|
||||
</div>
|
||||
</div> -->
|
||||
<div>
|
||||
{{ item.averageScore}}分
|
||||
</div>
|
||||
<div class="img_daoc" @click="exportScore(item)"></div>
|
||||
</div>
|
||||
<div class="progress" v-if="!item.averageScore" style="display: flex;flex-grow: 0;margin: 0;min-width: 60px;"></div>
|
||||
<div class="operations">
|
||||
<div class="operations_dropdown" style="min-width: 100px;">
|
||||
<a-dropdown :getPopupContainer='triggerNode=> triggerNode.parentNode' v-if="item.assessmentIds.filter(id => id !== null).length>1&&item.type == 2" :trigger="['click']" v-model:visible="visibleEwmpg[item.id]">
|
||||
<a class="ant-dropdown-link" @click="qrcodeAssement(item)">
|
||||
评估二维码
|
||||
<DownOutlined />
|
||||
</a>
|
||||
<template #overlay>
|
||||
<a-menu @click="handleMenuClickpg">
|
||||
<template v-for="(item, index) in qrCodeItemspg" :key="index">
|
||||
<a-menu-item>
|
||||
<div>
|
||||
<p>{{ item.name }}</p>
|
||||
</div>
|
||||
</a-menu-item>
|
||||
</template>
|
||||
</a-menu>
|
||||
</template>
|
||||
</a-dropdown>
|
||||
<div v-if="item.assessmentIds.filter(id => id !== null).length==1&&item.type == 2">
|
||||
<a class="ant-dropdown-link" @click="qrcodeAssement(item)">
|
||||
评估二维码
|
||||
<DownOutlined />
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="operations_dropdown" v-if="item.assessmentIds.length!=1">
|
||||
<a-dropdown :getPopupContainer='(triggerNode) => triggerNode.parentNode' v-if="item.type == 2" :trigger="['click']" v-model:visible="visibleEwm[item.id]">
|
||||
<a class="ant-dropdown-link" @click="qrcodeVisible(item)">
|
||||
签到二维码
|
||||
<DownOutlined />
|
||||
</a>
|
||||
<template #overlay v-if="qrCodeItems.length>0">
|
||||
<a-menu @click="handleMenuClick">
|
||||
<template v-for="(item, index) in qrCodeItems" :key="index">
|
||||
<a-menu-item>
|
||||
<div>
|
||||
<p>{{ item.name }}</p>
|
||||
</div>
|
||||
</a-menu-item>
|
||||
</template>
|
||||
</a-menu>
|
||||
</template>
|
||||
</a-dropdown>
|
||||
</div>
|
||||
<div class="operations_dropdown" v-if="item.assessmentIds.length==1">
|
||||
<a class="ant-dropdown-link" @click="qrcodeVisible(item)">
|
||||
签到二维码
|
||||
<DownOutlined />
|
||||
</a>
|
||||
</div>
|
||||
<div
|
||||
class="operation"
|
||||
style="cursor: pointer"
|
||||
@@ -484,6 +540,7 @@
|
||||
"
|
||||
></div>
|
||||
<div
|
||||
v-if="item.type !== 2"
|
||||
class="operation"
|
||||
style="cursor: pointer"
|
||||
@click="showCodeModel(item)"
|
||||
@@ -1403,7 +1460,7 @@ import * as api from "../../api/index1";
|
||||
import { editRouteredDoc } from "../../api/indexLearningPath";
|
||||
import TwoDimensionalCode from "../../components/TwoDimensionalCode.vue";
|
||||
import TableStudent from "@/components/student/TableStudent";
|
||||
import { getStuPage, moveStudent } from "@/api/index1";
|
||||
import { getStuPage, moveStudent,courseData } from "@/api/index1";
|
||||
import RouterExaminationManage from "../../components/drawers/router/RouterExaminationManage";
|
||||
import RouterExaminationExternalManage from "../../components/drawers/router/RouterExaminationExternalManage";
|
||||
import RouterEvaluationManage from "../../components/drawers/router/RouterEvaluationManage";
|
||||
@@ -1417,7 +1474,7 @@ import TaskImpStu from "../../components/drawers/TaskFaceIn";
|
||||
|
||||
import { checkPer,fixDoublePer } from "@/utils/utils";
|
||||
import {getCookieForName} from "@/api/method";
|
||||
|
||||
import qrCode from "@/utils/qrCode";
|
||||
export default {
|
||||
name: "LevelAdd",
|
||||
components: {
|
||||
@@ -1445,6 +1502,103 @@ export default {
|
||||
RouterProjectManage,
|
||||
},
|
||||
setup() {
|
||||
const exportScore = (item) => {
|
||||
window.open(`${process.env.VUE_APP_BASE_API}/admin/assessment/manage/export?assessmentIds=${item.assessmentIds}&pid=${item.id}`)
|
||||
};
|
||||
const coursePlanRef = ref();
|
||||
const openCourse = async (item,index) => {
|
||||
await apitl.getDraftTask({projectId: item.projectId}).then((item)=>{
|
||||
coursePlanRef.value.openDrawer(item.data.data.stageList[0].taskDraftDtoList[index]);
|
||||
})
|
||||
}
|
||||
const qrCodeItems = ref([]);
|
||||
const visibleEwm = ref({});
|
||||
const qrcodeVisible = async (item)=>{
|
||||
if(qrCodeItems.value.length!=0){
|
||||
qrCodeItems.value = []
|
||||
}
|
||||
visibleEwm.value[item.id] = !visibleEwm.value[item.id];
|
||||
const planParams = {
|
||||
type: 2,
|
||||
offcourseId: item.courseId,
|
||||
taskId: item.id,
|
||||
};
|
||||
await courseData(planParams).then((res)=>{
|
||||
qrCodeItems.value = res.data.data.map((dataItem) => ({
|
||||
...dataItem,
|
||||
courseName: item.name,
|
||||
}));
|
||||
if(qrCodeItems.value.length==1){
|
||||
qrCode({
|
||||
title: "【签到】二维码",
|
||||
// courseName: state.name+'项目',
|
||||
name: qrCodeItems.value[0].name+'课程签到',
|
||||
createName:qrCodeItems.value[0].offteachers.map(teacher => teacher.teacherName).join(', ')||qrCodeItems.value[0].teacher,
|
||||
url: `${location.protocol}//${location.host}${process.env.VUE_APP_BASE_API}/admin/student/studentSign?taskId=${qrCodeItems.value[0].id}&taskType=${2}&type=${3}`,
|
||||
});
|
||||
}
|
||||
if(qrCodeItems.value.length==0){
|
||||
message.info("暂无签到二维码")
|
||||
}
|
||||
})
|
||||
}
|
||||
function handleMenuClick({key}) {
|
||||
const name = qrCodeItems.value[key].name;
|
||||
const teacher = qrCodeItems.value[key].teacher;
|
||||
const id = qrCodeItems.value[key].id;
|
||||
const offteachers = qrCodeItems.value[key].offteachers.map(teacher => teacher.teacherName).join(', ');
|
||||
qrCode({
|
||||
title: "【签到】二维码",
|
||||
// courseName: state.name+'项目',
|
||||
name: name+'课程签到',
|
||||
createName:offteachers||teacher,
|
||||
url: `${location.protocol}//${location.host}${process.env.VUE_APP_BASE_API}/admin/student/studentSign?taskId=${id}&taskType=${2}&type=${3}`,
|
||||
});
|
||||
}
|
||||
const qrCodeItemspg = ref([]);
|
||||
const visibleEwmpg = ref({});
|
||||
const qrcodeAssement = async (item)=>{
|
||||
if(qrCodeItemspg.value.length!=0){
|
||||
qrCodeItemspg.value = []
|
||||
}
|
||||
visibleEwmpg.value[item.id] = !visibleEwmpg.value[item.id];
|
||||
const planParams = {
|
||||
type: 2,
|
||||
offcourseId: item.courseId,
|
||||
taskId: item.id,
|
||||
};
|
||||
await courseData(planParams).then((res)=>{
|
||||
const qrCodeItemspgItem = res.data.data.map((dataItem) => ({
|
||||
...dataItem,
|
||||
courseName: item.name,
|
||||
}));
|
||||
qrCodeItemspg.value = qrCodeItemspgItem.filter(item => item.assessmentId !== null);
|
||||
if(qrCodeItemspg.value.length==1){
|
||||
qrCode({
|
||||
title: "【评估】二维码",
|
||||
// courseName: state.name+'项目',
|
||||
name: qrCodeItemspg.value[0].name+'课程评估',
|
||||
createName:qrCodeItemspg.value[0].offteachers.map(teacher => teacher.teacherName).join(', ')||qrCodeItemspg.value[0].teacher,
|
||||
url: `${location.protocol}//${location.host}/student-h5/investigatpage?id=${qrCodeItemspg.value[0].id}&type=3&infoId=${qrCodeItemspg.value[0].id}&courseId=${qrCodeItemspg.value[0].assessmentId}&chapterOrStageId=0`,
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
function handleMenuClickpg({key}) {
|
||||
const name = qrCodeItemspg.value[key].name;
|
||||
const offteachers = qrCodeItemspg.value[key].offteachers.map(teacher => teacher.teacherName).join(', ');
|
||||
const teacher = qrCodeItemspg.value[key].teacher;
|
||||
const id = qrCodeItemspg.value[key].id;
|
||||
const assessmentId = qrCodeItemspg.value[key].assessmentId;
|
||||
qrCode({
|
||||
title: "【评估】二维码",
|
||||
// courseName: state.name+'项目',
|
||||
name: name+'课程评估',
|
||||
createName:offteachers||teacher,
|
||||
url: `${location.protocol}//${location.host}/student-h5/investigatpage?id=${id}&type=3&infoId=${id}&courseId=${assessmentId}&chapterOrStageId=0`,
|
||||
});
|
||||
}
|
||||
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const stuRef = ref();
|
||||
@@ -2986,6 +3140,17 @@ export default {
|
||||
changeLevel,
|
||||
checkPer,
|
||||
showFaceStuSignUp,
|
||||
qrcodeVisible,
|
||||
qrcodeAssement,
|
||||
handleMenuClick,
|
||||
qrCodeItems,
|
||||
visibleEwm,
|
||||
qrCodeItemspg,
|
||||
visibleEwmpg,
|
||||
handleMenuClickpg,
|
||||
coursePlanRef,
|
||||
openCourse,
|
||||
exportScore,
|
||||
};
|
||||
},
|
||||
};
|
||||
@@ -4469,7 +4634,7 @@ export default {
|
||||
margin-right: 24px;
|
||||
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
padding: 25px 0px;
|
||||
margin-left: 22px;
|
||||
@@ -4538,7 +4703,7 @@ export default {
|
||||
//height: 71px;
|
||||
flex-grow: 1;
|
||||
margin-right: 50px;
|
||||
width: 100px;
|
||||
width: 134px;
|
||||
.timetext {
|
||||
font-size: 14px;
|
||||
color: #999ba3;
|
||||
@@ -4546,11 +4711,19 @@ export default {
|
||||
}
|
||||
|
||||
.progress {
|
||||
width: 168px;
|
||||
width: 70px;
|
||||
margin-left: 10px;
|
||||
margin-right: 50px;
|
||||
flex-grow: 1;
|
||||
|
||||
.img_daoc {
|
||||
cursor: pointer;
|
||||
width: 16px;
|
||||
height: 18px;
|
||||
background-image: url(@/assets/images/coursewareManage/export.png);
|
||||
background-size: 100% 100%;
|
||||
// background-color: #4ea6ff;
|
||||
margin-left: 7px;
|
||||
}
|
||||
.progresstext {
|
||||
color: #ffc067;
|
||||
font-size: 14px;
|
||||
@@ -4559,8 +4732,16 @@ export default {
|
||||
|
||||
.operations {
|
||||
display: flex;
|
||||
width: 240px;
|
||||
|
||||
width: 420px;
|
||||
flex-grow: 1;
|
||||
.operations_dropdown{
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
margin-left: auto;
|
||||
margin-right: 10px;
|
||||
// min-width: 90px;
|
||||
}
|
||||
//flex-grow: 1;
|
||||
.operation {
|
||||
color: #4ea6ff;
|
||||
|
||||
Reference in New Issue
Block a user