perf: 走查调整
This commit is contained in:
@ -29,7 +29,7 @@ export default {
|
||||
},
|
||||
dataSource: {
|
||||
type: Object,
|
||||
default: () => {},
|
||||
default: () => { },
|
||||
},
|
||||
},
|
||||
emits: ['toggle', 'updateComment', 'deleteComment'],
|
||||
@ -212,12 +212,15 @@ export default {
|
||||
|
||||
const renderAiSuggest = () => {
|
||||
if (isEmpty(aiReview.value)) return null;
|
||||
const hasViolationItems = violationItems.value.length > 0
|
||||
|
||||
return (
|
||||
<>
|
||||
<div class="result-box p-16px rounded-8px">
|
||||
<div class="flex items-center justify-between mb-16px">
|
||||
<p class="cts bold !color-#000 !text-16px">审核结果</p>
|
||||
{
|
||||
hasViolationItems && (
|
||||
<Button
|
||||
type="text"
|
||||
class="!color-#6D4CFE hover:!color-#8A70FE"
|
||||
@ -225,12 +228,14 @@ export default {
|
||||
>
|
||||
{isCollapse.value ? '展开详情' : '收起详情'}
|
||||
</Button>
|
||||
)
|
||||
}
|
||||
|
||||
</div>
|
||||
<div class="flex items-center">
|
||||
{RESULT_LIST.map((item, index) => (
|
||||
<div class="flex flex-col justify-center items-center flex-1 result-item" key={index}>
|
||||
<span class="s1" style={{ color: item.color }}>{`${aiReview.value?.[item.value]}${
|
||||
item.suffix || ''
|
||||
<span class="s1" style={{ color: item.color }}>{`${aiReview.value?.[item.value]}${item.suffix || ''
|
||||
}`}</span>{' '}
|
||||
<span class="cts mt-4px !lh-20px !text-12px !color-#737478">{item.label}</span>
|
||||
</div>
|
||||
@ -238,7 +243,7 @@ export default {
|
||||
</div>
|
||||
</div>
|
||||
<div class={`collapse-box mb-16px overflow-hidden ${isCollapse.value ? 'h-0 ' : 'h-auto'}`}>
|
||||
{violationItems.value.length > 0 && (
|
||||
{hasViolationItems && (
|
||||
<div class="result-box p-16px rounded-8px mt-16px">
|
||||
<p class="cts bold !color-#000 !text-16px mb-16px">敏感词检测</p>
|
||||
<div class="grid grid-cols-3 gap-x-24px gap-y-8px">
|
||||
|
||||
@ -18,6 +18,11 @@ export const TABLE_COLUMNS1 = [
|
||||
dataIndex: 'title',
|
||||
width: 300,
|
||||
},
|
||||
{
|
||||
title: '客户意见',
|
||||
dataIndex: 'customer_opinion',
|
||||
width: 220,
|
||||
},
|
||||
{
|
||||
title: '稿件类型',
|
||||
dataIndex: 'type',
|
||||
|
||||
@ -7,63 +7,26 @@
|
||||
<a-button type="outline" size="medium" @click="handleShareModal">分享内容稿件</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"
|
||||
>
|
||||
<div
|
||||
class="flex justify-end mb-12px"
|
||||
v-if="[AuditStatus.Pending, AuditStatus.Auditing].includes(query.audit_status)"
|
||||
>
|
||||
<a-button
|
||||
type="outline"
|
||||
class="w-fit"
|
||||
size="medium"
|
||||
@click="handleBatchCheck"
|
||||
v-if="query.audit_status === AuditStatus.Pending"
|
||||
>批量审核</a-button
|
||||
>
|
||||
<a-button
|
||||
type="outline"
|
||||
class="w-fit"
|
||||
size="medium"
|
||||
@click="handleBatchView"
|
||||
v-if="query.audit_status === AuditStatus.Auditing"
|
||||
>批量查看</a-button
|
||||
>
|
||||
class="table-wrap bg-#fff rounded-8px border-1px border-#D7D7D9 border-solid px-24px py-24px flex-1 flex flex-col">
|
||||
<div class="flex justify-end mb-12px"
|
||||
v-if="[AuditStatus.Pending, AuditStatus.Auditing].includes(query.audit_status)">
|
||||
<a-button type="outline" class="w-fit" size="medium" @click="handleBatchCheck"
|
||||
v-if="query.audit_status === AuditStatus.Pending">批量审核</a-button>
|
||||
<a-button type="outline" class="w-fit" size="medium" @click="handleBatchView"
|
||||
v-if="query.audit_status === AuditStatus.Auditing">批量查看</a-button>
|
||||
</div>
|
||||
|
||||
<ManuscriptCheckTable
|
||||
:key="query.audit_status"
|
||||
:tableColumns="tableColumns"
|
||||
:rowSelection="rowSelection"
|
||||
:selectedRowKeys="selectedRowKeys"
|
||||
:dataSource="dataSource"
|
||||
:audit_status="query.audit_status"
|
||||
@sorterChange="handleSorterChange"
|
||||
@delete="handleDelete"
|
||||
@edit="handleEdit"
|
||||
@select="handleSelect"
|
||||
@selectAll="handleSelectAll"
|
||||
/>
|
||||
<ManuscriptCheckTable :key="query.audit_status" :tableColumns="tableColumns" :rowSelection="rowSelection"
|
||||
:selectedRowKeys="selectedRowKeys" :dataSource="dataSource" :audit_status="query.audit_status"
|
||||
@sorterChange="handleSorterChange" @delete="handleDelete" @edit="handleEdit" @select="handleSelect"
|
||||
@selectAll="handleSelectAll" />
|
||||
<div v-if="pageInfo.total > 0" class="pagination-box">
|
||||
<a-pagination
|
||||
:total="pageInfo.total"
|
||||
size="mini"
|
||||
show-total
|
||||
show-jumper
|
||||
show-page-size
|
||||
:current="pageInfo.page"
|
||||
:page-size="pageInfo.page_size"
|
||||
@change="onPageChange"
|
||||
@page-size-change="onPageSizeChange"
|
||||
/>
|
||||
<a-pagination :total="pageInfo.total" size="mini" show-total show-jumper show-page-size :current="pageInfo.page"
|
||||
:page-size="pageInfo.page_size" @change="onPageChange" @page-size-change="onPageSizeChange" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -86,8 +49,6 @@ import {
|
||||
INITIAL_QUERY,
|
||||
AUDIT_STATUS_LIST,
|
||||
TABLE_COLUMNS1,
|
||||
TABLE_COLUMNS2,
|
||||
TABLE_COLUMNS3,
|
||||
} from '@/views/creative-generation-workshop/manuscript/check-list/constants';
|
||||
|
||||
const {
|
||||
|
||||
@ -173,7 +173,7 @@ export default {
|
||||
<Textarea
|
||||
v-model={form.value.link}
|
||||
size="large"
|
||||
placeholder="请输入链接地址"
|
||||
placeholder="请输入飞书链接地址"
|
||||
autoSize={{ minRows: 5, maxRows: 8 }}
|
||||
/>
|
||||
</FormItem>
|
||||
@ -328,7 +328,7 @@ export default {
|
||||
<Form
|
||||
ref={formRef}
|
||||
rules={{
|
||||
link: [{ required: true, message: '请输入链接地址' }],
|
||||
link: [{ required: true, message: '请输入飞书链接地址' }],
|
||||
}}
|
||||
model={form.value}
|
||||
layout="horizontal"
|
||||
|
||||
@ -18,6 +18,11 @@ export const TABLE_COLUMNS1 = [
|
||||
dataIndex: 'title',
|
||||
width: 300,
|
||||
},
|
||||
{
|
||||
title: '客户意见',
|
||||
dataIndex: 'customer_opinion',
|
||||
width: 220,
|
||||
},
|
||||
{
|
||||
title: '稿件类型',
|
||||
dataIndex: 'type',
|
||||
|
||||
@ -7,63 +7,26 @@
|
||||
<a-button type="outline" size="medium" @click="handleShareModal">分享内容稿件</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"
|
||||
>
|
||||
<div
|
||||
class="flex justify-end mb-12px"
|
||||
v-if="[AuditStatus.Pending, AuditStatus.Auditing].includes(query.audit_status)"
|
||||
>
|
||||
<a-button
|
||||
type="outline"
|
||||
class="w-fit"
|
||||
size="medium"
|
||||
@click="handleBatchCheck"
|
||||
v-if="query.audit_status === AuditStatus.Pending"
|
||||
>批量审核</a-button
|
||||
>
|
||||
<a-button
|
||||
type="outline"
|
||||
class="w-fit"
|
||||
size="medium"
|
||||
@click="handleBatchView"
|
||||
v-if="query.audit_status === AuditStatus.Auditing"
|
||||
>批量查看</a-button
|
||||
>
|
||||
class="table-wrap bg-#fff rounded-8px border-1px border-#D7D7D9 border-solid px-24px py-24px flex-1 flex flex-col">
|
||||
<div class="flex justify-end mb-12px"
|
||||
v-if="[AuditStatus.Pending, AuditStatus.Auditing].includes(query.audit_status)">
|
||||
<a-button type="outline" class="w-fit" size="medium" @click="handleBatchCheck"
|
||||
v-if="query.audit_status === AuditStatus.Pending">批量审核</a-button>
|
||||
<a-button type="outline" class="w-fit" size="medium" @click="handleBatchView"
|
||||
v-if="query.audit_status === AuditStatus.Auditing">批量查看</a-button>
|
||||
</div>
|
||||
|
||||
<ManuscriptCheckTable
|
||||
:key="query.audit_status"
|
||||
:tableColumns="tableColumns"
|
||||
:rowSelection="rowSelection"
|
||||
:selectedRowKeys="selectedRowKeys"
|
||||
:dataSource="dataSource"
|
||||
:audit_status="query.audit_status"
|
||||
@sorterChange="handleSorterChange"
|
||||
@delete="handleDelete"
|
||||
@edit="handleEdit"
|
||||
@select="handleSelect"
|
||||
@selectAll="handleSelectAll"
|
||||
/>
|
||||
<ManuscriptCheckTable :key="query.audit_status" :tableColumns="tableColumns" :rowSelection="rowSelection"
|
||||
:selectedRowKeys="selectedRowKeys" :dataSource="dataSource" :audit_status="query.audit_status"
|
||||
@sorterChange="handleSorterChange" @delete="handleDelete" @edit="handleEdit" @select="handleSelect"
|
||||
@selectAll="handleSelectAll" />
|
||||
<div v-if="pageInfo.total > 0" class="pagination-box">
|
||||
<a-pagination
|
||||
:total="pageInfo.total"
|
||||
size="mini"
|
||||
show-total
|
||||
show-jumper
|
||||
show-page-size
|
||||
:current="pageInfo.page"
|
||||
:page-size="pageInfo.page_size"
|
||||
@change="onPageChange"
|
||||
@page-size-change="onPageSizeChange"
|
||||
/>
|
||||
<a-pagination :total="pageInfo.total" size="mini" show-total show-jumper show-page-size :current="pageInfo.page"
|
||||
:page-size="pageInfo.page_size" @change="onPageChange" @page-size-change="onPageSizeChange" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -72,7 +35,6 @@
|
||||
</div>
|
||||
</template>
|
||||
<script lang="jsx" setup>
|
||||
import { defineComponent } from 'vue';
|
||||
import { Button, Message as AMessage } from '@arco-design/web-vue';
|
||||
import FilterBlock from './components/filter-block';
|
||||
import ManuscriptCheckTable from './components/manuscript-check-table';
|
||||
@ -82,14 +44,11 @@ import ShareManuscriptModal from '@/views/creative-generation-workshop/manuscrip
|
||||
import { getWorkAuditsPage, patchWorkAuditsBatchAudit } from '@/api/all/generationWorkshop.ts';
|
||||
import { useTableSelectionWithPagination } from '@/hooks/useTableSelectionWithPagination';
|
||||
import { slsWithCatch } from '@/utils/stroage.ts';
|
||||
// import { getProjects } from '@/api/all/propertyMarketing';
|
||||
import {
|
||||
AuditStatus,
|
||||
INITIAL_QUERY,
|
||||
AUDIT_STATUS_LIST,
|
||||
TABLE_COLUMNS1,
|
||||
TABLE_COLUMNS2,
|
||||
TABLE_COLUMNS3,
|
||||
} from '@/views/creative-generation-workshop/manuscript/check-list/constants';
|
||||
|
||||
const {
|
||||
|
||||
@ -18,6 +18,11 @@ export const TABLE_COLUMNS = [
|
||||
dataIndex: 'title',
|
||||
width: 240,
|
||||
},
|
||||
{
|
||||
title: '客户意见',
|
||||
dataIndex: 'customer_opinion',
|
||||
width: 220,
|
||||
},
|
||||
// {
|
||||
// title: '所属项目',
|
||||
// dataIndex: 'projects',
|
||||
@ -63,6 +68,6 @@ export const TABLE_COLUMNS = [
|
||||
title: '操作',
|
||||
dataIndex: 'operation',
|
||||
width: 180,
|
||||
fixed: 'right'
|
||||
fixed: 'right',
|
||||
},
|
||||
];
|
||||
|
||||
@ -1,31 +1,13 @@
|
||||
<template>
|
||||
<a-table
|
||||
ref="tableRef"
|
||||
:data="dataSource"
|
||||
row-key="id"
|
||||
column-resizable
|
||||
:pagination="false"
|
||||
:scroll="{ x: '100%' }"
|
||||
class="manuscript-table w-100%"
|
||||
bordered
|
||||
@sorter-change="handleSorterChange"
|
||||
>
|
||||
<a-table ref="tableRef" :data="dataSource" row-key="id" column-resizable :pagination="false" :scroll="{ x: '100%' }"
|
||||
class="manuscript-table w-100%" bordered @sorter-change="handleSorterChange">
|
||||
<template #empty>
|
||||
<NoData text="暂无稿件" />
|
||||
</template>
|
||||
<template #columns>
|
||||
<a-table-column
|
||||
v-for="column in TABLE_COLUMNS"
|
||||
:key="column.dataIndex"
|
||||
:data-index="column.dataIndex"
|
||||
:fixed="column.fixed"
|
||||
:width="column.width"
|
||||
:min-width="column.minWidth"
|
||||
:sortable="column.sortable"
|
||||
:align="column.align"
|
||||
ellipsis
|
||||
tooltip
|
||||
>
|
||||
<a-table-column v-for="column in TABLE_COLUMNS" :key="column.dataIndex" :data-index="column.dataIndex"
|
||||
:fixed="column.fixed" :width="column.width" :min-width="column.minWidth" :sortable="column.sortable"
|
||||
:align="column.align" ellipsis tooltip>
|
||||
<template #title>
|
||||
<div class="flex items-center">
|
||||
<span class="cts mr-4px">{{ column.title }}</span>
|
||||
@ -38,14 +20,20 @@
|
||||
<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 === 'title'" #cell="{ record }">
|
||||
<TextOverTips :context="record.title" :line="3" class="title" @click="onDetail(record)" />
|
||||
</template>
|
||||
<template v-else-if="column.dataIndex === 'audit_status'" #cell="{ record }">
|
||||
<div
|
||||
class="flex items-center w-fit h-28px px-8px rounded-2px"
|
||||
:style="{ backgroundColor: getStatusInfo(record.audit_status).backgroundColor }"
|
||||
>
|
||||
<div class="flex items-center w-fit h-28px px-8px rounded-2px"
|
||||
:style="{ backgroundColor: getStatusInfo(record.audit_status).backgroundColor }">
|
||||
<span class="cts s1" :style="{ color: getStatusInfo(record.audit_status).color }">{{
|
||||
getStatusInfo(record.audit_status).name
|
||||
}}</span>
|
||||
@ -53,12 +41,8 @@
|
||||
</template>
|
||||
<template v-else-if="column.dataIndex === 'type'" #cell="{ record }">
|
||||
<div class="flex items-center">
|
||||
<img
|
||||
:src="record.type === EnumManuscriptType.Image ? icon2 : icon3"
|
||||
width="16"
|
||||
height="16"
|
||||
class="mr-4px"
|
||||
/>
|
||||
<img :src="record.type === EnumManuscriptType.Image ? icon2 : icon3" width="16" height="16"
|
||||
class="mr-4px" />
|
||||
<span class="cts" :class="record.type === EnumManuscriptType.Image ? '!color-#25C883' : '!color-#6D4CFE'">{{
|
||||
record.type === EnumManuscriptType.Image ? '图文' : '视频'
|
||||
}}</span>
|
||||
@ -99,6 +83,9 @@ import { ref } from 'vue';
|
||||
import { formatTableField, exactFormatTime } from '@/utils/tools';
|
||||
import { TABLE_COLUMNS } from './constants';
|
||||
import { CHECK_STATUS, EnumManuscriptType } from '@/views/creative-generation-workshop/manuscript/list/constants';
|
||||
import {
|
||||
CUSTOMER_OPINION,
|
||||
} from '@/views/creative-generation-workshop/manuscript/check-list/constants';
|
||||
|
||||
import TextOverTips from '@/components/text-over-tips';
|
||||
import HoverImagePreview from '@/components/hover-image-preview';
|
||||
@ -136,6 +123,9 @@ const onDetail = (item) => {
|
||||
const getStatusInfo = (audit_status) => {
|
||||
return CHECK_STATUS.find((v) => v.id === audit_status) ?? {};
|
||||
};
|
||||
const getCustomerOpinionInfo = (value) => {
|
||||
return CUSTOMER_OPINION.find((item) => item.value === value);
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
@ -198,7 +198,7 @@ export default {
|
||||
<Textarea
|
||||
v-model={form.value.link}
|
||||
size="large"
|
||||
placeholder="请输入链接地址"
|
||||
placeholder="请输入飞书链接地址"
|
||||
autoSize={{ minRows: 5, maxRows: 8 }}
|
||||
/>
|
||||
</FormItem>
|
||||
@ -361,7 +361,7 @@ export default {
|
||||
<Form
|
||||
ref={formRef}
|
||||
rules={{
|
||||
link: [{ required: true, message: '请输入链接地址' }],
|
||||
link: [{ required: true, message: '请输入飞书链接地址' }],
|
||||
}}
|
||||
model={form.value}
|
||||
layout="horizontal"
|
||||
|
||||
Reference in New Issue
Block a user