This commit is contained in:
Your Name
2026-04-30 17:36:47 +08:00
parent 4c21ee5938
commit 7e557b1ea2
33 changed files with 8718 additions and 94 deletions
@@ -1,7 +1,7 @@
<template>
<div class="blood-record-list">
<div class="mb-4">
<el-button type="primary" @click="handleAdd">添加记录</el-button>
<el-button v-if="!readOnly" type="primary" @click="handleAdd">添加记录</el-button>
<el-select v-model="trendDays" @change="handleTrendDaysChange" class="ml-2" style="width: 150px">
<el-option label="最近7天" :value="7" />
<el-option label="最近30天" :value="30" />
@@ -62,7 +62,7 @@
<el-table-column prop="western_medicine" label="西药" show-overflow-tooltip />
<el-table-column prop="insulin" label="胰岛素" show-overflow-tooltip />
<el-table-column prop="remark" label="备注" show-overflow-tooltip />
<el-table-column label="操作" width="150" fixed="right">
<el-table-column v-if="!readOnly" label="操作" width="150" fixed="right">
<template #default="{ row }">
<el-button link type="primary" @click="handleEdit(row)">编辑</el-button>
<el-button link type="danger" @click="handleDelete(row)">删除</el-button>
@@ -185,6 +185,10 @@ const props = defineProps({
patientId: {
type: Number,
default: 0
},
readOnly: {
type: Boolean,
default: false
}
})
@@ -1,6 +1,6 @@
<template>
<div class="case-record-list">
<div class="mb-3 flex justify-end">
<div v-if="!readOnly" class="mb-3 flex justify-end">
<el-button type="primary" size="small" @click="handleOpenPrescription">开方</el-button>
</div>
<el-table :data="caseList" border v-loading="loading">
@@ -46,6 +46,11 @@ const props = defineProps({
diagnosisId: {
type: Number,
default: 0
},
/** 只读:隐藏开方(与诊单 openViewOnly 一致) */
readOnly: {
type: Boolean,
default: false
}
})
@@ -1,6 +1,6 @@
<template>
<div class="diet-record-list">
<div class="mb-4">
<div v-if="!readOnly" class="mb-4">
<el-button type="primary" @click="handleAdd">添加记录</el-button>
</div>
@@ -25,7 +25,7 @@
</template>
</el-table-column>
<el-table-column prop="note" label="备注" show-overflow-tooltip />
<el-table-column label="操作" width="150" fixed="right">
<el-table-column v-if="!readOnly" label="操作" width="150" fixed="right">
<template #default="{ row }">
<el-button link type="primary" @click="handleEdit(row)">编辑</el-button>
<el-button link type="danger" @click="handleDelete(row)">删除</el-button>
@@ -125,6 +125,10 @@ const props = defineProps({
patientId: {
type: Number,
default: 0
},
readOnly: {
type: Boolean,
default: false
}
})
@@ -1,6 +1,6 @@
<template>
<div class="exercise-record-list">
<div class="mb-4">
<div v-if="!readOnly" class="mb-4">
<el-button type="primary" @click="handleAdd">添加记录</el-button>
</div>
@@ -18,7 +18,7 @@
</template>
</el-table-column>
<el-table-column prop="note" label="备注" show-overflow-tooltip />
<el-table-column label="操作" width="150" fixed="right">
<el-table-column v-if="!readOnly" label="操作" width="150" fixed="right">
<template #default="{ row }">
<el-button link type="primary" @click="handleEdit(row)">编辑</el-button>
<el-button link type="danger" @click="handleDelete(row)">删除</el-button>
@@ -99,6 +99,10 @@ const props = defineProps({
patientId: {
type: Number,
default: 0
},
readOnly: {
type: Boolean,
default: false
}
})