diff --git a/openhis-ui-vue3/src/views/outpatient/ExaminationApplication.vue b/openhis-ui-vue3/src/views/outpatient/ExaminationApplication.vue new file mode 100644 index 000000000..6a4616461 --- /dev/null +++ b/openhis-ui-vue3/src/views/outpatient/ExaminationApplication.vue @@ -0,0 +1,230 @@ + + + + + + + 检查项目分类 + + + + + + + + 检查项目 + + + + {{ cleanName(item.name) }} + + + + + + + + + + 已选择 + + + + + + {{ cleanName(sel.name) }} + + + + + + + + + + + + {{ method.name }} + + + + + + + + + + + + + + + + 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 bad7f68b4..8a090c329 100755 --- a/openhis-ui-vue3/tests/e2e/specs/bug-regression.spec.ts +++ b/openhis-ui-vue3/tests/e2e/specs/bug-regression.spec.ts @@ -50,3 +50,56 @@ describe('Bug #562: 门诊医生工作站-待写病历加载性能与状态修 cy.get('[data-cy="record-list"]').should('be.visible') }) }) + +// ========================================================================= +// Bug #550 Regression Test +// ========================================================================= +describe('Bug #550: 门诊医生站-检查申请项目选择交互优化', { tags: ['@bug550', '@regression'] }, () => { + it('should decouple item and method selection', () => { + cy.login('doctor1', '123456') + cy.visit('/outpatient/examination-application') + + cy.get('[data-cy="exam-category-ultrasound"]').click() + cy.get('[data-cy="exam-item-128"]').click() + + // 验证勾选项目时,检查方法区域未被自动勾选 + cy.get('[data-cy="exam-method-area"]').find('input[type="checkbox"]:checked').should('have.length', 0) + }) + + it('should display full name without "套餐" prefix and support expand/collapse', () => { + cy.login('doctor1', '123456') + cy.visit('/outpatient/examination-application') + + cy.get('[data-cy="exam-category-ultrasound"]').click() + cy.get('[data-cy="exam-item-128"]').click() + + // 验证已选卡片无“套餐”冗余字样 + cy.get('[data-cy="selected-item-card"]').should('not.contain', '套餐') + + // 验证默认收起状态 + cy.get('[data-cy="selected-item-card"]').find('[data-cy="method-detail"]').should('not.be.visible') + + // 点击展开 + cy.get('[data-cy="expand-toggle"]').click() + cy.get('[data-cy="method-detail"]').should('be.visible') + + // 验证悬停显示完整名称 + cy.get('[data-cy="item-name"]').trigger('mouseover') + cy.get('.el-tooltip__trigger').should('have.attr', 'title') + }) + + it('should render hierarchical structure (Item > Method) correctly', () => { + cy.login('doctor1', '123456') + cy.visit('/outpatient/examination-application') + + cy.get('[data-cy="exam-category-ultrasound"]').click() + cy.get('[data-cy="exam-item-128"]').click() + cy.get('[data-cy="expand-toggle"]').click() + + // 验证层级结构:项目为父级,方法为子级独立勾选 + cy.get('[data-cy="selected-item-card"]').within(() => { + cy.get('.item-name').should('contain', '128线排') + cy.get('[data-cy="method-detail"]').find('label').should('have.length.greaterThan', 0) + }) + }) +})