From 34b31007d0a662274a9a92a1c96accb0aa565f8e Mon Sep 17 00:00:00 2001 From: BabyBoy <2019108827@qq.com> Date: Wed, 18 Jun 2025 10:13:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=95=E8=AF=89=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/contentCenter/types.ts | 1 + src/api/report/index.ts | 25 ++ src/api/report/types.ts | 55 ++++ src/api/workflow/category/index.ts | 2 +- src/router/index.ts | 14 +- src/views/contentManage/report/index.vue | 242 ++++++++++++++++++ src/views/contentManage/video/index.vue | 114 +++++++-- .../contentManage/videocomment/index.vue | 4 +- 8 files changed, 427 insertions(+), 30 deletions(-) create mode 100644 src/api/report/index.ts create mode 100644 src/api/report/types.ts create mode 100644 src/views/contentManage/report/index.vue diff --git a/src/api/contentCenter/types.ts b/src/api/contentCenter/types.ts index 957786e..f78c783 100644 --- a/src/api/contentCenter/types.ts +++ b/src/api/contentCenter/types.ts @@ -91,6 +91,7 @@ export interface CategoryVO { likeCounts: number; fansCounts: number; reason: string; + fileId: string; /** * 流程分类名称 */ diff --git a/src/api/report/index.ts b/src/api/report/index.ts new file mode 100644 index 0000000..1f88918 --- /dev/null +++ b/src/api/report/index.ts @@ -0,0 +1,25 @@ +import { paramOV, reQueryOV } from '@/api/report/types'; + +import { AxiosPromise } from 'axios'; +import request from '@/utils/request'; + +/** + * 查询流程分类列表 + * @param query + * @returns {*} + */ + +export const listCategory = (query?: reQueryOV): AxiosPromise<[]> => { + return request({ + url: '/ums/feedback/list', + method: 'post', + data: query + }); +}; +export const posthandle = (query?: paramOV): AxiosPromise<[]> => { + return request({ + url: '/ums/feedback/handle/handle', + method: 'post', + data: query + }); +}; diff --git a/src/api/report/types.ts b/src/api/report/types.ts new file mode 100644 index 0000000..5097657 --- /dev/null +++ b/src/api/report/types.ts @@ -0,0 +1,55 @@ +export interface CategoryTreeVO { + id: number | string; + label: string; + parentId: number | string; + weight: number; + children: CategoryTreeVO[]; +} +export interface Formaget { + vlogId: number | string; + reason: string; + status: number; +} +export interface fansListVO { + bothFriend: number; + createdTime: string; + face: string; + fanId: string; + friend: boolean; + nickname: string; +} + +export interface reQueryOV { + current: number; + size: number; + aimId: string | number; + phone: string | number; +} + +export interface vlogListVO { + aimId: string | number; + aimObject: null; + aimType: number; + category: number; + content: string; + createBy: number; + createTime: string; + handleStatus: string; + handleTime: string; + handlerId: number; + id: number; + images: string; + member: string; + memberId: string; + phone: string; + remark: string; + resultContent: string; + resultType: number; + type: number; +} +export interface paramOV { + id: string; + resultType: string; + remark: string; + status: number; +} diff --git a/src/api/workflow/category/index.ts b/src/api/workflow/category/index.ts index 89d26e0..c33b291 100644 --- a/src/api/workflow/category/index.ts +++ b/src/api/workflow/category/index.ts @@ -1,4 +1,4 @@ -import { CategoryForm, CategoryQuery, CategoryTreeVO, CategoryVO, Formaget, QueryChildOV, QueryParamOV } from '@/api/workflow/category/types'; +import { CategoryForm, CategoryQuery, CategoryTreeVO, CategoryVO, Formaget, QueryParamOV } from '@/api/workflow/category/types'; import { AxiosPromise } from 'axios'; import request from '@/utils/request'; diff --git a/src/router/index.ts b/src/router/index.ts index a2e70ee..649e930 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -233,11 +233,17 @@ export const dynamicRoutes: RouteRecordRaw[] = [ meta: { title: '视频评论', icon: 'dashboard', affix: true } }, { - path: 'detail', - component: () => import('@/views/contentManage/videodetails/index.vue'), - name: 'Videodetails', - meta: { title: '视频详情', icon: 'dashboard', affix: true } + path: 'report', + component: () => import('@/views/contentManage/report/index.vue'), + name: 'report', + meta: { title: '举报', icon: 'dashboard', affix: true } } + // { + // path: 'detail', + // component: () => import('@/views/contentManage/videodetails/index.vue'), + // name: 'Videodetails', + // meta: { title: '视频详情', icon: 'dashboard', affix: true } + // } ] } ]; diff --git a/src/views/contentManage/report/index.vue b/src/views/contentManage/report/index.vue new file mode 100644 index 0000000..bc86ae2 --- /dev/null +++ b/src/views/contentManage/report/index.vue @@ -0,0 +1,242 @@ + + + + diff --git a/src/views/contentManage/video/index.vue b/src/views/contentManage/video/index.vue index 982f728..d6d7ba2 100644 --- a/src/views/contentManage/video/index.vue +++ b/src/views/contentManage/video/index.vue @@ -35,11 +35,12 @@ + 搜索 - + 重置 @@ -55,12 +56,12 @@ :default-expand-all="isExpandAll" :tree-props="{ children: 'children', hasChildren: 'hasChildren' }" > - + @@ -86,7 +87,7 @@
- +
@@ -99,8 +100,8 @@ @@ -143,7 +144,7 @@ const shouldShowVideo = ref(false); const queryFormRef = ref(); const categoryFormRef = ref(); const categoryTableRef = ref(); -const total = ref(0); +const totalref = ref(0); const isstates = ref(1); // 控制弹出框显示隐藏 const showRefuteDialog = ref(false); @@ -157,7 +158,7 @@ const submitRefute = async () => { console.log('提交的反驳原因:', refuteReason.value); const data: Formaget = { vlogId: object.value.file_id, status: 2, reason: refuteReason.value }; const res = await updateaudit(data); - if (res.status === 200) { + if (res.code === 200) { ElMessage({ message: '操作成功', type: 'success' @@ -167,6 +168,56 @@ const submitRefute = async () => { refuteReason.value = ''; } }; +const isfun = (status: string) => { + if (status == 'Terror') { + return '不通过'; + } + if (status == 'Polity') { + return '不通过'; + } + if (status == 'Illegal') { + return '不通过'; + } + if (status == 'Abuse') { + return '不通过'; + } + if (status == 'Moan') { + return '不通过'; + } + if (status == 'Porn') { + return '不通过'; + } + if (status == 'Ad') { + return '不通过'; + } else { + return status; + } +}; +const isfun1 = (status: string) => { + if (status == 'Terror') { + return false; + } + if (status == 'Polity') { + return false; + } + if (status == 'Illegal') { + return false; + } + if (status == 'Abuse') { + return false; + } + if (status == 'Moan') { + return false; + } + if (status == 'Porn') { + return false; + } + if (status == 'Ad') { + return false; + } else { + return true; + } +}; const dialog = reactive({ visible: false, title: '' @@ -199,14 +250,16 @@ const data = reactive>({ const { queryParams, form, rules } = toRefs(data); -/** 查询流程分类列表 */ +/** 获取视频列表 */ const getList = async () => { loading.value = true; const res = await listCategory(queryParams.value); + // const {{}} // const data = proxy?.handleTree(res.data, 'categoryId', 'parentId'); - if (res.status == 200) { - categoryList.value = res.data.records; - total.value = res.data.total; + const { records, total } = (res.data || {}) as { records: any[]; total: number }; + if (res.code == 200) { + categoryList.value = records; + totalref.value = total; loading.value = false; } }; @@ -245,13 +298,28 @@ const reset = () => { /** 搜索按钮操作 */ const handleQuery = () => { queryParams.value.current = 1; // 查询时重置为第一页 - console.log(queryParams.value); getList(); }; /** 重置按钮操作 */ const resetQuery = () => { - queryFormRef.value?.resetFields(); + // debugger + // queryParams.value = { + // mobile: undefined, + // startTime: undefined, + // endTime: undefined, + // status: undefined, + // asc: undefined, + // column: undefined + // }; + queryParams.value.mobile = undefined; + queryParams.value.startTime = undefined; + queryParams.value.endTime = undefined; + queryParams.value.status = undefined; + queryParams.value.asc = undefined; + queryParams.value.column = undefined; + dateRange.value = []; + // queryFormRef.value?.resetFields(); handleQuery(); }; //点赞列表 @@ -272,12 +340,12 @@ const handleAdd = async (row?: CategoryVO) => { dialog.title = '视频查看'; }); }); - const res = await gerdetail(row.fileId); - if (res.status == 200) { - comments.value = res.data.comments; - likedUsers.value = res.data.likedUsers; - fansList.value = res.data.fansList; - } + // const res = await gerdetail(row.fileId); + // if (res.code == 200) { + // comments.value = res.data.comments; + // likedUsers.value = res.data.likedUsers; + // fansList.value = res.data.fansList; + // } }; //删除详情评论 const delshow = (id: string) => { @@ -287,7 +355,7 @@ const delshow = (id: string) => { type: 'warning' }).then(async () => { const res = await deldetail(id); - if (res.status == 200) { + if (res.code == 200) { cancel(); getList(); } @@ -333,7 +401,7 @@ const submitForm = () => { .then(async () => { const data: Formaget = { vlogId: object.value.fileId, status: 1, reason: refuteReason.value }; const res = await updateaudit(data); - if (res.status == 200) { + if (res.code == 200) { ElMessage({ message: '操作成功', type: 'success' @@ -361,7 +429,7 @@ const handleDelete = async (row: CategoryVO) => { type: 'warning' }).then(async () => { const res = await updateaforbid(row.fileId); - if (res.status == 200) { + if (res.code == 200) { ElMessage({ message: '删除成功', type: 'success' diff --git a/src/views/contentManage/videocomment/index.vue b/src/views/contentManage/videocomment/index.vue index 3a473ec..25886c7 100644 --- a/src/views/contentManage/videocomment/index.vue +++ b/src/views/contentManage/videocomment/index.vue @@ -229,7 +229,7 @@ const handleDelete = async (row?: LomglistVO) => { type: 'warning' }).then(async () => { const res = await deldetail(row.id); - if (res.status == 200) { + if (res.code == 200) { getList(); dialog.visible = false; ElMessage({ @@ -252,7 +252,7 @@ const handledeloffline = async (row?: LomglistVO) => { type: 'warning' }).then(async () => { const res = await deloffline(row.id); - if (res.status == 200) { + if (res.code == 200) { getList(); ElMessage({ message: res.msg,