|
@@ -64,6 +64,14 @@
|
|
|
>
|
|
>
|
|
|
<span>下载</span>
|
|
<span>下载</span>
|
|
|
</el-button>
|
|
</el-button>
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ type="danger"
|
|
|
|
|
+ size="mini"
|
|
|
|
|
+ icon="el-icon-delete"
|
|
|
|
|
+ @click="deleteVideo(video)"
|
|
|
|
|
+ >
|
|
|
|
|
+ <span>删除</span>
|
|
|
|
|
+ </el-button>
|
|
|
<el-button
|
|
<el-button
|
|
|
type="danger"
|
|
type="danger"
|
|
|
size="mini"
|
|
size="mini"
|
|
@@ -241,11 +249,12 @@ import SideVideoCard from 'components/card/SideVideoCard'
|
|
|
import UserAvatarCard from '@/components/card/UserAvatarCard'
|
|
import UserAvatarCard from '@/components/card/UserAvatarCard'
|
|
|
import comment from '@/components/comment'
|
|
import comment from '@/components/comment'
|
|
|
|
|
|
|
|
-import { similarVideo, videoInfo, videoErrorReport, downloadVideo, getShortUrl } from '@/api/video'
|
|
|
|
|
|
|
+import {similarVideo, videoInfo, videoErrorReport, downloadVideo, getShortUrl, videoErrorDelete} from '@/api/video'
|
|
|
import { collectItem, createAlbum, getUserPlaylist } from '@/api/collect'
|
|
import { collectItem, createAlbum, getUserPlaylist } from '@/api/collect'
|
|
|
import { getUserInfo } from '@/api/user'
|
|
import { getUserInfo } from '@/api/user'
|
|
|
import { publishComment, getComment } from '@/api/comment'
|
|
import { publishComment, getComment } from '@/api/comment'
|
|
|
import { getAuthedUser } from '@/utils/auth'
|
|
import { getAuthedUser } from '@/utils/auth'
|
|
|
|
|
+import {deletePaper} from "@/api/exam";
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
name: 'VideoPage',
|
|
name: 'VideoPage',
|
|
@@ -551,6 +560,50 @@ export default {
|
|
|
})
|
|
})
|
|
|
this.albumForm.albumName = null
|
|
this.albumForm.albumName = null
|
|
|
},
|
|
},
|
|
|
|
|
+ deleteVideo(video) {
|
|
|
|
|
+ this.$confirm('确定要删除 ' + video.title + '?', '提示', {
|
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
|
+ type: 'warning'
|
|
|
|
|
+ }).then(() => {
|
|
|
|
|
+ const videoId = video.videoId
|
|
|
|
|
+ const errorReportForm = {
|
|
|
|
|
+ videoId: videoId,
|
|
|
|
|
+ errorCode: 4
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ videoErrorDelete(errorReportForm).then(resp => {
|
|
|
|
|
+ if (resp.code === 0) {
|
|
|
|
|
+ this.errorReportForm.errorCode = null
|
|
|
|
|
+ this.$notify({
|
|
|
|
|
+ title: '提示',
|
|
|
|
|
+ message: '视频错误已提交',
|
|
|
|
|
+ type: 'warning',
|
|
|
|
|
+ duration: 3000
|
|
|
|
|
+ })
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$notify({
|
|
|
|
|
+ title: '提示',
|
|
|
|
|
+ message: resp.msg,
|
|
|
|
|
+ type: 'warning',
|
|
|
|
|
+ duration: 3000
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ }).catch(error => {
|
|
|
|
|
+ this.$notify({
|
|
|
|
|
+ title: '提示',
|
|
|
|
|
+ message: error.message,
|
|
|
|
|
+ type: 'warning',
|
|
|
|
|
+ duration: 3000
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+ }).catch(() => {
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ type: 'info',
|
|
|
|
|
+ message: '已取消'
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
displayErrorReportDialog() {
|
|
displayErrorReportDialog() {
|
|
|
this.errorReportForm.videoId = this.video.videoId
|
|
this.errorReportForm.videoId = this.video.videoId
|
|
|
this.showErrorReportDialog = true
|
|
this.showErrorReportDialog = true
|