|
@@ -89,7 +89,7 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="视频分类" align="center" prop="teachingVideoTypeName" :show-overflow-tooltip="true" />
|
|
|
<el-table-column label="视频顺序" align="center" prop="sort" :show-overflow-tooltip="true" />
|
|
|
- <el-table-column label="播放权限" align="center" prop="permission" :show-overflow-tooltip="true" />
|
|
|
+ <el-table-column label="播放权限" align="center" prop="permission" :show-overflow-tooltip="true" :formatter="permissionFormatter" />
|
|
|
<el-table-column label="上架状态" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
<el-switch v-model="scope.row.shelfStatus" :active-value="0" :inactive-value="1" @change="handleStatusChange(scope.row)"></el-switch>
|
|
@@ -279,6 +279,10 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
methods: {
|
|
|
+ permissionFormatter: (row) => {
|
|
|
+ const permissionMap = new Map([[0, '正常'], [(1, '播放15秒')], [(2, '无法播放')]])
|
|
|
+ return permissionMap.get(row.permission)
|
|
|
+ },
|
|
|
/**视频预览 */
|
|
|
videoPreview: VideoPreview,
|
|
|
//上传视频
|
|
@@ -437,6 +441,7 @@ export default {
|
|
|
videoDescribe: this.form.videoDescribe,
|
|
|
videoFileId: this.form.vodVideoFileId,
|
|
|
coverFileId: this.form.coverFileId,
|
|
|
+ permission: this.form.permission,
|
|
|
}
|
|
|
updateUser(data).then((response) => {
|
|
|
this.msgSuccess('修改成功')
|
|
@@ -452,6 +457,7 @@ export default {
|
|
|
videoDescribe: this.form.videoDescribe,
|
|
|
videoFileId: this.form.vodVideoFileId,
|
|
|
coverFileId: this.form.coverFileId,
|
|
|
+ permission: this.form.permission,
|
|
|
}
|
|
|
addUser(data).then((response) => {
|
|
|
this.msgSuccess('新增成功')
|