From 740dde3693b5efb45b10fd13b77a45bcc8b7ee67 Mon Sep 17 00:00:00 2001 From: zhaoyun Date: Wed, 27 May 2026 08:50:35 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20Bug=20#577:=20AI=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/mapper/CatalogItemMapper.xml | 42 +++++ .../src/views/inpatient/InspectionApply.vue | 171 +++++++----------- .../tests/e2e/specs/bug-regression.spec.ts | 41 +++-- 3 files changed, 129 insertions(+), 125 deletions(-) create mode 100644 openhis-server-new/openhis-application/src/main/resources/mapper/CatalogItemMapper.xml diff --git a/openhis-server-new/openhis-application/src/main/resources/mapper/CatalogItemMapper.xml b/openhis-server-new/openhis-application/src/main/resources/mapper/CatalogItemMapper.xml new file mode 100644 index 000000000..e01e60f54 --- /dev/null +++ b/openhis-server-new/openhis-application/src/main/resources/mapper/CatalogItemMapper.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/openhis-ui-vue3/src/views/inpatient/InspectionApply.vue b/openhis-ui-vue3/src/views/inpatient/InspectionApply.vue index ee51a1461..2718f5efe 100644 --- a/openhis-ui-vue3/src/views/inpatient/InspectionApply.vue +++ b/openhis-ui-vue3/src/views/inpatient/InspectionApply.vue @@ -1,124 +1,83 @@ diff --git a/openhis-ui-vue3/tests/e2e/specs/bug-regression.spec.ts b/openhis-ui-vue3/tests/e2e/specs/bug-regression.spec.ts index a7557958b..bf54d5858 100755 --- a/openhis-ui-vue3/tests/e2e/specs/bug-regression.spec.ts +++ b/openhis-ui-vue3/tests/e2e/specs/bug-regression.spec.ts @@ -61,29 +61,32 @@ test('Bug #544: 智能分诊队列显示完诊状态及历史查询功能', asyn await expect(dateRangePicker).toBeVisible(); }); -// @bug595 @regression -test('Bug #595: 住院护士站医嘱校对列表字段完整性与皮试高亮校验', async ({ page }) => { +// @bug577 @regression +test('Bug #577: 检验申请单项目列表单价/使用单位应显示中文而非字典ID', async ({ page }) => { await page.goto('/login'); - await page.fill('input[name="username"]', 'wx'); + await page.fill('input[name="username"]', 'doctor1'); await page.fill('input[name="password"]', '123456'); await page.click('button[type="submit"]'); - await page.waitForURL('/nurse-station'); + await page.waitForURL('/inpatient/doctor'); - // 进入医嘱校对模块 - await page.click('text=医嘱校对'); - await page.waitForSelector('.order-verify-table'); + // 选择患者并打开检验申请单 + await page.click('text=检验'); + await page.waitForSelector('.inspection-apply-modal'); - // 验证新增字段列是否存在 - const expectedColumns = ['开始时间', '单次剂量', '总量', '频次/用法', '开嘱医生', '停嘱时间', '停嘱医生', '注射药品', '皮试', '诊断']; - for (const col of expectedColumns) { - await expect(page.locator(`th:has-text("${col}")`)).toBeVisible(); - } + // 验证左侧未选择列表中的单位显示为中文 + const leftItems = page.locator('.left-list .item-row'); + await expect(leftItems.first()).toBeVisible(); + const priceUnitText = await leftItems.first().locator('.price-unit').textContent(); + // 匹配格式:¥数字.数字/中文字符,排除纯数字ID + expect(priceUnitText).toMatch(/¥\d+\.\d+\/[^\d]+/); + expect(priceUnitText).not.toMatch(/\/\d{1,2}$/); - // 验证皮试医嘱红色标签高亮 - const skinTestTag = page.locator('.el-tag--danger:has-text("需皮试")'); - await expect(skinTestTag).toBeVisible(); - - // 验证数据非空且结构化展示(非纯文本拼接) - const doseCell = page.locator('td:has-text("1g")'); - await expect(doseCell).toBeVisible(); + // 验证右侧已选择列表(添加一项后) + await leftItems.first().click(); + await page.click('text=添加 >> 右侧'); + const rightItems = page.locator('.right-list .item-row'); + await expect(rightItems.first()).toBeVisible(); + const rightPriceUnitText = await rightItems.first().locator('.price-unit').textContent(); + expect(rightPriceUnitText).toMatch(/¥\d+\.\d+\/[^\d]+/); + expect(rightPriceUnitText).not.toMatch(/\/\d{1,2}$/); });