From 2b261e319f3c9abac881d07c6655c61233b3ad55 Mon Sep 17 00:00:00 2001 From: zhengwr Date: Sat, 20 Jun 2026 14:45:44 +0800 Subject: [PATCH] =?UTF-8?q?feat(modeler):=20=E5=BB=BA=E5=AE=9E=E4=BD=93?= =?UTF-8?q?=E5=90=91=E5=AF=BC=E5=8A=A0=E3=80=8C=E6=89=80=E5=B1=9E=E5=88=86?= =?UTF-8?q?=E7=B1=BB=E3=80=8D=E9=80=89=E6=8B=A9=E5=99=A8(source=20/api/met?= =?UTF-8?q?a/entity-types)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit wizard 步①新增 amis select「所属分类」(必填,221 分类可搜),提交时随 attributes 一并 POST。 e2e 补选分类交互。修用户反馈的「实体所属分类缺失」。 Co-Authored-By: Claude Opus 4.8 (1M context) --- e2e/five-ring.spec.ts | 3 +++ src/pages/NewFeatureShell.tsx | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/e2e/five-ring.spec.ts b/e2e/five-ring.spec.ts index c973759..a4defcc 100644 --- a/e2e/five-ring.spec.ts +++ b/e2e/five-ring.spec.ts @@ -74,6 +74,9 @@ test('人走五环 · 浏览器全程点穿(amis wizard:建实体 → 生成 // ── 环①②·amis wizard 步1 建实体(combo minLength=1 自带一行字段)── await expect(page.getByPlaceholder('OA_DEMO')).toBeVisible({ timeout: 15_000 }); await page.getByPlaceholder('OA_DEMO').fill(TABLE); + // 所属分类(amis select,必填):点开下拉 → 选第一个分类 + await page.locator('.cxd-Select').first().click(); + await page.locator('.cxd-Select-option').first().click(); // combo 默认不带行(显示「<空>」),先点「加字段」再填 await page.getByRole('button', { name: '加字段' }).click(); await expect(page.getByPlaceholder('TITLE').first()).toBeVisible({ timeout: 10_000 }); diff --git a/src/pages/NewFeatureShell.tsx b/src/pages/NewFeatureShell.tsx index f843836..a62b54f 100644 --- a/src/pages/NewFeatureShell.tsx +++ b/src/pages/NewFeatureShell.tsx @@ -55,6 +55,12 @@ function buildWizardSchema(): Record { validationErrors: { matchRegexp: '表名格式不合法(大写字母开头,3–41 位)' }, }, { type: 'input-text', name: 'name', label: '显示名', placeholder: '演示维护(可选)' }, + { + type: 'select', name: 'entitytype', label: '所属分类', required: true, + source: 'get:/api/meta/entity-types', labelField: 'name', valueField: 'id', + searchable: true, clearable: true, + description: '实体在系统中的归类(SYS_ENTITYTYPE),决定新功能挂在哪个功能域', + }, { type: 'combo', name: 'attributes',