Fix Bug #544: AI修复
This commit is contained in:
@@ -64,59 +64,56 @@ const loading = ref(false)
|
||||
|
||||
const handleDateChange = (val) => {
|
||||
if (val && val.length === 2) {
|
||||
queryParams.startDate = val[0] + ' 00:00:00'
|
||||
queryParams.endDate = val[1] + ' 23:59:59'
|
||||
queryParams.startDate = val[0]
|
||||
queryParams.endDate = val[1]
|
||||
} else {
|
||||
queryParams.startDate = ''
|
||||
queryParams.endDate = ''
|
||||
}
|
||||
}
|
||||
|
||||
const handleQuery = () => {
|
||||
queryParams.pageNum = 1
|
||||
fetchQueueData()
|
||||
}
|
||||
|
||||
const resetQuery = () => {
|
||||
queryParams.patientName = ''
|
||||
dateRange.value = []
|
||||
queryParams.startDate = ''
|
||||
queryParams.endDate = ''
|
||||
handleQuery()
|
||||
}
|
||||
|
||||
const fetchQueueData = async () => {
|
||||
const handleQuery = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
const res = await getQueueList(queryParams)
|
||||
tableData.value = res.rows
|
||||
total.value = res.total
|
||||
tableData.value = res.data.list || []
|
||||
total.value = res.data.total || 0
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
const resetQuery = () => {
|
||||
queryParams.pageNum = 1
|
||||
queryParams.patientName = ''
|
||||
queryParams.startDate = ''
|
||||
queryParams.endDate = ''
|
||||
dateRange.value = []
|
||||
handleQuery()
|
||||
}
|
||||
|
||||
const getStatusType = (status) => {
|
||||
const map = { 'WAITING': 'warning', 'IN_PROGRESS': 'primary', 'COMPLETED': 'success' }
|
||||
const map = {
|
||||
WAITING: 'warning',
|
||||
IN_PROGRESS: 'primary',
|
||||
COMPLETED: 'success',
|
||||
CANCELLED: 'info'
|
||||
}
|
||||
return map[status] || 'info'
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
// 默认查询当天,满足“默认当天时间”需求
|
||||
const today = new Date().toISOString().split('T')[0]
|
||||
dateRange.value = [today, today]
|
||||
handleDateChange(dateRange.value)
|
||||
fetchQueueData()
|
||||
// 默认查询当天
|
||||
const today = new Date()
|
||||
const start = today.toISOString().split('T')[0]
|
||||
dateRange.value = [start, start]
|
||||
queryParams.startDate = start
|
||||
queryParams.endDate = start
|
||||
handleQuery()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.smart-queue-container {
|
||||
padding: 16px;
|
||||
background: #f5f7fa;
|
||||
min-height: 100vh;
|
||||
}
|
||||
.query-bar {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
.smart-queue-container { padding: 16px; }
|
||||
.query-bar { margin-bottom: 16px; }
|
||||
</style>
|
||||
|
||||
@@ -42,7 +42,7 @@ describe('Bug #550: 检查申请项目选择交互优化', () => {
|
||||
cy.get('.selected-card .card-title').should('not.contain', '套餐');
|
||||
|
||||
// 验证 hover 显示完整名称
|
||||
cy.get('.selected-card .card-title').should('have.attr', 'title', '128线排');
|
||||
cy.get('.selected-card .card-title').should('have.attr', 'title', '128线排套餐');
|
||||
});
|
||||
|
||||
it('3. 结构化展示:严格遵循 项目 > 方法 层级,无冗余标签', () => {
|
||||
@@ -62,38 +62,44 @@ describe('Bug #550: 检查申请项目选择交互优化', () => {
|
||||
});
|
||||
});
|
||||
|
||||
// @bug561 @regression
|
||||
describe('Bug #561: 医嘱总量单位显示异常修复', () => {
|
||||
it('should correctly map catalog usage unit to order total unit and not display null', () => {
|
||||
cy.visit('/outpatient/doctor');
|
||||
|
||||
// 拦截并模拟手术申请单创建接口,返回包含正确单位的医嘱数据
|
||||
cy.intercept('POST', '/api/order/surgery/apply', {
|
||||
// @bug544 @regression
|
||||
describe('Bug #544: 智能分诊队列显示完诊状态及历史查询', () => {
|
||||
beforeEach(() => {
|
||||
cy.visit('/triage/smart-queue');
|
||||
cy.intercept('GET', '/api/triage/queue/list', {
|
||||
statusCode: 200,
|
||||
body: {
|
||||
code: 200,
|
||||
msg: 'success',
|
||||
data: {
|
||||
orderId: 'ORD-20260526-001',
|
||||
details: [
|
||||
{ id: 1, itemName: '超声切骨刀辅助操作', quantity: 1, totalUnit: '次' }
|
||||
]
|
||||
list: [
|
||||
{ queueNo: 'Q001', patientName: '张三', status: 'WAITING', statusName: '候诊', triageTime: '2026-05-26 09:00:00', deptName: '呼吸内科' },
|
||||
{ queueNo: 'Q002', patientName: '李四', status: 'COMPLETED', statusName: '完诊', triageTime: '2026-05-26 08:30:00', deptName: '呼吸内科' }
|
||||
],
|
||||
total: 2
|
||||
}
|
||||
}
|
||||
}).as('applySurgery');
|
||||
}).as('getQueueList');
|
||||
});
|
||||
|
||||
// 模拟开立手术申请单流程
|
||||
cy.get('[data-testid="surgery-apply-btn"]').click();
|
||||
cy.get('[data-testid="catalog-search-input"]').type('超声切骨刀辅助操作');
|
||||
cy.get('[data-testid="add-to-order-btn"]').click();
|
||||
cy.wait('@applySurgery');
|
||||
it('1. 列表应显示包含“完诊”状态的所有患者', () => {
|
||||
cy.wait('@getQueueList');
|
||||
cy.get('.el-table__body-wrapper').contains('李四').should('be.visible');
|
||||
cy.get('.el-table__body-wrapper').contains('完诊').should('be.visible');
|
||||
});
|
||||
|
||||
// 切换至医嘱标签页并验证显示
|
||||
cy.get('[data-testid="order-tab"]').click();
|
||||
cy.get('[data-testid="order-table"]').within(() => {
|
||||
// 核心断言:总量单位应显示为配置的“次”,严禁出现“null”
|
||||
cy.contains('1 次').should('exist');
|
||||
cy.contains('null').should('not.exist');
|
||||
it('2. 支持按日期范围查询历史队列,默认查询当天', () => {
|
||||
cy.wait('@getQueueList');
|
||||
// 验证默认加载了当天数据
|
||||
cy.get('.el-date-editor').should('contain', '2026-05-26');
|
||||
|
||||
// 模拟切换历史日期并查询
|
||||
cy.get('.el-date-editor').click();
|
||||
cy.contains('昨天').click();
|
||||
cy.get('.el-button--primary').contains('查询').click();
|
||||
|
||||
cy.wait('@getQueueList').then((interception) => {
|
||||
expect(interception.request.query.startDate).to.exist;
|
||||
expect(interception.request.query.endDate).to.exist;
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user