Merge branch 'dev_fjb' of https://gitee.com/qinzhenpen/digital-marketing
@ -0,0 +1,81 @@
|
||||
import request from '@/utils/request'
|
||||
//学习资源查看
|
||||
export function learningResourcesView(query) {
|
||||
return request({
|
||||
url: "/api/stu/concept/block/getBlockResources",
|
||||
method: "get",
|
||||
params:query
|
||||
});
|
||||
}
|
||||
//获取视频流
|
||||
export function getVideoStream(query) {
|
||||
return request({
|
||||
url: "/api/stu/concept/block/getResource",
|
||||
method: "get",
|
||||
params:query
|
||||
});
|
||||
}
|
||||
//资源学习分数统计
|
||||
export function resourcesLearningScoreStatistics(query) {
|
||||
return request({
|
||||
url: "/api/stu/concept/block/hashWatchScore",
|
||||
method: "post",
|
||||
data:query
|
||||
});
|
||||
}
|
||||
//学习资源查看
|
||||
export function checkLearningAssessment(query) {
|
||||
return request({
|
||||
url: "/api/stu/concept/block/getBlockResources",
|
||||
method: "get",
|
||||
params:query
|
||||
});
|
||||
}
|
||||
//学习测评计分
|
||||
export function scoreLearningAssessment(query) {
|
||||
return request({
|
||||
url: "/api/stu/digitalCredit/hashLearningAssessmentScore",
|
||||
method: "post",
|
||||
data:query
|
||||
});
|
||||
}
|
||||
//知识笔记上传
|
||||
export function uploadingKnowledgeNotes(query) {
|
||||
return request({
|
||||
url: "/api/stu/digitalCredit/addKnowledgeNotes",
|
||||
method: "post",
|
||||
data:query
|
||||
});
|
||||
}
|
||||
//知识笔记回显
|
||||
export function viewKnowledgeNotes(query) {
|
||||
return request({
|
||||
url: "/api/stu/digitalCredit/getKnowledgeNotes",
|
||||
method: "post",
|
||||
params:query
|
||||
});
|
||||
}
|
||||
//学习成绩查询
|
||||
export function academicRecordEnquiry(query) {
|
||||
return request({
|
||||
url: "/api/userBehavior/getAcademicRecord",
|
||||
method: "post",
|
||||
params:query
|
||||
});
|
||||
}
|
||||
//上传实训报告
|
||||
export function uploadTrainingReport(query) {
|
||||
return request({
|
||||
url: "/api/stu/concept/block/upload",
|
||||
method: "post",
|
||||
data:query
|
||||
});
|
||||
}
|
||||
//获取实训报告详情
|
||||
export function getDetailsTrainingReport(query) {
|
||||
return request({
|
||||
url: "/api/stu/concept/block/getReport",
|
||||
method: "get",
|
||||
params:query
|
||||
});
|
||||
}
|
||||
@ -0,0 +1 @@
|
||||
<svg t="1693990215046" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="9835" width="200" height="200"><path d="M0 0m292.571429 0l438.857142 0q292.571429 0 292.571429 292.571429l0 292.571428q0 292.571429-292.571429 292.571429l-438.857142 0q-292.571429 0-292.571429-292.571429l0-292.571428q0-292.571429 292.571429-292.571429Z" fill="#1296db" p-id="9836" data-spm-anchor-id="a313x.search_index.0.i1.4fb93a81PyrcFM" class=""></path><path d="M438.857143 585.142857m0 73.142857l0 292.571429q0 73.142857-73.142857 73.142857l0 0q-73.142857 0-73.142857-73.142857l0-292.571429q0-73.142857 73.142857-73.142857l0 0q73.142857 0 73.142857 73.142857Z" fill="#2c2c2c" p-id="9837" data-spm-anchor-id="a313x.search_index.0.i5.4fb93a81PyrcFM" class="selected"></path><path d="M877.714286 585.142857m0 73.142857l0 292.571429q0 73.142857-73.142857 73.142857l0 0q-73.142857 0-73.142858-73.142857l0-292.571429q0-73.142857 73.142858-73.142857l0 0q73.142857 0 73.142857 73.142857Z" fill="#2c2c2c" p-id="9838" data-spm-anchor-id="a313x.search_index.0.i3.4fb93a81PyrcFM" class="selected"></path><path d="M658.285714 438.857143m0 73.142857l0 438.857143q0 73.142857-73.142857 73.142857l0 0q-73.142857 0-73.142857-73.142857l0-438.857143q0-73.142857 73.142857-73.142857l0 0q73.142857 0 73.142857 73.142857Z" fill="#2c2c2c" p-id="9839" data-spm-anchor-id="a313x.search_index.0.i4.4fb93a81PyrcFM" class="selected"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
@ -0,0 +1 @@
|
||||
<svg t="1694052338470" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4058" width="200" height="200"><path d="M64 66.64m135.2 0l625.6 0q135.2 0 135.2 135.2l0 625.6q0 135.2-135.2 135.2l-625.6 0q-135.2 0-135.2-135.2l0-625.6q0-135.2 135.2-135.2Z" fill="#9E74FF" p-id="4059" data-spm-anchor-id="a313x.search_index.0.i1.45f43a81aJNwrV" class="selected"></path><path d="M437.84 698.24h128.4V495.2l-61.84 51.76-66.56-35.6z m158.64-227.28v227.28h128V472l-54.08-70.96zM280 698.24h128V493.84l-35.68-24L280 548.32z m441.68 23.52H279.12a17.2 17.2 0 0 0-17.44 16.8 17.84 17.84 0 0 0 17.44 17.52h443.04a17.44 17.44 0 0 0 17.52-17.52 18.32 18.32 0 0 0-18.16-16.8zM300.64 491.2l69.92-57.84L504 514l158-147.2c0.64-0.72 1.36-1.36 1.36-2l26.56 27.2 42.32-120-122.32 38.96 29.6 29.6c-0.72 0-0.72 0.72-1.36 0.72l-139.2 129.68L367.2 392l-88.72 72.96a17.04 17.04 0 0 0-2 24 16.48 16.48 0 0 0 24.16 2.24z" fill="#FFFFFF" p-id="4060"></path></svg>
|
||||
|
After Width: | Height: | Size: 967 B |
|
After Width: | Height: | Size: 89 KiB |
|
After Width: | Height: | Size: 54 KiB |
|
After Width: | Height: | Size: 80 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 872 B |
|
After Width: | Height: | Size: 807 B |
|
After Width: | Height: | Size: 588 B |
|
After Width: | Height: | Size: 856 B |
|
After Width: | Height: | Size: 754 B |
|
After Width: | Height: | Size: 686 B |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
@ -0,0 +1,575 @@
|
||||
<template>
|
||||
<el-scrollbar height="760px" always>
|
||||
<div class="app-container">
|
||||
<div class="tl_top">
|
||||
<div class="eval_top">
|
||||
<p>
|
||||
<img
|
||||
src="@/assets/icons/svg/color.svg"
|
||||
style="width: 15px"
|
||||
/>选择题 (共{{ mlistLength }}题), 合计100分
|
||||
</p>
|
||||
<el-button
|
||||
style="margin-top: 10px;margin-left: 1212px;"
|
||||
type="primary"
|
||||
plain
|
||||
@click="answerAgain"
|
||||
>重新作答</el-button
|
||||
>
|
||||
<el-button
|
||||
style="margin-top: 10px"
|
||||
type="primary"
|
||||
plain
|
||||
@click="taskAnswer"
|
||||
>提交</el-button
|
||||
>
|
||||
</div>
|
||||
<hr />
|
||||
</div>
|
||||
<div
|
||||
class="eval_main"
|
||||
v-for="(item, index) in mlist"
|
||||
:key="index"
|
||||
:class="['eval_main' + index]"
|
||||
>
|
||||
<div class="eval_main_title">
|
||||
<div class="eval_main_left">
|
||||
<span>{{ index + 1 }}</span>
|
||||
</div>
|
||||
<div class="eval_main_right">
|
||||
{{ item.topicName }} <span>({{ item.topicType }})</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="eval_main_content">
|
||||
<div class="eval_main_single">
|
||||
<hr />
|
||||
<el-radio-group
|
||||
v-if="item.topicType === '单选题'"
|
||||
v-model="item.studentAnswer"
|
||||
@change="changeMultipleChoiceQuestions"
|
||||
>
|
||||
<el-radio
|
||||
:class="getSingleChoiceStyle(item.rightOrWrong, item.answer, 'A',item.studentAnswer)" v-if="item.optionA !== null" label="A" border >A.{{ item.optionA}}<span class="stylingCorrectly" v-if="item.answer!=='A'&&item.studentAnswer==='A'&&item.rightOrWrong!==''&&item.rightOrWrong!==null">正确答案:{{item.answer}}</span>
|
||||
</el-radio
|
||||
>
|
||||
<el-radio
|
||||
:class=" getSingleChoiceStyle(item.rightOrWrong, item.answer, 'B',item.studentAnswer) "
|
||||
v-if="item.optionB !== null"
|
||||
label="B"
|
||||
border
|
||||
>B.{{ item.optionB }}<span class="stylingCorrectly" v-if="item.answer!=='B'&&item.studentAnswer==='B'&&item.rightOrWrong!==''&&item.rightOrWrong!==null">正确答案:{{item.answer}}</span>
|
||||
</el-radio
|
||||
>
|
||||
<el-radio
|
||||
:class="
|
||||
getSingleChoiceStyle(item.rightOrWrong, item.answer, 'C',item.studentAnswer)
|
||||
"
|
||||
v-if="item.optionC !== null"
|
||||
label="C"
|
||||
border
|
||||
>C.{{ item.optionC }}<span class="stylingCorrectly" v-if="item.answer!=='C'&&item.studentAnswer==='C'&&item.rightOrWrong!==''&&item.rightOrWrong!==null">正确答案:{{item.answer}}</span>
|
||||
</el-radio
|
||||
>
|
||||
<el-radio
|
||||
:class="
|
||||
getSingleChoiceStyle(item.rightOrWrong, item.answer, 'D',item.studentAnswer)
|
||||
"
|
||||
v-if="item.optionD !== null"
|
||||
label="D"
|
||||
border
|
||||
>D.{{ item.optionD }}<span class="stylingCorrectly" v-if="item.answer!=='D'&&item.studentAnswer==='D'&&item.rightOrWrong!==''&&item.rightOrWrong!==null">正确答案:{{item.answer}}</span></el-radio
|
||||
>
|
||||
<el-radio
|
||||
:class="
|
||||
getSingleChoiceStyle(item.rightOrWrong, item.answer, 'E',item.studentAnswer)
|
||||
"
|
||||
v-if="item.optionE !== null"
|
||||
label="E"
|
||||
border
|
||||
>E.{{ item.optionE }}<span class="stylingCorrectly" v-if="item.answer!=='E'&&item.studentAnswer==='E'&&item.rightOrWrong!==''&&item.rightOrWrong!==null">正确答案:{{item.answer}}</span></el-radio
|
||||
>
|
||||
</el-radio-group>
|
||||
<div class="eval_main_checkbox">
|
||||
|
||||
<el-checkbox-group
|
||||
v-if="item.topicType === '多选题'"
|
||||
v-model="item.studentAnswer"
|
||||
>
|
||||
<el-checkbox
|
||||
v-if="item.optionA !== null"
|
||||
v-model="item.state"
|
||||
:label="item.optionA"
|
||||
border
|
||||
:class="showIcon(item, 'A')"
|
||||
>
|
||||
A.{{ item.optionA
|
||||
}}<span class="stylingCorrectly2" v-if="ifShow(item,item.optionA)">正确答案:{{item.answer}}</span></el-checkbox
|
||||
>
|
||||
<el-checkbox
|
||||
v-if="item.optionB !== null"
|
||||
v-model="item.state"
|
||||
:label="item.optionB"
|
||||
border
|
||||
:class="showIcon(item, 'B')"
|
||||
>B.{{ item.optionB
|
||||
}}<span class="stylingCorrectly2" v-if="ifShow(item,item.optionB)">正确答案:{{item.answer}}</span></el-checkbox
|
||||
>
|
||||
<el-checkbox
|
||||
v-if="item.optionC !== null"
|
||||
v-model="item.state"
|
||||
:label="item.optionC"
|
||||
border
|
||||
:class="showIcon(item, 'C')"
|
||||
>C.{{ item.optionC
|
||||
}}<span class="stylingCorrectly2" v-if="ifShow(item,item.optionC)">正确答案:{{item.answer}}</span></el-checkbox
|
||||
>
|
||||
<el-checkbox
|
||||
v-if="item.optionD !== null"
|
||||
v-model="item.state"
|
||||
:label="item.optionD"
|
||||
border
|
||||
:class="showIcon(item, 'D')"
|
||||
>D.{{ item.optionD
|
||||
}}<span class="stylingCorrectly2" v-if="ifShow(item,item.optionD)">正确答案:{{item.answer}}</span></el-checkbox
|
||||
>
|
||||
<el-checkbox
|
||||
v-if="item.optionE !== null"
|
||||
v-model="item.state"
|
||||
:label="item.optionE"
|
||||
border
|
||||
:class="showIcon(item, 'E')"
|
||||
>E.{{ item.optionE
|
||||
}}<span class="stylingCorrectly2" v-if="ifShow(item,item.optionE)">正确答案:{{item.answer}}</span></el-checkbox
|
||||
>
|
||||
</el-checkbox-group>
|
||||
</div>
|
||||
<el-radio-group
|
||||
v-if="item.topicType === '判断题'"
|
||||
v-model="item.studentAnswer"
|
||||
>
|
||||
<el-radio label="A" border :class=" getSingleChoiceStyle(item.rightOrWrong, item.answer, 'A',item.studentAnswer)">正确</el-radio>
|
||||
<el-radio label="B" border :class=" getSingleChoiceStyle(item.rightOrWrong, item.answer, 'B',item.studentAnswer)">错误</el-radio>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
</template>
|
||||
<script setup>
|
||||
// import { useRouter } from "vue-router";
|
||||
// import {Base64} from 'js-base64'
|
||||
import * as API from "@/api/prtrait/prtrait.js"
|
||||
// import { getUserId } from "@/utils/auth";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { onMounted } from "vue";
|
||||
const data = ref({
|
||||
module: "",
|
||||
ascription:"",
|
||||
userId: '487',
|
||||
});
|
||||
const multipleChoiceAnswer = ref();
|
||||
// const router = useRouter();
|
||||
const mlist = ref({});
|
||||
const mlistLength = ref(0);
|
||||
const correctNot1 = ref(false);
|
||||
const correctNot2 = ref(false);
|
||||
const getSingleChoiceStyle = (item, answer, answer2,studentAnswer) => {
|
||||
// console.log(item, answer, answer2);
|
||||
// if (item === "正确" && answer === answer2) {
|
||||
if(item===''||item===null){
|
||||
return
|
||||
}
|
||||
if ( answer === answer2) {
|
||||
correctNot1.value = true;
|
||||
return "correctStyleSingleChoiceQuestions";
|
||||
}
|
||||
if (answer !== answer2) {
|
||||
correctNot2.value = true;
|
||||
return "singleChoiceErrorStyle";
|
||||
}
|
||||
return;
|
||||
};
|
||||
const showIcon = (item, answer) => {
|
||||
if(item.rightOrWrong===''||item.rightOrWrong===null){
|
||||
return
|
||||
}
|
||||
if(item.answer!==null){
|
||||
const isFlag=ref(false)
|
||||
item.answer.split(',').map((item2)=>{
|
||||
if(item2===answer){
|
||||
isFlag.value=true
|
||||
}
|
||||
return item2
|
||||
})
|
||||
if(isFlag.value){
|
||||
return "Correct";
|
||||
}else{
|
||||
return "error"
|
||||
}
|
||||
}
|
||||
};
|
||||
// 单选题ico函数
|
||||
|
||||
//哈希函数学习测评
|
||||
const answerData=ref([])
|
||||
onMounted(()=>{
|
||||
data.value.module='数字营销'
|
||||
submitDialogVisible1()
|
||||
})
|
||||
const submitDialogVisible1 = () => {
|
||||
const newArray = [];
|
||||
API.checkLearningAssessment(data.value).then((res)=>{
|
||||
mlist.value = res.data;
|
||||
mlist.value.forEach((item) => {
|
||||
answerData.value.push(item.studentAnswer)
|
||||
if (item.topicType === "多选题"&&item.rightOrWrong===null) {
|
||||
item.studentAnswer = [];
|
||||
}
|
||||
if(item.topicType === "多选题"&&item.rightOrWrong!==null){
|
||||
item.studentAnswer = item.studentAnswer.split(',').map((item2) => {
|
||||
if (item2 === "A") {
|
||||
return item.optionA;
|
||||
}
|
||||
if (item2 === "B") {
|
||||
return item.optionB;
|
||||
}
|
||||
if (item2 === "C") {
|
||||
return item.optionC;
|
||||
}
|
||||
if (item2 === "D") {
|
||||
return item.optionD;
|
||||
}
|
||||
if (item2 === "E") {
|
||||
return item.optionE;
|
||||
}
|
||||
return item2;
|
||||
});
|
||||
}
|
||||
});
|
||||
mlistLength.value = res.data.length;
|
||||
|
||||
})
|
||||
|
||||
};
|
||||
const answer = ref([]);
|
||||
// const checkboxGroup = ref([]);
|
||||
|
||||
const ifShow=(item,item2)=>{
|
||||
if(item.rightOrWrong===''||item.rightOrWrong===null){
|
||||
return false
|
||||
}
|
||||
const flag2=ref(false)
|
||||
const item4=item.answer.split(',')
|
||||
const arr=ref([])
|
||||
item4.forEach(item5=>{
|
||||
if(item5==='A'){
|
||||
arr.value.push(item.optionA)
|
||||
}
|
||||
if(item5==='B'){
|
||||
arr.value.push(item.optionB)
|
||||
}
|
||||
if(item5==='C'){
|
||||
arr.value.push(item.optionC)
|
||||
}if(item5==='D'){
|
||||
arr.value.push(item.optionD)
|
||||
}
|
||||
if(item5==='E'){
|
||||
arr.value.push(item.optionE)
|
||||
}
|
||||
})
|
||||
item.studentAnswer.forEach(item3=>{
|
||||
if(item3===item2){
|
||||
flag2.value=true
|
||||
}
|
||||
})
|
||||
// if(JSON.stringify(item.studentAnswer) === JSON.stringify(arr.value)){
|
||||
if(arraysAreEqual(JSON.stringify(item.studentAnswer),JSON.stringify(arr.value))){
|
||||
flag2.value=false
|
||||
}
|
||||
|
||||
return flag2.value
|
||||
}
|
||||
function arraysAreEqual(arr1, arr2) {
|
||||
const set1 = new Set(arr1);
|
||||
const set2 = new Set(arr2);
|
||||
return Array.from(set1).every(value => set2.has(value)) && Array.from(set2).every(value => set1.has(value));
|
||||
}
|
||||
//哈希函数提交
|
||||
const isTask=ref(false)
|
||||
let number=0
|
||||
const TaskAssessment1 = async (TaskData) => {
|
||||
TaskData.stuLearningAssessmentScoreDTO.stuLearningAssessmentDTOS.forEach(item => {
|
||||
if(item.studentAnswer[0]===null||item.studentAnswer.length===0){
|
||||
isTask.value=true
|
||||
}
|
||||
});
|
||||
if(isTask.value&&number===0){
|
||||
ElMessage({
|
||||
message: "还有题目未完成",
|
||||
type: "warning",
|
||||
})
|
||||
isTask.value=false
|
||||
number++
|
||||
return
|
||||
}
|
||||
try {
|
||||
const res = await API.scoreLearningAssessment(TaskData);
|
||||
ElMessage({
|
||||
message: "提交成功",
|
||||
type: "success",
|
||||
});
|
||||
setTimeout(()=>{
|
||||
submitDialogVisible1()
|
||||
},500)
|
||||
} catch (error) {
|
||||
// ElMessage({
|
||||
// message: "请勿重复提交",
|
||||
// type: "warning",
|
||||
// });
|
||||
}
|
||||
};
|
||||
const answerAgain=()=>{
|
||||
mlist.value.forEach(item=>{
|
||||
// item.answer=''
|
||||
if(item.topicType==='多选题'){
|
||||
item.studentAnswer=[]
|
||||
}else{
|
||||
item.studentAnswer=''
|
||||
}
|
||||
item.rightOrWrong=''
|
||||
})
|
||||
}
|
||||
const taskAnswer = () => {
|
||||
mlist.value.forEach((item) => {
|
||||
if (item.studentAnswer === "" || item.studentAnswer === null) {
|
||||
return;
|
||||
}
|
||||
});
|
||||
const mlistArray = Object.values(mlist.value);
|
||||
const transformedData = {
|
||||
stuLearningAssessmentScoreDTO: {
|
||||
userId: '487',
|
||||
learningProjects: "学习测评",
|
||||
assessmentItems: "客观题测试",
|
||||
stuLearningAssessmentDTOS: mlistArray.map((item) => {
|
||||
return {
|
||||
topicId: item.topicId,
|
||||
topicName: item.topicName,
|
||||
topicType: item.topicType,
|
||||
topicDifficultyLevel: item.topicDifficultyLevel,
|
||||
topicScore: item.topicScore,
|
||||
topicNumber: item.topicNumber,
|
||||
optionA: item.optionA,
|
||||
optionB: item.optionB,
|
||||
optionC: item.optionC,
|
||||
optionD: item.optionD,
|
||||
optionE: item.optionE,
|
||||
optionF: item.optionF,
|
||||
answer: item.answer,
|
||||
studentAnswer: item.studentAnswer,
|
||||
questionAnswer: item.questionAnswer,
|
||||
module: item.module,
|
||||
logic: item.logic,
|
||||
};
|
||||
}),
|
||||
},
|
||||
};
|
||||
transformedData.stuLearningAssessmentScoreDTO.stuLearningAssessmentDTOS.forEach(
|
||||
(item) => {
|
||||
// console.log(item,"89465845");
|
||||
if (item.topicType === "多选题") {
|
||||
const newArray = [];
|
||||
item.studentAnswer.forEach((item2) => {
|
||||
if (item2 === item.optionA) {
|
||||
newArray.push("A");
|
||||
}
|
||||
if (item2 === item.optionB) {
|
||||
newArray.push("B");
|
||||
}
|
||||
if (item2 === item.optionC) {
|
||||
newArray.push("C");
|
||||
}
|
||||
if (item2 === item.optionD) {
|
||||
newArray.push("D");
|
||||
}
|
||||
if (item2 === item.optionE) {
|
||||
newArray.push("E");
|
||||
}
|
||||
});
|
||||
item.studentAnswer = newArray;
|
||||
// item.studentAnswer.push(newArray)
|
||||
}
|
||||
if (item.topicType === "多选题") {
|
||||
item.studentAnswer.sort(function (s1, s2) {
|
||||
let x1 = s1.toUpperCase();
|
||||
let x2 = s2.toUpperCase();
|
||||
if (x1 < x2) {
|
||||
return -1;
|
||||
}
|
||||
if (x1 > x2) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
});
|
||||
}
|
||||
if (item.topicType !== "多选题") {
|
||||
let flag = item.studentAnswer;
|
||||
item.studentAnswer = [];
|
||||
item.studentAnswer.push(flag);
|
||||
}
|
||||
}
|
||||
);
|
||||
TaskAssessment1(transformedData);
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.app-container {
|
||||
background-color: #fff;
|
||||
border-radius: 6px;
|
||||
}
|
||||
.tl_top {
|
||||
position: fixed;
|
||||
width: 82%;
|
||||
height: 45px;
|
||||
z-index: 999;
|
||||
top: 158px;
|
||||
right: 50px;
|
||||
background-color: white;
|
||||
}
|
||||
.eval_top {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
// position: fixed;
|
||||
// z-index: 999;
|
||||
p {
|
||||
width: 210px;
|
||||
height: 14px;
|
||||
font-size: 14px;
|
||||
font-family: Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
.eval_main {
|
||||
margin-top: 25px;
|
||||
.eval_main_title {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
font-weight: bold;
|
||||
font-size: 14px;
|
||||
align-items: center;
|
||||
.eval_main_right {
|
||||
margin-left: 23px;
|
||||
span {
|
||||
font-size: 14px;
|
||||
color: #00b4f2;
|
||||
}
|
||||
// &::before{
|
||||
// content: ' ';
|
||||
// margin-right:80PX;
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
.eval_main_single {
|
||||
margin: 20px 0 10px 91px;
|
||||
.el-radio-group {
|
||||
width: 985px;
|
||||
}
|
||||
.el-radio {
|
||||
margin-bottom: 5px;
|
||||
width: 801px;
|
||||
top: 5px;
|
||||
}
|
||||
.el-checkbox {
|
||||
margin-bottom: 5px;
|
||||
width: 801px;
|
||||
top: 5px;
|
||||
}
|
||||
.el-checkbox-group {
|
||||
font-size: 0;
|
||||
line-height: 0;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
width: 985px;
|
||||
}
|
||||
}
|
||||
.eval_main_left {
|
||||
position: relative;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
background-color: #00b4f2;
|
||||
color: white;
|
||||
border-radius: 50%;
|
||||
font-size: 13px;
|
||||
font-size: 15px;
|
||||
font-weight: 100;
|
||||
margin-left: 35px;
|
||||
}
|
||||
hr {
|
||||
border: 1px solid #e5e5e5;
|
||||
}
|
||||
.eval_main0 {
|
||||
margin-top: 122px !important;
|
||||
}
|
||||
.correctStyleSingleChoiceQuestions.el-radio.is-bordered.is-checked {
|
||||
border-color: #00bb00 !important;
|
||||
position: relative;
|
||||
&::after{
|
||||
content: '√';
|
||||
position: absolute;
|
||||
// margin-left: 94%;
|
||||
left: 805px;
|
||||
color: #00bb00;
|
||||
}
|
||||
}
|
||||
.singleChoiceErrorStyle.el-radio.is-bordered.is-checked {
|
||||
border-color: red !important;
|
||||
// 尾部插入
|
||||
position: relative;
|
||||
&::after{
|
||||
content: 'X';
|
||||
position: absolute;
|
||||
// margin-left: 93%;
|
||||
left: 805px;
|
||||
color: red;
|
||||
}
|
||||
}
|
||||
.error.el-checkbox.is-bordered.is-checked {
|
||||
position: relative;
|
||||
border-color: red !important;
|
||||
&::after{
|
||||
content: 'X';
|
||||
// margin-left: 96% !important;
|
||||
position: absolute;
|
||||
left: 805px;
|
||||
color: red;
|
||||
}
|
||||
}
|
||||
.Correct.el-checkbox.is-bordered.is-checked {
|
||||
position: relative;
|
||||
// right: -2%;
|
||||
border-color: #00bb00 !important;
|
||||
&::after{
|
||||
content: '√';
|
||||
// margin-left: 93%;
|
||||
position: absolute;
|
||||
color: #00bb00;
|
||||
left: 805px;
|
||||
}
|
||||
}
|
||||
.stylingCorrectly{
|
||||
position: absolute;
|
||||
right: -101px;
|
||||
}
|
||||
.stylingCorrectly2{
|
||||
position: absolute;
|
||||
left: 828px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -0,0 +1,183 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-scrollbar height="780px" always>
|
||||
<!-- <div class="app-container"> -->
|
||||
<!-- <div class="main"> -->
|
||||
<el-row :gutter="40">
|
||||
<el-col :span="3" v-for="i in item" :key="i">
|
||||
<div class="zs">
|
||||
<div class="el_top">
|
||||
<a target="_blank" @click="showResource(i.resourcesUrl)">
|
||||
<span style="color:#FFFFFF">{{i.resourcesName}}</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="el_bon">
|
||||
<!-- <a :href="getImgLink(i.resourcesUrl)" target="_blank"> -->
|
||||
<a target="_blank" @click="showResource(i.resourcesUrl)">
|
||||
<img :src="getImg(i.resourcesImg)"/>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- </div> -->
|
||||
<!-- </div> -->
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
<script setup>
|
||||
import * as API from "@/api/prtrait/prtrait.js"
|
||||
import { getAssetsFile } from '@/utils';
|
||||
// import { getUserId } from '@/utils/auth'
|
||||
import { onMounted } from "vue";
|
||||
const getImg=(i)=>{
|
||||
return getAssetsFile('images/'+i)
|
||||
}
|
||||
const getImgLink=(i)=>{
|
||||
return i
|
||||
}
|
||||
const data=ref({
|
||||
"stuScoreDetailsDTO":{
|
||||
"learningProjects":"资源学习",
|
||||
"assessmentItems":"观看资源",
|
||||
"viewingTime":0,
|
||||
"userId":'487',
|
||||
}
|
||||
})
|
||||
const item=ref({})
|
||||
|
||||
onMounted(()=>{
|
||||
API.learningResourcesView({module:data.value.stuScoreDetailsDTO.module}).then((res)=>{
|
||||
item.value=res.data
|
||||
})
|
||||
})
|
||||
|
||||
const showResource=async(i)=>{
|
||||
console.log(i);
|
||||
// const newWindow=window.open(`http://192.168.2.4:8800/api/stu/concept/block/getResource?`+`module=${data2.module}`+`&name=${i}`)
|
||||
// window.open(`http://qkljr.sztzjy.com:90/api/stu/concept/block/getResource?`+`module=${data2.module}`+`&name=${i}`)
|
||||
if(i.includes('mp4')){
|
||||
const newWindow=window.open('','_blank')
|
||||
newWindow.document.write(`
|
||||
<html>
|
||||
<head>
|
||||
<title>视频播放</title>
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100vh;
|
||||
background-color: #333333;
|
||||
}
|
||||
video {
|
||||
width: 90%;
|
||||
// max-width: 800px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<video controls autoplay controlsList="nodownload">
|
||||
<source src="http://118.31.7.2:96/report${i}" type="video/mp4">
|
||||
</video>
|
||||
</body>
|
||||
</html>
|
||||
`);
|
||||
}
|
||||
if(i.includes('pdf')){
|
||||
// window.open(`http://qkljr.sztzjy.com:90/api/stu/concept/block/getResource?`+`module=${data2.module}`+`&name=${i}#toolbar=0`)
|
||||
window.open(`http://118.31.7.2:96/report${i}#toolbar=0`)
|
||||
// window.open(`http://202.199.90.115:8800/api/stu/concept/block/getResource?`+`module=${data2.module}`+`&name=${i}`)
|
||||
}
|
||||
|
||||
}
|
||||
const timer=ref(null)
|
||||
let seconds=0
|
||||
onMounted(()=>{
|
||||
timer.value=setInterval(()=>{
|
||||
seconds++
|
||||
},1000)
|
||||
})
|
||||
onBeforeUnmount(()=>{
|
||||
item.value={}
|
||||
if(timer.value){
|
||||
clearInterval(timer.value)
|
||||
}
|
||||
data.value.stuScoreDetailsDTO.viewingTime=seconds
|
||||
API.resourcesLearningScoreStatistics(data.value)
|
||||
})
|
||||
|
||||
|
||||
const taskTime=async()=>{
|
||||
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.app-container {
|
||||
// background-color: #fff;
|
||||
// border-radius: 6px;
|
||||
// padding: 25px 25px 25px 0;
|
||||
.k_main {
|
||||
width: 98%;
|
||||
display: inline-block;
|
||||
margin: 20px;
|
||||
box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.3);
|
||||
height: 750px;
|
||||
background-color: white;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.el-col-4 {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
.zs {
|
||||
margin-bottom: 36px;
|
||||
border: 1px solid #dcdfe6;
|
||||
border-radius: 8px;
|
||||
}
|
||||
.main {
|
||||
}
|
||||
.el_top {
|
||||
height: 66px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 12px;
|
||||
font-family: Source Han Sans CN;
|
||||
font-weight: 550;
|
||||
color: #333333;
|
||||
padding: 7px;
|
||||
text-align: center;
|
||||
}
|
||||
.el_bon {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
background-color: whitesmoke;
|
||||
padding: 10px 27px 10px 27px;
|
||||
img {
|
||||
width: 151px;
|
||||
height: 180px;
|
||||
}
|
||||
}
|
||||
.el-row {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.el-row:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.el-col {
|
||||
border-radius: 4px;
|
||||
font-size: 14px;
|
||||
font-family: Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.grid-content {
|
||||
border-radius: 4px;
|
||||
min-height: 36px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||