mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-13 12:56:47 +08:00
fix:修改评估按钮和时间 添加面授考试跳转
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
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">
|
||||
@@ -29,9 +29,22 @@
|
||||
<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>
|
||||
<!-- 基本信息 -->
|
||||
@@ -57,6 +70,19 @@
|
||||
<div class="detailB">
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane label="课程附件" name="first">
|
||||
<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-for="(el, index) in JSON.parse(data.planDto?.attach)"
|
||||
:key="index"
|
||||
@@ -80,12 +106,30 @@
|
||||
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">
|
||||
@@ -114,9 +171,9 @@
|
||||
<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>
|
||||
@@ -133,7 +190,7 @@
|
||||
</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,24 +206,24 @@
|
||||
</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(
|
||||
const { data } = useRequest(STU_OFFCOURSE_DETAIL, { courseId });
|
||||
console.log("datadatadatadatadatadatadata", data);
|
||||
const { avatar: userAvatar } = useUserInfo(
|
||||
computed(() => data.value?.planDto?.teacherId)
|
||||
);
|
||||
|
||||
@@ -174,7 +231,7 @@ 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>
|
||||
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div @click="returnclick">返回</div>
|
||||
<!-- 面包屑导航 -->
|
||||
<div class="debateTitle" style="color: #fff">
|
||||
【作业】管理者进阶腾飞班 - 中级管理者作业
|
||||
|
||||
@@ -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">
|
||||
2022-12-15注释 李晓鸽 后面打开 -->
|
||||
<!-- <button class="btn btn01"></button>
|
||||
@@ -18,7 +18,8 @@
|
||||
<div class="return">
|
||||
<div style="display: flex" @click="returnclick">
|
||||
<img
|
||||
class="img2" style="margin-right:22px;"
|
||||
class="img2"
|
||||
style="margin-right: 22px"
|
||||
src="../../assets/image/return.png"
|
||||
/>
|
||||
<div class="text">返回</div>
|
||||
@@ -37,7 +38,7 @@
|
||||
src="../../assets/image/time.png"
|
||||
/>
|
||||
<div style="margin-left: 8px">
|
||||
{{ data?.liveStartTime + "-" + data?.liveEndTime }}
|
||||
{{ data?.liveStartTime + "至" + data?.liveEndTime }}
|
||||
</div>
|
||||
</div>
|
||||
<!-- todo #直播详情 没有位置字段-->
|
||||
@@ -65,13 +66,22 @@
|
||||
@click="signClick"
|
||||
>{{ data.signFlag ? "已签到" : "签到" }}
|
||||
</botton>
|
||||
<botton
|
||||
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'"
|
||||
v-if="data.isEvaluate && data.isEvaluate == 1"
|
||||
>{{ data.isSurvery ? "已评估" : "评估" }}
|
||||
</botton>
|
||||
</div>
|
||||
@@ -144,7 +154,7 @@
|
||||
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,26 +171,26 @@
|
||||
</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(
|
||||
const { avatar: userAvatar } = useUserInfo(
|
||||
computed(() => data.value.userInfoBo?.userId)
|
||||
);
|
||||
|
||||
@@ -196,22 +206,27 @@ const state = reactive({
|
||||
},
|
||||
],
|
||||
});
|
||||
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,10 +245,10 @@ function showClick() {
|
||||
line-height: 24px;
|
||||
position: relative;
|
||||
}
|
||||
.return{
|
||||
.return {
|
||||
position: absolute;
|
||||
right: 10%;
|
||||
.text{
|
||||
.text {
|
||||
text-align: center;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,8 @@
|
||||
<div class="return">
|
||||
<div style="display: flex" @click="returnclick">
|
||||
<img
|
||||
class="img2" style="margin-right:22px;"
|
||||
class="img2"
|
||||
style="margin-right: 22px"
|
||||
src="../../assets/image/return.png"
|
||||
/>
|
||||
<div class="text">返回</div>
|
||||
@@ -37,7 +38,7 @@
|
||||
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">
|
||||
@@ -50,9 +51,11 @@
|
||||
</div>
|
||||
<botton
|
||||
class="btn"
|
||||
:style="{background:`${data.signFlag?'#999':'rgb(57, 146, 249)'}`}"
|
||||
:style="{
|
||||
background: `${data.signFlag ? '#999' : 'rgb(57, 146, 249)'}`,
|
||||
}"
|
||||
@click="signClick"
|
||||
>{{ data.signFlag ? '已签到' : '签到' }}
|
||||
>{{ data.signFlag ? "已签到" : "签到" }}
|
||||
</botton>
|
||||
</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,10 +177,10 @@ 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;
|
||||
|
||||
@@ -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"
|
||||
@@ -338,7 +338,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);
|
||||
@@ -430,6 +432,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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -512,6 +515,9 @@ function whiteTypes(type) {
|
||||
font-weight: 500;
|
||||
color: #333330;
|
||||
line-height: 24px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.coursetag {
|
||||
|
||||
Reference in New Issue
Block a user