From e486d36a8080ed3d911483cbbdb8bae10877e6e5 Mon Sep 17 00:00:00 2001 From: caoxiaozhu Date: Mon, 27 Jul 2026 11:36:30 +0800 Subject: [PATCH] =?UTF-8?q?feat(dataset):=20=E6=94=AF=E6=8C=81=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E4=BB=BB=E5=8A=A1=E6=89=B9=E9=87=8F=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../scripts/regression-dataset-task-tab.mjs | 15 ++- frontend/src/components/DataTablePage.vue | 58 +++++++--- .../src/views/dataset/DatasetListView.vue | 108 ++++++++++++++++-- 3 files changed, 155 insertions(+), 26 deletions(-) diff --git a/frontend/scripts/regression-dataset-task-tab.mjs b/frontend/scripts/regression-dataset-task-tab.mjs index cdf199b..851d601 100644 --- a/frontend/scripts/regression-dataset-task-tab.mjs +++ b/frontend/scripts/regression-dataset-task-tab.mjs @@ -7,11 +7,13 @@ const scriptDir = path.dirname(fileURLToPath(import.meta.url)) const typesPath = path.resolve(scriptDir, '../src/types/index.ts') const dataPath = path.resolve(scriptDir, '../src/mock/data.ts') const viewPath = path.resolve(scriptDir, '../src/views/dataset/DatasetListView.vue') +const tablePagePath = path.resolve(scriptDir, '../src/components/DataTablePage.vue') -const [typesSource, dataSource, viewSource] = await Promise.all([ +const [typesSource, dataSource, viewSource, tablePageSource] = await Promise.all([ readFile(typesPath, 'utf8'), readFile(dataPath, 'utf8'), readFile(viewPath, 'utf8'), + readFile(tablePagePath, 'utf8'), ]) assert.match(typesSource, /export type DatasetSource = 'upload' \| 'task'/) @@ -40,5 +42,16 @@ assert.match( ) assert.match(viewSource, /return dataList\.value\.filter\(\(item\) => item\.source !== 'task'\)/) assert.doesNotMatch(viewSource, /数据任务产生的数据集[\s\S]*?return \[\]/) +assert.match(viewSource, /:search-fields="\['task_id', 'name', 'description'\]"/, '数据任务搜索应支持任务 ID') +assert.match(viewSource, /:multi-select="activeTab === 'task' && batchMode"/, '多选框只能在数据任务的批量模式显示') +assert.match(viewSource, /:show-batch-bar="false"/, '数据任务应使用搜索框旁的批量删除入口') +assert.match(viewSource, /