Merge branch 'zcwy-zsx' into 'master'

Zcwy zsx

See merge request !57
This commit is contained in:
joshen
2024-07-12 18:26:02 +08:00
4 changed files with 61 additions and 21 deletions

View File

@@ -32,6 +32,7 @@ export const TASK_VOTE_DETAIL = '/stu/task/vote/detail'
export const TASK_WORK_COMMIT = '/workSubmit/submitStudentWorkDetail post' export const TASK_WORK_COMMIT = '/workSubmit/submitStudentWorkDetail post'
export const TASK_WORK_DETAIL = '/workSubmit/getWorkDetailByTaskId' export const TASK_WORK_DETAIL = '/workSubmit/getWorkDetailByTaskId'
export const TASK_WORK_SUBMIT_LIST = '/workSubmit/queryWorkSubmitDetailById' export const TASK_WORK_SUBMIT_LIST = '/workSubmit/queryWorkSubmitDetailById'
export const SUB_STUDENT_DETAIL = `/workSubmit/submitStudentNoWorkDetail post`
// 查询学员端是否导入了作业成绩 // 查询学员端是否导入了作业成绩
export const WhetherImportHomeWorkScore = '/admin/student/whetherImportHomeWorkScore post' export const WhetherImportHomeWorkScore = '/admin/student/whetherImportHomeWorkScore post'
@@ -55,7 +56,7 @@ export const VOTE_DETAIL2 = `/voteSubmit/queryVoteTaskDetailById post`
export const VOTE_DETAIL3 = voteId => `/vote/queryVoteById?voteId=${voteId}` export const VOTE_DETAIL3 = voteId => `/vote/queryVoteById?voteId=${voteId}`
// 投票详情接口 // 投票详情接口
export const VOTE_DETAIL_SUBMIT = `/voteSubmit/vote/commit post` export const VOTE_DETAIL_SUBMIT = `/voteSubmit/vote/commit post`
export const NO_COMMIT = `/voteSubmit/vote/nocommit post`
export const COMMENT_ADD = '/comment/add post' export const COMMENT_ADD = '/comment/add post'
export const COMMENT_PRAISE = '/comment/praise' export const COMMENT_PRAISE = '/comment/praise'
export const COMMENT_COLLECTION = '/comment/collection post' export const COMMENT_COLLECTION = '/comment/collection post'
@@ -63,7 +64,7 @@ export const COMMENT_COLLECTION = '/comment/collection post'
export const ASSESSMENT_SUBMIT_QUERY = assessmentId => `/assessmentSubmit/queryAssessmentSubmitDetailById?assessmentSubmitId=${assessmentId} post` export const ASSESSMENT_SUBMIT_QUERY = assessmentId => `/assessmentSubmit/queryAssessmentSubmitDetailById?assessmentSubmitId=${assessmentId} post`
export const ASSESSMENT_QUERY = assessmentId => `/stu/task/queryAssessmentDetailById` export const ASSESSMENT_QUERY = assessmentId => `/stu/task/queryAssessmentDetailById`
export const ASSESSMENT_SUBMIT = '/stu/task/evaluate/commit post' export const ASSESSMENT_SUBMIT = '/stu/task/evaluate/commit post'
export const TASK_NO_COMMIT = `/stu/task/evaluate/nocommit post`
export const ACTIVITY = '/activity' export const ACTIVITY = '/activity'
export const STUDY_RECORD = '/stu/task/thirdTask/submit post' export const STUDY_RECORD = '/stu/task/thirdTask/submit post'

View File

@@ -187,7 +187,7 @@
</template> </template>
<script setup> <script setup>
import {useRequest} from "@/api/request"; import {useRequest} from "@/api/request";
import {VOTE_DETAIL3, VOTE_DETAIL_SUBMIT, EditVoteInvolvedAndBrowse} from "@/api/api"; import {VOTE_DETAIL3, VOTE_DETAIL_SUBMIT, EditVoteInvolvedAndBrowse,NO_COMMIT} from "@/api/api";
import dayjs from "dayjs"; import dayjs from "dayjs";
import store from "@/store"; import store from "@/store";
import {ElMessage} from "element-plus"; import {ElMessage} from "element-plus";
@@ -209,7 +209,24 @@ const answerTime = dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss");
// 增加浏览量 // 增加浏览量
watch(dataInfo, () => { 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,
chapterOrStageId: chapterOrStageId ? chapterOrStageId : 0,
result: JSON.stringify(dataInfo.value),
targetId: infoId, // 项目 路径图 id
taskId: id,
type: btype, // 1 项目 2 路径图
voteId: dataInfo.value.id,
voteName: dataInfo.value.voteName,
studentId: userInfo.value.userId,
studentName: userInfo.value.realName,
}
useRequest(NO_COMMIT, noCommitParams);
}
noCommit()
});
}) })
// 选择题目 // 选择题目

View File

@@ -448,6 +448,7 @@ import {
TASK_WORK_COMMIT, TASK_WORK_COMMIT,
TASK_WORK_DETAIL, TASK_WORK_DETAIL,
TASK_WORK_SUBMIT_LIST, TASK_WORK_SUBMIT_LIST,
SUB_STUDENT_DETAIL,
WhetherImportHomeWorkScore, WhetherImportHomeWorkScore,
WORK_HISTROY, WORK_HISTROY,
} from "@/api/api"; } from "@/api/api";
@@ -571,7 +572,19 @@ const handleClick = () => {
loading.value.close() loading.value.close()
}); });
}; };
const handleSub = () => {
request(SUB_STUDENT_DETAIL,{
projectOrRouterLogo: type,
workUploadContent: sbValue.value.content,
workUploadAddress: fileList.value.map((e) => e.url).join(",") || "",
workId,
type,
taskId: taskId || infoId,
workScore: -1,
submitStartTime:answerTime
})
}
handleSub()
function clearFiles() { function clearFiles() {
uploadRef.value.clearFiles(); uploadRef.value.clearFiles();
} }

View File

@@ -30,14 +30,14 @@
</div> </div>
<!-- 面包屑导航 --> <!-- 面包屑导航 -->
<!-- 标题 --> <!-- 标题 -->
<div class="title">评估{{ data.assessmentName }}</div> <div class="title">评估{{ data?.assessmentName }}</div>
<!-- 标题 --> <!-- 标题 -->
<!-- 基本信息 --> <!-- 基本信息 -->
<div class="bascinfo"> <div class="bascinfo">
<div class="header_wrap" v-if="data.projectInfoList&&data.projectInfoList.length!=0&&type!=1"> <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" v-if="level!=0">项目名称{{ data?.projectInfoList[0].projectName }}</div>
<div class="header_wrap_item">开课名称{{ data.projectInfoList[0].courseName }}</div> <div class="header_wrap_item">开课名称{{ data?.projectInfoList[0].courseName }}</div>
<div>培训讲师{{ data.projectInfoList.map(item => item.teacherName).join('') }}</div> <div>培训讲师{{ data?.projectInfoList.map(item => item.teacherName).join('') }}</div>
</div> </div>
<div> <div>
<div class="question" v-for="(value, index) in questionList " :key="index" <div class="question" v-for="(value, index) in questionList " :key="index"
@@ -64,7 +64,7 @@
}" }"
@click=" @click="
() => { () => {
if (data.isSubmit) { if (data?.isSubmit) {
return; return;
} }
value.selectAnswer = item + 1 ; value.selectAnswer = item + 1 ;
@@ -91,7 +91,7 @@
style="display: flex; align-items: center;cursor: pointer;flex-direction: column;" style="display: flex; align-items: center;cursor: pointer;flex-direction: column;"
@click=" @click="
() => { () => {
if (data.isSubmit) { if (data?.isSubmit) {
return; return;
} }
value.assessmentSingleChoiceVoList.forEach((e) => e.select = false); value.assessmentSingleChoiceVoList.forEach((e) => e.select = false);
@@ -127,7 +127,7 @@
style="display: flex; align-items: center;cursor: pointer;flex-direction: column;" style="display: flex; align-items: center;cursor: pointer;flex-direction: column;"
@click=" @click="
() => { () => {
if (data.isSubmit) { if (data?.isSubmit) {
return; return;
} }
values.select = !values.select; values.select = !values.select;
@@ -151,26 +151,26 @@
<div class="text">{{ value.assessmentQaTitle }}</div> <div class="text">{{ value.assessmentQaTitle }}</div>
<div style="width: 713px; margin-top: 31px; position: relative"> <div style="width: 713px; margin-top: 31px; position: relative">
<el-input v-model="value.content" :autosize="{ minRows: 5, maxRows: 5 }" resize="none" maxlength="200" <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 class="words">{{ value.content?.length || 0 }}/200</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div style="display: flex; justify-content: center" v-if=" <div style="display: flex; justify-content: center" v-if="
data.essayQuestionVoList?.length || data?.essayQuestionVoList?.length ||
data.multipleStemVoList?.length || data?.multipleStemVoList?.length ||
data.scoringQuestionVoList?.length || data?.scoringQuestionVoList?.length ||
data.singleStemVoList?.length data?.singleStemVoList?.length
"> ">
<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="emptyValuePromp" :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="emptyValuePromp" :style="{ background: data.isSubmit ? '#999' : '#2478ff' }"> <div class="submit" @click="emptyValuePromp" :style="{ background: data?.isSubmit ? '#999' : '#2478ff' }">
提交 提交
</div> </div>
</div> </div>
@@ -239,7 +239,7 @@ import checkbox from "@/assets/image/checkbox.png";
import checkbox2 from "@/assets/image/checkbox2.png"; import checkbox2 from "@/assets/image/checkbox2.png";
import {useRoute, useRouter} from "vue-router/dist/vue-router"; 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,TASK_NO_COMMIT} from "@/api/api";
import {ElMessage} from "element-plus"; import {ElMessage} from "element-plus";
import {ref, watch,onMounted,nextTick } from "vue"; import {ref, watch,onMounted,nextTick } from "vue";
import dayjs from "dayjs"; import dayjs from "dayjs";
@@ -309,6 +309,15 @@ onMounted(() => {
chapterOrStageId, chapterOrStageId,
targetId: infoId ? infoId : 0 targetId: infoId ? infoId : 0
},(res)=>{ },(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) { if (res.data.isSubmit) {
open(); open();
} }