|
|
@@ -8,12 +8,8 @@
|
|
|
v-if="videoFormat == 'jpg' || videoFormat == 'bmp' || videoFormat == 'png' || videoFormat == 'jpeg'"
|
|
|
style="width: 100%; height: 350px"
|
|
|
>
|
|
|
- <!-- <img :src="imgs + itemData.coverImagePath" style="width: 100%; height: 100%" /> -->
|
|
|
- <!-- <img :v-lazy="imagess" style="width: 100%; height: 100%" /> -->
|
|
|
<a-image width="100%" height="350px" :src="resSrc" :preview="true" />
|
|
|
- <!-- <image :src="resSrc" style="object-fit: cover" /> -->
|
|
|
</div>
|
|
|
- <!-- "wmv","avi","flv","mpeg","mpg","rmvb","mov","mkv" -->
|
|
|
<div
|
|
|
v-if="
|
|
|
videoFormat == 'mkv' ||
|
|
|
@@ -30,7 +26,6 @@
|
|
|
>
|
|
|
<video :src="resSrc" controls style="width: 100%; height: 100%" />
|
|
|
</div>
|
|
|
- <!-- "doc","docx","ppt","pptx","xls","xlsx" -->
|
|
|
<div
|
|
|
v-if="
|
|
|
videoFormat == 'docx' ||
|
|
|
@@ -43,10 +38,7 @@
|
|
|
"
|
|
|
style="width: 100%; height: 350px"
|
|
|
>
|
|
|
- <!-- <PDF :src="resSrc" :width="850" :height="350" /> -->
|
|
|
<FilePreviewer :fileUrl="resSrc" :fileName="resName" :fileType="fileType" />
|
|
|
- <!-- <a-image width="200px" height="220px" :src="pdfRes" :preview="false" @click="handleDownload(resSrc)" /> -->
|
|
|
- <!-- <a-button type="primary" @click="handleDownload(resSrc)">去预览</a-button> -->
|
|
|
</div>
|
|
|
<div style="height: 20px"></div>
|
|
|
<!-- 用户信息部分 -->
|
|
|
@@ -112,18 +104,12 @@
|
|
|
<div style="display: flex; justify-content: center; align-items: center; height: 40px">
|
|
|
<span style="display: block; font-weight: bold">{{ resName }}</span>
|
|
|
</div>
|
|
|
- <!-- <div style="display: flex; align-items: center">
|
|
|
- <span style="font-weight: bold; margin-right: 10px">授课老师: </span>
|
|
|
- <span style="display: block">{{ teacherName }}</span>
|
|
|
- </div> -->
|
|
|
+
|
|
|
<div style="display: flex">
|
|
|
<span style="font-weight: bold; margin-right: 10px">所属院系: </span>
|
|
|
<span style="display: block; width: 200px">{{ department }}</span>
|
|
|
</div>
|
|
|
- <!-- <div style="display: flex; align-items: center">
|
|
|
- <span style="font-weight: bold; margin-right: 10px">所属专业: </span>
|
|
|
- <span style="display: block">{{ major }}</span>
|
|
|
- </div> -->
|
|
|
+
|
|
|
<div style="display: flex; align-items: center">
|
|
|
<span style="font-weight: bold; margin-right: 10px">资源类型: </span>
|
|
|
<span style="display: block; width: 200px">{{ courseType }}</span>
|
|
|
@@ -132,10 +118,7 @@
|
|
|
<span style="font-weight: bold; margin-right: 10px">资源格式: </span>
|
|
|
<span style="display: block; width: 200px">{{ videoFormat }}</span>
|
|
|
</div>
|
|
|
- <!-- <div style="display: flex; align-items: center" v-if="videoFormat != 'jpg'">
|
|
|
- <span style="font-weight: bold; margin-right: 10px">视频时长: </span>
|
|
|
- <span style="display: block">{{ videoDuration }}</span>
|
|
|
- </div> -->
|
|
|
+
|
|
|
<div style="display: flex; align-items: center">
|
|
|
<span style="font-weight: bold; margin-right: 10px">容量大小: </span>
|
|
|
<span style="display: block; width: 200px">{{ videoSize }}</span>
|
|
|
@@ -144,11 +127,7 @@
|
|
|
<span style="font-weight: bold; margin-right: 10px">发布时间: </span>
|
|
|
<span style="display: block; width: 200px">{{ releaseTime }}</span>
|
|
|
</div>
|
|
|
- <!-- <div style="display: flex; flex-direction: column">
|
|
|
- <span style="font-weight: bold; margin-right: 10px">课程介绍: </span>
|
|
|
- <br />
|
|
|
- <span style="display: block">{{ courseDescription }}</span>
|
|
|
- </div> -->
|
|
|
+
|
|
|
<br />
|
|
|
<span>资源标签</span>
|
|
|
<div style="display: flex; width: 100%; flex-wrap: wrap">
|
|
|
@@ -162,7 +141,6 @@
|
|
|
|
|
|
<script setup>
|
|
|
import { ref } from 'vue'
|
|
|
- // import PDF from 'vue-pdf'
|
|
|
import { Tag, Typography, Space, message } from 'ant-design-vue'
|
|
|
import ShareDialog from './ShareDialog.vue'
|
|
|
import { addViewCount, detail, add, cancel, queryList, resourcecentreDetail, getShareLink } from '@/api/portal'
|
|
|
@@ -172,17 +150,9 @@
|
|
|
import FilePreviewer from './FilePreviewer.vue'
|
|
|
import EventBus from '@/utils/EventBus'
|
|
|
import tool from '@/utils/tool'
|
|
|
- // import VueOfficePdf from '@vue-office/pdf'
|
|
|
- // import pdfView from 'pdfvuer'
|
|
|
- // import 'pdfvuer/dist/pdfvuer.css'
|
|
|
const route = useRoute()
|
|
|
const router = useRouter()
|
|
|
const props = defineProps({
|
|
|
- // itemData: {
|
|
|
- // type: Object,
|
|
|
- // default: () => {}
|
|
|
- // }
|
|
|
- //是否从资源列表来 1 是 0 否
|
|
|
isState: {
|
|
|
type: Number,
|
|
|
default: () => null
|
|
|
@@ -206,11 +176,9 @@
|
|
|
|
|
|
const talkNum = ref(0)
|
|
|
const collectNum = ref(0)
|
|
|
- // const courseDescription = ref(
|
|
|
- // '“我们正步入一个数据或许比软件更重要的新时代。——Tim O’ Reilly” 运用数据是精准刻画事物、呈现发展规律的主要手段,分析数据展示规律,把思想变得更精细!——“弹指之间·享受创新”,通过4周学习,你将掌握利用Python语言表示、清洗、统计和展示数据的能力。'
|
|
|
- // )
|
|
|
+
|
|
|
const tags = ref(['标签名称1', '标签名称2', '标签名称3', '标签名称4', '标签名称5'])
|
|
|
- const emit = defineEmits(['selectTab','onGetPageCommentNew'])
|
|
|
+ const emit = defineEmits(['selectTab', 'onGetPageCommentNew'])
|
|
|
const listUnpublishedView = ref(null)
|
|
|
const handleDownload = (src) => {
|
|
|
window.open(src)
|
|
|
@@ -250,10 +218,6 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- const getList = () => {
|
|
|
- //....
|
|
|
- // listUnpublishedView.value.setData(tableData.value)
|
|
|
- }
|
|
|
const setData = (data) => {
|
|
|
itemData.value = data
|
|
|
}
|
|
|
@@ -269,7 +233,6 @@
|
|
|
|
|
|
videoFormat.value = itemData.value.suffix
|
|
|
|
|
|
- // releaseTime.value = tool.formatTimestamp(itemData.value.uploadTime)
|
|
|
releaseTime.value = itemData.value.uploadTime
|
|
|
|
|
|
videoSize.value = itemData.value.FILESIZE ? itemData.value.FILESIZE + 'b' : ''
|
|
|
@@ -278,14 +241,10 @@
|
|
|
itemData.value.keywordList.forEach((item) => {
|
|
|
tags.value.push(item.wordName)
|
|
|
})
|
|
|
- //关键的资源在线地址
|
|
|
- // resSrc.value = sysConfig.FILE_URL + itemData.value.fileUrl
|
|
|
+
|
|
|
resSrc.value = sysConfig.FILE_URL + itemData.value.priviewFileUrl
|
|
|
fileType.value = itemData.value.suffix
|
|
|
- // imagess.value = ''+itemData.value.coverImagePath
|
|
|
- // imagess.value = 'http://192.168.1.245:10005/education/' + itemData.value.priviewFileUrl
|
|
|
|
|
|
- // VideoDetailsRef.value.setData(res.sdata)
|
|
|
emit('onGetPageCommentNew', {
|
|
|
resourceType: itemData.value.resourceType,
|
|
|
resourceTwoType: itemData.value.resourceTwoType
|
|
|
@@ -307,12 +266,8 @@
|
|
|
}
|
|
|
|
|
|
const fetchData = () => {
|
|
|
- getList()
|
|
|
const id = route.query.id
|
|
|
if (id != undefined && id != '') {
|
|
|
- // isHaveAuth : 0 1
|
|
|
- // checkAuth
|
|
|
-
|
|
|
queryList({ resourceId: id })
|
|
|
.then((res) => {
|
|
|
if (res.data == true) {
|
|
|
@@ -500,7 +455,7 @@
|
|
|
}
|
|
|
.video-info {
|
|
|
height: 100%; /* 确保填满容器高度 */
|
|
|
- flex:1;
|
|
|
+ flex: 1;
|
|
|
}
|
|
|
.resInfo {
|
|
|
margin-left: 10px;
|