提交 7fb6b128 authored 作者: matian's avatar matian

bug fixes

上级 e9311674
<template> <template>
<div ref="videoWrapper"> <div ref="videoWrapper">
<video v-if="isAdd" ref="videoPlayer" class="video-js vjs-default-skin vjs-big-play-centered vjs-16-9" id="videoJS"></video> <video
v-if="isAdd"
ref="videoPlayer"
class="video-js vjs-default-skin vjs-big-play-centered vjs-16-9"
id="videoJS"
></video>
</div> </div>
</template> </template>
......
...@@ -95,6 +95,7 @@ function genNavClassName(data: IMenuItem) { ...@@ -95,6 +95,7 @@ function genNavClassName(data: IMenuItem) {
padding: 0 15px; padding: 0 15px;
line-height: 1; line-height: 1;
border-left: 2px solid #fff; border-left: 2px solid #fff;
font-size: 18px;
} }
} }
.app-header-nav { .app-header-nav {
......
...@@ -66,7 +66,7 @@ watch( ...@@ -66,7 +66,7 @@ watch(
) )
const handleGetTeacherList = () => { const handleGetTeacherList = () => {
searchTeacher({ organ_id: form.organ_id, 'per-page': '100' }).then((res: any) => { searchTeacher({ organ_id: form.organ_id, 'per-page': '100' }).then((res: any) => {
teacherList.value = res.data.list teacherList.value = res.data.list.filter((item: any) => item.status === '1')
teacherList.value.forEach((item: any) => { teacherList.value.forEach((item: any) => {
const findItem = allLecturers.value.find((cItem: any) => cItem.id === item.id) const findItem = allLecturers.value.find((cItem: any) => cItem.id === item.id)
if (!findItem) { if (!findItem) {
...@@ -125,7 +125,7 @@ const proList: any = ref([]) ...@@ -125,7 +125,7 @@ const proList: any = ref([])
const allPro: any = ref([]) const allPro: any = ref([])
getProList({ name: '', 'per-page': '100' }).then((res: any) => { getProList({ name: '', 'per-page': '100' }).then((res: any) => {
proList.value = res.data.list proList.value = res.data.list.filter((item: any) => item.status === '1')
proList.value.forEach((item: any) => { proList.value.forEach((item: any) => {
const findItem = allPro.value.find((cItem: any) => cItem.id === item.id) const findItem = allPro.value.find((cItem: any) => cItem.id === item.id)
if (!findItem) { if (!findItem) {
......
...@@ -74,10 +74,10 @@ const handleCancel = () => { ...@@ -74,10 +74,10 @@ const handleCancel = () => {
<el-descriptions-item label="班级名称">{{ classInfo.name }}</el-descriptions-item> <el-descriptions-item label="班级名称">{{ classInfo.name }}</el-descriptions-item>
<el-descriptions-item label="所属部门/学校:">{{ classInfo.organ_id_name }}</el-descriptions-item> <el-descriptions-item label="所属部门/学校:">{{ classInfo.organ_id_name }}</el-descriptions-item>
<el-descriptions-item label="班 主 任:"> <el-descriptions-item label="班 主 任:">
<el-tag size="small">{{ classInfo.teacher_id_name }}</el-tag> {{ classInfo.teacher_id_name }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="所属专业">{{ classInfo.specialty_id_name }}</el-descriptions-item> <el-descriptions-item label="所属专业:">{{ classInfo.specialty_id_name }}</el-descriptions-item>
<el-descriptions-item label="入学年份">{{ classInfo.start_year_name }}</el-descriptions-item> <el-descriptions-item label="入学年份:">{{ classInfo.start_year_name }}</el-descriptions-item>
</el-descriptions> </el-descriptions>
<AppList <AppList
v-bind="listOptions" v-bind="listOptions"
......
...@@ -21,7 +21,7 @@ const appList = ref() ...@@ -21,7 +21,7 @@ const appList = ref()
const semInfo: any = ref({}) const semInfo: any = ref({})
const multiSelection = ref([]) const multiSelection = ref([])
// 下拉选择tree 视频分类 // 下拉选择tree 视频分类
let { list: selectTree } = useGetCategoryList() let { list: selectTree }: any = useGetCategoryList()
const defaultProps = { children: 'children', label: 'category_name', value: 'id' } const defaultProps = { children: 'children', label: 'category_name', value: 'id' }
const listOptions = $computed(() => { const listOptions = $computed(() => {
...@@ -35,7 +35,7 @@ const listOptions = $computed(() => { ...@@ -35,7 +35,7 @@ const listOptions = $computed(() => {
} }
}, },
filters: [ filters: [
{ type: 'select', slots: 'course-category' }, { type: 'select', prop: 'classification', slots: 'course-category' },
{ type: 'input', prop: 'name', label: '课程名称:', placeholder: '课程名称' } { type: 'input', prop: 'name', label: '课程名称:', placeholder: '课程名称' }
], ],
columns: [ columns: [
...@@ -46,7 +46,16 @@ const listOptions = $computed(() => { ...@@ -46,7 +46,16 @@ const listOptions = $computed(() => {
{ label: '选课类型', prop: 'elective_type_name', align: 'center' }, { label: '选课类型', prop: 'elective_type_name', align: 'center' },
{ label: '课程分类', prop: 'classification_name', align: 'center' }, { label: '课程分类', prop: 'classification_name', align: 'center' },
{ label: '课程学分', prop: 'credit', align: 'center' }, { label: '课程学分', prop: 'credit', align: 'center' },
{ label: '讲师', prop: 'enter_month', align: 'center' }, {
label: '讲师',
prop: 'lecturers_name',
align: 'center',
computed(row: any) {
if (row.row.lecturers_name.length) {
return row.row.lecturers_name.toString()
}
}
},
{ label: '更新时间', prop: 'updated_time', align: 'center' }, { label: '更新时间', prop: 'updated_time', align: 'center' },
{ label: '操作', slots: 'table-operate', align: 'center', minWidth: '200', fixed: 'right' } { label: '操作', slots: 'table-operate', align: 'center', minWidth: '200', fixed: 'right' }
] ]
...@@ -86,7 +95,7 @@ const handleFresh = () => { ...@@ -86,7 +95,7 @@ const handleFresh = () => {
<el-descriptions-item label="结束日期:"> <el-descriptions-item label="结束日期:">
{{ semInfo.end_time }} {{ semInfo.end_time }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="教学周">{{ semInfo.length }}</el-descriptions-item> <el-descriptions-item label="教学周:">{{ semInfo.length }}</el-descriptions-item>
</el-descriptions> </el-descriptions>
<AppList <AppList
v-bind="listOptions" v-bind="listOptions"
...@@ -100,6 +109,7 @@ const handleFresh = () => { ...@@ -100,6 +109,7 @@ const handleFresh = () => {
<template #course-category="{ params }"> <template #course-category="{ params }">
课程分类:&nbsp;&nbsp; 课程分类:&nbsp;&nbsp;
<el-tree-select <el-tree-select
node-key="id"
:render-after-expand="false" :render-after-expand="false"
:props="defaultProps" :props="defaultProps"
v-model="params.classification" v-model="params.classification"
...@@ -107,6 +117,7 @@ const handleFresh = () => { ...@@ -107,6 +117,7 @@ const handleFresh = () => {
clearable clearable
placeholder="课程分类" placeholder="课程分类"
@change="handleFresh" @change="handleFresh"
:default-expanded-keys="selectTree.length ? [selectTree[0]?.id] : []"
/> />
</template> </template>
......
...@@ -112,7 +112,7 @@ if (props.isEdit === '2' || props.isEdit === '1') { ...@@ -112,7 +112,7 @@ if (props.isEdit === '2' || props.isEdit === '1') {
<el-select <el-select
clearable clearable
v-model="form.organ_id" v-model="form.organ_id"
:disabled="props.isEdit === '2'" :disabled="props.isEdit === '2' || props.isEdit === '1'"
placeholder="请选择所属部门/学校" placeholder="请选择所属部门/学校"
style="width: 100%" style="width: 100%"
v-if="userStore.roles[0].name === '超级管理员'" v-if="userStore.roles[0].name === '超级管理员'"
......
...@@ -97,7 +97,7 @@ const handleChangeSpe = () => { ...@@ -97,7 +97,7 @@ const handleChangeSpe = () => {
// 获取专业列表 // 获取专业列表
const handleGetProList = () => { const handleGetProList = () => {
getProList({ name: '', 'per-page': '100' }).then((res: any) => { getProList({ name: '', 'per-page': '100' }).then((res: any) => {
proList.value = res.data.list proList.value = res.data.list.filter((item: any) => item.status === '1')
proList.value.forEach((item: any) => { proList.value.forEach((item: any) => {
const findItem = allPro.value.find((cItem: any) => cItem.id === item.id) const findItem = allPro.value.find((cItem: any) => cItem.id === item.id)
if (!findItem) { if (!findItem) {
...@@ -118,7 +118,7 @@ const handleClassList = () => { ...@@ -118,7 +118,7 @@ const handleClassList = () => {
'per-page': '100' 'per-page': '100'
}).then((res: any) => { }).then((res: any) => {
loading.value = false loading.value = false
classList.value = res.data.list classList.value = res.data.list.filter((item: any) => item.status === '1')
classList.value.forEach((item: any) => { classList.value.forEach((item: any) => {
const findItem = allLecturers.value.find((cItem: any) => cItem.id === item.id) const findItem = allLecturers.value.find((cItem: any) => cItem.id === item.id)
if (!findItem) { if (!findItem) {
......
...@@ -178,7 +178,7 @@ function handleUpdate() { ...@@ -178,7 +178,7 @@ function handleUpdate() {
// const handleMajorList = (query: string) => { // const handleMajorList = (query: string) => {
// if (query) { // if (query) {
getMajorList({ name: '', 'per-page': '100' }).then((res: any) => { getMajorList({ name: '', 'per-page': '100' }).then((res: any) => {
majorList.value = res.data.list majorList.value = res.data.list.filter((item: any) => item.status === '1')
majorList.value.forEach((item: any) => { majorList.value.forEach((item: any) => {
console.log(item, 'ppp') console.log(item, 'ppp')
const findItem = allMajorList.value.find((cItem: any) => cItem.id === item.id) const findItem = allMajorList.value.find((cItem: any) => cItem.id === item.id)
......
...@@ -37,15 +37,18 @@ const id = route.query.id ? route.query.id : (route.params.courseId as string) ...@@ -37,15 +37,18 @@ const id = route.query.id ? route.query.id : (route.params.courseId as string)
&.active-black { &.active-black {
background: #1f1e24; background: #1f1e24;
border-radius: 0px; border-radius: 0px;
margin-left: 0px; max-height: 506px;
overflow-y: auto; overflow-y: auto;
height: 506px; margin-left: 0px;
.chapter-list { .chapter-list {
.item { .item {
border-bottom: 1px dashed #fff; border-bottom: 1px dashed #fff;
} }
} }
.sections {
width: 100px;
}
} }
.title { .title {
margin: 0 auto; margin: 0 auto;
...@@ -56,6 +59,7 @@ const id = route.query.id ? route.query.id : (route.params.courseId as string) ...@@ -56,6 +59,7 @@ const id = route.query.id ? route.query.id : (route.params.courseId as string)
text-align: center; text-align: center;
word-break: normal; word-break: normal;
word-wrap: break-all; word-wrap: break-all;
margin-left: 10px;
} }
.line { .line {
width: 85%; width: 85%;
...@@ -94,8 +98,6 @@ const id = route.query.id ? route.query.id : (route.params.courseId as string) ...@@ -94,8 +98,6 @@ const id = route.query.id ? route.query.id : (route.params.courseId as string)
word-break: break-all; word-break: break-all;
} }
.sections { .sections {
width: 100px;
font-size: 14px; font-size: 14px;
line-height: 100%; line-height: 100%;
color: #ffffff; color: #ffffff;
......
...@@ -2,10 +2,14 @@ ...@@ -2,10 +2,14 @@
import { getVideoDetails } from '../api' import { getVideoDetails } from '../api'
import AppVideoPlayer from '@/components/base/AppVideoPlayer.vue' import AppVideoPlayer from '@/components/base/AppVideoPlayer.vue'
// import PreviewFiles from '@/components/base/PreviewFiles.vue' // import PreviewFiles from '@/components/base/PreviewFiles.vue'
import ViewCourseChapter from './ViewCourseChapter.vue'
const props: any = defineProps({ const props: any = defineProps({
data: { data: {
type: Array type: Array
},
chapterTree: {
type: Array
} }
}) })
...@@ -47,12 +51,14 @@ const changeVideo = (index: number) => { ...@@ -47,12 +51,14 @@ const changeVideo = (index: number) => {
} }
</script> </script>
<template> <template>
<div> <div class="main_content">
<div style="position: relative"> <div class="content_top">
<div style="max-width: 900px; min-width: 900px"> <AppVideoPlayer :options="videoOptions" class="video_con" height="506" width=" 75%"></AppVideoPlayer>
<AppVideoPlayer :options="videoOptions"></AppVideoPlayer> <div class="chapter_con">
<ViewCourseChapter :isBlack="true" :data="props.chapterTree"></ViewCourseChapter>
</div> </div>
</div> </div>
<div></div>
<div style="margin-top: 20px">本小节视频资源:</div> <div style="margin-top: 20px">本小节视频资源:</div>
<div class="cover-list"> <div class="cover-list">
<div class="cover-box"> <div class="cover-box">
...@@ -71,8 +77,22 @@ const changeVideo = (index: number) => { ...@@ -71,8 +77,22 @@ const changeVideo = (index: number) => {
</div> </div>
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
.main_content {
display: flex;
flex-direction: column;
.content_top {
height: 506px;
display: flex;
.video_con {
width: 75%;
// height: 506px;
}
.chapter_con {
height: 506px;
}
}
}
.cover-list { .cover-list {
max-width: 1200px;
overflow-x: auto; overflow-x: auto;
} }
.cover-box { .cover-box {
...@@ -84,7 +104,6 @@ const changeVideo = (index: number) => { ...@@ -84,7 +104,6 @@ const changeVideo = (index: number) => {
min-width: 200px; min-width: 200px;
min-height: 100px; min-height: 100px;
background-size: cover; background-size: cover;
margin: 20px 10px 0; margin: 20px 10px 0;
cursor: pointer; cursor: pointer;
box-sizing: border-box; box-sizing: border-box;
......
<script setup lang="ts"> <script setup lang="ts">
import { getCharacter } from '../api' import { getCharacter } from '../api'
import ViewCourseChapter from '../components/ViewCourseChapter.vue' // import ViewCourseChapter from '../components/ViewCourseChapter.vue'
import ViewDetailsVideo from '../components/ViewDetailsVideo.vue' import ViewDetailsVideo from '../components/ViewDetailsVideo.vue'
import PreviewFiles from '@/components/base/PreviewFiles.vue' import PreviewFiles from '@/components/base/PreviewFiles.vue'
...@@ -221,18 +221,18 @@ const handleExamDetail = (row: any) => { ...@@ -221,18 +221,18 @@ const handleExamDetail = (row: any) => {
<div class="chapter-box"> <div class="chapter-box">
<div class="title">{{ chapterDetails?.name }}</div> <div class="title">{{ chapterDetails?.name }}</div>
<div class="chapter-content"> <div class="chapter-content">
<el-card>
<div class="content-top"> <div class="content-top">
<ViewDetailsVideo <ViewDetailsVideo
v-if="Object.keys(resourceData.videoData).length" v-if="Object.keys(resourceData.videoData).length"
:data="resourceData.videoData" :data="resourceData.videoData"
:chapterTree="chapterTree"
class="video_con"
></ViewDetailsVideo> ></ViewDetailsVideo>
<el-empty style="max-width: 900px; min-width: 900px" description="暂无数据" v-else /> <el-empty description="暂无数据" v-else />
<ViewCourseChapter
:isBlack="true"
:data="chapterTree"
:style="Object.keys(resourceData.videoData).length ? 'margin-left: -300px' : ''"
></ViewCourseChapter>
</div> </div>
</el-card>
<div class="content-bottom"> <div class="content-bottom">
<el-tabs :lazy="true" v-model="activeName" class="demo-tabs"> <el-tabs :lazy="true" v-model="activeName" class="demo-tabs">
<el-tab-pane label="课件" name="1"> <el-tab-pane label="课件" name="1">
...@@ -276,17 +276,31 @@ const handleExamDetail = (row: any) => { ...@@ -276,17 +276,31 @@ const handleExamDetail = (row: any) => {
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
.chapter-box { .chapter-box {
// max-width: 1200px;
// margin: auto;
// padding: 0 42px;
.title { .title {
font-size: 20px; font-size: 20px;
font-weight: 500; font-weight: 500;
color: #333333; color: #333333;
} }
.chapter-content { .chapter-content {
max-width: calc(100vw - 200px);
// min-width: 960px;
margin: auto;
display: flex;
flex-direction: column;
.content-top { .content-top {
display: flex; display: flex;
justify-content: center;
align-items: flex-start;
height: 700px;
.video_con {
width: 100%;
height: 100%;
} }
.content-bottom {
max-width: 1200px;
} }
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论