mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-12 04:16:50 +08:00
feat:提交评估传递项目/路径id及其阶段/路径id用于区分不同评估
This commit is contained in:
@@ -333,6 +333,7 @@ function toSurvery() {
|
|||||||
courseId: data.value.planDto.evaluateId,
|
courseId: data.value.planDto.evaluateId,
|
||||||
pName: "面授课",
|
pName: "面授课",
|
||||||
sName: data.value.planDto.name,
|
sName: data.value.planDto.name,
|
||||||
|
type: 3
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -213,6 +213,7 @@ const commitClick = () => {
|
|||||||
courseId: data.value.assessmentId,
|
courseId: data.value.assessmentId,
|
||||||
pName: "直播",
|
pName: "直播",
|
||||||
sName: data.value.liveName,
|
sName: data.value.liveName,
|
||||||
|
type: 4
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -375,8 +375,8 @@ function introductionPro() {
|
|||||||
dialogVisible.value = true;
|
dialogVisible.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function toFinish(d, sName, chapterId) {
|
function toFinish(d, sName, chapterOrStageId) {
|
||||||
console.log("dddddd", d, sName);
|
console.log("dddddd", d, sName, chapterOrStageId);
|
||||||
// 作业过期判断
|
// 作业过期判断
|
||||||
if (d.type == 4) {
|
if (d.type == 4) {
|
||||||
let date1 = new Date(d.endTime).getTime();
|
let date1 = new Date(d.endTime).getTime();
|
||||||
@@ -472,6 +472,7 @@ function toFinish(d, sName, chapterId) {
|
|||||||
courseId: d.courseId,
|
courseId: d.courseId,
|
||||||
pName: data.value.name,
|
pName: data.value.name,
|
||||||
sName,
|
sName,
|
||||||
|
chapterOrStageId
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
} else if (typeof types.value.path[d.type] === "function") {
|
} else if (typeof types.value.path[d.type] === "function") {
|
||||||
|
|||||||
@@ -96,7 +96,7 @@
|
|||||||
<div class="goclass" :style="{
|
<div class="goclass" :style="{
|
||||||
background: `${types.path[value.type] ? '#2478ff' : '#999'}`,
|
background: `${types.path[value.type] ? '#2478ff' : '#999'}`,
|
||||||
}" @click="toFinish(value)">
|
}" @click="toFinish(value)">
|
||||||
{{value.currentRatio === 1 ? "已完成" : types.path[value.type] ? types.toName[value.type] : "未开放"}}
|
{{ value.currentRatio === 1 ? "已完成" : types.path[value.type] ? types.toName[value.type] : "未开放" }}
|
||||||
</div>
|
</div>
|
||||||
<!-- <div :style="{ display: value.status === 1 ? 'block' : 'none' }">-->
|
<!-- <div :style="{ display: value.status === 1 ? 'block' : 'none' }">-->
|
||||||
<!-- <div-->
|
<!-- <div-->
|
||||||
@@ -368,6 +368,8 @@ const types = ref({
|
|||||||
});
|
});
|
||||||
|
|
||||||
function toFinish(d) {
|
function toFinish(d) {
|
||||||
|
console.log(d)
|
||||||
|
console.log(data.value.currentStageId, routerId)
|
||||||
if (!types.value.path[d.type]) {
|
if (!types.value.path[d.type]) {
|
||||||
ElMessage.error("暂时未开放");
|
ElMessage.error("暂时未开放");
|
||||||
return;
|
return;
|
||||||
@@ -390,11 +392,13 @@ function toFinish(d) {
|
|||||||
router.push({
|
router.push({
|
||||||
path: types.value.path[d.type],
|
path: types.value.path[d.type],
|
||||||
query: {
|
query: {
|
||||||
id: d.routerTaskId,
|
// id: d.routerTaskId,
|
||||||
|
id: routerId,
|
||||||
type: 1,
|
type: 1,
|
||||||
courseId: d.courseId,
|
courseId: d.courseId,
|
||||||
pName: data.value.name,
|
pName: data.value.name,
|
||||||
sName: data.value.currentStageName,
|
sName: data.value.currentStageName,
|
||||||
|
chapterOrStageId: data.value.currentStageId
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
} else if (typeof types.value.path[d.type] === "function") {
|
} else if (typeof types.value.path[d.type] === "function") {
|
||||||
|
|||||||
@@ -1,17 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="surveydetail" style="padding: 30px">
|
<div class="surveydetail" style="padding: 30px">
|
||||||
<!-- 面包屑导航 -->
|
<!-- 面包屑导航 -->
|
||||||
<div
|
<div style="display: flex; align-items: center; justify-content: space-between">
|
||||||
style="display: flex; align-items: center; justify-content: space-between"
|
<div class="crumb">
|
||||||
>
|
<div>{{ pName }}</div>
|
||||||
<div class="crumb">
|
<div style="margin-left: 6px; margin-right: 6px">/</div>
|
||||||
<div>{{ pName }}</div>
|
<div>{{ sName }}</div>
|
||||||
<div style="margin-left: 6px; margin-right: 6px">/</div>
|
<div style="margin-left: 6px; margin-right: 6px">/</div>
|
||||||
<div>{{ sName }}</div>
|
<div style="font-weight: 700; font-size: 16px">评估详情</div>
|
||||||
<div style="margin-left: 6px; margin-right: 6px">/</div>
|
</div>
|
||||||
<div style="font-weight: 700; font-size: 16px">评估详情</div>
|
<!--
|
||||||
</div>
|
|
||||||
<!--
|
|
||||||
<div class="prevnext">
|
<div class="prevnext">
|
||||||
<div class="prev">
|
<div class="prev">
|
||||||
<img
|
<img
|
||||||
@@ -27,186 +25,133 @@
|
|||||||
src="../../assets/image/next.png"
|
src="../../assets/image/next.png"
|
||||||
/>
|
/>
|
||||||
</div>-->
|
</div>-->
|
||||||
<div class="return">
|
<div class="return">
|
||||||
<div style="display: flex" @click="returnclick">
|
<div style="display: flex" @click="returnclick">
|
||||||
<img
|
<img class="img2" style="margin-right: 22px" src="../../assets/image/return.png" />
|
||||||
class="img2"
|
<div class="text" style="color: #fff">返回</div>
|
||||||
style="margin-right: 22px"
|
</div>
|
||||||
src="../../assets/image/return.png"
|
</div>
|
||||||
/>
|
</div>
|
||||||
<div class="text" style="color: #fff">返回</div>
|
<!-- 面包屑导航 -->
|
||||||
</div>
|
<!-- 标题 -->
|
||||||
</div>
|
<div class="title">【评估】{{ data.assessmentName }}</div>
|
||||||
</div>
|
<!-- 标题 -->
|
||||||
<!-- 面包屑导航 -->
|
<!-- 基本信息 -->
|
||||||
<!-- 标题 -->
|
<div class="bascinfo">
|
||||||
<div class="title">【评估】{{data.assessmentName}}</div>
|
<div>
|
||||||
<!-- 标题 -->
|
<!-- {{ [data.assessmentEssayQuestionDtoList,data.assessmentMultipleChoiceDtoList,data.assessmentScoringQuestionDtoList,data.assessmentSingleChoiceDtoList].sort((a,b)=>{
|
||||||
<!-- 基本信息 -->
|
|
||||||
<div class="bascinfo">
|
|
||||||
<div>
|
|
||||||
<!-- {{ [data.assessmentEssayQuestionDtoList,data.assessmentMultipleChoiceDtoList,data.assessmentScoringQuestionDtoList,data.assessmentSingleChoiceDtoList].sort((a,b)=>{
|
|
||||||
return a[0].orderNumber - b[0].orderNumber
|
return a[0].orderNumber - b[0].orderNumber
|
||||||
}) }} -->
|
}) }} -->
|
||||||
|
|
||||||
<div
|
<div class="question" v-for="
|
||||||
class="question"
|
(value, index) in formateArr([data.assessmentEssayQuestionDtoList, data.assessmentMultipleChoiceDtoList, data.assessmentScoringQuestionDtoList, data.assessmentSingleChoiceDtoList]).sort((a, b) => {
|
||||||
v-for="
|
return a[0].orderNumber - b[0].orderNumber
|
||||||
(value, index) in formateArr([data.assessmentEssayQuestionDtoList,data.assessmentMultipleChoiceDtoList,data.assessmentScoringQuestionDtoList,data.assessmentSingleChoiceDtoList]).sort((a,b)=>{
|
}) " :key="index" :style="{ 'margin-top': index === 0 ? '57px' : '41px' }">
|
||||||
return a[0].orderNumber - b[0].orderNumber
|
<div v-if="value[0].questionType == '4'">
|
||||||
}) "
|
<div class="question" v-for="(value, index) in data.assessmentScoringQuestionDtoList" :key="index"
|
||||||
:key="index"
|
:style="{ 'margin-top': index === 0 ? '57px' : '41px' }">
|
||||||
:style="{ 'margin-top': index === 0 ? '57px' : '41px' }"
|
<div class="text">{{ value.assessmentScTitle }}</div>
|
||||||
>
|
<div class="answer">
|
||||||
<div v-if="value[0].questionType=='4'">
|
<div class="answerL">完全没用</div>
|
||||||
<div
|
<div class="answerC">
|
||||||
class="question"
|
<div class="answerCitem" v-for="(item, key) in Array.from(
|
||||||
v-for="(value, index) in data.assessmentScoringQuestionDtoList"
|
{ length: value.assessmentMaxScore },
|
||||||
:key="index"
|
(k, i) => i
|
||||||
:style="{ 'margin-top': index === 0 ? '57px' : '41px' }"
|
)" :key="key" :style="{
|
||||||
>
|
'margin-left': key === 0 ? '15px' : '10px',
|
||||||
<div class="text">{{ value.assessmentScTitle }}</div>
|
background:
|
||||||
<div class="answer">
|
value.selectAnswer === item
|
||||||
<div class="answerL">完全没用</div>
|
? 'rgba(86, 163, 249, 1)'
|
||||||
<div class="answerC">
|
: 'rgba(86, 163, 249, 0)',
|
||||||
<div
|
color:
|
||||||
class="answerCitem"
|
value.selectAnswer === item
|
||||||
v-for="(item, key) in Array.from(
|
? '#fff'
|
||||||
{ length: value.assessmentMaxScore },
|
: 'rgba(86, 163, 249, 1)',
|
||||||
(k, i) => i
|
}" @click="
|
||||||
)"
|
() => {
|
||||||
:key="key"
|
if (data.isSubmit) {
|
||||||
:style="{
|
return;
|
||||||
'margin-left': key === 0 ? '15px' : '10px',
|
}
|
||||||
background:
|
value.selectAnswer = item;
|
||||||
value.selectAnswer === item
|
}
|
||||||
? 'rgba(86, 163, 249, 1)'
|
">
|
||||||
: 'rgba(86, 163, 249, 0)',
|
<div>{{ item + 1 }}</div>
|
||||||
color:
|
</div>
|
||||||
value.selectAnswer === item
|
</div>
|
||||||
? '#fff'
|
<div class="answerR">非常有帮助/启发</div>
|
||||||
: 'rgba(86, 163, 249, 1)',
|
</div>
|
||||||
}"
|
</div>
|
||||||
@click="
|
</div>
|
||||||
() => {
|
|
||||||
if (data.isSubmit) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
value.selectAnswer = item;
|
|
||||||
}
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<div>{{ item + 1 }}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="answerR">非常有帮助/启发</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div v-else-if="value[0].questionType=='1'">
|
<div v-else-if="value[0].questionType == '1'">
|
||||||
<div
|
<div class="question" style="margin-top: 41px" v-if="
|
||||||
class="question"
|
data.assessmentSingleChoiceDtoList &&
|
||||||
style="margin-top: 41px"
|
data.assessmentSingleChoiceDtoList.length
|
||||||
v-if="
|
">
|
||||||
data.assessmentSingleChoiceDtoList &&
|
<div class="text">
|
||||||
data.assessmentSingleChoiceDtoList.length
|
{{ data.assessmentSingleChoiceDtoList[0]?.singleStemName }}
|
||||||
"
|
</div>
|
||||||
>
|
<div v-for="(value, index) in data.assessmentSingleChoiceDtoList" :key="index"
|
||||||
<div class="text">
|
style="display: flex; align-items: center" :style="{
|
||||||
{{ data.assessmentSingleChoiceDtoList[0]?.singleStemName }}
|
'margin-top': index === 0 ? '29px' : '22px',
|
||||||
</div>
|
cursor: 'pointer',
|
||||||
<div
|
}" @click="
|
||||||
v-for="(value, index) in data.assessmentSingleChoiceDtoList"
|
() => {
|
||||||
:key="index"
|
if (data.isSubmit) {
|
||||||
style="display: flex; align-items: center"
|
return;
|
||||||
:style="{
|
}
|
||||||
'margin-top': index === 0 ? '29px' : '22px',
|
data.assessmentSingleChoiceDtoList.forEach((e) => {
|
||||||
cursor: 'pointer',
|
e.select = false;
|
||||||
}"
|
});
|
||||||
@click="
|
value.select = true;
|
||||||
() => {
|
}
|
||||||
if (data.isSubmit) {
|
">
|
||||||
return;
|
<img style="width: 19px; height: 18px; cursor: pointer" :src="value.select ? checkbox : checkbox2" />
|
||||||
}
|
<div class="people">{{ value.singleOptionName }}</div>
|
||||||
data.assessmentSingleChoiceDtoList.forEach((e) => {
|
</div>
|
||||||
e.select = false;
|
</div>
|
||||||
});
|
</div>
|
||||||
value.select = true;
|
|
||||||
}
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<img
|
|
||||||
style="width: 19px; height: 18px; cursor: pointer"
|
|
||||||
:src="value.select ? checkbox : checkbox2"
|
|
||||||
/>
|
|
||||||
<div class="people">{{ value.singleOptionName }}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div v-else-if="value[0].questionType=='2'">
|
<div v-else-if="value[0].questionType == '2'">
|
||||||
<div
|
<div class="question" style="margin-top: 41px" v-if="
|
||||||
class="question"
|
data.assessmentMultipleChoiceDtoList &&
|
||||||
style="margin-top: 41px"
|
data.assessmentMultipleChoiceDtoList.length
|
||||||
v-if="
|
">
|
||||||
data.assessmentMultipleChoiceDtoList &&
|
<div class="text">
|
||||||
data.assessmentMultipleChoiceDtoList.length
|
{{ data.assessmentMultipleChoiceDtoList[0]?.multipleStemName }}
|
||||||
"
|
</div>
|
||||||
>
|
<div v-for="(value, index) in data.assessmentMultipleChoiceDtoList" :key="index"
|
||||||
<div class="text">
|
style="display: flex; align-items: center" :style="{
|
||||||
{{ data.assessmentMultipleChoiceDtoList[0]?.multipleStemName }}
|
'margin-top': index === 0 ? '29px' : '22px',
|
||||||
</div>
|
cursor: 'pointer',
|
||||||
<div
|
}" @click="
|
||||||
v-for="(value, index) in data.assessmentMultipleChoiceDtoList"
|
() => {
|
||||||
:key="index"
|
if (data.isSubmit) {
|
||||||
style="display: flex; align-items: center"
|
return;
|
||||||
:style="{
|
}
|
||||||
'margin-top': index === 0 ? '29px' : '22px',
|
value.select = !value.select;
|
||||||
cursor: 'pointer',
|
}
|
||||||
}"
|
">
|
||||||
@click="
|
<img style="width: 19px; height: 18px; cursor: pointer" :src="value.select ? checkbox : checkbox2" />
|
||||||
() => {
|
<div class="people">{{ value.multipleOptionName }}</div>
|
||||||
if (data.isSubmit) {
|
</div>
|
||||||
return;
|
</div>
|
||||||
}
|
</div>
|
||||||
value.select = !value.select;
|
|
||||||
}
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<img
|
|
||||||
style="width: 19px; height: 18px; cursor: pointer"
|
|
||||||
:src="value.select ? checkbox : checkbox2"
|
|
||||||
/>
|
|
||||||
<div class="people">{{ value.multipleOptionName }}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div v-else-if="value[0].questionType=='3'">
|
<div v-else-if="value[0].questionType == '3'">
|
||||||
<div
|
<div class="question" style="margin-top: 41px" v-for="(item, i) in data.assessmentEssayQuestionDtoList"
|
||||||
class="question"
|
:key="i">
|
||||||
style="margin-top: 41px"
|
<div class="text">{{ item.assessmentQaTitle }}</div>
|
||||||
v-for="(item, i) in data.assessmentEssayQuestionDtoList"
|
<div style="width: 713px; margin-top: 31px; position: relative">
|
||||||
:key="i"
|
<el-input v-model="item.content" :autosize="{ minRows: 5, maxRows: 5 }" resize="none" maxlength="200"
|
||||||
>
|
type="textarea" :readonly="!!data.isSubmit" />
|
||||||
<div class="text">{{ item.assessmentQaTitle }}</div>
|
<div class="words">{{ item.content?.length || 0 }}/200</div>
|
||||||
<div style="width: 713px; margin-top: 31px; position: relative">
|
</div>
|
||||||
<el-input
|
</div>
|
||||||
v-model="item.content"
|
</div>
|
||||||
:autosize="{ minRows: 5, maxRows: 5 }"
|
</div>
|
||||||
resize="none"
|
|
||||||
maxlength="200"
|
|
||||||
type="textarea"
|
|
||||||
:readonly="!!data.isSubmit"
|
|
||||||
/>
|
|
||||||
<div class="words">{{ item.content?.length || 0 }}/200</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- <div
|
<!-- <div
|
||||||
class="question"
|
class="question"
|
||||||
v-for="(value, index) in data.assessmentScoringQuestionDtoList"
|
v-for="(value, index) in data.assessmentScoringQuestionDtoList"
|
||||||
:key="index"
|
:key="index"
|
||||||
@@ -344,42 +289,39 @@
|
|||||||
<div class="words">{{ item.content?.length || 0 }}/200</div>
|
<div class="words">{{ item.content?.length || 0 }}/200</div>
|
||||||
</div>
|
</div>
|
||||||
</div> -->
|
</div> -->
|
||||||
|
|
||||||
<div
|
<div style="display: flex; justify-content: center" v-if="
|
||||||
style="display: flex; justify-content: center"
|
data.assessmentEssayQuestionDtoList?.length ||
|
||||||
v-if="
|
data.assessmentMultipleChoiceDtoList?.length ||
|
||||||
data.assessmentEssayQuestionDtoList?.length ||
|
data.assessmentSingleChoiceDtoList?.length ||
|
||||||
data.assessmentMultipleChoiceDtoList?.length ||
|
data.assessmentScoringQuestionDtoList?.length
|
||||||
data.assessmentSingleChoiceDtoList?.length ||
|
">
|
||||||
data.assessmentScoringQuestionDtoList?.length
|
<div class="submit" @click="submit" :style="{ background: data.isSubmit ? '#999' : '#2478ff' }">
|
||||||
"
|
提交
|
||||||
>
|
</div>
|
||||||
<div
|
</div>
|
||||||
class="submit"
|
</div>
|
||||||
@click="submit"
|
</div>
|
||||||
:style="{ background: data.isSubmit ? '#999' : '#2478ff' }"
|
<!-- 基本信息 -->
|
||||||
>
|
<!-- todo 测评页面 没有接口-->
|
||||||
提交
|
</div>
|
||||||
</div>
|
<el-dialog v-model="centerDialogVisible" title="" width="20%" center :show-close="false" :align-center="true">
|
||||||
</div>
|
<div style="text-align: center;font-size:16px;"> <span style="color:black">
|
||||||
</div>
|
提交成功
|
||||||
</div>
|
</span></div>
|
||||||
<!-- 基本信息 -->
|
<template #footer>
|
||||||
<!-- todo 测评页面 没有接口-->
|
<span class="dialog-footer">
|
||||||
</div>
|
<el-button class="cancel"
|
||||||
<el-dialog v-model="centerDialogVisible" title="" width="20%" center :show-close="false" :align-center="true">
|
style="color: #387DF7; border: 1px solid #387DF7;padding: 8px 32px; border-radius: 4px;"
|
||||||
<div style="text-align: center;font-size:16px;"> <span style="color:black">
|
@click="centerDialogVisible = false">取消</el-button>
|
||||||
提交成功
|
<el-button class="back"
|
||||||
</span></div>
|
style="background: #387DF7;box-shadow: 1px 2px 15px 1px rgba(56,125,247,0.34);border: 0px;padding: 8px 32px;"
|
||||||
<template #footer>
|
type="primary" @click="returnclick">
|
||||||
<span class="dialog-footer">
|
返回
|
||||||
<el-button class="cancel" style="color: #387DF7; border: 1px solid #387DF7;padding: 8px 32px; border-radius: 4px;" @click="centerDialogVisible = false">取消</el-button>
|
</el-button>
|
||||||
<el-button class="back" style="background: #387DF7;box-shadow: 1px 2px 15px 1px rgba(56,125,247,0.34);border: 0px;padding: 8px 32px;" type="primary" @click="returnclick">
|
</span>
|
||||||
返回
|
</template>
|
||||||
</el-button>
|
</el-dialog>
|
||||||
</span>
|
|
||||||
</template>
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import checkbox from "@/assets/image/checkbox.png";
|
import checkbox from "@/assets/image/checkbox.png";
|
||||||
@@ -388,226 +330,243 @@ import { useRoute, useRouter } from "vue-router/dist/vue-router";
|
|||||||
import { request, usePage, useRequest } from "@/api/request";
|
import { request, usePage, useRequest } from "@/api/request";
|
||||||
import { ASSESSMENT_QUERY, ASSESSMENT_SUBMIT } from "@/api/api";
|
import { ASSESSMENT_QUERY, ASSESSMENT_SUBMIT } from "@/api/api";
|
||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import { ref} from "vue";
|
import { ref } from "vue";
|
||||||
|
|
||||||
const {
|
const {
|
||||||
query: { courseId, id: taskId, type, pName, sName },
|
query: { courseId, id: taskId, type, pName, sName, chapterOrStageId },
|
||||||
} = useRoute();
|
} = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const returnclick = () => {
|
const returnclick = () => {
|
||||||
router.back();
|
router.back();
|
||||||
};
|
};
|
||||||
|
|
||||||
// 数组去空对象
|
// 数组去空对象
|
||||||
function formateArr(arr1) {
|
function formateArr(arr1) {
|
||||||
console.log(arr1,arr1[0],arr1[0].length)
|
console.log(arr1, arr1[0], arr1[0].length)
|
||||||
let newarr = []
|
let newarr = []
|
||||||
for(let i=0;i<arr1.length;i++){
|
for (let i = 0; i < arr1.length; i++) {
|
||||||
if(arr1[i].length!==0){
|
if (arr1[i].length !== 0) {
|
||||||
newarr.push(arr1[i])
|
newarr.push(arr1[i])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return newarr
|
return newarr
|
||||||
}
|
}
|
||||||
|
|
||||||
const { data } = useRequest(ASSESSMENT_QUERY(courseId), { id: courseId });
|
const { data } = useRequest(ASSESSMENT_QUERY(courseId), { id: courseId });
|
||||||
console.log('我是需要排序得题目', data )
|
console.log('我是需要排序得题目', data)
|
||||||
|
|
||||||
function goHome() {
|
function goHome() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const centerDialogVisible =ref(false);
|
const centerDialogVisible = ref(false);
|
||||||
const open=()=>{
|
const open = () => {
|
||||||
centerDialogVisible.value = true
|
centerDialogVisible.value = true
|
||||||
};
|
};
|
||||||
function submit() {
|
function submit() {
|
||||||
if (data.value.isSubmit) {
|
if (1 > 0) {
|
||||||
return;
|
console.log(data)
|
||||||
}
|
console.log('我是提交的数据', {
|
||||||
console.log("data.value",data.value);
|
targetId: taskId, // 项目、路径图或开课的Id
|
||||||
let list1 = data.value.assessmentEssayQuestionDtoList;
|
chapterOrStageId: chapterOrStageId, // 关卡或者阶段Id 关卡Id不允许为空
|
||||||
if(list1 &&list1.length > 0){
|
assessmentId: courseId,
|
||||||
list1.forEach((item) => {
|
taskId,
|
||||||
if(item && !item.content){
|
type,
|
||||||
|
result: JSON.stringify(data.value),
|
||||||
return ElMessage.warning("您有未填写的评估题干");
|
})
|
||||||
}
|
}
|
||||||
})
|
if (data.value.isSubmit) {
|
||||||
}
|
return;
|
||||||
let list2 = data.value.assessmentScoringQuestionDtoList;
|
}
|
||||||
if(list2 &&list2.length > 0){
|
console.log("data.value", data.value);
|
||||||
list2.forEach((item) => {
|
let list1 = data.value.assessmentEssayQuestionDtoList;
|
||||||
if(item && !item.selectAnswer){
|
if (list1 && list1.length > 0) {
|
||||||
|
list1.forEach((item) => {
|
||||||
return ElMessage.warning("您有未填写的评估题干");
|
if (item && !item.content) {
|
||||||
}
|
|
||||||
})
|
return ElMessage.warning("您有未填写的评估题干");
|
||||||
}
|
}
|
||||||
let list3 = data.value.assessmentSingleChoiceDtoList;
|
})
|
||||||
if(list3 &&list3.length > 0){
|
}
|
||||||
let flag = 0;
|
let list2 = data.value.assessmentScoringQuestionDtoList;
|
||||||
list3.forEach((item) => {
|
if (list2 && list2.length > 0) {
|
||||||
flag = flag + item.select? 1 : 0;
|
list2.forEach((item) => {
|
||||||
})
|
if (item && !item.selectAnswer) {
|
||||||
if(flag ==0 ){
|
|
||||||
|
return ElMessage.warning("您有未填写的评估题干");
|
||||||
return ElMessage.warning("您有未填写的评估题干");
|
}
|
||||||
}
|
})
|
||||||
}
|
}
|
||||||
let list4 = data.value.assessmentMultipleChoiceDtoList;
|
let list3 = data.value.assessmentSingleChoiceDtoList;
|
||||||
if(list4 &&list4.length > 0){
|
if (list3 && list3.length > 0) {
|
||||||
let flag = 0;
|
let flag = 0;
|
||||||
list4.forEach((item) => {
|
list3.forEach((item) => {
|
||||||
flag = flag + item.select? 1 : 0;
|
flag = flag + item.select ? 1 : 0;
|
||||||
})
|
})
|
||||||
if(flag == 0 ){
|
if (flag == 0) {
|
||||||
|
|
||||||
return ElMessage.warning("您有未填写的评估题干");
|
return ElMessage.warning("您有未填写的评估题干");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
data.value.isSubmit = !data.value.isSubmit;
|
let list4 = data.value.assessmentMultipleChoiceDtoList;
|
||||||
request(ASSESSMENT_SUBMIT, {
|
if (list4 && list4.length > 0) {
|
||||||
assessmentId: courseId,
|
let flag = 0;
|
||||||
taskId,
|
list4.forEach((item) => {
|
||||||
type,
|
flag = flag + item.select ? 1 : 0;
|
||||||
result: JSON.stringify(data.value),
|
})
|
||||||
}).then(() => {
|
if (flag == 0) {
|
||||||
open();
|
|
||||||
});
|
return ElMessage.warning("您有未填写的评估题干");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
data.value.isSubmit = !data.value.isSubmit;
|
||||||
|
request(ASSESSMENT_SUBMIT, {
|
||||||
|
targetId: taskId, // 项目、路径图或开课的Id
|
||||||
|
chapterOrStageId: chapterOrStageId, // 关卡或者阶段Id 关卡Id不允许为空
|
||||||
|
assessmentId: courseId,
|
||||||
|
taskId,
|
||||||
|
type,
|
||||||
|
result: JSON.stringify(data.value),
|
||||||
|
}).then(() => {
|
||||||
|
open();
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.surveydetail {
|
.surveydetail {
|
||||||
.crumb {
|
.crumb {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
display: flex;
|
display: flex;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
line-height: 24px;
|
line-height: 24px;
|
||||||
}
|
}
|
||||||
.return {
|
|
||||||
position: absolute;
|
|
||||||
right: 10%;
|
|
||||||
.text {
|
|
||||||
text-align: center;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.prevnext {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: 500;
|
|
||||||
color: #ffffff;
|
|
||||||
|
|
||||||
.prev {
|
.return {
|
||||||
display: flex;
|
position: absolute;
|
||||||
align-items: center;
|
right: 10%;
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.title {
|
.text {
|
||||||
font-size: 20px;
|
text-align: center;
|
||||||
font-weight: 800;
|
display: flex;
|
||||||
color: #ffffff;
|
flex-direction: row;
|
||||||
line-height: 24px;
|
align-items: center;
|
||||||
margin-top: 17px;
|
}
|
||||||
margin-left: -11px;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.bascinfo {
|
.prevnext {
|
||||||
width: 100%;
|
display: flex;
|
||||||
min-height: 1032px;
|
align-items: center;
|
||||||
margin-top: 24px;
|
font-size: 14px;
|
||||||
background: #ffffff;
|
font-weight: 500;
|
||||||
border-radius: 8px;
|
color: #ffffff;
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
.question .text {
|
.prev {
|
||||||
font-size: 16px;
|
display: flex;
|
||||||
font-weight: 500;
|
align-items: center;
|
||||||
color: #333330;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.question .answer {
|
.title {
|
||||||
margin-top: 30px;
|
font-size: 20px;
|
||||||
display: flex;
|
font-weight: 800;
|
||||||
align-items: center;
|
color: #ffffff;
|
||||||
font-size: 14px;
|
line-height: 24px;
|
||||||
font-weight: 500;
|
margin-top: 17px;
|
||||||
color: #56a3f9;
|
margin-left: -11px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.question .answer .answerC {
|
.bascinfo {
|
||||||
width: 540px;
|
width: 100%;
|
||||||
height: 73px;
|
min-height: 1032px;
|
||||||
border: 1px solid #d7e5fd;
|
margin-top: 24px;
|
||||||
border-radius: 8px;
|
background: #ffffff;
|
||||||
display: flex;
|
border-radius: 8px;
|
||||||
align-items: center;
|
display: flex;
|
||||||
margin-left: 11px;
|
flex-direction: column;
|
||||||
margin-right: 11px;
|
align-items: center;
|
||||||
// justify-content: center;
|
|
||||||
.answerCitem {
|
|
||||||
width: 40px;
|
|
||||||
height: 40px;
|
|
||||||
border: 1px solid #56a3f9;
|
|
||||||
border-radius: 8px;
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: 400;
|
|
||||||
color: #ffffff;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
margin-left: 10px;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.question .people {
|
.question .text {
|
||||||
font-size: 14px;
|
font-size: 16px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: #333330;
|
color: #333330;
|
||||||
margin-left: 15px;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.question .words {
|
.question .answer {
|
||||||
position: absolute;
|
margin-top: 30px;
|
||||||
right: 15px;
|
display: flex;
|
||||||
bottom: 5px;
|
align-items: center;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: #333330;
|
color: #56a3f9;
|
||||||
}
|
}
|
||||||
|
|
||||||
.question .el-textarea__inner {
|
.question .answer .answerC {
|
||||||
border-radius: 8px;
|
width: 540px;
|
||||||
background-color: rgba(245, 246, 247, 1);
|
height: 73px;
|
||||||
}
|
border: 1px solid #d7e5fd;
|
||||||
|
border-radius: 8px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-left: 11px;
|
||||||
|
margin-right: 11px;
|
||||||
|
|
||||||
.submit {
|
// justify-content: center;
|
||||||
width: 126px;
|
.answerCitem {
|
||||||
height: 46px;
|
width: 40px;
|
||||||
background: #2478ff;
|
height: 40px;
|
||||||
box-shadow: 0px 1px 8px 0px rgba(56, 125, 247, 0.7);
|
border: 1px solid #56a3f9;
|
||||||
border-radius: 4px;
|
border-radius: 8px;
|
||||||
font-size: 16px;
|
font-size: 14px;
|
||||||
font-weight: 800;
|
font-weight: 400;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
line-height: 24px;
|
display: flex;
|
||||||
display: flex;
|
align-items: center;
|
||||||
align-items: center;
|
justify-content: center;
|
||||||
justify-content: center;
|
margin-left: 10px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
margin-top: 39px;
|
}
|
||||||
margin-bottom: 30px;
|
}
|
||||||
}
|
|
||||||
}
|
.question .people {
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #333330;
|
||||||
|
margin-left: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.question .words {
|
||||||
|
position: absolute;
|
||||||
|
right: 15px;
|
||||||
|
bottom: 5px;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #333330;
|
||||||
|
}
|
||||||
|
|
||||||
|
.question .el-textarea__inner {
|
||||||
|
border-radius: 8px;
|
||||||
|
background-color: rgba(245, 246, 247, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.submit {
|
||||||
|
width: 126px;
|
||||||
|
height: 46px;
|
||||||
|
background: #2478ff;
|
||||||
|
box-shadow: 0px 1px 8px 0px rgba(56, 125, 247, 0.7);
|
||||||
|
border-radius: 4px;
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 800;
|
||||||
|
color: #ffffff;
|
||||||
|
line-height: 24px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
cursor: pointer;
|
||||||
|
margin-top: 39px;
|
||||||
|
margin-bottom: 30px;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user