|
|
@ -23,6 +23,10 @@ |
|
|
<t-tag v-if="row.reasonCategory" theme="warning" variant="light">{{ reasonLabel(row.reasonCategory) }}</t-tag> |
|
|
<t-tag v-if="row.reasonCategory" theme="warning" variant="light">{{ reasonLabel(row.reasonCategory) }}</t-tag> |
|
|
<span v-else>-</span> |
|
|
<span v-else>-</span> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
<template #reasonComment="{ row }"> |
|
|
|
|
|
<span v-if="row.reasonComment" :title="row.reasonComment" style="max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:inline-block;">{{ truncate(row.reasonComment, 40) }}</span> |
|
|
|
|
|
<span v-else>-</span> |
|
|
|
|
|
</template> |
|
|
<template #processed="{ row }"> |
|
|
<template #processed="{ row }"> |
|
|
<t-tag :theme="row.processed ? 'success' : 'default'" variant="light">{{ row.processed ? '已处理' : '待处理' }}</t-tag> |
|
|
<t-tag :theme="row.processed ? 'success' : 'default'" variant="light">{{ row.processed ? '已处理' : '待处理' }}</t-tag> |
|
|
</template> |
|
|
</template> |
|
|
@ -57,6 +61,9 @@ |
|
|
<span v-if="msg.feedback.reasonCategory"> · {{ reasonLabel(msg.feedback.reasonCategory) }}</span> |
|
|
<span v-if="msg.feedback.reasonCategory"> · {{ reasonLabel(msg.feedback.reasonCategory) }}</span> |
|
|
</t-tag> |
|
|
</t-tag> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
<div v-if="msg.feedback && msg.feedback.reasonComment" class="msg-comment"> |
|
|
|
|
|
💬 补充说明:{{ msg.feedback.reasonComment }} |
|
|
|
|
|
</div> |
|
|
<div class="msg-body" v-html="msg.messageType === 'ASSISTANT' ? renderMarkdown(msg.content) : msg.content"></div> |
|
|
<div class="msg-body" v-html="msg.messageType === 'ASSISTANT' ? renderMarkdown(msg.content) : msg.content"></div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
@ -90,6 +97,7 @@ import { getCategoryTree } from '@/api/category' |
|
|
import { useConfirm } from '@/composables/useConfirm' |
|
|
import { useConfirm } from '@/composables/useConfirm' |
|
|
import { toast } from '@/utils/toast' |
|
|
import { toast } from '@/utils/toast' |
|
|
import { renderMarkdown } from '@/utils/markdown' |
|
|
import { renderMarkdown } from '@/utils/markdown' |
|
|
|
|
|
import { formatDate } from '@/utils/format' |
|
|
|
|
|
|
|
|
const { confirm } = useConfirm() |
|
|
const { confirm } = useConfirm() |
|
|
|
|
|
|
|
|
@ -127,10 +135,11 @@ const processedOptions = [ |
|
|
const columns = [ |
|
|
const columns = [ |
|
|
{ colKey: 'feedbackType', title: '反馈', width: 90, cell: 'feedbackType' }, |
|
|
{ colKey: 'feedbackType', title: '反馈', width: 90, cell: 'feedbackType' }, |
|
|
{ colKey: 'reasonCategory', title: '原因', width: 80, cell: 'reasonCategory' }, |
|
|
{ colKey: 'reasonCategory', title: '原因', width: 80, cell: 'reasonCategory' }, |
|
|
|
|
|
{ colKey: 'reasonComment', title: '补充说明', width: 160, ellipsis: true, cell: 'reasonComment' }, |
|
|
{ colKey: 'userQuestion', title: '用户问题', width: 200, ellipsis: true, cell: 'userQuestion' }, |
|
|
{ colKey: 'userQuestion', title: '用户问题', width: 200, ellipsis: true, cell: 'userQuestion' }, |
|
|
{ colKey: 'assistantAnswer', title: 'AI 回复', width: 200, ellipsis: true, cell: 'assistantAnswer' }, |
|
|
{ colKey: 'assistantAnswer', title: 'AI 回复', width: 200, ellipsis: true, cell: 'assistantAnswer' }, |
|
|
{ colKey: 'processed', title: '状态', width: 70, cell: 'processed' }, |
|
|
{ colKey: 'processed', title: '状态', width: 70, cell: 'processed' }, |
|
|
{ colKey: 'feedbackTime', title: '时间', width: 150 }, |
|
|
|
|
|
|
|
|
{ colKey: 'feedbackTime', title: '时间', width: 150, cell: (_: any, { row }: any) => formatDate(row.feedbackTime) }, |
|
|
{ colKey: 'op', title: '操作', width: 240, cell: 'op' }, |
|
|
{ colKey: 'op', title: '操作', width: 240, cell: 'op' }, |
|
|
] |
|
|
] |
|
|
|
|
|
|
|
|
@ -309,6 +318,7 @@ async function submitFaqAction() { |
|
|
.msg-assistant { background: var(--color-bg-subtle); } |
|
|
.msg-assistant { background: var(--color-bg-subtle); } |
|
|
.msg-system { background: var(--color-warning-bg); } |
|
|
.msg-system { background: var(--color-warning-bg); } |
|
|
.msg-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; } |
|
|
.msg-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; } |
|
|
|
|
|
.msg-comment { font-size: 12px; color: var(--color-text-secondary, #666); background: var(--color-warning-bg); border-radius: 6px; padding: 6px 10px; margin-bottom: 6px; white-space: pre-wrap; word-break: break-word; } |
|
|
.msg-body { font-size: 13px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; } |
|
|
.msg-body { font-size: 13px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; } |
|
|
.dialog-footer { margin-top: 16px; display: flex; justify-content: flex-end; gap: 8px; } |
|
|
.dialog-footer { margin-top: 16px; display: flex; justify-content: flex-end; gap: 8px; } |
|
|
</style> |
|
|
</style> |