774 【门诊医生工作站】在门诊医生站的医嘱下的【个人】【科室】【全院】下的医嘱套件都没有数据回显但是可以点击
This commit is contained in:
@@ -131,7 +131,7 @@
|
||||
<vxe-column
|
||||
title="类型"
|
||||
align="center"
|
||||
width="120"
|
||||
width="160"
|
||||
>
|
||||
<template #default="scope">
|
||||
<template v-if="!scope.row.groupPackageId">
|
||||
@@ -205,7 +205,6 @@
|
||||
title="单次剂量"
|
||||
align="center"
|
||||
width="250"
|
||||
field="sortNumber"
|
||||
>
|
||||
<template #default="scope">
|
||||
<template v-if="!scope.row.groupPackageId">
|
||||
@@ -214,11 +213,7 @@
|
||||
<el-input
|
||||
v-model="scope.row.doseQuantity"
|
||||
style="width: 70px; margin-right: 10px"
|
||||
@input="
|
||||
(value) => {
|
||||
scope.row.dose = value * scope.row.unitConversionRatio;
|
||||
}
|
||||
"
|
||||
@input="(value) => handleDoseQuantityChange(value, scope.row)"
|
||||
/>
|
||||
<span>
|
||||
{{
|
||||
@@ -232,11 +227,7 @@
|
||||
<el-input
|
||||
v-model="scope.row.dose"
|
||||
style="width: 70px; margin-right: 10px"
|
||||
@input="
|
||||
(value) => {
|
||||
scope.row.doseQuantity = value / scope.row.unitConversionRatio;
|
||||
}
|
||||
"
|
||||
@input="(value) => handleDoseChange(value, scope.row)"
|
||||
/>
|
||||
<span>
|
||||
{{
|
||||
@@ -260,7 +251,6 @@
|
||||
title="给药途径"
|
||||
align="center"
|
||||
width="150"
|
||||
field="sortNumber"
|
||||
>
|
||||
<template #default="scope">
|
||||
<template v-if="!scope.row.groupPackageId">
|
||||
@@ -292,7 +282,6 @@
|
||||
title="用药频次"
|
||||
align="center"
|
||||
width="150"
|
||||
field="sortNumber"
|
||||
>
|
||||
<template #default="scope">
|
||||
<template v-if="!scope.row.groupPackageId">
|
||||
@@ -324,7 +313,6 @@
|
||||
title="用药天数"
|
||||
align="center"
|
||||
width="100"
|
||||
field="sortNumber"
|
||||
>
|
||||
<template #default="scope">
|
||||
<template v-if="!scope.row.groupPackageId">
|
||||
@@ -547,8 +535,7 @@ function openAdd(tab) {
|
||||
} else if (tab === 'department') {
|
||||
formData.organizationId = userStore.orgId;
|
||||
}
|
||||
|
||||
addEmptyRow();
|
||||
// 不再默认新增空行,用户点击"新增"按钮时才添加
|
||||
}
|
||||
|
||||
function handleRangeChange(tab) {
|
||||
@@ -680,7 +667,7 @@ function openEdit(tab, row) {
|
||||
};
|
||||
});
|
||||
nextId.value = prescriptionList.value.length + 1;
|
||||
addEmptyRow();
|
||||
// 不再默认新增空行,用户点击"新增"按钮时才添加
|
||||
});
|
||||
}
|
||||
|
||||
@@ -939,8 +926,9 @@ function selectAdviceBase(key, row) {
|
||||
JSON.stringify(row)
|
||||
).chargeItemDefinitionId;
|
||||
prescriptionList.value[rowIndex.value].therapyEnum = preservedTherapyEnum;
|
||||
addEmptyRow();
|
||||
expandOrder.value = [key];
|
||||
// 不再自动新增空行,用户点击"新增"按钮时才添加
|
||||
// 强制触发 vxe-table v4 响应式更新(v4 不响应数组元素直接索引赋值)
|
||||
prescriptionList.value = [...prescriptionList.value];
|
||||
}
|
||||
|
||||
function handleFocus(row, index) {
|
||||
@@ -972,6 +960,38 @@ function handleQuantityChange(row) {
|
||||
prescriptionList.value = [...prescriptionList.value];
|
||||
}
|
||||
|
||||
// 单次剂量数量变化 → 自动计算剂量
|
||||
function handleDoseQuantityChange(value, row) {
|
||||
if (value === '' || value === null || value === undefined) {
|
||||
row.dose = undefined;
|
||||
} else {
|
||||
const ratio = row.unitConversionRatio;
|
||||
const numValue = Number(value) || 0;
|
||||
if (ratio && Number(ratio) > 0) {
|
||||
row.dose = numValue * Number(ratio);
|
||||
} else {
|
||||
row.dose = numValue;
|
||||
}
|
||||
}
|
||||
prescriptionList.value = [...prescriptionList.value];
|
||||
}
|
||||
|
||||
// 剂量变化 → 反算单次剂量数量
|
||||
function handleDoseChange(value, row) {
|
||||
if (value === '' || value === null || value === undefined) {
|
||||
row.doseQuantity = undefined;
|
||||
} else {
|
||||
const ratio = row.unitConversionRatio;
|
||||
const numValue = Number(value) || 0;
|
||||
if (ratio && Number(ratio) > 0) {
|
||||
row.doseQuantity = numValue / Number(ratio);
|
||||
} else {
|
||||
row.doseQuantity = numValue;
|
||||
}
|
||||
}
|
||||
prescriptionList.value = [...prescriptionList.value];
|
||||
}
|
||||
|
||||
function handleUnitChange(row) {
|
||||
prescriptionList.value = [...prescriptionList.value];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user