feat: 内容稿件审核列表
This commit is contained in:
@ -79,7 +79,7 @@ const COMPONENTS: AppRouteRecordRaw[] = [
|
||||
requireLogin: false,
|
||||
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',
|
||||
|
||||
@ -40,7 +40,7 @@
|
||||
</a-input>
|
||||
</a-space>
|
||||
</div>
|
||||
<div class="filter-row-item">
|
||||
<div class="filter-row-item" v-if="query.audit_status === AuditStatus.Pending">
|
||||
<span class="label">上传时间</span>
|
||||
<a-range-picker
|
||||
v-model="created_at"
|
||||
@ -51,16 +51,13 @@
|
||||
@change="(value) => onDateChange(value, 'created_at')"
|
||||
/>
|
||||
</div>
|
||||
<template v-if="[AuditStatus.Auditing, AuditStatus.Passed].includes(query.audit_status)">
|
||||
<div class="filter-row-item">
|
||||
<span class="label">审核平台</span>
|
||||
<a-select v-model="query.audit_platform" size="medium" placeholder="全部" allow-clear @change="handleSearch">
|
||||
<a-option
|
||||
v-for="(item, index) in MEDIA_ACCOUNT_PLATFORMS"
|
||||
:key="index"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
>{{ item.label }}</a-option
|
||||
>
|
||||
<a-option v-for="(item, index) in PLATFORMS" :key="index" :value="item.value" :label="item.label">{{
|
||||
item.label
|
||||
}}</a-option>
|
||||
</a-select>
|
||||
</div>
|
||||
<div class="filter-row-item">
|
||||
@ -74,6 +71,8 @@
|
||||
@change="(value) => onDateChange(value, 'audit_started_at')"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<div class="filter-row-item">
|
||||
<a-button type="outline" class="mr-12px" size="medium" @click="handleSearch">
|
||||
<template #icon>
|
||||
@ -94,7 +93,7 @@
|
||||
|
||||
<script setup>
|
||||
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({
|
||||
query: {
|
||||
@ -38,6 +38,19 @@
|
||||
<template v-if="column.dataIndex === 'create_at'" #cell="{ record }">
|
||||
{{ exactFormatTime(record.create_at) }}
|
||||
</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 }">
|
||||
<TextOverTips :context="record.title" :line="3" class="title" @click="onDetail(record)" />
|
||||
</template>
|
||||
@ -57,7 +70,12 @@
|
||||
<template v-else-if="['uploader', 'last_modifier'].includes(column.dataIndex)" #cell="{ record }">
|
||||
{{ record[column.dataIndex].name || record[column.dataIndex].mobile }}
|
||||
</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]) }}
|
||||
</template>
|
||||
<template v-else-if="column.dataIndex === 'cover'" #cell="{ record }">
|
||||
@ -70,7 +88,14 @@
|
||||
<template v-else-if="column.dataIndex === 'operation'" #cell="{ record }">
|
||||
<div class="flex items-center">
|
||||
<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>
|
||||
</template>
|
||||
<template v-else #cell="{ record }">
|
||||
@ -85,7 +110,11 @@
|
||||
import { ref } from 'vue';
|
||||
import { formatTableField, exactFormatTime } from '@/utils/tools';
|
||||
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';
|
||||
|
||||
@ -106,6 +135,9 @@ const props = defineProps({
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
audit_status: {
|
||||
type: String,
|
||||
}
|
||||
});
|
||||
|
||||
const tableRef = ref(null);
|
||||
@ -116,13 +148,18 @@ const handleSorterChange = (column, order) => {
|
||||
const onDelete = (item) => {
|
||||
emits('delete', item);
|
||||
};
|
||||
const onShare = (item) => {
|
||||
console.log('onShare', item);
|
||||
};
|
||||
const onCheck = (item) => {
|
||||
router.push(`/manuscript/detail/${item.id}`);
|
||||
};
|
||||
const onDetail = (item) => {
|
||||
router.push(`/manuscript/detail/${item.id}`);
|
||||
};
|
||||
|
||||
const getCustomerOpinionInfo = (value = 1) => {
|
||||
return CUSTOMER_OPINION.find((item) => item.value === value);
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@ -47,14 +47,14 @@ export const TABLE_COLUMNS1 = [
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '最后修改人员',
|
||||
title: '修改人员',
|
||||
dataIndex: 'last_modifier',
|
||||
width: 180,
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
dataIndex: 'operation',
|
||||
width: 180,
|
||||
width: 120,
|
||||
fixed: 'right',
|
||||
},
|
||||
];
|
||||
@ -80,7 +80,7 @@ export const TABLE_COLUMNS2 = [
|
||||
},
|
||||
{
|
||||
title: '客户意见',
|
||||
dataIndex: 'opinion',
|
||||
dataIndex: 'customer_opinion',
|
||||
width: 220,
|
||||
},
|
||||
{
|
||||
@ -88,11 +88,11 @@ export const TABLE_COLUMNS2 = [
|
||||
dataIndex: 'platform',
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
title: '合规程度',
|
||||
dataIndex: 'platform',
|
||||
width: 120,
|
||||
},
|
||||
// {
|
||||
// title: '合规程度',
|
||||
// dataIndex: 'platform',
|
||||
// width: 120,
|
||||
// },
|
||||
{
|
||||
title: '稿件类型',
|
||||
dataIndex: 'type',
|
||||
@ -100,7 +100,7 @@ export const TABLE_COLUMNS2 = [
|
||||
},
|
||||
{
|
||||
title: '审核时间',
|
||||
dataIndex: 'last_modified_at',
|
||||
dataIndex: 'audit_started_at',
|
||||
width: 180,
|
||||
sortable: {
|
||||
sortDirections: ['ascend', 'descend'],
|
||||
@ -122,7 +122,7 @@ export const TABLE_COLUMNS2 = [
|
||||
{
|
||||
title: '操作',
|
||||
dataIndex: 'operation',
|
||||
width: 180,
|
||||
width: 120,
|
||||
fixed: 'right',
|
||||
},
|
||||
];
|
||||
@ -163,7 +163,7 @@ export const TABLE_COLUMNS3 = [
|
||||
},
|
||||
{
|
||||
title: '通过时间',
|
||||
dataIndex: 'last_modified_at',
|
||||
dataIndex: 'audit_passed_at',
|
||||
width: 180,
|
||||
sortable: {
|
||||
sortDirections: ['ascend', 'descend'],
|
||||
@ -185,7 +185,7 @@ export const TABLE_COLUMNS3 = [
|
||||
{
|
||||
title: '操作',
|
||||
dataIndex: 'operation',
|
||||
width: 180,
|
||||
width: 120,
|
||||
fixed: 'right',
|
||||
},
|
||||
];
|
||||
@ -222,3 +222,34 @@ export const INITIAL_QUERY = {
|
||||
sort_column: 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'
|
||||
},
|
||||
];
|
||||
@ -7,7 +7,12 @@
|
||||
<a-button type="outline" size="medium" @click="handleOpenAddProjectModal">分享内容稿件</a-button>
|
||||
</template>
|
||||
</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
|
||||
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
|
||||
:tableColumns="tableColumns"
|
||||
:dataSource="dataSource"
|
||||
:audit_status="query.audit_status"
|
||||
@sorterChange="handleSorterChange"
|
||||
@delete="handleDelete"
|
||||
@edit="handleEdit"
|
||||
@ -47,7 +53,13 @@ import DeleteManuscriptModal from './components/manuscript-check-table/delete-ma
|
||||
import { getWorkAuditsPage } from '@/api/all/generationWorkshop.ts';
|
||||
import { useTableSelectionWithPagination } from '@/hooks/useTableSelectionWithPagination';
|
||||
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 {
|
||||
dataSource,
|
||||
@ -102,6 +114,7 @@ const handleSorterChange = (column, order) => {
|
||||
};
|
||||
|
||||
const handleTabClick = (key) => {
|
||||
query.value = cloneDeep(INITIAL_QUERY);
|
||||
dataSource.value = [];
|
||||
selectedRowKeys.value = [];
|
||||
selectedRows.value = [];
|
||||
Reference in New Issue
Block a user