diff --git a/public/templates/report-template.html b/public/templates/report-template.html
index f457a1a..23e65bb 100644
--- a/public/templates/report-template.html
+++ b/public/templates/report-template.html
@@ -68,7 +68,7 @@
.report-item {
margin-bottom: 40px;
- border: 1px solid #e0e0e0;
+ border: 1px solid #000;
border-radius: 8px;
overflow: hidden;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
@@ -79,14 +79,14 @@
}
.report-title {
- background-color: #4a90e2;
- color: white;
+ background-color: white;
+ color: black;
padding: 15px;
font-size: 18px;
/* 这里控制字体大小 */
font-weight: bold;
/* 这里控制字体粗细 */
- border-bottom: 1px solid #e0e0e0;
+ border-bottom: 1px solid #000;
}
.report-content {
@@ -295,9 +295,8 @@
.general-exam .exam-table td {
padding: 8px !important;
font-size: 18px !important;
- line-height: 1.5;
- height: 40px;
- /* 降低单元格高度 */
+ line-height: 1.5;
+ height: 40px; /* 降低单元格高度 */
}
/* 一般检查的小结 */
@@ -355,8 +354,8 @@
.report-title {
padding: 8px 10px;
font-size: 16px;
- background-color: #4a90e2 !important;
- color: white !important;
+ background-color: white !important;
+ color: black !important;
}
/* 内容区域 */
@@ -560,6 +559,15 @@
text-align: center !important;
font-weight: bold !important;
}
+
+ .preface-paragraphs {
+ margin-bottom: 20px !important;
+ line-height: 1.8 !important; /* 打印时保持相同的行间距 */
+ }
+
+ .preface-paragraphs p {
+ margin-bottom: 15px !important; /* 打印时保持段落间距 */
+ }
}
/* 添加首页样式 */
@@ -634,6 +642,7 @@
}
.preface-content .hospital-name {
+ margin-top: 60px;
margin-bottom: 20px;
font-weight: normal;
}
@@ -737,7 +746,13 @@
}
.preface-paragraphs {
- margin-bottom: 20px;
+ margin-bottom: 40px;
+ line-height: 2.5; /* 增加行间距 */
+ }
+
+ .preface-paragraphs p {
+ margin-bottom: 40px; /* 段落之间的间距 */
+ line-height: 2.5; /* 段落内的行间距 */
}
.preface-footer {
@@ -745,6 +760,7 @@
}
.hospital-name {
+ margin-top: 60px;
font-weight: bold;
}
@@ -839,7 +855,8 @@
-

+
健康
@@ -880,6 +897,9 @@
class="person_content">--
+
+ 兴和县卫生健康委员会
+
第1页
@@ -899,15 +919,15 @@
尊敬的先生/女士:
-
您好!欢迎参加国家基本公共卫生服务老年人健康体检项目。
+
您好!欢迎参加国家基本公共卫生服务老年人健康体检项目。
-
健康体检是在自我感觉健康的情况下,通过医学手段对身体各脏器的状态进行的检测。定期的健康体检可以帮助您及早发现健康状态下的危机,为您的健康保驾护航。
+
健康体检是在自我感觉健康的情况下,通过医学手段对身体各脏器的状态进行的检测。定期的健康体检可以帮助您及早发现健康状态下的危机,为您的健康保驾护航。
-
希望您仔细阅读并妥善保管这份体检报告,给予充分的重视。如有疑问请及时与我院进行联系。
+
希望您仔细阅读并妥善保管这份体检报告,给予充分的重视。如有疑问请及时与我院进行联系。
-
我们希望能够与您建立长期的联系,并为您建立健康档案,以便对您的健康状态进行长期的追踪,为您的健康提供长期的帮助和服务。
+
我们希望能够与您建立长期的联系,并为您建立健康档案,以便对您的健康状态进行长期的追踪,为您的健康提供长期的帮助和服务。
-
由于体检项目和检测手段所限,一次体检不能全部检出身体中的潜在隐患,一旦发现身体出现不适,请及时到医院进行就诊。
+
由于体检项目和检测手段所限,一次体检不能全部检出身体中的潜在隐患,一旦发现身体出现不适,请及时到医院进行就诊。
@@ -35,6 +33,7 @@ import { PatientitemsApi } from '@/api/inspect/inspectpatientitems'
import { PatientApi } from '@/api/inspect/inspectpatient'
import { ElLoading, ElMessage } from 'element-plus'
import { Refresh } from '@element-plus/icons-vue'
+import TemplateDrawer from '@/views/Department-entry/Drawer-Template.vue'
const props = defineProps({
patient: {
@@ -75,7 +74,6 @@ const checkPatientStatus = () => {
if (props.patient?.status) {
// 同时处理字符串和数字类型的状态值
isReadOnly.value = String(props.patient.status) === '1'
- console.log('患者状态:', props.patient.status, '只读模式:', isReadOnly.value)
}
}
@@ -132,7 +130,6 @@ const formatSummaryData = () => {
// 从DOM中获取各个标签页的数据
const getDataFromDOM = () => {
- console.log('尝试从DOM中获取数据...')
try {
const parentDoc = window.parent ? window.parent.document : document
@@ -160,7 +157,6 @@ const getDataFromDOM = () => {
for (const selector of selectorList) {
const element = parentDoc.querySelector(selector)
if (element) {
- console.log(`找到元素 ${selector}:`, element)
return element.value || ''
}
}
@@ -177,28 +173,15 @@ const getDataFromDOM = () => {
const urineSummary = getElementValue(selectors.urine)
const biochemicalSummary = getElementValue(selectors.biochemical)
- console.log('从DOM获取的数据:')
- console.log('一般检查小结:', generalSummary)
- console.log('超声检查所见:', ultrasoundFinding)
- console.log('超声检查结果:', ultrasoundDiagnosis)
- console.log('心电图检查所见:', ecgFinding)
- console.log('心电图检查结果:', ecgDiagnosis)
- console.log('血常规小结:', bloodSummary)
- console.log('尿常规小结:', urineSummary)
- console.log('生化小结:', biochemicalSummary)
-
// 如果没有找到一般检查小结,尝试从体检小结文本框获取
if (!generalSummary) {
- console.log('尝试从体检小结文本框获取数据...')
const generalTextarea =
parentDoc.querySelector('#体检小结') ||
parentDoc.querySelector('.体检小结') ||
parentDoc.querySelector('[placeholder*="体检小结"]')
if (generalTextarea) {
- console.log('找到体检小结文本框:', generalTextarea)
const generalText = generalTextarea.value || ''
- console.log('体检小结内容:', generalText)
// 更新汇总数据
return {
@@ -242,17 +225,14 @@ const loadPatientItems = async () => {
background: 'rgba(255, 255, 255, 0.7)'
})
- console.log('当前患者信息:', props.patient)
// 检查患者状态
checkPatientStatus()
// 优先使用props中的conclusionData
if (props.conclusionData) {
- console.log('从props获取conclusionData:', props.conclusionData)
summaryData.value = props.conclusionData
} else if (window.parent?.conclusionData) {
- console.log('父窗口conclusionData:', window.parent.conclusionData)
const parentData = window.parent.conclusionData
// 复制父组件的数据到本地
@@ -271,20 +251,17 @@ const loadPatientItems = async () => {
biochemical: { summary: parentData.biochemical?.summary || '' }
}
- console.log('从父窗口获取的汇总数据:', summaryData.value)
} else {
console.warn('父窗口中没有找到conclusionData,尝试从全局变量获取')
// 尝试从全局变量获取
if (window.conclusionData) {
- console.log('从全局变量获取conclusionData:', window.conclusionData)
summaryData.value = window.conclusionData
} else {
console.warn('全局变量中没有找到conclusionData,尝试从props获取')
// 尝试从props中获取数据
if (props.reportData && props.reportData.conclusionData) {
- console.log('从props.reportData中获取数据:', props.reportData.conclusionData)
summaryData.value = props.reportData.conclusionData
} else {
// 尝试直接从父组件的DOM中获取数据
@@ -301,7 +278,6 @@ const loadPatientItems = async () => {
// 格式化汇总数据并设置为可编辑文本
const formattedText = formatSummaryData()
- console.log('格式化后的文本:', formattedText)
editableSummary.value = formattedText
loading.close()
} catch (error) {
@@ -336,7 +312,6 @@ const saveSummary = async () => {
summaryResult: editableSummary.value
}
- console.log('保存汇总数据:', saveData)
// 调用API保存数据
const response = await PatientApi.updatemedicalSn(saveData)
@@ -371,8 +346,6 @@ const queryPatientData = async () => {
try {
const response = await PatientApi.getByMedicalSn(props.patient.medicalSn)
if (response && response.code === 200 && response.data) {
- console.log('查询到的患者数据:', response.data)
-
// 更新患者信息
if (response.data.summaryResult) {
editableSummary.value = response.data.summaryResult
@@ -381,7 +354,6 @@ const queryPatientData = async () => {
// 如果患者状态已更新,检查是否需要设置只读
if (response.data.status) {
isReadOnly.value = response.data.status === 2
- console.log('更新后的患者状态:', response.data.status, '只读模式:', isReadOnly.value)
}
}
} catch (error) {
@@ -407,6 +379,29 @@ watch(() => props.patient, (newVal) => {
}
}, { deep: true, immediate: true })
+// 抽屉可见性控制
+const drawerVisible = ref(false)
+
+// 打开模板抽屉
+const openTemplateDrawer = () => {
+ if (isReadOnly.value) {
+ ElMessage.warning('已检查患者不可修改汇总内容')
+ return
+ }
+ drawerVisible.value = true
+}
+
+// 插入选中的模板内容
+const insertTemplate = (templateContent) => {
+ if (isReadOnly.value) return
+
+ // 在当前光标位置或末尾插入模板内容
+ editableSummary.value += templateContent
+
+ // 可选:插入后关闭抽屉
+ drawerVisible.value = false
+}
+
// 暴露保存汇总方法给父组件调用
defineExpose({ saveSummary })
diff --git a/src/views/inspect/inspecttemplate/TemplateForm.vue b/src/views/inspect/inspecttemplate/TemplateForm.vue
new file mode 100644
index 0000000..652a08e
--- /dev/null
+++ b/src/views/inspect/inspecttemplate/TemplateForm.vue
@@ -0,0 +1,130 @@
+
+
+
+
\ No newline at end of file
diff --git a/src/views/inspect/inspecttemplate/index.vue b/src/views/inspect/inspecttemplate/index.vue
new file mode 100644
index 0000000..6f90c28
--- /dev/null
+++ b/src/views/inspect/inspecttemplate/index.vue
@@ -0,0 +1,196 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 新增
+
+ 搜索
+ 重置
+
+
+ 导出
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ scope.row.status === '1' ? '启用' : '禁用' }}
+
+
+
+
+
+
+
+ 编辑
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file