mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-10 19:36:48 +08:00
Merge branch 'develop' of http://gitlab.dongwu-inc.com:10080/BOE/fe-stu into manage-release
This commit is contained in:
2
.env
2
.env
@@ -15,5 +15,7 @@ VITE_BOE_EXAM_DETAIL_URL=//u-pre.boe.com/pc/exam/test?id=
|
|||||||
VITE_BOE_PATH_DETAIL_URL=//u-pre.boe.com/pc/forward?to=/fe-student
|
VITE_BOE_PATH_DETAIL_URL=//u-pre.boe.com/pc/forward?to=/fe-student
|
||||||
|
|
||||||
VITE_BOE_API_URL=https://u-pre.boe.com
|
VITE_BOE_API_URL=https://u-pre.boe.com
|
||||||
|
#用户头像
|
||||||
|
VITE_AVATAR_PATH=/upload/
|
||||||
|
|
||||||
VITE_TASK_WHITE_TYPE=-22-
|
VITE_TASK_WHITE_TYPE=-22-
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
VITE_BASE=/fe-student
|
VITE_BASE=/fe-student
|
||||||
VITE_BASE_API=/manageApi
|
VITE_BASE_API=/manageApi
|
||||||
VITE_BASE_LOGIN_URL=//u.boe.com/web/
|
VITE_BASE_LOGIN_URL=//u.boe.com/web/
|
||||||
|
VITE_FILE_PATH=/upload/boe/file/
|
||||||
|
|
||||||
VITE_BOE_ONLINE_CLASS_URL=//u.boe.com/pc/course/studyindex?id=
|
VITE_BOE_ONLINE_CLASS_URL=//u.boe.com/pc/course/studyindex?id=
|
||||||
VITE_BOE_CASS_DETAIL_URL=//u.boe.com/pc/case/detail?id=
|
VITE_BOE_CASS_DETAIL_URL=//u.boe.com/pc/case/detail?id=
|
||||||
@@ -11,5 +11,7 @@ VITE_BOE_EXAM_DETAIL_URL=//u.boe.com/pc/exam/test?id=
|
|||||||
VITE_BOE_PATH_DETAIL_URL=//u.boe.com/pc/forward?to=/fe-student
|
VITE_BOE_PATH_DETAIL_URL=//u.boe.com/pc/forward?to=/fe-student
|
||||||
|
|
||||||
VITE_BOE_API_URL=https://u.boe.com
|
VITE_BOE_API_URL=https://u.boe.com
|
||||||
|
#用户头像
|
||||||
|
VITE_AVATAR_PATH=/upload/
|
||||||
|
|
||||||
VITE_TASK_WHITE_TYPE==-22-
|
VITE_TASK_WHITE_TYPE==-22-
|
||||||
|
|||||||
@@ -9,4 +9,7 @@ VITE_BOE_TEST_OUT_DETAIL_URL=//u.boe.com/api/b1/tale/do-quiz?quizKid=
|
|||||||
VITE_BOE_EXAM_DETAIL_URL=//u.boe.com/pc-release/exam/test?id=
|
VITE_BOE_EXAM_DETAIL_URL=//u.boe.com/pc-release/exam/test?id=
|
||||||
VITE_BOE_PATH_DETAIL_URL=//u.boe.com/pc-release/forward?to=/fe-student-release
|
VITE_BOE_PATH_DETAIL_URL=//u.boe.com/pc-release/forward?to=/fe-student-release
|
||||||
|
|
||||||
|
#用户头像
|
||||||
|
VITE_AVATAR_PATH=/upload/
|
||||||
|
|
||||||
VITE_BOE_API_URL=https://u.boe.com
|
VITE_BOE_API_URL=https://u.boe.com
|
||||||
@@ -375,7 +375,8 @@ const handleClick = (tab, event) => {
|
|||||||
const fielPath = ref(import.meta.env.VITE_FILE_PATH);
|
const fielPath = ref(import.meta.env.VITE_FILE_PATH);
|
||||||
const download = (url) => {
|
const download = (url) => {
|
||||||
console.log('下载url',fielPath.value+url)
|
console.log('下载url',fielPath.value+url)
|
||||||
window.open(fielPath.value+url);
|
//window.open(fielPath.value+url);
|
||||||
|
window.open(url);
|
||||||
};
|
};
|
||||||
const downloads = (url) => {
|
const downloads = (url) => {
|
||||||
ElMessage.warning("未在有效时间范围内,请耐心等待!");
|
ElMessage.warning("未在有效时间范围内,请耐心等待!");
|
||||||
|
|||||||
@@ -63,7 +63,7 @@
|
|||||||
</botton>
|
</botton>
|
||||||
|
|
||||||
<botton class="btn" :style="{
|
<botton class="btn" :style="{
|
||||||
background: `${new Date(data.liveStartTime).getTime() > new Date().getTime() ? '#999' : data.signFlag ? '#999' : 'rgb(57, 146, 249)'}`,
|
background: `${new Date(data.liveStartTime).getTime() > new Date().getTime() ? '#999' : data.signFlag ? '#999' : 'rgb(59, 191, 252)'}`,
|
||||||
}" @click="signClick">{{ data.signFlag ? "已签到" : "签到" }}
|
}" @click="signClick">{{ data.signFlag ? "已签到" : "签到" }}
|
||||||
</botton>
|
</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">
|
||||||
@@ -71,7 +71,7 @@
|
|||||||
</botton> -->
|
</botton> -->
|
||||||
|
|
||||||
<botton :style="{
|
<botton :style="{
|
||||||
background: `${new Date(data.liveStartTime).getTime() > new Date().getTime() ? '#999' : data.isSurvery ? '#999' : 'rgb(57, 146, 249)'}`,
|
background: `${new Date(data.liveStartTime).getTime() > new Date().getTime() ? '#999' : data.isSurvery ? '#999' : 'rgb(59, 191, 252)'}`,
|
||||||
}" class="btn" @click="commitClick" v-if="data.isEvaluate && data.isEvaluate == 1">{{
|
}" class="btn" @click="commitClick" v-if="data.isEvaluate && data.isEvaluate == 1">{{
|
||||||
data.isSurvery ? "已评估" :
|
data.isSurvery ? "已评估" :
|
||||||
"评估"
|
"评估"
|
||||||
@@ -80,7 +80,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div v-else class="threeBtn">
|
<div v-else class="threeBtn">
|
||||||
<botton :style="{
|
<botton :style="{
|
||||||
background: `${new Date(data.liveStartTime).getTime() > new Date().getTime() ? '#999' : data.isSurvery ? '#999' : 'rgb(57, 146, 249)'}`,
|
background: `${new Date(data.liveStartTime).getTime() > new Date().getTime() ? '#999' : data.isSurvery ? '#999' : 'rgb(59, 191, 252)'}`,
|
||||||
}" class="btn" @click="commitClick" v-if="data.isEvaluate && data.isEvaluate == 1&&data.isSurvery">{{
|
}" class="btn" @click="commitClick" v-if="data.isEvaluate && data.isEvaluate == 1&&data.isSurvery">{{
|
||||||
data.isSurvery ? "已评估" :
|
data.isSurvery ? "已评估" :
|
||||||
"评估"
|
"评估"
|
||||||
@@ -109,7 +109,7 @@
|
|||||||
</botton> -->
|
</botton> -->
|
||||||
|
|
||||||
<botton :style="{
|
<botton :style="{
|
||||||
background: `${new Date(data.liveStartTime).getTime() > new Date().getTime() ? '#999' : data.isSurvery ? '#999' : 'rgb(57, 146, 249)'}`,
|
background: `${new Date(data.liveStartTime).getTime() > new Date().getTime() ? '#999' : data.isSurvery ? '#999' : 'rgb(59, 191, 252)'}`,
|
||||||
}" class="btn" @click="commitClick" v-if="data.isEvaluate && data.isEvaluate == 1">{{
|
}" class="btn" @click="commitClick" v-if="data.isEvaluate && data.isEvaluate == 1">{{
|
||||||
data.isSurvery ? "已评估" :
|
data.isSurvery ? "已评估" :
|
||||||
"评估"
|
"评估"
|
||||||
@@ -177,9 +177,9 @@
|
|||||||
<img class="peopleimg" :src="teacherInfo.avatar"/>
|
<img class="peopleimg" :src="teacherInfo.avatar"/>
|
||||||
<div style="margin-left: 17px; width: 190px">
|
<div style="margin-left: 17px; width: 190px">
|
||||||
<div class="teacherName" style="margin-right: 5px">
|
<div class="teacherName" style="margin-right: 5px">
|
||||||
{{ data.userInfoBo?.userName }}
|
{{ teacherInfo?.realName}}
|
||||||
</div>
|
</div>
|
||||||
<div class="introduce">{{ data.userInfoBo?.bandDesc }}</div>
|
<div class="introduce">{{ teacherInfo?.bandDesc }}</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="follow">+ 关注</div>-->
|
<!-- <div class="follow">+ 关注</div>-->
|
||||||
</div>
|
</div>
|
||||||
@@ -202,7 +202,7 @@ import {ElMessage} from "element-plus";
|
|||||||
import {useTaskPage} from "@/api/useCommon";
|
import {useTaskPage} from "@/api/useCommon";
|
||||||
|
|
||||||
const {
|
const {
|
||||||
query: {courseId: liveId, id: taskId, type, pName, sName, projectStatus, projectEndTime},
|
query: {courseId: liveId, id: taskId, type, pName, sName, projectStatus, projectEndTime, infoId},
|
||||||
} = useRoute();
|
} = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const returnclick = () => {
|
const returnclick = () => {
|
||||||
@@ -212,7 +212,7 @@ const returnclick = () => {
|
|||||||
const {data} = useRequest(TASK_BROADCAST_DETAIL, {liveId,type});
|
const {data} = useRequest(TASK_BROADCAST_DETAIL, {liveId,type});
|
||||||
console.log('直播信息', data)
|
console.log('直播信息', data)
|
||||||
const teacherInfo = useUserInfo(
|
const teacherInfo = useUserInfo(
|
||||||
computed(() => data.value?.userInfoBo?.userId)
|
computed(() => data.value?.liveTeacherId)
|
||||||
);
|
);
|
||||||
|
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
@@ -303,6 +303,7 @@ function isSignClick() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
watch(data, () => {
|
watch(data, () => {
|
||||||
|
console.log(teacherInfo)
|
||||||
isSignClick();
|
isSignClick();
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -325,18 +326,18 @@ const commitClick = () => {
|
|||||||
|
|
||||||
console.log({
|
console.log({
|
||||||
courseId: data.value.assessmentId,
|
courseId: data.value.assessmentId,
|
||||||
taskIds: taskId,
|
infoId: liveId,
|
||||||
chapterOrStageId: 0,
|
chapterOrStageId: 0,
|
||||||
pName: "直播",
|
pName: "直播",
|
||||||
sName: data.value.liveName,
|
sName: data.value.liveName,
|
||||||
type: 4
|
type: 4
|
||||||
})
|
})
|
||||||
|
console.log(data.value)
|
||||||
router.push({
|
router.push({
|
||||||
path: "/surveydetail",
|
path: "/surveydetail",
|
||||||
query: {
|
query: {
|
||||||
courseId: data.value.assessmentId,
|
courseId: data.value.assessmentId,
|
||||||
infoId: data.value.liveId,
|
infoId: liveId,
|
||||||
chapterOrStageId: 0,
|
chapterOrStageId: 0,
|
||||||
pName: "直播",
|
pName: "直播",
|
||||||
sName: data.value.liveName,
|
sName: data.value.liveName,
|
||||||
|
|||||||
@@ -22,8 +22,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="return">
|
<div class="return">
|
||||||
<div style="display: flex" @click="returnclick">
|
<div style="display: flex" @click="returnclick">
|
||||||
<el-button style="color:#0073FB"> <img class="img2" style="margin-right:11px;cursor: pointer;"
|
<el-button style="color:#0073FB"><img class="img2" style="margin-right:11px;cursor: pointer;"
|
||||||
src="../../assets/image/return.png" />返回</el-button>
|
src="../../assets/image/return.png"/>返回
|
||||||
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -34,21 +35,14 @@
|
|||||||
<!-- 基本信息 -->
|
<!-- 基本信息 -->
|
||||||
<div class="bascinfo">
|
<div class="bascinfo">
|
||||||
<div>
|
<div>
|
||||||
<!-- {{ [data.assessmentEssayQuestionDtoList,data.assessmentMultipleChoiceDtoList,data.assessmentScoringQuestionDtoList,data.assessmentSingleChoiceDtoList].sort((a,b)=>{
|
<div class="question" v-for="(value, index) in questionList " :key="index"
|
||||||
return a[0].orderNumber - b[0].orderNumber
|
:style="{ 'margin-top': index === 0 ? '57px' : '41px' }">
|
||||||
}) }} -->
|
|
||||||
|
|
||||||
<div class="question" v-for="(value, index) in questionList " :key="index" :style="{ 'margin-top': index === 0 ? '57px' : '41px' }">
|
|
||||||
<div v-if="value.questionType == '4'">
|
<div v-if="value.questionType == '4'">
|
||||||
<div class="question" :style="{ 'margin-top': index === 0 ? '57px' : '41px' }">
|
<div class="question" :style="{ 'margin-top': index === 0 ? '57px' : '41px' }">
|
||||||
<div class="text">{{ value.assessmentScTitle }}</div>
|
<div class="text">{{ value.assessmentScTitle }}</div>
|
||||||
<div class="answer">
|
<div class="answer">
|
||||||
<div class="answerL">完全没用</div>
|
<div class="answerL">完全没用</div>
|
||||||
<div class="answerC">
|
<div class="answerC">
|
||||||
<!-- v-for="(item, key) in Array.from(
|
|
||||||
{ length: value.assessmentMaxScore },
|
|
||||||
(k, i) => i
|
|
||||||
)" -->
|
|
||||||
<div class="answerCitem"
|
<div class="answerCitem"
|
||||||
v-for="(item, key) in orderArr(value.assessmentMinScore,value.assessmentMaxScore)"
|
v-for="(item, key) in orderArr(value.assessmentMinScore,value.assessmentMaxScore)"
|
||||||
:key="key"
|
:key="key"
|
||||||
@@ -95,16 +89,18 @@
|
|||||||
if (data.isSubmit) {
|
if (data.isSubmit) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
value.assessmentSingleChoiceVoList.forEach((e) => {
|
value.assessmentSingleChoiceVoList.forEach((e) => e.select = false);
|
||||||
e.select = false;
|
values.select = true;
|
||||||
});
|
}
|
||||||
values.select = true;}
|
|
||||||
">
|
">
|
||||||
<div style="display:flex">
|
<div style="display:flex">
|
||||||
<img style="width: 19px; height: 18px; cursor: pointer" :src="values.select ? checkbox : checkbox2" />
|
<img style="width: 19px; height: 18px; cursor: pointer"
|
||||||
|
:src="values.select ? checkbox : checkbox2"/>
|
||||||
<div class="people">{{ values.singleOptionName }}</div>
|
<div class="people">{{ values.singleOptionName }}</div>
|
||||||
</div>
|
</div>
|
||||||
<img v-if="values.singleOptionPictureAddress" style="width: 140px; height: 140px; border-radius: 8px;margin-left: 130px;margin-top: 12px;" :src="values.singleOptionPictureAddress ? fielPath + values.singleOptionPictureAddress : ''" />
|
<img v-if="values.singleOptionPictureAddress"
|
||||||
|
style="width: 140px; height: 140px; border-radius: 8px;margin-left: 130px;margin-top: 12px;"
|
||||||
|
:src="values.singleOptionPictureAddress ? fielPath + values.singleOptionPictureAddress : ''"/>
|
||||||
<div v-else style="width: 140px;height: 140px;"></div>
|
<div v-else style="width: 140px;height: 140px;"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -130,10 +126,13 @@
|
|||||||
values.select = !values.select;
|
values.select = !values.select;
|
||||||
}">
|
}">
|
||||||
<div style="display:flex">
|
<div style="display:flex">
|
||||||
<img style="width: 19px; height: 18px; cursor: pointer" :src="values.select ? checkbox : checkbox2" />
|
<img style="width: 19px; height: 18px; cursor: pointer"
|
||||||
|
:src="values.select ? checkbox : checkbox2"/>
|
||||||
<div class="people">{{ values.multipleOptionName }}</div>
|
<div class="people">{{ values.multipleOptionName }}</div>
|
||||||
</div>
|
</div>
|
||||||
<img v-if="values.multipleOptionPictureAddress" style="width: 140px; height: 140px; border-radius: 8px;margin-left: 130px;margin-top: 12px;" :src="values.multipleOptionPictureAddress ? fielPath + values.multipleOptionPictureAddress : ''" />
|
<img v-if="values.multipleOptionPictureAddress"
|
||||||
|
style="width: 140px; height: 140px; border-radius: 8px;margin-left: 130px;margin-top: 12px;"
|
||||||
|
:src="values.multipleOptionPictureAddress ? fielPath + values.multipleOptionPictureAddress : ''"/>
|
||||||
<div v-else style="width: 140px;height: 140px;"></div>
|
<div v-else style="width: 140px;height: 140px;"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -145,158 +144,21 @@
|
|||||||
<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
|
|
||||||
class="question"
|
|
||||||
v-for="(value, index) in data.assessmentScoringQuestionDtoList"
|
|
||||||
:key="index"
|
|
||||||
:style="{ 'margin-top': index === 0 ? '57px' : '41px' }"
|
|
||||||
>
|
|
||||||
<div class="text">{{ value.assessmentScTitle }}</div>
|
|
||||||
<div class="answer">
|
|
||||||
<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="{
|
|
||||||
'margin-left': key === 0 ? '15px' : '10px',
|
|
||||||
background:
|
|
||||||
value.selectAnswer === item
|
|
||||||
? 'rgba(86, 163, 249, 1)'
|
|
||||||
: 'rgba(86, 163, 249, 0)',
|
|
||||||
color:
|
|
||||||
value.selectAnswer === item
|
|
||||||
? '#fff'
|
|
||||||
: 'rgba(86, 163, 249, 1)',
|
|
||||||
}"
|
|
||||||
@click="
|
|
||||||
() => {
|
|
||||||
if (data.isSubmit) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
value.selectAnswer = item;
|
|
||||||
}
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<div>{{ item + 1 }}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="answerR">非常有帮助/启发</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div
|
|
||||||
class="question"
|
|
||||||
style="margin-top: 41px"
|
|
||||||
v-if="
|
|
||||||
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="
|
|
||||||
() => {
|
|
||||||
if (data.isSubmit) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
data.assessmentSingleChoiceDtoList.forEach((e) => {
|
|
||||||
e.select = false;
|
|
||||||
});
|
|
||||||
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
|
|
||||||
class="question"
|
|
||||||
style="margin-top: 41px"
|
|
||||||
v-if="
|
|
||||||
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="
|
|
||||||
() => {
|
|
||||||
if (data.isSubmit) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
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
|
|
||||||
class="question"
|
|
||||||
style="margin-top: 41px"
|
|
||||||
v-for="(item, i) in data.assessmentEssayQuestionDtoList"
|
|
||||||
:key="i"
|
|
||||||
>
|
|
||||||
<div class="text">{{ item.assessmentQaTitle }}</div>
|
|
||||||
<div style="width: 713px; margin-top: 31px; position: relative">
|
|
||||||
<el-input
|
|
||||||
v-model="item.content"
|
|
||||||
:autosize="{ minRows: 5, maxRows: 5 }"
|
|
||||||
resize="none"
|
|
||||||
maxlength="200"
|
|
||||||
type="textarea"
|
|
||||||
:readonly="!!data.isSubmit"
|
|
||||||
/>
|
|
||||||
<div class="words">{{ item.content?.length || 0 }}/200</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 !=='3' && new Date(projectEndTime).getTime() > new Date().getTime()" class="submit" @click="submit" :style="{ background: data.isSubmit ? '#999' : '#2478ff' }">
|
<div v-if="projectStatus && projectEndTime">
|
||||||
|
<div v-if="projectStatus !=='3' && new Date(projectEndTime).getTime() > new Date().getTime()" class="submit"
|
||||||
|
@click="submit" :style="{ background: data.isSubmit ? '#999' : '#2478ff' }">
|
||||||
提交
|
提交
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -309,7 +171,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 基本信息 -->
|
<!-- 基本信息 -->
|
||||||
<!-- todo 测评页面 没有接口-->
|
|
||||||
</div>
|
</div>
|
||||||
<el-dialog v-model="centerDialogVisible" title="" width="20%" center :show-close="false" :align-center="true">
|
<el-dialog v-model="centerDialogVisible" title="" width="20%" center :show-close="false" :align-center="true">
|
||||||
<div style="text-align: center;font-size:16px;"> <span style="color:black">
|
<div style="text-align: center;font-size:16px;"> <span style="color:black">
|
||||||
@@ -332,11 +193,11 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import checkbox from "@/assets/image/checkbox.png";
|
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} from "@/api/api";
|
||||||
import { ElMessage } from "element-plus";
|
import {ElMessage} from "element-plus";
|
||||||
import { ref } from "vue";
|
import {ref, watch} from "vue";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
import {useTaskPage} from "@/api/useCommon";
|
import {useTaskPage} from "@/api/useCommon";
|
||||||
|
|
||||||
@@ -345,57 +206,50 @@ const {
|
|||||||
} = useRoute();
|
} = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const returnclick = () => {
|
const returnclick = () => {
|
||||||
clearInterval(timers)
|
|
||||||
router.back();
|
router.back();
|
||||||
};
|
};
|
||||||
const {nextPage,prevPage,hasPrev, hasNext} = type==3 ? '' : useTaskPage()
|
const { nextPage, prevPage, hasPrev, hasNext } = type == 3 || type == 4 ? "" : useTaskPage();
|
||||||
const fielPath = ref(import.meta.env.VITE_FILE_PATH);
|
const fielPath = ref(import.meta.env.VITE_FILE_PATH);
|
||||||
const { data } = useRequest(ASSESSMENT_QUERY(courseId), { id: courseId, type, chapterOrStageId, targetId: infoId ? infoId : 0 });
|
const { data } = useRequest(ASSESSMENT_QUERY(courseId), {
|
||||||
console.log(data)
|
id: courseId,
|
||||||
console.log('我是查询评估的参数', { id: courseId, type, chapterOrStageId, targetId: infoId ? infoId : 0 })
|
type,
|
||||||
console.log('我是需要排序得题目', data)
|
chapterOrStageId,
|
||||||
|
targetId: infoId ? infoId : 0
|
||||||
|
});
|
||||||
|
|
||||||
// 答题时间
|
// 答题时间
|
||||||
const answerTime = dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss');
|
const answerTime = dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss");
|
||||||
|
|
||||||
console.log('录入首次进入页面时间', answerTime)
|
|
||||||
|
|
||||||
|
console.log("录入首次进入页面时间", answerTime);
|
||||||
|
|
||||||
// 数组去空对象
|
// 数组去空对象
|
||||||
function formateArr(datas) {
|
function formateArr(datas) {
|
||||||
let allArr = []
|
let allArr = [];
|
||||||
for(let i=0;i<datas.length;i++){
|
for (let i = 0; i < datas.length; i++) {
|
||||||
for(let j=0;j<datas[i].length;j++){
|
for (let j = 0; j < datas[i].length; j++) {
|
||||||
allArr.push(datas[i][j])
|
allArr.push(datas[i][j]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let newarr = allArr.sort((a, b) => { return a.orderNumber - b.orderNumber})
|
let newarr = allArr.sort((a, b) => {
|
||||||
console.log('我是排序后的题目', newarr)
|
return a.orderNumber - b.orderNumber;
|
||||||
return newarr
|
});
|
||||||
|
return newarr;
|
||||||
}
|
}
|
||||||
|
|
||||||
const questionList = ref([])
|
const questionList = ref([]);
|
||||||
|
|
||||||
const timers = setInterval(() => {
|
watch(data, ()=> {
|
||||||
console.log(data)
|
if (data.value.id) {
|
||||||
console.log(data.value.id)
|
questionList.value = formateArr([data.value.essayQuestionVoList, data.value.multipleStemVoList, data.value.scoringQuestionVoList, data.value.singleStemVoList]);
|
||||||
if(data.value.id){
|
|
||||||
clearInterval(timers)
|
|
||||||
console.log([data.value.essayQuestionVoList, data.value.multipleStemVoList, data.value.scoringQuestionVoList, data.value.singleStemVoList])
|
|
||||||
questionList.value = formateArr([data.value.essayQuestionVoList, data.value.multipleStemVoList, data.value.scoringQuestionVoList, data.value.singleStemVoList])
|
|
||||||
}
|
}
|
||||||
}, 1000);
|
});
|
||||||
|
|
||||||
setTimeout(() => {
|
|
||||||
clearInterval(timers);
|
|
||||||
}, 30000);
|
|
||||||
|
|
||||||
// 生成数组
|
// 生成数组
|
||||||
function orderArr(a,b) {
|
function orderArr(a, b) {
|
||||||
let arrs = []
|
let arrs = [];
|
||||||
for(let i=0;i<10;i++){
|
for (let i = 0; i < 10; i++) {
|
||||||
if((i+1)>=a && (i+1)<=b){
|
if ((i + 1) >= a && (i + 1) <= b) {
|
||||||
arrs.push(i)
|
arrs.push(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return arrs;
|
return arrs;
|
||||||
@@ -403,64 +257,25 @@ function orderArr(a,b) {
|
|||||||
|
|
||||||
const centerDialogVisible = ref(false);
|
const centerDialogVisible = ref(false);
|
||||||
const open = () => {
|
const open = () => {
|
||||||
centerDialogVisible.value = true
|
centerDialogVisible.value = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
function submit() {
|
function submit() {
|
||||||
console.log('录入首次进入页面时间', answerTime)
|
console.log("录入首次进入页面时间", answerTime);
|
||||||
if (1 > 0) {
|
|
||||||
console.log(data)
|
|
||||||
console.log('我是提交的数据', {
|
|
||||||
targetId: infoId ? infoId : 0, // 项目、路径图或开课的Id
|
|
||||||
chapterOrStageId: chapterOrStageId ? chapterOrStageId : 0, // 关卡或者阶段Id 关卡Id不允许为空
|
|
||||||
assessmentId: courseId,
|
|
||||||
taskId: taskId ? taskId : 0,
|
|
||||||
type,
|
|
||||||
result: JSON.stringify(data.value),
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if (data.value.isSubmit) {
|
if (data.value.isSubmit) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
console.log("data.value", data.value);
|
if (data.value.singleStemVoList?.some(t=>t?.assessmentSingleChoiceVoList?.every(s => !s?.select))) {
|
||||||
let list1 = data.value.assessmentEssayQuestionDtoList;
|
return ElMessage.warning("您有未填写的单选评估题干");
|
||||||
if (list1 && list1.length > 0) {
|
|
||||||
list1.forEach((item) => {
|
|
||||||
if (item && !item.content) {
|
|
||||||
|
|
||||||
return ElMessage.warning("您有未填写的评估题干");
|
|
||||||
}
|
}
|
||||||
})
|
if (data.value.multipleStemVoList?.some(t=>t?.multipleChoiceVoList?.every(s => !s?.select))) {
|
||||||
|
return ElMessage.warning("您有未填写的多选评估题干");
|
||||||
}
|
}
|
||||||
let list2 = data.value.assessmentScoringQuestionDtoList;
|
if (data.value.scoringQuestionVoList?.some(s => !s?.selectAnswer)) {
|
||||||
if (list2 && list2.length > 0) {
|
return ElMessage.warning("您有未填写的评分评估题干");
|
||||||
list2.forEach((item) => {
|
|
||||||
if (item && !item.selectAnswer) {
|
|
||||||
|
|
||||||
return ElMessage.warning("您有未填写的评估题干");
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
let list3 = data.value.assessmentSingleChoiceDtoList;
|
|
||||||
if (list3 && list3.length > 0) {
|
|
||||||
let flag = 0;
|
|
||||||
list3.forEach((item) => {
|
|
||||||
flag = flag + item.select ? 1 : 0;
|
|
||||||
})
|
|
||||||
if (flag == 0) {
|
|
||||||
|
|
||||||
return ElMessage.warning("您有未填写的评估题干");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
let list4 = data.value.assessmentMultipleChoiceDtoList;
|
|
||||||
if (list4 && list4.length > 0) {
|
|
||||||
let flag = 0;
|
|
||||||
list4.forEach((item) => {
|
|
||||||
flag = flag + item.select ? 1 : 0;
|
|
||||||
})
|
|
||||||
if (flag == 0) {
|
|
||||||
|
|
||||||
return ElMessage.warning("您有未填写的评估题干");
|
|
||||||
}
|
}
|
||||||
|
if (data.value.essayQuestionVoList?.some(s => !s?.content)) {
|
||||||
|
return ElMessage.warning("您有未填写的简答评估题干");
|
||||||
}
|
}
|
||||||
|
|
||||||
data.value.isSubmit = !data.value.isSubmit;
|
data.value.isSubmit = !data.value.isSubmit;
|
||||||
@@ -509,7 +324,8 @@ function submit() {
|
|||||||
.btn02 {
|
.btn02 {
|
||||||
background-image: url("../../assets/image/next.png");
|
background-image: url("../../assets/image/next.png");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.surveydetail {
|
.surveydetail {
|
||||||
.crumb {
|
.crumb {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
|||||||
Reference in New Issue
Block a user