|
|
@@ -46,7 +46,7 @@
|
|
|
label="描述"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
- <span v-if="scope.row.description !== null">-</span>
|
|
|
+ <span v-if="scope.row.description === null">-</span>
|
|
|
<span v-else>{{ scope.row.description }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
@@ -64,31 +64,18 @@
|
|
|
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>
|
|
|
+ <el-tag v-if="scope.row.scope === 1" :type="'warning'" disable-transitions>
|
|
|
+ 本人可见
|
|
|
+ </el-tag>
|
|
|
+ <el-tag v-else-if="scope.row.scope === 2" :type="'success'" disable-transitions>
|
|
|
+ 所有人可见
|
|
|
+ </el-tag>
|
|
|
+ <el-tag v-else-if="scope.row.scope === 3" :type="'danger'" disable-transitions>
|
|
|
+ VIP 可见
|
|
|
+ </el-tag>
|
|
|
+ <el-tag v-else :type="'danger'" disable-transitions>
|
|
|
+ 验证码可见
|
|
|
+ </el-tag>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
@@ -130,16 +117,6 @@
|
|
|
prop="duration"
|
|
|
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
|
|
|
fixed="right"
|
|
|
label="操作"
|
|
|
@@ -153,12 +130,11 @@
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
@click="handleEdit(scope.$index, scope.row)"
|
|
|
- >编辑</el-button>
|
|
|
+ >审核</el-button>
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
- type="danger"
|
|
|
- @click="handleDelete(scope.$index, scope.row)"
|
|
|
- >删除</el-button>
|
|
|
+ @click="handleVideoResource(scope.$index, scope.row)"
|
|
|
+ >资源</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
@@ -216,7 +192,7 @@
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
</el-dialog>
|
|
|
- <!-- 修改视频可见范围对话框 -->
|
|
|
+ <!-- 稿件审核对话框 -->
|
|
|
<el-dialog
|
|
|
append-to-body
|
|
|
:visible.sync="showEditScopeDialog"
|
|
|
@@ -225,11 +201,11 @@
|
|
|
>
|
|
|
<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>
|
|
|
+ <span>稿件审核</span>
|
|
|
+ <el-button style="float: right; padding: 3px 0" type="text" @click="onUpdateStatus">更新</el-button>
|
|
|
</div>
|
|
|
<div class="text item">
|
|
|
- <el-select v-model="form.scope" placeholder="选择可见范围">
|
|
|
+ <el-select v-model="form.scope" placeholder="选择审核结果">
|
|
|
<el-option label="本人可见" value="1" />
|
|
|
<el-option label="所有人可见" value="2" />
|
|
|
<el-option label="VIP 可见" value="3" />
|
|
|
@@ -248,7 +224,7 @@
|
|
|
center
|
|
|
>
|
|
|
<template>
|
|
|
- <video-preview-player :video-prop.sync="this.videoProp" />
|
|
|
+ <video-preview-player :video-prop.sync="videoProp" />
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
</el-row>
|
|
|
@@ -270,7 +246,14 @@
|
|
|
|
|
|
<script>
|
|
|
import VideoPreviewPlayer from 'components/VideoPreviewPlayer'
|
|
|
-import { updateVideoScope, videoInfo, deleteVideoPost, getVideoResource, convertVideo, getVideoPosts } from '@/api/video'
|
|
|
+import {
|
|
|
+ videoInfo,
|
|
|
+ deleteVideoPost,
|
|
|
+ getVideoResource,
|
|
|
+ convertVideo,
|
|
|
+ updateVideoStatus
|
|
|
+} from '@/api/video'
|
|
|
+import { getPostList } from '@/api/admin'
|
|
|
|
|
|
export default {
|
|
|
name: 'PostList',
|
|
|
@@ -280,7 +263,7 @@ export default {
|
|
|
// 屏幕宽度, 为了控制分页条的大小
|
|
|
screenWidth: document.body.clientWidth,
|
|
|
currentPage: 1,
|
|
|
- pageSize: 12,
|
|
|
+ pageSize: 20,
|
|
|
totalSize: 0,
|
|
|
dataList: [],
|
|
|
// **********************************************************************
|
|
|
@@ -290,7 +273,7 @@ export default {
|
|
|
showPreviewDialog: false,
|
|
|
form: {
|
|
|
videoId: null,
|
|
|
- scope: 1
|
|
|
+ scope: '1'
|
|
|
},
|
|
|
videoResources: []
|
|
|
}
|
|
|
@@ -308,7 +291,7 @@ export default {
|
|
|
},
|
|
|
getData() {
|
|
|
this.dataList = []
|
|
|
- getVideoPosts(this.currentPage).then(resp => {
|
|
|
+ getPostList(this.currentPage).then(resp => {
|
|
|
if (resp.code === 0) {
|
|
|
this.dataList = resp.data.list
|
|
|
this.totalSize = resp.data.totalSize
|
|
|
@@ -339,11 +322,6 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- handleScope(index, row) {
|
|
|
- this.form.videoId = row.videoId
|
|
|
- this.form.scope = '' + row.scope
|
|
|
- this.showEditScopeDialog = true
|
|
|
- },
|
|
|
handleDialogClose(done) {
|
|
|
this.showPreviewDialog = false
|
|
|
this.videoProp = {
|
|
|
@@ -376,8 +354,7 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
handleEdit(index, row) {
|
|
|
- const path = '/my/post/edit/video/' + row.videoId
|
|
|
- this.$router.push(path)
|
|
|
+ this.showEditScopeDialog = true
|
|
|
},
|
|
|
handleDelete(index, row) {
|
|
|
this.$confirm('确定要删除 ' + row.title + '?', '提示', {
|
|
|
@@ -403,13 +380,13 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
- onUpdateScope() {
|
|
|
+ onUpdateStatus() {
|
|
|
this.showEditScopeDialog = false
|
|
|
- updateVideoScope(this.form).then(res => {
|
|
|
+ updateVideoStatus(this.form).then(res => {
|
|
|
if (res.code === 0) {
|
|
|
this.$notify({
|
|
|
title: '提示',
|
|
|
- message: '视频可见范围已更新',
|
|
|
+ message: '稿件状态已更新',
|
|
|
type: 'warning',
|
|
|
duration: 3000
|
|
|
})
|