mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-06 17:36:46 +08:00
Merge branch 'develop'
# Conflicts: # src/App.vue # src/views/survey/SurveyDetail.vue
This commit is contained in:
@@ -38,7 +38,7 @@ import {useRoute} from "vue-router/dist/vue-router";
|
||||
import {USER_INFO} from "@/api/api";
|
||||
import {IsPhone} from "@/api/utils";
|
||||
|
||||
console.log("版本2.1.6------------");
|
||||
console.log("版本2.3.9------------");
|
||||
|
||||
const store = useStore();
|
||||
const { path } = useRoute();
|
||||
|
||||
@@ -10,7 +10,7 @@ export const LOGIN = '/admin/CheckUser/userLogin post'
|
||||
export const USER_INFO = '/admin/CheckUser/userInfo'
|
||||
// export const FILE_UPLOAD = 'http://143.143.139.204:30001/file/upload'
|
||||
export const FILE_UPLOAD = import.meta.env.VITE_BASE_API + '/file/uploadFile'
|
||||
export const FILE_UPLOAD_ANNEX = import.meta.env.VITE_BASE_API + '/file/upload'
|
||||
export const FILE_UPLOAD_ANNEX = import.meta.env.VITE_BASE_API + '/file/uploadunlimit'
|
||||
export const FILE_UPLOAD_IMG = import.meta.env.VITE_BASE_API + '/file/img'
|
||||
export const COMMON_TOKEN = 'https://upload-z2.qiniup.com'
|
||||
export const ROUTER_CHAPTER_LIST = '/stu/router/chapterList'
|
||||
|
||||
@@ -3,6 +3,7 @@ import {reactive, ref, toRefs, watch} from "vue";
|
||||
import axios from 'axios';
|
||||
import {getCookie} from "@/api/utils";
|
||||
import JSONBigInt from 'json-bigint';
|
||||
import {ElMessage} from "element-plus";
|
||||
|
||||
const JSONBigIntStr = JSONBigInt({storeAsString: true});
|
||||
|
||||
@@ -97,15 +98,13 @@ export async function request(_url, params) {
|
||||
...method !== 'get' ? {data: JSON.stringify(body)} : {}
|
||||
}).then(resp => resp.data).then(response => {
|
||||
if (response.code !== 200 && response.code !== 0) {
|
||||
if (response.code === 1000) {
|
||||
(import.meta.env.MODE === 'development' || import.meta.env.MODE === 'test') ? router.push({path: '/login'}) : window.open(window.location.protocol + import.meta.env.VITE_BASE_LOGIN_URL, '_top')
|
||||
}
|
||||
if (response.code === 2001) {
|
||||
router.push({path: '/FaceTeachSignUp', query: {courseId: router.currentRoute.value.query.courseId,type:3}})
|
||||
}
|
||||
if (response.code === 2002) {
|
||||
router.push({path: '/FaceTeachNoCommon', query: {courseId: router.currentRoute.value.query.courseId,type:3}})
|
||||
}
|
||||
if (response.code === 1000) (import.meta.env.MODE === 'development' || import.meta.env.MODE === 'test') ? router.push({path: '/login'}) : window.open(window.location.protocol + import.meta.env.VITE_BASE_LOGIN_URL, '_top')
|
||||
|
||||
else if (response.code === 2001) router.push({path: '/FaceTeachSignUp', query: {courseId: router.currentRoute.value.query.courseId,type:3}})
|
||||
|
||||
else if (response.code === 2002) router.push({path: '/FaceTeachNoCommon', query: {courseId: router.currentRoute.value.query.courseId,type:3}})
|
||||
else if (response.code === 9000) ElMessage.warning("该数据已经被删除或停用,请联系管理员");
|
||||
|
||||
// if (import.meta.env.DEV && response.code === 1000) {
|
||||
// router.push({path: '/login'})
|
||||
// } else {
|
||||
|
||||
@@ -79,7 +79,8 @@ function handleChange(file) {
|
||||
}
|
||||
|
||||
function remove(i) {
|
||||
files.value.splice(i, 1)
|
||||
files.value.splice(i, 1);
|
||||
files.value = [];
|
||||
console.log(imageRef)
|
||||
}
|
||||
|
||||
|
||||
@@ -221,10 +221,13 @@ const handleCreated = (editor) => {
|
||||
editorRef.value = editor; // 记录 editor 实例,重要!
|
||||
};
|
||||
|
||||
const discussSettings = ref("");
|
||||
|
||||
request(DISCUSS_LIST, {
|
||||
type,
|
||||
id,
|
||||
}).then(e=>{
|
||||
discussSettings.value = e.data.discussDtoList[0].discussSettings;
|
||||
state.info = e.data;
|
||||
getPostList(e.data.discussDtoList[0].id);
|
||||
}).catch(err=>{
|
||||
@@ -278,7 +281,7 @@ function handleCurrentChange(e, k) {
|
||||
}
|
||||
// 评论点击跳转
|
||||
function comment({ discussId: id, id: postID }) {
|
||||
router.push({ path: "discussdetail", query: { id, type, pName, sName, postID, postName:state.info.discussDtoList[0].discussName } });
|
||||
router.push({ path: "discussdetail", query: { id, type, pName, sName, postID, postName:state.info.discussDtoList[0].discussName, discussSettings:discussSettings.value } });
|
||||
}
|
||||
// 帖子点赞
|
||||
function like(d) {
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
<div class="title">
|
||||
{{ postName }}
|
||||
</div>
|
||||
<button class="btn" @click="getFocus">回复</button>
|
||||
<button v-if="discussSettings=='true'" class="btn" @click="getFocus">回复</button>
|
||||
</div>
|
||||
|
||||
<div class="line clearfix">
|
||||
@@ -97,7 +97,7 @@
|
||||
</div>
|
||||
|
||||
<div class="bascinfor">
|
||||
<div class="inputone">
|
||||
<div v-if="discussSettings=='true'" class="inputone">
|
||||
<el-input
|
||||
ref="refInput"
|
||||
v-model="disComment.content"
|
||||
@@ -333,7 +333,7 @@ const returnclick = () => {
|
||||
};
|
||||
|
||||
const {
|
||||
query: { id, discussSubmitId, type, pName, sName, postID, postName },
|
||||
query: { id, discussSubmitId, type, pName, sName, postID, postName, discussSettings },
|
||||
} = useRoute();
|
||||
|
||||
// 编辑器实例,必须用 shallowRef
|
||||
|
||||
@@ -187,7 +187,7 @@
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="课程作业" name="second">
|
||||
<div class="work" v-if="data.workDto">
|
||||
<div class="work" v-if="data.workDto!== null && data.workDto?.workName">
|
||||
<div>
|
||||
<div class="question">{{ data.workDto?.workName }}</div>
|
||||
<div style="margin-top: 16px; display: flex">
|
||||
@@ -283,7 +283,7 @@
|
||||
</div>
|
||||
<!-- todo #面授课接口 讲师缺少img和介绍-->
|
||||
<div class="teacheritem">
|
||||
<img class="peopleimg" :src="teacherInfo.avatar"/>
|
||||
<img class="peopleimg" :src="teacherInfo?.avatar"/>
|
||||
<div class="nameSpan">
|
||||
<div class="teacherName" style="margin-right: 5px">
|
||||
{{ data.planDto?.teacher }}
|
||||
@@ -323,7 +323,7 @@ const { data } = useRequest(STU_OFFCOURSE_DETAIL, {
|
||||
usePermission: true,
|
||||
});
|
||||
const teacherInfo = useUserInfo(computed(() => data.value?.planDto?.teacherId));
|
||||
const isAllowSign = computed(() => dayjs().isBetween(dayjs(data.value.planDto?.beginTime).subtract(data.value.beforeStart || 0, "minute"), dayjs(data.value.afterStart ? data.value.planDto?.beginTime : data.value.planDto?.endTime).add(data.value.afterStart || 0, "minute")));
|
||||
const isAllowSign = computed(() => dayjs().isBetween(dayjs(data.value.planDto?.beginTime).subtract(data.value.planDto?.beforeStart || 0, "minute"), dayjs(data.value.planDto?.afterStart ? data.value.planDto?.beginTime : data.value.planDto?.endTime).add(data.value.planDto?.afterStart || 0, "minute")));
|
||||
|
||||
const handleClick = (tab, event) => {
|
||||
console.log("附件", tab, event);
|
||||
@@ -395,7 +395,7 @@ function toWork() {
|
||||
path: "/homeworkpage",
|
||||
query: {
|
||||
courseId: data.value.planDto.homeWorkId,
|
||||
id: taskId,
|
||||
// id: taskId,
|
||||
infoId: data.value.planDto.id,
|
||||
chapterOrStageId: 0,
|
||||
type:3,
|
||||
@@ -434,11 +434,6 @@ function toExamItem(obj) {
|
||||
}
|
||||
}
|
||||
|
||||
onUnmounted(() => {
|
||||
if (timer) {
|
||||
clearInterval(timer);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div style=" background: #0078fc;height: 150px;width: 100%;position: absolute;top: 0;z-index:-9999;"></div>
|
||||
<div class="faceteach" style="padding: 30px">
|
||||
<div class="faceteachnocommon" style="padding: 30px">
|
||||
<!-- 面包屑导航 -->
|
||||
<div class="crumb">
|
||||
<div>课程列表</div>
|
||||
@@ -182,7 +182,7 @@ function formateArr(strs) {
|
||||
|
||||
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
||||
<style lang="scss">
|
||||
.faceteach {
|
||||
.faceteachnocommon {
|
||||
.crumb {
|
||||
color: #fff;
|
||||
display: flex;
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<!-- 面包屑导航 -->
|
||||
|
||||
<!-- 基本信息 -->
|
||||
<div class="bascinfo">
|
||||
<div class="bascinfo" style="height: 310px;">
|
||||
<div style="display:flex;">
|
||||
<img style="width:405px;height:230px;margin-left: 48px;border-radius: 8px;margin-top: 40px;"
|
||||
:src="data.offcourseDto.picUrl" alt="">
|
||||
@@ -63,9 +63,6 @@
|
||||
<div style="padding:20px;" class="content" v-html="data.offcourseDto?.outline"></div>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<!-- <el-tab-pane label="课程评论" name="third" :disabed=dayjs().isBefore(dayjs(data.planDto.beginTime))>
|
||||
|
||||
</el-tab-pane> -->
|
||||
<el-tab-pane label="材料下载" name="third" >
|
||||
<div v-if="!data.offcourseDto?.attach"
|
||||
style="font-size: 14px;font-weight: 400; line-height: 24px; cursor: pointer;margin-left: 40px; margin-top: 20px;">
|
||||
@@ -82,15 +79,6 @@
|
||||
}"></FileTypeImg>
|
||||
<div style="margin-left: 20px">{{ el.slice(el.lastIndexOf('/')+1,el.indexOf('-')) + el.slice(el.lastIndexOf('.')) }}</div>
|
||||
</div>
|
||||
<!-- <div class="download">-->
|
||||
<!-- <img style="width: 16px; height: 15px" src="../../assets/image/download.png"/>-->
|
||||
<!-- <div style="margin-left: 5px;color:#999;">-->
|
||||
<!-- 下载-->
|
||||
<!-- </div>-->
|
||||
<!-- <div style="margin-left: 5px;color:#999;" @click="download(el)">
|
||||
下载
|
||||
</div> -->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
@@ -112,7 +100,6 @@
|
||||
</div>
|
||||
<div class="introduce">{{ data.planDto?.bandDesc }}</div>
|
||||
</div>
|
||||
<!-- <div class="follow">+ 关注</div>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
</div>
|
||||
<!-- 面包屑导航 -->
|
||||
<!-- 基本信息 -->
|
||||
<div class="bascinfo">
|
||||
<div class="bascinfo" style="height: 310px;">
|
||||
<div style="display:flex;">
|
||||
<img style="width:405px;height:230px;margin-left: 48px;border-radius: 8px;margin-top: 40px;"
|
||||
:src="data.offcourseDto?.picUrl" alt="">
|
||||
@@ -34,13 +34,13 @@
|
||||
<img style="width: 16px; height: 18px" src="../../assets/image/position.png"/>
|
||||
<div style="margin-left: 8px">{{ data.planDto?.address }}</div>
|
||||
</div>
|
||||
<div class="time" style="margin-top: 37px">
|
||||
<div class="time" style="margin-top: 37px" v-if="!isCourseEnd">
|
||||
<botton
|
||||
class="btn"
|
||||
style="margin-right: 20px;width: 160px;height: 46px;"
|
||||
v-if="data.planDto.applyFlag"
|
||||
@click="onLineSignUp(false)"
|
||||
:style="{ background: isAllowSign?data.isSignUp || data.isRefused ? '#999' : 'rgb(57, 146, 249)':'#999'}">
|
||||
:style="{ background: (data.isSignUp || data.isRefused) ? '#999' : 'rgb(57, 146, 249)'}">
|
||||
{{
|
||||
data.isRefused ? '审核拒绝' : data.isSignUp? '已报名' :'立即报名'
|
||||
}}
|
||||
@@ -268,12 +268,12 @@
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="材料下载" name="four" >
|
||||
<div v-if="data.planDto?.attach == ''"
|
||||
<div v-if="data.offcourseDto?.attach == ''"
|
||||
style="font-size: 14px;font-weight: 400; line-height: 24px; cursor: pointer;margin-left: 40px; margin-top: 20px;">
|
||||
此课程无附件
|
||||
</div>
|
||||
<div v-else>
|
||||
<div v-for="(el, index) in formateArr(data.planDto.attach)" :key="index" class="enclosure"
|
||||
<div v-for="(el, index) in formateArr(data.offcourseDto.attach)" :key="index" class="enclosure"
|
||||
:style="{ borderBottom: '1px solid rgba(56, 125, 247, 0.2)' }">
|
||||
<div class="enclosureL">
|
||||
<FileTypeImg :v-model="el.slice(el.lastIndexOf('/')+1,el.indexOf('-')) + el.slice(el.lastIndexOf('.'))" :style="{
|
||||
@@ -348,7 +348,7 @@ const { query: {courseId} } = useRoute();
|
||||
const {data = {}} = useRequest(STU_OFFCOURSE_DETAIL, {courseId});
|
||||
const teacherInfo = useUserInfo( computed(() => data.value?.planDto?.teacherId));
|
||||
const activeName = ref("first");
|
||||
const isAllowSign = computed(() => dayjs().isBetween(dayjs(data.value.planDto?.beginTime).subtract(data.value.beforeStart || 0, "minute"), dayjs(data.value.afterStart ? data.value.planDto?.beginTime : data.value.planDto?.endTime).add(data.value.afterStart || 0, "minute")));
|
||||
const isCourseEnd = computed(() => dayjs(data.value.planDto?.endTime).isBefore(dayjs()));
|
||||
|
||||
const handleClick = (tab, event) => {
|
||||
console.log("附件", tab, event);
|
||||
@@ -516,8 +516,8 @@ function submitReplayComment() {
|
||||
}
|
||||
// 报名
|
||||
function onLineSignUp(isAgain) {
|
||||
if (!isAllowSign.value) {
|
||||
ElMessage.warning("未在允许报名时间范围内");
|
||||
if (isCourseEnd.value) {
|
||||
ElMessage.warning("该课程已经结束无法报名");
|
||||
return;
|
||||
}
|
||||
if(data.value.isSignUp && !isAgain){
|
||||
|
||||
513
src/views/faceteach/FaceTeachStuSign.vue
Normal file
513
src/views/faceteach/FaceTeachStuSign.vue
Normal file
@@ -0,0 +1,513 @@
|
||||
<template>
|
||||
<div
|
||||
style="
|
||||
background: #0078fc;
|
||||
height: 150px;
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
z-index: -9999;
|
||||
"
|
||||
></div>
|
||||
<div class="faceteach" style="padding: 30px">
|
||||
<!-- 面包屑导航 -->
|
||||
<div class="crumb">
|
||||
<div>课程列表</div>
|
||||
<div style="margin-left: 6px; margin-right: 6px">/</div>
|
||||
<div style="font-weight: 700">课程详情</div>
|
||||
|
||||
<div v-if="pName != ''" class="return">
|
||||
<div style="display: flex" @click="returnclick">
|
||||
<el-button style="color: #0073fb">
|
||||
<img
|
||||
class="img2"
|
||||
style="margin-right: 11px; cursor: pointer"
|
||||
src="../../assets/image/return.png"
|
||||
/>返回
|
||||
</el-button
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 面包屑导航 -->
|
||||
|
||||
<!-- 基本信息 -->
|
||||
<div class="bascinfo">
|
||||
<div style="margin-left: 46px">
|
||||
<div class="title">【面授课】{{ data.planDto?.name }}</div>
|
||||
<div class="time" style="margin-top: 26px">
|
||||
<img
|
||||
style="width: 15px; height: 17px"
|
||||
src="../../assets/image/time.png"
|
||||
/>
|
||||
<div style="margin-left: 8px">
|
||||
{{
|
||||
dayjs(data.planDto?.beginTime).format("YYYY-MM-DD HH:mm") +
|
||||
" 至 " +
|
||||
dayjs(data.planDto?.endTime).format("YYYY-MM-DD HH:mm")
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="data.planDto?.address" class="time" style="margin-top: 23px">
|
||||
<img
|
||||
style="width: 16px; height: 18px"
|
||||
src="../../assets/image/position.png"
|
||||
/>
|
||||
<div style="margin-left: 8px">{{ data.planDto?.address }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div style="display: flex">
|
||||
<botton
|
||||
class="btn"
|
||||
style="margin-right: 20px"
|
||||
:style="{ background: isAllowSign && !data.signFlag ?'rgb(57, 146, 249)' : '#999' }"
|
||||
@click="signClick"
|
||||
>{{ data.signFlag ? "已签到" : "签到" }}
|
||||
</botton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 基本信息 -->
|
||||
|
||||
<!-- 详细信息 -->
|
||||
<div class="detailinfo">
|
||||
<div class="detail">
|
||||
<div class="detailT">
|
||||
<div class="" style="margin-left: 48px; margin-right: 48px">
|
||||
<div class="title">
|
||||
<img
|
||||
style="width: 20px; height: 20px"
|
||||
src="../../assets/image/course.png"
|
||||
/>
|
||||
<div class="text">课程详情</div>
|
||||
<div class="box"></div>
|
||||
</div>
|
||||
<div style="display: flex; align-items: center">
|
||||
<div class="content" v-html="data.offcourseDto?.intro"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="detailB">
|
||||
<el-tabs v-model:activeName="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane label="课程介绍" name="first">
|
||||
<div class="notice" style="padding:20px;font-size:14px;">
|
||||
{{ data.offcourseDto?.intro || "暂无课程介绍" }}
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="课程大纲" name="second">
|
||||
<div style="display: flex; align-items: center">
|
||||
<div style="padding:20px;" class="content" v-html="data.offcourseDto?.outline"></div>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="材料下载" name="third" >
|
||||
<div v-if="!data.offcourseDto?.attach"
|
||||
style="font-size: 14px;font-weight: 400; line-height: 24px; cursor: pointer;margin-left: 40px; margin-top: 20px;">
|
||||
此课程无附件
|
||||
</div>
|
||||
<div v-else>
|
||||
<div v-for="(el, index) in formateArr(data.offcourseDto.attach)" :key="index" class="enclosure"
|
||||
:style="{ borderBottom: '1px solid rgba(56, 125, 247, 0.2)' }">
|
||||
<div class="enclosureL">
|
||||
<FileTypeImg :v-model="el.slice(el.lastIndexOf('/')+1,el.indexOf('-')) + el.slice(el.lastIndexOf('.'))" :style="{
|
||||
width: '22px',
|
||||
height: '26px',
|
||||
marginLeft: '10px',
|
||||
}"></FileTypeImg>
|
||||
<div style="margin-left: 20px">{{ el.slice(el.lastIndexOf('/')+1,el.indexOf('-')) + el.slice(el.lastIndexOf('.')) }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</div>
|
||||
<div class="teacher">
|
||||
<div class="title">
|
||||
<img
|
||||
style="width: 21px; height: 23px"
|
||||
src="../../assets/image/livelecturer.png"
|
||||
/>
|
||||
<div class="text">面授课讲师</div>
|
||||
<div class="box"></div>
|
||||
</div>
|
||||
<div class="teacheritem">
|
||||
<img class="peopleimg" :src="teacherInfo.avatar"/>
|
||||
<div class="nameSpan">
|
||||
<div class="teacherName" style="margin-right: 5px">
|
||||
{{ data.planDto?.teacher }}
|
||||
</div>
|
||||
<div class="introduce">{{ data.planDto?.bandDesc }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {computed, onBeforeMount, onUnmounted, ref} from "vue";
|
||||
import FileTypeImg from "@/components/FileTypeImg.vue";
|
||||
import {request, useRequest} from "@/api/request";
|
||||
import {STU_OFFCOURSE_DETAIL, TASK_OFFCOURSE_NOTASK_SIGN,} from "@/api/api";
|
||||
import {useRoute, useRouter} from "vue-router";
|
||||
import {useUserInfo} from "@/api/utils";
|
||||
import {ElMessage} from "element-plus";
|
||||
import dayjs from "dayjs";
|
||||
import isBetween from "dayjs/plugin/isBetween";
|
||||
|
||||
const router = useRouter();
|
||||
|
||||
onBeforeMount(() => dayjs.extend(isBetween));
|
||||
|
||||
const returnclick = () => router.back();
|
||||
|
||||
const { query: { courseId }} = useRoute();
|
||||
|
||||
const { data } = useRequest(STU_OFFCOURSE_DETAIL, { courseId, usePermission: true, });
|
||||
const teacherInfo = useUserInfo(computed(() => data.value?.planDto?.teacherId));
|
||||
const isAllowSign = computed(() => dayjs().isBetween(dayjs(data.value?.planDto?.beginTime).subtract(data.value?.planDto?.beforeStart || 0, "minute"), dayjs(data.value?.planDto?.afterStart ? data.value?.planDto?.beginTime : data.value?.planDto?.endTime).add(data.value?.planDto?.afterStart || 0, "minute")));
|
||||
|
||||
const handleClick = (tab, event) => console.log("附件", tab, event);
|
||||
const activeName = ref("first");
|
||||
const fielPath = ref(import.meta.env.VITE_FILE_PATH);
|
||||
const download = (url) => window.open(fielPath.value + url);
|
||||
|
||||
function formateArr(strs) {
|
||||
let newArr;
|
||||
try {
|
||||
newArr = JSON.parse(strs);
|
||||
} catch {
|
||||
newArr = strs?.split(",");
|
||||
}
|
||||
return newArr;
|
||||
}
|
||||
|
||||
//签到
|
||||
const signClick = () => {
|
||||
if (data.value.signFlag) {
|
||||
return;
|
||||
}
|
||||
if (!isAllowSign.value) {
|
||||
ElMessage.warning("未在允许签到时间范围内");
|
||||
return;
|
||||
}
|
||||
data.value.signFlag = 1;
|
||||
ElMessage.warning("签到成功");
|
||||
request(TASK_OFFCOURSE_NOTASK_SIGN, { courseId: courseId, taskId: courseId, type: 3 });
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.faceteach {
|
||||
.crumb {
|
||||
color: #fff;
|
||||
display: flex;
|
||||
font-size: 14px;
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.bascinfo {
|
||||
width: 100%;
|
||||
height: 180px;
|
||||
border-radius: 8px;
|
||||
background-color: rgba(255, 255, 255, 1);
|
||||
margin-top: 37px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.btn {
|
||||
width: 146px;
|
||||
height: 46px;
|
||||
background: #2478ff;
|
||||
border-radius: 4px;
|
||||
box-shadow: 0px 1px 8px 0px rgba(56, 125, 247, 0.7);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #fff;
|
||||
font-size: 14px;
|
||||
font-weight: 800;
|
||||
line-height: 24px;
|
||||
cursor: pointer;
|
||||
margin-right: 96px;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 20px;
|
||||
font-weight: 800;
|
||||
color: #333333;
|
||||
line-height: 24px;
|
||||
margin-left: -9px;
|
||||
}
|
||||
|
||||
.time {
|
||||
font-size: 14px;
|
||||
color: #6e7b84;
|
||||
line-height: 24px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
.return {
|
||||
position: absolute;
|
||||
right: 10%;
|
||||
|
||||
.text {
|
||||
text-align: center;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
.detailinfo {
|
||||
width: 100%;
|
||||
margin-top: 20px;
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
|
||||
.detail {
|
||||
flex: 1;
|
||||
margin-right: 20px;
|
||||
|
||||
.detailT {
|
||||
min-height: 263px;
|
||||
background: #ffffff;
|
||||
border-radius: 8px;
|
||||
color: rgba(51, 51, 51, 1);
|
||||
|
||||
.title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-top: 39px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.title .text {
|
||||
margin-left: 8px;
|
||||
font-size: 16px;
|
||||
color: rgba(51, 51, 51, 1);
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.title .box {
|
||||
width: 75px;
|
||||
height: 10px;
|
||||
background-color: rgba(36, 120, 255, 0.15);
|
||||
position: absolute;
|
||||
left: 23px;
|
||||
top: 53px;
|
||||
}
|
||||
|
||||
.content {
|
||||
margin-left: 8px;
|
||||
font-size: 14px;
|
||||
color: rgba(51, 51, 48, 1);
|
||||
font-weight: 500;
|
||||
line-height: 35px;
|
||||
margin-top: 30px;
|
||||
padding-bottom: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
.detailB {
|
||||
min-height: 363px;
|
||||
background: #ffffff;
|
||||
border-radius: 8px;
|
||||
margin-top: 20px;
|
||||
|
||||
.wenxintishi {
|
||||
display: flex;
|
||||
justify-content: stretch;
|
||||
padding: 72px;
|
||||
}
|
||||
|
||||
.el-tabs__item {
|
||||
height: 69px;
|
||||
padding: 25px 7px 0px 52px;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.el-tabs__nav-wrap::after {
|
||||
background-color: rgba(56, 125, 247, 0.2);
|
||||
}
|
||||
|
||||
.enclosure {
|
||||
height: 89px;
|
||||
margin-left: 51px;
|
||||
margin-right: 40px;
|
||||
// border-bottom: 1px solid rgba(56, 125, 247, 0.2);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.enclosureL {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #677d86;
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.download {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 16px;
|
||||
font-weight: 400;
|
||||
color: #2478ff;
|
||||
line-height: 24px;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.work {
|
||||
margin-left: 51px;
|
||||
margin-right: 40px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-top: 37px;
|
||||
}
|
||||
|
||||
.work .question {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: #333330;
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
.work .submit {
|
||||
width: 126px;
|
||||
height: 46px;
|
||||
background: #2478ff;
|
||||
box-shadow: 0px 1px 8px 0px rgba(56, 125, 247, 0.7);
|
||||
border-radius: 4px;
|
||||
font-size: 16px;
|
||||
font-weight: 800;
|
||||
color: #ffffff;
|
||||
line-height: 24px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.teacher {
|
||||
width: 434px;
|
||||
min-height: 500px;
|
||||
// height: 10%;
|
||||
background-color: rgba(255, 255, 255, 1);
|
||||
border-radius: 8px;
|
||||
|
||||
.title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-top: 39px;
|
||||
position: relative;
|
||||
margin-left: 48px;
|
||||
}
|
||||
|
||||
.title .text {
|
||||
margin-left: 8px;
|
||||
font-size: 16px;
|
||||
color: rgba(51, 51, 51, 1);
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.title .box {
|
||||
width: 75px;
|
||||
height: 10px;
|
||||
background-color: rgba(36, 120, 255, 0.15);
|
||||
position: absolute;
|
||||
left: 23px;
|
||||
top: 53px;
|
||||
}
|
||||
|
||||
.teacheritem {
|
||||
margin-left: 48px;
|
||||
margin-right: 48px;
|
||||
// min-height: 115px;
|
||||
margin-top: 20px;
|
||||
padding: 25px 0px;
|
||||
display: flex;
|
||||
position: relative;
|
||||
|
||||
// align-items: center;
|
||||
}
|
||||
|
||||
.teacheritem .peopleimg {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
border-radius: 30px;
|
||||
}
|
||||
|
||||
.teacheritem {
|
||||
.nameSpan {
|
||||
width: 190px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.teacherName {
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
color: #394145;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.teacheritem {
|
||||
.nameSpan {
|
||||
width: 190px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.teacherName {
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
color: #394145;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.teacheritem .introduce {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: #394145;
|
||||
margin-top: 14px;
|
||||
}
|
||||
|
||||
.teacheritem .follow {
|
||||
width: 80px;
|
||||
height: 30px;
|
||||
background: #387df7;
|
||||
border-radius: 4px;
|
||||
margin-top: 28px;
|
||||
position: absolute;
|
||||
right: -25px;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: #ffffff;
|
||||
line-height: 24px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -524,7 +524,7 @@ const showFileList = computed(() => {
|
||||
});
|
||||
|
||||
const handleClick = () => {
|
||||
console.log(fileList.value, uploadRef.value);
|
||||
console.log(fileList.value, uploadRef.value,sbValue.value.content);
|
||||
// 判断当前学员作业成绩是否已经导入,如果已经导入成绩,则不允许其再次上传作业
|
||||
if(submitScore.value){
|
||||
ElMessage.warning("您的作业成绩已出,不能重复上传");
|
||||
@@ -532,11 +532,10 @@ const handleClick = () => {
|
||||
}
|
||||
|
||||
if (!sbValue.value.content) {
|
||||
if (fileList.value.length === 0) {
|
||||
return ElMessage.warning("请输入作业内容");
|
||||
}
|
||||
ElMessage.warning("请输入作业内容");
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
loading.value = ElLoading.service({
|
||||
lock: true,
|
||||
text: "Loading",
|
||||
@@ -549,10 +548,14 @@ const handleClick = () => {
|
||||
workId,
|
||||
type,
|
||||
taskId: taskId || infoId,
|
||||
workScore: -1
|
||||
}).then((res) => {
|
||||
console.log(res);
|
||||
submitList.value.unshift(res.data);
|
||||
submitList.value.length!==0&&submitList.value.unshift(res.data);
|
||||
open();
|
||||
submitList.value = useRequest(TASK_WORK_SUBMIT_LIST, {
|
||||
workerId: workId,
|
||||
type
|
||||
}).data;
|
||||
sbValue.value.content = "";
|
||||
fileList.value = [];
|
||||
remove(0);
|
||||
|
||||
@@ -73,11 +73,11 @@
|
||||
<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">
|
||||
<!-- <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>
|
||||
</template> -->
|
||||
</el-dropdown>
|
||||
</div>
|
||||
</div>
|
||||
@@ -323,6 +323,27 @@
|
||||
<el-button type="primary" @click="dialogVisible = false" style="width:140px;height:40px;">确定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<!-- 开课列表弹框 -->
|
||||
<el-dialog title="" top="347px" v-model="openCourseVisible" :show-close="false"
|
||||
style="display:flex;justify-content:center;align-items:center;min-height: 320px;padding:0;border-radius: 4px;"
|
||||
width="502px">
|
||||
<div style="display: flex;justify-content:space-between;align-items:center;margin-bottom: 22px;">
|
||||
<div style="width:288px;color:#333333;font-size: 16px;font-weight: 600;">开课列表</div>
|
||||
<div
|
||||
@click="openCourseVisible = false"
|
||||
style="font-size: 12px;cursor:pointer;">X</div>
|
||||
</div>
|
||||
<div style="width: 100%;min-height:210px;margin-top: 12px;">
|
||||
<div
|
||||
v-for="item,key in openCourseList"
|
||||
style="width: 100%;display: flex;justify-content: space-between;align-items: center;margin-bottom: 12px;background: rgb(247, 251, 253);height: 40px;padding: 5px;border-radius: 5px;">
|
||||
<div style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;width: 320px;">{{ item }}</div>
|
||||
<div
|
||||
@click="toOffcoursePlanPage(openCourseIdList[key])"
|
||||
style="width:60px;height:30px;text-align:center;line-height:30px;background:#0078fc;border-radius:5px;color:#fff;cursor: pointer;">去上课</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
@@ -367,6 +388,9 @@ const studyProgress = [
|
||||
}
|
||||
];
|
||||
const stateValue = ref(undefined)
|
||||
const openCourseVisible = ref(false);
|
||||
const openCourseList = ref([]);
|
||||
const openCourseIdList = ref([]);
|
||||
// 完成度选择
|
||||
const myRate = ref('')
|
||||
const myRateStr = ref('')
|
||||
@@ -453,6 +477,9 @@ async function toFinish(d, sName, chapterOrStageId) {
|
||||
return ElMessage.error("还未添加开课,请联系管理员!")
|
||||
}
|
||||
if(d.targetId.split(',').length>1){
|
||||
openCourseList.value = d.targetName?.split(',');
|
||||
openCourseIdList.value = d.targetId?.split(',');
|
||||
openCourseVisible.value = true;
|
||||
return
|
||||
}
|
||||
}
|
||||
@@ -729,8 +756,13 @@ function continueLearn(lastLearnedId) {
|
||||
.example-showcase .el-loading-mask {
|
||||
z-index: 9;
|
||||
}
|
||||
|
||||
.el-popper {
|
||||
z-index: 0 !important;
|
||||
}
|
||||
.pathdetails {
|
||||
.el-dialog__body{
|
||||
width: 80%;
|
||||
}
|
||||
.el-dialog__header {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@@ -96,11 +96,11 @@
|
||||
@click="toFinish(value)">
|
||||
{{ value.statusName || (data.unlockMode === 1 ? TASK_TYPES.toName[value.type] : "未解锁") }}
|
||||
</div>
|
||||
<template #dropdown v-if="value.type===2 && value.targetId?.split(',')?.length > 1">
|
||||
<!-- <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>
|
||||
</template> -->
|
||||
</el-dropdown>
|
||||
</div>
|
||||
</div>
|
||||
@@ -257,6 +257,27 @@
|
||||
<el-button type="primary" @click="dialogVisible = false" style="width:140px;height:40px;">确定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<!-- 开课列表弹框 -->
|
||||
<el-dialog title="" top="347px" v-model="openCourseVisible" :show-close="false"
|
||||
style="display:flex;justify-content:center;align-items:center;min-height: 320px;padding:0;border-radius: 4px;"
|
||||
width="502px">
|
||||
<div style="display: flex;justify-content:space-between;align-items:center;margin-bottom: 22px;">
|
||||
<div style="width:288px;color:#333333;font-size: 16px;font-weight: 600;">开课列表</div>
|
||||
<div
|
||||
@click="openCourseVisible = false"
|
||||
style="font-size: 12px;cursor:pointer;">X</div>
|
||||
</div>
|
||||
<div style="width: 100%;min-height:210px;margin-top: 12px;">
|
||||
<div
|
||||
v-for="item,key in openCourseList"
|
||||
style="width: 100%;display: flex;justify-content: space-between;align-items: center;margin-bottom: 12px;background: rgb(247, 251, 253);height: 40px;padding: 5px;border-radius: 5px;">
|
||||
<div style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;width: 320px;">{{ item }}</div>
|
||||
<div
|
||||
@click="toOffcoursePlanPage(openCourseIdList[key])"
|
||||
style="width:60px;height:30px;text-align:center;line-height:30px;background:#0078fc;border-radius:5px;color:#fff;cursor: pointer;">去上课</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -301,6 +322,9 @@ const handleClick = (tab, event) => {
|
||||
const path = { 1: "path" };
|
||||
|
||||
const dialogVisible = ref(false);
|
||||
const openCourseVisible = ref(false);
|
||||
const openCourseList = ref([]);
|
||||
const openCourseIdList = ref([]);
|
||||
const dialogVisibleTip = ref("");
|
||||
|
||||
// 判断当前任务已结束及时间意义上的结束 提示用户
|
||||
@@ -349,6 +373,9 @@ async function toFinish(d) {
|
||||
return ElMessage.error("还未添加开课,请联系管理员!")
|
||||
}
|
||||
if(d.targetId.split(',').length>1){
|
||||
openCourseList.value = d.targetName?.split(',');
|
||||
openCourseIdList.value = d.targetId?.split(',');
|
||||
openCourseVisible.value = true;
|
||||
return
|
||||
}
|
||||
}
|
||||
@@ -582,6 +609,10 @@ async function toFinish(d) {
|
||||
|
||||
}
|
||||
|
||||
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 + "-");
|
||||
}
|
||||
@@ -611,6 +642,12 @@ function continueLearn(taskname, datas) {
|
||||
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
||||
<style lang="scss">
|
||||
.pathdetails {
|
||||
.el-dialog__body{
|
||||
width: 80%;
|
||||
}
|
||||
.el-dialog__header {
|
||||
display: none;
|
||||
}
|
||||
.crumb {
|
||||
color: #fff;
|
||||
display: flex;
|
||||
|
||||
@@ -49,11 +49,11 @@
|
||||
:style="{
|
||||
'margin-left': key === 0 ? '15px' : '10px',
|
||||
background:
|
||||
value.selectAnswer === item + 1
|
||||
value.selectAnswer === item + 1
|
||||
? 'rgba(86, 163, 249, 1)'
|
||||
: 'rgba(86, 163, 249, 0)',
|
||||
color:
|
||||
value.selectAnswer === item + 1
|
||||
value.selectAnswer === item + 1
|
||||
? '#fff'
|
||||
: 'rgba(86, 163, 249, 1)',
|
||||
}"
|
||||
@@ -62,7 +62,7 @@
|
||||
if (data.isSubmit) {
|
||||
return;
|
||||
}
|
||||
value.selectAnswer = item + 1;
|
||||
value.selectAnswer = item + 1 ;
|
||||
}
|
||||
">
|
||||
<div>{{ item + 1 }}</div>
|
||||
@@ -79,7 +79,7 @@
|
||||
{{ value?.singleStemName }}
|
||||
</div>
|
||||
<!-- 需要遍历的选项 -->
|
||||
<div style="display:flex;justify-content:flex-start;align-items:center;margin-top: 24px;">
|
||||
<div style="display:flex;justify-content:flex-start;align-items:flex-start;margin-top: 24px;flex-direction: column;">
|
||||
<div
|
||||
v-for="(values, indexs) in value.assessmentSingleChoiceVoList"
|
||||
:key="indexs"
|
||||
@@ -96,12 +96,14 @@
|
||||
<div style="display:flex">
|
||||
<img style="width: 19px; height: 18px; cursor: pointer"
|
||||
:src="values.select ? checkbox : checkbox2"/>
|
||||
<div class="people">{{ values.singleOptionName }}</div>
|
||||
<div class="people" style="width: 800px;">{{ values.singleOptionName }}</div>
|
||||
</div>
|
||||
<img v-if="values.singleOptionPictureAddress"
|
||||
style="width: 140px; height: 140px; border-radius: 8px;margin-left: 130px;margin-top: 12px;"
|
||||
<div style="display: flex;justify-content:flex-start;align-items:center;width: 100%;">
|
||||
<img v-if="values.singleOptionPictureAddress"
|
||||
style="width: 140px; height: 140px; border-radius: 8px;margin-left: 30px;margin-top: 12px;margin-bottom: 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>
|
||||
@@ -113,7 +115,7 @@
|
||||
{{ value?.multipleStemName }}
|
||||
</div>
|
||||
<!-- 需要遍历的选项 -->
|
||||
<div style="display:flex;justify-content:flex-start;align-items:center;margin-top: 24px;">
|
||||
<div style="display:flex;justify-content:flex-start;align-items:flex-start;margin-top: 24px;flex-direction: column;">
|
||||
<div
|
||||
v-for="(values, indexs) in value.multipleChoiceVoList"
|
||||
:key="indexs"
|
||||
@@ -128,7 +130,7 @@
|
||||
<div style="display:flex">
|
||||
<img style="width: 19px; height: 18px; cursor: pointer"
|
||||
:src="values.select ? checkbox : checkbox2"/>
|
||||
<div class="people">{{ values.multipleOptionName }}</div>
|
||||
<div class="people" style="width:800px;">{{ values.multipleOptionName }}</div>
|
||||
</div>
|
||||
<img v-if="values.multipleOptionPictureAddress"
|
||||
style="width: 140px; height: 140px; border-radius: 8px;margin-left: 130px;margin-top: 12px;"
|
||||
@@ -158,12 +160,12 @@
|
||||
">
|
||||
<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' }">
|
||||
@click="emptyValuePromp" :style="{ background: data.isSubmit ? '#999' : '#2478ff' }">
|
||||
提交
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div class="submit" @click="submit" :style="{ background: data.isSubmit ? '#999' : '#2478ff' }">
|
||||
<div class="submit" @click="emptyValuePromp" :style="{ background: data.isSubmit ? '#999' : '#2478ff' }">
|
||||
提交
|
||||
</div>
|
||||
</div>
|
||||
@@ -189,6 +191,24 @@
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<!-- 提示用户有未填选项 -->
|
||||
<el-dialog v-model="isEmptyValue" title="" width="20%" center :show-close="false" :align-center="true">
|
||||
<div style="text-align: center;font-size:16px;"> <span style="color:black">
|
||||
您还有未完成的评估题目,您确认提交么?
|
||||
</span></div>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button class="cancel"
|
||||
style="color: #387DF7; border: 1px solid #387DF7;padding: 8px 32px; border-radius: 4px;"
|
||||
@click="isEmptyValue = false">取消</el-button>
|
||||
<el-button class="back"
|
||||
style="background: #387DF7;box-shadow: 1px 2px 15px 1px rgba(56,125,247,0.34);border: 0px;padding: 8px 32px;"
|
||||
type="primary" @click="submit">
|
||||
确定
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script setup>
|
||||
import checkbox from "@/assets/image/checkbox.png";
|
||||
@@ -260,24 +280,35 @@ const open = () => {
|
||||
centerDialogVisible.value = true;
|
||||
};
|
||||
|
||||
function submit() {
|
||||
console.log("录入首次进入页面时间", answerTime);
|
||||
|
||||
const isEmptyValue = ref(false);
|
||||
function emptyValuePromp() {
|
||||
if (data.value.isSubmit) {
|
||||
return;
|
||||
}
|
||||
if (data.value.singleStemVoList?.some(t=>t?.assessmentSingleChoiceVoList?.every(s => !s?.select))) {
|
||||
return ElMessage.warning("您有未填写的单选评估题干");
|
||||
isEmptyValue.value = true;
|
||||
// return ElMessage.warning("您有未填写的单选评估题干");
|
||||
}
|
||||
if (data.value.multipleStemVoList?.some(t=>t?.multipleChoiceVoList?.every(s => !s?.select))) {
|
||||
return ElMessage.warning("您有未填写的多选评估题干");
|
||||
isEmptyValue.value = true;
|
||||
// return ElMessage.warning("您有未填写的多选评估题干");
|
||||
}
|
||||
if (data.value.scoringQuestionVoList?.some(s => !s?.selectAnswer)) {
|
||||
return ElMessage.warning("您有未填写的评分评估题干");
|
||||
isEmptyValue.value = true;
|
||||
// return ElMessage.warning("您有未填写的评分评估题干");
|
||||
}
|
||||
if (data.value.essayQuestionVoList?.some(s => !s?.content)) {
|
||||
return ElMessage.warning("您有未填写的简答评估题干");
|
||||
isEmptyValue.value = true;
|
||||
// return ElMessage.warning("您有未填写的简答评估题干");
|
||||
}
|
||||
if(!isEmptyValue.value){
|
||||
submit()
|
||||
}
|
||||
}
|
||||
|
||||
function submit() {
|
||||
console.log("录入首次进入页面时间", answerTime);
|
||||
data.value.isSubmit = !data.value.isSubmit;
|
||||
request(ASSESSMENT_SUBMIT, {
|
||||
targetId: infoId ? infoId : 0, // 项目、路径图或开课的Id
|
||||
@@ -288,6 +319,7 @@ function submit() {
|
||||
result: JSON.stringify(data.value),
|
||||
beginTime: answerTime
|
||||
}).then(() => {
|
||||
isEmptyValue.value = false;
|
||||
open();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user