From 4c9fdc87987140e8b2c3f0dfc2f6608cdb6be774 Mon Sep 17 00:00:00 2001
From: WXL <wl_5969728@163.com>
Date: 星期三, 21 十月 2026 17:39:24 +0800
Subject: [PATCH] 青岛维护
---
src/views/business/maintain/maintainInfo.vue | 267 ++++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 253 insertions(+), 14 deletions(-)
diff --git a/src/views/business/maintain/maintainInfo.vue b/src/views/business/maintain/maintainInfo.vue
index a0d327a..dbe4550 100644
--- a/src/views/business/maintain/maintainInfo.vue
+++ b/src/views/business/maintain/maintainInfo.vue
@@ -1,21 +1,25 @@
<template>
<div class="maintenance-detail">
- <case-basic-info :case-id="caseId" :show-attachment="true" />
+ <case-basic-info :case-id="caseId" :show-attachment="true":column="3" />
<el-card class="assessment-card">
<div slot="header" class="clearfix">
<span class="detail-title">璇勪及鍚勯」璁板綍</span>
<el-button
+ v-if="!isReadOnly"
type="primary"
size="mini"
+ :loading="saveLoading"
@click="toggleEditMode"
style="float: right;margin-left: 20px;"
>
淇濆瓨缂栬緫
</el-button>
<el-button
+ v-if="!isReadOnly"
type="success"
size="mini"
+ :loading="saveLoading"
@click="accomplish"
style="float: right;margin-left: 20px;"
>
@@ -30,6 +34,7 @@
<div slot="header" class="clearfix">
<span class="detail-title">鍩瑰吇缁撴灉璁板綍</span>
<el-button
+ v-if="!isReadOnly"
type="primary"
size="mini"
icon="el-icon-plus"
@@ -52,20 +57,55 @@
/>
<el-table-column label="鍩瑰吇缁撴灉" align="center" prop="result">
<template slot-scope="scope">
+ <!-- 闃虫�х粨鏋滃甫鎮诞鎻愮ず -->
+ <el-tooltip
+ v-if="
+ scope.row.result === '闃虫��' && scope.row.positiveDetails
+ "
+ effect="light"
+ placement="top"
+ :open-delay="200"
+ popper-class="custom-positive-tooltip"
+ >
+ <div slot="content">
+ <div
+ style="font-weight: bold; color: #f56c6c; margin-bottom: 8px;"
+ >
+ <i class="el-icon-warning"></i> 闃虫�х粨鏋滆鎯�
+ </div>
+ <div
+ style="color: #606266; line-height: 1.6; white-space: pre-wrap;"
+ >
+ {{ scope.row.positiveDetails }}
+ </div>
+ </div>
+ <el-tag
+ type="danger"
+ effect="plain"
+ @click="handleResultClick(scope.row)"
+ style="cursor: pointer;"
+ >
+ {{ scope.row.result }}
+ <i class="el-icon-info" style="margin-left: 4px;"></i>
+ </el-tag>
+ </el-tooltip>
+
+ <!-- 闃虫�т絾娌℃湁璇︽儏鐨� -->
<el-tag
- :type="scope.row.result === '闃存��' ? 'success' : 'danger'"
+ v-else-if="
+ scope.row.result === '闃虫��' && !scope.row.positiveDetails
+ "
+ type="danger"
effect="plain"
@click="handleResultClick(scope.row)"
style="cursor: pointer;"
>
{{ scope.row.result }}
- <i
- v-if="
- scope.row.result === '闃虫��' && scope.row.positiveDetails
- "
- class="el-icon-info"
- style="margin-left: 4px;"
- ></i>
+ </el-tag>
+
+ <!-- 闃存�х粨鏋� -->
+ <el-tag v-else type="success" effect="plain">
+ {{ scope.row.result }}
</el-tag>
</template>
</el-table-column>
@@ -85,6 +125,7 @@
</template>
</el-table-column>
<el-table-column
+ v-if="!isReadOnly"
label="鎿嶄綔"
align="center"
width="200"
@@ -116,6 +157,7 @@
<div slot="header" class="clearfix">
<span class="detail-title">鎶ょ悊鏍告煡璁板綍</span>
<el-button
+ v-if="!isReadOnly"
type="primary"
size="mini"
icon="el-icon-plus"
@@ -161,6 +203,7 @@
</template>
</el-table-column>
<el-table-column
+ v-if="!isReadOnly"
label="鎿嶄綔"
align="center"
width="180"
@@ -193,7 +236,7 @@
<liver-kidney-panel
ref="liverKidney"
:initial-data="assessmentData.liverKidney"
- :is-editing="isEdit && activeTab === 'liverKidney'"
+ :is-editing="!isReadOnly && isEdit && activeTab === 'liverKidney'"
@data-change="handleLiverKidneyDataChange"
/>
</el-tab-pane>
@@ -203,7 +246,7 @@
<blood-routine-panel
ref="bloodRoutine"
:initial-data="assessmentData.bloodRoutine"
- :is-editing="isEdit && activeTab === 'bloodRoutine'"
+ :is-editing="!isReadOnly && isEdit && activeTab === 'bloodRoutine'"
@data-change="handleBloodRoutineDataChange"
/>
</el-tab-pane>
@@ -213,8 +256,32 @@
<urine-routine-panel
ref="urineRoutine"
:initial-data="assessmentData.urineRoutine"
- :is-editing="isEdit && activeTab === 'urineRoutine'"
+ :is-editing="!isReadOnly && isEdit && activeTab === 'urineRoutine'"
@data-change="handleUrineRoutineDataChange"
+ />
+ </el-tab-pane>
+ <el-tab-pane label="蹇冭剰鍖栭獙" name="heartLab">
+ <heart-lab-panel
+ ref="heartLab"
+ :initial-data="assessmentData.heartLab"
+ :is-editing="!isReadOnly && isEdit && activeTab === 'heartLab'"
+ @data-change="handleHeartLabDataChange"
+ />
+ </el-tab-pane>
+ <el-tab-pane label="鑲鸿剰鍖栭獙" name="lungLab">
+ <lung-lab-panel
+ ref="lungLab"
+ :initial-data="assessmentData.lungLab"
+ :is-editing="!isReadOnly && isEdit && activeTab === 'lungLab'"
+ @data-change="handleLungLabDataChange"
+ />
+ </el-tab-pane>
+ <el-tab-pane label="鑳拌吅鍖栭獙" name="pancreasLab">
+ <pancreas-lab-panel
+ ref="pancreasLab"
+ :initial-data="assessmentData.pancreasLab"
+ :is-editing="!isReadOnly && isEdit && activeTab === 'pancreasLab'"
+ @data-change="handlePancreasLabDataChange"
/>
</el-tab-pane>
</el-tabs>
@@ -457,12 +524,16 @@
<script>
import { maintainList, maintainedit, maintainAdd } from "@/api/businessApi";
+import { getDonatebaseinfo } from "@/api/project/donatebaseinfo";
import Pagination from "@/components/Pagination";
import UploadAttachment from "@/components/UploadAttachment";
import FilePreviewDialog from "@/components/FilePreviewDialog";
import LiverKidneyPanel from "@/components/MaintainComponents/LiverKidneyPanel.vue";
import BloodRoutinePanel from "@/components/MaintainComponents/BloodRoutinePanel.vue";
import UrineRoutinePanel from "@/components/MaintainComponents/UrineRoutinePanel.vue";
+import HeartLabPanel from "@/components/MaintainComponents/HeartLabPanel.vue";
+import LungLabPanel from "@/components/MaintainComponents/LungLabPanel.vue";
+import PancreasLabPanel from "@/components/MaintainComponents/PancreasLabPanel.vue";
import CaseBasicInfo from "@/components/CaseBasicInfo";
import store from "@/store";
import dayjs from "dayjs";
@@ -476,7 +547,10 @@
LiverKidneyPanel,
BloodRoutinePanel,
UrineRoutinePanel,
- CaseBasicInfo
+ CaseBasicInfo,
+ HeartLabPanel,
+ LungLabPanel,
+ PancreasLabPanel
},
dicts: [
"sys_donornode",
@@ -493,6 +567,7 @@
isEdit: true,
currentMaintenanceId: null,
isEditMode: false,
+ saveLoading: false,
form: {
id: undefined,
caseNo: "",
@@ -595,6 +670,9 @@
liverKidney: {},
bloodRoutine: {},
urineRoutine: {},
+ heartLab: {}, // 鏂板
+ lungLab: {}, // 鏂板
+ pancreasLab: {}, // 鏂板
cultureResults: [],
nursingRecords: []
}
@@ -608,6 +686,12 @@
watch: {
$route(to, from) {
this.loadMaintenanceData();
+ }
+ },
+ computed: {
+ // 鏌ョ湅妯″紡锛氬彧璇伙紝绂佺敤琛ㄥ崟骞堕殣钘忎繚瀛樻寜閽�
+ isReadOnly() {
+ return this.$route.query.mode === "view";
}
},
methods: {
@@ -667,6 +751,15 @@
}
if (itemDescData.urineRoutine) {
this.assessmentData.urineRoutine = itemDescData.urineRoutine;
+ }
+ if (itemDescData.heartLab) {
+ this.assessmentData.heartLab = itemDescData.heartLab;
+ }
+ if (itemDescData.lungLab) {
+ this.assessmentData.lungLab = itemDescData.lungLab;
+ }
+ if (itemDescData.pancreasLab) {
+ this.assessmentData.pancreasLab = itemDescData.pancreasLab;
}
} catch (error) {
console.error("瑙f瀽itemDesc JSON澶辫触:", error);
@@ -728,13 +821,26 @@
},
// 淇濆瓨鎵�鏈夋暟鎹�
async handleSave() {
+ if (this.saveLoading) return;
+ this.saveLoading = true;
try {
+ // 鏂板鏃舵牎楠屾槸鍚﹀凡鏈夌浉鍚屾偅鑰�
+ if (!this.currentMaintenanceId) {
+ const exists = await this.checkPatientExists();
+ if (exists) {
+ this.$message.warning("璇ユ偅鑰呭凡瀛樺湪锛岃鍕块噸澶嶆坊鍔�");
+ return;
+ }
+ }
const saveData = {
...this.form,
itemDesc: {
liverKidney: this.assessmentData.liverKidney,
bloodRoutine: this.assessmentData.bloodRoutine,
urineRoutine: this.assessmentData.urineRoutine,
+ heartLab: this.assessmentData.heartLab, // 鏂板
+ lungLab: this.assessmentData.lungLab, // 鏂板
+ pancreasLab: this.assessmentData.pancreasLab, // 鏂板
cultureResults: this.cultureList,
nursingRecords: this.recordList
}
@@ -771,9 +877,40 @@
} catch (error) {
console.error("淇濆瓨鏁版嵁澶辫触:", error);
this.$message.error("淇濆瓨澶辫触");
+ } finally {
+ this.saveLoading = false;
}
},
-
+ // 鏂板鏃舵牎楠屾槸鍚﹀凡鏈夌浉鍚屾偅鑰咃紙鎸変綇闄㈠彿锛�
+ async checkPatientExists() {
+ let inpatientno = this.form.inpatientno;
+ if (!inpatientno && this.caseId) {
+ try {
+ const caseRes = await getDonatebaseinfo(this.caseId);
+ inpatientno = (caseRes.data && caseRes.data.inpatientno) || "";
+ } catch (e) {
+ inpatientno = "";
+ }
+ }
+ if (!inpatientno) return false;
+ try {
+ const res = await maintainList({ inpatientno, pageNum: 1, pageSize: 1 });
+ const list = res.data || [];
+ return list.some(item => item && item.id != null && item.id !== "");
+ } catch (e) {
+ return false;
+ }
+ },
+ // 5. 鍦� methods 涓坊鍔犳暟鎹鐞嗘柟娉�
+ handleHeartLabDataChange(data) {
+ this.assessmentData.heartLab = data;
+ },
+ handleLungLabDataChange(data) {
+ this.assessmentData.lungLab = data;
+ },
+ handlePancreasLabDataChange(data) {
+ this.assessmentData.pancreasLab = data;
+ },
// 鍒囨崲缂栬緫妯″紡
toggleEditMode() {
// this.isEdit = !this.isEdit;
@@ -1274,4 +1411,106 @@
color: #f56c6c;
font-weight: bold;
}
+.custom-positive-tooltip {
+ max-width: 400px;
+}
+
+/* ===== 绾歌川琛ㄦ牸缃戞牸鏍峰紡 ===== */
+.paper-card >>> .el-card__body {
+ padding: 0;
+}
+
+.paper-form {
+ border-left: 1px solid #d0d3db;
+ background: #fff;
+}
+
+.paper-form >>> .form-row {
+ display: flex;
+ width: 100%;
+ border-top: 1px solid #d0d3db;
+ /* 涓婄Щ1px涓庝笂涓�琛岀殑border-bottom閲嶅彔锛屼袱琛屼箣闂村彧鏄剧ず涓�鏉�1px缁嗙嚎 */
+ margin-top: -1px;
+}
+.paper-form >>> .form-row:first-child {
+ margin-top: 0;
+}
+
+/* 琛屽熬绌虹櫧濉厖锛氫笉婊℃暣琛岀殑鍙充晶鑷姩琛ヤ竴涓┖鐧芥牸瀛愶紝缃戞牸淇濇寔闂悎锛堝彸渚ч�傚綋鐣欑櫧锛� */
+.paper-form >>> .form-row::after {
+ content: "";
+ flex: 1 1 0;
+ min-height: 42px;
+ background: linear-gradient(to left, #d0d3db 1px, transparent 1px),
+ linear-gradient(to top, #d0d3db 1px, transparent 1px);
+ background-color: #fff;
+}
+
+.paper-form >>> .el-form-item {
+ flex: 0 0 33.3333%;
+ display: flex;
+ margin: 0;
+ background: #fff;
+ border-right: 1px solid #d0d3db;
+ border-bottom: 1px solid #d0d3db;
+}
+.paper-form >>> .el-form-item::after,
+.paper-form >>> .el-form-item::before {
+ display: none;
+}
+
+.paper-form >>> .col-1-3 { flex: 0 0 33.3333%; }
+.paper-form >>> .col-half { flex: 0 0 50%; }
+.paper-form >>> .col-2-3 { flex: 0 0 66.6666%; }
+.paper-form >>> .col-full { flex: 0 0 100%; }
+
+.paper-form >>> .el-form-item__label {
+ flex: 0 0 150px;
+ width: 150px !important;
+ float: none;
+ padding: 0 8px !important;
+ background: #ecf5ff;
+ border-right: 1px solid #d0d3db;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ text-align: center;
+ font-size: 13px;
+ font-weight: 600;
+ color: #2c3038;
+ line-height: 1.3;
+ white-space: nowrap;
+}
+.paper-form >>> .el-form-item.is-required:not(.is-no-asterisk) > .el-form-item__label:before {
+ color: #f56c6c;
+ margin-right: 2px;
+}
+
+.paper-form >>> .el-form-item__content {
+ flex: 1;
+ margin-left: 0 !important;
+ display: flex;
+ align-items: center;
+ flex-wrap: wrap;
+ padding: 6px 10px;
+ background: #fff;
+ min-height: 42px;
+ line-height: 1.4;
+}
+
+/* 鎺т欢瀹藉害閫備腑锛屼笉閾烘弧鏁存牸锛堝唴瀹圭煭鏃惰緭鍏ユ涓嶅啀鎷夊緱寰堥暱锛� */
+.paper-form >>> .el-form-item__content .el-input,
+.paper-form >>> .el-form-item__content .el-select,
+.paper-form >>> .el-form-item__content .el-cascader {
+ width: 220px;
+ max-width: 100%;
+}
+.paper-form >>> .el-form-item__content .el-date-editor {
+ width: 240px;
+ max-width: 100%;
+}
+.paper-form >>> .el-form-item__content .el-range-editor {
+ width: 360px;
+ max-width: 100%;
+}
</style>
--
Gitblit v1.9.3