mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-07 01:46:46 +08:00
feat:增加提交评估二次提示
This commit is contained in:
@@ -158,12 +158,12 @@
|
|||||||
">
|
">
|
||||||
<div v-if="projectStatus && projectEndTime">
|
<div v-if="projectStatus && projectEndTime">
|
||||||
<div v-if="projectStatus !=='3' && new Date(projectEndTime).getTime() > new Date().getTime()" class="submit"
|
<div v-if="projectStatus !=='3' && new Date(projectEndTime).getTime() > new Date().getTime()" class="submit"
|
||||||
@click="submit" :style="{ background: data.isSubmit ? '#999' : '#2478ff' }">
|
@click="emptyValuePromp" :style="{ background: data.isSubmit ? '#999' : '#2478ff' }">
|
||||||
提交
|
提交
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<div class="submit" @click="submit" :style="{ background: data.isSubmit ? '#999' : '#2478ff' }">
|
<div class="submit" @click="emptyValuePromp" :style="{ background: data.isSubmit ? '#999' : '#2478ff' }">
|
||||||
提交
|
提交
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -189,6 +189,24 @@
|
|||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
<!-- 提示用户有未填选项 -->
|
||||||
|
<el-dialog v-model="isEmptyValue" title="" width="20%" center :show-close="false" :align-center="true">
|
||||||
|
<div style="text-align: center;font-size:16px;"> <span style="color:black">
|
||||||
|
您还有未完成的评估题目,您确认提交么?
|
||||||
|
</span></div>
|
||||||
|
<template #footer>
|
||||||
|
<span class="dialog-footer">
|
||||||
|
<el-button class="cancel"
|
||||||
|
style="color: #387DF7; border: 1px solid #387DF7;padding: 8px 32px; border-radius: 4px;"
|
||||||
|
@click="isEmptyValue = false">取消</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="submit">
|
||||||
|
确定
|
||||||
|
</el-button>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import checkbox from "@/assets/image/checkbox.png";
|
import checkbox from "@/assets/image/checkbox.png";
|
||||||
@@ -260,24 +278,32 @@ const open = () => {
|
|||||||
centerDialogVisible.value = true;
|
centerDialogVisible.value = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
function submit() {
|
|
||||||
console.log("录入首次进入页面时间", answerTime);
|
const isEmptyValue = ref(false);
|
||||||
if (data.value.isSubmit) {
|
function emptyValuePromp() {
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (data.value.singleStemVoList?.some(t=>t?.assessmentSingleChoiceVoList?.every(s => !s?.select))) {
|
if (data.value.singleStemVoList?.some(t=>t?.assessmentSingleChoiceVoList?.every(s => !s?.select))) {
|
||||||
return ElMessage.warning("您有未填写的单选评估题干");
|
isEmptyValue.value = true;
|
||||||
|
// return ElMessage.warning("您有未填写的单选评估题干");
|
||||||
}
|
}
|
||||||
if (data.value.multipleStemVoList?.some(t=>t?.multipleChoiceVoList?.every(s => !s?.select))) {
|
if (data.value.multipleStemVoList?.some(t=>t?.multipleChoiceVoList?.every(s => !s?.select))) {
|
||||||
return ElMessage.warning("您有未填写的多选评估题干");
|
isEmptyValue.value = true;
|
||||||
|
// return ElMessage.warning("您有未填写的多选评估题干");
|
||||||
}
|
}
|
||||||
if (data.value.scoringQuestionVoList?.some(s => !s?.selectAnswer)) {
|
if (data.value.scoringQuestionVoList?.some(s => !s?.selectAnswer)) {
|
||||||
return ElMessage.warning("您有未填写的评分评估题干");
|
isEmptyValue.value = true;
|
||||||
|
// return ElMessage.warning("您有未填写的评分评估题干");
|
||||||
}
|
}
|
||||||
if (data.value.essayQuestionVoList?.some(s => !s?.content)) {
|
if (data.value.essayQuestionVoList?.some(s => !s?.content)) {
|
||||||
return ElMessage.warning("您有未填写的简答评估题干");
|
isEmptyValue.value = true;
|
||||||
|
// return ElMessage.warning("您有未填写的简答评估题干");
|
||||||
|
}
|
||||||
|
if(!isEmptyValue.value){
|
||||||
|
submit()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function submit() {
|
||||||
|
console.log("录入首次进入页面时间", answerTime);
|
||||||
data.value.isSubmit = !data.value.isSubmit;
|
data.value.isSubmit = !data.value.isSubmit;
|
||||||
request(ASSESSMENT_SUBMIT, {
|
request(ASSESSMENT_SUBMIT, {
|
||||||
targetId: infoId ? infoId : 0, // 项目、路径图或开课的Id
|
targetId: infoId ? infoId : 0, // 项目、路径图或开课的Id
|
||||||
@@ -288,6 +314,7 @@ function submit() {
|
|||||||
result: JSON.stringify(data.value),
|
result: JSON.stringify(data.value),
|
||||||
beginTime: answerTime
|
beginTime: answerTime
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
|
isEmptyValue.value = false;
|
||||||
open();
|
open();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user