修改患者列表内的其他血糖输入逻辑

This commit is contained in:
Guoxianpeng
2026-04-17 10:55:34 +08:00
parent 363565a4f7
commit 0c444dadce
@@ -114,13 +114,13 @@
<span class="ml-2">mmol/L</span>
</el-form-item>
<el-form-item label="其他血糖">
<el-input-number
<el-input
v-model="recordForm.other_blood_sugar"
:precision="2"
:step="0.1"
:min="0"
:max="50"
placeholder="请输入其他血糖"
type="number"
maxlength="10"
@input="handleOtherBloodSugarInput"
style="width: 200px"
/>
<span class="ml-2">mmol/L</span>
</el-form-item>
@@ -399,6 +399,11 @@ const handleEdit = (row: any) => {
dialogVisible.value = true
}
// 处理其他血糖输入,只允许数字
const handleOtherBloodSugarInput = (value: string) => {
recordForm.value.other_blood_sugar = value.replace(/[^\d.]/g, '')
}
// 删除记录
const handleDelete = async (row: any) => {
await feedback.confirm('确定要删除这条记录吗?')