mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-10 03:16:47 +08:00
init
This commit is contained in:
@@ -14,8 +14,8 @@
|
||||
<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 }}
|
||||
@@ -23,15 +23,15 @@
|
||||
</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>
|
||||
<div class="btn" @click="toSurvery" v-if="data.planDto?.evalFlag">
|
||||
评估
|
||||
</div>
|
||||
<botton :style="{background:`${data.isSurvery?'#999':'rgb(57, 146, 249)'}`}" class="btn" @click="toSurvery"
|
||||
>{{ data.isSurvery ? '已评估' : '评估' }}
|
||||
</botton>
|
||||
</div>
|
||||
<!-- 基本信息 -->
|
||||
|
||||
@@ -42,8 +42,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>
|
||||
@@ -57,16 +57,16 @@
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane label="课程附件" name="first">
|
||||
<div
|
||||
v-for="(el, index) in data.planDto?.attach.split(',')"
|
||||
:key="index"
|
||||
v-if="data.planDto"
|
||||
class="enclosure"
|
||||
:style="{ borderBottom: '1px solid rgba(56, 125, 247, 0.2)' }"
|
||||
v-for="(el, index) in data.planDto?.attach.split(',')"
|
||||
:key="index"
|
||||
v-if="data.planDto"
|
||||
class="enclosure"
|
||||
:style="{ borderBottom: '1px solid rgba(56, 125, 247, 0.2)' }"
|
||||
>
|
||||
<div class="enclosureL">
|
||||
<FileTypeImg
|
||||
v-model="data.planDto.attach.split(',')[index]"
|
||||
:style="{
|
||||
v-model="data.planDto.attach.split(',')[index]"
|
||||
:style="{
|
||||
width: '22px',
|
||||
height: '26px',
|
||||
marginLeft: '10px',
|
||||
@@ -76,15 +76,15 @@
|
||||
</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)">下载</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="课程作业" name="second">
|
||||
<div class="work">
|
||||
<div class="work" v-if="data.workDto?.workName ">
|
||||
<div>
|
||||
<div class="question">{{ data.workDto?.workName }}</div>
|
||||
<div style="margin-top: 16px; display: flex">
|
||||
@@ -98,15 +98,15 @@
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="课程考试" name="third">
|
||||
<div class="work">
|
||||
<div class="work" v-if="data.examinationDto?.examinationTestName">
|
||||
<div>
|
||||
<div class="question">
|
||||
{{ data.examinationDto?.examinationTestName }}
|
||||
</div>
|
||||
<div style="margin-top: 16px; display: flex">
|
||||
<div
|
||||
class="tag1"
|
||||
v-if="data.examinationDto?.examinationFlag"
|
||||
class="tag1"
|
||||
v-if="data.examinationDto?.examinationFlag"
|
||||
>
|
||||
必修
|
||||
</div>
|
||||
@@ -124,15 +124,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 }}
|
||||
@@ -148,29 +148,29 @@
|
||||
</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 {
|
||||
query: { courseId, type },
|
||||
query: {courseId, type},
|
||||
} = useRoute();
|
||||
|
||||
const { data } = useRequest(STU_OFFCOURSE_DETAIL, { courseId });
|
||||
const {data} = useRequest(STU_OFFCOURSE_DETAIL, {courseId});
|
||||
|
||||
const { avatar: userAvatar } = useUserInfo(
|
||||
computed(() => data.value?.planDto?.teacherId)
|
||||
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);
|
||||
};
|
||||
@@ -179,9 +179,12 @@ const download = (url) => {
|
||||
};
|
||||
|
||||
function toSurvery() {
|
||||
if (data.value.isSurvery) {
|
||||
return
|
||||
}
|
||||
router.push({
|
||||
path: "/surveydetail",
|
||||
query: { courseId: data.value.planDto.evaluateId },
|
||||
query: {courseId: data.value.planDto.evaluateId},
|
||||
});
|
||||
}
|
||||
|
||||
@@ -197,7 +200,7 @@ function toWork() {
|
||||
}
|
||||
|
||||
function toExamItem(obj) {
|
||||
router.push({ path: "/starttest", query: { id: obj.courseId } });
|
||||
router.push({path: "/starttest", query: {id: obj.courseId}});
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user