diff --git a/frontend/scripts/regression-data-process-detail.mjs b/frontend/scripts/regression-data-process-detail.mjs index f2becb7..b9b815c 100644 --- a/frontend/scripts/regression-data-process-detail.mjs +++ b/frontend/scripts/regression-data-process-detail.mjs @@ -48,6 +48,8 @@ assert.match(detailSource, /usePolling\(refreshRuntime,\s*3000/, '运行中任 assert.match(detailSource, /:data="results"/, '结果表格未绑定服务端结果数据') assert.match(detailSource, /v-model="keyword"/, '结果明细缺少搜索能力') assert.match(detailSource, /v-model="statusFilter"/, '结果明细缺少状态筛选') +assert.match(detailSource, /:tooltip-options="resultCellTooltipOptions"/, '结果明细没有配置受控的长文本提示') +assert.match(detailSource, /\.data-process-result-tooltip[\s\S]*?max-width:\s*min\(520px,\s*calc\(100vw - 32px\)\)/, '结果明细长文本提示没有限制最大宽度') assert.match(detailSource, /updateDataProcessResult\(taskId\.value,[\s\S]*?expected_updated_at:/, '结果编辑没有携带并发版本时间') assert.match(detailSource, /restoreDataProcessResult\(taskId\.value,\s*result\.id\)/, '结果恢复没有调用真实 API') assert.match(detailSource, /publishDataProcess\(taskId\.value,/, '发布数据集没有调用真实 API') diff --git a/frontend/src/views/data-process/DataProcessDetailView.vue b/frontend/src/views/data-process/DataProcessDetailView.vue index cb3e79a..267550f 100644 --- a/frontend/src/views/data-process/DataProcessDetailView.vue +++ b/frontend/src/views/data-process/DataProcessDetailView.vue @@ -43,6 +43,11 @@ const restoringResultId = ref(null) const publishDialogVisible = ref(false) const publishing = ref(false) const configExpanded = ref(false) +const resultCellTooltipOptions = { + popperClass: 'data-process-result-tooltip', + placement: 'top', + showAfter: 300, +} as const let resultFilterTimer: ReturnType | null = null const editForm = reactive({ instruction: '', input: '', output: '' }) @@ -656,7 +661,13 @@ onBeforeUnmount(() => { - + @@ -858,6 +869,17 @@ onBeforeUnmount(() => { .result-filters :deep(.el-select) { width: 120px; } .result-section :deep(.el-table) { border-radius: 0; } +:global(.data-process-result-tooltip) { + box-sizing: border-box; + max-width: min(520px, calc(100vw - 32px)); + max-height: 240px; + overflow-y: auto; + white-space: pre-wrap; + overflow-wrap: anywhere; + word-break: break-word; + line-height: 1.6; +} + .result-empty, .not-found-state { min-height: 220px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #94a3b8; > i { margin-bottom: 12px; color: var(--el-color-primary-light-5); font-size: 30px; }