fix:修改参数传递

This commit is contained in:
wuyx
2022-12-26 12:01:36 +08:00
parent 0d1c39460c
commit 919a6724a0
5 changed files with 214 additions and 227 deletions

View File

@@ -25,8 +25,8 @@
<img style="width: 15px; height: 17px" src="../../assets/image/time.png" />
<div style="margin-left: 8px">
{{ dayjs(data.planDto?.beginTime).format('YYYY-MM-DD HH:MM') + " 至 " +
dayjs(data.planDto?.endTime).format('YYYY-MM-DD HH:MM')
}}
dayjs(data.planDto?.endTime).format('YYYY-MM-DD HH:MM')
}}
</div>
</div>
<div v-if="data.planDto?.address" class="time" style="margin-top: 23px">
@@ -35,17 +35,17 @@
</div>
</div>
<div style="display: flex">
<botton class="btn" style="margin-right: 20px" :style="{
background: data.signFlag ? '#999' : 'rgb(57, 146, 249)',
}" @click="signClick">{{ data.signFlag ? "已签到" : "签到" }}
<botton class="btn" style="margin-right: 20px" :style="{
background: data.signFlag ? '#999' : 'rgb(57, 146, 249)',
}" @click="signClick">{{ data.signFlag ? "已签到" : "签到" }}
</botton>
<botton style="background: #999" class="btn" @click="toSurvery" v-if="data.planDto?.evalFlag == 0">
评估
</botton>
<botton :style="{
background: `${new Date(data.planDto?.beginTime).getTime() > new Date().getTime() ? '#999' : data.isSurvery ? '#999' : 'rgb(57, 146, 249)'}`,
}" class="btn" @click="toSurvery" v-else>{{ data.isSurvery ? "已评估" : "评估" }}
background: `${new Date(data.planDto?.beginTime).getTime() > new Date().getTime() ? '#999' : data.isSurvery ? '#999' : 'rgb(57, 146, 249)'}`,
}" class="btn" @click="toSurvery" v-else>{{ data.isSurvery ? "已评估" : "评估" }}
</botton>
</div>
</div>
@@ -79,10 +79,10 @@
:style="{ borderBottom: '1px solid rgba(56, 125, 247, 0.2)' }">
<div class="enclosureL">
<FileTypeImg :v-model="el.slice(el.indexOf('-') + 1)" :style="{
width: '22px',
height: '26px',
marginLeft: '10px',
}"></FileTypeImg>
width: '22px',
height: '26px',
marginLeft: '10px',
}"></FileTypeImg>
<div style="margin-left: 20px">{{ el.slice(el.indexOf('-') + 1) }}</div>
</div>
<div v-if="new Date(data.planDto.beginTime).getTime() > new Date().getTime()" class="download">
@@ -111,10 +111,10 @@
</div>
</div>
<div
:style="{ background: new Date(data.planDto?.beginTime).getTime() > new Date().getTime() ? '#999' : '' }"
class="submit" @click="toWork" >
class="submit" @click="toWork">
交作业
</div>
</div>
@@ -137,8 +137,8 @@
<div class="tag3" style="margin-left: 11px">考试</div>
</div>
</div>
<div
<div
:style="{ background: new Date(data.planDto?.beginTime).getTime() > new Date().getTime() ? '#999' : '' }"
class="submit" @click="toExamItem(data.examinationDto)">
去考试
@@ -349,8 +349,7 @@ function toWork() {
query: {
courseId: data.value.workDto.workId,
id: taskId,
taskId: taskId,
taskIds: taskId,
infoId: taskId,
chapterOrStageId: 0,
type,
pName: "面授课",
@@ -365,7 +364,7 @@ function toExamItem(obj) {
let date2 = new Date().getTime()
if (date1 > date2) {
ElMessage.warning("未到开始时间,请耐心等待!");
}
}
console.log("obj", obj.examinationTestId);

View File

@@ -47,21 +47,23 @@
</div>
<div class="threeBtn">
<botton class="btn" :style="{
background: `${new Date(data.liveStartTime).getTime() > new Date().getTime() ? '#999' : 'rgb(59, 191, 252)'}`,
}" @click="showClick">观看
background: `${new Date(data.liveStartTime).getTime() > new Date().getTime() ? '#999' : 'rgb(59, 191, 252)'}`,
}" @click="showClick">观看
</botton>
<botton class="btn" :style="{
background: `${new Date(data.liveStartTime).getTime() > new Date().getTime() ? '#999' : data.signFlag ? '#999' : 'rgb(57, 146, 249)'}`,
}" @click="signClick">{{ data.signFlag ? "已签到" : "签到" }}
<botton class="btn" :style="{
background: `${new Date(data.liveStartTime).getTime() > new Date().getTime() ? '#999' : data.signFlag ? '#999' : 'rgb(57, 146, 249)'}`,
}" @click="signClick">{{ data.signFlag ? "已签到" : "签到" }}
</botton>
<botton style="background: #999" class="btn" @click="commitClick" v-if="data.isEvaluate == 0 ">
<botton style="background: #999" class="btn" @click="commitClick" v-if="data.isEvaluate == 0">
评估
</botton>
<botton :style="{
background: `${new Date(data.liveStartTime).getTime() > new Date().getTime() ? '#999' : data.isSurvery ? '#999' : 'rgb(57, 146, 249)'}`,
}" class="btn" @click="commitClick" v-if="data.isEvaluate && data.isEvaluate == 1">{{ data.isSurvery ? "已评估": "评估"}}
background: `${new Date(data.liveStartTime).getTime() > new Date().getTime() ? '#999' : data.isSurvery ? '#999' : 'rgb(57, 146, 249)'}`,
}" class="btn" @click="commitClick" v-if="data.isEvaluate && data.isEvaluate == 1">{{ data.isSurvery ? "已评估" :
"评估"
}}
</botton>
</div>
</div>
@@ -138,7 +140,7 @@
</template>
<script setup>
import { computed, reactive, toRefs,onUnmounted } from "vue";
import { computed, reactive, toRefs, onUnmounted } from "vue";
import img from "@/assets/image/uploadimg.png";
import { request, useRequest } from "@/api/request";
import { TASK_BROADCAST_DETAIL, TASK_BROADCAST_SIGN } from "@/api/api";
@@ -264,8 +266,7 @@ const commitClick = () => {
path: "/surveydetail",
query: {
courseId: data.value.assessmentId,
taskId: data.value.liveId,
taskIds: data.value.liveId,
infoId: data.value.liveId,
chapterOrStageId: 0,
pName: "直播",
sName: data.value.liveName,

View File

@@ -1,12 +1,13 @@
<template>
<div style=" background: #0078fc;height: 150px;width: 100%;position: absolute;top: 0;z-index:-9999;"></div>
<div class="pathdetails" style="padding: 30px">
<div class="pdname">
{{ data.name }}
<el-popover v-if="data.remark" ref="popover" popper-class="jianjie" placement="right" trigger="hover" :width="300" :content="data.remark">
<template #reference><span style="font-size: 16px;font-weight: 600;">简介></span></template>
</el-popover>
<el-popover v-if="data.remark" ref="popover" popper-class="jianjie" placement="right" trigger="hover" :width="300"
:content="data.remark">
<template #reference><span style="font-size: 16px;font-weight: 600;">简介></span></template>
</el-popover>
</div>
<!-- 详细信息 -->
@@ -29,13 +30,13 @@
</div>
<div v-if="i.stageId == '0' && i.taskProcessList.length == 0"></div>
<div v-else class="course" v-for="(value, index) in i.taskProcessList.filter(
(e) => !whiteTypes(e.type)
)" :key="index">
(e) => !whiteTypes(e.type)
)" :key="index">
<div style="width: 70%">
<div v-if="value.name.length > 50" class="coursename" :title="value.name">
<el-popover ref="popover" placement="right" trigger="hover" :width="300" :content="value.name">
<template #reference></template>
</el-popover>
<el-popover ref="popover" placement="right" trigger="hover" :width="300" :content="value.name">
<template #reference></template>
</el-popover>
</div>
<div v-else class="coursename" :title="value.name">{{ value.name }}</div>
@@ -63,15 +64,15 @@
<div class="progress">
<div style="width: 291px">
<el-progress :percentage="value.currentRatio" :show-text="false" :stroke-width="8" :color="
{
0: 'rgba(238, 112, 108, 1)',
1: 'rgba(255, 151, 38, 1)',
2: 'rgba(39, 122, 255, 1)',
3: 'rgba(59, 94, 251, 1)',
4: 'rgba(57, 219, 183, 1)',
5: 'rgba(57, 219, 183, 1)',
}[parseInt(value.currentRatio / 20)]
" />
{
0: 'rgba(238, 112, 108, 1)',
1: 'rgba(255, 151, 38, 1)',
2: 'rgba(39, 122, 255, 1)',
3: 'rgba(59, 94, 251, 1)',
4: 'rgba(57, 219, 183, 1)',
5: 'rgba(57, 219, 183, 1)',
}[parseInt(value.currentRatio / 20)]
" />
</div>
<div style="font-size: 14px;font-weight: 500;color: #277aff;margin-left: 10px;color:#677d86;">
{{ value.currentRatio }}%
@@ -81,12 +82,12 @@
</div>
<div class="goclass" @click="toFinish(value, i.stageName, i.stageId)">
{{
value.status === 100
? "已完成"
: types.path[value.type]
? types.toName[value.type]
: "未开放"
}}
value.status === 100
? "已完成"
: types.path[value.type]
? types.toName[value.type]
: "未开放"
}}
</div>
<!-- <div :style="{ display: value.status === 1 ? 'block' : 'none' }">-->
<!-- <div-->
@@ -185,15 +186,15 @@
<div style="width: 291px">
<el-progress :percentage="parseInt(data.totalProgress * 100)" :show-text="false" :stroke-width="8"
:color="
{
0: 'rgba(238, 112, 108, 1)',
1: 'rgba(255, 151, 38, 1)',
2: 'rgba(39, 122, 255, 1)',
3: 'rgba(59, 94, 251, 1)',
4: 'rgba(57, 219, 183, 1)',
5: 'rgba(57, 219, 183, 1)',
}[parseInt((data.totalProgress * 100) / 20)]
" />
{
0: 'rgba(238, 112, 108, 1)',
1: 'rgba(255, 151, 38, 1)',
2: 'rgba(39, 122, 255, 1)',
3: 'rgba(59, 94, 251, 1)',
4: 'rgba(57, 219, 183, 1)',
5: 'rgba(57, 219, 183, 1)',
}[parseInt((data.totalProgress * 100) / 20)]
" />
</div>
<div style="font-size: 14px; font-weight: 500; margin-left: 10px;color:#677d86;">
{{ parseInt(data.totalProgress * 100) }}%
@@ -208,15 +209,15 @@
<div style="width: 291px">
<el-progress :percentage="parseInt(data.compulsoryProgress * 100)" :show-text="false"
:stroke-width="8" :color="
{
0: 'rgba(238, 112, 108, 1)',
1: 'rgba(255, 151, 38, 1)',
2: 'rgba(39, 122, 255, 1)',
3: 'rgba(59, 94, 251, 1)',
4: 'rgba(57, 219, 183, 1)',
5: 'rgba(57, 219, 183, 1)',
}[parseInt((data.compulsoryProgress * 100) / 20)]
" />
{
0: 'rgba(238, 112, 108, 1)',
1: 'rgba(255, 151, 38, 1)',
2: 'rgba(39, 122, 255, 1)',
3: 'rgba(59, 94, 251, 1)',
4: 'rgba(57, 219, 183, 1)',
5: 'rgba(57, 219, 183, 1)',
}[parseInt((data.compulsoryProgress * 100) / 20)]
" />
</div>
<div style="
font-size: 14px;
@@ -371,7 +372,7 @@ function toFinish(d, sName, chapterOrStageId) {
if (date1 < date2) {
dialogVisibleTip.value = '当前作业已结束';
dialogVisible.value = true;
return
}
}
@@ -437,7 +438,7 @@ function toFinish(d, sName, chapterOrStageId) {
return;
}
if (d.type == 3 || d.type == 7) {
d.status || request(STUDY_RECORD, {
d.status || request(STUDY_RECORD, {
studentId: data.value.userInfoBo.userId,
targetId: data.value.routerId,
logo: 2,
@@ -456,8 +457,7 @@ function toFinish(d, sName, chapterOrStageId) {
query: {
id: d.projectTaskId,
type: 2,
taskId: data.value.projectId,
taskIds: data.value.projectId,
infoId: data.value.projectId,
courseId: d.courseId,
pName: data.value.name,
sName,
@@ -475,8 +475,9 @@ function whiteTypes(type) {
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss">
.example-showcase .el-loading-mask {
z-index: 9;
z-index: 9;
}
.pathdetails {
.el-dialog__header {
display: none;

View File

@@ -1,65 +1,53 @@
<template>
<div style=" background: #0078fc;height: 150px;width: 100%;position: absolute;top: 0;z-index:-9999;"></div>
<div class="pathdetails" style="padding: 30px">
<!-- 面包屑导航 -->
<div class="pdname">
{{ data.name }}
<el-popover v-if="data.remark" ref="popover" popper-class="jianjie" placement="right" trigger="hover" :width="300" :content="data.remark">
<template #reference><span style="font-size: 16px;font-weight: 600;">简介></span></template>
</el-popover>
</div>
<!-- 详细信息 -->
<div class="detailinfo">
<div class="detailL">
<div>
<div class="title">
<div class="titleL">{{ data.currentStageName }}</div>
<div class="titleR" :style="{ display: 'flex' }">
<img
:src="data.currentChapterCnt?circle:circle2"/>
<div class="titleRT" :style="{color:data.currentChapterCnt?'':'rgba(102, 102, 102, 1)'}">
{{ data.currentChapterCnt ? '进行中' : '未开始' }}
</div>
</div>
</div>
<div
class="course"
v-for="(value, index) in data.taskBoList?.filter(
(e) => !whiteTypes(e.type)
)"
:key="index"
>
<div style="width: 70%">
<div v-if="value.name.length >50" class="coursename" :title="value.name">
<el-popover ref="popover" placement="right" trigger="hover" :width="300" :content="value.name">
<template #reference>{{ value.name }}</template>
</el-popover>
</div>
<div class="pdname">
{{ data.name }}
<el-popover v-if="data.remark" ref="popover" popper-class="jianjie" placement="right" trigger="hover" :width="300"
:content="data.remark">
<template #reference><span style="font-size: 16px;font-weight: 600;">简介></span></template>
</el-popover>
</div>
<div v-else class="coursename" :title="value.name">
{{ value.name }}
</div>
<div class="coursetag">
<div
class="tag1"
style="margin-right: 11px; margin-top: 16px"
v-if="value.flag"
>
必修
</div>
<div
class="tag2"
style="margin-right: 11px; margin-top: 16px"
v-if="!value.flag"
>
选修
</div>
<div class="tag3" style="margin-right: 11px; margin-top: 16px">
{{ types.typeName[value.type] || "" }}
</div>
<!-- 详细信息 -->
<div class="detailinfo">
<div class="detailL">
<div>
<div class="title">
<div class="titleL">{{ data.currentStageName }}</div>
<div class="titleR" :style="{ display: 'flex' }">
<img :src="data.currentChapterCnt ? circle : circle2" />
<div class="titleRT" :style="{ color: data.currentChapterCnt ? '' : 'rgba(102, 102, 102, 1)' }">
{{ data.currentChapterCnt ? '进行中' : '未开始' }}
</div>
</div>
</div>
<div class="course" v-for="(value, index) in data.taskBoList?.filter(
(e) => !whiteTypes(e.type)
)" :key="index">
<div style="width: 70%">
<div v-if="value.name.length > 50" class="coursename" :title="value.name">
<el-popover ref="popover" placement="right" trigger="hover" :width="300" :content="value.name">
<template #reference>{{ value.name }}</template>
</el-popover>
</div>
<div v-else class="coursename" :title="value.name">
{{ value.name }}
</div>
<div class="coursetag">
<div class="tag1" style="margin-right: 11px; margin-top: 16px" v-if="value.flag">
必修
</div>
<div class="tag2" style="margin-right: 11px; margin-top: 16px" v-if="!value.flag">
选修
</div>
<div class="tag3" style="margin-right: 11px; margin-top: 16px">
{{ types.typeName[value.type] || "" }}
</div>
<!-- <div-->
<!-- v-for="(item, key) in value.flag"-->
@@ -75,35 +63,34 @@
<div class="progress">
<div style="width: 291px">
<el-progress :percentage="value.currentRatio" :show-text="false" :stroke-width="8" :color="
{
0: 'rgba(238, 112, 108, 1)',
1: 'rgba(255, 151, 38, 1)',
2: 'rgba(39, 122, 255, 1)',
3: 'rgba(59, 94, 251, 1)',
4: 'rgba(57, 219, 183, 1)',
5: 'rgba(57, 219, 183, 1)',
}[parseInt(value.currentRatio / 20)]
" />
{
0: 'rgba(238, 112, 108, 1)',
1: 'rgba(255, 151, 38, 1)',
2: 'rgba(39, 122, 255, 1)',
3: 'rgba(59, 94, 251, 1)',
4: 'rgba(57, 219, 183, 1)',
5: 'rgba(57, 219, 183, 1)',
}[parseInt(value.currentRatio / 20)]
" />
</div>
<div style="font-size: 14px;font-weight: 500;color: #277aff;margin-left: 10px;"
:style="{
color: {
0: 'rgba(238, 112, 108, 1)',
1: 'rgba(255, 151, 38, 1)',
2: 'rgba(39, 122, 255, 1)',
3: 'rgba(59, 94, 251, 1)',
4: 'rgba(57, 219, 183, 1)',
5: 'rgba(57, 219, 183, 1)',
}[parseInt(value.currentRatio / 20)],
}">
<div style="font-size: 14px;font-weight: 500;color: #277aff;margin-left: 10px;" :style="{
color: {
0: 'rgba(238, 112, 108, 1)',
1: 'rgba(255, 151, 38, 1)',
2: 'rgba(39, 122, 255, 1)',
3: 'rgba(59, 94, 251, 1)',
4: 'rgba(57, 219, 183, 1)',
5: 'rgba(57, 219, 183, 1)',
}[parseInt(value.currentRatio / 20)],
}">
{{ value.currentRatio }}%
</div>
</div>
</div>
</div>
<div class="goclass" :style="{
background: `${types.path[value.type] ? '#2478ff' : '#999'}`,
}" @click="toFinish(value)">
background: `${types.path[value.type] ? '#2478ff' : '#999'}`,
}" @click="toFinish(value)">
{{ value.currentRatio === 100 ? "已完成" : types.path[value.type] ? types.toName[value.type] : "未开放" }}
</div>
<!-- <div :style="{ display: value.status === 1 ? 'block' : 'none' }">-->
@@ -203,26 +190,26 @@
<div style="width: 291px">
<el-progress :percentage="parseInt(data.currentChapterCnt / data.totalChapterCnt * 100)"
:show-text="false" :stroke-width="8" :color="
{
0: 'rgba(238, 112, 108, 1)',
1: 'rgba(255, 151, 38, 1)',
2: 'rgba(39, 122, 255, 1)',
3: 'rgba(59, 94, 251, 1)',
4: 'rgba(57, 219, 183, 1)',
5: 'rgba(57, 219, 183, 1)',
}[(parseInt(data.currentChapterCnt / data.totalChapterCnt) * 100) / 20]
" />
{
0: 'rgba(238, 112, 108, 1)',
1: 'rgba(255, 151, 38, 1)',
2: 'rgba(39, 122, 255, 1)',
3: 'rgba(59, 94, 251, 1)',
4: 'rgba(57, 219, 183, 1)',
5: 'rgba(57, 219, 183, 1)',
}[(parseInt(data.currentChapterCnt / data.totalChapterCnt) * 100) / 20]
" />
</div>
<div style="font-size: 14px; font-weight: 500; margin-left: 10px" :style="{
color: {
0: 'rgba(238, 112, 108, 1)',
1: 'rgba(255, 151, 38, 1)',
2: 'rgba(39, 122, 255, 1)',
3: 'rgba(59, 94, 251, 1)',
4: 'rgba(57, 219, 183, 1)',
5: 'rgba(57, 219, 183, 1)',
}[parseInt((data.currentChapterCnt / data.totalChapterCnt * 100) / 20)],
}">
color: {
0: 'rgba(238, 112, 108, 1)',
1: 'rgba(255, 151, 38, 1)',
2: 'rgba(39, 122, 255, 1)',
3: 'rgba(59, 94, 251, 1)',
4: 'rgba(57, 219, 183, 1)',
5: 'rgba(57, 219, 183, 1)',
}[parseInt((data.currentChapterCnt / data.totalChapterCnt * 100) / 20)],
}">
{{ parseInt(data.currentChapterCnt / data.totalChapterCnt * 100) }}%
</div>
</div>
@@ -235,15 +222,15 @@
<div style="width: 291px">
<el-progress :percentage="parseInt(data.currentReqCnt / data.totalReqCnt * 100)" :show-text="false"
:stroke-width="8" :color="
{
0: 'rgba(238, 112, 108, 1)',
1: 'rgba(255, 151, 38, 1)',
2: 'rgba(39, 122, 255, 1)',
3: 'rgba(59, 94, 251, 1)',
4: 'rgba(57, 219, 183, 1)',
5: 'rgba(57, 219, 183, 1)',
}[parseInt((data.currentReqCnt / data.totalReqCnt * 100) / 20)]
" />
{
0: 'rgba(238, 112, 108, 1)',
1: 'rgba(255, 151, 38, 1)',
2: 'rgba(39, 122, 255, 1)',
3: 'rgba(59, 94, 251, 1)',
4: 'rgba(57, 219, 183, 1)',
5: 'rgba(57, 219, 183, 1)',
}[parseInt((data.currentReqCnt / data.totalReqCnt * 100) / 20)]
" />
</div>
<div style="
font-size: 14px;
@@ -251,15 +238,15 @@
color: #277aff;
margin-left: 10px;
" :style="{
color: {
0: 'rgba(238, 112, 108, 1)',
1: 'rgba(255, 151, 38, 1)',
2: 'rgba(39, 122, 255, 1)',
3: 'rgba(59, 94, 251, 1)',
4: 'rgba(57, 219, 183, 1)',
5: 'rgba(57, 219, 183, 1)',
}[parseInt((data.currentReqCnt / data.totalReqCnt * 100) / 20)],
}">
color: {
0: 'rgba(238, 112, 108, 1)',
1: 'rgba(255, 151, 38, 1)',
2: 'rgba(39, 122, 255, 1)',
3: 'rgba(59, 94, 251, 1)',
4: 'rgba(57, 219, 183, 1)',
5: 'rgba(57, 219, 183, 1)',
}[parseInt((data.currentReqCnt / data.totalReqCnt * 100) / 20)],
}">
{{ parseInt(data.currentReqCnt / data.totalReqCnt * 100) }}%
</div>
</div>
@@ -385,7 +372,7 @@ function toFinish(d) {
if (date1 < date2) {
dialogVisibleTip.value = '当前作业已结束';
dialogVisible.value = true;
return
}
}
@@ -446,7 +433,7 @@ function toFinish(d) {
}
}
if (d.type === 3 || d.type === 7) {
d.status || request(STUDY_RECORD, {
d.status || request(STUDY_RECORD, {
studentId: userInfo.value.id,
targetId: data.value.routerId,
logo: 1,
@@ -463,11 +450,9 @@ function toFinish(d) {
router.push({
path: types.value.path[d.type],
query: {
id: d.routerTaskId,
// id: routerId,
id: routerId,
type: 1,
taskId: routerId,
taskIds: routerId,
infoId: routerId,
courseId: d.courseId,
pName: data.value.name,
sName: data.value.currentStageName,
@@ -508,6 +493,7 @@ function whiteTypes(type) {
margin-top: 24px;
display: flex;
z-index: 2;
.detailL {
flex: 1;
margin-right: 20px;

View File

@@ -46,8 +46,8 @@
<div class="question" v-for="
(value, index) in formateArr([data.assessmentEssayQuestionDtoList, data.assessmentMultipleChoiceDtoList, data.assessmentScoringQuestionDtoList, data.assessmentSingleChoiceDtoList]).sort((a, b) => {
return a[0].orderNumber - b[0].orderNumber
}) " :key="index" :style="{ 'margin-top': index === 0 ? '57px' : '41px' }">
return a[0].orderNumber - b[0].orderNumber
}) " :key="index" :style="{ 'margin-top': index === 0 ? '57px' : '41px' }">
<div v-if="value[0].questionType == '4'">
<div class="question" v-for="(value, index) in data.assessmentScoringQuestionDtoList" :key="index"
:style="{ 'margin-top': index === 0 ? '57px' : '41px' }">
@@ -56,9 +56,9 @@
<div class="answerL">完全没用</div>
<div class="answerC">
<div class="answerCitem" v-for="(item, key) in Array.from(
{ length: value.assessmentMaxScore },
(k, i) => i
)" :key="key" :style="{
{ length: value.assessmentMaxScore },
(k, i) => i
)" :key="key" :style="{
'margin-left': key === 0 ? '15px' : '10px',
background:
value.selectAnswer === item
@@ -86,17 +86,17 @@
<div v-else-if="value[0].questionType == '1'">
<div class="question" style="margin-top: 41px" v-if="
data.assessmentSingleChoiceDtoList &&
data.assessmentSingleChoiceDtoList.length
">
data.assessmentSingleChoiceDtoList &&
data.assessmentSingleChoiceDtoList.length
">
<div class="text">
{{ data.assessmentSingleChoiceDtoList[0]?.singleStemName }}
</div>
<div v-for="(value, index) in data.assessmentSingleChoiceDtoList" :key="index"
style="display: flex; align-items: center" :style="{
'margin-top': index === 0 ? '29px' : '22px',
cursor: 'pointer',
}" @click="
'margin-top': index === 0 ? '29px' : '22px',
cursor: 'pointer',
}" @click="
() => {
if (data.isSubmit) {
return;
@@ -115,17 +115,17 @@
<div v-else-if="value[0].questionType == '2'">
<div class="question" style="margin-top: 41px" v-if="
data.assessmentMultipleChoiceDtoList &&
data.assessmentMultipleChoiceDtoList.length
">
data.assessmentMultipleChoiceDtoList &&
data.assessmentMultipleChoiceDtoList.length
">
<div class="text">
{{ data.assessmentMultipleChoiceDtoList[0]?.multipleStemName }}
</div>
<div v-for="(value, index) in data.assessmentMultipleChoiceDtoList" :key="index"
style="display: flex; align-items: center" :style="{
'margin-top': index === 0 ? '29px' : '22px',
cursor: 'pointer',
}" @click="
'margin-top': index === 0 ? '29px' : '22px',
cursor: 'pointer',
}" @click="
() => {
if (data.isSubmit) {
return;
@@ -292,11 +292,11 @@
</div> -->
<div style="display: flex; justify-content: center" v-if="
data.assessmentEssayQuestionDtoList?.length ||
data.assessmentMultipleChoiceDtoList?.length ||
data.assessmentSingleChoiceDtoList?.length ||
data.assessmentScoringQuestionDtoList?.length
">
data.assessmentEssayQuestionDtoList?.length ||
data.assessmentMultipleChoiceDtoList?.length ||
data.assessmentSingleChoiceDtoList?.length ||
data.assessmentScoringQuestionDtoList?.length
">
<div class="submit" @click="submit" :style="{ background: data.isSubmit ? '#999' : '#2478ff' }">
提交
</div>
@@ -334,7 +334,7 @@ import { ElMessage } from "element-plus";
import { ref } from "vue";
const {
query: { courseId, id: taskId, taskIds, type, pName, sName, chapterOrStageId },
query: { courseId, id: taskId, infoId, type, pName, sName, chapterOrStageId },
} = useRoute();
const router = useRouter();
const returnclick = () => {
@@ -353,8 +353,8 @@ function formateArr(arr1) {
return newarr
}
const { data } = useRequest(ASSESSMENT_QUERY(courseId), { id: courseId, type, chapterOrStageId, targetId: taskIds ? taskIds : 0 });
console.log('我是查询评估的参数', { id: courseId, type, chapterOrStageId, targetId: taskIds ? taskIds : 0 })
const { data } = useRequest(ASSESSMENT_QUERY(courseId), { id: courseId, type, chapterOrStageId, targetId: infoId ? infoId : 0 });
console.log('我是查询评估的参数', { id: courseId, type, chapterOrStageId, targetId: infoId ? infoId : 0 })
console.log('我是需要排序得题目', data)
function goHome() {
@@ -369,10 +369,10 @@ function submit() {
if (1 > 0) {
console.log(data)
console.log('我是提交的数据', {
targetId: taskId ? taskId : taskIds ? taskIds : 0, // 项目、路径图或开课的Id
targetId: infoId ? infoId : 0, // 项目、路径图或开课的Id
chapterOrStageId: chapterOrStageId ? chapterOrStageId : 0, // 关卡或者阶段Id 关卡Id不允许为空
assessmentId: courseId,
taskId: taskId ? taskId : taskIds ? taskIds : 0,
taskId: taskId ? taskId : 0,
type,
result: JSON.stringify(data.value),
})
@@ -424,10 +424,10 @@ function submit() {
data.value.isSubmit = !data.value.isSubmit;
request(ASSESSMENT_SUBMIT, {
targetId: taskIds ? taskIds : 0, // 项目、路径图或开课的Id
targetId: infoId ? infoId : 0, // 项目、路径图或开课的Id
chapterOrStageId: chapterOrStageId ? chapterOrStageId : 0, // 关卡或者阶段Id 关卡Id不允许为空
assessmentId: courseId,
taskId: taskIds ? taskIds : 0,
taskId: taskId ? taskId : 0,
type,
result: JSON.stringify(data.value),
}).then(() => {