mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-09 19:06:48 +08:00
fix:修改版本号
This commit is contained in:
4
.env
4
.env
@@ -1,7 +1,9 @@
|
||||
VITE_BASE=/fe-student
|
||||
VITE_BASE_API=
|
||||
VITE_OUTPUT_DIR=./dist
|
||||
VITE_FILE_PATH=/upload/
|
||||
VITE_BASE_LOGIN_URL=https://u-pre.boe.com/web/
|
||||
VITE_PROXY_URL=http://111.231.196.214:30001
|
||||
VITE_PROXY_URL=http://111.231.196.214/manageApi
|
||||
|
||||
|
||||
VITE_BOE_ONLINE_CLASS_URL=https://u-pre.boe.com/pc/course/studyindex?id=
|
||||
|
||||
5
docker/Dockerfile
Normal file
5
docker/Dockerfile
Normal file
@@ -0,0 +1,5 @@
|
||||
FROM devforth/spa-to-http:latest
|
||||
WORKDIR /
|
||||
|
||||
ADD ./dist/ .
|
||||
EXPOSE 8080
|
||||
24
src/App.vue
24
src/App.vue
@@ -30,23 +30,31 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { boeRequest } from "@/api/request";
|
||||
import {boeRequest, request} from "@/api/request";
|
||||
import { GET_USER_INFO } from "@/api/ThirdApi";
|
||||
import { useStore } from "vuex";
|
||||
import { onMounted } from "vue";
|
||||
import router from "@/router";
|
||||
import {useRoute} from "vue-router/dist/vue-router";
|
||||
import {USER_INFO} from "@/api/api";
|
||||
|
||||
console.log("版本2.0.5------------");
|
||||
console.log("版本2.1.2------------");
|
||||
const store = useStore();
|
||||
const {path} = useRoute();
|
||||
onMounted(() => {
|
||||
getUserInfo();
|
||||
path === '/login' || getUserInfo();
|
||||
});
|
||||
|
||||
function getUserInfo() {
|
||||
boeRequest(GET_USER_INFO).then((res) => {
|
||||
res.result.avatar = res.result.avatar ? res.result.avatar : '/800e23f7-b58c-4192-820d-0c6a2b7544cc.png'
|
||||
store.commit("SET_USER", res.result);
|
||||
});
|
||||
if(import.meta.env.MODE ==='development' || import.meta.env.MODE ==='test'){
|
||||
request(USER_INFO,{}).then(res=>{
|
||||
store.commit("SET_USER", res.data);
|
||||
})
|
||||
}else{
|
||||
boeRequest(GET_USER_INFO).then((res) => {
|
||||
res.result.avatar = res.result.avatar || '/800e23f7-b58c-4192-820d-0c6a2b7544cc.png'
|
||||
store.commit("SET_USER", res.result);
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
|
||||
3
src/api/CONST.js
Normal file
3
src/api/CONST.js
Normal file
@@ -0,0 +1,3 @@
|
||||
export const PROJECT = 1;
|
||||
export const ROUTER = 2;
|
||||
export const COURSE = 3;
|
||||
@@ -7,8 +7,9 @@
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
*/
|
||||
export const LOGIN = '/admin/CheckUser/userLogin post'
|
||||
export const USER_INFO = '/admin/CheckUser/userInfo'
|
||||
// export const FILE_UPLOAD = 'http://111.231.196.214:30001/file/upload'
|
||||
export const FILE_UPLOAD = import.meta.env.VITE_BASE_API + '/file/upload'
|
||||
export const FILE_UPLOAD = import.meta.env.VITE_BASE_API + '/file/uploadFile'
|
||||
export const COMMON_TOKEN = 'https://upload-z2.qiniup.com'
|
||||
export const ROUTER_CHAPTER_LIST = '/stu/router/chapterList'
|
||||
export const ROUTER_LIST = '/stu/router/list post'
|
||||
@@ -51,7 +52,7 @@ export const COMMENT_PRAISE = '/comment/praise post'
|
||||
export const COMMENT_COLLECTION = '/comment/collection post'
|
||||
|
||||
export const ASSESSMENT_SUBMIT_QUERY = assessmentId => `/assessmentSubmit/queryAssessmentSubmitDetailById?assessmentSubmitId=${assessmentId} post`
|
||||
export const ASSESSMENT_QUERY = assessmentId => `/stu/task/evaluate/get`
|
||||
export const ASSESSMENT_QUERY = assessmentId => `/stu/task/queryAssessmentDetailById`
|
||||
export const ASSESSMENT_SUBMIT = '/stu/task/evaluate/commit post'
|
||||
|
||||
export const ACTIVITY = '/activity'
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
import router from "@/router";
|
||||
import { reactive, ref, toRefs, watch } from "vue";
|
||||
import {reactive, ref, toRefs, watch} from "vue";
|
||||
import axios from 'axios';
|
||||
import { getCookie } from "@/api/utils";
|
||||
import {getCookie} from "@/api/utils";
|
||||
import JSONBigInt from 'json-bigint';
|
||||
const JSONBigIntStr = JSONBigInt({ storeAsString: true });
|
||||
export function usePage(_url, param) {
|
||||
|
||||
const JSONBigIntStr = JSONBigInt({storeAsString: true});
|
||||
|
||||
export function usePage(_url, param, callback) {
|
||||
|
||||
const state = reactive({
|
||||
data: {},
|
||||
@@ -12,11 +14,11 @@ export function usePage(_url, param) {
|
||||
total: 0,
|
||||
size: 10,
|
||||
current: 1,
|
||||
params: { pageNo: 1, pageSize: 10, ...param }
|
||||
params: {pageNo: 1, pageSize: 10, ...param}
|
||||
})
|
||||
|
||||
watch(param, () => {
|
||||
state.params = { ...state.params, ...param }
|
||||
state.params = {...state.params, ...param}
|
||||
fetchData()
|
||||
})
|
||||
|
||||
@@ -28,6 +30,7 @@ export function usePage(_url, param) {
|
||||
state.total = r.data.total
|
||||
state.current = r.data.current
|
||||
state.loading = false
|
||||
callback(r)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -87,14 +90,20 @@ export async function request(_url, params) {
|
||||
method,
|
||||
headers: {
|
||||
'token': getCookie('token'),
|
||||
...method !== 'get' ? { 'Content-Type': 'application/json' } : {}
|
||||
...method !== 'get' ? {'Content-Type': 'application/json'} : {}
|
||||
},
|
||||
baseURL: import.meta.env.VITE_BASE_API,
|
||||
...method !== 'get' ? { data: JSON.stringify(body) } : {}
|
||||
...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' ? router.push({ path: '/login' }) : window.open(import.meta.env.VITE_BASE_LOGIN_URL,'_top')
|
||||
(import.meta.env.MODE === 'development' || import.meta.env.MODE === 'test') ? router.push({path: '/login'}) : window.open(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 (import.meta.env.DEV && response.code === 1000) {
|
||||
// router.push({path: '/login'})
|
||||
@@ -105,12 +114,8 @@ export async function request(_url, params) {
|
||||
// duration: 2,
|
||||
// });
|
||||
// }
|
||||
throw new Error('接口异常')
|
||||
}
|
||||
return response
|
||||
}).catch(e => {
|
||||
console.log('eeeee', e)
|
||||
// router.push({path: '/login'})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -131,16 +136,16 @@ export async function boeRequest(_url, params) {
|
||||
}
|
||||
}
|
||||
const body = method !== 'get' ? params || {} : {}
|
||||
return fetch(url,{
|
||||
return fetch(url, {
|
||||
method,
|
||||
headers:{
|
||||
headers: {
|
||||
token: getCookie('token'),
|
||||
...method !== 'get' ? {'Content-Type': 'application/json'} : {}
|
||||
},
|
||||
...method !== 'get' ? {body: JSON.stringify(body)} : {}
|
||||
}).then(res=>{
|
||||
}).then(res => {
|
||||
return res.text()
|
||||
}).then(res=>{
|
||||
}).then(res => {
|
||||
return JSONBigIntStr.parse(res)
|
||||
})
|
||||
}
|
||||
@@ -55,7 +55,7 @@ function toDetail(i) {
|
||||
if (current.value !== i) {
|
||||
return
|
||||
}
|
||||
import.meta.env.MODE === "development"
|
||||
(import.meta.env.MODE === "development" || import.meta.env.MODE === "test")
|
||||
? router.push({
|
||||
path: "/pathdetails",
|
||||
query: {routerId: props.detail.routerId, routerName: props.detail.routerName},
|
||||
|
||||
@@ -34,25 +34,9 @@
|
||||
<div style="margin-left: 8px">{{ data.planDto?.address }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="projectStatus && projectEndTime">
|
||||
<div v-if="projectStatus !=='3' && new Date(projectEndTime).getTime() > new Date().getTime()" style="display: flex">
|
||||
|
||||
<botton class="btn" style="margin-right: 20px" :style="{
|
||||
background: isAllowSign? data.signFlag ? '#999' : 'rgb(57, 146, 249)':'#999',
|
||||
}" @click="signClick">{{ data.signFlag ? "已签到" : "签到" }}
|
||||
</botton>
|
||||
<!-- <botton style="background: #999" class="btn" @click="toSurvery" v-if="data.planDto?.evalFlag == 0">
|
||||
评估
|
||||
</botton> -->
|
||||
<botton v-if="data.planDto?.evalFlag !== 0" :style="{
|
||||
background: `${new Date(data.planDto?.beginTime).getTime() > new Date().getTime() ? '#999' : data.isSurvery ? '#999' : 'rgb(57, 146, 249)'}`,
|
||||
}" class="btn" @click="toSurvery">{{ data.isSurvery ? "已评估" : "评估" }}
|
||||
</botton>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div >
|
||||
<div style="display: flex">
|
||||
|
||||
|
||||
<botton class="btn" style="margin-right: 20px" :style="{
|
||||
background: isAllowSign? data.signFlag ? '#999' : 'rgb(57, 146, 249)':'#999',
|
||||
}" @click="signClick">{{ data.signFlag ? "已签到" : "签到" }}
|
||||
@@ -96,47 +80,42 @@
|
||||
<div v-for="(el, index) in formateArr(data.planDto?.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>
|
||||
<FileTypeImg :v-model="el.name? el.name : 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.name? el.name : el.slice(el.lastIndexOf('/')+1,el.indexOf('-')) + el.slice(el.lastIndexOf('.')) }}</div>
|
||||
</div>
|
||||
<div v-if="projectStatus !=='3' && new Date(projectEndTime).getTime() > new Date().getTime()" >
|
||||
<div>
|
||||
<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)">
|
||||
下载
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="download">
|
||||
<img style="width: 16px; height: 15px" src="../../assets/image/download.png" />
|
||||
<div style="margin-left: 5px" @click="download(el)">
|
||||
下载
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div v-else class="download">-->
|
||||
<!-- <img style="width: 16px; height: 15px" src="../../assets/image/download.png" />-->
|
||||
<!-- <div style="margin-left: 5px" @click="download(el.name? el.response.data : el)">-->
|
||||
<!-- 下载-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="课程作业" name="second">
|
||||
|
||||
<div class="work" v-if="data.workDto">
|
||||
<div>
|
||||
<div class="question">{{ data.workDto?.workName }}</div>
|
||||
<div style="margin-top: 16px; display: flex">
|
||||
<div class="tag1" v-if="data.workDto?.workFlag">必修</div>
|
||||
<div class="tag3" style="margin-left: 11px">作业</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div
|
||||
v-if="projectStatus !=='3' && new Date(projectEndTime).getTime() > new Date().getTime()"
|
||||
:style="{ background: new Date(data.planDto?.beginTime).getTime() > new Date().getTime() ? '#999' : '' }"
|
||||
class="submit" @click="toWork">
|
||||
交作业
|
||||
</div>
|
||||
<div>
|
||||
<div class="question">{{ data.workDto?.workName }}</div>
|
||||
<div style="margin-top: 16px; display: flex">
|
||||
<div class="tag1" v-if="data.workDto?.workFlag">必修</div>
|
||||
<div class="tag3" style="margin-left: 11px">作业</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
:style="{ background: new Date(data.planDto?.beginTime).getTime() > new Date().getTime() ? '#999' : '' }"
|
||||
class="submit" @click="toWork">
|
||||
交作业
|
||||
</div>
|
||||
</div>
|
||||
<div v-else
|
||||
style=" font-size: 14px; font-weight: 400; line-height: 24px; cursor: pointer;margin-left: 40px;margin-top: 20px; ">
|
||||
<div v-else style=" font-size: 14px; font-weight: 400; line-height: 24px; cursor: pointer;margin-left: 40px;margin-top: 20px; ">
|
||||
此课程无作业
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
@@ -154,9 +133,7 @@
|
||||
<div class="tag3" style="margin-left: 11px">考试</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-if="projectStatus !=='3' && new Date(projectEndTime).getTime() > new Date().getTime()"
|
||||
:style="{ background: new Date(data.planDto?.beginTime).getTime() > new Date().getTime() ? '#999' : '' }"
|
||||
class="submit" @click="toExamItem(data.examinationDto)">
|
||||
去考试
|
||||
@@ -212,12 +189,10 @@ const returnclick = () => {
|
||||
router.back();
|
||||
};
|
||||
const {
|
||||
query: { courseId, type, id: taskId, projectStatus, projectEndTime },
|
||||
query: { courseId, type, id: taskId },
|
||||
} = useRoute();
|
||||
|
||||
const { data } = useRequest(STU_OFFCOURSE_DETAIL, { courseId });
|
||||
console.log("datadatadatadatadatadatadata", data);
|
||||
console.log("项目状态字段传递", projectStatus, projectEndTime);
|
||||
const { data } = useRequest(STU_OFFCOURSE_DETAIL, { courseId,usePermission:true });
|
||||
const teacherInfo = useUserInfo(
|
||||
computed(() => data.value?.planDto?.teacherId)
|
||||
);
|
||||
@@ -239,9 +214,14 @@ const downloads = (url) => {
|
||||
};
|
||||
|
||||
function formateArr(strs) {
|
||||
let arrs = strs.split(',')
|
||||
console.log('112233', arrs)
|
||||
return arrs
|
||||
let newArr = [];
|
||||
try{
|
||||
newArr = JSON.parse(strs)
|
||||
} catch {
|
||||
newArr = strs?.split(',')
|
||||
}
|
||||
console.log('112233', newArr)
|
||||
return newArr
|
||||
}
|
||||
|
||||
let timer = null;
|
||||
@@ -319,11 +299,7 @@ const signClick = () => {
|
||||
data.value.signFlag = 1;
|
||||
ElMessage.warning("签到成功");
|
||||
|
||||
if (taskId) {
|
||||
request(TASK_OFFCOURSE_SIGN, { courseId: courseId, taskId, type });
|
||||
} else {
|
||||
request(TASK_OFFCOURSE_NOTASK_SIGN, { courseId: courseId });
|
||||
}
|
||||
request(TASK_OFFCOURSE_NOTASK_SIGN, { courseId: courseId });
|
||||
};
|
||||
|
||||
function toSurvery() {
|
||||
@@ -341,12 +317,13 @@ function toSurvery() {
|
||||
router.push({
|
||||
path: "/surveydetail",
|
||||
query: {
|
||||
id:taskId,
|
||||
courseId: data.value.planDto.evaluateId,
|
||||
pName: "面授课",
|
||||
infoId: data.value.planDto.offcoursePlanId,
|
||||
chapterOrStageId: 0,
|
||||
sName: data.value.planDto.name,
|
||||
type: 3
|
||||
type
|
||||
},
|
||||
});
|
||||
}
|
||||
@@ -367,7 +344,7 @@ function toWork() {
|
||||
query: {
|
||||
courseId: data.value.workDto.workId,
|
||||
id: taskId,
|
||||
infoId: data.value.offcourseDto.offcourseId,
|
||||
infoId: data.value.planDto.offcoursePlanId,
|
||||
chapterOrStageId: 0,
|
||||
type,
|
||||
pName: "面授课",
|
||||
|
||||
501
src/views/faceteach/FaceTeachNoCommon.vue
Normal file
501
src/views/faceteach/FaceTeachNoCommon.vue
Normal file
@@ -0,0 +1,501 @@
|
||||
<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="display:flex;">
|
||||
<img style="width:405px;height:230px;margin-left: 48px;border-radius: 8px;margin-top: 40px;"
|
||||
:src="data.offcourseDto.picUrl" alt="">
|
||||
<div style="margin-left: 40px;margin-top: 56px;">
|
||||
<div class="title">【面授课】{{ data.planDto?.name }}</div>
|
||||
<div class="time" style="margin-top: 30px">
|
||||
<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: 10px">
|
||||
<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">-->
|
||||
<!-- <botton class="btn" style="margin-right: 20px;width: 160px;height: 46px;" v-if="data.planDto.applyFlag" @click="onLineSignUp" :style="{ background: data.isSignUp ? '#999' : 'rgb(57, 146, 249)'}">{{data.isSignUp?'已报名':'立即报名'}}</botton>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: flex">
|
||||
</div>
|
||||
</div>
|
||||
<!-- 基本信息 -->
|
||||
|
||||
<!-- 详细信息 -->
|
||||
<div class="detailinfo">
|
||||
<div class="detail">
|
||||
<div class="detailB">
|
||||
<el-tabs v-model="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" :disabed=dayjs().isBefore(dayjs(data.planDto.beginTime))>
|
||||
|
||||
</el-tab-pane> -->
|
||||
<el-tab-pane label="材料下载" name="third" :disabed=dayjs().isBefore(dayjs(data.planDto.beginTime))>
|
||||
<div v-if="!data.planDto?.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"
|
||||
: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 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>
|
||||
</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>
|
||||
<!-- todo #面授课接口 讲师缺少img和介绍-->
|
||||
<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 class="follow">+ 关注</div>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 详细信息 -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {computed, reactive, toRefs, watch, onUnmounted} from "vue";
|
||||
import FileTypeImg from "@/components/FileTypeImg.vue";
|
||||
import {request, useRequest} from "@/api/request";
|
||||
import {
|
||||
STU_OFFCOURSE_DETAIL,
|
||||
FACETEACH_SIGNUP
|
||||
} from "@/api/api";
|
||||
import {useRoute, useRouter} from "vue-router";
|
||||
import {useUserInfo} from "@/api/utils";
|
||||
import {ElMessage, messageConfig} from "element-plus";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
const router = useRouter();
|
||||
const returnclick = () => {
|
||||
router.back();
|
||||
};
|
||||
const {
|
||||
query: {courseId, type, id: taskId},
|
||||
} = useRoute();
|
||||
|
||||
const {data} = useRequest(STU_OFFCOURSE_DETAIL, {courseId});
|
||||
|
||||
const teacherInfo = useUserInfo(
|
||||
computed(() => data.value?.planDto?.teacherId)
|
||||
);
|
||||
|
||||
const state = reactive({
|
||||
activeName: "first",
|
||||
enclosure: "",
|
||||
isAllowSign: false,
|
||||
});
|
||||
const {activeName, enclosure, isAllowSign} = toRefs(state);
|
||||
const handleClick = (tab, event) => {
|
||||
console.log("附件", tab, event);
|
||||
};
|
||||
const download = (url) => {
|
||||
window.open(url);
|
||||
};
|
||||
const downloads = (url) => {
|
||||
ElMessage.warning("未在有效时间范围内,请耐心等待!");
|
||||
};
|
||||
let timer = null;
|
||||
|
||||
// 报名
|
||||
function onLineSignUp() {
|
||||
if(data.value.isSignUp){
|
||||
return;
|
||||
}
|
||||
request(FACETEACH_SIGNUP, {courseId})
|
||||
data.value.isSignUp = true
|
||||
ElMessage.success("报名成功");
|
||||
}
|
||||
|
||||
function formateArr(strs) {
|
||||
let arrs = strs.split(',')
|
||||
console.log('112233', arrs)
|
||||
return arrs
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
||||
<style lang="scss">
|
||||
.faceteach {
|
||||
.crumb {
|
||||
color: #fff;
|
||||
display: flex;
|
||||
font-size: 14px;
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.bascinfo {
|
||||
width: 100%;
|
||||
height: 310px;
|
||||
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>
|
||||
@@ -22,7 +22,7 @@
|
||||
<div class="bascinfo">
|
||||
<div style="display:flex;">
|
||||
<img style="width:405px;height:230px;margin-left: 48px;border-radius: 8px;margin-top: 40px;"
|
||||
:src="data.offcourseDto.picUrl" alt="">
|
||||
:src="data.offcourseDto?.picUrl" alt="">
|
||||
<div style="margin-left: 40px;margin-top: 56px;">
|
||||
<div class="title">【面授课】{{ data.planDto?.name }}</div>
|
||||
<div class="time" style="margin-top: 30px">
|
||||
@@ -39,7 +39,7 @@
|
||||
<div style="margin-left: 8px">{{ data.planDto?.address }}</div>
|
||||
</div>
|
||||
<div class="time" style="margin-top: 37px">
|
||||
<botton class="btn" style="margin-right: 20px;width: 160px;height: 46px;" v-if="data.planDto.applyFlag" @click="onLineSignUp" :style="{ background: data.isSignUp ? '#999' : 'rgb(57, 146, 249)'}">{{data.isSignUp?'已报名':'立即报名'}}</botton>
|
||||
<botton class="btn" style="margin-right: 20px;width: 160px;height: 46px;" v-if="data.hasTask || data.planDto.applyFlag" @click="onLineSignUp" :style="{ background: data.isSignUp ? '#999' : 'rgb(57, 146, 249)'}">{{data.isSignUp?'已报名':'立即报名'}}</botton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -126,9 +126,6 @@ import FileTypeImg from "@/components/FileTypeImg.vue";
|
||||
import {request, useRequest} from "@/api/request";
|
||||
import {
|
||||
STU_OFFCOURSE_DETAIL,
|
||||
TASK_OFFCOURSE_NOTASK_SIGN,
|
||||
TASK_OFFCOURSE_SIGN,
|
||||
TASK_BROADCAST_SIGN,
|
||||
FACETEACH_SIGNUP
|
||||
} from "@/api/api";
|
||||
import {useRoute, useRouter} from "vue-router";
|
||||
@@ -144,7 +141,7 @@ const {
|
||||
query: {courseId, type, id: taskId},
|
||||
} = useRoute();
|
||||
|
||||
const {data} = useRequest(STU_OFFCOURSE_DETAIL, {courseId});
|
||||
const {data = {}} = useRequest(STU_OFFCOURSE_DETAIL, {courseId});
|
||||
|
||||
const teacherInfo = useUserInfo(
|
||||
computed(() => data.value?.planDto?.teacherId)
|
||||
@@ -163,7 +160,7 @@ const download = (url) => {
|
||||
window.open(url);
|
||||
};
|
||||
const downloads = (url) => {
|
||||
ElMessage.warning("未到开始时间,请耐心等待!");
|
||||
ElMessage.warning("未在有效时间范围内,请耐心等待!");
|
||||
};
|
||||
let timer = null;
|
||||
|
||||
|
||||
@@ -141,11 +141,11 @@
|
||||
}}提交</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div v-else>
|
||||
<div style="display: flex; justify-content: center">
|
||||
<button disabled class="tijiao"
|
||||
style="background:#999;border-radius: 6px;cursor: not-allowed;">未到开始时间</button>
|
||||
style="background:#999;border-radius: 6px;cursor: not-allowed;">未在有效时间范围内</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -158,11 +158,11 @@
|
||||
}}提交</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div v-else>
|
||||
<div style="display: flex; justify-content: center">
|
||||
<button disabled class="tijiao"
|
||||
style="background:#999;border-radius: 6px;cursor: not-allowed;">未到开始时间</button>
|
||||
style="background:#999;border-radius: 6px;cursor: not-allowed;">未在有效时间范围内</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -190,17 +190,14 @@
|
||||
}">
|
||||
<div class="content1">{{ value.createTime }}</div>
|
||||
<div class="content2">
|
||||
<div>
|
||||
<div :title="value.workUploadContent">
|
||||
{{ value.workUploadContent }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="content3">
|
||||
<div><span style="margin-left: 10px">
|
||||
<el-link target="_blank" type="primary" :href="value.workUploadAddress?.split(',')[0] || ''">{{
|
||||
value.workUploadAddress?.split(',')[0].split('/').at(-1) ||
|
||||
''
|
||||
}}</el-link>
|
||||
<el-link target="_blank" type="primary" :href="fielPath+value.workUploadAddress?.split(',')[0] || ''">{{value.workUploadAddress?.split(',')[0] }}</el-link>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -281,6 +278,7 @@ import { ElMessage } from "element-plus";
|
||||
//import AlertSuccess from "@/components/alert/AlertSuccess.vue";
|
||||
|
||||
const fileList = ref([]);
|
||||
const fielPath = ref(import.meta.env.VITE_FILE_PATH);
|
||||
const uploadRef = ref();
|
||||
|
||||
const centerDialogVisible = ref(false);
|
||||
@@ -293,7 +291,7 @@ const returnclick = () => {
|
||||
router.back();
|
||||
};
|
||||
const {
|
||||
query: { courseId: workId, type, id: taskId, pName, sName, projectStatus, projectEndTime},
|
||||
query: { courseId: workId, type, id: taskId, pName, sName, projectStatus, projectEndTime,infoId},
|
||||
} = useRoute();
|
||||
|
||||
const { data } = taskId && taskId !== 'undefined' ? useRequest(TASK_WORK_DETAIL, { workId, taskId }) : useRequest(TASK_WORK_DETAIL, { workId });
|
||||
@@ -315,18 +313,17 @@ const showFileList = computed(() => {
|
||||
const handleClick = () => {
|
||||
console.log(fileList.value, uploadRef.value)
|
||||
if (!sbValue.value.content) {
|
||||
if (fileList.value.length == 0) {
|
||||
if (fileList.value.length === 0) {
|
||||
return ElMessage.warning("请输入作业内容");
|
||||
}
|
||||
}
|
||||
|
||||
request(TASK_WORK_COMMIT, {
|
||||
projectOrRouterLogo: type,
|
||||
workUploadContent: sbValue.value.content,
|
||||
workUploadAddress: fileList.value.map((e) => e.url).join(",") || "",
|
||||
workId,
|
||||
type,
|
||||
taskId,
|
||||
taskId:taskId || infoId,
|
||||
}).then((res) => {
|
||||
console.log(res);
|
||||
submitList.value.unshift(res.data);
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
</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>
|
||||
@@ -130,11 +130,9 @@
|
||||
<div class="detailRT">
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane label="项目公告" name="first">
|
||||
<div class="notice">
|
||||
{{ data.notice || "暂无公告" }}
|
||||
</div>
|
||||
<pre class="notice">{{ data.notice || "暂无公告" }}</pre>
|
||||
</el-tab-pane>
|
||||
<!--
|
||||
<!--
|
||||
<el-tab-pane label="共享文档" name="second">
|
||||
<div style="padding: 19px 30px 17px 28px">-->
|
||||
<!-- <div-->
|
||||
@@ -171,7 +169,7 @@
|
||||
</div>
|
||||
<!-- todo #路径详情 个人信息缺少img和介绍-->
|
||||
<div class="teacheritem" :style="{ 'border-bottom': '1px solid rgba(56, 125, 247, 0.2)' }">
|
||||
<img class="peopleimg" :src="userInfo.avatar" />
|
||||
<img class="peopleimg" :src="userInfo?.avatar" />
|
||||
<div style="margin-left: 17px">
|
||||
<div class="teacherName">
|
||||
<div style="margin-right: 5px">
|
||||
@@ -287,6 +285,7 @@ import {
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import store from "@/store";
|
||||
import { ElMessage } from "element-plus";
|
||||
import {PROJECT} from "@/api/CONST";
|
||||
|
||||
const {
|
||||
query: { courseId, projectId },
|
||||
@@ -300,7 +299,7 @@ const { data } = useRequest(PROJECT_PROCESS, {
|
||||
console.log("datadata", data);
|
||||
|
||||
const loading = ref(false);
|
||||
loading.value = ElLoading.service({
|
||||
loading.value = ElLoading.service({
|
||||
lock: true,
|
||||
text: 'Loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
@@ -362,7 +361,7 @@ const types = ref({
|
||||
},
|
||||
path: {
|
||||
1: import.meta.env.VITE_BOE_ONLINE_CLASS_URL, //在线
|
||||
2: "/faceteach",
|
||||
2: ({ courseId }) => window.open(`${location.protocol}//${location.host}${import.meta.env.VITE_BASE_API}/stu/project/redirectDetail?courseId=${courseId}`, '_top'),
|
||||
3: import.meta.env.VITE_BOE_CASS_DETAIL_URL, //案例
|
||||
4: "/homeworkpage",
|
||||
5: import.meta.env.VITE_BOE_EXAM_DETAIL_URL, //考试
|
||||
@@ -505,7 +504,7 @@ function toFinish(d, sName, chapterOrStageId) {
|
||||
d.status!==1 && request(STUDY_RECORD, {
|
||||
studentId: data.value.userInfoBo.userId,
|
||||
targetId: data.value.routerId,
|
||||
logo: 2,
|
||||
logo: PROJECT,
|
||||
stageOrChapterId: chapterOrStageId,
|
||||
taskId: d.projectTaskId,
|
||||
});
|
||||
@@ -521,14 +520,12 @@ function toFinish(d, sName, chapterOrStageId) {
|
||||
path: types.value.path[d.type],
|
||||
query: {
|
||||
id: d.projectTaskId,
|
||||
type: 2,
|
||||
type: PROJECT,
|
||||
infoId: data.value.projectId,
|
||||
courseId: d.courseId,
|
||||
pName: data.value.name,
|
||||
sName,
|
||||
chapterOrStageId,
|
||||
projectStatus: data.value.status?data.value.status:0, // 项目状态 -- 用于判断当前项目是否已经结束
|
||||
projectEndTime: data.value.endTime?data.value.endTime:0 // 项目结束 -- 用于判断当前项目是否已经结束
|
||||
},
|
||||
});
|
||||
} else if (typeof types.value.path[d.type] === "function") {
|
||||
|
||||
@@ -40,43 +40,50 @@
|
||||
</button>
|
||||
<button class="searchBtn" @click="resetClick">重置</button>
|
||||
</div>
|
||||
<div class="projectList" v-if="!projectList.length" style="display:flex;color:#909399;">
|
||||
<img class="img2" style="margin-left:359px;margin-top:100px;width:148px;height:220px;"
|
||||
src="../../assets/image/notask.png" />
|
||||
|
||||
<div class="projectList" v-if="isLoading==true" style="display:flex;color:#909399;">
|
||||
|
||||
</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" :src="i.picUrl" />
|
||||
<div style="margin-left: 29px">
|
||||
<div class="projectName" :title="i.name">
|
||||
{{ i.name }}
|
||||
</div>
|
||||
<div class="progress">
|
||||
<div class="progressNow">当前进度:</div>
|
||||
<div style="width: 115px">
|
||||
<el-progress :percentage="parseInt(i.finishTaskNum / i.totalTaskNum * 100)" :show-text="false"
|
||||
:stroke-width="8" color="rgba(255, 160, 80, 1)" />
|
||||
<div v-else>
|
||||
{{ loading.close() }}
|
||||
<div class="projectList" v-if="!projectList.length" style="display:flex;color:#909399;">
|
||||
<img class="img2" style="margin-left:359px;margin-top:100px;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" :src="i.picUrl" />
|
||||
<div style="margin-left: 29px">
|
||||
<div class="projectName" :title="i.name">
|
||||
{{ i.name }}
|
||||
</div>
|
||||
<div class="progressNum">
|
||||
{{
|
||||
(i.finishTaskNum && i.totalTaskNum) ? parseInt(i.finishTaskNum / i.totalTaskNum * 100) : 0
|
||||
}}%
|
||||
<div class="progress">
|
||||
<div class="progressNow">当前进度:</div>
|
||||
<div style="width: 115px">
|
||||
<el-progress :percentage="parseInt(i.finishTaskNum / i.totalTaskNum * 100)" :show-text="false"
|
||||
:stroke-width="8" color="rgba(255, 160, 80, 1)" />
|
||||
</div>
|
||||
<div class="progressNum">
|
||||
{{
|
||||
(i.finishTaskNum && i.totalTaskNum) ? parseInt(i.finishTaskNum / i.totalTaskNum * 100) : 0
|
||||
}}%
|
||||
</div>
|
||||
</div>
|
||||
<div class="studyNew" v-if="i.lastStudyTime">最新一次学习时间:{{ i.lastStudyTime }}</div>
|
||||
</div>
|
||||
<div class="studyNew" v-if="i.lastStudyTime">最新一次学习时间:{{ i.lastStudyTime }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tobestarted" v-if="i.status == 2" @click="goProjectDetails(i)">
|
||||
待开始
|
||||
</div>
|
||||
<div class="gostudy" v-if="i.status == 0" @click="goProjectDetails(i)">
|
||||
去学习
|
||||
</div>
|
||||
<div class="finish" v-if="i.status == 1" @click="goProjectDetails(i)">
|
||||
已完成
|
||||
</div>
|
||||
<div class="tobestarted" v-if="i.status == 3" @click="goProjectDetails(i)">
|
||||
已结束
|
||||
<div class="tobestarted" v-if="i.status == 2" @click="goProjectDetails(i)">
|
||||
待开始
|
||||
</div>
|
||||
<div class="gostudy" v-if="i.status == 0" @click="goProjectDetails(i)">
|
||||
去学习
|
||||
</div>
|
||||
<div class="finish" v-if="i.status == 1" @click="goProjectDetails(i)">
|
||||
已完成
|
||||
</div>
|
||||
<div class="tobestarted" v-if="i.status == 3" @click="goProjectDetails(i)">
|
||||
已结束
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div
|
||||
@@ -119,6 +126,10 @@ import {
|
||||
import { useRouter } from "vue-router";
|
||||
import store from "@/store";
|
||||
import { toDate } from "../../api/method";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { ElLoading } from 'element-plus';
|
||||
|
||||
const router = useRouter();
|
||||
const projectClassify = [];
|
||||
const studyProgress = [];
|
||||
const projectList = ref([]); //项目列表
|
||||
@@ -132,8 +143,17 @@ const endTime = ref(""); //开始时间
|
||||
const dialogVisible = ref(false)
|
||||
const userInfo = computed(() => store.state.userInfo);
|
||||
|
||||
const isLoading = ref(false);
|
||||
|
||||
const loading = ref(false);
|
||||
//获取项目列表--------start------------------------------------
|
||||
const getProject = () => {
|
||||
isLoading.value = true;
|
||||
loading.value = ElLoading.service({
|
||||
lock: true,
|
||||
text: 'Loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
})
|
||||
request(PROJECT_LIST, {
|
||||
beginTime: beginTime.value,
|
||||
endTime: endTime.value,
|
||||
@@ -147,10 +167,13 @@ const getProject = () => {
|
||||
projectList.value = res.data.rows;
|
||||
projectTotal.value = Number(res.data.total);
|
||||
console.log("projectTotal.value", projectTotal.value);
|
||||
isLoading.value = false;
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("获取失败", err);
|
||||
projectList.value = [];
|
||||
isLoading.value = false;
|
||||
});
|
||||
};
|
||||
getProject();
|
||||
@@ -186,18 +209,21 @@ const resetClick = () => {
|
||||
console.log("点击重置");
|
||||
};
|
||||
//搜索--------------end-----------------------------------------
|
||||
const router = useRouter();
|
||||
|
||||
const goProjectDetails = (value) => {
|
||||
if(value.status===2){
|
||||
dialogVisible.value=true
|
||||
// dialogVisible.value=true
|
||||
ElMessage.error('当前项目未到开始时间');
|
||||
return
|
||||
}
|
||||
import.meta.env.MODE === "development"
|
||||
? router.push({
|
||||
(import.meta.env.MODE === "development" || import.meta.env.MODE === "test")
|
||||
?
|
||||
router.push({
|
||||
path: "/projectdetails",
|
||||
query: { projectId: value.projectId },
|
||||
})
|
||||
: window.open(
|
||||
:
|
||||
window.open(
|
||||
`${import.meta.env.VITE_BOE_PATH_DETAIL_URL}/projectdetails¶ms=${encodeURIComponent(
|
||||
`projectId=${value.projectId}`
|
||||
,'_top')}`
|
||||
@@ -344,6 +370,7 @@ const goProjectDetails = (value) => {
|
||||
font-weight: 400;
|
||||
color: #ffffff;
|
||||
line-height: 22px;
|
||||
margin-right: 120px;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,7 +56,11 @@
|
||||
</div>
|
||||
</div>
|
||||
<!-- 路径列表-->
|
||||
<div :style="{ display: !showmapdetail ? 'flex' : 'none' }" class="head">
|
||||
<div class="routerList" v-if="isLoading" style="display:flex;color:#909399;">
|
||||
|
||||
</div>
|
||||
<div v-else :style="{ display: !showmapdetail ? 'flex' : 'none' }" class="head">
|
||||
{{ loading.close() }}
|
||||
<div style="min-width: 770px; width: 100%">
|
||||
<el-table :data="data" style="width: 100%" @row-click="gofun">
|
||||
<el-table-column prop="img" label="缩略图" #default="scope" align="center" width="255">
|
||||
@@ -107,17 +111,30 @@ import {ROUTER_LIST,} from "@/api/api";
|
||||
import {useRouter} from "vue-router";
|
||||
import store from "@/store";
|
||||
import PathDetailImage from "@/components/PathDetailImage.vue";
|
||||
import { ElLoading } from 'element-plus';
|
||||
|
||||
const detail = ref();
|
||||
const showmapdetail = ref(false);
|
||||
const currentStageId = ref();
|
||||
const userInfo = computed(() => store.state.userInfo);
|
||||
const {data} = usePage(ROUTER_LIST, {pageSize: 60});
|
||||
const loading = ref(false);
|
||||
const isLoading = ref(true);
|
||||
loading.value = ElLoading.service({
|
||||
lock: true,
|
||||
text: 'Loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
})
|
||||
|
||||
const {data} = usePage(ROUTER_LIST, {pageSize: 60}, (e)=>{
|
||||
console.log('我请求成功了吗', e)
|
||||
isLoading.value = false;
|
||||
});
|
||||
const router = useRouter();
|
||||
const returnclick = () => {
|
||||
router.back();
|
||||
};
|
||||
|
||||
|
||||
// const {unCompleteTaskList} = useRequest(ROUTER_UNCOMPLETE_LIST, {});
|
||||
|
||||
const returnfun = () => {
|
||||
|
||||
@@ -160,7 +160,7 @@
|
||||
</div>
|
||||
<!-- todo #路径详情 个人信息缺少img和介绍-->
|
||||
<div class="teacheritem" :style="{ 'border-bottom': '1px solid rgba(56, 125, 247, 0.2)' }">
|
||||
<img class="peopleimg" :src="userInfo.avatar" />
|
||||
<img class="peopleimg" :src="userInfo?.avatar" />
|
||||
<div style="margin-left: 17px">
|
||||
<div class="teacherName">
|
||||
<div style="margin-right: 5px">
|
||||
@@ -282,6 +282,7 @@ import { ROUTER_PROCESS, LINK_DETAILS, STUDY_RECORD } from "@/api/api";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import { ElMessage } from "element-plus";
|
||||
import store from "@/store";
|
||||
import {ROUTER} from "@/api/CONST";
|
||||
|
||||
const {
|
||||
query: { routerId, routerName },
|
||||
@@ -338,8 +339,8 @@ const types = ref({
|
||||
},
|
||||
path: {
|
||||
1: import.meta.env.VITE_BOE_ONLINE_CLASS_URL, //在线
|
||||
2: "/faceteach",
|
||||
3: import.meta.env.VITE_BOE_CASS_DETAIL_URL, //案例
|
||||
2: ({ courseId }) => window.open(`${location.protocol}//${location.host}${import.meta.env.VITE_BASE_API}/stu/project/redirectDetail?courseId=${courseId}`, '_top'),
|
||||
3: import.meta.env.VITE_BOE_CASS_DETAIL_URL, //案例
|
||||
4: "/homeworkpage",
|
||||
5: import.meta.env.VITE_BOE_EXAM_DETAIL_URL, //考试
|
||||
6: "/livebroadcast",
|
||||
@@ -445,7 +446,7 @@ function toFinish(d) {
|
||||
d.status!==1 && request(STUDY_RECORD, {
|
||||
studentId: userInfo.value.id,
|
||||
targetId: data.value.routerId,
|
||||
logo: 1,
|
||||
logo: ROUTER,
|
||||
stageOrChapterId: data.value.currentStageId,
|
||||
taskId: d.routerTaskId,
|
||||
});
|
||||
@@ -460,7 +461,7 @@ function toFinish(d) {
|
||||
path: types.value.path[d.type],
|
||||
query: {
|
||||
id: d.routerTaskId,
|
||||
type: 1,
|
||||
type: ROUTER,
|
||||
infoId: routerId,
|
||||
courseId: d.courseId,
|
||||
pName: data.value.name,
|
||||
|
||||
@@ -44,38 +44,39 @@
|
||||
return a[0].orderNumber - b[0].orderNumber
|
||||
}) }} -->
|
||||
|
||||
<div class="question" v-for="
|
||||
(value, index) in formateArr([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="question" v-for="(value, index) in questionList " :key="index" :style="{ 'margin-top': index === 0 ? '57px' : '41px' }">
|
||||
<div v-if="value.questionType == '4'">
|
||||
<div class="question" :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;
|
||||
}
|
||||
">
|
||||
<!-- v-for="(item, key) in Array.from(
|
||||
{ length: value.assessmentMaxScore },
|
||||
(k, i) => i
|
||||
)" -->
|
||||
<div class="answerCitem"
|
||||
v-for="(item, key) in orderArr(value.assessmentMinScore,value.assessmentMaxScore)"
|
||||
: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>
|
||||
@@ -84,69 +85,62 @@
|
||||
</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 v-else-if="value.questionType == '1'">
|
||||
<div class="question" style="margin-top: 41px">
|
||||
<div class="text">
|
||||
{{ data.assessmentSingleChoiceDtoList[0]?.singleStemName }}
|
||||
{{ value?.singleStemName }}
|
||||
</div>
|
||||
<div v-for="(value, index) in data.assessmentSingleChoiceDtoList" :key="index"
|
||||
<div v-for="(values, indexs) in value.assessmentSingleChoiceVoList" :key="indexs"
|
||||
style="display: flex; align-items: center" :style="{
|
||||
'margin-top': index === 0 ? '29px' : '22px',
|
||||
'margin-top': indexs === 0 ? '29px' : '22px',
|
||||
cursor: 'pointer',
|
||||
}" @click="
|
||||
() => {
|
||||
if (data.isSubmit) {
|
||||
return;
|
||||
}
|
||||
data.assessmentSingleChoiceDtoList.forEach((e) => {
|
||||
value.assessmentSingleChoiceVoList.forEach((e) => {
|
||||
e.select = false;
|
||||
});
|
||||
value.select = true;
|
||||
values.select = true;
|
||||
}
|
||||
">
|
||||
<img style="width: 19px; height: 18px; cursor: pointer" :src="value.select ? checkbox : checkbox2" />
|
||||
<div class="people">{{ value.singleOptionName }}</div>
|
||||
<img style="width: 19px; height: 18px; cursor: pointer" :src="values.select ? checkbox : checkbox2" />
|
||||
<div class="people">{{ values.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 v-else-if="value.questionType == '2'">
|
||||
<div class="question" style="margin-top: 41px">
|
||||
<div class="text">
|
||||
{{ data.assessmentMultipleChoiceDtoList[0]?.multipleStemName }}
|
||||
{{ value?.multipleStemName }}
|
||||
</div>
|
||||
<div v-for="(value, index) in data.assessmentMultipleChoiceDtoList" :key="index"
|
||||
<div v-for="(values, indexs) in value.multipleChoiceVoList" :key="indexs"
|
||||
style="display: flex; align-items: center" :style="{
|
||||
'margin-top': index === 0 ? '29px' : '22px',
|
||||
'margin-top': indexs === 0 ? '29px' : '22px',
|
||||
cursor: 'pointer',
|
||||
}" @click="
|
||||
() => {
|
||||
if (data.isSubmit) {
|
||||
return;
|
||||
}
|
||||
value.select = !value.select;
|
||||
values.select = !values.select;
|
||||
}
|
||||
">
|
||||
<img style="width: 19px; height: 18px; cursor: pointer" :src="value.select ? checkbox : checkbox2" />
|
||||
<div class="people">{{ value.multipleOptionName }}</div>
|
||||
<img style="width: 19px; height: 18px; cursor: pointer" :src="values.select ? checkbox : checkbox2" />
|
||||
<div class="people">{{ values.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 v-else-if="value.questionType == '3'">
|
||||
<div class="question" style="margin-top: 41px">
|
||||
<div class="text">{{ value.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"
|
||||
<el-input v-model="value.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 class="words">{{ value.content?.length || 0 }}/200</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -290,12 +284,11 @@
|
||||
<div class="words">{{ item.content?.length || 0 }}/200</div>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div style="display: flex; justify-content: center" v-if="
|
||||
data.assessmentEssayQuestionDtoList?.length ||
|
||||
data.assessmentMultipleChoiceDtoList?.length ||
|
||||
data.assessmentSingleChoiceDtoList?.length ||
|
||||
data.assessmentScoringQuestionDtoList?.length
|
||||
data.essayQuestionVoList?.length ||
|
||||
data.multipleStemVoList?.length ||
|
||||
data.scoringQuestionVoList?.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' }">
|
||||
提交
|
||||
@@ -338,33 +331,65 @@ import { request, usePage, useRequest } from "@/api/request";
|
||||
import { ASSESSMENT_QUERY, ASSESSMENT_SUBMIT } from "@/api/api";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { ref } from "vue";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
const {
|
||||
query: { courseId, id: taskId, infoId, type, pName, sName, chapterOrStageId, projectStatus, projectEndTime },
|
||||
} = useRoute();
|
||||
const router = useRouter();
|
||||
const returnclick = () => {
|
||||
clearInterval(timers)
|
||||
router.back();
|
||||
};
|
||||
|
||||
// 数组去空对象
|
||||
function formateArr(arr1) {
|
||||
console.log(arr1, arr1[0], arr1[0].length)
|
||||
let newarr = []
|
||||
for (let i = 0; i < arr1.length; i++) {
|
||||
if (arr1[i].length !== 0) {
|
||||
newarr.push(arr1[i])
|
||||
}
|
||||
}
|
||||
return newarr
|
||||
}
|
||||
|
||||
const { data } = useRequest(ASSESSMENT_QUERY(courseId), { id: courseId, type, chapterOrStageId, targetId: infoId ? infoId : 0 });
|
||||
console.log('我是查询评估的参数', { id: courseId, type, chapterOrStageId, targetId: infoId ? infoId : 0 })
|
||||
console.log('我是需要排序得题目', data)
|
||||
|
||||
function goHome() {
|
||||
// 答题时间
|
||||
const answerTime = dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss');
|
||||
|
||||
console.log('录入首次进入页面时间', answerTime)
|
||||
|
||||
|
||||
// 数组去空对象
|
||||
function formateArr(datas) {
|
||||
let allArr = []
|
||||
for(let i=0;i<datas.length;i++){
|
||||
for(let j=0;j<datas[i].length;j++){
|
||||
allArr.push(datas[i][j])
|
||||
}
|
||||
}
|
||||
let newarr = allArr.sort((a, b) => { return a.orderNumber - b.orderNumber})
|
||||
console.log('我是排序后的题目', newarr)
|
||||
return newarr
|
||||
}
|
||||
|
||||
const questionList = ref([])
|
||||
|
||||
const timers = setInterval(() => {
|
||||
console.log(data)
|
||||
console.log(data.value.assessmentId)
|
||||
if(data.value.assessmentId){
|
||||
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) {
|
||||
let arrs = []
|
||||
for(let i=0;i<10;i++){
|
||||
if((i+1)>=a && (i+1)<=b){
|
||||
arrs.push(i)
|
||||
}
|
||||
}
|
||||
return arrs;
|
||||
}
|
||||
|
||||
const centerDialogVisible = ref(false);
|
||||
@@ -372,6 +397,7 @@ const open = () => {
|
||||
centerDialogVisible.value = true
|
||||
};
|
||||
function submit() {
|
||||
console.log('录入首次进入页面时间', answerTime)
|
||||
if (1 > 0) {
|
||||
console.log(data)
|
||||
console.log('我是提交的数据', {
|
||||
@@ -436,6 +462,7 @@ function submit() {
|
||||
taskId: taskId ? taskId : 0,
|
||||
type,
|
||||
result: JSON.stringify(data.value),
|
||||
beginTime: answerTime
|
||||
}).then(() => {
|
||||
open();
|
||||
});
|
||||
@@ -579,3 +606,4 @@ function submit() {
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
@@ -14,6 +14,9 @@ const path = require('path')
|
||||
export default defineConfig(({ command, mode }) =>
|
||||
({
|
||||
base: loadEnv(mode, process.cwd()).VITE_BASE,
|
||||
build:{
|
||||
outDir: loadEnv(mode, process.cwd()).VITE_OUTPUT_DIR,
|
||||
},
|
||||
plugins: [
|
||||
vue(),
|
||||
// legacy({
|
||||
|
||||
Reference in New Issue
Block a user