视频和评论列表

This commit is contained in:
BabyBoy 2025-06-13 17:22:10 +08:00
parent ea57595738
commit 7c2d364492
10 changed files with 596 additions and 175 deletions

View File

@ -19,6 +19,19 @@ export interface fansListVO {
nickname: string; 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 { export interface CommentsVO {
comment_user_id: string; comment_user_id: string;
content: string; content: string;
@ -31,10 +44,25 @@ export interface CommentsVO {
vlog_id: string; vlog_id: string;
vloger_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 { export interface likeVO {
face: string; face: string;
nickname: string; nickname: string;
create_time: string; created_time: string;
} }
export interface CategoryVO { export interface CategoryVO {
@ -57,11 +85,15 @@ export interface CategoryVO {
classPath: string; classPath: string;
name: string; name: string;
category: string; category: string;
fileId: string; file_id: string;
status: string; status: string;
commentCounts: number; commentCounts: number;
likeCounts: number; likeCounts: number;
fansCounts: number; fansCounts: number;
reason: string;
/**
*
*/
} }
export interface CategoryForm extends BaseEntity { export interface CategoryForm extends BaseEntity {
@ -89,10 +121,6 @@ export interface CategoryForm extends BaseEntity {
} }
export interface CategoryQuery { export interface CategoryQuery {
/**
*
*/
categoryName?: string;
/** /**
* *
*/ */
@ -104,4 +132,65 @@ export interface CategoryQuery {
* id * id
*/ */
memberId?: string; 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;
} }

View File

@ -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 { AxiosPromise } from 'axios';
import request from '@/utils/request'; import request from '@/utils/request';
export interface QueryChildOV {
current: number;
size: number;
fatherCommentId: number | string;
}
/** /**
* *
* @param query * @param query
* @returns {*} * @returns {*}
*/ */
@ -13,8 +19,8 @@ export const listCategory = (query?: CategoryQuery): AxiosPromise<CategoryVO[]>
return request({ return request({
// url: '/workflow/category/list',old // url: '/workflow/category/list',old
url: '/admin/vlog/upload/list', url: '/admin/vlog/upload/list',
method: 'get', method: 'post',
params: query data: query
}); });
}; };
/** /**
@ -29,6 +35,30 @@ export const updateaudit = (data?: Formaget) => {
method: 'post' 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}&current=${data.current}&size=${data.size}`,
method: 'get'
});
};
/** /**
* *
* @param vlogId id * @param vlogId id
@ -49,6 +79,16 @@ export const deldetail = (data?: string) => {
method: 'post' method: 'post'
}); });
}; };
/**
*
* @param id id
*/
export const deloffline = (data?: string) => {
return request({
url: `admin/comment/offline?commentId=${data}`,
method: 'post'
});
};
/** /**
* *

View File

@ -5,12 +5,22 @@ export interface CategoryTreeVO {
weight: number; weight: number;
children: CategoryTreeVO[]; children: CategoryTreeVO[];
} }
export interface QueryChildOV {
current: number;
size: number;
fatherCommentId: number | string;
}
export interface Formaget { export interface Formaget {
vlogId: number | string; vlogId: number | string;
reason: string; reason: string;
status: number; status: number;
} }
export interface QueryParamOV {
current: number;
size: number;
vlogId: number | string;
mobile: number | string;
}
export interface CategoryVO { export interface CategoryVO {
/** /**
* ID * ID
@ -67,7 +77,26 @@ export interface CategoryForm extends BaseEntity {
export interface CategoryQuery { export interface CategoryQuery {
/** /**
* *
*/ */
categoryName?: string; current?: number /**
*
*/;
size?: number;
/**
* id
*/
memberId?: string;
/**
*
*/
mobile?: number;
/**
*
*/
publishTimestart?: string;
/**
*
*/
publishTimeEnd?: string;
} }

View File

@ -220,6 +220,18 @@ export const dynamicRoutes: RouteRecordRaw[] = [
hidden: true, hidden: true,
permissions: ['system:user:edit'], permissions: ['system:user:edit'],
children: [ 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', path: 'detail',
component: () => import('@/views/contentManage/videodetails/index.vue'), component: () => import('@/views/contentManage/videodetails/index.vue'),

View File

@ -3,35 +3,49 @@
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave"> <transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="search"> <div v-show="showSearch" class="search">
<el-form ref="queryFormRef" :model="queryParams" :inline="true"> <el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form-item label="类型" prop="status"> <el-form-item label="排序" prop="status">
<el-select v-model="queryParams.type" placeholder="类型" clearable> <el-select v-model="queryParams.column" placeholder="排序" clearable>
<el-option value="1">评论</el-option> <el-option label="审核状态" value="reason">审核状态</el-option>
<el-option value="2">点赞</el-option> <el-option label="评论" value="commentCounts">评论</el-option>
<el-option label="点赞" value="likeCounts">点赞</el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="评论内容" prop="categoryName"> <el-form-item label="排序方式" prop="status">
<el-input v-model="queryParams.categoryName" placeholder="请输入视频名称" clearable @keyup.enter="handleQuery" /> <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-form-item> <el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button> <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-item>
</el-form> </el-form>
</div> </div>
</transition> </transition>
<el-card shadow="never"> <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 <el-table
ref="categoryTableRef" ref="categoryTableRef"
v-loading="loading" v-loading="loading"
@ -41,20 +55,25 @@
:default-expand-all="isExpandAll" :default-expand-all="isExpandAll"
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }" :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
> >
<el-table-column label="名称" prop="title" align="center" width="160" /> <el-table-column label="视频id" prop="vlogId" align="center" width="100" />
<!-- <el-table-column label="文件类型" prop="type" align="center" width="160" /> <el-table-column label="名称" prop="nickname" align="center" width="100" />
<el-table-column label="媒体类型" prop="category" align="center" width="160" /> --> <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="commentCounts" align="center" width="100" />
<el-table-column label="点赞数量" prop="likeCounts" 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"> <el-table-column label="封面图片" align="center" width="200">
<template #default="{ row }"> <template #default="{ row }">
<img alt="封面图片" style="max-width: 50%; max-height: 50%" :src="row.coverUrl" /> <img alt="封面图片" style="max-width: 50%; max-height: 50%" :src="row.coverUrl" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="文件创建时间" align="center" prop="createTime" 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"> <el-table-column label="操作" fixed="right" align="center" class-name="small-padding fixed-width">
<template #default="scope"> <template #default="scope">
<el-tooltip content="查看" placement="top"> <el-tooltip content="查看" placement="top">
@ -67,7 +86,7 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="block"> <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> </div>
</el-card> </el-card>
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body> <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" /> <source :src="object.mediaUrl" type="video/mp4" />
您的浏览器不支持播放该视频 您的浏览器不支持播放该视频
</video> </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> <template #footer>
<div class="dialog-footer"> <div class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm"> </el-button> <el-button v-if="object.reason != 'Illegal'" :loading="buttonLoading" type="primary" @click="submitForm"> </el-button>
<el-button type="danger" @click="showRefuteDialog = true"> </el-button> <el-button v-if="object.reason != 'Illegal'" type="danger" @click="showRefuteDialog = true"> </el-button>
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
</div> </div>
</template> </template>
@ -162,7 +127,6 @@ import { CategoryVO, CategoryQuery, CategoryForm, Formaget, CommentsVO, likeVO,
// import { reactive, ref } from 'vue'; // import { reactive, ref } from 'vue';
type CategoryOption = { type CategoryOption = {
categoryId: number; categoryId: number;
categoryName: string;
children?: CategoryOption[]; children?: CategoryOption[];
}; };
@ -185,11 +149,13 @@ const isstates = ref<number>(1);
const showRefuteDialog = ref(false); const showRefuteDialog = ref(false);
// //
const refuteReason = ref(''); const refuteReason = ref('');
//
const dateRange = ref([]);
// //
const submitRefute = async () => { const submitRefute = async () => {
// API // API
console.log('提交的反驳原因:', refuteReason.value); 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); const res = await updateaudit(data);
if (res.status === 200) { if (res.status === 200) {
ElMessage({ ElMessage({
@ -208,7 +174,6 @@ const dialog = reactive<DialogOption>({
const initFormData: CategoryForm = { const initFormData: CategoryForm = {
categoryId: undefined, categoryId: undefined,
categoryName: '',
parentId: undefined, parentId: undefined,
orderNum: 0, orderNum: 0,
type: 1 type: 1
@ -217,14 +182,18 @@ const initFormData: CategoryForm = {
const data = reactive<PageData<CategoryForm, CategoryQuery>>({ const data = reactive<PageData<CategoryForm, CategoryQuery>>({
form: { ...initFormData }, form: { ...initFormData },
queryParams: { queryParams: {
categoryName: undefined,
current: 1, current: 1,
size: 20 size: 10,
mobile: undefined,
startTime: undefined,
endTime: undefined,
status: undefined,
asc: undefined,
column: undefined
}, },
rules: { rules: {
categoryId: [{ required: true, message: '流程分类ID不能为空', trigger: 'blur' }], // categoryId: [{ required: true, message: 'ID', trigger: 'blur' }],
parentId: [{ required: true, message: '请选择上级分类', trigger: 'change' }], // parentId: [{ required: true, message: '', trigger: 'change' }],
categoryName: [{ required: true, message: '请输入分类名称', trigger: 'blur' }]
} }
}); });
@ -236,17 +205,20 @@ const getList = async () => {
const res = await listCategory(queryParams.value); const res = await listCategory(queryParams.value);
// const data = proxy?.handleTree<CategoryVO>(res.data, 'categoryId', 'parentId'); // const data = proxy?.handleTree<CategoryVO>(res.data, 'categoryId', 'parentId');
if (res.status == 200) { if (res.status == 200) {
categoryList.value = res.data.list; categoryList.value = res.data.records;
total.value = res.data.totalCount; total.value = res.data.total;
loading.value = false; loading.value = false;
} }
}; };
const handleCurrentChange = (val: number) => { const handleCurrentChange = (val: number) => {
console.log(`当前页: ${val}`); queryParams.value.current = val;
queryParams.value.pageNum = val;
getList(); getList();
}; };
const timefun = (val: any) => {
queryParams.value.startTime = JSON.stringify(val[0]);
queryParams.value.endTime = JSON.stringify(val[1]);
};
/** 查询流程分类下拉树结构 */ /** 查询流程分类下拉树结构 */
// const getTreeselect = async () => { // const getTreeselect = async () => {
// const res = await listCategory(); // const res = await listCategory();
@ -272,6 +244,8 @@ const reset = () => {
/** 搜索按钮操作 */ /** 搜索按钮操作 */
const handleQuery = () => { const handleQuery = () => {
queryParams.value.current = 1; //
console.log(queryParams.value);
getList(); getList();
}; };

View 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>

View File

@ -41,19 +41,28 @@
:default-expand-all="isExpandAll" :default-expand-all="isExpandAll"
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }" :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="type" align="center" width="160" />
<el-table-column label="媒体类型" prop="category" 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="评论数量" sortable prop="commentCounts" align="center" width="100" />
<el-table-column label="点赞数量" prop="likeCounts" 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="粉丝数量" prop="fansCounts" align="center" width="100" /> -->
<el-table-column label="封面图片" align="center" width="200"> <el-table-column label="封面图片" align="center" width="200">
<template #default="{ row }"> <template #default="{ row }">
<img alt="封面图片" style="max-width: 50%; max-height: 50%" :src="row.coverUrl" /> <img alt="封面图片" style="max-width: 50%; max-height: 50%" :src="row.coverUrl" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="文件创建时间" align="center" prop="createTime" 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="updateTime" width="180" /> -->
<!-- <el-table-column label="文件过期时间" align="center" prop="expireTime" 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"> <el-table-column label="操作" fixed="right" align="center" class-name="small-padding fixed-width">
<template #default="scope"> <template #default="scope">
@ -76,61 +85,6 @@
<source :src="object.mediaUrl" type="video/mp4" /> <source :src="object.mediaUrl" type="video/mp4" />
您的浏览器不支持播放该视频 您的浏览器不支持播放该视频
</video> </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> </div>
<template #footer> <template #footer>
<div class="dialog-footer"> <div class="dialog-footer">
@ -225,15 +179,15 @@ const getList = async () => {
const res = await listCategory(queryParams.value); const res = await listCategory(queryParams.value);
// const data = proxy?.handleTree<CategoryVO>(res.data, 'categoryId', 'parentId'); // const data = proxy?.handleTree<CategoryVO>(res.data, 'categoryId', 'parentId');
if (res.status == 200) { if (res.status == 200) {
categoryList.value = res.data.list; categoryList.value = res.data.records;
total.value = res.data.totalCount; total.value = res.data.total;
loading.value = false; loading.value = false;
} }
}; };
const handleCurrentChange = (val: number) => { const handleCurrentChange = (val: number) => {
console.log(`当前页: ${val}`); console.log(`当前页: ${val}`);
queryParams.value.pageNum = val; queryParams.value.current = val;
getList(); getList();
}; };
/** 查询流程分类下拉树结构 */ /** 查询流程分类下拉树结构 */

View File

@ -79,7 +79,7 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" class-name="small-padding fixed-width" fix="right" width="200"> <el-table-column label="操作" class-name="small-padding fixed-width" fix="right" width="200">
<template v-slot="scope"> <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="goOrder(scope.row.phoneEncrypted)">查看下单</el-button>
<el-button size="small" type="text" @click="goCart(scope.row.phoneEncrypted)">查看购物车</el-button> <el-button size="small" type="text" @click="goCart(scope.row.phoneEncrypted)">查看购物车</el-button>
</template> </template>

View File

@ -81,7 +81,7 @@
<!-- </el-table-column>--> <!-- </el-table-column>-->
</el-table> </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> </div>
</template> </template>

View File

@ -57,7 +57,7 @@
</el-table-column> </el-table-column>
</el-table> </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> </div>
</template> </template>