|
|
@@ -26,34 +26,55 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="videoId"
|
|
|
- label="视频 ID"
|
|
|
- width="120"
|
|
|
+ prop="title"
|
|
|
+ label="标题"
|
|
|
+ width="150"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
- <router-link target="_blank" :to="`/video/${scope.row.videoId}`">
|
|
|
- <span>{{ scope.row.videoId }}</span>
|
|
|
- </router-link>
|
|
|
+ <el-tooltip
|
|
|
+ :content="scope.row.title"
|
|
|
+ raw-content
|
|
|
+ placement="top-start"
|
|
|
+ >
|
|
|
+ <router-link style="text-decoration-line: none" target="_blank" :to="`/video/${scope.row.videoId}`">
|
|
|
+ <span v-if="scope.row.title.length <= 15">
|
|
|
+ {{ scope.row.title }}
|
|
|
+ </span>
|
|
|
+ <span v-else>
|
|
|
+ {{ scope.row.title.substr(0, 15) + "..." }}
|
|
|
+ </span>
|
|
|
+ </router-link>
|
|
|
+ </el-tooltip>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="title"
|
|
|
- label="标题"
|
|
|
- width="150"
|
|
|
- />
|
|
|
<el-table-column
|
|
|
prop="description"
|
|
|
label="描述"
|
|
|
+ width="150"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
- <span v-if="scope.row.description === null">-</span>
|
|
|
- <span v-else>{{ scope.row.description }}</span>
|
|
|
+ <el-tooltip
|
|
|
+ v-if="scope.row.description"
|
|
|
+ :content="scope.row.description"
|
|
|
+ raw-content
|
|
|
+ placement="top-start"
|
|
|
+ >
|
|
|
+ <span v-if="scope.row.description && scope.row.description.length <= 15">
|
|
|
+ {{ scope.row.description }}
|
|
|
+ </span>
|
|
|
+ <span v-if="scope.row.description && scope.row.description.length > 15">
|
|
|
+ {{ scope.row.description.substr(0, 15) + "..." }}
|
|
|
+ </span>
|
|
|
+ </el-tooltip>
|
|
|
+ <span v-else>-</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
prop="duration"
|
|
|
label="时长"
|
|
|
- />
|
|
|
+ >
|
|
|
+<!-- <span>59:59:59</span>-->
|
|
|
+ </el-table-column>
|
|
|
<el-table-column
|
|
|
prop="direction"
|
|
|
label="方向"
|
|
|
@@ -120,9 +141,13 @@
|
|
|
<el-table-column
|
|
|
fixed="right"
|
|
|
label="操作"
|
|
|
- width="280"
|
|
|
+ width="320"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ @click="handleCache(scope.$index, scope.row)"
|
|
|
+ >缓存</el-button>
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
@click="handlePreview(scope.$index, scope.row)"
|
|
|
@@ -251,7 +276,8 @@ import {
|
|
|
deleteVideoPost,
|
|
|
getVideoResource,
|
|
|
convertVideo,
|
|
|
- updateVideoStatus
|
|
|
+ updateVideoStatus,
|
|
|
+ cacheBiliVideo
|
|
|
} from '@/api/video'
|
|
|
import { getPostList } from '@/api/admin'
|
|
|
|
|
|
@@ -342,6 +368,20 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ handleCache(index, row) {
|
|
|
+ const bvId = row.videoId
|
|
|
+ cacheBiliVideo(bvId).then(resp => {
|
|
|
+ if (resp.code === 0) {
|
|
|
+ const resData = resp.data
|
|
|
+ this.$notify({
|
|
|
+ title: '提示',
|
|
|
+ message: resData.msg,
|
|
|
+ type: 'warning',
|
|
|
+ duration: 3000
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
handlePreview(index, row) {
|
|
|
videoInfo(row.videoId).then(res => {
|
|
|
if (res.code === 0) {
|