视频和评论列表
This commit is contained in:
parent
ea57595738
commit
7c2d364492
@ -19,6 +19,19 @@ export interface fansListVO {
|
||||
nickname: string;
|
||||
}
|
||||
|
||||
export interface QueryParamOV {
|
||||
current: number;
|
||||
size: number;
|
||||
vlogId: number | string;
|
||||
mobile: number | string;
|
||||
}
|
||||
|
||||
export interface QueryChildOV {
|
||||
current: number;
|
||||
size: number;
|
||||
fatherCommentId: number | string;
|
||||
}
|
||||
|
||||
export interface CommentsVO {
|
||||
comment_user_id: string;
|
||||
content: string;
|
||||
@ -31,10 +44,25 @@ export interface CommentsVO {
|
||||
vlog_id: string;
|
||||
vloger_id: string;
|
||||
}
|
||||
export interface LomgChildOV {
|
||||
commentId: string;
|
||||
commentUserId: string;
|
||||
content: string;
|
||||
createTime: string;
|
||||
fatherCommentId: string;
|
||||
id: string;
|
||||
replyUserFace: string;
|
||||
replyUserNickname: string;
|
||||
replyedUserNickname: string;
|
||||
vlogId: string;
|
||||
likeCounts: string | number;
|
||||
status: number;
|
||||
}
|
||||
|
||||
export interface likeVO {
|
||||
face: string;
|
||||
nickname: string;
|
||||
create_time: string;
|
||||
created_time: string;
|
||||
}
|
||||
|
||||
export interface CategoryVO {
|
||||
@ -57,11 +85,15 @@ export interface CategoryVO {
|
||||
classPath: string;
|
||||
name: string;
|
||||
category: string;
|
||||
fileId: string;
|
||||
file_id: string;
|
||||
status: string;
|
||||
commentCounts: number;
|
||||
likeCounts: number;
|
||||
fansCounts: number;
|
||||
reason: string;
|
||||
/**
|
||||
* 流程分类名称
|
||||
*/
|
||||
}
|
||||
|
||||
export interface CategoryForm extends BaseEntity {
|
||||
@ -89,10 +121,6 @@ export interface CategoryForm extends BaseEntity {
|
||||
}
|
||||
|
||||
export interface CategoryQuery {
|
||||
/**
|
||||
* 流程分类名称
|
||||
*/
|
||||
categoryName?: string;
|
||||
/**
|
||||
* 当前页
|
||||
*/
|
||||
@ -104,4 +132,65 @@ export interface CategoryQuery {
|
||||
* 查看详情id
|
||||
*/
|
||||
memberId?: string;
|
||||
/**
|
||||
* 查询手机号
|
||||
*/
|
||||
mobile?: number;
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
startTime?: string;
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
endTime?: string;
|
||||
/**
|
||||
* 视频审核状态
|
||||
*/
|
||||
status?: string;
|
||||
/**
|
||||
* 视频id
|
||||
*/
|
||||
vlogId?: string;
|
||||
/**
|
||||
*根据谁排序
|
||||
* **/
|
||||
column?: number;
|
||||
/**
|
||||
*排序方式
|
||||
* **/
|
||||
asc: string;
|
||||
}
|
||||
|
||||
export interface LomglistVO {
|
||||
//评论状态
|
||||
status: number;
|
||||
vlogUrl: string;
|
||||
// 评论ID,字符串类型
|
||||
commentId?: string;
|
||||
// 评论用户头像URL,字符串类型
|
||||
commentUserFace?: string;
|
||||
// 评论用户ID,字符串类型
|
||||
commentUserId?: string;
|
||||
// 评论用户昵称,字符串类型
|
||||
commentUserNickname?: string;
|
||||
// 评论内容,字符串类型
|
||||
content?: string;
|
||||
// 创建时间,字符串类型,可考虑转换为 Date 类型
|
||||
createTime?: string;
|
||||
// 父评论ID,字符串类型
|
||||
fatherCommentId?: string;
|
||||
// ID,字符串类型
|
||||
id?: string;
|
||||
// 是否点赞,数字类型,可作为布尔值或整数
|
||||
isLike?: number;
|
||||
// 点赞数,数字类型
|
||||
likeCounts?: number;
|
||||
// 被回复用户昵称,可能为空,类型为 string 或 null
|
||||
replyedUserNickname?: string | null;
|
||||
// 视频日志ID,字符串类型
|
||||
vlogId?: string;
|
||||
// 视频博主ID,字符串类型
|
||||
|
||||
vlogerMobile?: string | number;
|
||||
}
|
||||
|
@ -1,10 +1,16 @@
|
||||
import { CategoryForm, CategoryQuery, CategoryTreeVO, CategoryVO, Formaget } from '@/api/workflow/category/types';
|
||||
import { CategoryForm, CategoryQuery, CategoryTreeVO, CategoryVO, Formaget, QueryChildOV, QueryParamOV } from '@/api/workflow/category/types';
|
||||
|
||||
import { AxiosPromise } from 'axios';
|
||||
import request from '@/utils/request';
|
||||
|
||||
export interface QueryChildOV {
|
||||
current: number;
|
||||
size: number;
|
||||
fatherCommentId: number | string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询流程分类列表
|
||||
* 视频列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
@ -13,8 +19,8 @@ export const listCategory = (query?: CategoryQuery): AxiosPromise<CategoryVO[]>
|
||||
return request({
|
||||
// url: '/workflow/category/list',old
|
||||
url: '/admin/vlog/upload/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
method: 'post',
|
||||
data: query
|
||||
});
|
||||
};
|
||||
/**
|
||||
@ -29,6 +35,30 @@ export const updateaudit = (data?: Formaget) => {
|
||||
method: 'post'
|
||||
});
|
||||
};
|
||||
/**
|
||||
* 视频评论列表
|
||||
* @param vlogId 视频id
|
||||
* @param mobile 手机号
|
||||
*/
|
||||
export const getcommentlist = (data?: QueryParamOV) => {
|
||||
return request({
|
||||
url: `/admin/comment/list`,
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
};
|
||||
/**
|
||||
* 视频评论列表
|
||||
// * @param vlogId 视频id
|
||||
// * @param reason 反驳理由
|
||||
// * @param status 状态1:通过 2:反驳
|
||||
*/
|
||||
export const getchildList = (data?: QueryChildOV) => {
|
||||
return request({
|
||||
url: `/admin/comment/childList?fatherCommentId=${data.fatherCommentId}¤t=${data.current}&size=${data.size}`,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
/**
|
||||
* 获取去视频详情
|
||||
* @param vlogId 视频id
|
||||
@ -49,6 +79,16 @@ export const deldetail = (data?: string) => {
|
||||
method: 'post'
|
||||
});
|
||||
};
|
||||
/**
|
||||
* 上下架评论
|
||||
* @param id 评论id
|
||||
*/
|
||||
export const deloffline = (data?: string) => {
|
||||
return request({
|
||||
url: `admin/comment/offline?commentId=${data}`,
|
||||
method: 'post'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 视频通过和反驳
|
||||
|
@ -5,12 +5,22 @@ export interface CategoryTreeVO {
|
||||
weight: number;
|
||||
children: CategoryTreeVO[];
|
||||
}
|
||||
export interface QueryChildOV {
|
||||
current: number;
|
||||
size: number;
|
||||
fatherCommentId: number | string;
|
||||
}
|
||||
export interface Formaget {
|
||||
vlogId: number | string;
|
||||
reason: string;
|
||||
status: number;
|
||||
}
|
||||
|
||||
export interface QueryParamOV {
|
||||
current: number;
|
||||
size: number;
|
||||
vlogId: number | string;
|
||||
mobile: number | string;
|
||||
}
|
||||
export interface CategoryVO {
|
||||
/**
|
||||
* 流程分类ID
|
||||
@ -67,7 +77,26 @@ export interface CategoryForm extends BaseEntity {
|
||||
|
||||
export interface CategoryQuery {
|
||||
/**
|
||||
* 流程分类名称
|
||||
* 当前页
|
||||
*/
|
||||
categoryName?: string;
|
||||
current?: number /**
|
||||
* 每页页数
|
||||
*/;
|
||||
size?: number;
|
||||
/**
|
||||
* 查看详情id
|
||||
*/
|
||||
memberId?: string;
|
||||
/**
|
||||
* 查询手机号
|
||||
*/
|
||||
mobile?: number;
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
publishTimestart?: string;
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
publishTimeEnd?: string;
|
||||
}
|
||||
|
@ -220,6 +220,18 @@ export const dynamicRoutes: RouteRecordRaw[] = [
|
||||
hidden: true,
|
||||
permissions: ['system:user:edit'],
|
||||
children: [
|
||||
{
|
||||
path: 'video',
|
||||
component: () => import('@/views/contentManage/video/index.vue'),
|
||||
name: 'video',
|
||||
meta: { title: '视频列表', icon: 'dashboard', affix: true }
|
||||
},
|
||||
{
|
||||
path: 'videocomment',
|
||||
component: () => import('@/views/contentManage/videocomment/index.vue'),
|
||||
name: 'videocomment',
|
||||
meta: { title: '视频评论', icon: 'dashboard', affix: true }
|
||||
},
|
||||
{
|
||||
path: 'detail',
|
||||
component: () => import('@/views/contentManage/videodetails/index.vue'),
|
||||
|
@ -3,35 +3,49 @@
|
||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||
<div v-show="showSearch" class="search">
|
||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
||||
<el-form-item label="类型" prop="status">
|
||||
<el-select v-model="queryParams.type" placeholder="类型" clearable>
|
||||
<el-option value="1">评论</el-option>
|
||||
<el-option value="2">点赞</el-option>
|
||||
<el-form-item label="排序" prop="status">
|
||||
<el-select v-model="queryParams.column" placeholder="排序" clearable>
|
||||
<el-option label="审核状态" value="reason">审核状态</el-option>
|
||||
<el-option label="评论" value="commentCounts">评论</el-option>
|
||||
<el-option label="点赞" value="likeCounts">点赞</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="评论内容" prop="categoryName">
|
||||
<el-input v-model="queryParams.categoryName" placeholder="请输入视频名称" clearable @keyup.enter="handleQuery" />
|
||||
<el-form-item label="排序方式" prop="status">
|
||||
<el-select v-model="queryParams.asc" placeholder="排序方式" clearable>
|
||||
<el-option label="正序" value="true">正序</el-option>
|
||||
<el-option label="倒序" value="false">倒序</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号" prop="mobile">
|
||||
<el-input v-model="queryParams.mobile" placeholder="请输入手机号" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="时间" prop="publishTime">
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
@change="timefun"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="审核状态" prop="status">
|
||||
<el-select v-model="queryParams.status" placeholder="请选择审核状态" clearable>
|
||||
<el-option label="待审核" value="0"></el-option>
|
||||
<el-option label="通过" value="1"></el-option>
|
||||
<el-option label="不通过" value="2"></el-option>
|
||||
<el-option label="等待复审" value="3"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
<!-- <el-button icon="Refresh" @click="resetQuery">重置</el-button> -->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</transition>
|
||||
|
||||
<el-card shadow="never">
|
||||
<!-- <template #header>
|
||||
<el-row :gutter="10" class="mt30">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd()" v-hasPermi="['workflow:video:add']">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="info" plain icon="Sort" @click="handleToggleExpandAll">展开/折叠</el-button>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
</template> -->
|
||||
<el-table
|
||||
ref="categoryTableRef"
|
||||
v-loading="loading"
|
||||
@ -41,20 +55,25 @@
|
||||
:default-expand-all="isExpandAll"
|
||||
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
|
||||
>
|
||||
<el-table-column label="名称" prop="title" align="center" width="160" />
|
||||
<!-- <el-table-column label="文件类型" prop="type" align="center" width="160" />
|
||||
<el-table-column label="媒体类型" prop="category" align="center" width="160" /> -->
|
||||
<el-table-column label="视频id" prop="vlogId" align="center" width="100" />
|
||||
<el-table-column label="名称" prop="nickname" align="center" width="100" />
|
||||
<el-table-column label="手机号" prop="mobile" align="center" width="100" />
|
||||
<el-table-column label="审核状态" prop="reason" align="center" width="100">
|
||||
<template #default="{ row }">
|
||||
{{ row.reason == 'Illegal' ? '不通过' : row.reason }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="内容" prop="title" align="center" width="100" />
|
||||
<el-table-column label="宽" prop="width" align="center" width="100" />
|
||||
<el-table-column label="高" prop="height" align="center" width="100" />
|
||||
<el-table-column label="评论数量" prop="commentCounts" align="center" width="100" />
|
||||
<el-table-column label="点赞数量" prop="likeCounts" align="center" width="100" />
|
||||
<el-table-column label="粉丝数量" prop="fansCounts" align="center" width="100" />
|
||||
<el-table-column label="封面图片" align="center" width="200">
|
||||
<template #default="{ row }">
|
||||
<img alt="封面图片" style="max-width: 50%; max-height: 50%" :src="row.coverUrl" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="文件创建时间" align="center" prop="createTime" width="180" />
|
||||
<el-table-column label="文件更新时间" align="center" prop="updateTime" width="180" />
|
||||
<!-- <el-table-column label="文件过期时间" align="center" prop="expireTime" width="180" /> -->
|
||||
<el-table-column label="时间" align="center" prop="createTime" width="180" />
|
||||
<el-table-column label="操作" fixed="right" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-tooltip content="查看" placement="top">
|
||||
@ -67,7 +86,7 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block">
|
||||
<el-pagination @current-change="handleCurrentChange" layout="total, prev, pager, next" :total="total"> </el-pagination>
|
||||
<pagination v-if="total > 0" :total="total" v-model:page="queryParams.current" v-model:limit="queryParams.size" @pagination="getList" />
|
||||
</div>
|
||||
</el-card>
|
||||
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
||||
@ -76,66 +95,12 @@
|
||||
<source :src="object.mediaUrl" type="video/mp4" />
|
||||
您的浏览器不支持播放该视频。
|
||||
</video>
|
||||
</div>
|
||||
|
||||
<div class="video-info">
|
||||
<div @click="isstates = 1" :style="{ color: isstates == 1 ? 'red' : '' }">评论{{ object.commentCounts }}条</div>
|
||||
<div @click="isstates = 2" :style="{ color: isstates == 2 ? 'red' : '' }">点赞{{ object.likeCounts }}条</div>
|
||||
<div @click="isstates = 3" :style="{ color: isstates == 3 ? 'red' : '' }">粉丝{{ object.fansCounts }}条</div>
|
||||
</div>
|
||||
<!-- 评论列表 -->
|
||||
<div class="comment-list" v-if="isstates == 1">
|
||||
<div v-for="(item, index) in comments" :key="index" class="comment-item">
|
||||
<div class="comment-avatar">
|
||||
<el-avatar :src="item.userFace" size="40" />
|
||||
</div>
|
||||
<div class="comment-content">
|
||||
<div class="comment-header">
|
||||
<div class="comment-name">{{ item.userNickname }}</div>
|
||||
<div class="comment-time">{{ item.create_time }}</div>
|
||||
</div>
|
||||
<div class="comment-text">
|
||||
<div>{{ item.content }}</div>
|
||||
<div><el-button type="danger" width="60" @click="delshow(item.id)">删除</el-button></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 点赞列表 -->
|
||||
<div class="comment-list" v-if="isstates == 2" :style="{ width: '100%', margin: '0 auto' }">
|
||||
<div v-for="(item, index) in likedUsers" :key="index" class="comment-item">
|
||||
<div class="comment-avatar">
|
||||
<el-avatar :src="item.face" size="40" />
|
||||
</div>
|
||||
<div class="comment-content">
|
||||
<div class="comment-header">
|
||||
<div class="comment-name">{{ item.nickname }}</div>
|
||||
<div class="comment-time">{{ item.created_time }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 粉丝列表 -->
|
||||
<div class="comment-list" v-if="isstates == 3">
|
||||
<div v-for="(item, index) in fansList" :key="index" class="comment-item">
|
||||
<div class="comment-avatar">
|
||||
<el-avatar :src="item.face" size="40" />
|
||||
</div>
|
||||
<div class="comment-content">
|
||||
<div class="comment-header">
|
||||
<div class="comment-name">{{ item.nickname }}</div>
|
||||
<div class="comment-time">{{ item.createdTime }}</div>
|
||||
</div>
|
||||
<div class="comment-text">
|
||||
<div>{{ item.friend ? '互相关注' : '粉丝' }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm">通 过</el-button>
|
||||
<el-button type="danger" @click="showRefuteDialog = true">反 驳</el-button>
|
||||
<el-button v-if="object.reason != 'Illegal'" :loading="buttonLoading" type="primary" @click="submitForm">通 过</el-button>
|
||||
<el-button v-if="object.reason != 'Illegal'" type="danger" @click="showRefuteDialog = true">反 驳</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
@ -162,7 +127,6 @@ import { CategoryVO, CategoryQuery, CategoryForm, Formaget, CommentsVO, likeVO,
|
||||
// import { reactive, ref } from 'vue';
|
||||
type CategoryOption = {
|
||||
categoryId: number;
|
||||
categoryName: string;
|
||||
children?: CategoryOption[];
|
||||
};
|
||||
|
||||
@ -185,11 +149,13 @@ const isstates = ref<number>(1);
|
||||
const showRefuteDialog = ref(false);
|
||||
// 存储反驳原因
|
||||
const refuteReason = ref('');
|
||||
//时间选择器
|
||||
const dateRange = ref([]);
|
||||
// 提交反驳原因的方法
|
||||
const submitRefute = async () => {
|
||||
// 这里可以添加提交反驳原因的逻辑,例如调用 API
|
||||
console.log('提交的反驳原因:', refuteReason.value);
|
||||
const data: Formaget = { vlogId: object.value.fileId, status: 2, reason: refuteReason.value };
|
||||
const data: Formaget = { vlogId: object.value.file_id, status: 2, reason: refuteReason.value };
|
||||
const res = await updateaudit(data);
|
||||
if (res.status === 200) {
|
||||
ElMessage({
|
||||
@ -208,7 +174,6 @@ const dialog = reactive<DialogOption>({
|
||||
|
||||
const initFormData: CategoryForm = {
|
||||
categoryId: undefined,
|
||||
categoryName: '',
|
||||
parentId: undefined,
|
||||
orderNum: 0,
|
||||
type: 1
|
||||
@ -217,14 +182,18 @@ const initFormData: CategoryForm = {
|
||||
const data = reactive<PageData<CategoryForm, CategoryQuery>>({
|
||||
form: { ...initFormData },
|
||||
queryParams: {
|
||||
categoryName: undefined,
|
||||
current: 1,
|
||||
size: 20
|
||||
size: 10,
|
||||
mobile: undefined,
|
||||
startTime: undefined,
|
||||
endTime: undefined,
|
||||
status: undefined,
|
||||
asc: undefined,
|
||||
column: undefined
|
||||
},
|
||||
rules: {
|
||||
categoryId: [{ required: true, message: '流程分类ID不能为空', trigger: 'blur' }],
|
||||
parentId: [{ required: true, message: '请选择上级分类', trigger: 'change' }],
|
||||
categoryName: [{ required: true, message: '请输入分类名称', trigger: 'blur' }]
|
||||
// categoryId: [{ required: true, message: '流程分类ID不能为空', trigger: 'blur' }],
|
||||
// parentId: [{ required: true, message: '请选择上级分类', trigger: 'change' }],
|
||||
}
|
||||
});
|
||||
|
||||
@ -236,17 +205,20 @@ const getList = async () => {
|
||||
const res = await listCategory(queryParams.value);
|
||||
// const data = proxy?.handleTree<CategoryVO>(res.data, 'categoryId', 'parentId');
|
||||
if (res.status == 200) {
|
||||
categoryList.value = res.data.list;
|
||||
total.value = res.data.totalCount;
|
||||
categoryList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
loading.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
const handleCurrentChange = (val: number) => {
|
||||
console.log(`当前页: ${val}`);
|
||||
queryParams.value.pageNum = val;
|
||||
queryParams.value.current = val;
|
||||
getList();
|
||||
};
|
||||
const timefun = (val: any) => {
|
||||
queryParams.value.startTime = JSON.stringify(val[0]);
|
||||
queryParams.value.endTime = JSON.stringify(val[1]);
|
||||
};
|
||||
/** 查询流程分类下拉树结构 */
|
||||
// const getTreeselect = async () => {
|
||||
// const res = await listCategory();
|
||||
@ -272,6 +244,8 @@ const reset = () => {
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.value.current = 1; // 查询时重置为第一页
|
||||
console.log(queryParams.value);
|
||||
getList();
|
||||
};
|
||||
|
||||
|
323
src/views/contentManage/videocomment/index.vue
Normal file
323
src/views/contentManage/videocomment/index.vue
Normal file
@ -0,0 +1,323 @@
|
||||
<template>
|
||||
<div class="p-2">
|
||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||
<div v-show="showSearch" class="search">
|
||||
<el-form ref="queryFormRef" :model="queryParam" :inline="true">
|
||||
<el-form-item label="手机号" prop="mobile">
|
||||
<el-input v-model="queryParam.mobile" placeholder="请输入手机号" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="视频id" prop="mobile">
|
||||
<el-input v-model="queryParam.vlogId" placeholder="请输入视频id" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<!-- <el-button icon="Refresh" @click="resetQuery">重置</el-button> -->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</transition>
|
||||
|
||||
<el-card shadow="never">
|
||||
<el-table
|
||||
ref="categoryTableRef"
|
||||
v-loading="loading"
|
||||
:data="lomglist"
|
||||
row-key="categoryId"
|
||||
border
|
||||
:default-expand-all="isExpandAll"
|
||||
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
|
||||
>
|
||||
<el-table-column label="视频作者" prop="vlogerMobile" align="center" width="100" />
|
||||
<el-table-column label="评论id" prop="commentId" align="center" width="180" />
|
||||
<el-table-column label="评论状态" prop="status" align="center" width="100">
|
||||
<template #default="{ row }">
|
||||
{{ row.status === 0 ? '正常' : row.status === 1 ? '删除' : '违规' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="评论内容" prop="content" align="center" width="100" />
|
||||
<el-table-column label="评论条数" prop="childCount" align="center" width="100">
|
||||
<template #default="{ row }">
|
||||
<el-tooltip :content="row.childCount" placement="top">
|
||||
<el-button link type="primary" @click="handleAdd(row)" v-hasPermi="['workflow:video:add']">{{ row.childCount }}</el-button>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="时间" prop="createTime" align="center" width="100" />
|
||||
<!-- <el-table-column label="粉丝数量" prop="fansCounts" align="center" width="100" /> -->
|
||||
<el-table-column label="评论者头像" align="center" width="200">
|
||||
<template #default="{ row }">
|
||||
<img alt="评论者头像" style="max-width: 50%; max-height: 50%" :src="row.commentUserFace" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="视频" align="center" width="200">
|
||||
<template #default="{ row }">
|
||||
<!-- 假设 row 中有一个 videoUrl 属性存储视频地址 -->
|
||||
<video controls width="50%">
|
||||
<source :src="row.vlogUrl" type="video/mp4" />
|
||||
您的浏览器不支持播放该视频。
|
||||
</video>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-tooltip content="查看" placement="top">
|
||||
<el-button link type="primary" @click="handleAdd(scope.row)" v-hasPermi="['workflow:video:add']">查看</el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="删除" placement="top">
|
||||
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['workflow:video:remove']">删除</el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="下架" placement="top">
|
||||
<el-button link type="primary" @click="handledeloffline(scope.row)" v-hasPermi="['workflow:video:remove']" v-if="scope.row.status == 0"
|
||||
>下架</el-button
|
||||
>
|
||||
<el-button link type="primary" @click="handledeloffline(scope.row)" v-hasPermi="['workflow:video:remove']" v-if="scope.row.status == 2"
|
||||
>上架</el-button
|
||||
>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block">
|
||||
<pagination v-if="total > 0" :total="total" v-model:page="queryParam.current" v-model:limit="queryParam.size" @pagination="getList" />
|
||||
</div>
|
||||
</el-card>
|
||||
<!-- 二级评论 -->
|
||||
<el-dialog :title="dialog.title" v-model="dialog.visible" width="90%" append-to-body>
|
||||
<div class="video-container">
|
||||
<el-table
|
||||
ref="categoryTableRef"
|
||||
:data="lomgChildlist"
|
||||
row-key="categoryId"
|
||||
border
|
||||
:default-expand-all="isExpandAll"
|
||||
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
|
||||
>
|
||||
<el-table-column label="评论名称" prop="replyUserNickname" align="center" width="100" />
|
||||
<el-table-column label="评论内容" prop="content" align="center" width="100" />
|
||||
<el-table-column label="点赞数量" prop="likeCounts" align="center" width="100" />
|
||||
<el-table-column label="评论状态" prop="status" align="center" width="100">
|
||||
<template #default="{ row }">
|
||||
{{ row.status === 0 ? '正常' : row.status === 1 ? '删除' : '违规' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="评论者头像" align="center" width="200">
|
||||
<template #default="{ row }">
|
||||
<img alt="评论者头像" style="max-width: 50%; max-height: 50%" :src="row.replyUserFace" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<!-- <el-tooltip content="查看" placement="top">
|
||||
<el-button link type="primary" @click="handleAdd(scope.row)" v-hasPermi="['workflow:video:add']">查看</el-button>
|
||||
</el-tooltip> -->
|
||||
<el-tooltip content="删除" placement="top">
|
||||
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['workflow:video:remove']">删除</el-button>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block">
|
||||
<pagination
|
||||
v-if="totlelChild > 0"
|
||||
:total="totlelChild"
|
||||
v-model:page="queryChild.current"
|
||||
v-model:limit="queryChild.size"
|
||||
@pagination="getChildList"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="Category" lang="ts">
|
||||
import { getcommentlist, getchildList, deldetail, deloffline } from '@/api/workflow/category';
|
||||
import { QueryParamOV, LomglistVO, QueryChildOV, LomgChildOV } from '@/api/contentCenter/types';
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
|
||||
const lomglist = ref<LomglistVO[]>([]);
|
||||
const showSearch = ref(true);
|
||||
const isExpandAll = ref(true);
|
||||
const loading = ref(false);
|
||||
const queryFormRef = ref<ElFormInstance>();
|
||||
const categoryTableRef = ref<ElTableInstance>();
|
||||
const total = ref<number>(0);
|
||||
|
||||
const dialog = reactive<DialogOption>({
|
||||
visible: false,
|
||||
title: ''
|
||||
});
|
||||
|
||||
const queryParam = ref<QueryParamOV>({
|
||||
current: 1,
|
||||
size: 10,
|
||||
vlogId: undefined,
|
||||
mobile: undefined
|
||||
});
|
||||
|
||||
/** 查询流程分类列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
const res = await getcommentlist(queryParam.value);
|
||||
if (res.code == 200) {
|
||||
lomglist.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
loading.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
const handleCurrentChange = (val: number) => {
|
||||
queryParam.value.current = val;
|
||||
getList();
|
||||
};
|
||||
// 取消按钮
|
||||
const cancel = () => {
|
||||
dialog.visible = false;
|
||||
};
|
||||
|
||||
// 表单重置
|
||||
// const reset = () => {
|
||||
// form.value = { ...initFormData };
|
||||
// categoryFormRef.value?.resetFields();
|
||||
// };
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParam.value.current = 1; // 查询时重置为第一页
|
||||
console.log(queryParam.value);
|
||||
getList();
|
||||
};
|
||||
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
queryFormRef.value?.resetFields();
|
||||
handleQuery();
|
||||
};
|
||||
const queryChild = ref<QueryChildOV>({
|
||||
current: 1,
|
||||
size: 10,
|
||||
fatherCommentId: undefined
|
||||
});
|
||||
const lomgChildlist = ref<LomgChildOV[]>([]);
|
||||
const totlelChild = ref<number>(0);
|
||||
/** 查看详情按钮操作 */
|
||||
const handleAdd = async (row?: LomglistVO) => {
|
||||
dialog.title = '查看详情';
|
||||
dialog.visible = true;
|
||||
queryChild.value.fatherCommentId = row?.id;
|
||||
getChildList();
|
||||
};
|
||||
const getChildList = async () => {
|
||||
const res = await getchildList(queryChild.value);
|
||||
console.log(res);
|
||||
if (res.code == 200) {
|
||||
lomgChildlist.value = res.data.records;
|
||||
totlelChild.value = res.data.total;
|
||||
// loading.value = false;
|
||||
}
|
||||
};
|
||||
const handleDelete = async (row?: LomglistVO) => {
|
||||
ElMessageBox.confirm('是否确认删除', '警告', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
const res = await deldetail(row.id);
|
||||
if (res.status == 200) {
|
||||
getList();
|
||||
dialog.visible = false;
|
||||
ElMessage({
|
||||
message: '删除成功',
|
||||
type: 'success'
|
||||
});
|
||||
getList();
|
||||
} else {
|
||||
ElMessage({
|
||||
message: res.msg,
|
||||
type: 'error'
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
const handledeloffline = async (row?: LomglistVO) => {
|
||||
ElMessageBox.confirm('是否确认上下架', '警告', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
const res = await deloffline(row.id);
|
||||
if (res.status == 200) {
|
||||
getList();
|
||||
ElMessage({
|
||||
message: res.msg,
|
||||
type: 'success'
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.video-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.video-container .video {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
.video-info {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
margin-top: 10px;
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
& > div {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
.comment-list {
|
||||
width: 100%;
|
||||
}
|
||||
.comment-item {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
.comment-avatar {
|
||||
padding: 10px;
|
||||
}
|
||||
.comment-content {
|
||||
padding: 10px;
|
||||
width: 100%;
|
||||
.comment-header {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.comment-name {
|
||||
color: rgb(145, 145, 145);
|
||||
}
|
||||
}
|
||||
|
||||
.comment-text {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
justify-content: space-between;
|
||||
.el-button {
|
||||
width: 50px;
|
||||
height: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -41,19 +41,28 @@
|
||||
:default-expand-all="isExpandAll"
|
||||
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
|
||||
>
|
||||
<el-table-column label="名称" prop="title" align="center" width="160" />
|
||||
<el-table-column label="名称" prop="nickname" align="center" width="100" />
|
||||
<el-table-column label="手机号" prop="mobile" align="center" width="100" />
|
||||
<!-- <el-table-column label="状态" prop="status" align="center" width="100"> -->
|
||||
<!-- <template #default="{ row }">
|
||||
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="内容" prop="title" align="center" width="100" />
|
||||
<el-table-column label="宽" prop="width" align="center" width="100" />
|
||||
<el-table-column label="高" prop="height" align="center" width="100" />
|
||||
<!-- <el-table-column label="文件类型" prop="type" align="center" width="160" />
|
||||
<el-table-column label="媒体类型" prop="category" align="center" width="160" /> -->
|
||||
<el-table-column label="评论数量" prop="commentCounts" align="center" width="100" />
|
||||
<el-table-column label="点赞数量" prop="likeCounts" align="center" width="100" />
|
||||
<el-table-column label="粉丝数量" prop="fansCounts" align="center" width="100" />
|
||||
<el-table-column label="评论数量" sortable prop="commentCounts" align="center" width="100" />
|
||||
<el-table-column label="点赞数量" sortable prop="likeCounts" align="center" width="100" />
|
||||
<!-- <el-table-column label="粉丝数量" prop="fansCounts" align="center" width="100" /> -->
|
||||
<el-table-column label="封面图片" align="center" width="200">
|
||||
<template #default="{ row }">
|
||||
<img alt="封面图片" style="max-width: 50%; max-height: 50%" :src="row.coverUrl" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="文件创建时间" align="center" prop="createTime" width="180" />
|
||||
<el-table-column label="文件更新时间" align="center" prop="updateTime" width="180" />
|
||||
<!-- <el-table-column label="文件创建时间" align="center" prop="createTime" width="180" />
|
||||
<el-table-column label="文件更新时间" align="center" prop="updateTime" width="180" /> -->
|
||||
<!-- <el-table-column label="文件过期时间" align="center" prop="expireTime" width="180" /> -->
|
||||
<el-table-column label="操作" fixed="right" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
@ -76,61 +85,6 @@
|
||||
<source :src="object.mediaUrl" type="video/mp4" />
|
||||
您的浏览器不支持播放该视频。
|
||||
</video>
|
||||
|
||||
<div class="video-info">
|
||||
<div @click="isstates = 1" :style="{ color: isstates == 1 ? 'red' : '' }">评论{{ object.commentCounts }}条</div>
|
||||
<div @click="isstates = 2" :style="{ color: isstates == 2 ? 'red' : '' }">点赞{{ object.likeCounts }}条</div>
|
||||
<div @click="isstates = 3" :style="{ color: isstates == 3 ? 'red' : '' }">粉丝{{ object.fansCounts }}条</div>
|
||||
</div>
|
||||
<!-- 评论列表 -->
|
||||
<div class="comment-list" v-if="isstates == 1">
|
||||
<div v-for="(item, index) in comments" :key="index" class="comment-item">
|
||||
<div class="comment-avatar">
|
||||
<el-avatar :src="item.userFace" size="40" />
|
||||
</div>
|
||||
<div class="comment-content">
|
||||
<div class="comment-header">
|
||||
<div class="comment-name">{{ item.userNickname }}</div>
|
||||
<div class="comment-time">{{ item.create_time }}</div>
|
||||
</div>
|
||||
<div class="comment-text">
|
||||
<div>{{ item.content }}</div>
|
||||
<div><el-button type="danger" width="60" @click="delshow(item.id)">删除</el-button></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 点赞列表 -->
|
||||
<div class="comment-list" v-if="isstates == 2" :style="{ width: '100%', margin: '0 auto' }">
|
||||
<div v-for="(item, index) in likedUsers" :key="index" class="comment-item">
|
||||
<div class="comment-avatar">
|
||||
<el-avatar :src="item.face" size="40" />
|
||||
</div>
|
||||
<div class="comment-content">
|
||||
<div class="comment-header">
|
||||
<div class="comment-name">{{ item.nickname }}</div>
|
||||
<div class="comment-time">{{ item.created_time }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 粉丝列表 -->
|
||||
<div class="comment-list" v-if="isstates == 3">
|
||||
<div v-for="(item, index) in fansList" :key="index" class="comment-item">
|
||||
<div class="comment-avatar">
|
||||
<el-avatar :src="item.face" size="40" />
|
||||
</div>
|
||||
<div class="comment-content">
|
||||
<div class="comment-header">
|
||||
<div class="comment-name">{{ item.nickname }}</div>
|
||||
<div class="comment-time">{{ item.createdTime }}</div>
|
||||
</div>
|
||||
<div class="comment-text">
|
||||
<div>{{ item.friend ? '互相关注' : '粉丝' }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
@ -225,15 +179,15 @@ const getList = async () => {
|
||||
const res = await listCategory(queryParams.value);
|
||||
// const data = proxy?.handleTree<CategoryVO>(res.data, 'categoryId', 'parentId');
|
||||
if (res.status == 200) {
|
||||
categoryList.value = res.data.list;
|
||||
total.value = res.data.totalCount;
|
||||
categoryList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
loading.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
const handleCurrentChange = (val: number) => {
|
||||
console.log(`当前页: ${val}`);
|
||||
queryParams.value.pageNum = val;
|
||||
queryParams.value.current = val;
|
||||
getList();
|
||||
};
|
||||
/** 查询流程分类下拉树结构 */
|
||||
|
@ -79,7 +79,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" class-name="small-padding fixed-width" fix="right" width="200">
|
||||
<template v-slot="scope">
|
||||
<el-button size="small" type="text" @click="showStatistics(scope.row.id)" v-hasPermi="['ums:member:statistics']">查看数据 </el-button>
|
||||
<el-button size="small" type="text" @click="showStatistics(scope.row.id)" v-hasPermi="['ums:member:statistics']">查看视频 </el-button>
|
||||
<el-button size="small" type="text" @click="goOrder(scope.row.phoneEncrypted)">查看下单</el-button>
|
||||
<el-button size="small" type="text" @click="goCart(scope.row.phoneEncrypted)">查看购物车</el-button>
|
||||
</template>
|
||||
|
@ -81,7 +81,7 @@
|
||||
<!-- </el-table-column>-->
|
||||
</el-table>
|
||||
|
||||
<pagination :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
<pagination v-if="total" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -57,7 +57,7 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
<pagination v-if="total" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user