Merge branch '0617-project' into dev0731

This commit is contained in:
zhangsir
2024-06-21 19:24:48 +08:00
2 changed files with 42 additions and 44 deletions

View File

@@ -209,7 +209,7 @@ const answerTime = dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss");
// 增加浏览量
watch(dataInfo, () => {
useRequest(EditVoteInvolvedAndBrowse, {operationType:'2', voteId:dataInfo.value.id });
useRequest(EditVoteInvolvedAndBrowse, {operationType:'2', voteId:dataInfo.value.id },(res)=>{
const noCommit = () => {
let noCommitParams = {
beginTime: answerTime,
@@ -226,6 +226,7 @@ watch(dataInfo, () => {
useRequest(NO_COMMIT, noCommitParams);
}
noCommit()
});
})
// 选择题目

View File

@@ -30,14 +30,14 @@
</div>
<!-- 面包屑导航 -->
<!-- 标题 -->
<div class="title">评估{{ data.assessmentName }}</div>
<div class="title">评估{{ data?.assessmentName }}</div>
<!-- 标题 -->
<!-- 基本信息 -->
<div class="bascinfo">
<div class="header_wrap" v-if="data.projectInfoList&&data.projectInfoList.length!=0&&type!=1">
<div class="header_wrap_item" v-if="level!=0">项目名称{{ data.projectInfoList[0].projectName }}</div>
<div class="header_wrap_item">开课名称{{ data.projectInfoList[0].courseName }}</div>
<div>培训讲师{{ data.projectInfoList.map(item => item.teacherName).join('') }}</div>
<div class="header_wrap" v-if="data?.projectInfoList&&data?.projectInfoList.length!=0&&type!=1">
<div class="header_wrap_item" v-if="level!=0">项目名称{{ data?.projectInfoList[0].projectName }}</div>
<div class="header_wrap_item">开课名称{{ data?.projectInfoList[0].courseName }}</div>
<div>培训讲师{{ data?.projectInfoList.map(item => item.teacherName).join('') }}</div>
</div>
<div>
<div class="question" v-for="(value, index) in questionList " :key="index"
@@ -64,7 +64,7 @@
}"
@click="
() => {
if (data.isSubmit) {
if (data?.isSubmit) {
return;
}
value.selectAnswer = item + 1 ;
@@ -91,7 +91,7 @@
style="display: flex; align-items: center;cursor: pointer;flex-direction: column;"
@click="
() => {
if (data.isSubmit) {
if (data?.isSubmit) {
return;
}
value.assessmentSingleChoiceVoList.forEach((e) => e.select = false);
@@ -127,7 +127,7 @@
style="display: flex; align-items: center;cursor: pointer;flex-direction: column;"
@click="
() => {
if (data.isSubmit) {
if (data?.isSubmit) {
return;
}
values.select = !values.select;
@@ -151,26 +151,26 @@
<div class="text">{{ value.assessmentQaTitle }}</div>
<div style="width: 713px; margin-top: 31px; position: relative">
<el-input v-model="value.content" :autosize="{ minRows: 5, maxRows: 5 }" resize="none" maxlength="200"
type="textarea" :readonly="!!data.isSubmit"/>
type="textarea" :readonly="!!data?.isSubmit"/>
<div class="words">{{ value.content?.length || 0 }}/200</div>
</div>
</div>
</div>
</div>
<div style="display: flex; justify-content: center" v-if="
data.essayQuestionVoList?.length ||
data.multipleStemVoList?.length ||
data.scoringQuestionVoList?.length ||
data.singleStemVoList?.length
data?.essayQuestionVoList?.length ||
data?.multipleStemVoList?.length ||
data?.scoringQuestionVoList?.length ||
data?.singleStemVoList?.length
">
<div v-if="projectStatus && projectEndTime">
<div v-if="projectStatus !=='3' && new Date(projectEndTime).getTime() > new Date().getTime()" class="submit"
@click="emptyValuePromp" :style="{ background: data.isSubmit ? '#999' : '#2478ff' }">
@click="emptyValuePromp" :style="{ background: data?.isSubmit ? '#999' : '#2478ff' }">
提交
</div>
</div>
<div v-else>
<div class="submit" @click="emptyValuePromp" :style="{ background: data.isSubmit ? '#999' : '#2478ff' }">
<div class="submit" @click="emptyValuePromp" :style="{ background: data?.isSubmit ? '#999' : '#2478ff' }">
提交
</div>
</div>
@@ -309,6 +309,15 @@ onMounted(() => {
chapterOrStageId,
targetId: infoId ? infoId : 0
},(res)=>{
useRequest(TASK_NO_COMMIT, {
targetId: infoId ? infoId : 0, // 项目、路径图或开课的Id
chapterOrStageId: chapterOrStageId ? chapterOrStageId : 0, // 关卡或者阶段Id 关卡Id不允许为空
assessmentId: courseId,
taskId: taskId ? taskId : 0,
type,
result: JSON.stringify(data.value),
beginTime: answerTime
})
if (res.data.isSubmit) {
open();
}
@@ -361,18 +370,6 @@ function submit() {
});
}
const noCommit = () => {
useRequest(TASK_NO_COMMIT, {
targetId: infoId ? infoId : 0, // 项目、路径图或开课的Id
chapterOrStageId: chapterOrStageId ? chapterOrStageId : 0, // 关卡或者阶段Id 关卡Id不允许为空
assessmentId: courseId,
taskId: taskId ? taskId : 0,
type,
result: JSON.stringify(data.value),
beginTime: answerTime
})
}
noCommit()
</script>
<style lang="scss">
.selectonlineface{