提交 774d36f2 authored 作者: matian's avatar matian

bug fixes

上级 b8b217e1
......@@ -81,7 +81,7 @@ const swiperItemHandle = (url: string) => {
src="https://webapp-pub.oss-cn-beijing.aliyuncs.com/center_resource/upload-video-icon.png"
class="icon"
/>
<div class="text">该图片作为视频的封面图,用于视频封面显示</div>
<div class="text">该图片作为课程的封面图,用于视频封面显示</div>
</div>
<div class="item">
<img
......
......@@ -100,6 +100,7 @@ const changeData = () => {
</AppList>
<el-dialog v-model="dialogVisible" width="400px" title="添加讲师">
<div style="display: flex; justify-content: center">
讲师姓名:
<el-select
@change="changeData"
v-model="lecturerValue"
......@@ -116,7 +117,6 @@ const changeData = () => {
</div>
<template #footer>
<span class="dialog-footer">
<!-- <el-button @click="dialogVisible = false">取消</el-button> -->
<el-button type="primary" @click="dialogVisible = false">确认</el-button>
</span>
</template>
......
......@@ -33,7 +33,12 @@ const listOptions = computed(() => {
prop: 'start_time',
align: 'center',
computed({ row }: any) {
return format(parseInt(row.start_time))
console.log(row.start_time, row.end_time, Date.parse(Date()), '000row.start_time')
if (row.start_time === undefined || Date.parse(Date()) > row.start_time) {
return '-'
} else {
return format(parseInt(row.start_time))
}
}
},
{
......@@ -41,7 +46,11 @@ const listOptions = computed(() => {
prop: 'end_time',
align: 'center',
computed({ row }: any) {
return format(parseInt(row.end_time))
if (row.end_time === undefined || Date.parse(Date()) > row.end_time) {
return '-'
} else {
return format(parseInt(row.end_time))
}
}
},
{ label: '操作', slots: 'table-operate', align: 'center' }
......@@ -125,6 +134,7 @@ const changeData = () => {
</AppList>
<el-dialog v-model="dialogVisible" width="400px" title="添加直播">
<div style="display: flex; justify-content: center">
直播会议号:
<el-select
@change="changeData"
v-model="lecturerValue"
......@@ -141,7 +151,6 @@ const changeData = () => {
</div>
<template #footer>
<span class="dialog-footer">
<!-- <el-button @click="dialogVisible = false">取消</el-button> -->
<el-button type="primary" @click="dialogVisible = false">确认</el-button>
</span>
</template>
......
......@@ -23,7 +23,6 @@ const handleCancel = () => {
</script>
<template>
<el-dialog :model-value="isShowVideoPlayDialog" draggable :before-close="handleCancel" width="35%">
{{props.videoOptions}}
<AppVideoPlayer :options="{ sources: [{ src: props.videoOptions }] }"></AppVideoPlayer>
</el-dialog>
</template>
......@@ -146,7 +146,6 @@ const handleDownload = (node: any) => {
}
//拖拽
const allowDrop = (draggingNode: any, dropNode: any, type: any) => {
console.log(draggingNode.data, dropNode, type)
if (draggingNode.data.depth === dropNode.data.depth) {
if (draggingNode.data.parentId === dropNode.data.parentId) {
return type === 'prev' || type === 'next'
......@@ -160,12 +159,12 @@ const allowDrop = (draggingNode: any, dropNode: any, type: any) => {
}
//拖拽列表
const handleDrop = (startNode: any, endNode: any, position: any, event: any) => {
console.log(startNode, endNode, position, event)
console.log(startNode, '-----', endNode, '-----', position, '-----', event)
const params = {
course_id: id,
id: startNode.data.id,
brother_id: endNode.data.id,
type: startNode.data.id < endNode.data.id ? 'before' : 'after'
type: position
}
dragChapterList(params).then(() => {
handleChapterList()
......@@ -177,12 +176,11 @@ const imgUrl = (node: any) => {
return 'https://webapp-pub.oss-cn-beijing.aliyuncs.com/center_resource/chapter_img.png'
} else if (node.data.resource_type === '2') {
// 视频
console.log(node.data.resource, '000')
return 'https://webapp-pub.oss-cn-beijing.aliyuncs.com/center_resource/mp4_img.png'
} else if (node.data.resource_type === '3') {
// 作业
return 'https://webapp-pub.oss-cn-beijing.aliyuncs.com/center_resource/homework.png'
} else if (node.data.resource_type === '4') {
} else if (node.data.resource_type === '4' || node.data.resource_type === '10' || node.data.resource_type === '11') {
if (node.data.resource?.url.includes('pptx') || node.data.resource?.url.includes('ppt')) {
// 其他资源
return 'https://webapp-pub.oss-cn-beijing.aliyuncs.com/center_resource/pptx_img.png'
......@@ -194,12 +192,11 @@ const imgUrl = (node: any) => {
return 'https://webapp-pub.oss-cn-beijing.aliyuncs.com/center_resource/mp3_img.png'
} else if (node.data.resource?.url.includes('mp4')) {
// 其他资源
return 'https://webapp-pub.oss-cn-beijing.aliyuncs.com/center_resource/mp4_img.png'
} else if (node.data.resource?.url.includes('docx') || node.data.resource?.url.includes('doc')) {
return 'https://webapp-pub.oss-cn-beijing.aliyuncs.com/center_resource/docx_img.png'
} else if (node.data.resource?.url.includes('xls') || node.data.resource?.url.includes('xlsx')) {
return ''
return 'https://webapp-pub.oss-cn-beijing.aliyuncs.com/center_resource/xls_img.png'
} else if (
node.data.resource?.url.includes('png') ||
node.data.resource?.url.includes('jpeg') ||
......@@ -209,6 +206,9 @@ const imgUrl = (node: any) => {
} else if (node.data.resource?.url.includes('pdf')) {
return 'https://webapp-pub.oss-cn-beijing.aliyuncs.com/center_resource/pdf_img.png'
}
} else if (node.data.resource_type === '6') {
// 直播
return 'https://webapp-pub.oss-cn-beijing.aliyuncs.com/center_resource/live_img.png'
} else if (node.data.resource_type === '9') {
// 考试
return 'https://webapp-pub.oss-cn-beijing.aliyuncs.com/center_resource/test_img.png'
......
......@@ -50,7 +50,7 @@ const basicInfo = computed((): IBasicInfo[] => {
},
{
icon: 'https://webapp-pub.oss-cn-beijing.aliyuncs.com/center_resource/course-view-icon5.png',
label: '更新人',
label: '负责人',
value: '',
key: 'updated_operator_name'
},
......
......@@ -78,15 +78,15 @@ const changeCard = () => {
</script>
<template>
<AppCard title="资源统计">
<AppCard title="课程统计">
<Statistics></Statistics>
</AppCard>
<AppCard>
<div class="video-head">
<el-tabs @tab-change="tabChange" v-model="tabValue">
<el-tab-pane label="我的资源" name="1"></el-tab-pane>
<el-tab-pane label="部门资源" name="2"></el-tab-pane>
<el-tab-pane label="公开资源" name="3"></el-tab-pane>
<el-tab-pane label="我的课程" name="1"></el-tab-pane>
<el-tab-pane label="部门课程" name="2"></el-tab-pane>
<el-tab-pane label="公开课程" name="3"></el-tab-pane>
</el-tabs>
<el-icon class="video-head-icon" @click="changeCard"><Expand /></el-icon>
</div>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论