Merge branch 'long-0507'

This commit is contained in:
2026-05-07 14:46:29 +08:00
3 changed files with 1189 additions and 52 deletions
File diff suppressed because it is too large Load Diff
@@ -3,7 +3,7 @@
<div class="toolbar"> <div class="toolbar">
<el-button <el-button
type="primary" type="primary"
:disabled="!props.diagnosisId" :disabled="!props.diagnosisId || !!props.readOnly"
@click="handleAdd" @click="handleAdd"
v-perms="['tcm.diagnosisTodo/add']" v-perms="['tcm.diagnosisTodo/add']"
> >
@@ -51,7 +51,7 @@
<el-table-column label="操作" width="120" fixed="right" align="center"> <el-table-column label="操作" width="120" fixed="right" align="center">
<template #default="{ row }"> <template #default="{ row }">
<el-button <el-button
v-if="row.status === 0 && row.can_cancel" v-if="!props.readOnly && row.status === 0 && row.can_cancel"
link link
type="danger" type="danger"
@click="handleCancel(row)" @click="handleCancel(row)"
@@ -120,6 +120,7 @@ interface Props {
diagnosisId: number | null | undefined diagnosisId: number | null | undefined
patientId?: number | null patientId?: number | null
patientName?: string patientName?: string
readOnly?: boolean
} }
const props = defineProps<Props>() const props = defineProps<Props>()
@@ -220,7 +221,7 @@ const disablePastDate = (date: Date) => {
} }
const handleAdd = () => { const handleAdd = () => {
if (!props.diagnosisId) { if (!props.diagnosisId || props.readOnly) {
feedback.msgWarning('诊单未保存,无法添加待办') feedback.msgWarning('诊单未保存,无法添加待办')
return return
} }
@@ -248,7 +249,6 @@ const handleAddSubmit = async () => {
content: addForm.content.trim(), content: addForm.content.trim(),
remind_time: Math.floor(remindMs / 1000) remind_time: Math.floor(remindMs / 1000)
}) })
feedback.msgSuccess('已创建')
addDialogVisible.value = false addDialogVisible.value = false
fetchList() fetchList()
} catch { } catch {
+6 -48
View File
@@ -573,54 +573,16 @@
</div> </div>
<el-empty v-else description="请先保存诊单后查看" /> <el-empty v-else description="请先保存诊单后查看" />
</el-tab-pane> </el-tab-pane>
<!-- 血糖血压记录标签页 --> <el-tab-pane label="日常记录" name="daily" :disabled="!formData.id" lazy>
<el-tab-pane label="血糖血压记录" name="blood" :disabled="!formData.id"> <daily-matrix
<blood-record-list
v-if="formData.id"
:diagnosis-id="Number(formData.id)"
:patient-id="Number(formData.patient_id)"
:read-only="viewOnly"
/>
<el-empty v-else description="请先保存诊单后再添加血糖血压记录" />
</el-tab-pane>
<!-- 饮食记录标签页 -->
<el-tab-pane label="饮食记录" name="diet" :disabled="!formData.id">
<diet-record-list
v-if="formData.id"
:diagnosis-id="Number(formData.id)"
:patient-id="Number(formData.patient_id)"
:read-only="viewOnly"
/>
<el-empty v-else description="请先保存诊单后再添加饮食记录" />
</el-tab-pane>
<!-- 运动打卡记录标签页 -->
<el-tab-pane label="运动打卡记录" name="exercise" :disabled="!formData.id">
<exercise-record-list
v-if="formData.id"
:diagnosis-id="Number(formData.id)"
:patient-id="Number(formData.patient_id)"
:read-only="viewOnly"
/>
<el-empty v-else description="请先保存诊单后再添加运动打卡记录" />
</el-tab-pane>
<!-- 待办事项标签页T5企微推送给创建人本人 -->
<el-tab-pane
label="待办事项"
name="todo"
:disabled="!formData.id"
lazy
v-if="hasPermission(['tcm.diagnosisTodo/lists'])"
>
<diagnosis-todo-list
v-if="formData.id" v-if="formData.id"
:diagnosis-id="Number(formData.id)" :diagnosis-id="Number(formData.id)"
:patient-id="Number(formData.patient_id)" :patient-id="Number(formData.patient_id)"
:age="formData.age"
:patient-name="formData.patient_name" :patient-name="formData.patient_name"
:read-only="viewOnly"
/> />
<el-empty v-else description="请先保存诊单后再添加待办事项" /> <el-empty v-else description="请先保存诊单后查看" />
</el-tab-pane> </el-tab-pane>
<!-- 病历记录标签页开方后自动显示 --> <!-- 病历记录标签页开方后自动显示 -->
@@ -746,10 +708,7 @@ import useUserStore from '@/stores/modules/user'
import useAppStore from '@/stores/modules/app' import useAppStore from '@/stores/modules/app'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
import { QuestionFilled } from '@element-plus/icons-vue' import { QuestionFilled } from '@element-plus/icons-vue'
import BloodRecordList from './components/BloodRecordList.vue' import DailyMatrix from './components/DailyMatrix.vue'
import DietRecordList from './components/DietRecordList.vue'
import ExerciseRecordList from './components/ExerciseRecordList.vue'
import DiagnosisTodoList from './components/DiagnosisTodoList.vue'
import CaseRecordList from './components/CaseRecordList.vue' import CaseRecordList from './components/CaseRecordList.vue'
import CallRecordPanel from './components/CallRecordPanel.vue' import CallRecordPanel from './components/CallRecordPanel.vue'
import ImChatRecordPanel from './components/ImChatRecordPanel.vue' import ImChatRecordPanel from './components/ImChatRecordPanel.vue'
@@ -1857,4 +1816,3 @@ defineExpose({
} }
} }
</style> </style>