mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-10 11:26:49 +08:00
Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
BIN
src/assets/image/notask.png
Normal file
BIN
src/assets/image/notask.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 50 KiB |
@@ -67,7 +67,7 @@
|
||||
</botton>
|
||||
<botton
|
||||
:style="{
|
||||
background: `${data.isSurvery ? '#999' : 'rgb(57, 146, 249)'}`,
|
||||
background: `${new Date(data.planDto.beginTime).getTime()>new Date().getTime()? '#999' : data.isSurvery ? '#999' : 'rgb(57, 146, 249)'}`,
|
||||
}"
|
||||
class="btn"
|
||||
@click="toSurvery"
|
||||
@@ -130,7 +130,23 @@
|
||||
></FileTypeImg>
|
||||
<div style="margin-left: 20px">{{ el.name }}</div>
|
||||
</div>
|
||||
<div class="download">
|
||||
<div
|
||||
v-if="new Date(data.planDto.beginTime).getTime() > new Date().getTime()"
|
||||
class="download">
|
||||
<img
|
||||
style="width: 16px; height: 15px"
|
||||
src="../../assets/image/download.png"
|
||||
/>
|
||||
<div
|
||||
style="margin-left: 5px;color:#999;"
|
||||
@click="downloads(el.response.data)"
|
||||
>
|
||||
下载
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
v-else
|
||||
class="download">
|
||||
<img
|
||||
style="width: 16px; height: 15px"
|
||||
src="../../assets/image/download.png"
|
||||
@@ -170,7 +186,9 @@
|
||||
<div v-if="isEndSubMitWork()" class="submit" style="background: #999">
|
||||
已结束
|
||||
</div>
|
||||
<div v-else class="submit" @click="toWork" v-if="data.workDto?.workId">
|
||||
<div
|
||||
:style="{background: new Date(data.planDto.beginTime).getTime() > new Date().getTime()?'#999':''}"
|
||||
v-else class="submit" @click="toWork" v-if="data.workDto?.workId">
|
||||
交作业
|
||||
</div>
|
||||
</div>
|
||||
@@ -204,7 +222,7 @@
|
||||
<div class="tag3" style="margin-left: 11px">考试</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="submit" @click="toExamItem(data.examinationDto)">
|
||||
<div :style="{background: new Date(data.planDto.beginTime).getTime() > new Date().getTime()?'#999':''}" class="submit" @click="toExamItem(data.examinationDto)">
|
||||
去考试
|
||||
</div>
|
||||
</div>
|
||||
@@ -277,6 +295,9 @@ const handleClick = (tab, event) => {
|
||||
const download = (url) => {
|
||||
window.open(url);
|
||||
};
|
||||
const downloads = (url) => {
|
||||
ElMessage.info("面授课未开始");
|
||||
};
|
||||
let timer = null;
|
||||
//判断能否签到
|
||||
function isSignClick() {
|
||||
@@ -335,6 +356,14 @@ const signClick = () => {
|
||||
// state.isAllowSign,
|
||||
// !state.isAllowSign
|
||||
// );
|
||||
if(data.value.planDto.beginTime){
|
||||
let date1 = new Date(data.value.planDto.beginTime).getTime()
|
||||
let date2 = new Date().getTime()
|
||||
if(date1>date2){
|
||||
ElMessage.info("面授课未开始");
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!state.isAllowSign) {
|
||||
// console.log("data.signFlag", data.value.signFlag, isAllowSign);
|
||||
ElMessage.info("未在签到范围内");
|
||||
@@ -355,6 +384,14 @@ function toSurvery() {
|
||||
if (data.value.isSurvery) {
|
||||
return;
|
||||
}
|
||||
if(data.value.planDto.beginTime){
|
||||
let date1 = new Date(data.value.planDto.beginTime).getTime()
|
||||
let date2 = new Date().getTime()
|
||||
if(date1>date2){
|
||||
ElMessage.info("面授课未开始");
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (data.value.planDto.evalFlag == 0) {
|
||||
ElMessage.info("此课程无评估");
|
||||
return;
|
||||
@@ -383,6 +420,14 @@ function isEndSubMitWork() {
|
||||
}
|
||||
|
||||
function toWork() {
|
||||
if(data.value.planDto.beginTime){
|
||||
let date1 = new Date(data.value.planDto.beginTime).getTime()
|
||||
let date2 = new Date().getTime()
|
||||
if(date1>date2){
|
||||
ElMessage.info("面授课未开始");
|
||||
return;
|
||||
}
|
||||
}
|
||||
router.push({
|
||||
path: "/homeworkpage",
|
||||
query: {
|
||||
@@ -396,6 +441,14 @@ function toWork() {
|
||||
}
|
||||
|
||||
function toExamItem(obj) {
|
||||
if(data.value.planDto.beginTime){
|
||||
let date1 = new Date(data.value.planDto.beginTime).getTime()
|
||||
let date2 = new Date().getTime()
|
||||
if(date1>date2){
|
||||
ElMessage.info("面授课未开始");
|
||||
return;
|
||||
}
|
||||
}
|
||||
console.log("obj", obj.examinationTestId);
|
||||
window.open(import.meta.env.VITE_BOE_EXAM_DETAIL_URL + obj.examinationTestId); //测评
|
||||
// router.push({ path: import.meta.env.VITE_BOE_EXAM_DETAIL_URL+ obj.examinationTestId });
|
||||
|
||||
@@ -224,6 +224,20 @@
|
||||
</div>
|
||||
</div>
|
||||
<!-- 详细信息 -->
|
||||
<!-- 弹框提示信息 -->
|
||||
<el-dialog
|
||||
title=""
|
||||
top="347px"
|
||||
v-model="dialogVisible"
|
||||
:show-close="false"
|
||||
style="display:flex;justify-content:center;align-items:center;height: 283px;padding:0;border-radius: 4px;"
|
||||
width="502px">
|
||||
<div style="width:288px;color:#333333;font-size: 22px;font-weight: 600;">{{ dialogVisibleTip }}</div>
|
||||
<span slot="footer" style="display:inline-block;margin-top:60px;">
|
||||
<el-button @click="dialogVisible = false" style="width:140px;height:40px;margin-right: 22px;">取消</el-button>
|
||||
<el-button type="primary" @click="dialogVisible = false" style="width:140px;height:40px;">确定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
@@ -319,6 +333,14 @@ const types = ref({
|
||||
13: "/projectdetails",
|
||||
},
|
||||
});
|
||||
|
||||
const dialogVisible = ref(false);
|
||||
const dialogVisibleTip = ref('该任务无法学习,请联系管理员进行替换!');
|
||||
|
||||
// function dialogVisible(){
|
||||
// return true;
|
||||
// }
|
||||
|
||||
function toFinish(d, sName, chapterId) {
|
||||
console.log("dddddd", d);
|
||||
// 作业过期判断
|
||||
@@ -326,7 +348,9 @@ function toFinish(d, sName, chapterId) {
|
||||
let date1 = new Date(d.endTime).getTime();
|
||||
let date2 = new Date().getTime();
|
||||
if (date1 < date2) {
|
||||
ElMessage.error("当前作业已结束")
|
||||
dialogVisibleTip.value ='当前作业已结束';
|
||||
dialogVisible.value = true;
|
||||
// ElMessage.error("当前作业已结束")
|
||||
return
|
||||
}
|
||||
}
|
||||
@@ -335,21 +359,26 @@ function toFinish(d, sName, chapterId) {
|
||||
let date1 = new Date(d.endTime).getTime();
|
||||
let date2 = new Date().getTime();
|
||||
if (date1 < date2) {
|
||||
ElMessage.error("当前直播已结束")
|
||||
dialogVisibleTip.value ='当前直播已结束';
|
||||
dialogVisible.value = true;
|
||||
return
|
||||
}
|
||||
}
|
||||
// 考试 停用
|
||||
if (d.type == 5) {
|
||||
if (d.taskStatus == 1 || d.taskStatus == 2) {
|
||||
ElMessage.error("该任务无法学习,请联系管理员进行替换。")
|
||||
// ElMessage.error("该任务无法学习,请联系管理员进行替换。")
|
||||
dialogVisibleTip.value ='该任务无法学习,请联系管理员进行替换!';
|
||||
dialogVisible.value = true;
|
||||
return
|
||||
}
|
||||
}
|
||||
// 评估 停用
|
||||
if (d.type == 11) {
|
||||
if (d.taskStatus == 1 || d.taskStatus == 2) {
|
||||
ElMessage.error("该任务无法学习,请联系管理员进行替换。")
|
||||
// ElMessage.error("该任务无法学习,请联系管理员进行替换。")
|
||||
dialogVisibleTip.value ='该任务无法学习,请联系管理员进行替换!';
|
||||
dialogVisible.value = true;
|
||||
return
|
||||
}
|
||||
}
|
||||
@@ -358,21 +387,26 @@ function toFinish(d, sName, chapterId) {
|
||||
let date1 = new Date(d.endTime).getTime();
|
||||
let date2 = new Date().getTime();
|
||||
if (date1 < date2) {
|
||||
ElMessage.error("当前活动已结束")
|
||||
dialogVisibleTip.value ='当前活动已结束';
|
||||
dialogVisible.value = true;
|
||||
return
|
||||
}
|
||||
}
|
||||
// 在线课 停用 -- 暂时没有在线课停用标记
|
||||
if (d.type == 1) {
|
||||
if (d.taskStatus == 1 || d.taskStatus == 2) {
|
||||
ElMessage.error("该任务无法学习,请联系管理员进行替换。")
|
||||
// ElMessage.error("该任务无法学习,请联系管理员进行替换。")
|
||||
dialogVisibleTip.value ='该任务无法学习,请联系管理员进行替换!';
|
||||
dialogVisible.value = true;
|
||||
return
|
||||
}
|
||||
}
|
||||
// 面授课 停用
|
||||
if (d.type == 2) {
|
||||
if (d.taskStatus == 1 || d.taskStatus == 2) {
|
||||
ElMessage.error("该任务无法学习,请联系管理员进行替换。")
|
||||
// ElMessage.error("该任务无法学习,请联系管理员进行替换。")
|
||||
dialogVisibleTip.value ='该任务无法学习,请联系管理员进行替换!';
|
||||
dialogVisible.value = true;
|
||||
return
|
||||
}
|
||||
}
|
||||
@@ -417,6 +451,9 @@ function whiteTypes(type) {
|
||||
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
||||
<style lang="scss">
|
||||
.pathdetails {
|
||||
.el-dialog__header {
|
||||
display: none;
|
||||
}
|
||||
.crumb {
|
||||
color: #fff;
|
||||
display: flex;
|
||||
|
||||
@@ -49,7 +49,14 @@
|
||||
</button>
|
||||
<button class="searchBtn" @click="resetClick">重置</button>
|
||||
</div>
|
||||
<div class="projectList" v-for="(i, k) in projectList" :key="k">
|
||||
<div class="projectList" v-if="projectList.length==0" style="display:flex;color:#909399;">
|
||||
<img
|
||||
class="img2"
|
||||
style="margin-left: 675px;margin-top: 165px;width:148px;height:220px;"
|
||||
src="../../assets/image/notask.png"
|
||||
/>
|
||||
</div>
|
||||
<div v-else class="projectList" v-for="(i, k) in projectList" :key="k">
|
||||
<div style="display: flex">
|
||||
<img
|
||||
style="width: 253px; height: 144px; border-radius: 4px"
|
||||
|
||||
@@ -45,7 +45,167 @@
|
||||
<!-- 基本信息 -->
|
||||
<div class="bascinfo">
|
||||
<div>
|
||||
<!-- {{ [data.assessmentEssayQuestionDtoList,data.assessmentMultipleChoiceDtoList,data.assessmentScoringQuestionDtoList,data.assessmentSingleChoiceDtoList].sort((a,b)=>{
|
||||
return a[0].orderNumber - b[0].orderNumber
|
||||
}) }} -->
|
||||
|
||||
<div
|
||||
class="question"
|
||||
v-for="(value, index) in [data.assessmentEssayQuestionDtoList,data.assessmentMultipleChoiceDtoList,data.assessmentScoringQuestionDtoList,data.assessmentSingleChoiceDtoList].sort((a,b)=>{
|
||||
return a[0].orderNumber - b[0].orderNumber
|
||||
}) "
|
||||
:key="index"
|
||||
:style="{ 'margin-top': index === 0 ? '57px' : '41px' }"
|
||||
>
|
||||
<div v-if="value[0].questionType=='4'">
|
||||
<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>
|
||||
|
||||
<div v-else-if="value[0].questionType=='1'">
|
||||
<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>
|
||||
|
||||
<div v-else-if="value[0].questionType=='2'">
|
||||
<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>
|
||||
|
||||
<div v-else-if="value[0].questionType=='3'">
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<!-- <div
|
||||
class="question"
|
||||
v-for="(value, index) in data.assessmentScoringQuestionDtoList"
|
||||
:key="index"
|
||||
@@ -88,6 +248,7 @@
|
||||
<div class="answerR">非常有帮助/启发</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="question"
|
||||
style="margin-top: 41px"
|
||||
@@ -162,6 +323,7 @@
|
||||
<div class="people">{{ value.multipleOptionName }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="question"
|
||||
style="margin-top: 41px"
|
||||
@@ -180,7 +342,8 @@
|
||||
/>
|
||||
<div class="words">{{ item.content?.length || 0 }}/200</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div
|
||||
style="display: flex; justify-content: center"
|
||||
v-if="
|
||||
@@ -235,6 +398,8 @@ const returnclick = () => {
|
||||
};
|
||||
|
||||
const { data } = useRequest(ASSESSMENT_QUERY(courseId), { id: courseId });
|
||||
console.log('我是需要排序得题目', data )
|
||||
|
||||
const centerDialogVisible =ref(false);
|
||||
const open=()=>{
|
||||
centerDialogVisible.value = true
|
||||
|
||||
Reference in New Issue
Block a user