feat: 内容稿件审核列表

This commit is contained in:
rd
2025-08-04 14:45:53 +08:00
parent 29f4f22432
commit eb76d00a8e
8 changed files with 124 additions and 44 deletions

View File

@ -79,7 +79,7 @@ const COMPONENTS: AppRouteRecordRaw[] = [
requireLogin: false, requireLogin: false,
roles: ['*'], roles: ['*'],
}, },
component: () => import('@/views/creative-generation-workshop/manuscript/check/index.vue'), component: () => import('@/views/creative-generation-workshop/manuscript/check-list/index.vue'),
}, },
{ {
path: 'check/:id', path: 'check/:id',

View File

@ -40,7 +40,7 @@
</a-input> </a-input>
</a-space> </a-space>
</div> </div>
<div class="filter-row-item"> <div class="filter-row-item" v-if="query.audit_status === AuditStatus.Pending">
<span class="label">上传时间</span> <span class="label">上传时间</span>
<a-range-picker <a-range-picker
v-model="created_at" v-model="created_at"
@ -51,16 +51,13 @@
@change="(value) => onDateChange(value, 'created_at')" @change="(value) => onDateChange(value, 'created_at')"
/> />
</div> </div>
<template v-if="[AuditStatus.Auditing, AuditStatus.Passed].includes(query.audit_status)">
<div class="filter-row-item"> <div class="filter-row-item">
<span class="label">审核平台</span> <span class="label">审核平台</span>
<a-select v-model="query.audit_platform" size="medium" placeholder="全部" allow-clear @change="handleSearch"> <a-select v-model="query.audit_platform" size="medium" placeholder="全部" allow-clear @change="handleSearch">
<a-option <a-option v-for="(item, index) in PLATFORMS" :key="index" :value="item.value" :label="item.label">{{
v-for="(item, index) in MEDIA_ACCOUNT_PLATFORMS" item.label
:key="index" }}</a-option>
:value="item.value"
:label="item.label"
>{{ item.label }}</a-option
>
</a-select> </a-select>
</div> </div>
<div class="filter-row-item"> <div class="filter-row-item">
@ -74,6 +71,8 @@
@change="(value) => onDateChange(value, 'audit_started_at')" @change="(value) => onDateChange(value, 'audit_started_at')"
/> />
</div> </div>
</template>
<div class="filter-row-item"> <div class="filter-row-item">
<a-button type="outline" class="mr-12px" size="medium" @click="handleSearch"> <a-button type="outline" class="mr-12px" size="medium" @click="handleSearch">
<template #icon> <template #icon>
@ -94,7 +93,7 @@
<script setup> <script setup>
import { defineEmits, defineProps } from 'vue'; import { defineEmits, defineProps } from 'vue';
import { MEDIA_ACCOUNT_PLATFORMS } from '@/utils/platform'; import { PLATFORMS, AuditStatus } from '@/views/creative-generation-workshop/manuscript/check-list/constants';
const props = defineProps({ const props = defineProps({
query: { query: {

View File

@ -38,6 +38,19 @@
<template v-if="column.dataIndex === 'create_at'" #cell="{ record }"> <template v-if="column.dataIndex === 'create_at'" #cell="{ record }">
{{ exactFormatTime(record.create_at) }} {{ exactFormatTime(record.create_at) }}
</template> </template>
<template v-else-if="column.dataIndex === 'customer_opinion'" #cell="{ record }">
<p
class="h-28px px-8px flex items-center rounded-2px w-fit"
:style="{ background: getCustomerOpinionInfo(record.customer_opinion)?.bg }"
>
<span class="cts" :class="getCustomerOpinionInfo(record.customer_opinion)?.color">{{
getCustomerOpinionInfo(record.customer_opinion)?.label
}}</span>
</p>
</template>
<template v-else-if="column.dataIndex === 'platform'" #cell="{ record }">
<img width="24" height="24" :src="PLATFORMS.find((item) => item.value === record.platform)?.icon" />
</template>
<template v-else-if="column.dataIndex === 'title'" #cell="{ record }"> <template v-else-if="column.dataIndex === 'title'" #cell="{ record }">
<TextOverTips :context="record.title" :line="3" class="title" @click="onDetail(record)" /> <TextOverTips :context="record.title" :line="3" class="title" @click="onDetail(record)" />
</template> </template>
@ -57,7 +70,12 @@
<template v-else-if="['uploader', 'last_modifier'].includes(column.dataIndex)" #cell="{ record }"> <template v-else-if="['uploader', 'last_modifier'].includes(column.dataIndex)" #cell="{ record }">
{{ record[column.dataIndex].name || record[column.dataIndex].mobile }} {{ record[column.dataIndex].name || record[column.dataIndex].mobile }}
</template> </template>
<template v-else-if="['updated_at', 'last_modified_at'].includes(column.dataIndex)" #cell="{ record }"> <template
#cell="{ record }"
v-else-if="
['updated_at', 'last_modified_at', 'audit_started_at', 'audit_passed_at'].includes(column.dataIndex)
"
>
{{ exactFormatTime(record[column.dataIndex]) }} {{ exactFormatTime(record[column.dataIndex]) }}
</template> </template>
<template v-else-if="column.dataIndex === 'cover'" #cell="{ record }"> <template v-else-if="column.dataIndex === 'cover'" #cell="{ record }">
@ -70,7 +88,14 @@
<template v-else-if="column.dataIndex === 'operation'" #cell="{ record }"> <template v-else-if="column.dataIndex === 'operation'" #cell="{ record }">
<div class="flex items-center"> <div class="flex items-center">
<img class="mr-8px cursor-pointer" :src="icon1" width="14" height="14" @click="onDelete(record)" /> <img class="mr-8px cursor-pointer" :src="icon1" width="14" height="14" @click="onDelete(record)" />
<a-button type="outline" size="mini" @click="onCheck(record)">审核</a-button> <a-button
type="outline"
size="mini"
@click="onShare(record)"
v-if="audit_status === AuditStatus.Passed"
>分享</a-button
>
<a-button type="outline" size="mini" @click="onCheck(record)" v-else>审核</a-button>
</div> </div>
</template> </template>
<template v-else #cell="{ record }"> <template v-else #cell="{ record }">
@ -85,7 +110,11 @@
import { ref } from 'vue'; import { ref } from 'vue';
import { formatTableField, exactFormatTime } from '@/utils/tools'; import { formatTableField, exactFormatTime } from '@/utils/tools';
import { EnumManuscriptType } from '@/views/creative-generation-workshop/manuscript/list/constants'; import { EnumManuscriptType } from '@/views/creative-generation-workshop/manuscript/list/constants';
import { AuditStatus } from '@/views/creative-generation-workshop/manuscript/check/constants'; import {
AuditStatus,
CUSTOMER_OPINION,
PLATFORMS,
} from '@/views/creative-generation-workshop/manuscript/check-list/constants';
import TextOverTips from '@/components/text-over-tips'; import TextOverTips from '@/components/text-over-tips';
@ -106,6 +135,9 @@ const props = defineProps({
type: Array, type: Array,
default: () => [], default: () => [],
}, },
audit_status: {
type: String,
}
}); });
const tableRef = ref(null); const tableRef = ref(null);
@ -116,13 +148,18 @@ const handleSorterChange = (column, order) => {
const onDelete = (item) => { const onDelete = (item) => {
emits('delete', item); emits('delete', item);
}; };
const onShare = (item) => {
console.log('onShare', item);
};
const onCheck = (item) => { const onCheck = (item) => {
router.push(`/manuscript/detail/${item.id}`); router.push(`/manuscript/detail/${item.id}`);
}; };
const onDetail = (item) => { const onDetail = (item) => {
router.push(`/manuscript/detail/${item.id}`); router.push(`/manuscript/detail/${item.id}`);
}; };
const getCustomerOpinionInfo = (value = 1) => {
return CUSTOMER_OPINION.find((item) => item.value === value);
};
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">

View File

@ -47,14 +47,14 @@ export const TABLE_COLUMNS1 = [
}, },
}, },
{ {
title: '最后修改人员', title: '修改人员',
dataIndex: 'last_modifier', dataIndex: 'last_modifier',
width: 180, width: 180,
}, },
{ {
title: '操作', title: '操作',
dataIndex: 'operation', dataIndex: 'operation',
width: 180, width: 120,
fixed: 'right', fixed: 'right',
}, },
]; ];
@ -80,7 +80,7 @@ export const TABLE_COLUMNS2 = [
}, },
{ {
title: '客户意见', title: '客户意见',
dataIndex: 'opinion', dataIndex: 'customer_opinion',
width: 220, width: 220,
}, },
{ {
@ -88,11 +88,11 @@ export const TABLE_COLUMNS2 = [
dataIndex: 'platform', dataIndex: 'platform',
width: 120, width: 120,
}, },
{ // {
title: '合规程度', // title: '合规程度',
dataIndex: 'platform', // dataIndex: 'platform',
width: 120, // width: 120,
}, // },
{ {
title: '稿件类型', title: '稿件类型',
dataIndex: 'type', dataIndex: 'type',
@ -100,7 +100,7 @@ export const TABLE_COLUMNS2 = [
}, },
{ {
title: '审核时间', title: '审核时间',
dataIndex: 'last_modified_at', dataIndex: 'audit_started_at',
width: 180, width: 180,
sortable: { sortable: {
sortDirections: ['ascend', 'descend'], sortDirections: ['ascend', 'descend'],
@ -122,7 +122,7 @@ export const TABLE_COLUMNS2 = [
{ {
title: '操作', title: '操作',
dataIndex: 'operation', dataIndex: 'operation',
width: 180, width: 120,
fixed: 'right', fixed: 'right',
}, },
]; ];
@ -163,7 +163,7 @@ export const TABLE_COLUMNS3 = [
}, },
{ {
title: '通过时间', title: '通过时间',
dataIndex: 'last_modified_at', dataIndex: 'audit_passed_at',
width: 180, width: 180,
sortable: { sortable: {
sortDirections: ['ascend', 'descend'], sortDirections: ['ascend', 'descend'],
@ -185,7 +185,7 @@ export const TABLE_COLUMNS3 = [
{ {
title: '操作', title: '操作',
dataIndex: 'operation', dataIndex: 'operation',
width: 180, width: 120,
fixed: 'right', fixed: 'right',
}, },
]; ];
@ -222,3 +222,34 @@ export const INITIAL_QUERY = {
sort_column: undefined, sort_column: undefined,
sort_order: undefined, sort_order: undefined,
}; };
import icon1 from '@/assets/img/media-account/icon-dy.png';
import icon2 from '@/assets/img/media-account/icon-xhs.png';
export const PLATFORMS = [
{
label: '抖音',
value: 2,
icon: icon1,
},
{
label: '小红书',
value: 1,
icon: icon2,
},
];
export const CUSTOMER_OPINION = [
{
label: '待确认',
value: 0,
bg: '#F2F3F5',
color: 'color-#3C4043'
},
{
label: '已确认',
value: 1,
bg: '#F0EDFF',
color: '!color-#6D4CFE'
},
];

View File

@ -7,7 +7,12 @@
<a-button type="outline" size="medium" @click="handleOpenAddProjectModal">分享内容稿件</a-button> <a-button type="outline" size="medium" @click="handleOpenAddProjectModal">分享内容稿件</a-button>
</template> </template>
</a-tabs> </a-tabs>
<FilterBlock v-model:query="query" :audit_status="query.audit_status" @search="handleSearch" @reset="handleReset" /> <FilterBlock
v-model:query="query"
:audit_status="query.audit_status"
@search="handleSearch"
@reset="handleReset"
/>
</div> </div>
<div <div
class="table-wrap bg-#fff rounded-8px border-1px border-#D7D7D9 border-solid px-24px py-24px flex-1 flex flex-col" class="table-wrap bg-#fff rounded-8px border-1px border-#D7D7D9 border-solid px-24px py-24px flex-1 flex flex-col"
@ -15,6 +20,7 @@
<ManuscriptCheckTable <ManuscriptCheckTable
:tableColumns="tableColumns" :tableColumns="tableColumns"
:dataSource="dataSource" :dataSource="dataSource"
:audit_status="query.audit_status"
@sorterChange="handleSorterChange" @sorterChange="handleSorterChange"
@delete="handleDelete" @delete="handleDelete"
@edit="handleEdit" @edit="handleEdit"
@ -47,7 +53,13 @@ import DeleteManuscriptModal from './components/manuscript-check-table/delete-ma
import { getWorkAuditsPage } from '@/api/all/generationWorkshop.ts'; import { getWorkAuditsPage } from '@/api/all/generationWorkshop.ts';
import { useTableSelectionWithPagination } from '@/hooks/useTableSelectionWithPagination'; import { useTableSelectionWithPagination } from '@/hooks/useTableSelectionWithPagination';
import { getProjects } from '@/api/all/propertyMarketing'; import { getProjects } from '@/api/all/propertyMarketing';
import { INITIAL_QUERY, AUDIT_STATUS_LIST, TABLE_COLUMNS1, TABLE_COLUMNS2, TABLE_COLUMNS3 } from '@/views/creative-generation-workshop/manuscript/check/constants'; import {
INITIAL_QUERY,
AUDIT_STATUS_LIST,
TABLE_COLUMNS1,
TABLE_COLUMNS2,
TABLE_COLUMNS3,
} from '@/views/creative-generation-workshop/manuscript/check-list/constants';
const { const {
dataSource, dataSource,
@ -102,6 +114,7 @@ const handleSorterChange = (column, order) => {
}; };
const handleTabClick = (key) => { const handleTabClick = (key) => {
query.value = cloneDeep(INITIAL_QUERY);
dataSource.value = []; dataSource.value = [];
selectedRowKeys.value = []; selectedRowKeys.value = [];
selectedRows.value = []; selectedRows.value = [];