Refactor brand service and related components

- Removed ListQuestionVersions method and associated types from BrandService and Queries.
- Updated PromptRuleGenerationService to change task naming and handling.
- Enhanced ScheduleTaskService to support filtering by created date range and keyword.
- Introduced InstantTaskService for managing instant tasks with appropriate filtering and response structures.
- Added InstantTaskHandler for handling API requests related to instant tasks.
- Created InstantTaskTab component for the admin web interface to display and manage instant tasks.
- Updated database migrations to rename source types for articles and generation tasks.
- Adjusted models and repository queries to reflect the removal of question version handling.
This commit is contained in:
2026-04-02 21:16:12 +08:00
parent 111498a65f
commit 8958cb44c0
36 changed files with 1378 additions and 358 deletions
+24 -16
View File
@@ -172,7 +172,8 @@ const articleColumns = computed<TableColumnsType<ArticleListItem>>(() => [
{
title: t("common.actions"),
key: "actions",
width: 180,
width: 120,
align: "right",
},
]);
@@ -447,24 +448,36 @@ async function handleDelete(articleId: number): Promise<void> {
</template>
<template v-else-if="column.key === 'actions'">
<div class="templates-view__actions">
<div class="table-actions-row">
<a-tooltip
:title="canEditArticle(record.generate_status) ? t('templates.list.edit') : t('templates.list.editDisabled')"
>
<a-button
size="small"
:disabled="!canEditArticle(record.generate_status)"
@click="openEditor(record)"
>
<template #icon><EditOutlined /></template>
</a-button>
<span>
<a-button
type="text"
shape="circle"
size="small"
class="action-btn action-edit"
:disabled="!canEditArticle(record.generate_status)"
@click="openEditor(record)"
>
<EditOutlined />
</a-button>
</span>
</a-tooltip>
<a-popconfirm
:title="t('templates.list.deleteConfirm')"
@confirm="handleDelete(record.id)"
>
<a-button size="small" danger :loading="deleteMutation.isPending.value">
<template #icon><DeleteOutlined /></template>
<a-button
type="text"
shape="circle"
size="small"
class="action-btn action-delete"
:loading="deleteMutation.isPending.value"
:title="t('common.delete')"
>
<DeleteOutlined />
</a-button>
</a-popconfirm>
</div>
@@ -624,11 +637,6 @@ async function handleDelete(articleId: number): Promise<void> {
font-size: 12px;
}
.templates-view__actions {
display: flex;
gap: 8px;
}
.templates-view__status-tag {
display: inline-flex;
align-items: center;