| | |
| | | const AI_PROMPT_REPORT_TITLE = 'Prompt 管理报表' |
| | | import { $t } from '@/locales' |
| | | |
| | | const AI_PROMPT_REPORT_TITLE = () => $t('pages.system.aiPrompt.reportTitle') |
| | | |
| | | const STATUS_OPTIONS = [ |
| | | { label: '启用', value: 1 }, |
| | | { label: '停用', value: 0 } |
| | | { label: () => $t('common.status.enabled'), value: 1 }, |
| | | { label: () => $t('common.status.disabled'), value: 0 } |
| | | ] |
| | | |
| | | function createAiPromptSearchState() { |
| | |
| | | } |
| | | |
| | | function getAiPromptStatusOptions() { |
| | | return STATUS_OPTIONS |
| | | return STATUS_OPTIONS.map((item) => ({ ...item, label: item.label() })) |
| | | } |
| | | |
| | | function getAiPromptStatusMeta(status) { |
| | | return Number(status) === 1 |
| | | ? { text: '启用', type: 'success' } |
| | | : { text: '停用', type: 'info' } |
| | | ? { text: $t('common.status.enabled'), type: 'success' } |
| | | : { text: $t('common.status.disabled'), type: 'info' } |
| | | } |
| | | |
| | | function buildAiPromptSearchParams(params = {}) { |
| | |
| | | |
| | | function getAiPromptReportColumns() { |
| | | return [ |
| | | { label: '名称', prop: 'name' }, |
| | | { label: '编码', prop: 'code' }, |
| | | { label: '场景', prop: 'scene' }, |
| | | { label: '状态', prop: 'statusText' }, |
| | | { label: '系统提示词', prop: 'systemPrompt' }, |
| | | { label: '用户提示词模板', prop: 'userPromptTemplate' }, |
| | | { label: '更新时间', prop: 'updateTime' } |
| | | { label: $t('pages.system.aiPrompt.table.name'), prop: 'name' }, |
| | | { label: $t('pages.system.aiPrompt.table.code'), prop: 'code' }, |
| | | { label: $t('pages.system.aiPrompt.table.scene'), prop: 'scene' }, |
| | | { label: $t('pages.system.aiPrompt.table.status'), prop: 'statusText' }, |
| | | { label: $t('pages.system.aiPrompt.table.systemPrompt'), prop: 'systemPrompt' }, |
| | | { label: $t('pages.system.aiPrompt.table.userPromptTemplate'), prop: 'userPromptTemplate' }, |
| | | { label: $t('table.updateTime'), prop: 'updateTime' } |
| | | ] |
| | | } |
| | | |