根因: - Bug #请修复 Bug #591 存在的问题 修复: - ### 变更摘要 - 全链路数据流分析**:录取(弹窗输入)→ 保存(API传入)→ 查询(Mapper返回)→ 修改(Service记录)→ 删除/停止(状态变更)→ 关联(列表展示) - ### 后端变更(4个文件) - 1. `AdviceBatchOpParam.java`** — 停嘱参数添加 `stopTime` 字段 - 新增 `@JsonFormat Date stopTime`,支持前端传入停嘱时间 - 2. `RequestBaseDto.java`** — 查询DTO添加 `stopUserName`、`stopTime` 字段 - 新增 `String stopUserName`(停嘱医生姓名) - 新增 `Date stopTime`(停嘱时间) - 3. `AdviceManageAppServiceImpl.java`** — 停嘱Service增强 - 优先使用前端传入的 `stopTime`,兜底用当前时间 - 通过 `SecurityUtils.getNickName()` 获取当前操作用户昵称,记录到 `updateBy` - 药品和诊疗两个更新入口均已同步修改 - 4. `AdviceManageAppMapper.xml`** — 三个UNION ALL子查询添加字段 - 药品子查询:`T1.effective_dose_end AS stop_time` + `T1.update_by AS stop_user_name` - 耗材子查询:`NULL AS stop_time` + `'' AS stop_user_name` - 诊疗子查询:`T1.occurrence_end_time AS stop_time` + `T1.update_by AS stop_user_name` - ### 前端变更(1个文件) - `order/index.vue`**: - 1. **停嘱时间弹窗** — 点击「停嘱」后弹出 `el-dialog`,内含 `el-date-picker`(datetime类型,默认当前时间),确定后才调用API - 2. **表格列** — 在「皮试」列后面、「诊断」列前面新增两列: - 「停嘱医生」`prop="stopUserName"`,宽度120px - 「停嘱时间」`prop="stopTime"`,宽度170px - 3. **`handleStopAdvice`** — 保留原有校验(未保存/未签发/已停止检查),校验通过后弹出时间选择弹窗而非直接调API - 4. **`confirmStopAdvice`** — 新增确认函数,将 `stopTime` 拼入请求参数后调用 `stopAdvice` API - ### 验证结果 - ✅ 前端 Lint 检查通过(仅1个预存的 `vue/no-dupe-keys` 警告) - ✅ 后端 Maven 编译通过(BUILD SUCCESS)
206 lines
6.6 KiB
Vue
Executable File
206 lines
6.6 KiB
Vue
Executable File
<template>
|
||
<div ref="print">
|
||
<div class="printInjectCard">
|
||
<div :id="'div1'">
|
||
<div style="width: 300px; text-align: center">
|
||
<span style="font-weight: bolder; font-size: 18px; line-height: 36px">{{ printData.greenText }}</span>
|
||
<span style="font-weight: bolder; font-size: 18px; line-height: 36px">分诊单</span>
|
||
</div>
|
||
<div style="position: absolute; top: 135px; text-align: center; width: 300px">
|
||
{{ printData.hisId }}
|
||
</div>
|
||
<div style="position: absolute; top: 155px; text-align: center; width: 300px">
|
||
{{ printData.triageLevel }}({{ printData.dept }})
|
||
</div>
|
||
<div
|
||
style="
|
||
position: absolute;
|
||
top: 180px;
|
||
left: 15px;
|
||
display: block;
|
||
width: 300px;
|
||
height: 10px;
|
||
border-bottom: 1px solid #5a5a5a;
|
||
"
|
||
/>
|
||
</div>
|
||
<div :id="'div2'">
|
||
<div style="width: 320px; margin-left: 25px">
|
||
<div style="font-size: 15px">
|
||
<span>姓名:</span>
|
||
<span>{{ printData.patientName }}</span>
|
||
<span style="margin-left: 15px">性别:</span>
|
||
<span>{{ printData.sex }}</span>
|
||
<span style="margin-left: 15px">年龄:</span>
|
||
<span>{{ printData.age }}</span>
|
||
</div>
|
||
<div
|
||
style="
|
||
position: absolute;
|
||
top: 15px;
|
||
left: 15px;
|
||
display: block;
|
||
width: 300px;
|
||
height: 10px;
|
||
border-bottom: 1px solid #5a5a5a;
|
||
"
|
||
/>
|
||
</div>
|
||
</div>
|
||
<div :id="'div3'">
|
||
<div style="margin-left: 15px; vertical-align: center; line-height: 18px">
|
||
<div>
|
||
<div style="display: inline-block; font-size: 15px">
|
||
<span>Temp:</span>
|
||
<span>{{ printData.observation ? printData.observation.temperature : '' }}℃</span>
|
||
</div>
|
||
<div style="display: inline-block; position: absolute; left: 180px; font-size: 15px">
|
||
<span>P:</span>
|
||
<span>{{ printData.observation ? printData.observation.sphygmus : '' }}次/分</span>
|
||
</div>
|
||
</div>
|
||
<div style="display: block">
|
||
<div style="display: inline-block; font-size: 15px">
|
||
<span>R:</span>
|
||
<span>{{ printData.observation ? printData.observation.breath : '' }}次/分</span>
|
||
</div>
|
||
<div style="display: inline-block; position: absolute; left: 180px; font-size: 15px">
|
||
<span>BP:</span>
|
||
<span>{{ getBloodPressure(printData.observation) }}mmHg</span>
|
||
</div>
|
||
</div>
|
||
<div style="display: block; font-size: 15px">
|
||
<span>SPO2:</span>
|
||
<span>{{ printData.observation ? printData.observation.bloodOxygen : '' }}%</span>
|
||
</div>
|
||
<div
|
||
style="
|
||
position: absolute;
|
||
top: 48px;
|
||
left: 5px;
|
||
display: block;
|
||
width: 300px;
|
||
height: 10px;
|
||
border-bottom: 1px solid #5a5a5a;
|
||
"
|
||
/>
|
||
</div>
|
||
</div>
|
||
<div :id="'div4'">
|
||
<div style="margin-left: 15px; font-size: 15px">
|
||
<div>
|
||
<span>分诊时间:</span>
|
||
<span>{{ printData.triageTime }}</span>
|
||
</div>
|
||
<div>
|
||
<span>联系电话:</span>
|
||
<span>{{ printData.tel }}</span>
|
||
</div>
|
||
</div>
|
||
<div
|
||
style="
|
||
position: absolute;
|
||
top: 35px;
|
||
left: 5px;
|
||
display: block;
|
||
width: 300px;
|
||
height: 10px;
|
||
border-bottom: 1px solid #5a5a5a;
|
||
"
|
||
/>
|
||
<div style="margin-left: 15px">
|
||
<div style="font-size: 14px; margin-top: 15px; font-weight: bolder">
|
||
请仔细核对个人信息后进行挂号
|
||
</div>
|
||
<div style="margin-top: 5px; font-size: 14px">
|
||
为了您家人和其他患者的健康
|
||
</div>
|
||
<div style="font-size: 14px">
|
||
请您保持就诊秩序保持诊区安静
|
||
</div>
|
||
<div style="font-size: 14px">
|
||
祝您早日康复
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</template>
|
||
<script>
|
||
// 迁移到 hiprint
|
||
import { simplePrint, PRINT_TEMPLATE } from '@/utils/printUtils.js'
|
||
|
||
export default {
|
||
name: 'VuePrintNb',
|
||
props: {
|
||
printData: {
|
||
type: Object,
|
||
default() {
|
||
return {}
|
||
}
|
||
}
|
||
},
|
||
data() {
|
||
return {
|
||
lastId: ''
|
||
}
|
||
},
|
||
mounted() {},
|
||
|
||
methods: {
|
||
// 获取血压值
|
||
getBloodPressure(pressure) {
|
||
if (!pressure) return ''
|
||
else if (pressure.bloodPressureShrinkOne === null) return ''
|
||
return pressure.bloodPressureShrinkOne + '/' + pressure.bloodPressureDiastoleOne
|
||
},
|
||
/**
|
||
* 使用 hiprint 执行打印
|
||
* @param {string} printerName 打印机名称
|
||
*/
|
||
async printTriage(printerName) {
|
||
console.log(this.printData, 'printData')
|
||
try {
|
||
// 构建打印数据
|
||
const printData = {
|
||
hisId: this.printData.hisId,
|
||
triageLevel: this.printData.triageLevel,
|
||
dept: this.printData.dept,
|
||
patientName: this.printData.patientName,
|
||
sex: this.printData.sex,
|
||
age: this.printData.age,
|
||
temperature: this.printData.observation ? this.printData.observation.temperature : '',
|
||
sphygmus: this.printData.observation ? this.printData.observation.sphygmus : '',
|
||
breath: this.printData.observation ? this.printData.observation.breath : '',
|
||
bloodPressure: this.getBloodPressure(this.printData.observation),
|
||
bloodOxygen: this.printData.observation ? this.printData.observation.bloodOxygen : '',
|
||
triageTime: this.printData.triageTime,
|
||
tel: this.printData.tel,
|
||
greenText: this.printData.greenText || ''
|
||
}
|
||
// 使用 hiprint 打印
|
||
await simplePrint(PRINT_TEMPLATE.TRIAGE_TICKET, printData, printerName)
|
||
} catch (error) {
|
||
console.error('分诊条打印失败:', error)
|
||
if (this.openMesBox) {
|
||
this.openMesBox('6', '打印失败: ' + (error.message || '未知错误'))
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
</script>
|
||
<style lang="less">
|
||
.printInjectCard {
|
||
display: grid;
|
||
width: 400px;
|
||
grid-template-rows: 60px 205px 30px;
|
||
border: solid #555 1px;
|
||
background-color: #ffffff;
|
||
}
|
||
@page {
|
||
size: auto;
|
||
margin: 32px;
|
||
}
|
||
</style>
|