feat(manuscript): 新增稿件来源列并优化相关展示

- 在稿件检查列表和表格中添加来源列
- 在作家稿件中心的检查列表和表格中添加来源列
- 实现稿件来源的格式化显示
- 调整表格列的宽度以适应新增的来源列
This commit is contained in:
rd
2025-09-17 17:18:57 +08:00
parent 11f49e048d
commit a7012395b3
8 changed files with 45 additions and 6 deletions

View File

@ -60,6 +60,9 @@
<template v-else-if="column.dataIndex === 'title'" #customRender="{ record }">
<TextOverTips :context="record.title" :line="3" class="title" @click="onDetail(record)" />
</template>
<template v-else-if="column.dataIndex === 'origin'" #customRender="{ record }">
{{ ORIGIN_LIST.find((item) => item.value === record.origin)?.label ?? '-' }}
</template>
<template v-else-if="column.dataIndex === 'type'" #customRender="{ record }">
<div class="flex items-center">
<img :src="record.type === EnumManuscriptType.Image ? icon2 : icon3" width="16" height="16" class="mr-4px" />
@ -113,6 +116,7 @@ import { ref } from 'vue';
import { Button, Tooltip, Table, Image } from 'ant-design-vue';
const { Column } = Table;
import { formatTableField, exactFormatTime } from '@/utils/tools';
import { ORIGIN_LIST } from '@/views/material-center/components/raw-material/constants';
import { EnumManuscriptType } from '@/views/material-center/components/finished-products/manuscript/list/constants';
import { patchWorkAuditsAudit } from '@/api/all/generationWorkshop';
import {
@ -123,8 +127,8 @@ import { AuditStatus } from '@/views/material-center/components/finished-product
import { slsWithCatch } from '@/utils/stroage.ts';
import TextOverTips from '@/components/text-over-tips'
import ImgLazyLoad from "@/components/img-lazy-load";
import TextOverTips from '@/components/text-over-tips';
import ImgLazyLoad from '@/components/img-lazy-load';
import ShareModal from '@/views/material-center/components/finished-products/manuscript/components/share-manuscript-modal/share-modal.vue';
import HoverImagePreview from '@/components/hover-image-preview';

View File

@ -20,6 +20,11 @@ export const TABLE_COLUMNS1 = [
dataIndex: 'title',
width: 300,
},
{
title: '来源',
dataIndex: 'origin',
width: 120,
},
{
title: '客户意见',
dataIndex: 'customer_opinion',

View File

@ -38,6 +38,11 @@ export const TABLE_COLUMNS = [
dataIndex: 'audit_status',
width: 120,
},
{
title: '来源',
dataIndex: 'origin',
width: 120,
},
{
title: '上传时间',
dataIndex: 'created_at',

View File

@ -47,6 +47,9 @@
<template v-else-if="column.dataIndex === 'title'" #customRender="{ record }">
<TextOverTips :context="record.title" :line="3" class="title" @click="onDetail(record)" />
</template>
<template v-else-if="column.dataIndex === 'origin'" #customRender="{ record }">
{{ ORIGIN_LIST.find((item) => item.value === record.origin)?.label ?? '-' }}
</template>
<template v-else-if="column.dataIndex === 'audit_status'" #customRender="{ record }">
<div
class="flex items-center w-fit h-28px px-8px rounded-2px"
@ -96,6 +99,7 @@ import { Button, Tooltip, Table, Image } from 'ant-design-vue';
const { Column } = Table;
import { formatTableField, exactFormatTime } from '@/utils/tools';
import { TABLE_COLUMNS } from './constants';
import { ORIGIN_LIST } from '@/views/material-center/components/raw-material/constants';
import {
CHECK_STATUS,
EnumManuscriptType,
@ -104,7 +108,7 @@ import { CUSTOMER_OPINION } from '@/views/material-center/components/finished-pr
import TextOverTips from '@/components/text-over-tips';
import HoverImagePreview from '@/components/hover-image-preview';
import ImgLazyLoad from "@/components/img-lazy-load";
import ImgLazyLoad from '@/components/img-lazy-load';
import icon1 from '@/assets/img/media-account/icon-delete.png';
import icon2 from '@/assets/img/creative-generation-workshop/icon-photo.png';

View File

@ -62,6 +62,9 @@
<template v-else-if="column.dataIndex === 'title'" #customRender="{ record }">
<TextOverTips :context="record.title" :line="3" class="title" @click="onDetail(record)" />
</template>
<template v-else-if="column.dataIndex === 'origin'" #customRender="{ record }">
{{ ORIGIN_LIST.find((item) => item.value === record.origin)?.label ?? '-' }}
</template>
<template v-else-if="column.dataIndex === 'type'" #customRender="{ record }">
<div class="flex items-center">
<img :src="record.type === EnumManuscriptType.Image ? icon2 : icon3" width="16" height="16" class="mr-4px" />
@ -109,6 +112,8 @@
import { ref, computed } from 'vue';
import { Button, Tooltip, Table, Image } from 'ant-design-vue';
const { Column } = Table;
import { ORIGIN_LIST } from '@/views/material-center/components/raw-material/constants';
import { formatTableField, exactFormatTime } from '@/utils/tools';
import { EnumManuscriptType } from '@/views/writer-material-center/components/finished-products/manuscript/list/constants';
import { patchWorkAuditsAuditWriter } from '@/api/all/generationWorkshop-writer.ts';
@ -122,11 +127,12 @@ import { slsWithCatch } from '@/utils/stroage.ts';
import TextOverTips from '@/components/text-over-tips';
import HoverImagePreview from '@/components/hover-image-preview';
import ImgLazyLoad from "@/components/img-lazy-load";
import ImgLazyLoad from '@/components/img-lazy-load';
import icon1 from '@/assets/img/media-account/icon-delete.png';
import icon2 from '@/assets/img/creative-generation-workshop/icon-photo.png';
import icon3 from '@/assets/img/creative-generation-workshop/icon-video.png';
import { ORIGIN_LIST } from '@/views/material-center/components/raw-material/constants';
// import icon4 from '@/assets/img/error-img.png';
const emits = defineEmits(['sorterChange', 'delete', 'select', 'selectAll']);

View File

@ -20,6 +20,11 @@ export const TABLE_COLUMNS1 = [
dataIndex: 'title',
width: 300,
},
{
title: '来源',
dataIndex: 'origin',
width: 120,
},
// {
// title: '客户意见',
// dataIndex: 'customer_opinion',

View File

@ -33,6 +33,11 @@ export const TABLE_COLUMNS = [
dataIndex: 'audit_status',
width: 180,
},
{
title: '来源',
dataIndex: 'origin',
width: 120,
},
{
title: '上传时间',
dataIndex: 'created_at',
@ -63,6 +68,6 @@ export const TABLE_COLUMNS = [
title: '操作',
dataIndex: 'operation',
width: 200,
fixed: 'right'
fixed: 'right',
},
];

View File

@ -39,6 +39,9 @@
<template v-else-if="column.dataIndex === 'title'" #customRender="{ record }">
<TextOverTips :context="record.title" :line="3" class="title" @click="onDetail(record)" />
</template>
<template v-else-if="column.dataIndex === 'origin'" #customRender="{ record }">
{{ ORIGIN_LIST.find((item) => item.value === record.origin)?.label ?? '-' }}
</template>
<template v-else-if="column.dataIndex === 'audit_status'" #customRender="{ record }">
<div
class="flex items-center w-fit h-28px px-8px rounded-2px"
@ -88,6 +91,7 @@ import { Button, Tooltip, Table, Image } from 'ant-design-vue';
const { Column } = Table;
import { formatTableField, exactFormatTime } from '@/utils/tools';
import { TABLE_COLUMNS } from './constants';
import { ORIGIN_LIST } from '@/views/material-center/components/raw-material/constants';
import {
CHECK_STATUS,
EnumManuscriptType,
@ -95,11 +99,12 @@ import {
import TextOverTips from '@/components/text-over-tips';
import HoverImagePreview from '@/components/hover-image-preview';
import ImgLazyLoad from "@/components/img-lazy-load";
import ImgLazyLoad from '@/components/img-lazy-load';
import icon1 from '@/assets/img/media-account/icon-delete.png';
import icon2 from '@/assets/img/creative-generation-workshop/icon-photo.png';
import icon3 from '@/assets/img/creative-generation-workshop/icon-video.png';
import { ORIGIN_LIST } from '@/views/material-center/components/raw-material/constants';
// import icon4 from '@/assets/img/error-img.png';
const emits = defineEmits(['edit', 'sorterChange', 'delete']);