Merge branch 'develop' of ssh://gitlab.dongwu-inc.com:10022/BOE/fe-stu into develop

This commit is contained in:
zhangyc
2022-12-17 00:22:05 +08:00
6 changed files with 239 additions and 154 deletions

View File

@@ -14,24 +14,37 @@
<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"
style="width: 15px; height: 17px"
src="../../assets/image/time.png"
/>
<div style="margin-left: 8px">
{{ data.offcourseDto?.publishTime }}
{{ data.planDto?.beginTime + "至" + data.planDto?.endTime }}
</div>
</div>
<div class="time" style="margin-top: 23px">
<img
style="width: 16px; height: 18px"
src="../../assets/image/position.png"
style="width: 16px; height: 18px"
src="../../assets/image/position.png"
/>
<div style="margin-left: 8px">{{ data.planDto?.address }}</div>
</div>
</div>
<botton :style="{background:`${data.isSurvery?'#999':'rgb(57, 146, 249)'}`}" class="btn" @click="toSurvery"
v-if="data.evalFlag && data.evalFlag==='1'"
>{{ data.isSurvery ? '已评估' : '评估' }}
<botton
style="background: #999"
class="btn"
@click="toSurvery"
v-if="data.planDto?.evalFlag == 0"
>
评估
</botton>
<botton
:style="{
background: `${data.isSurvery ? '#999' : 'rgb(57, 146, 249)'}`,
}"
class="btn"
@click="toSurvery"
v-if="data.planDto?.evalFlag && data.planDto?.evalFlag == 1"
>{{ data.isSurvery ? "已评估" : "评估" }}
</botton>
</div>
<!-- 基本信息 -->
@@ -43,8 +56,8 @@
<div class="" style="margin-left: 48px; margin-right: 48px">
<div class="title">
<img
style="width: 20px; height: 20px"
src="../../assets/image/course.png"
style="width: 20px; height: 20px"
src="../../assets/image/course.png"
/>
<div class="text">课程详情</div>
<div class="box"></div>
@@ -58,16 +71,29 @@
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="课程附件" name="first">
<div
v-for="(el, index) in JSON.parse(data.planDto?.attach)"
:key="index"
v-if="data.planDto"
class="enclosure"
:style="{ borderBottom: '1px solid rgba(56, 125, 247, 0.2)' }"
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-for="(el, index) in JSON.parse(data.planDto?.attach)"
:key="index"
v-if="data.planDto"
class="enclosure"
:style="{ borderBottom: '1px solid rgba(56, 125, 247, 0.2)' }"
>
<div class="enclosureL">
<FileTypeImg
v-model="el.name"
:style="{
v-model="el.name"
:style="{
width: '22px',
height: '26px',
marginLeft: '10px',
@@ -77,15 +103,33 @@
</div>
<div class="download">
<img
style="width: 16px; height: 15px"
src="../../assets/image/download.png"
style="width: 16px; height: 15px"
src="../../assets/image/download.png"
/>
<div style="margin-left: 5px" @click="download(el.response.data)">下载</div>
<div
style="margin-left: 5px"
@click="download(el.response.data)"
>
下载
</div>
</div>
</div>
</el-tab-pane>
<el-tab-pane label="课程作业" name="second">
<div class="work" v-if="data.workDto?.workName ">
<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 class="work" v-if="data.workDto?.workName">
<div>
<div class="question">{{ data.workDto?.workName }}</div>
<div style="margin-top: 16px; display: flex">
@@ -94,11 +138,24 @@
</div>
</div>
<div class="submit" @click="toWork" v-if="data.workDto?.workId">
提交
去作业
</div>
</div>
</el-tab-pane>
<el-tab-pane label="课程考试" name="third">
<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 class="work" v-if="data.examinationDto?.examinationTestName">
<div>
<div class="question">
@@ -106,17 +163,17 @@
</div>
<div style="margin-top: 16px; display: flex">
<div
class="tag1"
v-if="data.examinationDto?.examinationFlag"
class="tag1"
v-if="data.examinationDto?.examinationFlag"
>
必修
</div>
<div class="tag3" style="margin-left: 11px">考试</div>
</div>
</div>
<!-- <div class="submit" @click="toExamItem(data.examinationDto)">-->
<!-- 去考试-->
<!-- </div>-->
<div class="submit" @click="toExamItem(data.examinationDto)">
去考试
</div>
</div>
</el-tab-pane>
</el-tabs>
@@ -125,15 +182,15 @@
<div class="teacher">
<div class="title">
<img
style="width: 21px; height: 23px"
src="../../assets/image/livelecturer.png"
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="userAvatar"/>
<img class="peopleimg" :src="userAvatar" />
<div style="margin-left: 17px; width: 190px">
<div class="teacherName" style="margin-right: 5px">
{{ data.planDto?.teacher }}
@@ -149,32 +206,32 @@
</template>
<script setup>
import {computed, reactive, toRefs, watch} from "vue";
import { computed, reactive, toRefs, watch } from "vue";
import FileTypeImg from "@/components/FileTypeImg.vue";
import {request, useRequest} from "@/api/request";
import {STU_OFFCOURSE_DETAIL} from "@/api/api";
import {useRoute, useRouter} from "vue-router";
import {useUserInfo} from "@/api/utils";
import { request, useRequest } from "@/api/request";
import { STU_OFFCOURSE_DETAIL } from "@/api/api";
import { useRoute, useRouter } from "vue-router";
import { useUserInfo } from "@/api/utils";
const router = useRouter();
const returnclick = () => {
router.back();
};
const {
query: {courseId, type},
query: { courseId, type },
} = useRoute();
const {data} = useRequest(STU_OFFCOURSE_DETAIL, {courseId});
const {avatar: userAvatar} = useUserInfo(
computed(() => data.value?.planDto?.teacherId)
const { data } = useRequest(STU_OFFCOURSE_DETAIL, { courseId });
console.log("datadatadatadatadatadatadata", data);
const { avatar: userAvatar } = useUserInfo(
computed(() => data.value?.planDto?.teacherId)
);
const state = reactive({
activeName: "first",
enclosure: "",
});
const {activeName, enclosure} = toRefs(state);
const { activeName, enclosure } = toRefs(state);
const handleClick = (tab, event) => {
console.log(tab, event);
};
@@ -184,11 +241,15 @@ const download = (url) => {
function toSurvery() {
if (data.value.isSurvery) {
return
return;
}
if (data.value.planDto.evalFlag == 0) {
alert("此课程无评估");
return;
}
router.push({
path: "/surveydetail",
query: {courseId: data.value.planDto.evaluateId},
query: { courseId: data.value.planDto.evaluateId },
});
}
@@ -204,7 +265,9 @@ function toWork() {
}
function toExamItem(obj) {
router.push({path: "/starttest", query: {id: obj.courseId}});
console.log("obj", obj.examinationTestId);
window.open(import.meta.env.VITE_BOE_EXAM_DETAIL_URL + obj.examinationTestId); //测评
// router.push({ path: import.meta.env.VITE_BOE_EXAM_DETAIL_URL+ obj.examinationTestId });
}
</script>

View File

@@ -26,7 +26,6 @@
</div>
</div>
</div>
<div @click="returnclick">返回</div>
<!-- 面包屑导航 -->
<div class="debateTitle" style="color: #fff">
作业管理者进阶腾飞班 - 中级管理者作业

View File

@@ -7,23 +7,24 @@
<div>{{ sName }}</div>
<div style="margin-left: 6px; margin-right: 6px">/</div>
<div style="font-weight: 700; font-size: 16px">直播详情</div>
<!--
<!--
<div class="preNext">
2022-12-15注释 李晓鸽 后面打开 -->
<!-- <button class="btn btn01"></button>
<!-- <button class="btn btn01"></button>
<span class="content" style="margin-left: 6px">上一个</span>
<span class="content" style="margin-left: 31px">下一个</span>
<button class="btn btn02" style="margin-left: 6px"></button>
</div>-->
<div class="return">
<div style="display: flex" @click="returnclick">
<img
class="img2" style="margin-right:22px;"
src="../../assets/image/return.png"
/>
<div class="text">返回</div>
<div style="display: flex" @click="returnclick">
<img
class="img2"
style="margin-right: 22px"
src="../../assets/image/return.png"
/>
<div class="text">返回</div>
</div>
</div>
</div>
</div>
<!-- 面包屑导航 -->
@@ -33,11 +34,11 @@
<div class="title">直播{{ data?.liveName }}</div>
<div class="time" style="margin-top: 26px">
<img
style="width: 15px; height: 17px"
src="../../assets/image/time.png"
style="width: 15px; height: 17px"
src="../../assets/image/time.png"
/>
<div style="margin-left: 8px">
{{ data?.liveStartTime + "-" + data?.liveEndTime }}
{{ data?.liveStartTime + "" + data?.liveEndTime }}
</div>
</div>
<!-- todo #直播详情 没有位置字段-->
@@ -52,27 +53,36 @@
</div>
<div class="threeBtn">
<botton
class="btn"
style="background: rgb(59, 191, 252)"
@click="showClick"
>观看
class="btn"
style="background: rgb(59, 191, 252)"
@click="showClick"
>观看
</botton>
<botton
class="btn"
:style="{
class="btn"
:style="{
background: `${data.signFlag ? '#999' : 'rgb(57, 146, 249)'}`,
}"
@click="signClick"
>{{ data.signFlag ? "已签到" : "签到" }}
@click="signClick"
>{{ data.signFlag ? "已签到" : "签到" }}
</botton>
<botton
:style="{
style="background: #999"
class="btn"
@click="commitClick"
v-if="data.isEvaluate == 0"
>
评估
</botton>
<botton
:style="{
background: `${data.isSurvery ? '#999' : 'rgb(57, 146, 249)'}`,
}"
class="btn"
@click="commitClick"
v-if="data.isEvaluate && data.isEvaluate==='1'"
>{{ data.isSurvery ? "已评估" : "评估" }}
class="btn"
@click="commitClick"
v-if="data.isEvaluate && data.isEvaluate == 1"
>{{ data.isSurvery ? "已评估" : "评估" }}
</botton>
</div>
</div>
@@ -85,8 +95,8 @@
<div class="" style="margin-left: 48px; margin-right: 48px">
<div class="title">
<img
style="width: 20px; height: 20px"
src="../../assets/image/course.png"
style="width: 20px; height: 20px"
src="../../assets/image/course.png"
/>
<div class="text">直播说明</div>
<div class="box"></div>
@@ -122,8 +132,8 @@
<div class="tell">
<div class="title">
<img
style="width: 21px; height: 23px"
src="../../assets/image/tv.png"
style="width: 21px; height: 23px"
src="../../assets/image/tv.png"
/>
<div class="text">直播公告</div>
<div class="box"></div>
@@ -133,18 +143,18 @@
<div class="teacher">
<div class="title">
<img
style="width: 21px; height: 23px"
src="../../assets/image/livelecturer.png"
style="width: 21px; height: 23px"
src="../../assets/image/livelecturer.png"
/>
<!-- todo #直播详情 没有直播讲师-->
<div class="text">直播讲师</div>
<div class="box"></div>
</div>
<div
class="teacheritem"
:style="{ 'border-bottom': '1px solid rgba(56, 125, 247, 0.2)' }"
class="teacheritem"
:style="{ 'border-bottom': '1px solid rgba(56, 125, 247, 0.2)' }"
>
<img class="peopleimg" :src="userAvatar"/>
<img class="peopleimg" :src="userAvatar" />
<div style="margin-left: 17px; width: 190px">
<div class="teacherName" style="margin-right: 5px">
{{ data.userInfoBo?.userName }}
@@ -161,27 +171,27 @@
</template>
<script setup>
import {computed, reactive, toRefs} from "vue";
import { computed, reactive, toRefs } from "vue";
import img from "@/assets/image/uploadimg.png";
import {request, useRequest} from "@/api/request";
import {TASK_BROADCAST_DETAIL, TASK_BROADCAST_SIGN} from "@/api/api";
import {useRoute} from "vue-router/dist/vue-router";
import {useRouter} from "vue-router";
import {useUserInfo} from "@/api/utils";
import {ElMessage} from "element-plus";
import { request, useRequest } from "@/api/request";
import { TASK_BROADCAST_DETAIL, TASK_BROADCAST_SIGN } from "@/api/api";
import { useRoute } from "vue-router/dist/vue-router";
import { useRouter } from "vue-router";
import { useUserInfo } from "@/api/utils";
import { ElMessage } from "element-plus";
const {
query: {courseId: liveId, id: taskId, type, pName, sName},
query: { courseId: liveId, id: taskId, type, pName, sName },
} = useRoute();
const router = useRouter();
const returnclick = () => {
router.back();
};
const {data} = useRequest(TASK_BROADCAST_DETAIL, {liveId});
const { data } = useRequest(TASK_BROADCAST_DETAIL, { liveId });
const {avatar: userAvatar} = useUserInfo(
computed(() => data.value.userInfoBo?.userId)
const { avatar: userAvatar } = useUserInfo(
computed(() => data.value.userInfoBo?.userId)
);
const state = reactive({
@@ -191,27 +201,32 @@ const state = reactive({
id: 1,
name: "王星天(显示事业)",
introduce:
"教师是学生的镜子,学生是老师的影子。教师是学生的镜子,学生是老师的影子。教师是学生的镜子,学生是老师的影子。",
"教师是学生的镜子,学生是老师的影子。教师是学生的镜子,学生是老师的影子。教师是学生的镜子,学生是老师的影子。",
peopleimg: img,
},
],
});
const {activeName, teacher} = toRefs(state);
const { activeName, teacher } = toRefs(state);
const signClick = () => {
if (data.value.signFlag) {
return;
}
data.value.signFlag = 1;
ElMessage.info("签到成功");
request(TASK_BROADCAST_SIGN, {courseId: liveId, taskId, type});
request(TASK_BROADCAST_SIGN, { courseId: liveId, taskId, type });
};
const commitClick = () => {
if (data.value.isSurvery) {
return;
}
if (data.value.isEvaluate == 0) {
alert("此直播无评估");
return;
}
router.push({
path: "/surveydetail",
query: {courseId: data.value.assessmentId},
query: { courseId: data.value.assessmentId },
});
};
@@ -230,14 +245,14 @@ function showClick() {
line-height: 24px;
position: relative;
}
.return{
.return {
position: absolute;
right: 10%;
.text{
.text {
text-align: center;
display: flex;
flex-direction: row;
align-items: center;
display: flex;
flex-direction: row;
align-items: center;
}
}
.preNext {
@@ -285,7 +300,6 @@ function showClick() {
.threeBtn {
display: flex;
width: 490px;
justify-content: space-between;
margin-right: 87px;
.btn {
@@ -302,7 +316,7 @@ function showClick() {
font-weight: 800;
line-height: 24px;
cursor: pointer;
// margin-right: 96px;
margin-left: 20px;
}
}
@@ -513,9 +527,9 @@ function showClick() {
background-color: rgba(255, 255, 255, 1);
border-radius: 8px;
background: linear-gradient(
180deg,
rgba(36, 120, 255, 0.15) 0%,
rgba(255, 255, 255) 50%
180deg,
rgba(36, 120, 255, 0.15) 0%,
rgba(255, 255, 255) 50%
);
.title {

View File

@@ -7,7 +7,7 @@
<div>{{ sName }}</div>
<div style="margin-left: 6px; margin-right: 6px">/</div>
<div style="font-weight: 700; font-size: 16px">活动详情</div>
<!--
<!--
<div class="preNext">
<button class="btn btn01"></button>
<span class="content" style="margin-left: 6px">上一个</span>
@@ -15,14 +15,15 @@
<button class="btn btn02" style="margin-left: 6px"></button>
</div>-->
<div class="return">
<div style="display: flex" @click="returnclick">
<img
class="img2" style="margin-right:22px;"
src="../../assets/image/return.png"
/>
<div class="text">返回</div>
<div style="display: flex" @click="returnclick">
<img
class="img2"
style="margin-right: 22px"
src="../../assets/image/return.png"
/>
<div class="text">返回</div>
</div>
</div>
</div>
</div>
<!-- 面包屑导航 -->
@@ -33,26 +34,28 @@
<div class="title">{{ data?.activityName }}</div>
<div class="time" style="margin-top: 26px">
<img
style="width: 15px; height: 17px"
src="../../assets/image/time.png"
style="width: 15px; height: 17px"
src="../../assets/image/time.png"
/>
<div style="margin-left: 8px">
{{ data?.activityStartTime + "-" + data?.activityEndTime }}
{{ data?.activityStartTime + "" + data?.activityEndTime }}
</div>
</div>
<div class="time" style="margin-top: 23px">
<img
style="width: 16px; height: 18px"
src="../../assets/image/position.png"
style="width: 16px; height: 18px"
src="../../assets/image/position.png"
/>
<div style="margin-left: 8px">{{ data?.activityAddress }}</div>
</div>
</div>
<botton
class="btn"
:style="{background:`${data.signFlag?'#999':'rgb(57, 146, 249)'}`}"
@click="signClick"
>{{ data.signFlag ? '已签到' : '签到' }}
class="btn"
:style="{
background: `${data.signFlag ? '#999' : 'rgb(57, 146, 249)'}`,
}"
@click="signClick"
>{{ data.signFlag ? "已签到" : "签到" }}
</botton>
</div>
<!-- 基本信息 -->
@@ -64,8 +67,8 @@
<div style="margin-left: 48px; margin-right: 48px">
<div class="title">
<img
style="width: 20px; height: 20px"
src="../../assets/image/book.png"
style="width: 20px; height: 20px"
src="../../assets/image/book.png"
/>
<div class="text">活动详情</div>
<div class="box"></div>
@@ -76,8 +79,8 @@
<div class="content">
{{
data?.activityDuration
? data?.activityDuration + "分钟"
: "-"
? data?.activityDuration + "分钟"
: "-"
}}
</div>
</div>
@@ -92,15 +95,15 @@
<div class="content">
{{
data?.beforeSignIn
? "开始前" + data?.beforeSignIn + "分钟开始签到"
: "-"
? "开始前" + data?.beforeSignIn + "分钟开始签到"
: "-"
}}
</div>
<div class="content">
{{
data?.afterSignIn
? "开始后" + data?.afterSignIn + "分钟结束签到"
: "-"
? "开始后" + data?.afterSignIn + "分钟结束签到"
: "-"
}}
</div>
</div>
@@ -123,8 +126,8 @@
<div class="teacher">
<div class="title">
<img
style="width: 24px; height: 20px"
src="../../assets/image/call.png"
style="width: 24px; height: 20px"
src="../../assets/image/call.png"
/>
<div class="text">活动公告</div>
<div class="box"></div>
@@ -140,27 +143,27 @@
</template>
<script setup>
import {TAS_ACTIVITY_DETAIL, TASK_ACTIVITY_SIGN, ACTIVITY} from "@/api/api";
import {request, useRequest} from "@/api/request";
import {useRoute} from "vue-router/dist/vue-router";
import {ElMessage} from "element-plus";
import { TAS_ACTIVITY_DETAIL, TASK_ACTIVITY_SIGN, ACTIVITY } from "@/api/api";
import { request, useRequest } from "@/api/request";
import { useRoute } from "vue-router/dist/vue-router";
import { ElMessage } from "element-plus";
const {
query: {courseId: activityId, id: taskId, type, pName, sName},
query: { courseId: activityId, id: taskId, type, pName, sName },
} = useRoute();
const {data} = useRequest(ACTIVITY, {activityId});
const { data } = useRequest(ACTIVITY, { activityId });
const signClick = (tab, event) => {
if (data.value.signFlag) {
return;
}
data.value.signFlag = true
data.value.signFlag = true;
ElMessage.info("签到成功");
request(TASK_ACTIVITY_SIGN, {
courseId: activityId,
taskId, type
})
taskId,
type,
});
};
</script>
@@ -174,14 +177,14 @@ const signClick = (tab, event) => {
line-height: 24px;
position: relative;
}
.return{
.return {
position: absolute;
right: 10%;
.text{
.text {
text-align: center;
display: flex;
flex-direction: row;
align-items: center;
display: flex;
flex-direction: row;
align-items: center;
}
}
.preNext {
@@ -442,9 +445,9 @@ const signClick = (tab, event) => {
background-color: rgba(255, 255, 255, 1);
border-radius: 8px;
background: linear-gradient(
180deg,
rgba(36, 120, 255, 0.15) 0%,
rgba(255, 255, 255) 50%
180deg,
rgba(36, 120, 255, 0.15) 0%,
rgba(255, 255, 255) 50%
);
.title {

View File

@@ -382,7 +382,7 @@ const types = ref({
},
});
function toFinish(d) {
function toFinish(d,sName) {
if (!types.value.path[d.type]) {
ElMessage.error("暂时未开放");
return;
@@ -392,7 +392,7 @@ function toFinish(d) {
types.value.path[d.type] && types.value.path[d.type].startsWith("http") && window.open(types.value.path[d.type] + d.targetId)
types.value.path[d.type] && types.value.path[d.type].startsWith("/") && router.push({
path: types.value.path[d.type],
query: {id: d.routerTaskId, type: 1, courseId: d.courseId, pName: data.value.name, sName},
query: {id: d.routerTaskId, type: 2, courseId: d.courseId, pName: data.value.name, sName},
})
} else if (typeof types.value.path[d.type] === 'function') {
types.value.path[d.type](d)

View File

@@ -35,8 +35,8 @@
)"
:key="index"
>
<div>
<div class="coursename">{{ value.name }}</div>
<div style="width: 70%">
<div class="coursename" :title="value.name">{{ value.name }}</div>
<div class="coursetag">
<div
class="tag1"
@@ -339,7 +339,9 @@ const {
query: { routerId, routerName },
} = useRoute();
const router = useRouter();
const returnclick = () => {
router.back();
};
const { data } = useRequest(ROUTER_PROCESS, { routerId });
const userInfo = computed(() => store.state.userInfo);
@@ -431,6 +433,7 @@ function toFinish(d, sName) {
});
} else if (typeof types.value.path[d.type] === "function") {
types.value.path[d.type](d);
// console.log("types.value.path[d.type](d)", d);
}
}
@@ -513,6 +516,9 @@ function whiteTypes(type) {
font-weight: 500;
color: #333330;
line-height: 24px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.coursetag {