fix(data-process): 按发布状态控制结果编辑

This commit is contained in:
caoxiaozhu
2026-07-27 11:23:17 +08:00
parent b08a771a61
commit d6e325fe9e
2 changed files with 11 additions and 11 deletions

View File

@@ -51,8 +51,11 @@ 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, /已发布数据请前往数据集详情编辑/, '结果明细没有说明已发布数据的编辑入口')
assert.match(detailSource, /<el-table-column v-if="!hasCurrentPublishedDataset" label="操作"/, '结果操作列没有按当前轮发布状态隐藏')
assert.match(detailSource, /updateDataProcessResult\(taskId\.value,[\s\S]*?expected_updated_at:/, '未发布结果编辑没有携带并发版本时间')
assert.match(detailSource, /restoreDataProcessResult\(taskId\.value,\s*result\.id\)/, '未发布结果恢复没有调用真实 API')
assert.doesNotMatch(detailSource, /:disabled="Boolean\(outputDatasetId\)"/, '结果操作不应被历史发布指针错误禁用')
assert.match(detailSource, /publishDataProcess\(taskId\.value,/, '发布数据集没有调用真实 API')
assert.match(detailSource, /path: '\/dataset', query: \{ tab: 'task', task_id: taskId\.value \}/, '发布成功后未进入数据任务列表')
assert.match(detailSource, /published\.datasets \|\| published\.output_datasets/, '发布成功后未读取三个独立数据集')

View File

@@ -647,7 +647,10 @@ onBeforeUnmount(() => {
<section class="detail-section result-section" aria-labelledby="result-title" v-loading="resultLoading">
<div class="result-toolbar">
<div class="section-heading">
<div><h2 id="result-title">结果明细</h2><p>查看编辑或恢复处理结果</p></div>
<div>
<h2 id="result-title">结果明细</h2>
<p>{{ hasCurrentPublishedDataset ? '查看生成结果与质量状态,已发布数据请前往数据集详情编辑' : '查看、编辑或恢复待发布结果' }}</p>
</div>
</div>
<div class="result-filters">
<el-input
@@ -691,17 +694,11 @@ onBeforeUnmount(() => {
<el-tag :type="resultStatusType(row.status)" size="small">{{ resultStatusLabel(row.status) }}</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" width="130" align="center" fixed="right">
<el-table-column v-if="!hasCurrentPublishedDataset" label="操作" width="130" align="center" fixed="right">
<template #default="{ row }">
<el-button link type="primary" @click="openResultEditor(row as DataProcessResult)">编辑</el-button>
<el-button
link
type="primary"
:disabled="Boolean(outputDatasetId)"
@click="openResultEditor(row as DataProcessResult)"
>编辑</el-button>
<el-button
link
:disabled="Boolean(outputDatasetId)"
:loading="restoringResultId === row.id"
@click="restoreResult(row as DataProcessResult)"
>恢复</el-button>