|
|
@@ -1,203 +1,141 @@
|
|
|
<template>
|
|
|
<el-row>
|
|
|
- <el-table
|
|
|
- :data="dataList"
|
|
|
- border
|
|
|
- style="width: 100%"
|
|
|
- >
|
|
|
- <el-table-column
|
|
|
- fixed="left"
|
|
|
- label="No"
|
|
|
- type="index"
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- prop="pubDate"
|
|
|
- label="发布时间"
|
|
|
- width="150"
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- prop="coverUrl"
|
|
|
- label="封面"
|
|
|
- width="90"
|
|
|
- >
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-image :src="scope.row.coverUrl" min-width="30" height="20" />
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="videoId"
|
|
|
- label="视频 ID"
|
|
|
- width="120"
|
|
|
- >
|
|
|
- <template slot-scope="scope">
|
|
|
- <router-link target="_blank" :to="`/video/${scope.row.videoId}`">
|
|
|
- <span>{{ scope.row.videoId }}</span>
|
|
|
- </router-link>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="title"
|
|
|
- label="标题"
|
|
|
- width="150"
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- prop="description"
|
|
|
- label="描述"
|
|
|
- >
|
|
|
- <template slot-scope="scope">
|
|
|
- <span v-if="scope.row.description !== null">-</span>
|
|
|
- <span v-else>{{ scope.row.description }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="duration"
|
|
|
- label="时长"
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- prop="direction"
|
|
|
- label="方向"
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- label="视频资源"
|
|
|
- >
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-button
|
|
|
- size="mini"
|
|
|
- @click="handleVideoResource(scope.$index, scope.row)"
|
|
|
- >查看</el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="scope"
|
|
|
- label="可见范围"
|
|
|
- width="120"
|
|
|
- >
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-tooltip class="item" effect="dark" content="点击修改可见范围" placement="top-end">
|
|
|
- <el-button
|
|
|
- v-if="scope.row.scope === 1"
|
|
|
- size="mini"
|
|
|
- @click="handleScope(scope.$index, scope.row)"
|
|
|
- >本人可见</el-button>
|
|
|
- <el-button
|
|
|
- v-else-if="scope.row.scope === 2"
|
|
|
- size="mini"
|
|
|
- type="success"
|
|
|
- @click="handleScope(scope.$index, scope.row)"
|
|
|
- >所有人可见</el-button>
|
|
|
- <el-button
|
|
|
- v-else-if="scope.row.scope === 3"
|
|
|
- size="mini"
|
|
|
- type="warning"
|
|
|
- @click="handleScope(scope.$index, scope.row)"
|
|
|
- >VIP 可见</el-button>
|
|
|
- <el-button
|
|
|
- v-else
|
|
|
- size="mini"
|
|
|
- type="danger"
|
|
|
- @click="handleScope(scope.$index, scope.row)"
|
|
|
- >验证码可见</el-button>
|
|
|
- </el-tooltip>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="scope"
|
|
|
- label="审核状态"
|
|
|
- width="120"
|
|
|
- >
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-tag v-if="scope.row.status === 1" :type="'warning'" disable-transitions>
|
|
|
- 审核中
|
|
|
- </el-tag>
|
|
|
- <el-tag v-else-if="scope.row.status === 2" :type="'success'" disable-transitions>
|
|
|
- 审核通过
|
|
|
- </el-tag>
|
|
|
- <el-tag v-else-if="scope.row.status === 3" :type="'danger'" disable-transitions>
|
|
|
- 审核未通过
|
|
|
- </el-tag>
|
|
|
- <el-tag v-else-if="scope.row.status === 4" :type="'danger'" disable-transitions>
|
|
|
- 下架
|
|
|
- </el-tag>
|
|
|
- <el-tag v-else-if="scope.row.status === 5" :type="'danger'" disable-transitions>
|
|
|
- 待缓存
|
|
|
- </el-tag>
|
|
|
- <el-tag v-else-if="scope.row.status === 6" :type="'danger'" disable-transitions>
|
|
|
- 缓存中
|
|
|
- </el-tag>
|
|
|
- <el-tag v-else-if="scope.row.status === 7" :type="'danger'" disable-transitions>
|
|
|
- 缓存失败
|
|
|
- </el-tag>
|
|
|
- <el-tag v-else-if="scope.row.status === 8" :type="'danger'" disable-transitions>
|
|
|
- 封面不存在
|
|
|
- </el-tag>
|
|
|
- <el-tag v-else :type="'danger'" disable-transitions>
|
|
|
- 视频不存在
|
|
|
- </el-tag>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- fixed="right"
|
|
|
- label="操作"
|
|
|
- width="280"
|
|
|
- >
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-button
|
|
|
- size="mini"
|
|
|
- @click="handlePreview(scope.$index, scope.row)"
|
|
|
- >预览</el-button>
|
|
|
- <el-button
|
|
|
- size="mini"
|
|
|
- @click="handleEdit(scope.$index, scope.row)"
|
|
|
- >编辑</el-button>
|
|
|
- <el-button
|
|
|
- size="mini"
|
|
|
- type="danger"
|
|
|
- @click="handleDelete(scope.$index, scope.row)"
|
|
|
- >删除</el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
-
|
|
|
- <!-- 视频资源对话框 -->
|
|
|
- <el-dialog
|
|
|
- append-to-body
|
|
|
- :visible.sync="showVideoResourceDialog"
|
|
|
- width="70%"
|
|
|
- center
|
|
|
- >
|
|
|
+ <el-row>
|
|
|
<el-table
|
|
|
- :data="videoResources"
|
|
|
+ :data="dataList"
|
|
|
border
|
|
|
style="width: 100%"
|
|
|
>
|
|
|
<el-table-column
|
|
|
+ fixed="left"
|
|
|
label="No"
|
|
|
type="index"
|
|
|
/>
|
|
|
<el-table-column
|
|
|
- prop="videoCodec"
|
|
|
- label="原始视频"
|
|
|
+ prop="pubDate"
|
|
|
+ label="发布时间"
|
|
|
+ width="150"
|
|
|
/>
|
|
|
<el-table-column
|
|
|
- prop="videoCodec"
|
|
|
- label="视频编码"
|
|
|
- />
|
|
|
+ prop="coverUrl"
|
|
|
+ label="封面"
|
|
|
+ width="90"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-image :src="scope.row.coverUrl" min-width="30" height="20" />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="audioCodec"
|
|
|
- label="音频编码"
|
|
|
- />
|
|
|
+ prop="videoId"
|
|
|
+ label="视频 ID"
|
|
|
+ width="120"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <router-link target="_blank" :to="`/video/${scope.row.videoId}`">
|
|
|
+ <span>{{ scope.row.videoId }}</span>
|
|
|
+ </router-link>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="quality"
|
|
|
- label="画质"
|
|
|
+ prop="title"
|
|
|
+ label="标题"
|
|
|
+ width="150"
|
|
|
/>
|
|
|
<el-table-column
|
|
|
- prop="urlType"
|
|
|
- label="URL 类型"
|
|
|
+ prop="description"
|
|
|
+ label="描述"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span v-if="scope.row.description !== null">-</span>
|
|
|
+ <span v-else>{{ scope.row.description }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="duration"
|
|
|
+ label="时长"
|
|
|
/>
|
|
|
<el-table-column
|
|
|
- prop="url"
|
|
|
- label="URL"
|
|
|
+ prop="direction"
|
|
|
+ label="方向"
|
|
|
/>
|
|
|
+ <el-table-column
|
|
|
+ label="视频资源"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ @click="handleVideoResource(scope.$index, scope.row)"
|
|
|
+ >查看</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="scope"
|
|
|
+ label="可见范围"
|
|
|
+ width="120"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-tooltip class="item" effect="dark" content="点击修改可见范围" placement="top-end">
|
|
|
+ <el-button
|
|
|
+ v-if="scope.row.scope === 1"
|
|
|
+ size="mini"
|
|
|
+ @click="handleScope(scope.$index, scope.row)"
|
|
|
+ >本人可见</el-button>
|
|
|
+ <el-button
|
|
|
+ v-else-if="scope.row.scope === 2"
|
|
|
+ size="mini"
|
|
|
+ type="success"
|
|
|
+ @click="handleScope(scope.$index, scope.row)"
|
|
|
+ >所有人可见</el-button>
|
|
|
+ <el-button
|
|
|
+ v-else-if="scope.row.scope === 3"
|
|
|
+ size="mini"
|
|
|
+ type="warning"
|
|
|
+ @click="handleScope(scope.$index, scope.row)"
|
|
|
+ >VIP 可见</el-button>
|
|
|
+ <el-button
|
|
|
+ v-else
|
|
|
+ size="mini"
|
|
|
+ type="danger"
|
|
|
+ @click="handleScope(scope.$index, scope.row)"
|
|
|
+ >验证码可见</el-button>
|
|
|
+ </el-tooltip>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="scope"
|
|
|
+ label="审核状态"
|
|
|
+ width="120"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-tag v-if="scope.row.status === 1" :type="'warning'" disable-transitions>
|
|
|
+ 审核中
|
|
|
+ </el-tag>
|
|
|
+ <el-tag v-else-if="scope.row.status === 2" :type="'success'" disable-transitions>
|
|
|
+ 审核通过
|
|
|
+ </el-tag>
|
|
|
+ <el-tag v-else-if="scope.row.status === 3" :type="'danger'" disable-transitions>
|
|
|
+ 审核未通过
|
|
|
+ </el-tag>
|
|
|
+ <el-tag v-else-if="scope.row.status === 4" :type="'danger'" disable-transitions>
|
|
|
+ 下架
|
|
|
+ </el-tag>
|
|
|
+ <el-tag v-else-if="scope.row.status === 5" :type="'danger'" disable-transitions>
|
|
|
+ 待缓存
|
|
|
+ </el-tag>
|
|
|
+ <el-tag v-else-if="scope.row.status === 6" :type="'danger'" disable-transitions>
|
|
|
+ 缓存中
|
|
|
+ </el-tag>
|
|
|
+ <el-tag v-else-if="scope.row.status === 7" :type="'danger'" disable-transitions>
|
|
|
+ 缓存失败
|
|
|
+ </el-tag>
|
|
|
+ <el-tag v-else-if="scope.row.status === 8" :type="'danger'" disable-transitions>
|
|
|
+ 封面不存在
|
|
|
+ </el-tag>
|
|
|
+ <el-tag v-else :type="'danger'" disable-transitions>
|
|
|
+ 视频不存在
|
|
|
+ </el-tag>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column
|
|
|
fixed="right"
|
|
|
label="操作"
|
|
|
@@ -206,47 +144,123 @@
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
- @click="handleConvert(scope.$index, scope.row)"
|
|
|
- >转码</el-button>
|
|
|
+ @click="handlePreview(scope.$index, scope.row)"
|
|
|
+ >预览</el-button>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ @click="handleEdit(scope.$index, scope.row)"
|
|
|
+ >编辑</el-button>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="danger"
|
|
|
+ @click="handleDelete(scope.$index, scope.row)"
|
|
|
+ >删除</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
- </el-dialog>
|
|
|
- <!-- 修改视频可见范围对话框 -->
|
|
|
- <el-dialog
|
|
|
- append-to-body
|
|
|
- :visible.sync="showEditScopeDialog"
|
|
|
- width="30%"
|
|
|
- center
|
|
|
- >
|
|
|
- <el-card class="box-card">
|
|
|
- <div slot="header" class="clearfix">
|
|
|
- <span>修改视频可见范围</span>
|
|
|
- <el-button style="float: right; padding: 3px 0" type="text" @click="onUpdateScope">更新</el-button>
|
|
|
- </div>
|
|
|
- <div class="text item">
|
|
|
- <el-select v-model="form.scope" placeholder="选择可见范围">
|
|
|
- <el-option label="本人可见" value="1" />
|
|
|
- <el-option label="所有人可见" value="2" />
|
|
|
- <el-option label="VIP 可见" value="3" />
|
|
|
- <el-option label="验证码可见" value="4" />
|
|
|
- </el-select>
|
|
|
- </div>
|
|
|
- </el-card>
|
|
|
- </el-dialog>
|
|
|
- <!-- 视频预览对话框 -->
|
|
|
- <el-dialog
|
|
|
- title="预览视频"
|
|
|
- append-to-body
|
|
|
- :visible.sync="showPreviewDialog"
|
|
|
- :before-close="handleDialogClose"
|
|
|
- width="70%"
|
|
|
- center
|
|
|
- >
|
|
|
- <template>
|
|
|
- <video-preview-player :video-prop.sync="this.videoProp" />
|
|
|
- </template>
|
|
|
- </el-dialog>
|
|
|
+ <!-- 视频资源对话框 -->
|
|
|
+ <el-dialog
|
|
|
+ append-to-body
|
|
|
+ :visible.sync="showVideoResourceDialog"
|
|
|
+ width="70%"
|
|
|
+ center
|
|
|
+ >
|
|
|
+ <el-table
|
|
|
+ :data="videoResources"
|
|
|
+ border
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
+ <el-table-column
|
|
|
+ label="No"
|
|
|
+ type="index"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="videoCodec"
|
|
|
+ label="原始视频"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="videoCodec"
|
|
|
+ label="视频编码"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="audioCodec"
|
|
|
+ label="音频编码"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="quality"
|
|
|
+ label="画质"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="urlType"
|
|
|
+ label="URL 类型"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="url"
|
|
|
+ label="URL"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ fixed="right"
|
|
|
+ label="操作"
|
|
|
+ width="280"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ @click="handleConvert(scope.$index, scope.row)"
|
|
|
+ >转码</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-dialog>
|
|
|
+ <!-- 修改视频可见范围对话框 -->
|
|
|
+ <el-dialog
|
|
|
+ append-to-body
|
|
|
+ :visible.sync="showEditScopeDialog"
|
|
|
+ width="30%"
|
|
|
+ center
|
|
|
+ >
|
|
|
+ <el-card class="box-card">
|
|
|
+ <div slot="header" class="clearfix">
|
|
|
+ <span>修改视频可见范围</span>
|
|
|
+ <el-button style="float: right; padding: 3px 0" type="text" @click="onUpdateScope">更新</el-button>
|
|
|
+ </div>
|
|
|
+ <div class="text item">
|
|
|
+ <el-select v-model="form.scope" placeholder="选择可见范围">
|
|
|
+ <el-option label="本人可见" value="1" />
|
|
|
+ <el-option label="所有人可见" value="2" />
|
|
|
+ <el-option label="VIP 可见" value="3" />
|
|
|
+ <el-option label="验证码可见" value="4" />
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ </el-card>
|
|
|
+ </el-dialog>
|
|
|
+ <!-- 视频预览对话框 -->
|
|
|
+ <el-dialog
|
|
|
+ title="预览视频"
|
|
|
+ append-to-body
|
|
|
+ :visible.sync="showPreviewDialog"
|
|
|
+ :before-close="handleDialogClose"
|
|
|
+ width="70%"
|
|
|
+ center
|
|
|
+ >
|
|
|
+ <template>
|
|
|
+ <video-preview-player :video-prop.sync="this.videoProp" />
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-pagination
|
|
|
+ background
|
|
|
+ :small="screenWidth <= 768"
|
|
|
+ layout="prev, pager, next"
|
|
|
+ :page-size="pageSize"
|
|
|
+ :current-page="currentPage"
|
|
|
+ :total="totalSize"
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
+ @prev-click="handleCurrentChange"
|
|
|
+ @next-click="handleCurrentChange"
|
|
|
+ />
|
|
|
+ </el-row>
|
|
|
</el-row>
|
|
|
</template>
|
|
|
|
|
|
@@ -358,7 +372,7 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
handleEdit(index, row) {
|
|
|
- const path = '/post/edit/video/' + row.videoId
|
|
|
+ const path = '/my/post/edit/video/' + row.videoId
|
|
|
this.$router.push(path)
|
|
|
},
|
|
|
handleDelete(index, row) {
|