日常记录
归总 血糖、饮食、运动、备注、代办
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -3,7 +3,7 @@
|
||||
<div class="toolbar">
|
||||
<el-button
|
||||
type="primary"
|
||||
:disabled="!props.diagnosisId"
|
||||
:disabled="!props.diagnosisId || !!props.readOnly"
|
||||
@click="handleAdd"
|
||||
v-perms="['tcm.diagnosisTodo/add']"
|
||||
>
|
||||
@@ -51,7 +51,7 @@
|
||||
<el-table-column label="操作" width="120" fixed="right" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
v-if="row.status === 0 && row.can_cancel"
|
||||
v-if="!props.readOnly && row.status === 0 && row.can_cancel"
|
||||
link
|
||||
type="danger"
|
||||
@click="handleCancel(row)"
|
||||
@@ -120,6 +120,7 @@ interface Props {
|
||||
diagnosisId: number | null | undefined
|
||||
patientId?: number | null
|
||||
patientName?: string
|
||||
readOnly?: boolean
|
||||
}
|
||||
|
||||
const props = defineProps<Props>()
|
||||
@@ -220,7 +221,7 @@ const disablePastDate = (date: Date) => {
|
||||
}
|
||||
|
||||
const handleAdd = () => {
|
||||
if (!props.diagnosisId) {
|
||||
if (!props.diagnosisId || props.readOnly) {
|
||||
feedback.msgWarning('诊单未保存,无法添加待办')
|
||||
return
|
||||
}
|
||||
@@ -248,7 +249,6 @@ const handleAddSubmit = async () => {
|
||||
content: addForm.content.trim(),
|
||||
remind_time: Math.floor(remindMs / 1000)
|
||||
})
|
||||
feedback.msgSuccess('已创建')
|
||||
addDialogVisible.value = false
|
||||
fetchList()
|
||||
} catch {
|
||||
|
||||
Reference in New Issue
Block a user