|
|
@@ -1,196 +1,249 @@
|
|
|
<template>
|
|
|
- <div>
|
|
|
- <el-row>
|
|
|
- <el-col :md="4">
|
|
|
- <el-menu
|
|
|
- :default-active="this.$route.path"
|
|
|
- router
|
|
|
- class="el-menu-vertical-demo"
|
|
|
- >
|
|
|
- <el-menu-item v-for="(item,i) in navList" :key="i" :index="item.path">
|
|
|
- <i :class="item.icon" />
|
|
|
- <span slot="title">{{ item.name }}</span>
|
|
|
- </el-menu-item>
|
|
|
- </el-menu>
|
|
|
- </el-col>
|
|
|
- <el-col :md="20">
|
|
|
- <el-tabs v-model="activeName" @tab-click='tabClick'>
|
|
|
- <el-tab-pane label="视频" name="video">
|
|
|
- <el-row :md="6" :sm="12" :xs="12">
|
|
|
- <el-table
|
|
|
- :data="dataList"
|
|
|
- style="width: 100%"
|
|
|
- >
|
|
|
- <el-table-column
|
|
|
- type="index">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="coverUrl"
|
|
|
- label="视频封面"
|
|
|
- width="150">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-image :src="scope.row.coverUrl" min-width="40" height="30" />
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="pubDate"
|
|
|
- label="发布时间">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="horizontal"
|
|
|
- label="横屏">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-tag v-if="scope.row.horizontal" :type="'success'" disable-transitions>
|
|
|
- 横屏
|
|
|
- </el-tag>
|
|
|
- <el-tag v-else :type="'warning'" disable-transitions>
|
|
|
- 竖屏
|
|
|
- </el-tag>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="title"
|
|
|
- label="标题"
|
|
|
- width="180">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="description"
|
|
|
- label="描述">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="scope"
|
|
|
- label="审核状态">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-tag v-if="scope.row.viewCount === 1" :type="'success'" disable-transitions>
|
|
|
- {{scope.row.viewCount}}
|
|
|
- </el-tag>
|
|
|
- <el-tag v-else-if="scope.row.viewCount === 2" :type="'warning'" disable-transitions>
|
|
|
- {{scope.row.viewCount}}
|
|
|
- </el-tag>
|
|
|
- <el-tag v-else :type="'danger'" disable-transitions>
|
|
|
- {{scope.row.viewCount}}
|
|
|
- </el-tag>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="scope"
|
|
|
- label="可见范围">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-tag v-if="scope.row.viewCount === 1" disable-transitions>
|
|
|
- 全部可见
|
|
|
- </el-tag>
|
|
|
- <el-tag v-else-if="scope.row.viewCount === 2" :type="'success'" disable-transitions>
|
|
|
- VIP 可见
|
|
|
- </el-tag>
|
|
|
- <el-tag v-else-if="scope.row.viewCount === 3" :type="'warning'" disable-transitions>
|
|
|
- 验证码可见
|
|
|
- </el-tag>
|
|
|
- <el-tag v-else :type="'danger'" disable-transitions>
|
|
|
- 本人可见
|
|
|
- </el-tag>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="操作">
|
|
|
- <template slot-scope="scope">
|
|
|
- <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-row>
|
|
|
- </el-tab-pane>
|
|
|
- <el-tab-pane label="图片" name="image">
|
|
|
- <el-row :md="6" :sm="12" :xs="12">
|
|
|
- <el-table
|
|
|
- :data="dataList"
|
|
|
- style="width: 100%"
|
|
|
- >
|
|
|
- <el-table-column
|
|
|
- type="index">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="coverUrl"
|
|
|
- label="相册封面"
|
|
|
- width="150">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-image :src="scope.row.coverUrl" min-width="40" height="30" />
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="pubDate"
|
|
|
- label="发布时间">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="albumName"
|
|
|
- label="相册名字"
|
|
|
- width="180">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="total"
|
|
|
- label="图片数量">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="scope"
|
|
|
- label="可见范围">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-tag v-if="scope.row.viewCount === 1" disable-transitions>
|
|
|
- 全部可见
|
|
|
- </el-tag>
|
|
|
- <el-tag v-else-if="scope.row.viewCount === 2" :type="'success'" disable-transitions>
|
|
|
- VIP 可见
|
|
|
- </el-tag>
|
|
|
- <el-tag v-else-if="scope.row.viewCount === 3" :type="'warning'" disable-transitions>
|
|
|
- 验证码可见
|
|
|
- </el-tag>
|
|
|
- <el-tag v-else :type="'danger'" disable-transitions>
|
|
|
- 本人可见
|
|
|
- </el-tag>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="操作">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-button
|
|
|
- size="mini"
|
|
|
- @click="handleEditImage(scope.$index, scope.row)">编辑</el-button>
|
|
|
- <el-button
|
|
|
- size="mini"
|
|
|
- type="danger"
|
|
|
- @click="handleDeleteImage(scope.$index, scope.row)">删除</el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- </el-row>
|
|
|
- </el-tab-pane>
|
|
|
- <el-tab-pane label="音频" name="audio">
|
|
|
- <span>
|
|
|
- <h4>音频稿件</h4>
|
|
|
- </span>
|
|
|
- </el-tab-pane>
|
|
|
- <el-tab-pane label="文章" name="article">
|
|
|
+ <el-row>
|
|
|
+ <el-col :md="2">
|
|
|
+ <el-menu
|
|
|
+ :default-active="this.$route.path"
|
|
|
+ router
|
|
|
+ class="el-menu-vertical-demo"
|
|
|
+ >
|
|
|
+ <el-menu-item v-for="(item,i) in navList" :key="i" :index="item.path">
|
|
|
+ <i :class="item.icon" />
|
|
|
+ <span slot="title">{{ item.name }}</span>
|
|
|
+ </el-menu-item>
|
|
|
+ </el-menu>
|
|
|
+ </el-col>
|
|
|
+ <el-col :md="22">
|
|
|
+ <el-tabs v-model="activeName" @tab-click='tabClick'>
|
|
|
+ <el-tab-pane label="视频" name="video">
|
|
|
+ <el-row :md="6" :sm="12" :xs="12">
|
|
|
+ <el-table
|
|
|
+ :data="dataList"
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
+ <el-table-column
|
|
|
+ type="index">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="coverUrl"
|
|
|
+ label="视频封面"
|
|
|
+ width="150">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-image :src="scope.row.coverUrl" min-width="40" height="30" />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="pubDate"
|
|
|
+ label="发布时间">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="horizontal"
|
|
|
+ label="横屏">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-tag v-if="scope.row.horizontal" :type="'success'" disable-transitions>
|
|
|
+ 横屏
|
|
|
+ </el-tag>
|
|
|
+ <el-tag v-else :type="'warning'" disable-transitions>
|
|
|
+ 竖屏
|
|
|
+ </el-tag>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="title"
|
|
|
+ label="标题"
|
|
|
+ width="180">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="description"
|
|
|
+ label="描述">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="scope"
|
|
|
+ label="审核状态">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-tag v-if="scope.row.viewCount === 1" :type="'success'" disable-transitions>
|
|
|
+ {{scope.row.viewCount}}
|
|
|
+ </el-tag>
|
|
|
+ <el-tag v-else-if="scope.row.viewCount === 2" :type="'warning'" disable-transitions>
|
|
|
+ {{scope.row.viewCount}}
|
|
|
+ </el-tag>
|
|
|
+ <el-tag v-else :type="'danger'" disable-transitions>
|
|
|
+ {{scope.row.viewCount}}
|
|
|
+ </el-tag>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="scope"
|
|
|
+ label="可见范围">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-tag v-if="scope.row.viewCount === 1" disable-transitions>
|
|
|
+ 全部可见
|
|
|
+ </el-tag>
|
|
|
+ <el-tag v-else-if="scope.row.viewCount === 2" :type="'success'" disable-transitions>
|
|
|
+ VIP 可见
|
|
|
+ </el-tag>
|
|
|
+ <el-tag v-else-if="scope.row.viewCount === 3" :type="'warning'" disable-transitions>
|
|
|
+ 验证码可见
|
|
|
+ </el-tag>
|
|
|
+ <el-tag v-else :type="'danger'" disable-transitions>
|
|
|
+ 本人可见
|
|
|
+ </el-tag>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <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-row>
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="相册" name="image">
|
|
|
+ <el-row :md="6" :sm="12" :xs="12">
|
|
|
+ <el-table
|
|
|
+ :data="dataList"
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
+ <el-table-column
|
|
|
+ type="index">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="coverUrl"
|
|
|
+ label="相册封面"
|
|
|
+ width="150">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-image :src="scope.row.coverUrl" min-width="40" height="30" />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="pubDate"
|
|
|
+ label="发布时间">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="albumName"
|
|
|
+ label="相册名字"
|
|
|
+ width="180">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="total"
|
|
|
+ label="图片数量">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="scope"
|
|
|
+ label="可见范围">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-tag v-if="scope.row.viewCount === 1" disable-transitions>
|
|
|
+ 全部可见
|
|
|
+ </el-tag>
|
|
|
+ <el-tag v-else-if="scope.row.viewCount === 2" :type="'success'" disable-transitions>
|
|
|
+ VIP 可见
|
|
|
+ </el-tag>
|
|
|
+ <el-tag v-else-if="scope.row.viewCount === 3" :type="'warning'" disable-transitions>
|
|
|
+ 验证码可见
|
|
|
+ </el-tag>
|
|
|
+ <el-tag v-else :type="'danger'" disable-transitions>
|
|
|
+ 本人可见
|
|
|
+ </el-tag>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ @click="handleEditImage(scope.$index, scope.row)">编辑</el-button>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="danger"
|
|
|
+ @click="handleDeleteImage(scope.$index, scope.row)">删除</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-row>
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="音频" name="audio">
|
|
|
+ <el-row :md="6" :sm="12" :xs="12">
|
|
|
+ <el-table
|
|
|
+ :data="dataList"
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
+ <el-table-column
|
|
|
+ type="index">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="coverUrl"
|
|
|
+ label="音频封面"
|
|
|
+ width="150">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-image :src="scope.row.coverUrl" min-width="40" height="30" />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="pubDate"
|
|
|
+ label="发布时间">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="title"
|
|
|
+ label="音频名字">
|
|
|
+ </el-table-column>
|
|
|
+ <!-- <el-table-column
|
|
|
+ prop="description"
|
|
|
+ label="音频简介">
|
|
|
+ </el-table-column>-->
|
|
|
+ <el-table-column
|
|
|
+ prop="scope"
|
|
|
+ label="可见范围">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-tag v-if="scope.row.viewCount === 1" disable-transitions>
|
|
|
+ 全部可见
|
|
|
+ </el-tag>
|
|
|
+ <el-tag v-else-if="scope.row.viewCount === 2" :type="'success'" disable-transitions>
|
|
|
+ VIP 可见
|
|
|
+ </el-tag>
|
|
|
+ <el-tag v-else-if="scope.row.viewCount === 3" :type="'warning'" disable-transitions>
|
|
|
+ 验证码可见
|
|
|
+ </el-tag>
|
|
|
+ <el-tag v-else :type="'danger'" disable-transitions>
|
|
|
+ 本人可见
|
|
|
+ </el-tag>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ @click="handleEditAudio(scope.$index, scope.row)">编辑</el-button>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="danger"
|
|
|
+ @click="handleDeleteAudio(scope.$index, scope.row)">删除</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-row>
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="文章" name="article">
|
|
|
<span>
|
|
|
<h4>文章稿件</h4>
|
|
|
</span>
|
|
|
- </el-tab-pane>
|
|
|
- </el-tabs>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </div>
|
|
|
+ </el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import ImageAlbumCard from '@/components/card/ImageAlbumCard'
|
|
|
-
|
|
|
import {getUserAlbums} from "@/api/image";
|
|
|
import { userVideoList } from "@/api/video";
|
|
|
+import { getUserAudio } from "@/api/audio";
|
|
|
|
|
|
export default {
|
|
|
name: 'PostList',
|
|
|
- components: { ImageAlbumCard },
|
|
|
+ components: {},
|
|
|
data() {
|
|
|
return {
|
|
|
navList: [
|
|
|
@@ -245,17 +298,17 @@ export default {
|
|
|
handleDeleteImage(index, row) {
|
|
|
console.log(row.videoId);
|
|
|
},
|
|
|
+ handleEditAudio(index, row) {
|
|
|
+ console.log(row.videoId);
|
|
|
+ const path = '/post/edit/audio/' + row.audioId
|
|
|
+ this.$router.push(path)
|
|
|
+ },
|
|
|
+ handleDeleteAudio(index, row) {
|
|
|
+ console.log(row.videoId);
|
|
|
+ },
|
|
|
tabClick(tab) {
|
|
|
this.activeName = tab.name
|
|
|
- if (this.activeName === 'video') {
|
|
|
- this.goToTab(this.activeName)
|
|
|
- } else if (this.activeName === 'image') {
|
|
|
- this.goToTab(this.activeName)
|
|
|
- } else if (this.activeName === 'audio') {
|
|
|
- this.goToTab(this.activeName)
|
|
|
- } else if (this.activeName === 'article') {
|
|
|
- this.goToTab(this.activeName)
|
|
|
- }
|
|
|
+ this.goToTab(this.activeName)
|
|
|
},
|
|
|
goToTab(activeName) {
|
|
|
const path = '/post/' + activeName
|
|
|
@@ -297,6 +350,19 @@ export default {
|
|
|
} else if (this.activeName === 'audio') {
|
|
|
this.currentPage = 1
|
|
|
this.lastId = 0
|
|
|
+ getUserAudio(this.userId).then(res => {
|
|
|
+ if (res.code === 0) {
|
|
|
+ const resData = res.data.list
|
|
|
+ if (resData.length !== 0) {
|
|
|
+ this.showEmpty = false
|
|
|
+ for (const item of resData) {
|
|
|
+ this.dataList.push(item)
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.showEmpty = true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
} else if (this.activeName === 'article') {
|
|
|
this.currentPage = 1
|
|
|
this.lastId = 0
|