mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-11 03:46:48 +08:00
--demand 面授课
This commit is contained in:
@@ -47,14 +47,6 @@
|
||||
<div class="tag3" style="margin-right: 11px; margin-top: 16px">
|
||||
{{ TASK_TYPES.typeName[value.type] || "" }}
|
||||
</div>
|
||||
<!-- <div-->
|
||||
<!-- v-for="(item, key) in value.flag"-->
|
||||
<!-- :key="key"-->
|
||||
<!-- :class="{1:'tag1',2:'tag2',3:'tag3',4:'tag4'}[item.type]"-->
|
||||
<!-- style="margin-right: 11px; margin-top: 16px"-->
|
||||
<!-- >-->
|
||||
<!-- {{ item.name }}-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<div v-if="value.type == 1" class="progressBox">
|
||||
<div>当前进度</div>
|
||||
@@ -77,30 +69,18 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="goclass" @click="toFinish(value, i.stageName, i.id)"
|
||||
:style="{ background: (value.statusName !== '已结束' && (value.statusName || data.unlockMode === 1)) ? '#2478ff' : '#999' }">
|
||||
{{ value.statusName || (data.unlockMode === 1 ? TASK_TYPES.toName[value.type] : '未解锁') }}
|
||||
</div>
|
||||
<!-- <div :style="{ display: value.status === 1 ? 'block' : 'none' }">-->
|
||||
<!-- <div-->
|
||||
<!-- class="goclass"-->
|
||||
<!-- :style="{ display: value.currentRatio === 0 ? 'none' : 'flex' }">去上课-->
|
||||
<!-- </div>-->
|
||||
<!-- <img-->
|
||||
<!-- style="width: 76px; height: 76px; margin-right: 61px"-->
|
||||
<!-- :style="{ display: value.currentRatio === 0 ? 'flex' : 'none' }"-->
|
||||
<!-- src="../../assets/image/pathdetails/notstarted.png"-->
|
||||
<!-- />-->
|
||||
<!-- </div>-->
|
||||
<el-dropdown trigger="click">
|
||||
<div class="goclass" @click="toFinish(value, i.stageName, i.id)" :style="{ background: (value.statusName !== '已结束' && (value.statusName || data.unlockMode === 1)) ? '#2478ff' : '#999' }">
|
||||
{{ value.statusName || (data.unlockMode === 1 ? TASK_TYPES.toName[value.type] : '未解锁') }}
|
||||
</div>
|
||||
<template #dropdown v-if="value.type===2 && value.targetId?.split(',')?.length > 1">
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item v-for="(name,key) in value.targetName?.split(',')" :key="key" @click="toOffcoursePlanPage(value.targetId?.split(',')[key])">{{ name }}</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div ref="contentLoadingDom" id="loadings" v-else style="width:100%;height:400px;background:red;">
|
||||
|
||||
</div> -->
|
||||
<!-- <div class="tag1">必修</div>
|
||||
<div class="tag2">选修</div>
|
||||
<div class="tag3">测评</div>
|
||||
<div class="tag4">#通用力</div> -->
|
||||
</div>
|
||||
<div class="detailR">
|
||||
<!-- todo #路径详情 课程公告及共享文档缺失-->
|
||||
@@ -346,15 +326,22 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { computed, onMounted, ref, watch } from "vue";
|
||||
import { ElLoading, ElMessage } from 'element-plus'
|
||||
import { request } from "@/api/request";
|
||||
import { CompletionList, EvaluationToLearn, PointList, STUDY_RECORD, SubmitExternalExam, QueryEvaluationTaskStatusOne } from "@/api/api";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import { PROJECT, TASK_TYPES } from "@/api/CONST";
|
||||
import {computed, onMounted, ref} from "vue";
|
||||
import {ElMessage} from "element-plus";
|
||||
import {request} from "@/api/request";
|
||||
import {
|
||||
CompletionList,
|
||||
EvaluationToLearn,
|
||||
PointList,
|
||||
QueryEvaluationTaskStatusOne,
|
||||
STUDY_RECORD,
|
||||
SubmitExternalExam,
|
||||
UPDATE_CURRENT_TASK
|
||||
} from "@/api/api";
|
||||
import {useRoute, useRouter} from "vue-router";
|
||||
import {PROJECT, TASK_TYPES} from "@/api/CONST";
|
||||
import FileTypeImg from "@/components/FileTypeImg.vue";
|
||||
import { UPDATE_CURRENT_TASK } from "@/api/api";
|
||||
import { useStore } from "vuex";
|
||||
import {useStore} from "vuex";
|
||||
|
||||
const {
|
||||
query: { courseId, projectId },
|
||||
@@ -369,7 +356,6 @@ onMounted(() => {
|
||||
dispatch('getProjectInfo', { projectId })
|
||||
})
|
||||
const tableRankData = ref([])
|
||||
|
||||
const studyProgress = [
|
||||
{
|
||||
value: 2,
|
||||
@@ -462,14 +448,12 @@ async function toFinish(d, sName, chapterOrStageId) {
|
||||
ElMessage.error("当前任务已结束")
|
||||
return
|
||||
}
|
||||
if (d.type == 2) {
|
||||
let date1 = new Date(d.endTime).getTime();
|
||||
let date2 = new Date().getTime();
|
||||
if (date1 < date2) {
|
||||
dialogVisibleTip.value = '当前面授课已结束';
|
||||
dialogVisible.value = true;
|
||||
|
||||
//return
|
||||
if (d.type === 2) {
|
||||
if(!d.targetId){
|
||||
return ElMessage.error("还未添加开课,请联系管理员!")
|
||||
}
|
||||
if(d.targetId.split(',').length>1){
|
||||
return
|
||||
}
|
||||
}
|
||||
// 作业过期判断
|
||||
@@ -702,6 +686,10 @@ async function toFinish(d, sName, chapterOrStageId) {
|
||||
}
|
||||
}
|
||||
|
||||
function toOffcoursePlanPage(id){
|
||||
window.open(`${location.protocol}//${location.host}${import.meta.env.VITE_BASE_API}/stu/project/redirectDetail?courseId=${id}`, '_top')
|
||||
}
|
||||
|
||||
function whiteTypes(type) {
|
||||
return import.meta.env.VITE_TASK_WHITE_TYPE.includes("-" + type + "-");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user