From c8e9849cb5f24848df0174c13bfbbff37bb08a5a Mon Sep 17 00:00:00 2001
From: WXL <wl_5969728@163.com>
Date: 星期二, 21 七月 2026 15:45:30 +0800
Subject: [PATCH] 维护
---
vue.config.js | 3
src/components/MaintainComponents/UrineRoutinePanel.vue | 241
src/views/project/donatebaseinfo/index.vue | 54
src/views/business/affirm/index.vue | 4
src/views/project/donatefinishcheck/index.vue | 30
src/views/project/donateannex/index.vue | 34
src/views/business/GetWitness/GetWitnessInfo.vue | 783 ++-
src/components/MaintainComponents/PancreasLabPanel.vue | 919 +++
src/views/business/affirm/affirmInfo.vue | 542 +
src/views/business/appear/CaseDetailPreview.vue | 2
src/components/MaintainComponents/HeartLabPanel.vue | 1173 +++++
src/views/business/course/components/MedicalAssessmentStage.vue | 385 -
src/views/project/donationdetails/index.vue | 26
src/views/business/course/components/DonationConfirmStage.vue | 243
src/views/business/decide/DecideInfo.vue | 202
src/views/project/donateorgan/index.vue | 4
src/views/business/course/components/OrganUtilizationStage.vue | 622 +
src/components/MaintainComponents/LiverKidneyPanel.vue | 406 +
src/components/MaintainComponents/BloodRoutinePanel.vue | 147
src/views/business/course/components/EthicalReviewStage.vue | 10
src/views/business/allocation/allocationInfo.vue | 872 +--
src/views/business/ethicalReview/index.vue | 4
src/views/project/unitCost/particulars/index.vue | 9
src/views/business/transfer/TransportEdit.vue | 48
src/views/business/ethicalReview/ethicalReviewInfo.vue | 73
src/views/business/course/components/DeathJudgmentStage.vue | 316
src/views/project/donatereview/index.vue | 24
src/views/business/appear/index.vue | 1072 +--
src/views/business/OrganUtilization/OrganUtilizationInfo.vue | 582 +
src/views/project/donateconsolationfund/index.vue | 32
src/views/business/course/components/OrganProcurementStage.vue | 789 ++-
src/components/CaseBasicInfo/index.vue | 32
src/views/business/maintain/maintainInfo.vue | 112
管理端7.20.zip | 0
src/views/business/assess/assessInfo.vue | 337 -
src/assets/logo/Hrs.png | 0
src/views/project/donatebaseinfo/EditCaseModal.vue | 808 ++-
dist (2).zip | 0
src/views/project/donatefollowup/index.vue | 13
src/views/business/course/components/OrganAllocationStage.vue | 1233 ++++
src/views/business/allocation/index.vue | 2
src/views/business/course/components/DonorMaintenanceStage.vue | 50
src/views/business/maintain/index.vue | 47
src/views/business/course/index.vue | 6
/dev/null | 0
src/views/business/assess/index.vue | 10
src/views/login.vue | 96
src/components/MaintainComponents/LungLabPanel.vue | 1250 +++++
src/views/business/appear/caseDetail.vue | 110
src/views/business/course/components/components/UrineRoutinePanel.vue | 224
src/views/project/donatefinish/index.vue | 34
51 files changed, 9,930 insertions(+), 4,085 deletions(-)
diff --git "a/\347\256\241\347\220\206\347\253\257 \0503\051.zip" "b/dist \0502\051.zip"
similarity index 90%
copy from "\347\256\241\347\220\206\347\253\257 \0503\051.zip"
copy to "dist \0502\051.zip"
index 56e4c0d..c97fd34 100644
--- "a/\347\256\241\347\220\206\347\253\257 \0503\051.zip"
+++ "b/dist \0502\051.zip"
Binary files differ
diff --git a/src/assets/logo/Hrs.png b/src/assets/logo/Hrs.png
new file mode 100644
index 0000000..746d78e
--- /dev/null
+++ b/src/assets/logo/Hrs.png
Binary files differ
diff --git a/src/components/CaseBasicInfo/index.vue b/src/components/CaseBasicInfo/index.vue
index b992cc3..1fa9b10 100644
--- a/src/components/CaseBasicInfo/index.vue
+++ b/src/components/CaseBasicInfo/index.vue
@@ -24,13 +24,15 @@
<el-descriptions v-if="basicData" :column="column" border>
<!-- 1. 浣忛櫌鍙� -->
- <el-descriptions-item label="浣忛櫌鍙�">
- {{ basicData.inpatientno || "--" }}
+ <el-descriptions-item label="鎹愮尞缂栧彿">
+ {{ basicData.caseNo || "鏃�" }}
</el-descriptions-item>
-
+ <el-descriptions-item label="浣忛櫌鍙�">
+ {{ basicData.inpatientno || "鏃�" }}
+ </el-descriptions-item>
<!-- 2. 娼滃湪鎹愮尞鑰呭鍚� -->
<el-descriptions-item label="鎹愮尞鑰呭鍚�">
- {{ basicData.name || basicData.donorName || "--" }}
+ {{ basicData.name || basicData.donorName || "鏃�" }}
</el-descriptions-item>
<!-- 3. 鎬у埆/骞撮緞 -->
@@ -51,7 +53,7 @@
<!-- 4. 璇佷欢鍙风爜 -->
<el-descriptions-item label="璇佷欢鍙风爜">
- {{ basicData.idcardno || basicData.idCardNo || "--" }}
+ {{ basicData.idcardno || basicData.idCardNo || "鏃�" }}
</el-descriptions-item>
<!-- 5. 琛�鍨� -->
@@ -61,25 +63,33 @@
</template>
<template v-else>--</template>
</el-descriptions-item>
+ <el-descriptions-item label="浼犳煋鐥�">
+ <template v-if="basicData.infectious">
+ <span v-for="item in basicData.infectious.split(',')"
+ ><dict-tag :options="dict.type.sys_Infectious" :value="item" />
+ </span>
+ </template>
+ <template v-else>--</template>
+ </el-descriptions-item>
<!-- 6. 鐤剧梾璇婃柇 -->
<el-descriptions-item label="鐤剧梾璇婃柇">
- {{ basicData.diagnosisname || basicData.diagnosis || "--" }}
+ {{ basicData.diagnosisname || basicData.diagnosis || "鏃�" }}
</el-descriptions-item>
<!-- 7. 鎵�鍦ㄥ尰鐤楁満鏋� -->
<el-descriptions-item label="鎵�鍦ㄥ尰鐤楁満鏋�">
- {{ basicData.currentMedicalInstitution || "--" }}
+ {{ basicData.currentMedicalInstitution || "鏃�" }}
</el-descriptions-item>
<!-- 8. 鍗忚皟鍛� -->
<el-descriptions-item label="鍗忚皟鍛�">
- {{ basicData.coordinatorName || basicData.contactPerson || "--" }}
+ {{ basicData.coordinatorName || basicData.contactPerson || "鏃�" }}
</el-descriptions-item>
<!-- 9. 涓婃姤鏃堕棿 -->
<el-descriptions-item label="涓婃姤鏃堕棿">
- {{ formatDateTime(basicData.reportTime) || "--" }}
+ {{ formatDateTime(basicData.reportTime) || "鏃�" }}
</el-descriptions-item>
<!-- 10. 妗堜緥鐘舵�� -->
@@ -185,7 +195,8 @@
"sys_user_sex",
"sys_BloodType",
"sys_DonationCategory",
- "sys_donornode"
+ "sys_donornode",
+ "sys_Infectious"
],
data() {
return {
@@ -305,6 +316,7 @@
age: apiData.age,
ageunit: apiData.ageunit,
inpatientno: apiData.inpatientno,
+ infectious: apiData.infectious,
currentMedicalInstitution: apiData.currentMedicalInstitution,
workflow: apiData.workflow,
bloodType: apiData.bloodType || apiData.bloodtype,
diff --git a/src/components/MaintainComponents/BloodRoutinePanel.vue b/src/components/MaintainComponents/BloodRoutinePanel.vue
index b91ec14..0f545ee 100644
--- a/src/components/MaintainComponents/BloodRoutinePanel.vue
+++ b/src/components/MaintainComponents/BloodRoutinePanel.vue
@@ -65,6 +65,43 @@
header-align="center"
align="center"
>
+ <!-- 鑷畾涔夊垪澶� -->
+ <template #header>
+ <div class="custom-column-header">
+ <div class="header-content" @click.stop="handleEditColumn(index)">
+ <span class="header-label">{{
+ col.label.replace("\n", " ")
+ }}</span>
+ <el-tooltip
+ v-if="col.remark"
+ :content="col.remark"
+ placement="top"
+ >
+ <i class="el-icon-info header-remark-icon"></i>
+ </el-tooltip>
+ </div>
+ <div class="header-actions" v-if="isEditing">
+ <el-tooltip content="缂栬緫鏃堕棿" placement="top">
+ <el-button
+ size="mini"
+ type="text"
+ icon="el-icon-edit"
+ class="header-btn"
+ @click.stop="handleEditColumn(index)"
+ />
+ </el-tooltip>
+ <el-tooltip content="鍒犻櫎姝ゅ垪" placement="top">
+ <el-button
+ size="mini"
+ type="text"
+ icon="el-icon-delete"
+ class="header-btn delete-btn"
+ @click.stop="handleDeleteColumnByIndex(index)"
+ />
+ </el-tooltip>
+ </div>
+ </div>
+ </template>
<template #default="scope">
<div class="cell-content-wrapper">
<el-input
@@ -411,7 +448,57 @@
this.attachments = [...this.internalData.attachments];
}
},
+// 缂栬緫鎸囧畾绱㈠紩鐨勫垪
+handleEditColumn(index) {
+ if (!this.isEditing) return;
+ this.editingColumnIndex = index;
+ const column = this.dynamicColumns[index];
+ this.columnForm = {
+ date: column.date || '',
+ time: column.time || '',
+ remark: column.remark || ''
+ };
+ this.columnDialogVisible = true;
+ this.$nextTick(() => {
+ this.$refs.columnFormB && this.$refs.columnFormB.clearValidate();
+ });
+},
+// 閫氳繃绱㈠紩鍒犻櫎鍒楋紙甯︾‘璁わ級
+handleDeleteColumnByIndex(index) {
+ this.$confirm(
+ `纭畾瑕佸垹闄ゃ��${this.dynamicColumns[index].label.replace('\n', ' ')}銆嶈繖涓椂闂寸偣鐨勬墍鏈夋暟鎹悧锛焋,
+ '鍒犻櫎纭',
+ {
+ confirmButtonText: '纭畾鍒犻櫎',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }
+ ).then(() => {
+ // 鍒犻櫎鍒�
+ this.dynamicColumns.splice(index, 1);
+
+ // 鍚屾鍒犻櫎姣忚瀵瑰簲鐨勬暟鎹�
+ this.tableData.forEach(row => {
+ if (row.values && row.values.length > index) {
+ row.values.splice(index, 1);
+ }
+ });
+
+ // 瑙﹀彂閲嶆柊娓叉煋
+ this.tableKey += 1;
+
+ // 淇濆瓨鏁版嵁鍙樻洿
+ this.saveData();
+
+ this.$message({
+ type: 'success',
+ message: '鏃堕棿鐐瑰凡鍒犻櫎'
+ });
+ }).catch(() => {
+ // 鍙栨秷鍒犻櫎锛屼笉鍋氫换浣曟搷浣�
+ });
+},
// 鍒濆鍖栭粯璁よ〃鏍兼暟鎹�
initTableData() {
const medicalItems = this.getMedicalItems();
@@ -983,7 +1070,67 @@
font-size: 13px;
margin-left: 8px;
}
+/* 鑷畾涔夊垪澶存牱寮� */
+.custom-column-header {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ gap: 4px;
+ padding: 4px 0;
+}
+.header-content {
+ display: flex;
+ align-items: center;
+ gap: 4px;
+ cursor: pointer;
+ transition: color 0.2s;
+ white-space: nowrap;
+}
+
+.header-content:hover {
+ color: #409eff;
+}
+
+.header-label {
+ font-size: 13px;
+ line-height: 1.4;
+}
+
+.header-remark-icon {
+ color: #909399;
+ font-size: 12px;
+ cursor: help;
+}
+
+.header-actions {
+ display: flex;
+ gap: 4px;
+ opacity: 0;
+ transition: opacity 0.2s;
+}
+
+.custom-column-header:hover .header-actions {
+ opacity: 1;
+}
+
+.header-btn {
+ padding: 2px 4px !important;
+ font-size: 14px !important;
+}
+
+.header-btn.delete-btn {
+ color: #f56c6c !important;
+}
+
+.header-btn.delete-btn:hover {
+ color: #c0392b !important;
+}
+
+/* 鍒楀ご缂栬緫鎸夐挳鍦ㄧ紪杈戞ā寮忎笅濮嬬粓鏄剧ず */
+.is-editing .header-actions {
+ opacity: 1;
+}
/* 鍝嶅簲寮忚璁� */
@media (max-width: 768px) {
.medical-panel {
diff --git a/src/components/MaintainComponents/HeartLabPanel.vue b/src/components/MaintainComponents/HeartLabPanel.vue
new file mode 100644
index 0000000..dd2a385
--- /dev/null
+++ b/src/components/MaintainComponents/HeartLabPanel.vue
@@ -0,0 +1,1173 @@
+<template>
+ <div class="medical-panel">
+ <div class="panel-header">
+ <h3>蹇冭剰鍖栭獙妫�鏌�</h3>
+ <div class="panel-actions">
+ <el-button
+ v-if="isEditing"
+ type="primary"
+ size="small"
+ @click="addColumn"
+ icon="el-icon-plus"
+ >
+ 鏂板璁板綍鍒�
+ </el-button>
+ <el-tooltip content="鍒锋柊琛ㄦ牸甯冨眬" placement="top">
+ <el-button
+ size="small"
+ @click="forceTableLayout"
+ icon="el-icon-refresh"
+ >
+ 鍒锋柊甯冨眬
+ </el-button>
+ </el-tooltip>
+ </div>
+ </div>
+
+ <el-table
+ :data="tableData"
+ border
+ style="width: 100%"
+ class="medical-table"
+ :key="tableKey"
+ @header-dragend="handleHeaderDragEnd"
+ v-loading="tableLoading"
+ >
+ <el-table-column
+ prop="itemName"
+ label="妫�娴嬮」鐩�"
+ width="220"
+ fixed
+ class-name="leave-alone"
+ >
+ <template #default="scope">
+ <div class="item-name-cell">
+ <span :class="{ 'required-item': scope.row.required }">
+ {{ scope.row.itemName }}
+ </span>
+ <el-tooltip
+ v-if="scope.row.reference"
+ :content="`鍙傝�冭寖鍥�: ${scope.row.reference}`"
+ placement="top"
+ >
+ <i class="el-icon-info reference-icon"></i>
+ </el-tooltip>
+ </div>
+ </template>
+ </el-table-column>
+
+ <el-table-column
+ v-for="(col, index) in dynamicColumns"
+ :key="col.key"
+ :label="col.label"
+ :min-width="180"
+ :resizable="isEditing"
+ header-align="center"
+ align="center"
+ >
+ <template #header>
+ <div class="custom-column-header">
+ <div class="header-content" @click.stop="handleEditColumn(index)">
+ <span class="header-label">{{
+ col.label.replace("\n", " ")
+ }}</span>
+ <el-tooltip
+ v-if="col.remark"
+ :content="col.remark"
+ placement="top"
+ >
+ <i class="el-icon-info header-remark-icon"></i>
+ </el-tooltip>
+ </div>
+ <div class="header-actions" v-if="isEditing">
+ <el-tooltip content="缂栬緫鏃堕棿" placement="top">
+ <el-button
+ size="mini"
+ type="text"
+ icon="el-icon-edit"
+ class="header-btn"
+ @click.stop="handleEditColumn(index)"
+ />
+ </el-tooltip>
+ <el-tooltip content="鍒犻櫎姝ゅ垪" placement="top">
+ <el-button
+ size="mini"
+ type="text"
+ icon="el-icon-delete"
+ class="header-btn delete-btn"
+ @click.stop="handleDeleteColumnByIndex(index)"
+ />
+ </el-tooltip>
+ </div>
+ </div>
+ </template>
+
+ <template #default="scope">
+ <!-- 鏂囨湰/鏁板�艰緭鍏ョ被椤圭洰 -->
+ <div
+ v-if="scope.row.type === 'number' || scope.row.type === 'text'"
+ class="cell-content-wrapper"
+ >
+ <el-input
+ v-if="isEditing"
+ v-model="scope.row.values[index]"
+ size="small"
+ :placeholder="getPlaceholder(scope.row)"
+ @blur="handleValueChange(scope.row, index)"
+ class="value-input"
+ />
+ <div v-else class="value-display-container">
+ <span class="value-text">{{
+ scope.row.values[index] || "-"
+ }}</span>
+ <span
+ v-if="scope.row.values[index] && scope.row.unit"
+ class="unit-text"
+ >
+ {{ scope.row.unit }}
+ </span>
+ </div>
+ </div>
+
+ <!-- 鏂囨湰鎻忚堪绫婚」鐩紙蹇冪數鍥俱�佸績鑴忚秴澹帮級 -->
+ <div
+ v-else-if="scope.row.type === 'description'"
+ class="cell-description-wrapper"
+ >
+ <el-input
+ v-if="isEditing"
+ v-model="scope.row.values[index]"
+ type="textarea"
+ :rows="3"
+ size="small"
+ placeholder="璇疯緭鍏ユ枃瀛楁弿杩�..."
+ @blur="handleValueChange(scope.row, index)"
+ />
+ <div v-else class="description-display">
+ {{ scope.row.values[index] || "鏈~鍐�" }}
+ </div>
+ </div>
+ </template>
+ </el-table-column>
+ </el-table>
+
+ <!-- 闄勪欢鍖哄煙锛堟寜绫诲瀷鍒嗙粍锛� -->
+ <!-- 闄勪欢鍖哄煙锛堟寜绫诲瀷鍒嗙粍锛� -->
+<div class="attachment-group-section">
+ <!-- 蹇冪數鍥鹃檮浠� -->
+ <div class="attachment-category">
+ <h4 class="category-title">
+ <i class="el-icon-document"></i> 蹇冪數鍥鹃檮浠�
+ </h4>
+ <UploadAttachment
+ ref="ecgUpload"
+ :file-list="ecgFileList"
+ :limit="10"
+ :accept="attachmentAccept"
+ :multiple="true"
+ @change="files => handleCategoryAttachmentChange('ecg', files)"
+ @upload-success="
+ payload => handleCategoryUploadSuccess('ecg', payload)
+ "
+ @upload-error="payload => handleCategoryUploadError('ecg', payload)"
+ @remove="file => handleCategoryAttachmentRemove('ecg', file)"
+ />
+
+ <!-- 蹇冪數鍥鹃檮浠跺垪琛� -->
+ <div v-if="attachments.ecg && attachments.ecg.length > 0" class="attachment-list">
+ <div class="list-title">宸蹭笂浼犻檮浠� ({{ attachments.ecg.length }})</div>
+ <el-table :data="attachments.ecg" style="width: 100%" size="small">
+ <el-table-column label="鏂囦欢鍚�" min-width="200">
+ <template slot-scope="scope">
+ <i
+ class="el-icon-document"
+ :style="{ color: getFileIconColor(scope.row.fileName) }"
+ ></i>
+ <span class="file-name">{{ scope.row.fileName }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column label="鏂囦欢绫诲瀷" width="100">
+ <template slot-scope="scope">
+ <el-tag :type="getFileTagType(scope.row.fileName)" size="small">
+ {{ getFileTypeText(scope.row.fileName) }}
+ </el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column label="涓婁紶鏃堕棿" width="160">
+ <template slot-scope="scope">
+ <span>{{ formatDateTime(scope.row.uploadTime) }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column label="鏂囦欢澶у皬" width="100">
+ <template slot-scope="scope">
+ <span>{{ formatFileSize(scope.row.fileSize) }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column label="鎿嶄綔" width="266" fixed="right">
+ <template slot-scope="scope">
+ <el-button
+ size="mini"
+ type="primary"
+ @click="handlePreview(scope.row)"
+ :disabled="!isPreviewable(scope.row.fileName)"
+ >
+ 棰勮
+ </el-button>
+ <el-button
+ v-if="isEditing"
+ size="mini"
+ type="success"
+ @click="handleDownload(scope.row)"
+ >
+ 涓嬭浇
+ </el-button>
+ <el-button
+ v-if="isEditing"
+ size="mini"
+ type="danger"
+ @click="handleRemoveCategoryAttachment('ecg', scope.$index)"
+ >
+ 鍒犻櫎
+ </el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+ </div>
+ </div>
+
+ <!-- 蹇冭剰瓒呭0闄勪欢 -->
+ <div class="attachment-category">
+ <h4 class="category-title">
+ <i class="el-icon-document"></i> 蹇冭剰瓒呭0闄勪欢
+ </h4>
+ <UploadAttachment
+ ref="echoUpload"
+ :file-list="echoFileList"
+ :limit="10"
+ :accept="attachmentAccept"
+ :multiple="true"
+ @change="files => handleCategoryAttachmentChange('echo', files)"
+ @upload-success="
+ payload => handleCategoryUploadSuccess('echo', payload)
+ "
+ @upload-error="payload => handleCategoryUploadError('echo', payload)"
+ @remove="file => handleCategoryAttachmentRemove('echo', file)"
+ />
+
+ <!-- 蹇冭剰瓒呭0闄勪欢鍒楄〃 -->
+ <div v-if="attachments.echo && attachments.echo.length > 0" class="attachment-list">
+ <div class="list-title">宸蹭笂浼犻檮浠� ({{ attachments.echo.length }})</div>
+ <el-table :data="attachments.echo" style="width: 100%" size="small">
+ <el-table-column label="鏂囦欢鍚�" min-width="200">
+ <template slot-scope="scope">
+ <i
+ class="el-icon-document"
+ :style="{ color: getFileIconColor(scope.row.fileName) }"
+ ></i>
+ <span class="file-name">{{ scope.row.fileName }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column label="鏂囦欢绫诲瀷" width="100">
+ <template slot-scope="scope">
+ <el-tag :type="getFileTagType(scope.row.fileName)" size="small">
+ {{ getFileTypeText(scope.row.fileName) }}
+ </el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column label="涓婁紶鏃堕棿" width="160">
+ <template slot-scope="scope">
+ <span>{{ formatDateTime(scope.row.uploadTime) }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column label="鏂囦欢澶у皬" width="100">
+ <template slot-scope="scope">
+ <span>{{ formatFileSize(scope.row.fileSize) }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column label="鎿嶄綔" width="266" fixed="right">
+ <template slot-scope="scope">
+ <el-button
+ size="mini"
+ type="primary"
+ @click="handlePreview(scope.row)"
+ :disabled="!isPreviewable(scope.row.fileName)"
+ >
+ 棰勮
+ </el-button>
+ <el-button
+ v-if="isEditing"
+ size="mini"
+ type="success"
+ @click="handleDownload(scope.row)"
+ >
+ 涓嬭浇
+ </el-button>
+ <el-button
+ v-if="isEditing"
+ size="mini"
+ type="danger"
+ @click="handleRemoveCategoryAttachment('echo', scope.$index)"
+ >
+ 鍒犻櫎
+ </el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+ </div>
+ </div>
+</div>
+
+ <!-- 缁熻淇℃伅 -->
+ <div v-if="showStatistics" class="statistics-section">
+ <el-card shadow="never">
+ <div class="stats-content">
+ <span class="stats-title">鏁版嵁缁熻:</span>
+ <span class="stats-item"
+ >鎬昏褰曟暟: {{ dynamicColumns.length }} 涓椂闂寸偣</span
+ >
+ <span class="stats-item">宸插~鍐�: {{ filledCount }} 椤�</span>
+ <span class="stats-item">瀹屾垚搴�: {{ completionRate }}%</span>
+ </div>
+ </el-card>
+ </div>
+
+ <!-- 鍒楃紪杈戝璇濇 -->
+ <el-dialog
+ :title="`${editingColumnIndex !== null ? '缂栬緫' : '鏂板'}鏃堕棿鐐筦"
+ :visible.sync="columnDialogVisible"
+ width="450px"
+ @closed="handleDialogClosed"
+ >
+ <el-form
+ :model="columnForm"
+ label-width="80px"
+ ref="columnForm"
+ :rules="columnRules"
+ >
+ <el-form-item label="鏃ユ湡" prop="date">
+ <el-date-picker
+ v-model="columnForm.date"
+ type="date"
+ placeholder="閫夋嫨鏃ユ湡"
+ value-format="yyyy-MM-dd"
+ style="width: 100%"
+ :disabled-date="disableFutureDates"
+ />
+ </el-form-item>
+ <el-form-item label="鏃堕棿" prop="time">
+ <el-time-picker
+ v-model="columnForm.time"
+ placeholder="閫夋嫨鏃堕棿"
+ value-format="HH:mm"
+ style="width: 100%"
+ />
+ </el-form-item>
+ <el-form-item label="澶囨敞" prop="remark">
+ <el-input
+ v-model="columnForm.remark"
+ type="textarea"
+ :rows="2"
+ placeholder="鍙�夊~鍐欐椂闂寸偣澶囨敞淇℃伅"
+ maxlength="100"
+ show-word-limit
+ />
+ </el-form-item>
+ </el-form>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="columnDialogVisible = false">鍙栨秷</el-button>
+ <el-button
+ v-if="editingColumnIndex !== null"
+ type="danger"
+ @click="handleDeleteColumn"
+ >
+ 鍒犻櫎
+ </el-button>
+ <el-button
+ type="primary"
+ @click="confirmAddColumn"
+ :loading="saveLoading"
+ >
+ 纭畾
+ </el-button>
+ </span>
+ </el-dialog>
+
+ <!-- 鏂囦欢棰勮寮圭獥 -->
+ <FilePreviewDialog
+ :visible="previewVisible"
+ :file="currentPreviewFile"
+ @close="previewVisible = false"
+ @download="handleDownload"
+ />
+ </div>
+</template>
+
+<script>
+import UploadAttachment from "@/components/UploadAttachment";
+import FilePreviewDialog from "@/components/FilePreviewDialog";
+import dayjs from "dayjs";
+
+export default {
+ name: "HeartLabPanel",
+ components: { UploadAttachment, FilePreviewDialog },
+ props: {
+ isEditing: { type: Boolean, default: false },
+ initialData: { type: Object, default: () => ({}) },
+ showStatistics: { type: Boolean, default: true }
+ },
+ data() {
+ return {
+ tableData: [],
+ dynamicColumns: [],
+ attachments: { ecg: [], echo: [] }, // 鎸夌被鍒瓨鍌ㄩ檮浠�
+ ecgFileList: [],
+ echoFileList: [],
+ columnDialogVisible: false,
+ columnForm: { date: "", time: "", remark: "" },
+ editingColumnIndex: null,
+ tableKey: 0,
+ tableLoading: false,
+ saveLoading: false,
+ internalData: {},
+ columnRules: {
+ date: [{ required: true, message: "璇烽�夋嫨鏃ユ湡", trigger: "change" }],
+ time: [{ required: true, message: "璇烽�夋嫨鏃堕棿", trigger: "change" }]
+ },
+ previewVisible: false,
+ currentPreviewFile: null,
+ attachmentLimit: 10,
+ attachmentAccept:
+ ".pdf,.jpg,.jpeg,.png,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.txt"
+ };
+ },
+ computed: {
+ filledCount() {
+ let count = 0;
+ this.tableData.forEach(row => {
+ row.values.forEach(v => {
+ if (v && v.trim()) count++;
+ });
+ });
+ return count;
+ },
+ completionRate() {
+ const total = this.tableData.length * this.dynamicColumns.length;
+ return total > 0 ? Math.round((this.filledCount / total) * 100) : 0;
+ }
+ },
+ watch: {
+ initialData: {
+ handler(newData) {
+ if (newData && Object.keys(newData).length > 0) {
+ this.internalData = { ...newData };
+ this.initFromExternalData();
+ }
+ },
+ immediate: true,
+ deep: true
+ },
+ isEditing(newVal) {
+ if (!newVal) this.saveData();
+ this.$nextTick(() => this.forceTableLayout());
+ },
+ dynamicColumns: {
+ handler() {
+ this.$nextTick(() => this.forceTableLayout());
+ },
+ deep: true,
+ immediate: true
+ }
+ },
+ methods: {
+ initFromExternalData() {
+ if (this.internalData.data && this.internalData.columns) {
+ this.tableData = this.internalData.data.map(item => ({
+ ...item,
+ values:
+ item.values || new Array(this.internalData.columns.length).fill("")
+ }));
+ this.dynamicColumns = [...this.internalData.columns];
+ } else {
+ this.initTableData();
+ }
+ if (this.internalData.attachments) {
+ this.attachments = {
+ ecg: this.internalData.attachments.ecg || [],
+ echo: this.internalData.attachments.echo || []
+ };
+ this.ecgFileList = this.attachments.ecg.map(a => ({
+ uid: a.id || Math.random(),
+ name: a.fileName,
+ url: a.path || a.fileUrl,
+ status: "success"
+ }));
+ this.echoFileList = this.attachments.echo.map(a => ({
+ uid: a.id || Math.random(),
+ name: a.fileName,
+ url: a.path || a.fileUrl,
+ status: "success"
+ }));
+ }
+ },
+ initTableData() {
+ const items = this.getMedicalItems();
+ if (this.dynamicColumns.length === 0) {
+ this.dynamicColumns = [
+ {
+ label: `${new Date().toISOString().split("T")[0]}\n08:00`,
+ key: "time1",
+ date: new Date().toISOString().split("T")[0],
+ time: "08:00",
+ remark: "鍒濇妫�娴�"
+ }
+ ];
+ }
+ this.tableData = items.map(item => ({
+ ...item,
+ values: new Array(this.dynamicColumns.length).fill("")
+ }));
+ },
+ getMedicalItems() {
+ return [
+ {
+ itemName: "楂樻晱鑲岄挋铔嬬櫧(TnI)",
+ unit: "ng/ml",
+ required: true,
+ reference: "<0.04",
+ min: 0,
+ max: 0.04,
+ type: "number"
+ },
+ {
+ itemName: "BNP娴嬪畾",
+ unit: "pg/ml",
+ required: true,
+ reference: "<100",
+ min: 0,
+ max: 99,
+ type: "number"
+ },
+ {
+ itemName: "蹇冪數鍥炬弿杩�",
+ unit: "",
+ required: true,
+ reference: "",
+ type: "description"
+ },
+ {
+ itemName: "蹇冭剰瓒呭0鎻忚堪",
+ unit: "",
+ required: true,
+ reference: "",
+ type: "description"
+ }
+ ];
+ },
+ saveData() {
+ const dataToEmit = {
+ type: "heart_lab",
+ data: this.tableData,
+ columns: this.dynamicColumns,
+ attachments: this.attachments
+ };
+ this.$emit("data-change", dataToEmit);
+ },
+ getPlaceholder(row) {
+ if (row.type === "description") return "璇疯緭鍏ユ枃瀛楁弿杩�...";
+ return row.reference ? `鍙傝��: ${row.reference}` : "璇疯緭鍏ユ暟鍊�";
+ },
+ addColumn() {
+ this.editingColumnIndex = null;
+ this.columnForm = {
+ date: new Date().toISOString().split("T")[0],
+ time: "08:00",
+ remark: ""
+ };
+ this.columnDialogVisible = true;
+ this.$nextTick(
+ () => this.$refs.columnForm && this.$refs.columnForm.clearValidate()
+ );
+ },
+ handleEditColumn(index) {
+ if (!this.isEditing) return;
+ this.editingColumnIndex = index;
+ const col = this.dynamicColumns[index];
+ this.columnForm = {
+ date: col.date || "",
+ time: col.time || "",
+ remark: col.remark || ""
+ };
+ this.columnDialogVisible = true;
+ this.$nextTick(
+ () => this.$refs.columnForm && this.$refs.columnForm.clearValidate()
+ );
+ },
+ handleDeleteColumnByIndex(index) {
+ this.$confirm(
+ `纭畾瑕佸垹闄ゃ��${this.dynamicColumns[index].label.replace(
+ "\n",
+ " "
+ )}銆嶈繖涓椂闂寸偣鐨勬墍鏈夋暟鎹悧锛焋,
+ "鍒犻櫎纭",
+ {
+ confirmButtonText: "纭畾鍒犻櫎",
+ cancelButtonText: "鍙栨秷",
+ type: "warning"
+ }
+ )
+ .then(() => {
+ this.dynamicColumns.splice(index, 1);
+ this.tableData.forEach(row => {
+ if (row.values && row.values.length > index)
+ row.values.splice(index, 1);
+ });
+ this.tableKey += 1;
+ this.saveData();
+ this.$message({ type: "success", message: "鏃堕棿鐐瑰凡鍒犻櫎" });
+ })
+ .catch(() => {});
+ },
+ confirmAddColumn() {
+ this.$refs.columnForm.validate(valid => {
+ if (!valid) {
+ this.$message.warning("璇峰畬鍠勬椂闂寸偣淇℃伅");
+ return;
+ }
+ this.saveLoading = true;
+ if (this.editingColumnIndex !== null) {
+ const col = this.dynamicColumns[this.editingColumnIndex];
+ col.label = `${this.columnForm.date}\n${this.columnForm.time}`;
+ col.date = this.columnForm.date;
+ col.time = this.columnForm.time;
+ col.remark = this.columnForm.remark;
+ this.$message.success("鏃堕棿鐐逛慨鏀规垚鍔�");
+ } else {
+ const newCol = {
+ label: `${this.columnForm.date}\n${this.columnForm.time}`,
+ key: `time${Date.now()}`,
+ date: this.columnForm.date,
+ time: this.columnForm.time,
+ remark: this.columnForm.remark
+ };
+ this.dynamicColumns.push(newCol);
+ this.tableData.forEach(row => {
+ if (!row.values) row.values = [];
+ row.values.push("");
+ });
+ this.$message.success("鏃堕棿鐐规坊鍔犳垚鍔�");
+ }
+ this.columnDialogVisible = false;
+ this.saveLoading = false;
+ this.tableKey += 1;
+ this.saveData();
+ });
+ },
+ handleDeleteColumn() {
+ if (this.editingColumnIndex !== null) {
+ this.$confirm("纭畾瑕佸垹闄よ繖涓椂闂寸偣鍚楋紵", "鎻愮ず", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning"
+ }).then(() => {
+ this.dynamicColumns.splice(this.editingColumnIndex, 1);
+ this.tableData.forEach(row =>
+ row.values.splice(this.editingColumnIndex, 1)
+ );
+ this.columnDialogVisible = false;
+ this.tableKey += 1;
+ this.saveData();
+ this.$message.success("鏃堕棿鐐瑰垹闄ゆ垚鍔�");
+ });
+ }
+ },
+ handleDialogClosed() {
+ this.editingColumnIndex = null;
+ this.columnForm = { date: "", time: "", remark: "" };
+ this.$refs.columnForm && this.$refs.columnForm.clearValidate();
+ },
+ disableFutureDates(time) {
+ return time.getTime() > Date.now();
+ },
+ handleValueChange(row, columnIndex) {
+ this.saveData();
+ },
+ forceTableLayout() {
+ this.$nextTick(() => {
+ const table = this.$el.querySelector(".el-table");
+ if (table) window.dispatchEvent(new Event("resize"));
+ });
+ },
+ handleHeaderDragEnd() {
+ this.forceTableLayout();
+ },
+
+ // 鍒嗙被闄勪欢澶勭悊鏂规硶
+ handleCategoryAttachmentChange(category, fileList) {
+ if (category === "ecg") this.ecgFileList = fileList;
+ else this.echoFileList = fileList;
+ },
+ handleCategoryUploadSuccess(category, { file, fileList, response }) {
+ if (response.code === 200) {
+ const obj = {
+ fileName: file.name,
+ path: response.fileUrl || file.url,
+ fileUrl: response.fileUrl || file.url,
+ fileSize: file.size,
+ uploadTime: dayjs().format("YYYY-MM-DD HH:mm:ss")
+ };
+ if (!this.attachments[category]) this.attachments[category] = [];
+ this.attachments[category].push(obj);
+ if (category === "ecg") this.ecgFileList = fileList;
+ else this.echoFileList = fileList;
+ this.saveData();
+ this.$message.success("鏂囦欢涓婁紶鎴愬姛");
+ }
+ },
+ handleCategoryUploadError(category, { error }) {
+ console.error(`${category}闄勪欢涓婁紶澶辫触:`, error);
+ this.$message.error("鏂囦欢涓婁紶澶辫触锛岃閲嶈瘯");
+ },
+ handleCategoryAttachmentRemove(category, file) {
+ if (file.url) {
+ const idx = this.attachments[category].findIndex(
+ a => a.path === file.url || a.fileUrl === file.url
+ );
+ if (idx > -1) {
+ this.attachments[category].splice(idx, 1);
+ this.saveData();
+ this.$message.success("闄勪欢鍒犻櫎鎴愬姛");
+ }
+ }
+ },
+ handleRemoveCategoryAttachment(category, index) {
+ this.attachments[category].splice(index, 1);
+ if (category === "ecg") this.ecgFileList.splice(index, 1);
+ else this.echoFileList.splice(index, 1);
+ this.saveData();
+ this.$message.success("闄勪欢鍒犻櫎鎴愬姛");
+ },
+
+ // 鏂囦欢棰勮/涓嬭浇锛堝鐢ㄥ師閫昏緫锛�
+ handlePreview(file) {
+ this.currentPreviewFile = {
+ fileName: file.fileName,
+ fileUrl: file.path || file.fileUrl,
+ fileType: this.getFileType(file.fileName)
+ };
+ this.previewVisible = true;
+ },
+ handleDownload(file) {
+ const url = file.path || file.fileUrl;
+ if (url) {
+ const link = document.createElement("a");
+ link.href = url;
+ link.download = file.fileName;
+ document.body.appendChild(link);
+ link.click();
+ document.body.removeChild(link);
+ } else {
+ this.$message.warning("鏂囦欢璺緞涓嶅瓨鍦�");
+ }
+ },
+ getFileType(fileName) {
+ if (!fileName) return "other";
+ const ext = fileName
+ .split(".")
+ .pop()
+ .toLowerCase();
+ if (["jpg", "jpeg", "png", "gif", "bmp", "webp"].includes(ext))
+ return "image";
+ if (ext === "pdf") return "pdf";
+ if (["doc", "docx", "xls", "xlsx", "ppt", "pptx"].includes(ext))
+ return "office";
+ return "other";
+ },
+ formatDateTime(dt) {
+ if (!dt) return "";
+ try {
+ const d = new Date(dt);
+ if (isNaN(d.getTime())) return dt;
+ return `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(
+ 2,
+ "0"
+ )}-${String(d.getDate()).padStart(2, "0")} ${String(
+ d.getHours()
+ ).padStart(2, "0")}:${String(d.getMinutes()).padStart(2, "0")}`;
+ } catch {
+ return dt;
+ }
+ },
+ formatFileSize(bytes) {
+ if (!bytes || bytes === 0) return "0 B";
+ const k = 1024;
+ const sizes = ["B", "KB", "MB", "GB"];
+ const i = Math.floor(Math.log(bytes) / Math.log(k));
+ return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + " " + sizes[i];
+ },
+ getFileIconColor(name) {
+ const map = {
+ image: "#67C23A",
+ pdf: "#F56C6C",
+ office: "#409EFF",
+ other: "#909399"
+ };
+ return map[this.getFileType(name)] || "#909399";
+ },
+ getFileTagType(name) {
+ const map = {
+ image: "success",
+ pdf: "danger",
+ office: "primary",
+ other: "info"
+ };
+ return map[this.getFileType(name)] || "info";
+ },
+ getFileTypeText(name) {
+ const map = { image: "鍥剧墖", pdf: "PDF", office: "鏂囨。", other: "鍏朵粬" };
+ return map[this.getFileType(name)] || "鏈煡";
+ },
+ isPreviewable(fileName) {
+ return ["image", "pdf"].includes(this.getFileType(fileName));
+ },
+ exportData() {
+ return {
+ tableData: this.tableData,
+ columns: this.dynamicColumns,
+ statistics: {
+ filledCount: this.filledCount,
+ completionRate: this.completionRate,
+ totalColumns: this.dynamicColumns.length
+ },
+ exportTime: new Date().toISOString(),
+ attachments: this.attachments
+ };
+ }
+ },
+ mounted() {
+ this.$nextTick(() => {
+ if (Object.keys(this.internalData).length === 0) this.initTableData();
+ this.forceTableLayout();
+ });
+ }
+};
+</script>
+
+<style scoped>
+/* 澶嶇敤 BloodRoutinePanel 鐨勬墍鏈夋牱寮忥紝棰濆娣诲姞浠ヤ笅鏍峰紡 */
+.medical-panel {
+ padding: 20px;
+ background: #fff;
+ border-radius: 8px;
+ box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+}
+
+.panel-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ margin-bottom: 24px;
+ padding-bottom: 16px;
+ border-bottom: 1px solid #ebeef5;
+}
+
+.panel-header h3 {
+ margin: 0;
+ color: #303133;
+ font-size: 20px;
+ font-weight: 600;
+}
+
+.panel-actions {
+ display: flex;
+ gap: 12px;
+ align-items: center;
+}
+
+.medical-table {
+ margin-bottom: 24px;
+ border-radius: 4px;
+ overflow: hidden;
+}
+
+.medical-table ::v-deep .el-table__body-wrapper {
+ overflow-x: auto;
+}
+
+.item-name-cell {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+}
+
+.reference-icon {
+ color: #909399;
+ font-size: 14px;
+ cursor: help;
+ margin-left: 8px;
+}
+
+.required-item::before {
+ content: "*";
+ color: #f56c6c;
+ margin-right: 4px;
+}
+
+.cell-content-wrapper {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ gap: 8px;
+ min-height: 32px;
+}
+
+.value-input {
+ flex: 1;
+ min-width: 80px;
+}
+
+.value-display-container {
+ display: flex;
+ align-items: center;
+ gap: 4px;
+}
+
+.value-text {
+ font-weight: 500;
+ color: #303133;
+ max-width: 80px;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+
+.unit-text {
+ color: #909399;
+ font-size: 12px;
+ flex-shrink: 0;
+}
+
+.validation-indicator {
+ flex-shrink: 0;
+}
+
+.valid-icon {
+ color: #67c23a;
+ font-size: 14px;
+}
+
+.invalid-icon {
+ color: #e6a23c;
+ font-size: 14px;
+}
+
+.statistics-section {
+ margin-bottom: 20px;
+}
+
+.stats-content {
+ display: flex;
+ gap: 20px;
+ align-items: center;
+ flex-wrap: wrap;
+}
+
+.stats-title {
+ font-weight: 600;
+ color: #303133;
+}
+
+.stats-item {
+ color: #606266;
+ font-size: 14px;
+}
+
+/* 闄勪欢涓婁紶鍖哄煙鏍峰紡浼樺寲 */
+.attachment-section {
+ margin-top: 24px;
+ padding: 20px;
+ border: 1px solid #ebeef5;
+ border-radius: 4px;
+ background: #fafafa;
+}
+
+.attachment-header {
+ display: flex;
+ align-items: center;
+ gap: 8px;
+ margin-bottom: 16px;
+}
+
+.attachment-title {
+ font-weight: 600;
+ color: #409eff;
+}
+
+.attachment-tip {
+ font-size: 12px;
+ color: #909399;
+}
+
+.attachment-list {
+ margin-top: 16px;
+}
+
+.list-title {
+ font-weight: bold;
+ margin-bottom: 12px;
+ color: #303133;
+ font-size: 14px;
+}
+
+.file-name {
+ font-size: 13px;
+ margin-left: 8px;
+}
+/* 鑷畾涔夊垪澶存牱寮� */
+.custom-column-header {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ gap: 4px;
+ padding: 4px 0;
+}
+
+.header-content {
+ display: flex;
+ align-items: center;
+ gap: 4px;
+ cursor: pointer;
+ transition: color 0.2s;
+ white-space: nowrap;
+}
+
+.header-content:hover {
+ color: #409eff;
+}
+
+.header-label {
+ font-size: 13px;
+ line-height: 1.4;
+}
+
+.header-remark-icon {
+ color: #909399;
+ font-size: 12px;
+ cursor: help;
+}
+
+.header-actions {
+ display: flex;
+ gap: 4px;
+ opacity: 0;
+ transition: opacity 0.2s;
+}
+
+.custom-column-header:hover .header-actions {
+ opacity: 1;
+}
+
+.header-btn {
+ padding: 2px 4px !important;
+ font-size: 14px !important;
+}
+
+.header-btn.delete-btn {
+ color: #f56c6c !important;
+}
+
+.header-btn.delete-btn:hover {
+ color: #c0392b !important;
+}
+
+/* 鍒楀ご缂栬緫鎸夐挳鍦ㄧ紪杈戞ā寮忎笅濮嬬粓鏄剧ず */
+.is-editing .header-actions {
+ opacity: 1;
+}
+/* 鍝嶅簲寮忚璁� */
+@media (max-width: 768px) {
+ .medical-panel {
+ padding: 12px;
+ }
+
+ .panel-header {
+ flex-direction: column;
+ align-items: flex-start;
+ gap: 12px;
+ }
+
+ .panel-actions {
+ width: 100%;
+ justify-content: flex-end;
+ }
+
+ .stats-content {
+ flex-direction: column;
+ align-items: flex-start;
+ gap: 8px;
+ }
+
+ .cell-content-wrapper {
+ flex-direction: column;
+ gap: 4px;
+ }
+}
+.attachment-group-section {
+ margin-top: 24px;
+ padding: 20px;
+ border: 1px solid #ebeef5;
+ border-radius: 4px;
+ background: #fafafa;
+}
+.attachment-category {
+ margin-bottom: 20px;
+}
+.attachment-category:last-child {
+ margin-bottom: 0;
+}
+.category-title {
+ font-size: 15px;
+ font-weight: 600;
+ color: #409eff;
+ margin-bottom: 12px;
+ display: flex;
+ align-items: center;
+ gap: 6px;
+}
+.attachment-list-mini {
+ margin-top: 8px;
+ display: flex;
+ flex-wrap: wrap;
+ gap: 8px;
+}
+.cell-description-wrapper {
+ width: 100%;
+}
+.description-display {
+ white-space: pre-wrap;
+ text-align: left;
+ padding: 4px 8px;
+ background: #f5f7fa;
+ border-radius: 4px;
+ min-height: 60px;
+ max-height: 120px;
+ overflow-y: auto;
+ font-size: 13px;
+ color: #303133;
+ line-height: 1.5;
+}
+.attachment-list {
+ margin-top: 16px;
+}
+
+.list-title {
+ font-weight: bold;
+ margin-bottom: 12px;
+ color: #303133;
+ font-size: 14px;
+}
+
+.file-name {
+ font-size: 13px;
+ margin-left: 8px;
+}
+</style>
diff --git a/src/components/MaintainComponents/LiverKidneyPanel.vue b/src/components/MaintainComponents/LiverKidneyPanel.vue
index d1ee0fd..0ea5c72 100644
--- a/src/components/MaintainComponents/LiverKidneyPanel.vue
+++ b/src/components/MaintainComponents/LiverKidneyPanel.vue
@@ -2,15 +2,26 @@
<div class="medical-panel">
<div class="panel-header">
<h3>鑲濆姛鑳借偩鍔熻兘璁板綍琛�</h3>
- <el-button
- v-if="isEditing"
- type="primary"
- size="small"
- @click="addColumn"
- icon="el-icon-plus"
- >
- 鏂板璁板綍鍒�
- </el-button>
+ <div class="panel-actions">
+ <el-button
+ v-if="isEditing"
+ type="primary"
+ size="small"
+ @click="addColumn"
+ icon="el-icon-plus"
+ >
+ 鏂板璁板綍鍒�
+ </el-button>
+ <el-tooltip content="鍒锋柊琛ㄦ牸甯冨眬" placement="top">
+ <el-button
+ size="small"
+ @click="forceTableLayout"
+ icon="el-icon-refresh"
+ >
+ 鍒锋柊甯冨眬
+ </el-button>
+ </el-tooltip>
+ </div>
</div>
<el-table
@@ -19,7 +30,6 @@
style="width: 100%"
class="medical-table"
:key="tableKey"
-
@header-dragend="handleHeaderDragEnd"
>
<el-table-column
@@ -30,19 +40,61 @@
class-name="leave-alone"
>
<template #default="scope">
- <span :class="{ 'required-item': scope.row.required }">
- {{ scope.row.itemName }}
- </span>
+ <div class="item-name-cell">
+ <span :class="{ 'required-item': scope.row.required }">
+ {{ scope.row.itemName }}
+ </span>
+ <el-tooltip
+ v-if="scope.row.reference"
+ :content="`鍙傝�冭寖鍥�: ${scope.row.reference}`"
+ placement="top"
+ >
+ <i class="el-icon-info reference-icon"></i>
+ </el-tooltip>
+ </div>
</template>
</el-table-column>
<el-table-column
v-for="(col, index) in dynamicColumns"
:key="col.key"
- :label="col.label"
- :min-width="120"
+ :min-width="140"
:resizable="isEditing"
+ header-align="center"
+ align="center"
>
+ <!-- 鑷畾涔夊垪澶� -->
+ <template #header>
+ <div class="custom-column-header">
+ <div class="header-content" @click.stop="handleEditColumn(index)">
+ <span class="header-label">{{ col.label.replace('\n', ' ') }}</span>
+ <el-tooltip v-if="col.remark" :content="col.remark" placement="top">
+ <i class="el-icon-info header-remark-icon"></i>
+ </el-tooltip>
+ </div>
+ <div class="header-actions" v-if="isEditing">
+ <el-tooltip content="缂栬緫鏃堕棿" placement="top">
+ <el-button
+ size="mini"
+ type="text"
+ icon="el-icon-edit"
+ class="header-btn"
+ @click.stop="handleEditColumn(index)"
+ />
+ </el-tooltip>
+ <el-tooltip content="鍒犻櫎姝ゅ垪" placement="top">
+ <el-button
+ size="mini"
+ type="text"
+ icon="el-icon-delete"
+ class="header-btn delete-btn"
+ @click.stop="handleDeleteColumnByIndex(index)"
+ />
+ </el-tooltip>
+ </div>
+ </div>
+ </template>
+
<template #default="scope">
<div class="cell-content">
<el-input
@@ -157,34 +209,28 @@
<!-- 鍒楃紪杈戝璇濇 -->
<el-dialog
- title="缂栬緫鏃堕棿鐐�"
+ :title="`${editingColumnIndex !== null ? '缂栬緫' : '鏂板'}鏃堕棿鐐筦"
:visible.sync="columnDialogVisible"
- width="400px"
+ width="450px"
@closed="handleDialogClosed"
>
- <el-form :model="columnForm" label-width="80px" ref="columnForm">
- <el-form-item
- label="鏃ユ湡"
- prop="date"
- :rules="[
- { required: true, message: '璇烽�夋嫨鏃ユ湡', trigger: 'change' }
- ]"
- >
+ <el-form
+ :model="columnForm"
+ label-width="80px"
+ ref="columnForm"
+ :rules="columnRules"
+ >
+ <el-form-item label="鏃ユ湡" prop="date">
<el-date-picker
v-model="columnForm.date"
type="date"
placeholder="閫夋嫨鏃ユ湡"
value-format="yyyy-MM-dd"
style="width: 100%"
+ :disabled-date="disableFutureDates"
/>
</el-form-item>
- <el-form-item
- label="鏃堕棿"
- prop="time"
- :rules="[
- { required: true, message: '璇烽�夋嫨鏃堕棿', trigger: 'change' }
- ]"
- >
+ <el-form-item label="鏃堕棿" prop="time">
<el-time-picker
v-model="columnForm.time"
placeholder="閫夋嫨鏃堕棿"
@@ -192,10 +238,33 @@
style="width: 100%"
/>
</el-form-item>
+ <el-form-item label="澶囨敞" prop="remark">
+ <el-input
+ v-model="columnForm.remark"
+ type="textarea"
+ :rows="2"
+ placeholder="鍙�夊~鍐欐椂闂寸偣澶囨敞淇℃伅"
+ maxlength="100"
+ show-word-limit
+ />
+ </el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="columnDialogVisible = false">鍙栨秷</el-button>
- <el-button type="primary" @click="confirmAddColumn">纭畾</el-button>
+ <el-button
+ v-if="editingColumnIndex !== null"
+ type="danger"
+ @click="handleDeleteColumn"
+ >
+ 鍒犻櫎
+ </el-button>
+ <el-button
+ type="primary"
+ @click="confirmAddColumn"
+ :loading="saveLoading"
+ >
+ 纭畾
+ </el-button>
</span>
</el-dialog>
@@ -238,10 +307,18 @@
columnDialogVisible: false,
columnForm: {
date: "",
- time: ""
+ time: "",
+ remark: ""
},
+ editingColumnIndex: null,
tableKey: 0,
+ tableLoading: false,
+ saveLoading: false,
internalData: {},
+ columnRules: {
+ date: [{ required: true, message: "璇烽�夋嫨鏃ユ湡", trigger: "change" }],
+ time: [{ required: true, message: "璇烽�夋嫨鏃堕棿", trigger: "change" }]
+ },
// 棰勮鐩稿叧
previewVisible: false,
@@ -279,7 +356,8 @@
this.forceTableLayout();
});
},
- deep: true
+ deep: true,
+ immediate: true
},
// 鐩戝惉闄勪欢鏁版嵁鍙樺寲
attachments: {
@@ -353,7 +431,8 @@
label: `${new Date().toISOString().split("T")[0]}\n08:00`,
key: "time1",
date: new Date().toISOString().split("T")[0],
- time: "08:00"
+ time: "08:00",
+ remark: "鏅ㄨ捣妫�娴�"
}
];
}
@@ -376,11 +455,31 @@
},
addColumn() {
+ this.editingColumnIndex = null;
this.columnForm = {
date: new Date().toISOString().split("T")[0],
- time: "08:00"
+ time: "08:00",
+ remark: ""
};
this.columnDialogVisible = true;
+ this.$nextTick(() => {
+ this.$refs.columnForm && this.$refs.columnForm.clearValidate();
+ });
+ },
+
+ handleEditColumn(index) {
+ if (!this.isEditing) return;
+ this.editingColumnIndex = index;
+ const column = this.dynamicColumns[index];
+ this.columnForm = {
+ date: column.date || '',
+ time: column.time || '',
+ remark: column.remark || ''
+ };
+ this.columnDialogVisible = true;
+ this.$nextTick(() => {
+ this.$refs.columnForm && this.$refs.columnForm.clearValidate();
+ });
},
confirmAddColumn() {
@@ -390,34 +489,114 @@
return;
}
- const newIndex = this.dynamicColumns.length + 1;
- const newColumn = {
- label: `${this.columnForm.date}\n${this.columnForm.time}`,
- key: `time${newIndex}`,
- date: this.columnForm.date,
- time: this.columnForm.time
- };
+ this.saveLoading = true;
- this.dynamicColumns.push(newColumn);
+ if (this.editingColumnIndex !== null) {
+ // 缂栬緫鐜版湁鍒�
+ const column = this.dynamicColumns[this.editingColumnIndex];
+ column.label = `${this.columnForm.date}\n${this.columnForm.time}`;
+ column.date = this.columnForm.date;
+ column.time = this.columnForm.time;
+ column.remark = this.columnForm.remark;
+ this.$message.success("鏃堕棿鐐逛慨鏀规垚鍔�");
+ } else {
+ // 鏂板鍒�
+ const newIndex = this.dynamicColumns.length + 1;
+ const newColumn = {
+ label: `${this.columnForm.date}\n${this.columnForm.time}`,
+ key: `time${newIndex}_${Date.now()}`,
+ date: this.columnForm.date,
+ time: this.columnForm.time,
+ remark: this.columnForm.remark
+ };
- // 涓烘墍鏈夎鏂板涓�涓┖鍊�
- this.tableData.forEach(row => {
- if (!row.values) {
- row.values = [];
- }
- row.values.push("");
- });
+ this.dynamicColumns.push(newColumn);
+
+ // 涓烘墍鏈夎鏂板涓�涓┖鍊�
+ this.tableData.forEach(row => {
+ if (!row.values) {
+ row.values = [];
+ }
+ row.values.push("");
+ });
+
+ this.$message.success("鏃堕棿鐐规坊鍔犳垚鍔�");
+ }
this.columnDialogVisible = false;
- this.$message.success("鏃堕棿鐐规坊鍔犳垚鍔�");
+ this.saveLoading = false;
this.tableKey += 1;
this.saveData();
});
},
+ handleDeleteColumn() {
+ if (this.editingColumnIndex !== null) {
+ this.$confirm(
+ `纭畾瑕佸垹闄ゃ��${this.dynamicColumns[this.editingColumnIndex].label.replace('\n', ' ')}銆嶈繖涓椂闂寸偣鐨勬墍鏈夋暟鎹悧锛焋,
+ '鍒犻櫎纭',
+ {
+ confirmButtonText: '纭畾鍒犻櫎',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }
+ ).then(() => {
+ // 鍒犻櫎鍒�
+ this.dynamicColumns.splice(this.editingColumnIndex, 1);
+
+ // 鍚屾鍒犻櫎姣忚瀵瑰簲鐨勬暟鎹�
+ this.tableData.forEach(row => {
+ if (row.values && row.values.length > this.editingColumnIndex) {
+ row.values.splice(this.editingColumnIndex, 1);
+ }
+ });
+
+ this.columnDialogVisible = false;
+ this.tableKey += 1;
+ this.saveData();
+ this.$message.success("鏃堕棿鐐瑰垹闄ゆ垚鍔�");
+ }).catch(() => {
+ // 鍙栨秷鍒犻櫎锛屼笉鍋氫换浣曟搷浣�
+ });
+ }
+ },
+
+ handleDeleteColumnByIndex(index) {
+ this.$confirm(
+ `纭畾瑕佸垹闄ゃ��${this.dynamicColumns[index].label.replace('\n', ' ')}銆嶈繖涓椂闂寸偣鐨勬墍鏈夋暟鎹悧锛焋,
+ '鍒犻櫎纭',
+ {
+ confirmButtonText: '纭畾鍒犻櫎',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }
+ ).then(() => {
+ // 鍒犻櫎鍒�
+ this.dynamicColumns.splice(index, 1);
+
+ // 鍚屾鍒犻櫎姣忚瀵瑰簲鐨勬暟鎹�
+ this.tableData.forEach(row => {
+ if (row.values && row.values.length > index) {
+ row.values.splice(index, 1);
+ }
+ });
+
+ this.tableKey += 1;
+ this.saveData();
+ this.$message.success("鏃堕棿鐐瑰垹闄ゆ垚鍔�");
+ }).catch(() => {
+ // 鍙栨秷鍒犻櫎锛屼笉鍋氫换浣曟搷浣�
+ });
+ },
+
handleDialogClosed() {
- this.columnForm = { date: "", time: "" };
+ this.editingColumnIndex = null;
+ this.columnForm = { date: "", time: "", remark: "" };
this.$refs.columnForm && this.$refs.columnForm.clearValidate();
+ },
+
+ disableFutureDates(time) {
+ return time.getTime() > Date.now();
},
handleValueChange(row, columnIndex) {
@@ -662,6 +841,12 @@
font-weight: 600;
}
+.panel-actions {
+ display: flex;
+ gap: 12px;
+ align-items: center;
+}
+
.medical-table {
margin-bottom: 30px;
min-width: 100%;
@@ -671,34 +856,116 @@
overflow-x: auto;
}
+/* 鑷畾涔夊垪澶存牱寮� */
+.custom-column-header {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ gap: 4px;
+ padding: 4px 0;
+}
+
+.header-content {
+ display: flex;
+ align-items: center;
+ gap: 4px;
+ cursor: pointer;
+ transition: color 0.2s;
+ white-space: nowrap;
+}
+
+.header-content:hover {
+ color: #409eff;
+}
+
+.header-label {
+ font-size: 13px;
+ line-height: 1.4;
+}
+
+.header-remark-icon {
+ color: #909399;
+ font-size: 12px;
+ cursor: help;
+}
+
+.header-actions {
+ display: flex;
+ gap: 4px;
+ opacity: 0;
+ transition: opacity 0.2s;
+}
+
+.custom-column-header:hover .header-actions {
+ opacity: 1;
+}
+
+.header-btn {
+ padding: 2px 4px !important;
+ font-size: 14px !important;
+}
+
+.header-btn.delete-btn {
+ color: #f56c6c !important;
+}
+
+.header-btn.delete-btn:hover {
+ color: #c0392b !important;
+}
+
+/* 缂栬緫妯″紡涓嬪缁堟樉绀烘搷浣滄寜閽� */
+.is-editing .header-actions {
+ opacity: 1;
+}
+
+.item-name-cell {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+}
+
+.reference-icon {
+ color: #909399;
+ font-size: 14px;
+ cursor: help;
+ margin-left: 8px;
+}
+
.cell-content {
display: flex;
align-items: center;
justify-content: space-between;
- min-height: 32px;
+ min-height: 38px;
+ gap: 8px;
}
.value-input {
flex: 1;
- margin-right: 8px;
+ min-width: 60px;
}
.value-display {
font-weight: 500;
color: #303133;
+ max-width: 70px;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
}
.unit {
color: #909399;
- font-size: 12px;
- margin-left: 4px;
+ font-size: 11px;
+ margin-left: 2px;
+ flex-shrink: 0;
}
.reference-range {
color: #67c23a;
- font-size: 12px;
+ font-size: 11px;
font-style: italic;
- margin-left: 8px;
+ margin-left: 4px;
+ flex-shrink: 0;
}
.required-item::before {
@@ -761,24 +1028,39 @@
.panel-header {
flex-direction: column;
align-items: flex-start;
+ gap: 12px;
}
.panel-header h3 {
- margin-bottom: 10px;
+ margin-bottom: 0;
+ }
+
+ .panel-actions {
+ width: 100%;
+ justify-content: flex-end;
}
.cell-content {
flex-direction: column;
align-items: flex-start;
+ gap: 4px;
}
.reference-range {
margin-left: 0;
- margin-top: 4px;
+ margin-top: 2px;
}
.attachment-section {
padding: 10px;
}
+
+ .custom-column-header {
+ padding: 2px 0;
+ }
+
+ .header-actions {
+ opacity: 1;
+ }
}
</style>
diff --git a/src/components/MaintainComponents/LungLabPanel.vue b/src/components/MaintainComponents/LungLabPanel.vue
new file mode 100644
index 0000000..b4c7609
--- /dev/null
+++ b/src/components/MaintainComponents/LungLabPanel.vue
@@ -0,0 +1,1250 @@
+<template>
+ <div class="medical-panel">
+ <div class="panel-header">
+ <h3>鑲鸿剰鍖栭獙妫�鏌�</h3>
+ <div class="panel-actions">
+ <el-button
+ v-if="isEditing"
+ type="primary"
+ size="small"
+ @click="addColumn"
+ icon="el-icon-plus"
+ >
+ 鏂板璁板綍鍒�
+ </el-button>
+ <el-tooltip content="鍒锋柊琛ㄦ牸甯冨眬" placement="top">
+ <el-button
+ size="small"
+ @click="forceTableLayout"
+ icon="el-icon-refresh"
+ >
+ 鍒锋柊甯冨眬
+ </el-button>
+ </el-tooltip>
+ </div>
+ </div>
+
+ <el-table
+ :data="tableData"
+ border
+ style="width: 100%"
+ class="medical-table"
+ :key="tableKey"
+ @header-dragend="handleHeaderDragEnd"
+ v-loading="tableLoading"
+ >
+ <el-table-column
+ prop="itemName"
+ label="妫�娴嬮」鐩�"
+ width="240"
+ fixed
+ class-name="leave-alone"
+ >
+ <template #default="scope">
+ <div class="item-name-cell">
+ <span :class="{ 'required-item': scope.row.required }">
+ {{ scope.row.itemName }}
+ </span>
+ <el-tooltip
+ v-if="scope.row.reference"
+ :content="`鍙傝�冭寖鍥�: ${scope.row.reference}`"
+ placement="top"
+ >
+ <i class="el-icon-info reference-icon"></i>
+ </el-tooltip>
+ </div>
+ </template>
+ </el-table-column>
+
+ <el-table-column
+ v-for="(col, index) in dynamicColumns"
+ :key="col.key"
+ :label="col.label"
+ :min-width="180"
+ :resizable="isEditing"
+ header-align="center"
+ align="center"
+ >
+ <template #header>
+ <div class="custom-column-header">
+ <div class="header-content" @click.stop="handleEditColumn(index)">
+ <span class="header-label">{{
+ col.label.replace("\n", " ")
+ }}</span>
+ <el-tooltip
+ v-if="col.remark"
+ :content="col.remark"
+ placement="top"
+ >
+ <i class="el-icon-info header-remark-icon"></i>
+ </el-tooltip>
+ </div>
+ <div class="header-actions" v-if="isEditing">
+ <el-tooltip content="缂栬緫鏃堕棿" placement="top">
+ <el-button
+ size="mini"
+ type="text"
+ icon="el-icon-edit"
+ class="header-btn"
+ @click.stop="handleEditColumn(index)"
+ />
+ </el-tooltip>
+ <el-tooltip content="鍒犻櫎姝ゅ垪" placement="top">
+ <el-button
+ size="mini"
+ type="text"
+ icon="el-icon-delete"
+ class="header-btn delete-btn"
+ @click.stop="handleDeleteColumnByIndex(index)"
+ />
+ </el-tooltip>
+ </div>
+ </div>
+ </template>
+
+ <template #default="scope">
+ <!-- 鏁板�艰緭鍏ョ被 -->
+ <div v-if="scope.row.type === 'number'" class="cell-content-wrapper">
+ <el-input
+ v-if="isEditing"
+ v-model="scope.row.values[index]"
+ size="small"
+ :placeholder="getPlaceholder(scope.row)"
+ @input="val => handleNumberInput(scope.row, index, val)"
+ @blur="handleValueChange(scope.row, index)"
+ class="value-input"
+ />
+ <div v-else class="value-display-container">
+ <span class="value-text">{{
+ scope.row.values[index] || "-"
+ }}</span>
+ <span
+ v-if="scope.row.values[index] && scope.row.unit"
+ class="unit-text"
+ >
+ {{ scope.row.unit }}
+ </span>
+ </div>
+ </div>
+
+ <!-- 鑷姩璁$畻绫伙紙姘у悎鎸囨暟锛� -->
+ <div
+ v-else-if="scope.row.type === 'calculated'"
+ class="cell-content-wrapper"
+ >
+ <div class="calculated-value">
+ <span class="value-text">{{
+ scope.row.values[index] || "-"
+ }}</span>
+ <span v-if="scope.row.values[index]" class="unit-text">{{
+ scope.row.unit
+ }}</span>
+ </div>
+ </div>
+
+ <!-- 鏂囨湰鎻忚堪绫� -->
+ <div
+ v-else-if="scope.row.type === 'description'"
+ class="cell-description-wrapper"
+ >
+ <el-input
+ v-if="isEditing"
+ v-model="scope.row.values[index]"
+ type="textarea"
+ :rows="3"
+ size="small"
+ placeholder="璇疯緭鍏ユ枃瀛楁弿杩�..."
+ @blur="handleValueChange(scope.row, index)"
+ />
+ <div v-else class="description-display">
+ {{ scope.row.values[index] || "鏈~鍐�" }}
+ </div>
+ </div>
+ </template>
+ </el-table-column>
+ </el-table>
+
+ <!-- 闄勪欢鍖哄煙 -->
+ <!-- 闄勪欢鍖哄煙 -->
+ <div class="attachment-group-section">
+ <div class="attachment-category">
+ <h4 class="category-title">
+ <i class="el-icon-document"></i> 鑳哥墖/鑳搁儴CT闄勪欢
+ </h4>
+ <UploadAttachment
+ ref="chestImgUpload"
+ :file-list="chestImgFileList"
+ :limit="10"
+ :accept="attachmentAccept"
+ :multiple="true"
+ @change="files => handleCategoryAttachmentChange('chestImg', files)"
+ @upload-success="
+ payload => handleCategoryUploadSuccess('chestImg', payload)
+ "
+ @upload-error="
+ payload => handleCategoryUploadError('chestImg', payload)
+ "
+ @remove="file => handleCategoryAttachmentRemove('chestImg', file)"
+ />
+
+ <!-- 鑳哥墖/鑳搁儴CT闄勪欢鍒楄〃 -->
+ <div
+ v-if="attachments.chestImg && attachments.chestImg.length > 0"
+ class="attachment-list"
+ >
+ <div class="list-title">
+ 宸蹭笂浼犻檮浠� ({{ attachments.chestImg.length }})
+ </div>
+ <el-table
+ :data="attachments.chestImg"
+ style="width: 100%"
+ size="small"
+ >
+ <el-table-column label="鏂囦欢鍚�" min-width="200">
+ <template slot-scope="scope">
+ <i
+ class="el-icon-document"
+ :style="{ color: getFileIconColor(scope.row.fileName) }"
+ ></i>
+ <span class="file-name">{{ scope.row.fileName }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column label="鏂囦欢绫诲瀷" width="100">
+ <template slot-scope="scope">
+ <el-tag :type="getFileTagType(scope.row.fileName)" size="small">
+ {{ getFileTypeText(scope.row.fileName) }}
+ </el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column label="涓婁紶鏃堕棿" width="160">
+ <template slot-scope="scope">
+ <span>{{ formatDateTime(scope.row.uploadTime) }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column label="鏂囦欢澶у皬" width="100">
+ <template slot-scope="scope">
+ <span>{{ formatFileSize(scope.row.fileSize) }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column label="鎿嶄綔" width="266" fixed="right">
+ <template slot-scope="scope">
+ <el-button
+ size="mini"
+ type="primary"
+ @click="handlePreview(scope.row)"
+ :disabled="!isPreviewable(scope.row.fileName)"
+ >
+ 棰勮
+ </el-button>
+ <el-button
+ v-if="isEditing"
+ size="mini"
+ type="success"
+ @click="handleDownload(scope.row)"
+ >
+ 涓嬭浇
+ </el-button>
+ <el-button
+ v-if="isEditing"
+ size="mini"
+ type="danger"
+ @click="
+ handleRemoveCategoryAttachment('chestImg', scope.$index)
+ "
+ >
+ 鍒犻櫎
+ </el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+ </div>
+ </div>
+
+ <div class="attachment-category">
+ <h4 class="category-title">
+ <i class="el-icon-document"></i> 鏀皵绠¢暅妫�鏌ラ檮浠�
+ </h4>
+ <UploadAttachment
+ ref="bronchoscopyUpload"
+ :file-list="bronchoscopyFileList"
+ :limit="10"
+ :accept="attachmentAccept"
+ :multiple="true"
+ @change="
+ files => handleCategoryAttachmentChange('bronchoscopy', files)
+ "
+ @upload-success="
+ payload => handleCategoryUploadSuccess('bronchoscopy', payload)
+ "
+ @upload-error="
+ payload => handleCategoryUploadError('bronchoscopy', payload)
+ "
+ @remove="file => handleCategoryAttachmentRemove('bronchoscopy', file)"
+ />
+
+ <!-- 鏀皵绠¢暅妫�鏌ラ檮浠跺垪琛� -->
+ <div
+ v-if="attachments.bronchoscopy && attachments.bronchoscopy.length > 0"
+ class="attachment-list"
+ >
+ <div class="list-title">
+ 宸蹭笂浼犻檮浠� ({{ attachments.bronchoscopy.length }})
+ </div>
+ <el-table
+ :data="attachments.bronchoscopy"
+ style="width: 100%"
+ size="small"
+ >
+ <el-table-column label="鏂囦欢鍚�" min-width="200">
+ <template slot-scope="scope">
+ <i
+ class="el-icon-document"
+ :style="{ color: getFileIconColor(scope.row.fileName) }"
+ ></i>
+ <span class="file-name">{{ scope.row.fileName }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column label="鏂囦欢绫诲瀷" width="100">
+ <template slot-scope="scope">
+ <el-tag :type="getFileTagType(scope.row.fileName)" size="small">
+ {{ getFileTypeText(scope.row.fileName) }}
+ </el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column label="涓婁紶鏃堕棿" width="160">
+ <template slot-scope="scope">
+ <span>{{ formatDateTime(scope.row.uploadTime) }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column label="鏂囦欢澶у皬" width="100">
+ <template slot-scope="scope">
+ <span>{{ formatFileSize(scope.row.fileSize) }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column label="鎿嶄綔" width="266" fixed="right">
+ <template slot-scope="scope">
+ <el-button
+ size="mini"
+ type="primary"
+ @click="handlePreview(scope.row)"
+ :disabled="!isPreviewable(scope.row.fileName)"
+ >
+ 棰勮
+ </el-button>
+ <el-button
+ v-if="isEditing"
+ size="mini"
+ type="success"
+ @click="handleDownload(scope.row)"
+ >
+ 涓嬭浇
+ </el-button>
+ <el-button
+ v-if="isEditing"
+ size="mini"
+ type="danger"
+ @click="
+ handleRemoveCategoryAttachment('bronchoscopy', scope.$index)
+ "
+ >
+ 鍒犻櫎
+ </el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+ </div>
+ </div>
+ </div>
+
+ <!-- 缁熻淇℃伅 -->
+ <div v-if="showStatistics" class="statistics-section">
+ <el-card shadow="never">
+ <div class="stats-content">
+ <span class="stats-title">鏁版嵁缁熻:</span>
+ <span class="stats-item"
+ >鎬昏褰曟暟: {{ dynamicColumns.length }} 涓椂闂寸偣</span
+ >
+ <span class="stats-item">宸插~鍐�: {{ filledCount }} 椤�</span>
+ <span class="stats-item">瀹屾垚搴�: {{ completionRate }}%</span>
+ </div>
+ </el-card>
+ </div>
+
+ <!-- 鍒楃紪杈戝璇濇锛堝悓 HeartLabPanel锛� -->
+ <el-dialog
+ :title="`${editingColumnIndex !== null ? '缂栬緫' : '鏂板'}鏃堕棿鐐筦"
+ :visible.sync="columnDialogVisible"
+ width="450px"
+ @closed="handleDialogClosed"
+ >
+ <el-form
+ :model="columnForm"
+ label-width="80px"
+ ref="columnForm"
+ :rules="columnRules"
+ >
+ <el-form-item label="鏃ユ湡" prop="date">
+ <el-date-picker
+ v-model="columnForm.date"
+ type="date"
+ placeholder="閫夋嫨鏃ユ湡"
+ value-format="yyyy-MM-dd"
+ style="width: 100%"
+ :disabled-date="disableFutureDates"
+ />
+ </el-form-item>
+ <el-form-item label="鏃堕棿" prop="time">
+ <el-time-picker
+ v-model="columnForm.time"
+ placeholder="閫夋嫨鏃堕棿"
+ value-format="HH:mm"
+ style="width: 100%"
+ />
+ </el-form-item>
+ <el-form-item label="澶囨敞" prop="remark">
+ <el-input
+ v-model="columnForm.remark"
+ type="textarea"
+ :rows="2"
+ placeholder="鍙�夊~鍐欐椂闂寸偣澶囨敞淇℃伅"
+ maxlength="100"
+ show-word-limit
+ />
+ </el-form-item>
+ </el-form>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="columnDialogVisible = false">鍙栨秷</el-button>
+ <el-button
+ v-if="editingColumnIndex !== null"
+ type="danger"
+ @click="handleDeleteColumn"
+ >鍒犻櫎</el-button
+ >
+ <el-button
+ type="primary"
+ @click="confirmAddColumn"
+ :loading="saveLoading"
+ >纭畾</el-button
+ >
+ </span>
+ </el-dialog>
+
+ <!-- 鏂囦欢棰勮寮圭獥 -->
+ <FilePreviewDialog
+ :visible="previewVisible"
+ :file="currentPreviewFile"
+ @close="previewVisible = false"
+ @download="handleDownload"
+ />
+ </div>
+</template>
+
+<script>
+import UploadAttachment from "@/components/UploadAttachment";
+import FilePreviewDialog from "@/components/FilePreviewDialog";
+import dayjs from "dayjs";
+
+export default {
+ name: "LungLabPanel",
+ components: { UploadAttachment, FilePreviewDialog },
+ props: {
+ isEditing: { type: Boolean, default: false },
+ initialData: { type: Object, default: () => ({}) },
+ showStatistics: { type: Boolean, default: true }
+ },
+ data() {
+ return {
+ tableData: [],
+ dynamicColumns: [],
+ attachments: { chestImg: [], bronchoscopy: [] },
+ chestImgFileList: [],
+ bronchoscopyFileList: [],
+ columnDialogVisible: false,
+ columnForm: { date: "", time: "", remark: "" },
+ editingColumnIndex: null,
+ tableKey: 0,
+ tableLoading: false,
+ saveLoading: false,
+ internalData: {},
+ columnRules: {
+ date: [{ required: true, message: "璇烽�夋嫨鏃ユ湡", trigger: "change" }],
+ time: [{ required: true, message: "璇烽�夋嫨鏃堕棿", trigger: "change" }]
+ },
+ previewVisible: false,
+ currentPreviewFile: null,
+ attachmentLimit: 10,
+ attachmentAccept:
+ ".pdf,.jpg,.jpeg,.png,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.txt"
+ };
+ },
+ computed: {
+ filledCount() {
+ let count = 0;
+ this.tableData.forEach(row => {
+ row.values.forEach(v => {
+ if (v && v.toString().trim()) count++;
+ });
+ });
+ return count;
+ },
+ completionRate() {
+ const total = this.tableData.length * this.dynamicColumns.length;
+ return total > 0 ? Math.round((this.filledCount / total) * 100) : 0;
+ }
+ },
+ watch: {
+ initialData: {
+ handler(newData) {
+ if (newData && Object.keys(newData).length > 0) {
+ this.internalData = { ...newData };
+ this.initFromExternalData();
+ }
+ },
+ immediate: true,
+ deep: true
+ },
+ isEditing(newVal) {
+ if (!newVal) this.saveData();
+ this.$nextTick(() => this.forceTableLayout());
+ },
+ dynamicColumns: {
+ handler() {
+ this.$nextTick(() => this.forceTableLayout());
+ },
+ deep: true,
+ immediate: true
+ }
+ },
+ methods: {
+ initFromExternalData() {
+ if (this.internalData.data && this.internalData.columns) {
+ this.tableData = this.internalData.data.map(item => ({
+ ...item,
+ values:
+ item.values || new Array(this.internalData.columns.length).fill("")
+ }));
+ this.dynamicColumns = [...this.internalData.columns];
+ } else {
+ this.initTableData();
+ }
+ if (this.internalData.attachments) {
+ this.attachments = {
+ chestImg: this.internalData.attachments.chestImg || [],
+ bronchoscopy: this.internalData.attachments.bronchoscopy || []
+ };
+ this.chestImgFileList = this.attachments.chestImg.map(a => ({
+ uid: a.id || Math.random(),
+ name: a.fileName,
+ url: a.path || a.fileUrl,
+ status: "success"
+ }));
+ this.bronchoscopyFileList = this.attachments.bronchoscopy.map(a => ({
+ uid: a.id || Math.random(),
+ name: a.fileName,
+ url: a.path || a.fileUrl,
+ status: "success"
+ }));
+ }
+ },
+ initTableData() {
+ const items = this.getMedicalItems();
+ if (this.dynamicColumns.length === 0) {
+ this.dynamicColumns = [
+ {
+ label: `${new Date().toISOString().split("T")[0]}\n08:00`,
+ key: "time1",
+ date: new Date().toISOString().split("T")[0],
+ time: "08:00",
+ remark: "鍒濇妫�娴�"
+ }
+ ];
+ }
+ this.tableData = items.map(item => ({
+ ...item,
+ values: new Array(this.dynamicColumns.length).fill("")
+ }));
+ },
+ getMedicalItems() {
+ return [
+ {
+ itemName: "姘у垎鍘�(PO鈧�)",
+ unit: "mm/Hg",
+ required: true,
+ reference: "83-108",
+ min: 50,
+ max: 110,
+ type: "number",
+ calcKey: "po2"
+ },
+ {
+ itemName: "浜屾哀鍖栫⒊鍒嗗帇(PCO鈧�)",
+ unit: "mm/Hg",
+ required: true,
+ reference: "35-45",
+ min: 25,
+ max: 55,
+ type: "number",
+ calcKey: "pco2"
+ },
+ {
+ itemName: "鍚告哀娴撳害(FiO鈧�)",
+ unit: "%",
+ required: true,
+ reference: "21-100",
+ min: 18,
+ max: 101,
+ type: "number",
+ calcKey: "fio2"
+ },
+ {
+ itemName: "姘у悎鎸囨暟(OI)",
+ unit: "",
+ required: false,
+ reference: "鈮�400",
+ type: "calculated",
+ calcFormula: "po2/fio2"
+ },
+ {
+ itemName: "鑳哥墖/鑳搁儴CT鎻忚堪",
+ unit: "",
+ required: true,
+ reference: "",
+ type: "description"
+ },
+ {
+ itemName: "鏀皵绠¢暅妫�鏌ユ弿杩�",
+ unit: "",
+ required: true,
+ reference: "",
+ type: "description"
+ }
+ ];
+ },
+ // 鑷姩璁$畻姘у悎鎸囨暟
+ handleNumberInput(row, colIndex, value) {
+ if (row.calcKey === "po2" || row.calcKey === "fio2") {
+ const po2Row = this.tableData.find(r => r.calcKey === "po2");
+ const fio2Row = this.tableData.find(r => r.calcKey === "fio2");
+ const oiRow = this.tableData.find(r => r.type === "calculated");
+
+ if (po2Row && fio2Row && oiRow) {
+ const po2 = parseFloat(po2Row.values[colIndex]);
+ const fio2 = parseFloat(fio2Row.values[colIndex]);
+ if (!isNaN(po2) && !isNaN(fio2) && fio2 > 0) {
+ const oi = ((po2 / fio2) * 100).toFixed(1);
+ oiRow.values[colIndex] = oi;
+ } else {
+ oiRow.values[colIndex] = "";
+ }
+ }
+ }
+ },
+ saveData() {
+ const dataToEmit = {
+ type: "lung_lab",
+ data: this.tableData,
+ columns: this.dynamicColumns,
+ attachments: this.attachments
+ };
+ this.$emit("data-change", dataToEmit);
+ },
+ getPlaceholder(row) {
+ if (row.type === "description") return "璇疯緭鍏ユ枃瀛楁弿杩�...";
+ return row.reference ? `鍙傝��: ${row.reference}` : "璇疯緭鍏ユ暟鍊�";
+ },
+ // 鐢变簬绡囧箙闄愬埗锛岃繖閲屽彧鍒楀嚭鍏抽敭宸紓鏂规硶
+ addColumn() {
+ this.editingColumnIndex = null;
+ this.columnForm = {
+ date: new Date().toISOString().split("T")[0],
+ time: "08:00",
+ remark: ""
+ };
+ this.columnDialogVisible = true;
+ this.$nextTick(
+ () => this.$refs.columnForm && this.$refs.columnForm.clearValidate()
+ );
+ },
+ handleEditColumn(index) {
+ if (!this.isEditing) return;
+ this.editingColumnIndex = index;
+ const col = this.dynamicColumns[index];
+ this.columnForm = {
+ date: col.date || "",
+ time: col.time || "",
+ remark: col.remark || ""
+ };
+ this.columnDialogVisible = true;
+ this.$nextTick(
+ () => this.$refs.columnForm && this.$refs.columnForm.clearValidate()
+ );
+ },
+ handleDeleteColumnByIndex(index) {
+ this.$confirm(
+ `纭畾瑕佸垹闄ゃ��${this.dynamicColumns[index].label.replace(
+ "\n",
+ " "
+ )}銆嶈繖涓椂闂寸偣鐨勬墍鏈夋暟鎹悧锛焋,
+ "鍒犻櫎纭",
+ {
+ confirmButtonText: "纭畾鍒犻櫎",
+ cancelButtonText: "鍙栨秷",
+ type: "warning"
+ }
+ )
+ .then(() => {
+ this.dynamicColumns.splice(index, 1);
+ this.tableData.forEach(row => {
+ if (row.values && row.values.length > index)
+ row.values.splice(index, 1);
+ });
+ this.tableKey += 1;
+ this.saveData();
+ this.$message({ type: "success", message: "鏃堕棿鐐瑰凡鍒犻櫎" });
+ })
+ .catch(() => {});
+ },
+ confirmAddColumn() {
+ this.$refs.columnForm.validate(valid => {
+ if (!valid) {
+ this.$message.warning("璇峰畬鍠勬椂闂寸偣淇℃伅");
+ return;
+ }
+ this.saveLoading = true;
+ if (this.editingColumnIndex !== null) {
+ const col = this.dynamicColumns[this.editingColumnIndex];
+ col.label = `${this.columnForm.date}\n${this.columnForm.time}`;
+ col.date = this.columnForm.date;
+ col.time = this.columnForm.time;
+ col.remark = this.columnForm.remark;
+ this.$message.success("鏃堕棿鐐逛慨鏀规垚鍔�");
+ } else {
+ const newCol = {
+ label: `${this.columnForm.date}\n${this.columnForm.time}`,
+ key: `time${Date.now()}`,
+ date: this.columnForm.date,
+ time: this.columnForm.time,
+ remark: this.columnForm.remark
+ };
+ this.dynamicColumns.push(newCol);
+ this.tableData.forEach(row => {
+ if (!row.values) row.values = [];
+ row.values.push("");
+ });
+ this.$message.success("鏃堕棿鐐规坊鍔犳垚鍔�");
+ }
+ this.columnDialogVisible = false;
+ this.saveLoading = false;
+ this.tableKey += 1;
+ this.saveData();
+ });
+ },
+ handleDeleteColumn() {
+ if (this.editingColumnIndex !== null) {
+ this.$confirm("纭畾瑕佸垹闄よ繖涓椂闂寸偣鍚楋紵", "鎻愮ず", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning"
+ }).then(() => {
+ this.dynamicColumns.splice(this.editingColumnIndex, 1);
+ this.tableData.forEach(row =>
+ row.values.splice(this.editingColumnIndex, 1)
+ );
+ this.columnDialogVisible = false;
+ this.tableKey += 1;
+ this.saveData();
+ this.$message.success("鏃堕棿鐐瑰垹闄ゆ垚鍔�");
+ });
+ }
+ },
+ handleDialogClosed() {
+ this.editingColumnIndex = null;
+ this.columnForm = { date: "", time: "", remark: "" };
+ this.$refs.columnForm && this.$refs.columnForm.clearValidate();
+ },
+ disableFutureDates(time) {
+ return time.getTime() > Date.now();
+ },
+ handleValueChange(row, columnIndex) {
+ this.saveData();
+ },
+ forceTableLayout() {
+ this.$nextTick(() => {
+ const table = this.$el.querySelector(".el-table");
+ if (table) window.dispatchEvent(new Event("resize"));
+ });
+ },
+ handleHeaderDragEnd() {
+ this.forceTableLayout();
+ },
+
+ // 鍒嗙被闄勪欢澶勭悊鏂规硶
+ // 淇敼 handleCategoryAttachmentChange 鏂规硶
+ handleCategoryAttachmentChange(category, fileList) {
+ if (category === "chestImg") this.chestImgFileList = fileList;
+ else if (category === "bronchoscopy")
+ this.bronchoscopyFileList = fileList;
+ },
+
+ // 淇敼 handleCategoryUploadSuccess 鏂规硶涓殑 fileList 璧嬪�奸儴鍒�
+ handleCategoryUploadSuccess(category, { file, fileList, response }) {
+ if (response.code === 200) {
+ const obj = {
+ fileName: file.name,
+ path: response.fileUrl || file.url,
+ fileUrl: response.fileUrl || file.url,
+ fileSize: file.size,
+ uploadTime: dayjs().format("YYYY-MM-DD HH:mm:ss")
+ };
+ if (!this.attachments[category]) this.attachments[category] = [];
+ this.attachments[category].push(obj);
+ if (category === "chestImg") this.chestImgFileList = fileList;
+ else if (category === "bronchoscopy")
+ this.bronchoscopyFileList = fileList;
+ this.saveData();
+ this.$message.success("鏂囦欢涓婁紶鎴愬姛");
+ }
+ },
+
+ // 淇敼 handleRemoveCategoryAttachment 鏂规硶
+ handleRemoveCategoryAttachment(category, index) {
+ this.attachments[category].splice(index, 1);
+ if (category === "chestImg") this.chestImgFileList.splice(index, 1);
+ else if (category === "bronchoscopy")
+ this.bronchoscopyFileList.splice(index, 1);
+ this.saveData();
+ this.$message.success("闄勪欢鍒犻櫎鎴愬姛");
+ },
+ handleCategoryUploadError(category, { error }) {
+ console.error(`${category}闄勪欢涓婁紶澶辫触:`, error);
+ this.$message.error("鏂囦欢涓婁紶澶辫触锛岃閲嶈瘯");
+ },
+ handleCategoryAttachmentRemove(category, file) {
+ if (file.url) {
+ const idx = this.attachments[category].findIndex(
+ a => a.path === file.url || a.fileUrl === file.url
+ );
+ if (idx > -1) {
+ this.attachments[category].splice(idx, 1);
+ this.saveData();
+ this.$message.success("闄勪欢鍒犻櫎鎴愬姛");
+ }
+ }
+ },
+
+ // 鏂囦欢棰勮/涓嬭浇锛堝鐢ㄥ師閫昏緫锛�
+ handlePreview(file) {
+ this.currentPreviewFile = {
+ fileName: file.fileName,
+ fileUrl: file.path || file.fileUrl,
+ fileType: this.getFileType(file.fileName)
+ };
+ this.previewVisible = true;
+ },
+ handleDownload(file) {
+ const url = file.path || file.fileUrl;
+ if (url) {
+ const link = document.createElement("a");
+ link.href = url;
+ link.download = file.fileName;
+ document.body.appendChild(link);
+ link.click();
+ document.body.removeChild(link);
+ } else {
+ this.$message.warning("鏂囦欢璺緞涓嶅瓨鍦�");
+ }
+ },
+ getFileType(fileName) {
+ if (!fileName) return "other";
+ const ext = fileName
+ .split(".")
+ .pop()
+ .toLowerCase();
+ if (["jpg", "jpeg", "png", "gif", "bmp", "webp"].includes(ext))
+ return "image";
+ if (ext === "pdf") return "pdf";
+ if (["doc", "docx", "xls", "xlsx", "ppt", "pptx"].includes(ext))
+ return "office";
+ return "other";
+ },
+ formatDateTime(dt) {
+ if (!dt) return "";
+ try {
+ const d = new Date(dt);
+ if (isNaN(d.getTime())) return dt;
+ return `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(
+ 2,
+ "0"
+ )}-${String(d.getDate()).padStart(2, "0")} ${String(
+ d.getHours()
+ ).padStart(2, "0")}:${String(d.getMinutes()).padStart(2, "0")}`;
+ } catch {
+ return dt;
+ }
+ },
+ formatFileSize(bytes) {
+ if (!bytes || bytes === 0) return "0 B";
+ const k = 1024;
+ const sizes = ["B", "KB", "MB", "GB"];
+ const i = Math.floor(Math.log(bytes) / Math.log(k));
+ return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + " " + sizes[i];
+ },
+ getFileIconColor(name) {
+ const map = {
+ image: "#67C23A",
+ pdf: "#F56C6C",
+ office: "#409EFF",
+ other: "#909399"
+ };
+ return map[this.getFileType(name)] || "#909399";
+ },
+ getFileTagType(name) {
+ const map = {
+ image: "success",
+ pdf: "danger",
+ office: "primary",
+ other: "info"
+ };
+ return map[this.getFileType(name)] || "info";
+ },
+ getFileTypeText(name) {
+ const map = { image: "鍥剧墖", pdf: "PDF", office: "鏂囨。", other: "鍏朵粬" };
+ return map[this.getFileType(name)] || "鏈煡";
+ },
+ isPreviewable(fileName) {
+ return ["image", "pdf"].includes(this.getFileType(fileName));
+ },
+ exportData() {
+ return {
+ tableData: this.tableData,
+ columns: this.dynamicColumns,
+ statistics: {
+ filledCount: this.filledCount,
+ completionRate: this.completionRate,
+ totalColumns: this.dynamicColumns.length
+ },
+ exportTime: new Date().toISOString(),
+ attachments: this.attachments
+ };
+ }
+ },
+ mounted() {
+ this.$nextTick(() => {
+ if (Object.keys(this.internalData).length === 0) this.initTableData();
+ this.forceTableLayout();
+ });
+ }
+};
+</script>
+
+<style scoped>
+/* 澶嶇敤 BloodRoutinePanel 鏍峰紡 + HeartLabPanel 闄勪欢鍒嗙粍鏍峰紡 */
+.medical-panel {
+ padding: 20px;
+ background: #fff;
+ border-radius: 8px;
+ box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+}
+
+.panel-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ margin-bottom: 24px;
+ padding-bottom: 16px;
+ border-bottom: 1px solid #ebeef5;
+}
+
+.panel-header h3 {
+ margin: 0;
+ color: #303133;
+ font-size: 20px;
+ font-weight: 600;
+}
+
+.panel-actions {
+ display: flex;
+ gap: 12px;
+ align-items: center;
+}
+
+.medical-table {
+ margin-bottom: 24px;
+ border-radius: 4px;
+ overflow: hidden;
+}
+
+.medical-table ::v-deep .el-table__body-wrapper {
+ overflow-x: auto;
+}
+
+.item-name-cell {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+}
+
+.reference-icon {
+ color: #909399;
+ font-size: 14px;
+ cursor: help;
+ margin-left: 8px;
+}
+
+.required-item::before {
+ content: "*";
+ color: #f56c6c;
+ margin-right: 4px;
+}
+
+.cell-content-wrapper {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ gap: 8px;
+ min-height: 32px;
+}
+
+.value-input {
+ flex: 1;
+ min-width: 80px;
+}
+
+.value-display-container {
+ display: flex;
+ align-items: center;
+ gap: 4px;
+}
+
+.value-text {
+ font-weight: 500;
+ color: #303133;
+ max-width: 80px;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+
+.unit-text {
+ color: #909399;
+ font-size: 12px;
+ flex-shrink: 0;
+}
+
+.validation-indicator {
+ flex-shrink: 0;
+}
+
+.valid-icon {
+ color: #67c23a;
+ font-size: 14px;
+}
+
+.invalid-icon {
+ color: #e6a23c;
+ font-size: 14px;
+}
+
+.statistics-section {
+ margin-bottom: 20px;
+}
+
+.stats-content {
+ display: flex;
+ gap: 20px;
+ align-items: center;
+ flex-wrap: wrap;
+}
+
+.stats-title {
+ font-weight: 600;
+ color: #303133;
+}
+
+.stats-item {
+ color: #606266;
+ font-size: 14px;
+}
+
+/* 闄勪欢涓婁紶鍖哄煙鏍峰紡浼樺寲 */
+.attachment-section {
+ margin-top: 24px;
+ padding: 20px;
+ border: 1px solid #ebeef5;
+ border-radius: 4px;
+ background: #fafafa;
+}
+
+.attachment-header {
+ display: flex;
+ align-items: center;
+ gap: 8px;
+ margin-bottom: 16px;
+}
+
+.attachment-title {
+ font-weight: 600;
+ color: #409eff;
+}
+
+.attachment-tip {
+ font-size: 12px;
+ color: #909399;
+}
+
+.attachment-list {
+ margin-top: 16px;
+}
+
+.list-title {
+ font-weight: bold;
+ margin-bottom: 12px;
+ color: #303133;
+ font-size: 14px;
+}
+
+.file-name {
+ font-size: 13px;
+ margin-left: 8px;
+}
+/* 鑷畾涔夊垪澶存牱寮� */
+.custom-column-header {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ gap: 4px;
+ padding: 4px 0;
+}
+
+.header-content {
+ display: flex;
+ align-items: center;
+ gap: 4px;
+ cursor: pointer;
+ transition: color 0.2s;
+ white-space: nowrap;
+}
+
+.header-content:hover {
+ color: #409eff;
+}
+
+.header-label {
+ font-size: 13px;
+ line-height: 1.4;
+}
+
+.header-remark-icon {
+ color: #909399;
+ font-size: 12px;
+ cursor: help;
+}
+
+.header-actions {
+ display: flex;
+ gap: 4px;
+ opacity: 0;
+ transition: opacity 0.2s;
+}
+
+.custom-column-header:hover .header-actions {
+ opacity: 1;
+}
+
+.header-btn {
+ padding: 2px 4px !important;
+ font-size: 14px !important;
+}
+
+.header-btn.delete-btn {
+ color: #f56c6c !important;
+}
+
+.header-btn.delete-btn:hover {
+ color: #c0392b !important;
+}
+
+/* 鍒楀ご缂栬緫鎸夐挳鍦ㄧ紪杈戞ā寮忎笅濮嬬粓鏄剧ず */
+.is-editing .header-actions {
+ opacity: 1;
+}
+/* 鍝嶅簲寮忚璁� */
+@media (max-width: 768px) {
+ .medical-panel {
+ padding: 12px;
+ }
+
+ .panel-header {
+ flex-direction: column;
+ align-items: flex-start;
+ gap: 12px;
+ }
+
+ .panel-actions {
+ width: 100%;
+ justify-content: flex-end;
+ }
+
+ .stats-content {
+ flex-direction: column;
+ align-items: flex-start;
+ gap: 8px;
+ }
+
+ .cell-content-wrapper {
+ flex-direction: column;
+ gap: 4px;
+ }
+}
+.attachment-group-section {
+ margin-top: 24px;
+ padding: 20px;
+ border: 1px solid #ebeef5;
+ border-radius: 4px;
+ background: #fafafa;
+}
+.attachment-category {
+ margin-bottom: 20px;
+}
+.attachment-category:last-child {
+ margin-bottom: 0;
+}
+.category-title {
+ font-size: 15px;
+ font-weight: 600;
+ color: #409eff;
+ margin-bottom: 12px;
+ display: flex;
+ align-items: center;
+ gap: 6px;
+}
+.attachment-list-mini {
+ margin-top: 8px;
+ display: flex;
+ flex-wrap: wrap;
+ gap: 8px;
+}
+.cell-description-wrapper {
+ width: 100%;
+}
+.description-display {
+ white-space: pre-wrap;
+ text-align: left;
+ padding: 4px 8px;
+ background: #f5f7fa;
+ border-radius: 4px;
+ min-height: 60px;
+ max-height: 120px;
+ overflow-y: auto;
+ font-size: 13px;
+ color: #303133;
+ line-height: 1.5;
+}
+.calculated-value {
+ background: #f0f9eb;
+ padding: 4px 12px;
+ border-radius: 4px;
+ font-weight: bold;
+ color: #67c23a;
+}
+</style>
diff --git a/src/components/MaintainComponents/PancreasLabPanel.vue b/src/components/MaintainComponents/PancreasLabPanel.vue
new file mode 100644
index 0000000..bcf3feb
--- /dev/null
+++ b/src/components/MaintainComponents/PancreasLabPanel.vue
@@ -0,0 +1,919 @@
+<template>
+ <div class="medical-panel">
+ <div class="panel-header">
+ <h3>鑳拌吅鍖栭獙妫�鏌�</h3>
+ <div class="panel-actions">
+ <el-button
+ v-if="isEditing"
+ type="primary"
+ size="small"
+ @click="addColumn"
+ icon="el-icon-plus"
+ >
+ 鏂板璁板綍鍒�
+ </el-button>
+ <el-tooltip content="鍒锋柊琛ㄦ牸甯冨眬" placement="top">
+ <el-button size="small" @click="forceTableLayout" icon="el-icon-refresh">
+ 鍒锋柊甯冨眬
+ </el-button>
+ </el-tooltip>
+ </div>
+ </div>
+
+ <el-table
+ :data="tableData"
+ border
+ style="width: 100%"
+ class="medical-table"
+ :key="tableKey"
+ @header-dragend="handleHeaderDragEnd"
+ v-loading="tableLoading"
+ >
+ <el-table-column
+ prop="itemName"
+ label="妫�娴嬮」鐩�"
+ width="260"
+ fixed
+ class-name="leave-alone"
+ >
+ <template #default="scope">
+ <div class="item-name-cell">
+ <span :class="{ 'required-item': scope.row.required }">
+ {{ scope.row.itemName }}
+ </span>
+ <el-tooltip
+ v-if="scope.row.reference"
+ :content="`鍙傝�冭寖鍥�: ${scope.row.reference}`"
+ placement="top"
+ >
+ <i class="el-icon-info reference-icon"></i>
+ </el-tooltip>
+ </div>
+ </template>
+ </el-table-column>
+
+ <el-table-column
+ v-for="(col, index) in dynamicColumns"
+ :key="col.key"
+ :label="col.label"
+ :min-width="140"
+ :resizable="isEditing"
+ header-align="center"
+ align="center"
+ >
+ <template #header>
+ <div class="custom-column-header">
+ <div class="header-content" @click.stop="handleEditColumn(index)">
+ <span class="header-label">{{ col.label.replace('\n', ' ') }}</span>
+ <el-tooltip v-if="col.remark" :content="col.remark" placement="top">
+ <i class="el-icon-info header-remark-icon"></i>
+ </el-tooltip>
+ </div>
+ <div class="header-actions" v-if="isEditing">
+ <el-tooltip content="缂栬緫鏃堕棿" placement="top">
+ <el-button
+ size="mini"
+ type="text"
+ icon="el-icon-edit"
+ class="header-btn"
+ @click.stop="handleEditColumn(index)"
+ />
+ </el-tooltip>
+ <el-tooltip content="鍒犻櫎姝ゅ垪" placement="top">
+ <el-button
+ size="mini"
+ type="text"
+ icon="el-icon-delete"
+ class="header-btn delete-btn"
+ @click.stop="handleDeleteColumnByIndex(index)"
+ />
+ </el-tooltip>
+ </div>
+ </div>
+ </template>
+
+ <template #default="scope">
+ <div class="cell-content-wrapper">
+ <el-input
+ v-if="isEditing"
+ v-model="scope.row.values[index]"
+ size="small"
+ :placeholder="getPlaceholder(scope.row)"
+ @blur="handleValueChange(scope.row, index)"
+ class="value-input"
+ />
+ <div v-else class="value-display-container">
+ <span class="value-text">{{ scope.row.values[index] || '-' }}</span>
+ <span v-if="scope.row.values[index] && scope.row.unit" class="unit-text">
+ {{ scope.row.unit }}
+ </span>
+ </div>
+ <div
+ v-if="scope.row.reference && scope.row.values[index]"
+ class="validation-indicator"
+ >
+ <i
+ v-if="isValueValid(scope.row, scope.row.values[index])"
+ class="el-icon-success valid-icon"
+ title="鏁板�煎湪姝e父鑼冨洿鍐�"
+ ></i>
+ <i
+ v-else
+ class="el-icon-warning invalid-icon"
+ title="鏁板�艰秴鍑烘甯歌寖鍥�"
+ ></i>
+ </div>
+ </div>
+ </template>
+ </el-table-column>
+ </el-table>
+
+ <!-- 闄勪欢鍖哄煙 -->
+ <div class="attachment-section">
+ <div class="attachment-header">
+ <i class="el-icon-paperclip"></i>
+ <span class="attachment-title">闄勪欢涓婁紶</span>
+ <span class="attachment-tip">鏀寔涓婁紶妫�楠屾姤鍛婂崟绛夋枃浠� (鏈�澶�10涓�)</span>
+ </div>
+
+ <UploadAttachment
+ ref="uploadAttachment"
+ :file-list="attachmentFileList"
+ :limit="attachmentLimit"
+ :accept="attachmentAccept"
+ :multiple="true"
+ @change="handleAttachmentChange"
+ @upload-success="handleUploadSuccess"
+ @upload-error="handleUploadError"
+ @remove="handleAttachmentRemove"
+ />
+
+ <!-- 闄勪欢鍒楄〃灞曠ず -->
+ <div class="attachment-list" v-if="attachments && attachments.length > 0">
+ <div class="list-title">宸蹭笂浼犻檮浠� ({{ attachments.length }})</div>
+ <el-table :data="attachments" style="width: 100%" size="small">
+ <el-table-column label="鏂囦欢鍚�" min-width="200">
+ <template slot-scope="scope">
+ <i
+ class="el-icon-document"
+ :style="{ color: getFileIconColor(scope.row.fileName) }"
+ ></i>
+ <span class="file-name">{{ scope.row.fileName }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column label="鏂囦欢绫诲瀷" width="100">
+ <template slot-scope="scope">
+ <el-tag :type="getFileTagType(scope.row.fileName)" size="small">
+ {{ getFileTypeText(scope.row.fileName) }}
+ </el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column label="涓婁紶鏃堕棿" width="160">
+ <template slot-scope="scope">
+ <span>{{ formatDateTime(scope.row.uploadTime) }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column label="鏂囦欢澶у皬" width="100">
+ <template slot-scope="scope">
+ <span>{{ formatFileSize(scope.row.fileSize) }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column label="鎿嶄綔" width="266" fixed="right">
+ <template slot-scope="scope">
+ <el-button
+ size="mini"
+ type="primary"
+ @click="handlePreview(scope.row)"
+ :disabled="!isPreviewable(scope.row.fileName)"
+ >
+ 棰勮
+ </el-button>
+ <el-button
+ v-if="isEditing"
+ size="mini"
+ type="success"
+ @click="handleDownload(scope.row)"
+ >
+ 涓嬭浇
+ </el-button>
+ <el-button
+ v-if="isEditing"
+ size="mini"
+ type="danger"
+ @click="handleRemoveAttachment(scope.$index)"
+ >
+ 鍒犻櫎
+ </el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+ </div>
+ </div>
+
+ <!-- 缁熻淇℃伅 -->
+ <div v-if="showStatistics" class="statistics-section">
+ <el-card shadow="never">
+ <div class="stats-content">
+ <span class="stats-title">鏁版嵁缁熻:</span>
+ <span class="stats-item">鎬昏褰曟暟: {{ dynamicColumns.length }} 涓椂闂寸偣</span>
+ <span class="stats-item">宸插~鍐�: {{ filledCount }} 椤�</span>
+ <span class="stats-item">瀹屾垚搴�: {{ completionRate }}%</span>
+ </div>
+ </el-card>
+ </div>
+
+ <!-- 鍒楃紪杈戝璇濇 -->
+ <el-dialog
+ :title="`${editingColumnIndex !== null ? '缂栬緫' : '鏂板'}鏃堕棿鐐筦"
+ :visible.sync="columnDialogVisible"
+ width="450px"
+ @closed="handleDialogClosed"
+ >
+ <el-form :model="columnForm" label-width="80px" ref="columnForm" :rules="columnRules">
+ <el-form-item label="鏃ユ湡" prop="date">
+ <el-date-picker
+ v-model="columnForm.date"
+ type="date"
+ placeholder="閫夋嫨鏃ユ湡"
+ value-format="yyyy-MM-dd"
+ style="width: 100%"
+ :disabled-date="disableFutureDates"
+ />
+ </el-form-item>
+ <el-form-item label="鏃堕棿" prop="time">
+ <el-time-picker
+ v-model="columnForm.time"
+ placeholder="閫夋嫨鏃堕棿"
+ value-format="HH:mm"
+ style="width: 100%"
+ />
+ </el-form-item>
+ <el-form-item label="澶囨敞" prop="remark">
+ <el-input
+ v-model="columnForm.remark"
+ type="textarea"
+ :rows="2"
+ placeholder="鍙�夊~鍐欐椂闂寸偣澶囨敞淇℃伅"
+ maxlength="100"
+ show-word-limit
+ />
+ </el-form-item>
+ </el-form>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="columnDialogVisible = false">鍙栨秷</el-button>
+ <el-button
+ v-if="editingColumnIndex !== null"
+ type="danger"
+ @click="handleDeleteColumn"
+ >
+ 鍒犻櫎
+ </el-button>
+ <el-button type="primary" @click="confirmAddColumn" :loading="saveLoading">
+ 纭畾
+ </el-button>
+ </span>
+ </el-dialog>
+
+ <!-- 鏂囦欢棰勮寮圭獥 -->
+ <FilePreviewDialog
+ :visible="previewVisible"
+ :file="currentPreviewFile"
+ @close="previewVisible = false"
+ @download="handleDownload"
+ />
+ </div>
+</template>
+
+<script>
+import UploadAttachment from "@/components/UploadAttachment";
+import FilePreviewDialog from "@/components/FilePreviewDialog";
+import dayjs from "dayjs";
+
+export default {
+ name: 'PancreasLabPanel',
+ components: { UploadAttachment, FilePreviewDialog },
+ props: {
+ isEditing: { type: Boolean, default: false },
+ initialData: { type: Object, default: () => ({}) },
+ showStatistics: { type: Boolean, default: true }
+ },
+ data() {
+ return {
+ tableData: [],
+ dynamicColumns: [],
+ attachments: [],
+ attachmentFileList: [],
+ columnDialogVisible: false,
+ columnForm: { date: '', time: '', remark: '' },
+ editingColumnIndex: null,
+ tableKey: 0,
+ tableLoading: false,
+ saveLoading: false,
+ internalData: {},
+ columnRules: {
+ date: [{ required: true, message: '璇烽�夋嫨鏃ユ湡', trigger: 'change' }],
+ time: [{ required: true, message: '璇烽�夋嫨鏃堕棿', trigger: 'change' }]
+ },
+ previewVisible: false,
+ currentPreviewFile: null,
+ attachmentLimit: 10,
+ attachmentAccept: '.pdf,.jpg,.jpeg,.png,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.txt'
+ };
+ },
+ computed: {
+ filledCount() {
+ let count = 0;
+ this.tableData.forEach(row => {
+ row.values.forEach(v => { if (v && v.toString().trim()) count++; });
+ });
+ return count;
+ },
+ completionRate() {
+ const total = this.tableData.length * this.dynamicColumns.length;
+ return total > 0 ? Math.round((this.filledCount / total) * 100) : 0;
+ }
+ },
+ watch: {
+ initialData: {
+ handler(newData) {
+ if (newData && Object.keys(newData).length > 0) {
+ this.internalData = { ...newData };
+ this.initFromExternalData();
+ }
+ },
+ immediate: true,
+ deep: true
+ },
+ isEditing(newVal) {
+ if (!newVal) this.saveData();
+ this.$nextTick(() => this.forceTableLayout());
+ },
+ dynamicColumns: {
+ handler() { this.$nextTick(() => this.forceTableLayout()); },
+ deep: true,
+ immediate: true
+ },
+ // 鐩戝惉闄勪欢鏁版嵁鍙樺寲
+ attachments: {
+ handler(newAttachments) {
+ this.attachmentFileList = newAttachments.map(item => ({
+ uid: item.id || Math.random(),
+ name: item.fileName,
+ fileSize: item.fileSize,
+ url: item.path || item.fileUrl,
+ uploadTime: item.uploadTime,
+ status: "success"
+ }));
+ },
+ deep: true
+ }
+ },
+ methods: {
+ initFromExternalData() {
+ if (this.internalData.data && this.internalData.columns) {
+ this.tableData = this.internalData.data.map(item => ({
+ ...item,
+ values: item.values || new Array(this.internalData.columns.length).fill('')
+ }));
+ this.dynamicColumns = [...this.internalData.columns];
+ } else {
+ this.initTableData();
+ }
+ // 鍒濆鍖栭檮浠�
+ if (this.internalData.attachments) {
+ this.attachments = [...this.internalData.attachments];
+ }
+ },
+ initTableData() {
+ const items = this.getMedicalItems();
+ if (this.dynamicColumns.length === 0) {
+ this.dynamicColumns = [{
+ label: `${new Date().toISOString().split('T')[0]}\n08:00`,
+ key: 'time1',
+ date: new Date().toISOString().split('T')[0],
+ time: '08:00',
+ remark: '鍒濇妫�娴�'
+ }];
+ }
+ this.tableData = items.map(item => ({
+ ...item,
+ values: new Array(this.dynamicColumns.length).fill('')
+ }));
+ },
+ getMedicalItems() {
+ return [
+ { itemName: '绯栧寲琛�绾㈣泲鐧�(HbA1c)', unit: '%', required: true, reference: '4.0-6.0', min: 3.5, max: 7.0, type: 'number' },
+ { itemName: '琛�绯�(GLU)', unit: 'mmol/l', required: true, reference: '3.9-6.1', min: 3.0, max: 11.0, type: 'number' },
+ { itemName: '琛�娣�绮夐叾(AMS)', unit: 'U/L', required: true, reference: '30-110', min: 20, max: 250, type: 'number' },
+ { itemName: '鑴傝偑閰�(LPS)', unit: 'U/L', required: true, reference: '13-60', min: 10, max: 300, type: 'number' },
+ { itemName: '灏挎穩绮夐叾(UAMY)', unit: 'U/L', required: true, reference: '鈮�490', min: 0, max: 800, type: 'number' },
+ { itemName: '鎶椾汉鑳板矝绱犳姉浣�(IAA)', unit: 'IU/ml', required: false, reference: '<0.4', min: 0, max: 1.0, type: 'number' },
+ { itemName: '鑳板矝绱�(INS)', unit: 'iIU/ml', required: false, reference: '2.6-24.9', min: 0, max: 50, type: 'number' },
+ { itemName: 'C鑲�(C-P)', unit: 'ng/ml', required: false, reference: '0.37-1.47', min: 0, max: 3.0, type: 'number' }
+ ];
+ },
+ saveData() {
+ const dataToEmit = {
+ type: 'pancreas_lab',
+ data: this.tableData,
+ columns: this.dynamicColumns,
+ attachments: this.attachments
+ };
+ this.$emit('data-change', dataToEmit);
+ },
+ getPlaceholder(row) {
+ return row.reference ? `鍙傝��: ${row.reference}` : '璇疯緭鍏ユ暟鍊�';
+ },
+ isValueValid(row, value) {
+ if (!value || !row.min || !row.max) return true;
+ const numValue = parseFloat(value);
+ return !isNaN(numValue) && numValue >= row.min && numValue <= row.max;
+ },
+ addColumn() {
+ this.editingColumnIndex = null;
+ this.columnForm = { date: new Date().toISOString().split('T')[0], time: '08:00', remark: '' };
+ this.columnDialogVisible = true;
+ this.$nextTick(() => this.$refs.columnForm && this.$refs.columnForm.clearValidate());
+ },
+ handleEditColumn(index) {
+ if (!this.isEditing) return;
+ this.editingColumnIndex = index;
+ const col = this.dynamicColumns[index];
+ this.columnForm = { date: col.date || '', time: col.time || '', remark: col.remark || '' };
+ this.columnDialogVisible = true;
+ this.$nextTick(() => this.$refs.columnForm && this.$refs.columnForm.clearValidate());
+ },
+ handleDeleteColumnByIndex(index) {
+ this.$confirm(`纭畾瑕佸垹闄ゃ��${this.dynamicColumns[index].label.replace('\n', ' ')}銆嶈繖涓椂闂寸偣鐨勬墍鏈夋暟鎹悧锛焋, '鍒犻櫎纭', {
+ confirmButtonText: '纭畾鍒犻櫎', cancelButtonText: '鍙栨秷', type: 'warning'
+ }).then(() => {
+ this.dynamicColumns.splice(index, 1);
+ this.tableData.forEach(row => { if (row.values && row.values.length > index) row.values.splice(index, 1); });
+ this.tableKey += 1;
+ this.saveData();
+ this.$message({ type: 'success', message: '鏃堕棿鐐瑰凡鍒犻櫎' });
+ }).catch(() => {});
+ },
+ confirmAddColumn() {
+ this.$refs.columnForm.validate(valid => {
+ if (!valid) { this.$message.warning('璇峰畬鍠勬椂闂寸偣淇℃伅'); return; }
+ this.saveLoading = true;
+ if (this.editingColumnIndex !== null) {
+ const col = this.dynamicColumns[this.editingColumnIndex];
+ col.label = `${this.columnForm.date}\n${this.columnForm.time}`;
+ col.date = this.columnForm.date;
+ col.time = this.columnForm.time;
+ col.remark = this.columnForm.remark;
+ this.$message.success('鏃堕棿鐐逛慨鏀规垚鍔�');
+ } else {
+ const newCol = {
+ label: `${this.columnForm.date}\n${this.columnForm.time}`,
+ key: `time${Date.now()}`,
+ date: this.columnForm.date,
+ time: this.columnForm.time,
+ remark: this.columnForm.remark
+ };
+ this.dynamicColumns.push(newCol);
+ this.tableData.forEach(row => { if (!row.values) row.values = []; row.values.push(''); });
+ this.$message.success('鏃堕棿鐐规坊鍔犳垚鍔�');
+ }
+ this.columnDialogVisible = false;
+ this.saveLoading = false;
+ this.tableKey += 1;
+ this.saveData();
+ });
+ },
+ handleDeleteColumn() {
+ if (this.editingColumnIndex !== null) {
+ this.$confirm('纭畾瑕佸垹闄よ繖涓椂闂寸偣鍚楋紵', '鎻愮ず', {
+ confirmButtonText: '纭畾', cancelButtonText: '鍙栨秷', type: 'warning'
+ }).then(() => {
+ this.dynamicColumns.splice(this.editingColumnIndex, 1);
+ this.tableData.forEach(row => row.values.splice(this.editingColumnIndex, 1));
+ this.columnDialogVisible = false;
+ this.tableKey += 1;
+ this.saveData();
+ this.$message.success('鏃堕棿鐐瑰垹闄ゆ垚鍔�');
+ });
+ }
+ },
+ handleDialogClosed() {
+ this.editingColumnIndex = null;
+ this.columnForm = { date: '', time: '', remark: '' };
+ this.$refs.columnForm && this.$refs.columnForm.clearValidate();
+ },
+ disableFutureDates(time) { return time.getTime() > Date.now(); },
+ handleValueChange(row, columnIndex) { this.saveData(); },
+ forceTableLayout() {
+ this.$nextTick(() => {
+ const table = this.$el.querySelector('.el-table');
+ if (table) window.dispatchEvent(new Event('resize'));
+ });
+ },
+ handleHeaderDragEnd() { this.forceTableLayout(); },
+
+ // 闄勪欢鐩稿叧鏂规硶
+ handleAttachmentChange(fileList) {
+ this.attachmentFileList = fileList;
+ },
+
+ handleAttachmentRemove(file) {
+ if (file.url) {
+ const index = this.attachments.findIndex(
+ item => item.path === file.url || item.fileUrl === file.url
+ );
+ if (index > -1) {
+ this.attachments.splice(index, 1);
+ this.saveData();
+ this.$message.success("闄勪欢鍒犻櫎鎴愬姛");
+ }
+ }
+ },
+
+ handleUploadSuccess({ file, fileList, response }) {
+ if (response.code === 200) {
+ const attachmentObj = {
+ fileName: file.name,
+ path: response.fileUrl || file.url,
+ fileUrl: response.fileUrl || file.url,
+ fileType: this.getFileExtension(file.name),
+ fileSize: file.size,
+ uploadTime: dayjs().format("YYYY-MM-DD HH:mm:ss")
+ };
+
+ if (!Array.isArray(this.attachments)) {
+ this.attachments = [];
+ }
+
+ this.attachments.push(attachmentObj);
+ this.attachmentFileList = fileList;
+ this.saveData();
+ this.$message.success("鏂囦欢涓婁紶鎴愬姛");
+ }
+ },
+
+ handleUploadError({ error }) {
+ console.error("闄勪欢涓婁紶澶辫触:", error);
+ this.$message.error("鏂囦欢涓婁紶澶辫触锛岃閲嶈瘯");
+ },
+
+ handleRemoveAttachment(index) {
+ this.attachments.splice(index, 1);
+ this.attachmentFileList.splice(index, 1);
+ this.saveData();
+ this.$message.success("闄勪欢鍒犻櫎鎴愬姛");
+ },
+
+ handlePreview(file) {
+ this.currentPreviewFile = {
+ fileName: file.fileName,
+ fileUrl: file.path || file.fileUrl,
+ fileType: this.getFileType(file.fileName)
+ };
+ this.previewVisible = true;
+ },
+
+ handleDownload(file) {
+ const url = file.path || file.fileUrl;
+ if (url) {
+ const link = document.createElement("a");
+ link.href = url;
+ link.download = file.fileName;
+ document.body.appendChild(link);
+ link.click();
+ document.body.removeChild(link);
+ } else {
+ this.$message.warning("鏂囦欢璺緞涓嶅瓨鍦�");
+ }
+ },
+
+ getFileType(fileName) {
+ if (!fileName) return "other";
+ const ext = fileName.split('.').pop().toLowerCase();
+ if (["jpg", "jpeg", "png", "gif", "bmp", "webp"].includes(ext)) return "image";
+ if (ext === "pdf") return "pdf";
+ if (["doc", "docx", "xls", "xlsx", "ppt", "pptx"].includes(ext)) return "office";
+ return "other";
+ },
+
+ getFileIconColor(fileName) {
+ const map = { image: "#67C23A", pdf: "#F56C6C", office: "#409EFF", other: "#909399" };
+ return map[this.getFileType(fileName)] || "#909399";
+ },
+
+ getFileTagType(fileName) {
+ const map = { image: "success", pdf: "danger", office: "primary", other: "info" };
+ return map[this.getFileType(fileName)] || "info";
+ },
+
+ getFileTypeText(fileName) {
+ const map = { image: "鍥剧墖", pdf: "PDF", office: "鏂囨。", other: "鍏朵粬" };
+ return map[this.getFileType(fileName)] || "鏈煡";
+ },
+
+ isPreviewable(fileName) {
+ return ["image", "pdf"].includes(this.getFileType(fileName));
+ },
+
+ getFileExtension(filename) {
+ return filename.split('.').pop().toLowerCase();
+ },
+
+ formatFileSize(bytes) {
+ if (!bytes || bytes === 0) return "0 B";
+ const k = 1024;
+ const sizes = ["B", "KB", "MB", "GB"];
+ const i = Math.floor(Math.log(bytes) / Math.log(k));
+ return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + " " + sizes[i];
+ },
+
+ formatDateTime(dt) {
+ if (!dt) return "";
+ try {
+ const d = new Date(dt);
+ if (isNaN(d.getTime())) return dt;
+ return `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, "0")}-${String(d.getDate()).padStart(2, "0")} ${String(d.getHours()).padStart(2, "0")}:${String(d.getMinutes()).padStart(2, "0")}`;
+ } catch { return dt; }
+ },
+
+ exportData() {
+ return {
+ tableData: this.tableData,
+ columns: this.dynamicColumns,
+ statistics: { filledCount: this.filledCount, completionRate: this.completionRate, totalColumns: this.dynamicColumns.length },
+ exportTime: new Date().toISOString(),
+ attachments: this.attachments
+ };
+ }
+ },
+ mounted() {
+ this.$nextTick(() => {
+ if (Object.keys(this.internalData).length === 0) this.initTableData();
+ this.forceTableLayout();
+ });
+ }
+};
+</script>
+
+<style scoped>
+/* 澶嶇敤鍏ㄩ儴鏍峰紡 */
+.medical-panel {
+ padding: 20px;
+ background: #fff;
+ border-radius: 8px;
+ box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+}
+
+.panel-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ margin-bottom: 24px;
+ padding-bottom: 16px;
+ border-bottom: 1px solid #ebeef5;
+}
+
+.panel-header h3 {
+ margin: 0;
+ color: #303133;
+ font-size: 20px;
+ font-weight: 600;
+}
+
+.panel-actions {
+ display: flex;
+ gap: 12px;
+ align-items: center;
+}
+
+.medical-table {
+ margin-bottom: 24px;
+ border-radius: 4px;
+ overflow: hidden;
+}
+
+.medical-table ::v-deep .el-table__body-wrapper {
+ overflow-x: auto;
+}
+
+.item-name-cell {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+}
+
+.reference-icon {
+ color: #909399;
+ font-size: 14px;
+ cursor: help;
+ margin-left: 8px;
+}
+
+.required-item::before {
+ content: "*";
+ color: #f56c6c;
+ margin-right: 4px;
+}
+
+.cell-content-wrapper {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ gap: 8px;
+ min-height: 32px;
+}
+
+.value-input {
+ flex: 1;
+ min-width: 80px;
+}
+
+.value-display-container {
+ display: flex;
+ align-items: center;
+ gap: 4px;
+}
+
+.value-text {
+ font-weight: 500;
+ color: #303133;
+ max-width: 80px;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+
+.unit-text {
+ color: #909399;
+ font-size: 12px;
+ flex-shrink: 0;
+}
+
+.validation-indicator {
+ flex-shrink: 0;
+}
+
+.valid-icon {
+ color: #67c23a;
+ font-size: 14px;
+}
+
+.invalid-icon {
+ color: #e6a23c;
+ font-size: 14px;
+}
+
+.statistics-section {
+ margin-bottom: 20px;
+}
+
+.stats-content {
+ display: flex;
+ gap: 20px;
+ align-items: center;
+ flex-wrap: wrap;
+}
+
+.stats-title {
+ font-weight: 600;
+ color: #303133;
+}
+
+.stats-item {
+ color: #606266;
+ font-size: 14px;
+}
+
+/* 闄勪欢涓婁紶鍖哄煙鏍峰紡 */
+.attachment-section {
+ margin-top: 24px;
+ padding: 20px;
+ border: 1px solid #ebeef5;
+ border-radius: 4px;
+ background: #fafafa;
+}
+
+.attachment-header {
+ display: flex;
+ align-items: center;
+ gap: 8px;
+ margin-bottom: 16px;
+}
+
+.attachment-title {
+ font-weight: 600;
+ color: #409eff;
+}
+
+.attachment-tip {
+ font-size: 12px;
+ color: #909399;
+}
+
+.attachment-list {
+ margin-top: 16px;
+}
+
+.list-title {
+ font-weight: bold;
+ margin-bottom: 12px;
+ color: #303133;
+ font-size: 14px;
+}
+
+.file-name {
+ font-size: 13px;
+ margin-left: 8px;
+}
+
+/* 鑷畾涔夊垪澶存牱寮� */
+.custom-column-header {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ gap: 4px;
+ padding: 4px 0;
+}
+
+.header-content {
+ display: flex;
+ align-items: center;
+ gap: 4px;
+ cursor: pointer;
+ transition: color 0.2s;
+ white-space: nowrap;
+}
+
+.header-content:hover {
+ color: #409eff;
+}
+
+.header-label {
+ font-size: 13px;
+ line-height: 1.4;
+}
+
+.header-remark-icon {
+ color: #909399;
+ font-size: 12px;
+ cursor: help;
+}
+
+.header-actions {
+ display: flex;
+ gap: 4px;
+ opacity: 0;
+ transition: opacity 0.2s;
+}
+
+.custom-column-header:hover .header-actions {
+ opacity: 1;
+}
+
+.header-btn {
+ padding: 2px 4px !important;
+ font-size: 14px !important;
+}
+
+.header-btn.delete-btn {
+ color: #f56c6c !important;
+}
+
+.header-btn.delete-btn:hover {
+ color: #c0392b !important;
+}
+
+/* 鍒楀ご缂栬緫鎸夐挳鍦ㄧ紪杈戞ā寮忎笅濮嬬粓鏄剧ず */
+.is-editing .header-actions {
+ opacity: 1;
+}
+
+/* 鍝嶅簲寮忚璁� */
+@media (max-width: 768px) {
+ .medical-panel {
+ padding: 12px;
+ }
+
+ .panel-header {
+ flex-direction: column;
+ align-items: flex-start;
+ gap: 12px;
+ }
+
+ .panel-actions {
+ width: 100%;
+ justify-content: flex-end;
+ }
+
+ .stats-content {
+ flex-direction: column;
+ align-items: flex-start;
+ gap: 8px;
+ }
+
+ .cell-content-wrapper {
+ flex-direction: column;
+ gap: 4px;
+ }
+}
+</style>
diff --git a/src/components/MaintainComponents/UrineRoutinePanel.vue b/src/components/MaintainComponents/UrineRoutinePanel.vue
index d8d8a26..0009c88 100644
--- a/src/components/MaintainComponents/UrineRoutinePanel.vue
+++ b/src/components/MaintainComponents/UrineRoutinePanel.vue
@@ -29,7 +29,6 @@
border
style="width: 100%"
class="medical-table"
-
:key="tableKey"
@header-dragend="handleHeaderDragEnd"
v-loading="tableLoading"
@@ -60,12 +59,49 @@
<el-table-column
v-for="(col, index) in dynamicColumns"
:key="col.key"
- :label="col.label"
:min-width="160"
:resizable="isEditing"
header-align="center"
align="center"
>
+ <!-- 鑷畾涔夊垪澶� -->
+ <template #header>
+ <div class="custom-column-header">
+ <div class="header-content" @click.stop="handleEditColumn(index)">
+ <span class="header-label">{{
+ col.label.replace("\n", " ")
+ }}</span>
+ <el-tooltip
+ v-if="col.remark"
+ :content="col.remark"
+ placement="top"
+ >
+ <i class="el-icon-info header-remark-icon"></i>
+ </el-tooltip>
+ </div>
+ <div class="header-actions" v-if="isEditing">
+ <el-tooltip content="缂栬緫鏃堕棿" placement="top">
+ <el-button
+ size="mini"
+ type="text"
+ icon="el-icon-edit"
+ class="header-btn"
+ @click.stop="handleEditColumn(index)"
+ />
+ </el-tooltip>
+ <el-tooltip content="鍒犻櫎姝ゅ垪" placement="top">
+ <el-button
+ size="mini"
+ type="text"
+ icon="el-icon-delete"
+ class="header-btn delete-btn"
+ @click.stop="handleDeleteColumnByIndex(index)"
+ />
+ </el-tooltip>
+ </div>
+ </div>
+ </template>
+
<template #default="scope">
<div class="cell-content-wrapper">
<template v-if="scope.row.type === 'select'">
@@ -412,24 +448,37 @@
methods: {
// 浠庡閮ㄦ暟鎹垵濮嬪寲缁勪欢
initFromExternalData() {
- console.log(this.internalData, "this.internalData");
+ console.log(this.internalData, "this.internalData");
- if (this.internalData.data && this.internalData.columns) {
- this.tableData = this.internalData.data.map(item => ({
- ...item,
- values:
- item.values || new Array(this.internalData.columns.length).fill("")
- }));
- this.dynamicColumns = [...this.internalData.columns];
- } else {
- this.initTableData();
- }
+ if (this.internalData.data && this.internalData.columns) {
+ // 鑾峰彇鏈�鏂扮殑椤圭洰瀹氫箟锛堝惈浣犲垰鏀圭殑鐧界粏鑳� number 绫诲瀷锛�
+ const latestItems = this.getMedicalItems();
- // 鍒濆鍖栭檮浠�
- if (this.internalData.attachments) {
- this.attachments = [...this.internalData.attachments];
- }
- },
+ this.tableData = this.internalData.data.map(item => {
+ // 鎵惧埌瀵瑰簲鐨勬渶鏂板畾涔�
+ const latestItem = latestItems.find(
+ l => l.itemName === item.itemName
+ );
+
+ return {
+ ...item, // 鉁� 鍏堟妸鑰佹暟鎹睍寮�锛堝惈 values銆佹棫 type 绛夛級
+ ...latestItem, // 鉁� 鍐嶇敤鏈�鏂板畾涔夎鐩栵紙寮哄埗鏇存柊 type銆乷ptions銆乽nit 绛夛級
+ values:
+ item.values ||
+ new Array(this.internalData.columns.length).fill("")
+ };
+ });
+
+ this.dynamicColumns = [...this.internalData.columns];
+ } else {
+ this.initTableData();
+ }
+
+ // 鍒濆鍖栭檮浠�
+ if (this.internalData.attachments) {
+ this.attachments = [...this.internalData.attachments];
+ }
+},
// 鍒濆鍖栭粯璁よ〃鏍兼暟鎹�
initTableData() {
@@ -513,15 +562,13 @@
},
{
itemName: "鐧界粏鑳�",
- type: "select",
+ type: "number",
required: true,
- options: [
- { value: "-", label: "闃存��(-)" },
- { value: "+", label: "闃虫��(+)" },
- { value: "++", label: "闃虫��(++)" },
- { value: "+++", label: "闃虫��(+++)" }
- ],
- reference: "姝e父涓洪槾鎬�(-)"
+ unit: "/渭L",
+ reference: "0-385",
+ min: 0,
+ max: 385,
+ placeholder: "0-385"
},
{
itemName: "绾㈢粏鑳�",
@@ -577,15 +624,19 @@
});
},
- editColumn(index) {
+ handleEditColumn(index) {
+ if (!this.isEditing) return;
this.editingColumnIndex = index;
const column = this.dynamicColumns[index];
this.columnForm = {
- date: column.date,
- time: column.time,
+ date: column.date || "",
+ time: column.time || "",
remark: column.remark || ""
};
this.columnDialogVisible = true;
+ this.$nextTick(() => {
+ this.$refs.columnFormU && this.$refs.columnFormU.clearValidate();
+ });
},
confirmAddColumn() {
@@ -598,6 +649,7 @@
this.saveLoading = true;
if (this.editingColumnIndex !== null) {
+ // 缂栬緫鐜版湁鍒�
const column = this.dynamicColumns[this.editingColumnIndex];
column.label = `${this.columnForm.date}\n${this.columnForm.time}`;
column.date = this.columnForm.date;
@@ -605,6 +657,7 @@
column.remark = this.columnForm.remark;
this.$message.success("鏃堕棿鐐逛慨鏀规垚鍔�");
} else {
+ // 鏂板鍒�
const newColumn = {
label: `${this.columnForm.date}\n${this.columnForm.time}`,
key: `time${Date.now()}`,
@@ -612,7 +665,6 @@
time: this.columnForm.time,
remark: this.columnForm.remark
};
- this.internalData.columns.push(newColumn);
this.dynamicColumns.push(newColumn);
this.tableData.forEach(row => {
@@ -631,21 +683,62 @@
handleDeleteColumn() {
if (this.editingColumnIndex !== null) {
- this.$confirm("纭畾瑕佸垹闄よ繖涓椂闂寸偣鍚楋紵", "鎻愮ず", {
- confirmButtonText: "纭畾",
+ this.$confirm(
+ `纭畾瑕佸垹闄ゃ��${this.dynamicColumns[
+ this.editingColumnIndex
+ ].label.replace("\n", " ")}銆嶈繖涓椂闂寸偣鐨勬墍鏈夋暟鎹悧锛焋,
+ "鍒犻櫎纭",
+ {
+ confirmButtonText: "纭畾鍒犻櫎",
+ cancelButtonText: "鍙栨秷",
+ type: "warning"
+ }
+ )
+ .then(() => {
+ this.dynamicColumns.splice(this.editingColumnIndex, 1);
+ this.tableData.forEach(row => {
+ if (row.values && row.values.length > this.editingColumnIndex) {
+ row.values.splice(this.editingColumnIndex, 1);
+ }
+ });
+ this.columnDialogVisible = false;
+ this.tableKey += 1;
+ this.saveData();
+ this.$message.success("鏃堕棿鐐瑰垹闄ゆ垚鍔�");
+ })
+ .catch(() => {
+ // 鍙栨秷鍒犻櫎锛屼笉鍋氫换浣曟搷浣�
+ });
+ }
+ },
+
+ handleDeleteColumnByIndex(index) {
+ this.$confirm(
+ `纭畾瑕佸垹闄ゃ��${this.dynamicColumns[index].label.replace(
+ "\n",
+ " "
+ )}銆嶈繖涓椂闂寸偣鐨勬墍鏈夋暟鎹悧锛焋,
+ "鍒犻櫎纭",
+ {
+ confirmButtonText: "纭畾鍒犻櫎",
cancelButtonText: "鍙栨秷",
type: "warning"
- }).then(() => {
- this.dynamicColumns.splice(this.editingColumnIndex, 1);
+ }
+ )
+ .then(() => {
+ this.dynamicColumns.splice(index, 1);
this.tableData.forEach(row => {
- row.values.splice(this.editingColumnIndex, 1);
+ if (row.values && row.values.length > index) {
+ row.values.splice(index, 1);
+ }
});
- this.columnDialogVisible = false;
this.tableKey += 1;
this.saveData();
this.$message.success("鏃堕棿鐐瑰垹闄ゆ垚鍔�");
+ })
+ .catch(() => {
+ // 鍙栨秷鍒犻櫎锛屼笉鍋氫换浣曟搷浣�
});
- }
},
handleDialogClosed() {
@@ -921,6 +1014,68 @@
overflow-x: auto;
}
+/* 鑷畾涔夊垪澶存牱寮� */
+.custom-column-header {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ gap: 4px;
+ padding: 4px 0;
+}
+
+.header-content {
+ display: flex;
+ align-items: center;
+ gap: 4px;
+ cursor: pointer;
+ transition: color 0.2s;
+ white-space: nowrap;
+}
+
+.header-content:hover {
+ color: #409eff;
+}
+
+.header-label {
+ font-size: 13px;
+ line-height: 1.4;
+}
+
+.header-remark-icon {
+ color: #909399;
+ font-size: 12px;
+ cursor: help;
+}
+
+.header-actions {
+ display: flex;
+ gap: 4px;
+ opacity: 0;
+ transition: opacity 0.2s;
+}
+
+.custom-column-header:hover .header-actions {
+ opacity: 1;
+}
+
+.header-btn {
+ padding: 2px 4px !important;
+ font-size: 14px !important;
+}
+
+.header-btn.delete-btn {
+ color: #f56c6c !important;
+}
+
+.header-btn.delete-btn:hover {
+ color: #c0392b !important;
+}
+
+/* 缂栬緫妯″紡涓嬪缁堟樉绀烘搷浣滄寜閽� */
+.is-editing .header-actions {
+ opacity: 1;
+}
+
.item-name-cell {
display: flex;
align-items: center;
@@ -945,7 +1100,7 @@
align-items: center;
justify-content: center;
gap: 8px;
- min-height: 32px;
+ min-height: 36px;
}
.value-input {
@@ -962,7 +1117,7 @@
.value-text {
font-weight: 500;
color: #303133;
- max-width: 80px;
+ max-width: 90px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
@@ -1078,5 +1233,13 @@
flex-direction: column;
gap: 4px;
}
+
+ .custom-column-header {
+ padding: 2px 0;
+ }
+
+ .header-actions {
+ opacity: 1;
+ }
}
</style>
diff --git a/src/views/business/GetWitness/GetWitnessInfo.vue b/src/views/business/GetWitness/GetWitnessInfo.vue
index 7ae2546..d42c8bd 100644
--- a/src/views/business/GetWitness/GetWitnessInfo.vue
+++ b/src/views/business/GetWitness/GetWitnessInfo.vue
@@ -6,18 +6,6 @@
<el-card class="detail-card">
<div slot="header" class="clearfix">
<span class="detail-title">鍣ㄥ畼鑾峰彇鍩烘湰淇℃伅</span>
- <div style="float: right;">
- <el-button type="primary" @click="handleSave" :loading="saveLoading">
- 淇濆瓨
- </el-button>
- <el-button
- type="success"
- @click="handleProcure"
- :loading="confirmLoading"
- >
- 纭鑾峰彇
- </el-button>
- </div>
</div>
<el-form :model="form" ref="form" :rules="rules" label-width="120px">
@@ -141,7 +129,7 @@
<el-input v-model="form.coordinatorSign" />
</el-form-item>
</el-col> -->
- <el-col :span="8">
+ <!-- <el-col :span="8">
<el-form-item label="鑾峰彇鏃堕棿" prop="coordinatorSignTime">
<el-date-picker
v-model="form.coordinatorSignTime"
@@ -150,13 +138,10 @@
style="width: 100%"
/>
</el-form-item>
- </el-col>
- <el-col :span="8">
+ </el-col> -->
+ <el-col :span="8">
<el-form-item label="鏄惁榛樺搥缂呮��" prop="isspendremember">
- <el-select
- v-model="form.isspendremember"
- style="width: 100%"
- >
+ <el-select v-model="form.isspendremember" style="width: 100%">
<el-option label="鏄�" :value="1" />
<el-option label="鍚�" :value="0" />
</el-select>
@@ -164,10 +149,7 @@
</el-col>
<el-col :span="8">
<el-form-item label="鎭㈠閬椾綋浠" prop="isrestoreremains">
- <el-select
- v-model="form.isrestoreremains"
- style="width: 100%"
- >
+ <el-select v-model="form.isrestoreremains" style="width: 100%">
<el-option label="鏄�" :value="1" />
<el-option label="鍚�" :value="0" />
</el-select>
@@ -208,14 +190,14 @@
/>
</el-form-item>
</el-col>
- <el-col :span="8">
- <el-form-item label="鑾峰彇鏈烘瀯缂栫爜" prop="gainhospitalno">
+ <!-- <el-col :span="8">
+ <el-form-item label="鎹愮尞缂栧彿" prop="gainhospitalno">
<el-input
v-model="form.gainhospitalno"
- placeholder="璇疯緭鍏ヨ幏鍙栨満鏋勭紪鐮�"
+ placeholder="璇疯緭鍏ユ崘鐚紪鍙�"
/>
</el-form-item>
- </el-col>
+ </el-col> -->
</el-row>
</el-form>
</el-card>
@@ -225,7 +207,6 @@
<div slot="header" class="clearfix">
<span class="detail-title">鍣ㄥ畼鑾峰彇璁板綍</span>
<div style="float: right;">
-
<dict-tag
:options="dict.type.Obtain_status"
:value="form.witnessState"
@@ -262,7 +243,7 @@
<el-col>
<el-form-item>
<el-table
- :data="procurementData.serviceDonationwitnessorgans"
+ :data="displayOrgans"
v-loading="loading"
border
style="width: 100%"
@@ -286,7 +267,7 @@
<el-table-column
label="鑾峰彇寮�濮嬫椂闂�"
align="center"
- width="180"
+ width="260"
prop="organStartTime"
>
<template slot-scope="scope">
@@ -305,7 +286,7 @@
<el-table-column
label="鍣ㄥ畼绂讳綋鏃堕棿"
align="center"
- width="180"
+ width="260"
prop="organgettime"
>
<template slot-scope="scope">
@@ -324,30 +305,39 @@
<el-table-column
label="鑾峰彇鍖婚櫌"
align="center"
- width="200"
- prop="gainhospitalno"
+ width="300"
+ prop="gainhospitalname"
>
- <template slot-scope="scope">
+ <!-- <template slot-scope="scope">
<el-select
- v-model="scope.row.gainhospitalno"
+ v-model="scope.row.gainhospitalname"
placeholder="璇烽�夋嫨鑾峰彇鍖婚櫌"
style="width: 100%"
- @change="handleHospitalChange(scope.row, $event)"
>
<el-option
- v-for="hospital in hospitalList"
- :key="hospital.hospitalNo"
- :label="hospital.hospitalName"
- :value="hospital.hospitalNo"
- />
+ v-for="dict in dict.type.Geta_hospital"
+ :key="dict.value"
+ :label="dict.label"
+ :value="dict.value"
+ ></el-option>
+
</el-select>
+ </template> -->
+ <template slot-scope="scope">
+ <el-autocomplete
+ v-model="scope.row.gainhospitalname"
+ :fetch-suggestions="queryHospitalSearch"
+ placeholder="璇烽�夋嫨鎴栬緭鍏ヨ幏鍙栧尰闄�"
+ style="width: 100%"
+ clearable
+ ></el-autocomplete>
</template>
</el-table-column>
<el-table-column
label="鑾峰彇鍖诲笀"
align="center"
- width="120"
+ width="150"
prop="organgetdoct"
>
<template slot-scope="scope">
@@ -359,51 +349,6 @@
</el-table-column>
<!-- <el-table-column
- label="鍔╂墜"
- align="center"
- width="120"
- prop="assistant"
- >
- <template slot-scope="scope">
- <el-input
- v-model="scope.row.assistant"
- placeholder="鍔╂墜"
-
- />
- </template>
- </el-table-column> -->
-
- <!-- <el-table-column
- label="鑾峰彇鎶ゅ+"
- align="center"
- width="120"
- prop="procurementNurse"
- >
- <template slot-scope="scope">
- <el-input
- v-model="scope.row.procurementNurse"
- placeholder="鑾峰彇鎶ゅ+"
-
- />
- </template>
- </el-table-column>
-
- <el-table-column
- label="鎵嬫湳瀹ゆ姢澹�"
- align="center"
- width="120"
- prop="operatingRoomNurse"
- >
- <template slot-scope="scope">
- <el-input
- v-model="scope.row.operatingRoomNurse"
- placeholder="鎵嬫湳瀹ゆ姢澹�"
-
- />
- </template>
- </el-table-column> -->
-
- <el-table-column
label="鑾峰彇鐘舵��"
align="center"
width="120"
@@ -423,7 +368,7 @@
/>
</el-select>
</template>
- </el-table-column>
+ </el-table-column> -->
<el-table-column
label="璇存槑"
@@ -463,55 +408,6 @@
</el-col>
</el-row>
- <!-- 鑾峰彇缁熻淇℃伅 -->
- <!-- <div
- class="procurement-stats"
- v-if="
- procurementData.serviceDonationwitnessorgans &&
- procurementData.serviceDonationwitnessorgans.length > 0
- "
- >
- <el-row :gutter="20">
- <el-col :span="6">
- <div class="stat-item">
- <span class="stat-label">宸茶幏鍙栧櫒瀹�:</span>
- <span class="stat-value"
- >{{
- procurementData.serviceDonationwitnessorgans.length
- }}
- 涓�</span
- >
- </div>
- </el-col>
- <el-col :span="6">
- <div class="stat-item">
- <span class="stat-label">寰呭畬鍠勪俊鎭�:</span>
- <span class="stat-value">{{ incompleteRecords }} 涓�</span>
- </div>
- </el-col>
- <el-col :span="6">
- <div class="stat-item">
- <span class="stat-label">娑夊強鍖婚櫌:</span>
- <span class="stat-value">{{ uniqueHospitals }} 瀹�</span>
- </div>
- </el-col>
- <el-col :span="6">
- <div class="stat-item">
- <span class="stat-label">鑾峰彇鐘舵��:</span>
- <span class="stat-value">
- <el-tag
- :type="
- form.witnessState === 'completed' ? 'success' : 'warning'
- "
- >
- {{ form.witnessState === "completed" ? "宸插畬鎴�" : "杩涜涓�" }}
- </el-tag>
- </span>
- </div>
- </el-col>
- </el-row>
- </div> -->
-
<div
v-if="!procurementData.serviceDonationwitnessorgans"
class="empty-procurement"
@@ -523,89 +419,130 @@
</el-form>
</el-card>
- <!-- 闄勪欢绠$悊閮ㄥ垎浼樺寲 -->
+ <!-- 闄勪欢绠$悊閮ㄥ垎 - 鍒嗙被Tab灞曠ず -->
<el-card class="attachment-card">
- <div class="attachment-header">
- <i class="el-icon-paperclip"></i>
- <span class="attachment-title">鐩稿叧闄勪欢</span>
- <span class="attachment-tip"
- >鏀寔涓婁紶鍣ㄥ畼鑾峰彇鐩稿叧鏂囦欢 (鏈�澶歿{ attachmentLimit }}涓�)</span
- >
+ <div slot="header" class="clearfix">
+ <span class="detail-title">鐩稿叧闄勪欢</span>
</div>
- <!-- 浣跨敤 UploadAttachment 缁勪欢 -->
- <UploadAttachment
- ref="uploadAttachment"
- :file-list="attachmentFileList"
- :limit="attachmentLimit"
- :accept="attachmentAccept"
- :multiple="true"
- @change="handleAttachmentChange"
- @upload-success="handleUploadSuccess"
- @upload-error="handleUploadError"
- @remove="handleAttachmentRemove"
- />
+ <!-- 涓婁紶鍖哄煙锛堟棤鍒嗙被閫夋嫨锛岀敱Tab鎺у埗锛� -->
+ <div class="upload-wrapper">
+ <UploadAttachment
+ ref="uploadAttachment"
+ :file-list="attachmentFileList"
+ :limit="attachmentLimit"
+ :accept="attachmentAccept"
+ :multiple="true"
+ @change="handleAttachmentChange"
+ @upload-success="handleUploadSuccess"
+ @upload-error="handleUploadError"
+ @remove="handleAttachmentRemove"
+ />
+ <div style="font-size:12px; color:#909399; margin-top:4px;">
+ 褰撳墠涓婁紶鍒嗙被锛�<el-tag size="small" type="info">{{
+ activeTab === "鏈垎绫�" ? "鏈垎绫�" : activeTab
+ }}</el-tag>
+ 锛堝垏鎹� Tab 鍙敼鍙樹笂浼犲垎绫伙級
+ </div>
+ </div>
- <!-- 闄勪欢鍒楄〃灞曠ず -->
+ <!-- 闄勪欢鍒楄〃 - 鍒嗙被Tab灞曠ず锛屾敮鎸佷慨鏀瑰垎绫� -->
<div class="attachment-list" v-if="attachments && attachments.length > 0">
- <div class="list-title">宸蹭笂浼犻檮浠� ({{ attachments.length }})</div>
- <el-table :data="attachments" style="width: 100%" size="small">
- <el-table-column label="鏂囦欢鍚�" min-width="200">
- <template slot-scope="scope">
- <i
- class="el-icon-document"
- :style="{ color: getFileIconColor(scope.row.fileName) }"
- ></i>
- <span class="file-name">{{ scope.row.fileName }}</span>
- </template>
- </el-table-column>
- <el-table-column label="鏂囦欢绫诲瀷" width="100">
- <template slot-scope="scope">
- <el-tag :type="getFileTagType(scope.row.fileName)" size="small">
- {{ getFileTypeText(scope.row.fileName) }}
- </el-tag>
- </template>
- </el-table-column>
- <el-table-column label="涓婁紶鏃堕棿" width="160">
- <template slot-scope="scope">
- <span>{{ formatDateTime(scope.row.uploadTime) }}</span>
- </template>
- </el-table-column>
- <el-table-column label="鏂囦欢澶у皬" width="100">
- <template slot-scope="scope">
- <span>{{ formatFileSize(scope.row.fileSize) }}</span>
- </template>
- </el-table-column>
- <el-table-column label="鎿嶄綔" width="200" fixed="right">
- <template slot-scope="scope">
- <el-button
- size="mini"
- type="primary"
- @click="handlePreview(scope.row)"
- :disabled="!isPreviewable(scope.row.fileName)"
- >
- 棰勮
- </el-button>
- <el-button
- size="mini"
- type="success"
- @click="handleDownload(scope.row)"
- >
- 涓嬭浇
- </el-button>
- <el-button
- size="mini"
- type="danger"
- @click="handleRemoveAttachment(scope.$index)"
- >
- 鍒犻櫎
- </el-button>
- </template>
- </el-table-column>
- </el-table>
+ <el-tabs v-model="activeTab" type="border-card">
+ <el-tab-pane
+ v-for="category in categories"
+ :key="category"
+ :label="category + '(' + getCategoryCount(category) + ')'"
+ :name="category"
+ >
+ <el-table
+ :data="getCategoryFiles(category)"
+ style="width: 100%"
+ size="small"
+ border
+ >
+ <el-table-column label="鏂囦欢鍚�" min-width="180">
+ <template #default="scope">
+ <i
+ class="el-icon-document"
+ style="margin-right: 8px; color: #409EFF;"
+ ></i>
+ <span class="file-name">{{ scope.row.fileName }}</span>
+ </template>
+ </el-table-column>
+ <!-- 鍙紪杈戝垎绫讳笅鎷� -->
+ <el-table-column label="鍒嗙被" width="150">
+ <template #default="scope">
+ <el-select
+ v-model="scope.row.fileType"
+ size="small"
+ @change="updateAttachmentCategory(scope.row, $event)"
+ placeholder="閫夋嫨鍒嗙被"
+ >
+ <el-option label="鍘熻〃鎷嶇収" value="鍘熻〃鎷嶇収" />
+ <el-option label="浼︾悊瀹℃煡鏉愭枡" value="浼︾悊瀹℃煡鏉愭枡" />
+ <el-option label="姝讳骸鍒ゅ畾鏉愭枡" value="姝讳骸鍒ゅ畾鏉愭枡" />
+ <el-option label="榛樺搥浠紡鐓х墖" value="榛樺搥浠紡鐓х墖" />
+ <el-option label="鎹愮尞瑙佽瘉瑙嗛" value="鎹愮尞瑙佽瘉瑙嗛" />
+ <el-option label="鏈垎绫�" value="" />
+ </el-select>
+ </template>
+ </el-table-column>
+ <el-table-column label="鏂囦欢绫诲瀷" width="100">
+ <template #default="scope">
+ <el-tag size="small">{{
+ getFileTypeText(scope.row.fileName)
+ }}</el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column label="涓婁紶鏃堕棿" width="160">
+ <template #default="scope">
+ <span>{{ formatDateTime(scope.row.uploadTime) }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column label="鏂囦欢澶у皬" width="100">
+ <template #default="scope">
+ <span>{{ formatFileSize(scope.row.fileSize) }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column label="鎿嶄綔" width="180" fixed="right">
+ <template #default="scope">
+ <el-button
+ size="mini"
+ type="primary"
+ @click="handlePreview(scope.row)"
+ >棰勮</el-button
+ >
+ <el-button
+ size="mini"
+ type="danger"
+ @click="handleRemoveAttachmentByFile(scope.row)"
+ >鍒犻櫎</el-button
+ >
+ </template>
+ </el-table-column>
+ </el-table>
+ </el-tab-pane>
+ </el-tabs>
+ </div>
+
+ <!-- 鏃犻檮浠舵椂鏄剧ず -->
+ <div v-else style="text-align:center; padding:20px; color:#909399;">
+ 鏆傛棤闄勪欢锛岃涓婁紶
</div>
</el-card>
-
+ <div style="text-align: center; margin: 30px 0;">
+ <el-button type="primary" @click="handleSave" :loading="saveLoading">
+ 淇濆瓨
+ </el-button>
+ <el-button
+ type="success"
+ @click="handleProcure"
+ :loading="confirmLoading"
+ >
+ 纭鑾峰彇
+ </el-button>
+ </div>
<!-- 缂栬緫鑾峰彇璁板綍瀵硅瘽妗� -->
<el-dialog
title="缂栬緫鍣ㄥ畼鑾峰彇璁板綍"
@@ -619,7 +556,7 @@
<el-input v-model="currentRecord.organname" readonly />
</el-form-item>
</el-col>
- <el-col :span="12">
+ <!-- <el-col :span="12">
<el-form-item label="鑾峰彇鐘舵��">
<el-select v-model="currentRecord.organstate" style="width: 100%">
<el-option
@@ -630,7 +567,7 @@
/>
</el-select>
</el-form-item>
- </el-col>
+ </el-col> -->
</el-row>
<el-row :gutter="20">
@@ -678,10 +615,7 @@
/>
</el-form-item>
- <el-form-item
- label="鏈幏鍙栬鏄�"
- v-if="currentRecord.organstate === '0'"
- >
+ <el-form-item label="鏈幏鍙栬鏄�">
<el-input
type="textarea"
:rows="3"
@@ -740,6 +674,7 @@
},
dicts: [
"sys_BloodType",
+ "Geta_hospital",
"sys_DonationCategory",
"sys_Organ",
"Obtain_status"
@@ -800,6 +735,18 @@
coordinatorSignTime: "",
attachments: []
},
+ activeTab: "鍘熻〃鎷嶇収", // 褰撳墠婵�娲荤殑闄勪欢鍒嗙被Tab
+ presetCategories: [
+ "鍘熻〃鎷嶇収",
+ "浼︾悊瀹℃煡鏉愭枡",
+ "姝讳骸鍒ゅ畾鏉愭枡",
+ "榛樺搥浠紡鐓х墖",
+ "鎹愮尞瑙佽瘉瑙嗛"
+ ], // 棰勮鍒嗙被
+ organExpansionMap: {
+ C64: { subItems: ["C64L", "C64R"], subNames: ["宸﹁偩", "鍙宠偩"] },
+ C34: { subItems: ["C34L", "C34R"], subNames: ["宸﹁偤", "鍙宠偤"] }
+ },
// 琛ㄥ崟楠岃瘉瑙勫垯
rules: {
name: [
@@ -851,6 +798,32 @@
// 褰撳墠鐢ㄦ埛淇℃伅
currentUser() {
return JSON.parse(sessionStorage.getItem("user") || "{}");
+ },
+ displayOrgans() {
+ return (this.procurementData.serviceDonationwitnessorgans || []).filter(
+ item => item.delFlag !== 1
+ );
+ },
+ categories() {
+ // 濮嬬粓杩斿洖鎵�鏈夐璁惧垎绫� + 鏈垎绫伙紝鏃犺鏄惁鏈夋暟鎹�
+ return [
+ "鍘熻〃鎷嶇収",
+ "浼︾悊瀹℃煡鏉愭枡",
+ "姝讳骸鍒ゅ畾鏉愭枡",
+ "榛樺搥浠紡鐓х墖",
+ "鎹愮尞瑙佽瘉瑙嗛",
+ "鏈垎绫�"
+ ];
+ },
+ organReverseMap() {
+ const map = {};
+ for (const key in this.organExpansionMap) {
+ const { subItems } = this.organExpansionMap[key];
+ subItems.forEach(item => {
+ map[item] = key;
+ });
+ }
+ return map;
},
// 涓嶅畬鏁寸殑璁板綍鏁伴噺
incompleteRecords() {
@@ -923,13 +896,18 @@
this.getHospitalData();
},
- // 鐢熸垚鎹愮尞鑰呯紪鍙�
- // generateDonorNo() {
- // const timestamp = Date.now().toString();
- // this.form.donorno = "D" + timestamp.slice(-8);
- // this.form.caseNo = "CASE" + timestamp.slice(-6);
- // this.form.inpatientno = "IP" + timestamp.slice(-6);
- // },
+ getOrganNameByNo(organno) {
+ // 妫�鏌ユ槸鍚﹀湪鏄犲皠鐨勫瓙椤逛腑
+ for (const key in this.organExpansionMap) {
+ const { subItems, subNames } = this.organExpansionMap[key];
+ const idx = subItems.indexOf(organno);
+ if (idx !== -1) {
+ return subNames[idx];
+ }
+ }
+ // 鍚﹀垯浠庡瓧鍏镐腑鑾峰彇
+ return this.getOrganLabel(organno);
+ },
// 鑾峰彇璇︽儏
async getDetail(infoid) {
this.loading = true;
@@ -950,10 +928,25 @@
// 鍒濆鍖栭檮浠�
if (this.form.deathjudgeannex) {
- this.form.attachments = JSON.parse(this.form.deathjudgeannex);
- this.attachments = Array.isArray(this.form.attachments)
- ? [...this.form.attachments]
- : [];
+ const parsed = JSON.parse(this.form.deathjudgeannex);
+ this.attachments = parsed.map(item => ({
+ ...item,
+ fileType: item.fileType || "" // 榛樿绌哄瓧绗︿覆琛ㄧず鏈垎绫�
+ }));
+ this.form.attachments = this.attachments;
+ // 鍚屾 attachmentFileList
+ this.attachmentFileList = this.attachments.map(item => ({
+ uid: item.id || Math.random(),
+ name: item.fileName,
+ url: item.path || item.fileUrl,
+ fileSize: item.fileSize,
+ uploadTime: item.uploadTime,
+ status: "success",
+ raw: item
+ }));
+ } else {
+ this.attachments = [];
+ this.attachmentFileList = [];
}
// 澶勭悊鎹愮尞鍣ㄥ畼瀛楁
@@ -975,6 +968,7 @@
}
this.$message.success("鏁版嵁鍔犺浇鎴愬姛");
+ this.syncOrgansFromSelection();
} else {
this.$message.warning("鏈壘鍒板搴旂殑鍣ㄥ畼鑾峰彇鏁版嵁");
}
@@ -984,6 +978,52 @@
} finally {
this.loading = false;
}
+ },
+ syncOrgansFromSelection() {
+ const records = this.procurementData.serviceDonationwitnessorgans || [];
+ const targetNos = [];
+ this.selectedOrgans.forEach(val => {
+ if (this.organExpansionMap[val]) {
+ targetNos.push(...this.organExpansionMap[val].subItems);
+ } else {
+ targetNos.push(val);
+ }
+ });
+
+ // 鏂板鎴栨仮澶�
+ targetNos.forEach(no => {
+ const existing = records.find(r => r.organno === no);
+ if (existing) {
+ if (existing.delFlag === 1) {
+ existing.delFlag = 0; // 鎭㈠鏄剧ず
+ }
+ } else {
+ records.push({
+ id: null,
+ organname: this.getOrganNameByNo(no),
+ organno: no,
+ organStartTime: "",
+ organgettime: "",
+ gainhospitalno: "",
+ gainhospitalname: "",
+ organgetdoct: "",
+ assistant: "",
+ procurementNurse: "",
+ operatingRoomNurse: "",
+ anesthesiologist: "",
+ organstate: "1",
+ notgetreason: "",
+ delFlag: 0
+ });
+ }
+ });
+
+ // 锛堝彲閫夛級濡傛灉鍔犺浇鏃跺悗绔繑鍥炰簡 delFlag=1 鐨勮褰曪紝浣嗗疄闄呭簲璇ユ樉绀猴紝寮哄埗閲嶇疆
+ records.forEach(r => {
+ if (r.delFlag === 1) r.delFlag = 0;
+ });
+
+ this.form.organdonation = this.selectedOrgans.join(",");
},
// 鑾峰彇鍖婚櫌鏁版嵁
async getHospitalData() {
@@ -1002,87 +1042,139 @@
this.$message.error("鑾峰彇鍖婚櫌鏁版嵁澶辫触");
}
},
+ // 绉绘鍖婚櫌妯$硦鎼滅储
+ queryHospitalSearch(queryString, cb) {
+ const hospitals = this.dict.type.Geta_hospital || [];
+ const results = queryString
+ ? hospitals.filter(item =>
+ item.label.toLowerCase().includes(queryString.toLowerCase())
+ )
+ : hospitals;
+
+ // el-autocomplete 闇�瑕� value 瀛楁
+ cb(results.map(item => ({ value: item.label })));
+ },
// 鍣ㄥ畼閫夋嫨鐘舵�佸彉鍖�
- handleOrganSelectionChange(selectedValues) {
- if (!this.procurementData.serviceDonationwitnessorgans) {
- this.procurementData.serviceDonationwitnessorgans = [];
- }
-
- const currentOrganValues = this.procurementData.serviceDonationwitnessorgans.map(
- item => item.organno
- );
-
- // 澶勭悊浜掓枼閫昏緫
+ async handleOrganSelectionChange(selectedValues) {
+ // 1. 澶勭悊浜掓枼閫昏緫锛堜慨鏀� this.selectedOrgans锛�
this.handleExclusiveSelections(selectedValues);
- // 鏇存柊鎹愮尞鍣ㄥ畼瀛楁
- this.form.organdonation = selectedValues.join(",");
+ const finalSelected = this.selectedOrgans;
+ const records = this.procurementData.serviceDonationwitnessorgans || [];
- // 鏂板閫夋嫨鐨勫櫒瀹�
- selectedValues.forEach(organValue => {
- if (!currentOrganValues.includes(organValue)) {
- this.createOrganRecord(organValue);
+ // 2. 鏋勫缓鐩爣鍣ㄥ畼缂栧彿鍒楄〃锛堝睍寮�缁勫悎鍣ㄥ畼锛�
+ const targetOrganNos = [];
+ finalSelected.forEach(val => {
+ if (this.organExpansionMap[val]) {
+ targetOrganNos.push(...this.organExpansionMap[val].subItems);
+ } else {
+ targetOrganNos.push(val);
}
});
- // 绉婚櫎鍙栨秷閫夋嫨鐨勫櫒瀹�
- this.procurementData.serviceDonationwitnessorgans = this.procurementData.serviceDonationwitnessorgans.filter(
- record => {
- if (selectedValues.includes(record.organno)) {
- return true;
- } else {
- if (record.id) {
- this.$confirm(
- "鍒犻櫎鍣ㄥ畼鑾峰彇鏁版嵁鍚庡皢鏃犳硶鎭㈠锛屾偍纭鍒犻櫎璇ユ潯璁板綍鍚楋紵",
- "鎻愮ず",
- {
- confirmButtonText: "纭畾",
- cancelButtonText: "鍙栨秷",
- type: "warning"
- }
- )
- .then(() => {
- this.procurementData.serviceDonationwitnessorgans = this.procurementData.serviceDonationwitnessorgans.filter(
- r => r.organno !== record.organno
- );
- this.$message.success("鍒犻櫎鎴愬姛");
- })
- .catch(() => {
- this.selectedOrgans.push(record.organno);
- });
- return true;
- } else {
- return false;
- }
+ // 3. 鏂板鎴栨仮澶嶇洰鏍囧櫒瀹樿褰曪紙鏃犲脊绐楋級
+ targetOrganNos.forEach(no => {
+ const existing = records.find(r => r.organno === no);
+ if (existing) {
+ if (existing.delFlag === 1) {
+ existing.delFlag = 0; // 鎭㈠鏄剧ず
}
+ } else {
+ records.push({
+ id: null,
+ organname: this.getOrganNameByNo(no),
+ organno: no,
+ organStartTime: "",
+ organgettime: "",
+ gainhospitalno: "",
+ gainhospitalname: "",
+ organgetdoct: "",
+ assistant: "",
+ procurementNurse: "",
+ operatingRoomNurse: "",
+ anesthesiologist: "",
+ organstate: "1",
+ notgetreason: "",
+ delFlag: 0
+ });
}
- );
+ });
+
+ // 4. 鎵惧嚭闇�瑕佸彇娑堢殑璁板綍锛堜笉鍦ㄧ洰鏍囬泦鍚堜腑锛�
+ const toRemove = records.filter(r => !targetOrganNos.includes(r.organno));
+ const toRemoveSaved = toRemove.filter(r => r.id); // 宸蹭繚瀛橈紝闇�纭
+ const toRemoveUnsaved = toRemove.filter(r => !r.id); // 鏈繚瀛橈紝鐩存帴绉婚櫎
+
+ // 4.1 鐩存帴绉婚櫎鏈繚瀛樼殑璁板綍
+ toRemoveUnsaved.forEach(r => {
+ const idx = records.indexOf(r);
+ if (idx !== -1) records.splice(idx, 1);
+ });
+
+ // 4.2 澶勭悊宸蹭繚瀛樼殑璁板綍锛氬脊绐楃‘璁�
+ if (toRemoveSaved.length > 0) {
+ const organNames = toRemoveSaved.map(r => r.organname).join("銆�");
+ try {
+ await this.$confirm(
+ `鎮ㄧ‘瀹氳鍙栨秷浠ヤ笅宸蹭繚瀛樼殑鍣ㄥ畼鑾峰彇璁板綍鍚楋紵\n${organNames}\n鍙栨秷鍚庯紝杩欎簺璁板綍灏嗕粠鍒楄〃涓Щ闄わ紙鏁版嵁浠嶄繚鐣欙紝鍙仮澶嶏級銆俙,
+ "鎻愮ず",
+ {
+ confirmButtonText: "纭畾绉婚櫎",
+ cancelButtonText: "鍙栨秷",
+ type: "warning"
+ }
+ );
+ // 鐢ㄦ埛纭锛氭爣璁� delFlag=1
+ toRemoveSaved.forEach(r => {
+ r.delFlag = 1;
+ });
+ } catch (error) {
+ // 鐢ㄦ埛鍙栨秷锛氭仮澶嶉�変腑鐘舵��
+ const parentToRestore = new Set();
+ toRemoveSaved.forEach(r => {
+ const parent = this.organReverseMap[r.organno];
+ if (parent) {
+ parentToRestore.add(parent);
+ } else {
+ parentToRestore.add(r.organno);
+ }
+ });
+ parentToRestore.forEach(val => {
+ if (!this.selectedOrgans.includes(val)) {
+ this.selectedOrgans.push(val);
+ }
+ });
+ this.$message.info("宸插彇娑堝垹闄ゆ搷浣�");
+ // 鏇存柊琛ㄥ崟瀛楁锛堜繚鎸佷竴鑷存�э級
+ this.form.organdonation = this.selectedOrgans.join(",");
+ return; // 閫�鍑烘柟娉曪紝閬垮厤缁х画鎵ц
+ }
+ }
+
+ // 5. 鏇存柊琛ㄥ崟瀛楁
+ this.form.organdonation = this.selectedOrgans.join(",");
},
// 澶勭悊浜掓枼閫夋嫨
handleExclusiveSelections(selectedValues) {
- // 濡傛灉閫夋嫨浜�"鍙岃偩"(鍋囪瀛楀吀鍊间负C64)锛岃嚜鍔ㄥ彇娑堝崟鐙殑"宸﹁偩"(C64L)鍜�"鍙宠偩"(C64R)閫夋嫨
+ // 鍙岃偩涓庡乏鍙宠偩浜掓枼
if (selectedValues.includes("C64")) {
this.selectedOrgans = selectedValues.filter(
item => item !== "C64L" && item !== "C64R"
);
- }
- // 濡傛灉閫夋嫨浜�"宸﹁偩"鎴�"鍙宠偩"锛屽彇娑�"鍙岃偩"閫夋嫨
- else if (
+ } else if (
selectedValues.includes("C64L") ||
selectedValues.includes("C64R")
) {
this.selectedOrgans = selectedValues.filter(item => item !== "C64");
}
- // 濡傛灉閫夋嫨浜�"鍏ㄨ偤"(鍋囪瀛楀吀鍊间负C34)锛岃嚜鍔ㄥ彇娑堝崟鐙殑"宸﹁偤"(C34L)鍜�"鍙宠偤"(C34R)閫夋嫨
+ // 鍏ㄨ偤涓庡乏鍙宠偤浜掓枼
if (selectedValues.includes("C34")) {
this.selectedOrgans = selectedValues.filter(
item => item !== "C34L" && item !== "C34R"
);
- }
- // 濡傛灉閫夋嫨浜�"宸﹁偤"鎴�"鍙宠偤"锛屽彇娑�"鍏ㄨ偤"閫夋嫨
- else if (
+ } else if (
selectedValues.includes("C34L") ||
selectedValues.includes("C34R")
) {
@@ -1162,13 +1254,19 @@
if (valid) {
this.saveLoading = true;
try {
+ console.log(this.procurementData.serviceDonationwitnessorgans);
+
const saveData = {
...this.form,
deathjudgeannex: JSON.stringify(this.attachments),
organdonation: this.selectedOrgans.join(","),
serviceDonationwitnessorganList:
+ this.procurementData.serviceDonationwitnessorgans || [],
+ serviceDonationwitnessorgans:
this.procurementData.serviceDonationwitnessorgans || []
};
+ console.log(saveData.serviceDonationwitnessorganList);
+ console.log(saveData.serviceDonationwitnessorgans);
const apiMethod = this.form.id ? witnessedit : witnessadd;
const response = await apiMethod(saveData);
@@ -1291,40 +1389,101 @@
},
/** 闄勪欢绉婚櫎澶勭悊 */
- handleAttachmentRemove(file) {
- if (file.url) {
- const index = this.attachments.findIndex(
- item => item.path === file.url || item.fileUrl === file.url
- );
- if (index > -1) {
- this.attachments.splice(index, 1);
- this.$message.success("闄勪欢鍒犻櫎鎴愬姛");
- }
- }
- },
+ handleAttachmentRemove(file) {
+ // 鐩存帴璋冪敤鏂扮殑鍒犻櫎鏂规硶
+ if (file.raw) {
+ this.handleRemoveAttachmentByFile(file.raw);
+ } else if (file.url) {
+ const target = this.attachments.find(
+ item => item.path === file.url || item.fileUrl === file.url
+ );
+ if (target) {
+ this.handleRemoveAttachmentByFile(target);
+ }
+ }
+},
/** 涓婁紶鎴愬姛澶勭悊 */
handleUploadSuccess({ file, fileList, response }) {
- if (response.code === 200) {
- const attachmentObj = {
- fileName: file.name,
- path: response.fileUrl || file.url,
- fileUrl: response.fileUrl || file.url,
- fileType: this.getFileExtension(file.name),
- fileSize: file.size,
- uploadTime: dayjs().format("YYYY-MM-DD HH:mm:ss")
- };
+ if (response.code === 200) {
+ // 鏍规嵁褰撳墠婵�娲荤殑 Tab 鍐冲畾鍒嗙被锛堟湭鍒嗙被 Tab 瀵瑰簲绌哄瓧绗︿覆锛�
+ const category = this.activeTab === '鏈垎绫�' ? '' : this.activeTab;
+ const attachmentObj = {
+ fileName: file.name,
+ path: response.fileUrl || file.url,
+ fileUrl: response.fileUrl || file.url,
+ fileType: category, // 鍏抽敭锛氳褰曞垎绫�
+ fileSize: file.size,
+ uploadTime: dayjs().format('YYYY-MM-DD HH:mm:ss')
+ };
- if (!Array.isArray(this.attachments)) {
- this.attachments = [];
- }
+ if (!Array.isArray(this.attachments)) {
+ this.attachments = [];
+ }
+ this.attachments.push(attachmentObj);
+ this.attachmentFileList = fileList;
+ this.$message.success('鏂囦欢涓婁紶鎴愬姛');
+ }
+},
+// 鑾峰彇鏌愬垎绫荤殑鏂囦欢鏁伴噺
+getCategoryCount(category) {
+ return this.attachments.filter(item => {
+ const type = item.fileType || '';
+ if (category === '鏈垎绫�') {
+ return !this.presetCategories.includes(type);
+ }
+ return type === category;
+ }).length;
+},
- this.attachments.push(attachmentObj);
- this.attachmentFileList = fileList;
- this.$message.success("鏂囦欢涓婁紶鎴愬姛");
- }
- },
+// 鑾峰彇鏌愬垎绫荤殑鏂囦欢鍒楄〃
+getCategoryFiles(category) {
+ return this.attachments.filter(item => {
+ const type = item.fileType || '';
+ if (category === '鏈垎绫�') {
+ return !this.presetCategories.includes(type);
+ }
+ return type === category;
+ });
+},
+// 鏇存柊闄勪欢鍒嗙被锛堜笅鎷変慨鏀规椂瑙﹀彂锛�
+updateAttachmentCategory(row, newVal) {
+ const target = this.attachments.find(item => item === row);
+ if (target) {
+ target.fileType = newVal; // 鍙兘涓虹┖瀛楃涓�
+ // 鍚屾鏇存柊 attachmentFileList
+ const fileItem = this.attachmentFileList.find(
+ f => f.raw === row || f.url === row.fileUrl
+ );
+ if (fileItem) {
+ fileItem.raw.fileType = newVal;
+ fileItem.fileType = newVal || '鏈垎绫�';
+ }
+ // 濡傛灉褰撳墠婵�娲荤殑tab娌℃湁鏂囦欢浜嗭紝鑷姩鍒囨崲鍒扮涓�涓湁鏂囦欢鐨則ab
+ const currentTabHasFiles = this.getCategoryFiles(this.activeTab).length > 0;
+ if (!currentTabHasFiles) {
+ const firstCategory = this.categories[0];
+ if (firstCategory) this.activeTab = firstCategory;
+ }
+ }
+},
+
+// 鎸夋枃浠跺璞″垹闄わ紙鐢ㄤ簬琛ㄦ牸涓殑鍒犻櫎鎸夐挳锛�
+handleRemoveAttachmentByFile(file) {
+ const index = this.attachments.findIndex(item => item === file);
+ if (index > -1) {
+ this.attachments.splice(index, 1);
+ // 鍚屾鍒犻櫎 attachmentFileList
+ const fileIndex = this.attachmentFileList.findIndex(
+ f => f.raw === file || f.url === file.fileUrl
+ );
+ if (fileIndex > -1) {
+ this.attachmentFileList.splice(fileIndex, 1);
+ }
+ this.$message.success('闄勪欢鍒犻櫎鎴愬姛');
+ }
+},
/** 涓婁紶閿欒澶勭悊 */
handleUploadError({ file, fileList, error }) {
console.error("闄勪欢涓婁紶澶辫触:", error);
diff --git a/src/views/business/OrganUtilization/OrganUtilizationInfo.vue b/src/views/business/OrganUtilization/OrganUtilizationInfo.vue
index d6a0daa..839a358 100644
--- a/src/views/business/OrganUtilization/OrganUtilizationInfo.vue
+++ b/src/views/business/OrganUtilization/OrganUtilizationInfo.vue
@@ -6,22 +6,6 @@
<el-card class="detail-card">
<div slot="header" class="clearfix">
<span class="detail-title">鍣ㄥ畼鍒╃敤鍩烘湰淇℃伅</span>
- <div style="float: right;">
- <el-button
- type="primary"
- @click="handleSave"
- :loading="saveLoading"
- >
- 淇濆瓨
- </el-button>
- <el-button
- type="success"
- @click="handleComplete"
- :loading="confirmLoading"
- >
- 瀹屾垚鍒╃敤
- </el-button>
- </div>
</div>
<el-row :gutter="20">
@@ -61,7 +45,7 @@
</el-col>
</el-row>
- <el-row :gutter="20">
+ <!-- <el-row :gutter="20">
<el-col :span="12">
<el-form-item label="鐧昏浜�" prop="createBy">
<el-input v-model="form.createBy" />
@@ -77,7 +61,7 @@
/>
</el-form-item>
</el-col>
- </el-row>
+ </el-row> -->
</el-card>
<el-card class="detail-card">
<div slot="header" class="clearfix">
@@ -164,7 +148,7 @@
<el-col>
<el-form-item>
<el-table
- :data="utilizationData.serviceDonatecomporganList"
+ :data="displayOrgans"
v-loading="loading"
border
style="width: 100%"
@@ -377,14 +361,14 @@
</template>
</el-table-column>
- <el-table-column label="绯荤粺缂栧彿" align="center" prop="caseNo">
+ <!-- <el-table-column label="绯荤粺缂栧彿" align="center" prop="caseNo">
<template slot-scope="scope">
<el-input
v-model="scope.row.caseNo"
placeholder="绯荤粺缂栧彿"
/>
</template>
- </el-table-column>
+ </el-table-column> -->
<el-table-column
label="绉绘鍖婚櫌"
@@ -393,22 +377,15 @@
prop="hospitalno"
>
<template slot-scope="scope">
- <el-select
- v-model="scope.row.hospitalno"
- placeholder="璇烽�夋嫨绉绘鍖婚櫌"
+ <el-autocomplete
+ v-model="scope.row.hospitalname"
+ :fetch-suggestions="queryHospitalSearch"
+ placeholder="璇烽�夋嫨鎴栬緭鍏ョЩ妞嶅尰闄�"
style="width: 100%"
- @change="handleHospitalChange(scope.row, $event)"
- >
- <el-option
- v-for="hospital in hospitalList"
- :key="hospital.hospitalNo"
- :label="hospital.hospitalName"
- :value="hospital.hospitalNo"
- />
- </el-select>
+ clearable
+ ></el-autocomplete>
</template>
</el-table-column>
-
<el-table-column
label="绉绘鐘舵��"
align="center"
@@ -490,89 +467,129 @@
</el-card>
<!-- 闄勪欢绠$悊閮ㄥ垎 -->
- <!-- 闄勪欢绠$悊閮ㄥ垎 - 浼樺寲涓哄畬鏁村姛鑳� -->
+ <!-- 闄勪欢绠$悊閮ㄥ垎 - 鍒嗙被Tab灞曠ず -->
<el-card class="attachment-card">
- <div class="attachment-header">
- <i class="el-icon-paperclip"></i>
- <span class="attachment-title">鐩稿叧闄勪欢</span>
- <span class="attachment-tip"
- >鏀寔涓婁紶鍣ㄥ畼鍒╃敤鐩稿叧鏂囦欢 (鏈�澶歿{ attachmentLimit }}涓�)</span
- >
+ <div slot="header" class="clearfix">
+ <span class="detail-title">鐩稿叧闄勪欢</span>
</div>
- <!-- 浣跨敤 UploadAttachment 缁勪欢 -->
- <UploadAttachment
- ref="uploadAttachment"
- :file-list="attachmentFileList"
- :limit="attachmentLimit"
- :accept="attachmentAccept"
- :multiple="true"
- @change="handleAttachmentChange"
- @upload-success="handleUploadSuccess"
- @upload-error="handleUploadError"
- @remove="handleAttachmentRemove"
- />
+ <!-- 涓婁紶鍖哄煙锛堟棤鍒嗙被閫夋嫨锛岀敱Tab鎺у埗锛� -->
+ <div class="upload-wrapper">
+ <UploadAttachment
+ ref="uploadAttachment"
+ :file-list="attachmentFileList"
+ :limit="attachmentLimit"
+ :accept="attachmentAccept"
+ :multiple="true"
+ @change="handleAttachmentChange"
+ @upload-success="handleUploadSuccess"
+ @upload-error="handleUploadError"
+ @remove="handleAttachmentRemove"
+ />
+ <div style="font-size:12px; color:#909399; margin-top:4px;">
+ 褰撳墠涓婁紶鍒嗙被锛�<el-tag size="small" type="info">{{
+ activeTab === "鏈垎绫�" ? "鏈垎绫�" : activeTab
+ }}</el-tag>
+ 锛堝垏鎹� Tab 鍙敼鍙樹笂浼犲垎绫伙級
+ </div>
+ </div>
- <!-- 闄勪欢鍒楄〃灞曠ず -->
+ <!-- 闄勪欢鍒楄〃 - 鍒嗙被Tab灞曠ず锛屾敮鎸佷慨鏀瑰垎绫� -->
<div class="attachment-list" v-if="attachments && attachments.length > 0">
- <div class="list-title">宸蹭笂浼犻檮浠� ({{ attachments.length }})</div>
- <el-table :data="attachments" style="width: 100%" size="small">
- <el-table-column label="鏂囦欢鍚�" min-width="200">
- <template slot-scope="scope">
- <i
- class="el-icon-document"
- :style="{ color: getFileIconColor(scope.row.fileName) }"
- ></i>
- <span class="file-name">{{ scope.row.fileName }}</span>
- </template>
- </el-table-column>
- <el-table-column label="鏂囦欢绫诲瀷" width="100">
- <template slot-scope="scope">
- <el-tag :type="getFileTagType(scope.row.fileName)" size="small">
- {{ getFileTypeText(scope.row.fileName) }}
- </el-tag>
- </template>
- </el-table-column>
- <el-table-column label="涓婁紶鏃堕棿" width="200">
- <template slot-scope="scope">
- <span>{{ formatDateTime(scope.row.uploadTime) }}</span>
- </template>
- </el-table-column>
- <el-table-column label="鏂囦欢澶у皬" width="180">
- <template slot-scope="scope">
- <span>{{ formatFileSize(scope.row.fileSize) }}</span>
- </template>
- </el-table-column>
- <el-table-column label="鎿嶄綔" width="260" fixed="right">
- <template slot-scope="scope">
- <el-button
- size="mini"
- type="primary"
- @click="handlePreview(scope.row)"
- :disabled="!isPreviewable(scope.row.fileName)"
- >
- 棰勮
- </el-button>
- <el-button
- size="mini"
- type="success"
- @click="handleDownloadAttachment(scope.row)"
- >
- 涓嬭浇
- </el-button>
- <el-button
- size="mini"
- type="danger"
- @click="handleRemoveAttachment(scope.$index)"
- >
- 鍒犻櫎
- </el-button>
- </template>
- </el-table-column>
- </el-table>
+ <el-tabs v-model="activeTab" type="border-card">
+ <el-tab-pane
+ v-for="category in categories"
+ :key="category"
+ :label="category + '(' + getCategoryCount(category) + ')'"
+ :name="category"
+ >
+ <el-table
+ :data="getCategoryFiles(category)"
+ style="width: 100%"
+ size="small"
+ border
+ >
+ <el-table-column label="鏂囦欢鍚�" min-width="180">
+ <template #default="scope">
+ <i
+ class="el-icon-document"
+ style="margin-right: 8px; color: #409EFF;"
+ ></i>
+ <span class="file-name">{{ scope.row.fileName }}</span>
+ </template>
+ </el-table-column>
+ <!-- 鍙紪杈戝垎绫讳笅鎷� -->
+ <el-table-column label="鍒嗙被" width="150">
+ <template #default="scope">
+ <el-select
+ v-model="scope.row.fileType"
+ size="small"
+ @change="updateAttachmentCategory(scope.row, $event)"
+ placeholder="閫夋嫨鍒嗙被"
+ >
+ <el-option label="鍘熻〃鎷嶇収" value="鍘熻〃鎷嶇収" />
+ <el-option label="鎺ュ彈纭涔�" value="鎺ュ彈纭涔�" />
+ <el-option label="寮冪敤璇存槑" value="寮冪敤璇存槑" />
+ <el-option label="鎹愮尞璇佷功鐓х墖" value="鎹愮尞璇佷功鐓х墖" />
+ <el-option label="鏈垎绫�" value="" />
+ </el-select>
+ </template>
+ </el-table-column>
+ <el-table-column label="鏂囦欢绫诲瀷" width="100">
+ <template #default="scope">
+ <el-tag size="small">{{
+ getFileTypeText(scope.row.fileName)
+ }}</el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column label="涓婁紶鏃堕棿" width="160">
+ <template #default="scope">
+ <span>{{ formatDateTime(scope.row.uploadTime) }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column label="鏂囦欢澶у皬" width="120">
+ <template #default="scope">
+ <span>{{ formatFileSize(scope.row.fileSize) }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column label="鎿嶄綔" width="180" fixed="right">
+ <template #default="scope">
+ <el-button
+ size="mini"
+ type="primary"
+ @click="handlePreview(scope.row)"
+ >棰勮</el-button
+ >
+ <el-button
+ size="mini"
+ type="danger"
+ @click="handleRemoveAttachmentByFile(scope.row)"
+ >鍒犻櫎</el-button
+ >
+ </template>
+ </el-table-column>
+ </el-table>
+ </el-tab-pane>
+ </el-tabs>
+ </div>
+
+ <!-- 鏃犻檮浠舵椂鏄剧ず -->
+ <div v-else style="text-align:center; padding:20px; color:#909399;">
+ 鏆傛棤闄勪欢锛岃涓婁紶
</div>
</el-card>
-
+ <div style="text-align: center; margin: 30px 0;">
+ <el-button type="primary" @click="handleSave" :loading="saveLoading">
+ 淇濆瓨
+ </el-button>
+ <el-button
+ type="success"
+ @click="handleComplete"
+ :loading="confirmLoading"
+ >
+ 瀹屾垚鍒╃敤
+ </el-button>
+ </div>
<!-- 鏂囦欢棰勮瀵硅瘽妗� -->
<FilePreviewDialog
:visible="filePreviewVisible"
@@ -602,6 +619,7 @@
CaseBasicInfo
},
dicts: [
+ "Geta_hospital",
"sys_BloodType",
"sys_Organ",
"sys_FamilyRelation",
@@ -611,7 +629,8 @@
data() {
return {
caseId: null,
-
+ activeTab: "鍘熻〃鎷嶇収", // 褰撳墠婵�娲荤殑闄勪欢鍒嗙被Tab
+ presetCategories: ["鍘熻〃鎷嶇収", "鎺ュ彈纭涔�", "寮冪敤璇存槑", "鎹愮尞璇佷功鐓х墖"], // 棰勮鍒嗙被
// 琛ㄥ崟鏁版嵁 - 鏍规嵁鎺ュ彛鍙傛暟璋冩暣
form: {
id: undefined,
@@ -672,8 +691,13 @@
transplantStatusList: [
{ value: "1", label: "宸茬Щ妞�" },
{ value: "0", label: "鏈Щ妞�" },
- { value: "2", label: "绉绘涓�" }
+ { value: "2", label: "绉绘涓�" },
+ { value: "3", label: "搴撳瓨" }
],
+ organExpansionMap: {
+ C64: { subItems: ["C64L", "C64R"], subNames: ["宸﹁偩", "鍙宠偩"] },
+ C34: { subItems: ["C34L", "C34R"], subNames: ["宸﹁偤", "鍙宠偤"] }
+ },
// 鍒╃敤璁板綍鏁版嵁
utilizationData: {
serviceDonatecomporganList: []
@@ -708,6 +732,11 @@
currentUser() {
return JSON.parse(sessionStorage.getItem("user") || "{}");
},
+ categories() {
+ // 濮嬬粓杩斿洖鎵�鏈夐璁惧垎绫� + 鏈垎绫伙紝鍗充娇娌℃湁鏁版嵁涔熸樉绀�
+ const allCategories = ['鍘熻〃鎷嶇収', '鎺ュ彈纭涔�', '寮冪敤璇存槑', '鎹愮尞璇佷功鐓х墖', '鏈垎绫�'];
+ return allCategories;
+ },
// 宸茬Щ妞嶆暟閲�
transplantedCount() {
if (!this.utilizationData.serviceDonatecomporganList) return 0;
@@ -722,6 +751,22 @@
.map(record => record.hospitalno)
.filter(Boolean);
return new Set(hospitals).size;
+ },
+ organReverseMap() {
+ const map = {};
+ for (const key in this.organExpansionMap) {
+ const { subItems } = this.organExpansionMap[key];
+ subItems.forEach(item => {
+ map[item] = key;
+ });
+ }
+ return map;
+ },
+ // 杩囨护鎺� delFlag=1 鐨勮褰曪紙鐢ㄤ簬琛ㄦ牸灞曠ず锛�
+ displayOrgans() {
+ return (this.utilizationData.serviceDonatecomporganList || []).filter(
+ item => item.delFlag !== 1
+ );
},
// 鑾峰彇鍣ㄥ畼瀛楀吀
organDict() {
@@ -767,9 +812,32 @@
.substring(0, 19);
this.getDetail();
- this.getHospitalData();
},
+ syncOrgansFromSelection() {
+ const records = this.utilizationData.serviceDonatecomporganList || [];
+ const targetNos = [];
+ this.selectedOrgans.forEach(val => {
+ if (this.organExpansionMap[val]) {
+ targetNos.push(...this.organExpansionMap[val].subItems);
+ } else {
+ targetNos.push(val);
+ }
+ });
+ targetNos.forEach(no => {
+ const existing = records.find(r => r.organno === no);
+ if (existing) {
+ if (existing.delFlag === 1) existing.delFlag = 0;
+ } else {
+ // 浣跨敤鍒涘缓鏂规硶锛岃嚜鍔ㄥ寘鍚� delFlag:0
+ this.createOrganRecord(no);
+ }
+ });
+
+ // 寮哄埗鎵�鏈夎褰� delFlag=0锛堝姞杞芥椂搴旇鍏ㄩ儴鏈夋晥锛�
+ records.forEach(r => (r.delFlag = 0));
+ this.form.donateorgan = this.selectedOrgans.join(",");
+ },
// 鑾峰彇璇︽儏
async getDetail() {
this.loading = true;
@@ -813,14 +881,31 @@
console.log(this.utilizationData.serviceDonatecomporganList);
// 鍒濆鍖栭檮浠�
+ // 鏀逛负锛堢‘淇濇瘡涓檮浠堕兘鏈� fileType 瀛楁锛�
if (this.form.assessannex) {
- this.form.attachments = JSON.parse(this.form.assessannex);
- this.attachments = Array.isArray(this.form.attachments)
- ? [...this.form.attachments]
- : [];
+ const parsed = JSON.parse(this.form.assessannex);
+ this.attachments = parsed.map(item => ({
+ ...item,
+ fileType: item.fileType || "" // 榛樿绌哄瓧绗︿覆琛ㄧず鏈垎绫�
+ }));
+ this.form.attachments = this.attachments;
+ // 鍚屾 attachmentFileList
+ this.attachmentFileList = this.attachments.map(item => ({
+ uid: item.id || Math.random(),
+ name: item.fileName,
+ url: item.path || item.fileUrl,
+ fileSize: item.fileSize,
+ uploadTime: item.uploadTime,
+ status: "success",
+ raw: item
+ }));
+ } else {
+ this.attachments = [];
+ this.attachmentFileList = [];
}
this.$message.success("鏁版嵁鍔犺浇鎴愬姛");
+ this.syncOrgansFromSelection();
} else {
this.$message.warning("鏈壘鍒板搴旂殑鍣ㄥ畼鍒╃敤鏁版嵁");
}
@@ -833,81 +918,125 @@
},
// 鑾峰彇鍖婚櫌鏁版嵁
- async getHospitalData() {
- try {
- // TODO: 鏇挎崲涓哄疄闄呯殑鍖婚櫌鍒楄〃鎺ュ彛
- // 鏆傛椂浣跨敤妯℃嫙鏁版嵁
- this.hospitalList = [
- { hospitalNo: "H001", hospitalName: "鍖椾含鍗忓拰鍖婚櫌" },
- { hospitalNo: "H002", hospitalName: "涓婃捣鍗庡北鍖婚櫌" },
- { hospitalNo: "H003", hospitalName: "涓婃捣鐟為噾鍖婚櫌" },
- { hospitalNo: "H004", hospitalName: "骞垮窞涓北鍖婚櫌" },
- { hospitalNo: "H005", hospitalName: "姝︽眽鍚屾祹鍖婚櫌" },
- { hospitalNo: "H006", hospitalName: "鎴愰兘鍗庤タ鍖婚櫌" }
- ];
- } catch (error) {
- console.error("鑾峰彇鍖婚櫌鏁版嵁澶辫触:", error);
- this.$message.error("鑾峰彇鍖婚櫌鏁版嵁澶辫触");
- }
- },
+ // async getHospitalData() {
+ // try {
+ // // TODO: 鏇挎崲涓哄疄闄呯殑鍖婚櫌鍒楄〃鎺ュ彛
+ // // 鏆傛椂浣跨敤妯℃嫙鏁版嵁
+ // this.hospitalList = [
+ // { hospitalNo: "H001", hospitalName: "鍖椾含鍗忓拰鍖婚櫌" },
+ // { hospitalNo: "H002", hospitalName: "涓婃捣鍗庡北鍖婚櫌" },
+ // { hospitalNo: "H003", hospitalName: "涓婃捣鐟為噾鍖婚櫌" },
+ // { hospitalNo: "H004", hospitalName: "骞垮窞涓北鍖婚櫌" },
+ // { hospitalNo: "H005", hospitalName: "姝︽眽鍚屾祹鍖婚櫌" },
+ // { hospitalNo: "H006", hospitalName: "鎴愰兘鍗庤タ鍖婚櫌" }
+ // ];
+ // } catch (error) {
+ // console.error("鑾峰彇鍖婚櫌鏁版嵁澶辫触:", error);
+ // this.$message.error("鑾峰彇鍖婚櫌鏁版嵁澶辫触");
+ // }
+ // },
// 鍣ㄥ畼閫夋嫨鐘舵�佸彉鍖�
- handleOrganSelectionChange(selectedValues) {
- if (!this.utilizationData.serviceDonatecomporganList) {
- this.utilizationData.serviceDonatecomporganList = [];
- }
-
- const currentOrganValues = this.utilizationData.serviceDonatecomporganList.map(
- item => item.organno
- );
-
- // 澶勭悊浜掓枼閫昏緫
+ async handleOrganSelectionChange(selectedValues) {
+ // 1. 澶勭悊浜掓枼閫昏緫锛堜慨鏀� this.selectedOrgans锛�
this.handleExclusiveSelections(selectedValues);
- // 鏇存柊鎹愮尞鍣ㄥ畼瀛楁
- this.form.donateorgan = selectedValues.join(",");
+ const finalSelected = this.selectedOrgans;
+ const records = this.utilizationData.serviceDonatecomporganList || [];
- // 鏂板閫夋嫨鐨勫櫒瀹�
- selectedValues.forEach(organValue => {
- if (!currentOrganValues.includes(organValue)) {
- this.createOrganRecord(organValue);
+ // 2. 鏋勫缓鐩爣鍣ㄥ畼缂栧彿鍒楄〃锛堝睍寮�缁勫悎鍣ㄥ畼锛�
+ const targetOrganNos = [];
+ finalSelected.forEach(val => {
+ if (this.organExpansionMap[val]) {
+ targetOrganNos.push(...this.organExpansionMap[val].subItems);
+ } else {
+ targetOrganNos.push(val);
}
});
- // 绉婚櫎鍙栨秷閫夋嫨鐨勫櫒瀹�
- this.utilizationData.serviceDonatecomporganList = this.utilizationData.serviceDonatecomporganList.filter(
- record => {
- if (selectedValues.includes(record.organno)) {
- return true;
- } else {
- if (record.id) {
- this.$confirm(
- "鍒犻櫎鍣ㄥ畼鍒╃敤鏁版嵁鍚庡皢鏃犳硶鎭㈠锛屾偍纭鍒犻櫎璇ユ潯璁板綍鍚楋紵",
- "鎻愮ず",
- {
- confirmButtonText: "纭畾",
- cancelButtonText: "鍙栨秷",
- type: "warning"
- }
- )
- .then(() => {
- this.utilizationData.serviceDonatecomporganList = this.utilizationData.serviceDonatecomporganList.filter(
- r => r.organno !== record.organno
- );
- this.$message.success("鍒犻櫎鎴愬姛");
- })
- .catch(() => {
- this.selectedOrgans.push(record.organno);
- });
- return true;
- } else {
- return false;
- }
+ // 3. 鏂板鎴栨仮澶嶈褰曪紙鏃犻渶寮圭獥锛�
+ targetOrganNos.forEach(no => {
+ const existing = records.find(r => r.organno === no);
+ if (existing) {
+ if (existing.delFlag === 1) {
+ existing.delFlag = 0; // 鎭㈠鏄剧ず
}
+ } else {
+ this.createOrganRecord(no); // 鏂板璁板綍锛堝寘鍚� delFlag:0锛�
}
- );
- },
+ });
+ // 4. 鎵惧嚭闇�瑕佸彇娑堢殑璁板綍锛堜笉鍦ㄧ洰鏍囬泦鍚堜腑鐨勶級
+ const toRemove = records.filter(r => !targetOrganNos.includes(r.organno));
+ const toRemoveSaved = toRemove.filter(r => r.id); // 宸蹭繚瀛橈紝闇�纭
+ const toRemoveUnsaved = toRemove.filter(r => !r.id); // 鏈繚瀛橈紝鐩存帴绉婚櫎
+
+ // 4.1 鐩存帴绉婚櫎鏈繚瀛樼殑璁板綍
+ toRemoveUnsaved.forEach(r => {
+ const idx = records.indexOf(r);
+ if (idx !== -1) records.splice(idx, 1);
+ });
+
+ // 4.2 澶勭悊宸蹭繚瀛樼殑璁板綍锛氬脊绐楃‘璁�
+ if (toRemoveSaved.length > 0) {
+ const organNames = toRemoveSaved.map(r => r.organname).join("銆�");
+ try {
+ await this.$confirm(
+ `鎮ㄧ‘瀹氳鍙栨秷浠ヤ笅宸蹭繚瀛樼殑鍣ㄥ畼鍒╃敤璁板綍鍚楋紵\n${organNames}\n鍙栨秷鍚庯紝杩欎簺璁板綍灏嗕粠鍒楄〃涓Щ闄わ紙鏁版嵁浠嶄繚鐣欙紝鍙仮澶嶏級銆俙,
+ "鎻愮ず",
+ {
+ confirmButtonText: "纭畾绉婚櫎",
+ cancelButtonText: "鍙栨秷",
+ type: "warning"
+ }
+ );
+ // 鐢ㄦ埛纭锛氭爣璁� delFlag=1
+ toRemoveSaved.forEach(r => {
+ r.delFlag = 1;
+ });
+ } catch (error) {
+ // 鐢ㄦ埛鍙栨秷锛氭仮澶嶉�変腑鐘舵��
+ // 灏嗗彇娑堢殑鍣ㄥ畼閲嶆柊鍔犲叆 this.selectedOrgans
+ const parentToRestore = new Set();
+ toRemoveSaved.forEach(r => {
+ const parent = this.organReverseMap[r.organno];
+ if (parent) {
+ parentToRestore.add(parent);
+ } else {
+ parentToRestore.add(r.organno);
+ }
+ });
+ parentToRestore.forEach(val => {
+ if (!this.selectedOrgans.includes(val)) {
+ this.selectedOrgans.push(val);
+ }
+ });
+ // 鎻愮ず鐢ㄦ埛鎿嶄綔宸插彇娑�
+ this.$message.info("宸插彇娑堝垹闄ゆ搷浣�");
+ // 鏇存柊琛ㄥ崟瀛楁锛堜繚鎸佷竴鑷存�э級
+ this.form.donateorgan = this.selectedOrgans.join(",");
+ // 娉ㄦ剰锛氭鏃� records 涓凡鏂板浜嗙洰鏍囧櫒瀹橈紝骞朵笖涔嬪墠鐨勮褰曟湭琚爣璁板垹闄わ紝鐘舵�佷竴鑷淬��
+ // 浣嗘槸锛屾垜浠繕闇�瑕佺Щ闄や箣鍓嶆柊澧炰絾鐢ㄦ埛鍙兘涓嶆兂淇濈暀鐨勮褰曪紵涓嶄細锛屽洜涓烘柊澧炵殑鏄洰鏍囧櫒瀹橈紝鐢ㄦ埛鏄兂淇濈暀鐨勩��
+ // 鍥犳鐩存帴杩斿洖鍗冲彲銆�
+ return;
+ }
+ }
+
+ // 5. 鏇存柊琛ㄥ崟瀛楁
+ this.form.donateorgan = this.selectedOrgans.join(",");
+ },
+ // 绉绘鍖婚櫌妯$硦鎼滅储
+ queryHospitalSearch(queryString, cb) {
+ const hospitals = this.dict.type.Geta_hospital || [];
+ const results = queryString
+ ? hospitals.filter(item =>
+ item.label.toLowerCase().includes(queryString.toLowerCase())
+ )
+ : hospitals;
+
+ // el-autocomplete 闇�瑕� value 瀛楁
+ cb(results.map(item => ({ value: item.label })));
+ },
// 澶勭悊浜掓枼閫夋嫨
handleExclusiveSelections(selectedValues) {
// 濡傛灉閫夋嫨浜�"鍙岃偩"(鍋囪瀛楀吀鍊间负C64)锛岃嚜鍔ㄥ彇娑堝崟鐙殑"宸﹁偩"(C64L)鍜�"鍙宠偩"(C64R)閫夋嫨
@@ -954,6 +1083,7 @@
transplanttime: "",
transplantstate: "1",
abandonreason: "",
+ delFlag: 0, // 鏂板
sex: "",
age: "",
birthday: "",
@@ -979,16 +1109,6 @@
getOrganLabel(organValue) {
const dictItem = this.organDict.find(item => item.value === organValue);
return dictItem ? dictItem.label : organValue;
- },
-
- // 鍖婚櫌閫夋嫨鍙樺寲
- handleHospitalChange(row, hospitalNo) {
- const hospital = this.hospitalList.find(
- item => item.hospitalNo === hospitalNo
- );
- if (hospital) {
- row.hospitalname = hospital.hospitalName;
- }
},
// 绉绘鐘舵�佸彉鍖栧鐞�
@@ -1039,7 +1159,7 @@
getOrganRowClassName({ row }) {
if (
row.transplantstate === "1" &&
- (!row.caseNo || !row.hospitalno || !row.name || !row.transplanttime)
+ (!row.hospitalno || !row.name || !row.transplanttime)
) {
return "warning-row";
}
@@ -1170,12 +1290,7 @@
const incompleteRecords = this.utilizationData.serviceDonatecomporganList.filter(
record => {
if (record.transplantstate === "1") {
- return (
- !record.caseNo ||
- !record.hospitalno ||
- !record.name ||
- !record.transplanttime
- );
+ return !record.hospitalno || !record.name || !record.transplanttime;
} else if (record.transplantstate === "0") {
return !record.abandonreason;
}
@@ -1308,11 +1423,13 @@
/** 涓婁紶鎴愬姛澶勭悊 */
handleUploadSuccess({ file, fileList, response }) {
if (response.code === 200) {
+ // 鏍规嵁褰撳墠婵�娲荤殑 Tab 鍐冲畾鍒嗙被锛堟湭鍒嗙被 Tab 瀵瑰簲绌哄瓧绗︿覆锛�
+ const category = this.activeTab === "鏈垎绫�" ? "" : this.activeTab;
const attachmentObj = {
fileName: file.name,
path: response.fileUrl || file.url,
fileUrl: response.fileUrl || file.url,
- fileType: this.getFileExtension(file.name),
+ fileType: category, // 鍏抽敭锛氳褰曞垎绫�
fileSize: file.size,
uploadTime: dayjs().format("YYYY-MM-DD HH:mm:ss")
};
@@ -1320,13 +1437,71 @@
if (!Array.isArray(this.attachments)) {
this.attachments = [];
}
-
this.attachments.push(attachmentObj);
- this.attachmentFileList = fileList;
+ this.attachmentFileList = fileList; // 淇濇寔鍚屾
this.$message.success("鏂囦欢涓婁紶鎴愬姛");
}
},
+ // 鑾峰彇鏌愬垎绫荤殑鏂囦欢鏁伴噺
+ getCategoryCount(category) {
+ return this.attachments.filter(item => {
+ const type = item.fileType || "";
+ if (category === "鏈垎绫�") {
+ return !this.presetCategories.includes(type);
+ }
+ return type === category;
+ }).length;
+ },
+ // 鑾峰彇鏌愬垎绫荤殑鏂囦欢鍒楄〃
+ getCategoryFiles(category) {
+ return this.attachments.filter(item => {
+ const type = item.fileType || "";
+ if (category === "鏈垎绫�") {
+ return !this.presetCategories.includes(type);
+ }
+ return type === category;
+ });
+ },
+
+ // 鏇存柊闄勪欢鍒嗙被锛堜笅鎷変慨鏀规椂瑙﹀彂锛�
+ updateAttachmentCategory(row, newVal) {
+ const target = this.attachments.find(item => item === row);
+ if (target) {
+ target.fileType = newVal; // 鍙兘涓虹┖瀛楃涓�
+ // 鍚屾鏇存柊 attachmentFileList
+ const fileItem = this.attachmentFileList.find(
+ f => f.raw === row || f.url === row.fileUrl
+ );
+ if (fileItem) {
+ fileItem.raw.fileType = newVal;
+ fileItem.fileType = newVal || "鏈垎绫�";
+ }
+ // 濡傛灉褰撳墠婵�娲荤殑tab娌℃湁鏂囦欢浜嗭紝鑷姩鍒囨崲鍒扮涓�涓湁鏂囦欢鐨則ab
+ const currentTabHasFiles =
+ this.getCategoryFiles(this.activeTab).length > 0;
+ if (!currentTabHasFiles) {
+ const firstCategory = this.categories[0];
+ if (firstCategory) this.activeTab = firstCategory;
+ }
+ }
+ },
+
+ // 鎸夋枃浠跺璞″垹闄わ紙鐢ㄤ簬琛ㄦ牸涓殑鍒犻櫎鎸夐挳锛�
+ handleRemoveAttachmentByFile(file) {
+ const index = this.attachments.findIndex(item => item === file);
+ if (index > -1) {
+ this.attachments.splice(index, 1);
+ // 鍚屾鍒犻櫎 attachmentFileList
+ const fileIndex = this.attachmentFileList.findIndex(
+ f => f.raw === file || f.url === file.fileUrl
+ );
+ if (fileIndex > -1) {
+ this.attachmentFileList.splice(fileIndex, 1);
+ }
+ this.$message.success("闄勪欢鍒犻櫎鎴愬姛");
+ }
+ },
/** 涓婁紶閿欒澶勭悊 */
handleUploadError({ file, fileList, error }) {
console.error("闄勪欢涓婁紶澶辫触:", error);
@@ -1335,9 +1510,8 @@
/** 鎵嬪姩鍒犻櫎闄勪欢 */
handleRemoveAttachment(index) {
- this.attachments.splice(index, 1);
- this.attachmentFileList.splice(index, 1);
- this.$message.success("闄勪欢鍒犻櫎鎴愬姛");
+ // 鐩存帴璋冪敤鏂扮殑鍒犻櫎鏂规硶
+ this.handleRemoveAttachmentByFile(file.raw || file);
},
/** 鏂囦欢棰勮 */
diff --git a/src/views/business/affirm/affirmInfo.vue b/src/views/business/affirm/affirmInfo.vue
index abd3036..08f5204 100644
--- a/src/views/business/affirm/affirmInfo.vue
+++ b/src/views/business/affirm/affirmInfo.vue
@@ -6,7 +6,7 @@
<!-- 鍩虹淇℃伅 -->
<div slot="header" class="clearfix">
<span class="detail-title">鎹愮尞纭淇℃伅</span>
- <el-button
+ <!-- <el-button
type="primary"
style="float: right;margin-left: 20px;"
@click="handleSave"
@@ -21,7 +21,7 @@
:loading="saveLoading"
>
纭瀹屾垚
- </el-button>
+ </el-button> -->
</div>
<el-form :model="form" ref="form" label-width="120px">
@@ -36,27 +36,14 @@
<el-input v-model="form.coordinatedusernamet" />
</el-form-item>
</el-col>
- <el-col :span="8">
+ <!-- <el-col :span="8">
<el-form-item label="涓氬姟浜哄憳" prop="responsibleusername">
<el-input v-model="form.responsibleusername" />
</el-form-item>
- </el-col>
+ </el-col> -->
</el-row>
- <el-row :gutter="20">
- <!-- <el-col :span="8">
- <el-form-item label="纭鐘舵��" prop="relativeconfirmationsign">
- <el-select
- v-model="form.relativeconfirmationsign"
- style="width: 100%"
-
- >
- <el-option label="鏈‘璁�" value="0" />
- <el-option label="瀹跺睘纭" value="1" />
- <el-option label="涓嶅悓鎰忔崘鐚�" value="2" />
- </el-select>
- </el-form-item>
- </el-col> -->
+ <!-- <el-row :gutter="20">
<el-col :span="8">
<el-form-item label="绛惧瓧鏃堕棿" prop="signdate">
<el-date-picker
@@ -66,79 +53,44 @@
/>
</el-form-item>
</el-col>
- <!-- <el-col :span="8">
- <el-form-item label="琛�鍨�" prop="bloodtype">
- <el-input v-model="form.bloodtype" />
- </el-form-item>
- </el-col> -->
- </el-row>
-
- <!-- <el-row :gutter="20">
- <el-col :span="8">
- <el-form-item label="璇佷欢鍙风爜" prop="idcardno">
- <el-input v-model="form.idcardno" />
- </el-form-item>
- </el-col>
</el-row> -->
<!-- 浜插睘淇℃伅 -->
- <!-- 浜插睘淇℃伅 -->
<el-divider content-position="left">浜插睘纭淇℃伅</el-divider>
- <el-row :gutter="20">
- <el-col :span="6">
- <el-form-item label="浜插睘濮撳悕" prop="relativeconfirmationsignname">
- <el-input
- v-model="form.relativeconfirmationsignname"
- placeholder="璇疯緭鍏ヤ翰灞炲鍚�"
- />
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="涓庢崘璧犺�呭叧绯�" prop="signfamilyrelations">
- <el-select
- v-model="form.signfamilyrelations"
- placeholder="璇烽�夋嫨涓庢崘璧犺�呭叧绯�"
- >
- <el-option
- v-for="dict in dict.type.sys_FamilyRelation || []"
- :key="dict.value"
- :label="dict.label"
- :value="dict.value"
- ></el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="浜插睘韬唤璇�" prop="relativeidcardno">
- <el-input
- v-model="form.relativeidcardno"
- placeholder="璇疯緭鍏ヤ翰灞炶瘉浠跺彿鐮�"
- />
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="浜插睘鐢佃瘽" prop="relativephone">
- <el-input
- v-model="form.relativephone"
- placeholder="璇疯緭鍏ヤ翰灞炶仈绯荤數璇�"
- />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row style="margin-bottom: 10px;">
+ <el-alert
+ title="绗竴鏉℃暟鎹负涓昏浜插睘锛岄渶濉啓瀹屾暣鐨勫鍚嶃�佸叧绯汇�佽韩浠借瘉鍜岀數璇濅俊鎭�"
+ type="info"
+ show-icon
+ :closable="false"
+ style="margin-bottom: 15px;"
+ >
+ </el-alert>
+ <el-row style="margin-top: 15px;">
<el-button
+ style="float: right; margin-bottom: 5px;"
type="primary"
size="mini"
icon="el-icon-plus"
- @click="openOtherFamilyDialog()"
+ @click="openFamilyDialog(false)"
>
娣诲姞鍏朵粬瀹跺睘
</el-button>
</el-row>
- <el-table :data="otherFamilyList" size="small" border>
- <el-table-column label="濮撳悕" prop="name" />
- <el-table-column label="涓庢崘璧犺�呭叧绯�" prop="relation">
+ <el-table :data="familyMemberList" size="small" border>
+ <el-table-column label="搴忓彿" width="60" align="center">
+ <template slot-scope="scope">
+ {{ scope.$index + 1 }}
+ </template>
+ </el-table-column>
+ <el-table-column label="濮撳悕" prop="name" min-width="120">
+ <template slot-scope="scope">
+ <span :class="{ 'main-family': scope.$index === 0 }">{{
+ scope.row.name
+ }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column label="涓庢崘璧犺�呭叧绯�" prop="relation" min-width="140">
<template slot-scope="scope">
<dict-tag
:options="dict.type.sys_FamilyRelation"
@@ -146,28 +98,51 @@
/>
</template>
</el-table-column>
- <el-table-column label="鑱旂郴鐢佃瘽" prop="phone" />
-
- <el-table-column label="鎿嶄綔" width="120" align="center">
+ <el-table-column label="韬唤璇佸彿" prop="idcard" min-width="180">
+ <template slot-scope="scope">
+ <span v-if="scope.$index === 0">{{ scope.row.idcard }}</span>
+ <span v-else style="color: #909399;">-</span>
+ </template>
+ </el-table-column>
+ <el-table-column label="鑱旂郴鐢佃瘽" prop="phone" min-width="130">
+ <template slot-scope="scope">
+ <span v-if="scope.$index === 0">{{ scope.row.phone }}</span>
+ <span v-else style="color: #909399;">-</span>
+ </template>
+ </el-table-column>
+ <el-table-column label="绫诲瀷" width="70" align="center">
+ <template slot-scope="scope">
+ <el-tag v-if="scope.$index === 0" type="warning" size="small"
+ >涓昏</el-tag
+ >
+ <el-tag v-else type="info" size="small">鍏朵粬</el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column label="鎿嶄綔" width="150" align="center">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
- @click="editOtherFamily(scope.$index)"
+ @click="editFamilyMember(scope.$index)"
>
缂栬緫
</el-button>
<el-button
+ v-if="scope.$index > 0"
size="mini"
type="text"
style="color:red"
- @click="deleteOtherFamily(scope.$index)"
+ @click="deleteFamilyMember(scope.$index)"
>
鍒犻櫎
</el-button>
+ <span v-else style="color: #909399; font-size: 12px;"
+ >涓嶅彲鍒犻櫎</span
+ >
</template>
</el-table-column>
</el-table>
+
<el-row>
<el-form-item label-width="100px" label="鎹愮尞鍐冲畾">
<el-checkbox-group v-model="organdecision">
@@ -198,13 +173,14 @@
</el-form>
</el-card>
+ <!-- 娣诲姞杩欓噷锛氬簳閮ㄥ眳涓寜閽� -->
+
<!-- 闄勪欢淇℃伅 - 鎸夌被鍨嬪垎绫� -->
<el-card class="attachment-card">
<div slot="header" class="clearfix">
<span class="detail-title">鐩稿叧闄勪欢涓婁紶</span>
</div>
- <!-- 闄勪欢绫诲瀷閫夐」鍗� -->
<el-tabs v-model="activeAttachmentType" type="card">
<el-tab-pane
v-for="type in attachmentTypes"
@@ -227,7 +203,6 @@
</el-tooltip>
</div>
- <!-- 褰撳墠绫诲瀷鐨勯檮浠跺垪琛� -->
<div class="attachment-list">
<el-table
:data="getAttachmentsByType(type.value)"
@@ -245,7 +220,7 @@
</template>
</el-table-column>
- <el-table-column label="鏂囦欢绫诲瀷" width="100" align="center">
+ <el-table-column label="鏂囦欢绫诲瀷" width="90" align="center">
<template slot-scope="scope">
<el-tag size="small">{{
getFileType(scope.row.fileName)
@@ -253,19 +228,19 @@
</template>
</el-table-column>
- <el-table-column label="鏂囦欢澶у皬" width="100" align="center">
+ <el-table-column label="鏂囦欢澶у皬" width="90" align="center">
<template slot-scope="scope">
<span>{{ formatFileSize(scope.row.fileSize) }}</span>
</template>
</el-table-column>
- <el-table-column label="涓婁紶鏃堕棿" width="160" align="center">
+ <el-table-column label="涓婁紶鏃堕棿" width="155" align="center">
<template slot-scope="scope">
<span>{{ formatDateTime(scope.row.uploadTime) }}</span>
</template>
</el-table-column>
- <el-table-column label="鎿嶄綔" width="150" align="center">
+ <el-table-column label="鎿嶄綔" width="145" align="center">
<template slot-scope="scope">
<el-button
size="mini"
@@ -285,7 +260,6 @@
</el-table-column>
</el-table>
- <!-- 绌虹姸鎬佹彁绀� -->
<div
v-if="getAttachmentsByType(type.value).length === 0"
class="empty-attachment"
@@ -300,19 +274,46 @@
</el-tab-pane>
</el-tabs>
</el-card>
- <!-- 鍏朵粬瀹跺睘寮圭獥 -->
+ <!-- 搴曢儴鎿嶄綔鎸夐挳 -->
+ <div style="text-align: center; margin: 30px 0;">
+ <el-button
+ type="primary"
+ @click="handleSave"
+ :loading="saveLoading"
+ style="margin-right: 20px; min-width: 140px;"
+ >
+ 淇濆瓨纭淇℃伅
+ </el-button>
+ <el-button
+ type="success"
+ @click="accomplish"
+ :loading="saveLoading"
+ style="min-width: 140px;"
+ >
+ 纭瀹屾垚
+ </el-button>
+ </div>
+ <!-- 瀹跺睘寮圭獥 -->
<el-dialog
- :title="isEditOtherFamily ? '缂栬緫鍏朵粬瀹跺睘' : '娣诲姞鍏朵粬瀹跺睘'"
- :visible.sync="otherFamilyDialogVisible"
- width="400px"
+ :title="familyDialogTitle"
+ :visible.sync="familyDialogVisible"
+ width="420px"
+ :close-on-click-modal="false"
>
- <el-form :model="currentOtherFamily" label-width="100px">
+ <el-form :model="currentFamilyMember" label-width="110px">
<el-form-item label="濮撳悕" prop="name">
- <el-input v-model="currentOtherFamily.name" />
+ <el-input
+ v-model="currentFamilyMember.name"
+ placeholder="璇疯緭鍏ュ鍚�"
+ />
</el-form-item>
- <el-form-item label="鍏崇郴" prop="relation">
- <el-select v-model="currentOtherFamily.relation" style="width:100%">
+ <el-form-item label="涓庢崘璧犺�呭叧绯�" prop="relation">
+ <el-select
+ v-model="currentFamilyMember.relation"
+ style="width:100%"
+ placeholder="璇烽�夋嫨鍏崇郴"
+ >
<el-option
v-for="dict in dict.type.sys_FamilyRelation"
:key="dict.value"
@@ -322,21 +323,36 @@
</el-select>
</el-form-item>
- <el-form-item label="鐢佃瘽" prop="phone">
- <el-input v-model="currentOtherFamily.phone" />
- </el-form-item>
+ <template v-if="currentFamilyMember.isMain">
+ <el-form-item label="韬唤璇佸彿" prop="idcard">
+ <el-input
+ v-model="currentFamilyMember.idcard"
+ placeholder="璇疯緭鍏ヨ韩浠借瘉鍙�"
+ maxlength="18"
+ />
+ </el-form-item>
+
+ <el-form-item label="鑱旂郴鐢佃瘽" prop="phone">
+ <el-input
+ v-model="currentFamilyMember.phone"
+ placeholder="璇疯緭鍏ヨ仈绯荤數璇�"
+ maxlength="11"
+ />
+ </el-form-item>
+ </template>
</el-form>
<span slot="footer">
- <el-button @click="otherFamilyDialogVisible = false">鍙栨秷</el-button>
- <el-button type="primary" @click="saveOtherFamily">纭畾</el-button>
+ <el-button @click="familyDialogVisible = false">鍙栨秷</el-button>
+ <el-button type="primary" @click="saveFamilyMember">纭畾</el-button>
</span>
</el-dialog>
+
<!-- 涓婁紶瀵硅瘽妗� -->
<el-dialog
:title="`涓婁紶${getCurrentTypeLabel}闄勪欢`"
:visible.sync="uploadDialogVisible"
- width="500px"
+ width="480px"
:close-on-click-modal="false"
>
<el-upload
@@ -399,10 +415,7 @@
data() {
return {
caseId: null,
-
- // 鏄惁缂栬緫妯″紡
isEdit: false,
- // 琛ㄥ崟鏁版嵁
form: {
id: undefined,
infoid: undefined,
@@ -422,29 +435,28 @@
relativeidcardno: "",
relativephone: "",
relativeRemark: "",
- assessannex: "", // JSON瀛楃涓插瓨鍌ㄦ墍鏈夐檮浠�
- otherFamilyMembers: "" // 鉁� 鏂板
+ assessannex: "",
+ otherFamilyMembers: ""
},
+ // 缁熶竴浜插睘鍒楄〃锛堢涓�鏉′负涓昏浜插睘锛屽叾浣欎负鍏朵粬浜插睘锛�
+ familyMemberList: [],
+ // 褰撳墠缂栬緫鐨勫灞烇紙寮圭獥鐢級
+ currentFamilyMember: {
+ name: "",
+ relation: "",
+ phone: "",
+ idcard: "",
+ isMain: false
+ },
+ isEditFamilyMember: false,
+ editFamilyMemberIndex: -1,
+ familyDialogVisible: false,
+ familyDialogTitle: "娣诲姞瀹跺睘",
+
uploadAction: process.env.VUE_APP_BASE_API + "/common/upload",
headers: {
Authorization: "Bearer " + getToken()
},
- // 鍏朵粬瀹跺睘琛ㄦ牸鏁版嵁
- otherFamilyList: [],
-
- // 褰撳墠缂栬緫鐨勫叾浠栧灞烇紙寮圭獥鐢級
- currentOtherFamily: {
- name: "",
- relation: "",
- phone: ""
- },
-
- // 鏄惁缂栬緫妯″紡锛堝叾浠栧灞烇級
- isEditOtherFamily: false,
- editOtherFamilyIndex: -1,
-
- // 鍏朵粬瀹跺睘寮圭獥
- otherFamilyDialogVisible: false,
organdecision: [],
organdecisionOther: "",
organselection: [
@@ -457,22 +469,17 @@
"鐪艰鑶�",
"鍏朵粬"
],
- // 鍔犺浇鐘舵��
loading: false,
saveLoading: false,
infoid: null,
- // 闄勪欢鐩稿叧鏁版嵁
activeAttachmentType: "1",
attachmentLoading: false,
uploadDialogVisible: false,
uploadLoading: false,
tempFileList: [],
currentUploadType: "",
- // 棰勮鐩稿叧
previewVisible: false,
currentPreviewFile: null,
-
- // 闄勪欢绫诲瀷瀹氫箟
attachmentTypes: [
{ value: "1", label: "浜轰綋鍣ㄥ畼娼滃湪鎹愮尞鑰呯櫥璁拌〃" },
{ value: "2", label: "浜轰綋鍣ㄥ畼鎹愮尞浜插睘纭鐧昏琛�" },
@@ -481,10 +488,8 @@
{ value: "5", label: "鑴戞浜″垽瀹氱煡鎯呭悓鎰忎功" },
{ value: "6", label: "蹇冩浜″垽瀹氱煡鎯呭悓鎰忎功" }
],
-
- // 闄勪欢鏁版嵁缁撴瀯 - 鎸夌被鍨嬪垎寮�瀛樺偍
attachmentData: {
- "1": [], // 绫诲瀷1鐨勯檮浠跺垪琛�
+ "1": [],
"2": [],
"3": [],
"4": [],
@@ -510,12 +515,10 @@
}
},
methods: {
- // 鑾峰彇璇︽儏
async getDetail(infoid) {
this.loading = true;
try {
const response = await relativesList({ infoid });
-
if (response.code === 200) {
this.handleDetailData(response);
} else {
@@ -529,11 +532,8 @@
}
},
- // 澶勭悊璇︽儏鏁版嵁
handleDetailData(response) {
let detailData = null;
-
- // 鏍规嵁鎺ュ彛瀹為檯杩斿洖鐨勬暟鎹粨鏋勮繘琛岃皟鏁�
if (response.data) {
if (Array.isArray(response.data)) {
detailData = response.data[0] || {};
@@ -547,22 +547,11 @@
} else {
detailData = response;
}
- // 澶勭悊鍏朵粬瀹跺睘鏁版嵁
- if (detailData.otherFamilyMembers) {
- try {
- this.otherFamilyList =
- typeof detailData.otherFamilyMembers === "string"
- ? JSON.parse(detailData.otherFamilyMembers)
- : detailData.otherFamilyMembers || [];
- } catch (e) {
- this.otherFamilyList = [];
- }
- }
- // 鏄犲皠瀛楁鍒拌〃鍗�
+
this.form = {
...this.form,
id: detailData.id || this.$route.query.id,
- infoid: detailData.infoid || infoid,
+ infoid: detailData.infoid || this.infoid,
caseNo: detailData.caseNo || "",
name: detailData.name || "",
sex: detailData.sex || "",
@@ -583,19 +572,44 @@
assessannex: detailData.assessannex || ""
};
- // 澶勭悊鎹愮尞鍐冲畾鏁版嵁
+ // 鍒濆鍖栧灞炲垪琛�
+ this.familyMemberList = [];
+ if (detailData.relativeconfirmationsignname) {
+ this.familyMemberList.push({
+ name: detailData.relativeconfirmationsignname,
+ relation: detailData.signfamilyrelations || "",
+ phone: detailData.relativephone || "",
+ idcard: detailData.relativeidcardno || ""
+ });
+ }
+ if (detailData.otherFamilyMembers) {
+ try {
+ const otherMembers =
+ typeof detailData.otherFamilyMembers === "string"
+ ? JSON.parse(detailData.otherFamilyMembers)
+ : detailData.otherFamilyMembers || [];
+ otherMembers.forEach(member => {
+ this.familyMemberList.push({
+ name: member.name,
+ relation: member.relation,
+ phone: member.phone || "",
+ idcard: member.idcard || ""
+ });
+ });
+ } catch (e) {
+ console.warn("瑙f瀽鍏朵粬瀹跺睘鏁版嵁澶辫触:", e);
+ }
+ }
+
if (detailData.organdecision) {
this.organdecision = Array.isArray(detailData.organdecision)
? detailData.organdecision
: detailData.organdecision.split(",");
}
- console.log(this.organdecision, "this.organdecision");
- // 澶勭悊闄勪欢鏁版嵁 - 浠巃ssessannex瀛楁瑙f瀽JSON骞舵寜绫诲瀷鍒嗙被
this.processAssessannexData();
},
- // 澶勭悊assessannex瀛楁鏁版嵁骞舵寜绫诲瀷鍒嗙被
processAssessannexData() {
if (this.form.assessannex) {
try {
@@ -603,16 +617,12 @@
typeof this.form.assessannex === "string"
? JSON.parse(this.form.assessannex)
: this.form.assessannex;
-
- // 娓呯┖鐜版湁鏁版嵁
Object.keys(this.attachmentData).forEach(key => {
this.attachmentData[key] = [];
});
-
- // 鎸夌被鍨嬪垎绫诲瓨鍌�
if (Array.isArray(annexData)) {
annexData.forEach(attachment => {
- const type = attachment.type || "1"; // 榛樿鍒扮涓�绉嶇被鍨�
+ const type = attachment.type || "1";
if (this.attachmentData[type]) {
this.attachmentData[type].push(attachment);
}
@@ -624,12 +634,10 @@
}
},
- // 鏍规嵁绫诲瀷鑾峰彇闄勪欢鍒楄〃
getAttachmentsByType(type) {
return this.attachmentData[type] || [];
},
- // 鎵撳紑涓婁紶瀵硅瘽妗�
openUploadDialog(type) {
this.currentUploadType = type;
this.tempFileList = [];
@@ -641,7 +649,6 @@
});
},
- // 涓婁紶鍓嶆牎楠孾7](@ref)
beforeUpload(file) {
const allowedTypes = [
"application/pdf",
@@ -650,10 +657,7 @@
"application/msword",
"application/vnd.openxmlformats-officedocument.wordprocessingml.document"
];
-
- const maxSize = 10 * 1024 * 1024; // 10MB
-
- // 鏍¢獙鏂囦欢绫诲瀷
+ const maxSize = 10 * 1024 * 1024;
const isTypeOk =
allowedTypes.includes(file.type) ||
file.name.endsWith(".pdf") ||
@@ -662,29 +666,23 @@
file.name.endsWith(".png") ||
file.name.endsWith(".doc") ||
file.name.endsWith(".docx");
-
if (!isTypeOk) {
this.$message.error(
"鏂囦欢鏍煎紡涓嶆敮鎸侊紝璇蜂笂浼爌df銆乯pg銆乸ng銆乨oc鎴杁ocx鏍煎紡鏂囦欢"
);
return false;
}
-
- // 鏍¢獙鏂囦欢澶у皬
if (file.size > maxSize) {
this.$message.error("鏂囦欢澶у皬涓嶈兘瓒呰繃10MB");
return false;
}
-
return true;
},
- // 鏂囦欢閫夋嫨鍙樺寲
handleFileChange(file, fileList) {
this.tempFileList = fileList;
},
- // 绉婚櫎涓存椂鏂囦欢
handleTempRemove(file, fileList) {
this.tempFileList = fileList;
},
@@ -694,7 +692,6 @@
this.$message.error(response.msg || "涓婁紶澶辫触");
return;
}
-
const newAttachment = {
id: Date.now(),
fileName: file.name,
@@ -705,10 +702,8 @@
uploadTime: this.getCurrentTime(),
uploader: "褰撳墠鐢ㄦ埛"
};
-
this.attachmentData[this.currentUploadType].push(newAttachment);
this.updateAssessannexField();
-
this.$message.success("涓婁紶鎴愬姛");
this.uploadLoading = false;
this.uploadDialogVisible = false;
@@ -720,12 +715,10 @@
this.$message.warning("璇峰厛閫夋嫨瑕佷笂浼犵殑鏂囦欢");
return;
}
-
this.uploadLoading = true;
- this.$refs.uploadRef.submit(); // 鉁� 鍙皟鐢ㄤ竴娆�
+ this.$refs.uploadRef.submit();
},
- // 鍒犻櫎闄勪欢
handleRemoveAttachment(type, index) {
this.$confirm("纭畾瑕佸垹闄よ繖涓檮浠跺悧锛�", "鎻愮ず", {
confirmButtonText: "纭畾",
@@ -736,69 +729,157 @@
if (this.attachmentData[type] && this.attachmentData[type][index]) {
this.attachmentData[type].splice(index, 1);
this.$message.success("闄勪欢鍒犻櫎鎴愬姛");
- this.updateAssessannexField(); // 鏇存柊瀛樺偍瀛楁
+ this.updateAssessannexField();
}
})
.catch(() => {});
},
- openOtherFamilyDialog(index) {
- this.isEditOtherFamily = typeof index === "number";
- this.editOtherFamilyIndex = index || -1;
- this.currentOtherFamily = this.isEditOtherFamily
- ? { ...this.otherFamilyList[index] }
- : { name: "", relation: "", phone: "" };
+ // 瀹跺睘鎿嶄綔鏂规硶
+ openFamilyDialog(isMain) {
+ this.isEditFamilyMember = false;
+ this.editFamilyMemberIndex = -1;
+ this.familyDialogTitle = "娣诲姞鍏朵粬瀹跺睘";
- this.otherFamilyDialogVisible = true;
+ // 濡傛灉杩樻病鏈変换浣曞灞烇紝鍒欐坊鍔犱富瑕佷翰灞�
+ if (this.familyMemberList.length === 0) {
+ this.currentFamilyMember = {
+ name: "",
+ relation: "",
+ phone: "",
+ idcard: "",
+ isMain: true
+ };
+ this.familyDialogTitle = "娣诲姞涓昏浜插睘";
+ } else {
+ this.currentFamilyMember = {
+ name: "",
+ relation: "",
+ phone: "",
+ idcard: "",
+ isMain: false
+ };
+ }
+
+ this.familyDialogVisible = true;
},
- editOtherFamily(index) {
- this.openOtherFamilyDialog(index);
+
+ editFamilyMember(index) {
+ this.isEditFamilyMember = true;
+ this.editFamilyMemberIndex = index;
+ const member = this.familyMemberList[index];
+ this.currentFamilyMember = {
+ name: member.name,
+ relation: member.relation,
+ phone: member.phone || "",
+ idcard: member.idcard || "",
+ isMain: index === 0
+ };
+ this.familyDialogTitle = index === 0 ? "缂栬緫涓昏浜插睘" : "缂栬緫鍏朵粬瀹跺睘";
+ this.familyDialogVisible = true;
},
- deleteOtherFamily(index) {
- this.$confirm("纭鍒犻櫎璇ュ灞烇紵", "鎻愮ず", { type: "warning" }).then(
- () => {
- this.otherFamilyList.splice(index, 1);
- this.updateOtherFamilyField();
- }
- );
+
+ deleteFamilyMember(index) {
+ if (index === 0) {
+ this.$message.warning("涓昏浜插睘涓嶅彲鍒犻櫎");
+ return;
+ }
+ this.$confirm("纭鍒犻櫎璇ュ灞烇紵", "鎻愮ず", { type: "warning" })
+ .then(() => {
+ this.familyMemberList.splice(index, 1);
+ this.updateFamilyMemberField();
+ })
+ .catch(() => {});
},
- saveOtherFamily() {
- if (
- !this.currentOtherFamily.name ||
- !this.currentOtherFamily.relation ||
- !this.currentOtherFamily.phone
- ) {
- this.$message.warning("璇峰~鍐欏畬鏁翠俊鎭�");
+
+ saveFamilyMember() {
+ if (!this.currentFamilyMember.name) {
+ this.$message.warning("璇疯緭鍏ュ鍚�");
+ return;
+ }
+ if (!this.currentFamilyMember.relation) {
+ this.$message.warning("璇烽�夋嫨涓庢崘璧犺�呭叧绯�");
return;
}
- if (this.isEditOtherFamily) {
- this.otherFamilyList.splice(this.editOtherFamilyIndex, 1, {
- ...this.currentOtherFamily
- });
- } else {
- this.otherFamilyList.push({ ...this.currentOtherFamily });
+ // 濡傛灉鏄富瑕佷翰灞烇紝楠岃瘉韬唤璇佸拰鐢佃瘽
+ if (this.currentFamilyMember.isMain) {
+ if (!this.currentFamilyMember.idcard) {
+ this.$message.warning("璇疯緭鍏ヤ富瑕佷翰灞炵殑韬唤璇佸彿");
+ return;
+ }
+ if (
+ !/^(\d{15}|\d{18}|\d{17}(\d|X|x))$/.test(
+ this.currentFamilyMember.idcard
+ )
+ ) {
+ this.$message.warning("璇疯緭鍏ユ纭殑韬唤璇佸彿");
+ return;
+ }
+ if (!this.currentFamilyMember.phone) {
+ this.$message.warning("璇疯緭鍏ヤ富瑕佷翰灞炵殑鑱旂郴鐢佃瘽");
+ return;
+ }
+ if (!/^1[3-9]\d{9}$/.test(this.currentFamilyMember.phone)) {
+ this.$message.warning("璇疯緭鍏ユ纭殑鎵嬫満鍙�");
+ return;
+ }
}
- this.updateOtherFamilyField();
- this.otherFamilyDialogVisible = false;
+ const memberData = {
+ name: this.currentFamilyMember.name,
+ relation: this.currentFamilyMember.relation,
+ phone: this.currentFamilyMember.isMain
+ ? this.currentFamilyMember.phone
+ : "",
+ idcard: this.currentFamilyMember.isMain
+ ? this.currentFamilyMember.idcard
+ : ""
+ };
+
+ if (this.isEditFamilyMember) {
+ this.familyMemberList.splice(this.editFamilyMemberIndex, 1, memberData);
+ } else {
+ this.familyMemberList.push(memberData);
+ }
+
+ this.updateFamilyMemberField();
+ this.familyDialogVisible = false;
+ this.$message.success(this.isEditFamilyMember ? "缂栬緫鎴愬姛" : "娣诲姞鎴愬姛");
},
- updateOtherFamilyField() {
- this.form.otherFamilyMembers = JSON.stringify(this.otherFamilyList);
+
+ updateFamilyMemberField() {
+ if (this.familyMemberList.length > 0) {
+ const mainMember = this.familyMemberList[0];
+ this.form.relativeconfirmationsignname = mainMember.name;
+ this.form.signfamilyrelations = mainMember.relation;
+ this.form.relativeidcardno = mainMember.idcard || "";
+ this.form.relativephone = mainMember.phone || "";
+
+ const otherMembers = this.familyMemberList.slice(1).map(member => ({
+ name: member.name,
+ relation: member.relation,
+ phone: member.phone || "",
+ idcard: member.idcard || ""
+ }));
+ this.form.otherFamilyMembers = JSON.stringify(otherMembers);
+ } else {
+ this.form.relativeconfirmationsignname = "";
+ this.form.signfamilyrelations = "";
+ this.form.relativeidcardno = "";
+ this.form.relativephone = "";
+ this.form.otherFamilyMembers = "[]";
+ }
},
- // 鏇存柊assessannex瀛樺偍瀛楁
+
updateAssessannexField() {
- // 灏嗘墍鏈夌被鍨嬬殑闄勪欢鍚堝苟涓轰竴涓暟缁�
const allAttachments = [];
Object.values(this.attachmentData).forEach(attachments => {
allAttachments.push(...attachments);
});
-
- // 鏇存柊鍒拌〃鍗曞瓧娈�
this.form.assessannex = JSON.stringify(allAttachments);
},
- // 鏂囦欢棰勮
handlePreview(file) {
this.currentPreviewFile = {
fileName: file.fileName,
@@ -808,11 +889,9 @@
this.previewVisible = true;
},
- // 鏂囦欢涓嬭浇
handleDownload(file) {
const fileUrl = file.fileUrl;
const fileName = file.fileName;
-
if (fileUrl) {
const link = document.createElement("a");
link.href = fileUrl;
@@ -827,21 +906,18 @@
}
},
- // 鑾峰彇鏂囦欢绫诲瀷
getFileType(fileName) {
if (!fileName) return "other";
const extension = this.getFileExtension(fileName);
const imageTypes = ["jpg", "jpeg", "png"];
const pdfTypes = ["pdf"];
const officeTypes = ["doc", "docx"];
-
if (imageTypes.includes(extension)) return "image";
if (pdfTypes.includes(extension)) return "pdf";
if (officeTypes.includes(extension)) return "office";
return "other";
},
- // 鑾峰彇鏂囦欢鎵╁睍鍚�
getFileExtension(filename) {
return filename
.split(".")
@@ -849,7 +925,6 @@
.toLowerCase();
},
- // 鏂囦欢澶у皬鏍煎紡鍖�
formatFileSize(size) {
if (!size) return "0 B";
const k = 1024;
@@ -858,26 +933,22 @@
return parseFloat((size / Math.pow(k, i)).toFixed(2)) + " " + sizes[i];
},
- // 鏃ユ湡鏃堕棿鏍煎紡鍖�
formatDateTime(dateTime) {
if (!dateTime) return "";
try {
const date = new Date(dateTime);
if (isNaN(date.getTime())) return dateTime;
-
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, "0");
const day = String(date.getDate()).padStart(2, "0");
const hours = String(date.getHours()).padStart(2, "0");
const minutes = String(date.getMinutes()).padStart(2, "0");
-
return `${year}-${month}-${day} ${hours}:${minutes}`;
} catch (error) {
return dateTime;
}
},
- // 鑾峰彇褰撳墠鏃堕棿
getCurrentTime() {
const now = new Date();
return `${now.getFullYear()}-${(now.getMonth() + 1)
@@ -896,6 +967,7 @@
.toString()
.padStart(2, "0")}`;
},
+
accomplish() {
this.$confirm("鏄惁瀹屾垚璇ユ渚嬫崘鐚‘璁ゆ楠わ紵", "鎻愰啋", {
confirmButtonText: "纭畾",
@@ -906,28 +978,27 @@
this.form.state = 3;
this.handleSave();
})
-
.catch(() => {});
},
- // 淇濆瓨纭淇℃伅
async handleSave() {
try {
await this.$refs.form.validate();
this.saveLoading = true;
- this.updateOtherFamilyField();
+ this.updateFamilyMemberField();
this.updateAssessannexField();
+
const saveData = {
...this.form,
infoid: this.infoid,
organdecision: this.organdecision.join(","),
organdecisionOther: this.organdecisionOther
- // assessannex瀛楁宸插湪updateAssessannexField涓洿鏂�
};
if (saveData.state == 1 || !saveData.state) {
saveData.state = 2;
}
+
let response = null;
if (saveData.id) {
response = await relativesEdit(saveData);
@@ -961,6 +1032,11 @@
.detail-card {
margin-bottom: 20px;
+}
+
+.main-family {
+ font-weight: bold;
+ color: #e6a23c;
}
.attachment-card {
@@ -998,7 +1074,7 @@
.empty-attachment {
text-align: center;
- padding: 40px 0;
+ padding: 30px 0;
color: #909399;
}
diff --git a/src/views/business/affirm/index.vue b/src/views/business/affirm/index.vue
index 6a1e061..a3035af 100644
--- a/src/views/business/affirm/index.vue
+++ b/src/views/business/affirm/index.vue
@@ -112,9 +112,9 @@
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column
- label="妗堜緥缂栧彿"
+ label="鎹愮尞缂栧彿"
align="center"
- prop="inpatientno"
+ prop="caseNo"
width="120"
/>
<el-table-column
diff --git a/src/views/business/allocation/allocationInfo.vue b/src/views/business/allocation/allocationInfo.vue
index c78d505..1ab3aab 100644
--- a/src/views/business/allocation/allocationInfo.vue
+++ b/src/views/business/allocation/allocationInfo.vue
@@ -5,47 +5,22 @@
<el-card class="detail-card">
<div slot="header" class="clearfix">
<span class="detail-title">鍣ㄥ畼鍒嗛厤鍩烘湰淇℃伅</span>
- <div style="float: right;">
- <el-button type="primary" @click="handleSave" :loading="saveLoading">
- 淇濆瓨
- </el-button>
- <el-button
- type="success"
- @click="handleConfirmAllocation"
- :disabled="form.allocationStatus == '1'"
- :loading="confirmLoading"
- >
- 纭鍒嗛厤
- </el-button>
- </div>
</div>
<el-form :model="form" ref="form" :rules="rules" label-width="120px">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="鍒嗛厤鐘舵��" prop="allocationStatus">
- <el-select
- v-model="form.allocationStatus"
- placeholder="璇烽�夋嫨鍒嗛厤鐘舵��"
- >
- <el-option
- v-for="dict in dict.type.organ_allocation_status || []"
- :key="dict.value"
- :label="dict.label"
- :value="dict.value"
- ></el-option>
+ <el-select v-model="form.allocationStatus" placeholder="璇烽�夋嫨鍒嗛厤鐘舵��">
+ <el-option v-for="dict in dict.type.organ_allocation_status || []" :key="dict.value" :label="dict.label"
+ :value="dict.value"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="鍒嗛厤鏃堕棿" prop="allocationTime">
- <el-date-picker
- v-model="form.allocationTime"
- type="datetime"
- value-format="yyyy-MM-dd HH:mm:ss"
- style="width: 100%"
- :disabled="form.allocationStatus == '1'"
- />
+ <el-date-picker v-model="form.allocationTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
+ style="width: 100%" :disabled="form.allocationStatus == '1'" />
</el-form-item>
</el-col>
</el-row>
@@ -56,16 +31,7 @@
<el-input v-model="form.registrationName" />
</el-form-item>
</el-col>
- <el-col :span="12">
- <el-form-item label="鐧昏鏃堕棿" prop="registrationTime">
- <el-date-picker
- v-model="form.registrationTime"
- type="datetime"
- value-format="yyyy-MM-dd HH:mm:ss"
- style="width: 100%"
- />
- </el-form-item>
- </el-col>
+
</el-row>
</el-form>
</el-card>
@@ -75,55 +41,22 @@
<div slot="header" class="clearfix">
<span class="detail-title">鍣ㄥ畼鍒嗛厤璁板綍</span>
<div style="float: right;">
- <el-tag
- :type="
- form.allocationStatus == '1'
- ? 'success'
- : form.allocationStatus == '2'
- ? 'danger'
- : 'warning'
- "
- >
- {{
- form.allocationStatus == "1"
- ? "宸插垎閰�"
- : form.allocationStatus == "2"
- ? "浣滃簾"
- : "鏈垎閰�"
- }}
- </el-tag>
+ <dict-tag :options="dict.type.organ_allocation_status" :value="form.allocationStatus" />
</div>
</div>
- <el-form
- ref="allocationForm"
- :rules="allocationRules"
- :model="allocationData"
- label-position="right"
- >
+ <el-form ref="allocationForm" :rules="allocationRules" :model="allocationData" label-position="right">
<el-row>
<el-col>
<el-form-item label-width="100px" label="鍒嗛厤鍣ㄥ畼">
- <el-checkbox-group
- v-model="selectedOrgans"
- @change="handleOrganSelectionChange"
- >
- <el-checkbox
- v-for="dict in dict.type.sys_Organ || []"
- :key="dict.value"
- :label="dict.value"
- :disabled="form.allocationStatus == '1'"
- >
+ <el-checkbox-group v-model="selectedOrgans" @change="handleOrganSelectionChange">
+ <el-checkbox v-for="dict in dict.type.sys_Organ || []" :key="dict.value" :label="dict.value"
+ :disabled="form.allocationStatus == '1'">
{{ dict.label }}
</el-checkbox>
</el-checkbox-group>
- <el-input
- v-if="showOtherInput"
- v-model="otherOrganInput"
- placeholder="璇疯緭鍏ュ叾浠栧櫒瀹樺悕绉�"
- style="margin-top: 10px; width: 300px;"
- :disabled="form.allocationStatus == '1'"
- />
+ <el-input v-if="showOtherInput" v-model="otherOrganInput" placeholder="璇疯緭鍏ュ叾浠栧櫒瀹樺悕绉�"
+ style="margin-top: 10px; width: 300px;" :disabled="form.allocationStatus == '1'" />
</el-form-item>
</el-col>
</el-row>
@@ -131,56 +64,26 @@
<el-row>
<el-col>
<el-form-item>
- <el-table
- :data="allocationData.serviceDonateorganList"
- v-loading="loading"
- border
- style="width: 100%"
- :row-class-name="getOrganRowClassName"
- >
- <el-table-column
- label="搴忓彿"
- type="index"
- width="60"
- align="center"
- fixed
- ></el-table-column>
+ <el-table :data="displayOrgans" v-loading="loading" border style="width: 100%"
+ :row-class-name="getOrganRowClassName">
+ <el-table-column label="搴忓彿" type="index" width="60" align="center" fixed></el-table-column>
- <el-table-column
- label="鍒嗛厤鐘舵��"
- align="center"
- width="100"
- prop="allocationstatus"
- fixed
- >
+ <el-table-column label="鍒嗛厤鐘舵��" align="center" width="100" prop="allocationstatus" fixed>
<template slot-scope="scope">
- <el-tag
- :type="
- getAllocationStatusTagType(scope.row.allocationstatus)
- "
- size="small"
- >
+ <el-tag :type="getAllocationStatusTagType(scope.row.allocationstatus)
+ " size="small">
{{ getAllocationStatusText(scope.row.allocationstatus) }}
</el-tag>
</template>
</el-table-column>
- <el-table-column
- label="鍣ㄥ畼鍚嶇О"
- align="center"
- width="120"
- prop="organname"
- >
+ <el-table-column label="鍣ㄥ畼鍚嶇О" align="center" width="120" prop="organname">
<template slot-scope="scope">
- <el-input
- v-model="scope.row.organname"
- placeholder="鍣ㄥ畼鍚嶇О"
- :disabled="true"
- />
+ <el-input v-model="scope.row.organname" placeholder="鍣ㄥ畼鍚嶇О" :disabled="true" />
</template>
</el-table-column>
- <el-table-column
+ <!-- <el-table-column
label="鍒嗛厤绯荤粺缂栧彿"
align="center"
width="150"
@@ -196,143 +99,78 @@
"
/>
</template>
+ </el-table-column> -->
+
+ <el-table-column label="鍒嗛厤寮�濮嬫椂闂�" align="center" width="180" prop="applicanttime">
+ <template slot-scope="scope">
+ <el-date-picker clearable size="small" style="width: 100%" v-model="scope.row.applicanttime"
+ type="datetime" value-format="yyyy-MM-dd HH:mm:ss" placeholder="閫夋嫨寮�濮嬫帴鏀舵椂闂�" :disabled="form.allocationStatus == '1' ||
+ scope.row.allocationstatus == '3'
+ " />
+ </template>
+ </el-table-column>
+ <el-table-column label="鍒嗛厤鎺ユ敹鏃堕棿" align="center" width="180" prop="organgettime">
+ <template slot-scope="scope">
+ <el-date-picker clearable size="small" style="width: 100%" v-model="scope.row.organgettime"
+ type="datetime" value-format="yyyy-MM-dd HH:mm:ss" placeholder="閫夋嫨鍒嗛厤鎺ユ敹鏃堕棿" :disabled="form.allocationStatus == '1' ||
+ scope.row.allocationstatus == '3'
+ " />
+ </template>
</el-table-column>
- <el-table-column
- label="鍒嗛厤寮�濮嬫椂闂�"
- align="center"
- width="180"
- prop="applicanttime"
- >
+ <el-table-column label="鍙椾綋濮撴皬" align="center" width="120" prop="name">
<template slot-scope="scope">
- <el-date-picker
- clearable
- size="small"
+ <el-input v-model="scope.row.name" placeholder="鍙椾綋濮撴皬" :disabled="form.allocationStatus == '1' ||
+ scope.row.allocationstatus == '3'
+ " />
+ </template>
+ </el-table-column>
+
+ <el-table-column label="绉绘鍖婚櫌" align="center" width="200" prop="transplanthospitalname">
+ <template slot-scope="scope">
+ <el-autocomplete v-model="scope.row.transplanthospitalname" :fetch-suggestions="queryHospitalSearch"
+ placeholder="璇烽�夋嫨鎴栬緭鍏ョЩ妞嶅尰闄�" style="width: 100%" clearable></el-autocomplete>
+ </template>
+ <!-- <template slot-scope="scope">
+ <el-select
+ v-model="scope.row.transplanthospitalname"
+ placeholder="璇烽�夋嫨绉绘鍖婚櫌"
style="width: 100%"
- v-model="scope.row.applicanttime"
- type="datetime"
- value-format="yyyy-MM-dd HH:mm:ss"
- placeholder="閫夋嫨寮�濮嬫帴鏀舵椂闂�"
- :disabled="
- form.allocationStatus == '1' ||
- scope.row.allocationstatus == '3'
- "
- />
- </template>
- </el-table-column>
- <el-table-column
- label="鍒嗛厤鎺ユ敹鏃堕棿"
- align="center"
- width="180"
- prop="organgettime"
- >
- <template slot-scope="scope">
- <el-date-picker
- clearable
- size="small"
- style="width: 100%"
- v-model="scope.row.organgettime"
- type="datetime"
- value-format="yyyy-MM-dd HH:mm:ss"
- placeholder="閫夋嫨鍒嗛厤鎺ユ敹鏃堕棿"
- :disabled="
- form.allocationStatus == '1' ||
- scope.row.allocationstatus == '3'
- "
- />
- </template>
- </el-table-column>
-
- <el-table-column
- label="鍙椾綋濮撴皬"
- align="center"
- width="120"
- prop="name"
- >
- <template slot-scope="scope">
- <el-input
- v-model="scope.row.name"
- placeholder="鍙椾綋濮撴皬"
- :disabled="
- form.allocationStatus == '1' ||
- scope.row.allocationstatus == '3'
- "
- />
- </template>
- </el-table-column>
-
- <el-table-column
- label="绉绘鍖婚櫌"
- align="center"
- width="200"
- prop="transplanthospitalno"
- >
- <template slot-scope="scope">
- <div>
- <org-selecter
- ref="tranHosSelect"
- :org-type="'4'"
- :dataList="dataList"
- v-model="scope.row.transplanthospitalno"
- style="width: 100%"
- :disabled="
- form.allocationStatus == '1' ||
- scope.row.allocationstatus == '3'
- "
- />
- </div>
- </template>
+ >
+ <el-option
+ v-for="dict in dict.type.Geta_hospital"
+ :key="dict.value"
+ :label="dict.label"
+ :value="dict.value"
+ ></el-option>
+ </el-select>
+ </template> -->
</el-table-column>
<!-- 淇敼template涓殑璇存槑鍒� -->
- <el-table-column
- label="璇存槑"
- align="center"
- prop="reallocationreason"
- min-width="200"
- >
+ <el-table-column label="璇存槑" align="center" prop="reallocationreason" min-width="200">
<template slot-scope="scope">
<div v-if="scope.row.allocationstatus != '3'">
- <el-input
- type="textarea"
- clearable
- v-model="scope.row.reallocationreason"
- placeholder="璇疯緭鍏ヨ鏄�"
- :disabled="
- form.allocationStatus == '1' ||
- scope.row.allocationstatus == '3'
- "
- />
+ <el-input type="textarea" clearable v-model="scope.row.reallocationreason" placeholder="璇疯緭鍏ヨ鏄�"
+ :disabled="form.allocationStatus == '1' ||
+ scope.row.allocationstatus == '3'
+ " />
</div>
<div v-else>
<!-- 閲嶅垎閰嶈褰曪細鏄剧ず璇︾粏鏌ョ湅鎸夐挳 -->
- <el-button
- v-if="scope.row.reallocationreason"
- type="text"
- size="small"
- @click="handleViewRedistributionDetail(scope.row)"
- style="color: #e6a23c;"
- >
+ <el-button v-if="scope.row.reallocationreason" type="text" size="small"
+ @click="handleViewRedistributionDetail(scope.row)" style="color: #e6a23c;">
<i class="el-icon-document"></i>
鏌ョ湅閲嶅垎閰嶈鎯�
</el-button>
<span v-else class="no-data">-</span>
<!-- 淇濈暀鍘熸湁鐨勫伐鍏锋彁绀猴紙鍙Щ闄ゆ垨淇濈暀锛� -->
- <el-tooltip
- v-if="scope.row.redistributionInfo"
- :content="
- formatRedistributionTooltip(
- scope.row.redistributionInfo
- )
- "
- placement="top"
- >
- <el-button
- type="text"
- size="small"
- style="margin-left: 5px;"
- >
+ <el-tooltip v-if="scope.row.redistributionInfo" :content="formatRedistributionTooltip(
+ scope.row.redistributionInfo
+ )
+ " placement="top">
+ <el-button type="text" size="small" style="margin-left: 5px;">
<i class="el-icon-info"></i>
</el-button>
</el-tooltip>
@@ -340,29 +178,24 @@
</template>
</el-table-column>
- <el-table-column
- label="鎿嶄綔"
- align="center"
- width="120"
- class-name="small-padding fixed-width"
- v-if="form.allocationStatus !== '1'"
- fixed="right"
- >
+ <el-table-column label="鎿嶄綔" align="center" width="120" class-name="small-padding fixed-width"
+ v-if="form.allocationStatus !== '1'" fixed="right">
<template slot-scope="scope">
- <el-button
- size="mini"
- type="text"
- icon="el-icon-copy-document"
- @click="handleRedistribution(scope.row)"
- :disabled="
- scope.row.allocationstatus == '3' || !scope.row.caseno
- "
- style="color: #e6a23c;"
- >
+ <el-button size="mini" type="text" icon="el-icon-copy-document"
+ @click="handleRedistribution(scope.row)" :disabled="scope.row.allocationstatus == '3'"
+ style="color: #e6a23c;">
{{
scope.row.allocationstatus == "3"
? "宸查噸鍒嗛厤"
: "閲嶅垎閰�"
+ }}
+ </el-button>
+ <el-button v-if="scope.row.allocationstatus != '3'" size="mini" type="text" icon="el-icon-delete"
+ @click="handleInvalidate(scope.row)" :disabled="scope.row.allocationstatus == '3' ||
+ scope.row.allocationstatus == '2'
+ " style="color: #f56c6c;">
+ {{
+ scope.row.allocationstatus == "2" ? "宸蹭綔搴�" : "浣滃簾"
}}
</el-button>
</template>
@@ -373,7 +206,7 @@
</el-row>
<!-- 鍒嗛厤缁熻淇℃伅 -->
- <div
+ <!-- <div
class="allocation-stats"
v-if="
allocationData.serviceDonateorganList &&
@@ -408,9 +241,12 @@
</div>
</el-col>
</el-row>
- </div>
+ </div> -->
- <div v-else class="empty-allocation">
+ <div v-if="
+ !allocationData.serviceDonateorganList ||
+ allocationData.serviceDonateorganList.length == 0
+ " class="empty-allocation">
<el-empty description="鏆傛棤鍒嗛厤璁板綍" :image-size="80">
<span>璇峰厛閫夋嫨瑕佸垎閰嶇殑鍣ㄥ畼</span>
</el-empty>
@@ -423,34 +259,21 @@
<div class="attachment-header">
<i class="el-icon-paperclip"></i>
<span class="attachment-title">鐩稿叧闄勪欢</span>
- <span class="attachment-tip"
- >鏀寔涓婁紶鍣ㄥ畼鍒嗛厤鐩稿叧鏂囦欢 (鏈�澶歿{ attachmentLimit }}涓�)</span
- >
+ <span class="attachment-tip">鏀寔涓婁紶鍣ㄥ畼鍒嗛厤鐩稿叧鏂囦欢 (鏈�澶歿{ attachmentLimit }}涓�)</span>
</div>
<!-- 浣跨敤 UploadAttachment 缁勪欢 -->
- <UploadAttachment
- ref="uploadAttachment"
- :file-list="attachmentFileList"
- :limit="attachmentLimit"
- :accept="attachmentAccept"
- :multiple="true"
- @change="handleAttachmentChange"
- @upload-success="handleUploadSuccess"
- @upload-error="handleUploadError"
- @remove="handleAttachmentRemove"
- />
+ <UploadAttachment ref="uploadAttachment" :file-list="attachmentFileList" :limit="attachmentLimit"
+ :accept="attachmentAccept" :multiple="true" @change="handleAttachmentChange"
+ @upload-success="handleUploadSuccess" @upload-error="handleUploadError" @remove="handleAttachmentRemove" />
<!-- 闄勪欢鍒楄〃灞曠ず -->
<div class="attachment-list" v-if="attachments && attachments.length > 0">
<div class="list-title">宸蹭笂浼犻檮浠� ({{ attachments.length }})</div>
<el-table :data="attachments" style="width: 100%" size="small">
- <el-table-column label="鏂囦欢鍚�" min-width="200">
+ <el-table-column label="鏂囦欢鍚�" min-width="150">
<template slot-scope="scope">
- <i
- class="el-icon-document"
- :style="{ color: getFileIconColor(scope.row.fileName) }"
- ></i>
+ <i class="el-icon-document" :style="{ color: getFileIconColor(scope.row.fileName) }"></i>
<span class="file-name">{{ scope.row.fileName }}</span>
</template>
</el-table-column>
@@ -471,28 +294,16 @@
<span>{{ formatFileSize(scope.row.fileSize) }}</span>
</template>
</el-table-column>
- <el-table-column label="鎿嶄綔" width="200" fixed="right">
+ <el-table-column label="鎿嶄綔" width="280" fixed="right">
<template slot-scope="scope">
- <el-button
- size="mini"
- type="primary"
- @click="handlePreview(scope.row)"
- :disabled="!isPreviewable(scope.row.fileName)"
- >
+ <el-button size="mini" type="primary" @click="handlePreview(scope.row)"
+ :disabled="!isPreviewable(scope.row.fileName)">
棰勮
</el-button>
- <el-button
- size="mini"
- type="success"
- @click="handleDownloadAttachment(scope.row)"
- >
+ <el-button size="mini" type="success" @click="handleDownloadAttachment(scope.row)">
涓嬭浇
</el-button>
- <el-button
- size="mini"
- type="danger"
- @click="handleRemoveAttachment(scope.$index)"
- >
+ <el-button size="mini" type="danger" @click="handleRemoveAttachment(scope.$index)">
鍒犻櫎
</el-button>
</template>
@@ -500,52 +311,34 @@
</el-table>
</div>
</el-card>
-
+ <div style="text-align: center; margin: 30px 0;">
+ <el-button type="primary" @click="handleSave" :loading="saveLoading">
+ 淇濆瓨
+ </el-button>
+ <el-button type="success" @click="handleConfirmAllocation" :disabled="form.allocationStatus == '1'"
+ :loading="confirmLoading">
+ 纭鍒嗛厤
+ </el-button>
+ </div>
<!-- 閲嶅垎閰嶅璇濇 -->
- <el-dialog
- title="鍣ㄥ畼閲嶅垎閰�"
- :visible.sync="redistributionDialogVisible"
- width="500px"
- @close="handleRedistributionDialogClose"
- >
- <el-form
- :model="redistributionForm"
- :rules="redistributionRules"
- ref="redistributionFormRef"
- label-width="100px"
- >
+ <el-dialog title="鍣ㄥ畼閲嶅垎閰�" :visible.sync="redistributionDialogVisible" width="500px"
+ @close="handleRedistributionDialogClose">
+ <el-form :model="redistributionForm" :rules="redistributionRules" ref="redistributionFormRef" label-width="100px">
<el-form-item label="鍘熷櫒瀹樹俊鎭�">
<el-input v-model="redistributionForm.organname" readonly />
</el-form-item>
<el-form-item label="閲嶅垎閰嶅師鍥�" prop="reason" required>
- <el-input
- type="textarea"
- :rows="4"
- v-model="redistributionForm.reason"
- placeholder="璇疯緭鍏ラ噸鍒嗛厤鍘熷洜"
- />
+ <el-input type="textarea" :rows="4" v-model="redistributionForm.reason" placeholder="璇疯緭鍏ラ噸鍒嗛厤鍘熷洜" />
</el-form-item>
<el-form-item label="閲嶅垎閰嶆椂闂�" prop="redistributionTime" required>
- <el-date-picker
- v-model="redistributionForm.redistributionTime"
- type="datetime"
- placeholder="璇烽�夋嫨閲嶅垎閰嶆椂闂�"
- value-format="yyyy-MM-dd HH:mm:ss"
- style="width: 100%"
- />
+ <el-date-picker v-model="redistributionForm.redistributionTime" type="datetime" placeholder="璇烽�夋嫨閲嶅垎閰嶆椂闂�"
+ value-format="yyyy-MM-dd HH:mm:ss" style="width: 100%" />
</el-form-item>
<el-form-item label="閲嶅垎閰嶉檮浠�">
- <UploadAttachment
- ref="redistributionAttachmentUpload"
- :file-list="redistributionAttachmentList"
- :limit="5"
- :accept="attachmentAccept"
- :multiple="true"
- @change="handleRedistributionChange"
- @upload-success="handleRedistributionUploadSuccess"
- @upload-error="handleRedistributionUploadError"
- @remove="handleRedistributionAttachmentRemove"
- />
+ <UploadAttachment ref="redistributionAttachmentUpload" :file-list="redistributionAttachmentList" :limit="5"
+ :accept="attachmentAccept" :multiple="true" @change="handleRedistributionChange"
+ @upload-success="handleRedistributionUploadSuccess" @upload-error="handleRedistributionUploadError"
+ @remove="handleRedistributionAttachmentRemove" />
<div style="margin-top: 5px; font-size: 12px; color: #999;">
鏀寔涓婁紶閲嶅垎閰嶇浉鍏虫枃浠� (鏈�澶�5涓�)
</div>
@@ -553,21 +346,13 @@
</el-form>
<div slot="footer">
<el-button @click="redistributionDialogVisible = false">鍙栨秷</el-button>
- <el-button
- type="primary"
- @click="handleRedistributionConfirm"
- :loading="redistributionLoading"
- >
+ <el-button type="primary" @click="handleRedistributionConfirm" :loading="redistributionLoading">
纭閲嶅垎閰�
</el-button>
</div>
</el-dialog>
<!-- 鍦╰emplate涓坊鍔犻噸鍒嗛厤璇︽儏寮圭獥 -->
- <el-dialog
- title="閲嶅垎閰嶈鎯�"
- :visible.sync="redistributionDetailDialogVisible"
- width="600px"
- >
+ <el-dialog title="閲嶅垎閰嶈鎯�" :visible.sync="redistributionDetailDialogVisible" width="600px">
<div v-loading="redistributionDetailLoading">
<div v-if="currentRedistributionDetail" style="padding: 20px;">
<!-- 鍩烘湰淇℃伅 -->
@@ -589,8 +374,8 @@
{{
currentRedistributionDetail.redistributionTime
? formatDateTime(
- currentRedistributionDetail.redistributionTime
- )
+ currentRedistributionDetail.redistributionTime
+ )
: "-"
}}
</el-descriptions-item>
@@ -599,46 +384,30 @@
<!-- 閲嶅垎閰嶅師鍥� -->
<div style="margin-top: 20px;">
<div class="section-title">閲嶅垎閰嶅師鍥�</div>
- <div
- class="section-content"
- style="padding: 10px; background: #f5f7fa; border-radius: 4px;"
- >
+ <div class="section-content" style="padding: 10px; background: #f5f7fa; border-radius: 4px;">
{{ currentRedistributionDetail.reason || "鏃�" }}
</div>
</div>
<!-- 閲嶅垎閰嶉檮浠� -->
- <div
- style="margin-top: 20px;"
- v-if="
- currentRedistributionDetail.attachments &&
- currentRedistributionDetail.attachments.length > 0
- "
- >
+ <div style="margin-top: 20px;" v-if="
+ currentRedistributionDetail.attachments &&
+ currentRedistributionDetail.attachments.length > 0
+ ">
<div class="section-title">
閲嶅垎閰嶉檮浠� ({{ currentRedistributionDetail.attachments.length }})
</div>
<div class="redistribution-attachments">
- <el-table
- :data="currentRedistributionDetail.attachments"
- size="small"
- style="width: 100%"
- >
- <el-table-column label="鏂囦欢鍚�" min-width="200">
+ <el-table :data="currentRedistributionDetail.attachments" size="small" style="width: 100%">
+ <el-table-column label="鏂囦欢鍚�" min-width="150">
<template slot-scope="scope">
- <i
- class="el-icon-document"
- :style="{ color: getFileIconColor(scope.row.fileName) }"
- ></i>
+ <i class="el-icon-document" :style="{ color: getFileIconColor(scope.row.fileName) }"></i>
<span class="file-name">{{ scope.row.fileName }}</span>
</template>
</el-table-column>
<el-table-column label="鏂囦欢绫诲瀷" width="100">
<template slot-scope="scope">
- <el-tag
- :type="getFileTagType(scope.row.fileName)"
- size="small"
- >
+ <el-tag :type="getFileTagType(scope.row.fileName)" size="small">
{{ getFileTypeText(scope.row.fileName) }}
</el-tag>
</template>
@@ -654,19 +423,11 @@
</el-table-column>
<el-table-column label="鎿嶄綔" width="150" fixed="right">
<template slot-scope="scope">
- <el-button
- size="mini"
- type="primary"
- @click="handleRedistributionAttachmentPreview(scope.row)"
- :disabled="!isPreviewable(scope.row.fileName)"
- >
+ <el-button size="mini" type="primary" @click="handleRedistributionAttachmentPreview(scope.row)"
+ :disabled="!isPreviewable(scope.row.fileName)">
棰勮
</el-button>
- <el-button
- size="mini"
- type="success"
- @click="handleRedistributionAttachmentDownload(scope.row)"
- >
+ <el-button size="mini" type="success" @click="handleRedistributionAttachmentDownload(scope.row)">
涓嬭浇
</el-button>
</template>
@@ -675,27 +436,18 @@
</div>
</div>
- <div
- v-else
- style="margin-top: 20px; text-align: center; color: #909399;"
- >
+ <div v-else style="margin-top: 20px; text-align: center; color: #909399;">
鏃犻噸鍒嗛厤闄勪欢
</div>
</div>
</div>
<div slot="footer">
- <el-button @click="redistributionDetailDialogVisible = false"
- >鍏抽棴</el-button
- >
+ <el-button @click="redistributionDetailDialogVisible = false">鍏抽棴</el-button>
</div>
</el-dialog>
<!-- 闄勪欢棰勮瀵硅瘽妗� -->
- <FilePreviewDialog
- :visible="filePreviewVisible"
- :file="currentPreviewFile"
- @close="filePreviewVisible = false"
- @download="handleDownloadAttachment"
- />
+ <FilePreviewDialog :visible="filePreviewVisible" :file="currentPreviewFile" @close="filePreviewVisible = false"
+ @download="handleDownloadAttachment" />
</div>
</template>
@@ -725,6 +477,8 @@
"sys_DonationCategory",
"sys_RecordState",
"sys_Organ",
+ "Geta_hospital",
+
"organ_allocation_status"
],
data() {
@@ -825,16 +579,19 @@
currentUser() {
return JSON.parse(sessionStorage.getItem("user") || "{}");
},
+ displayOrgans() {
+ return (this.allocationData.serviceDonateorganList || [])
+ .filter(item => item.delFlag !== 1);
+ },
// 涓嶅畬鏁寸殑璁板綍鏁伴噺
incompleteRecords() {
if (!this.allocationData.serviceDonateorganList) return 0;
return this.allocationData.serviceDonateorganList.filter(
record =>
- !record.caseno ||
!record.applicanttime ||
!record.organgettime ||
!record.name ||
- !record.transplanthospitalno
+ !record.transplanthospitalname
).length;
},
// 寰呭鏍歌褰曟暟閲�
@@ -851,11 +608,10 @@
record => record.allocationstatus == "3"
).length;
},
- // 鍞竴鍖婚櫌鏁伴噺
uniqueHospitals() {
if (!this.allocationData.serviceDonateorganList) return 0;
const hospitals = this.allocationData.serviceDonateorganList
- .map(record => record.transplanthospitalno)
+ .map(record => record.transplanthospitalname)
.filter(Boolean);
return new Set(hospitals).size;
},
@@ -872,7 +628,7 @@
return {
"0": { label: "鎻愪氦鍒嗛厤", type: "info" },
"1": { label: "瀹℃牳閫氳繃", type: "success" },
- "2": { label: "瀹℃牳鎷掔粷", type: "danger" },
+ "2": { label: "宸蹭綔搴�", type: "danger" },
"3": { label: "閲嶅垎閰�", type: "warning" }
};
}
@@ -921,7 +677,17 @@
const statusMap = this.allocationStatusDict;
return statusMap[status] ? statusMap[status].label : "鏈煡鐘舵��";
},
+ queryHospitalSearch(queryString, cb) {
+ const hospitals = this.dict.type.Geta_hospital || [];
+ const results = queryString
+ ? hospitals.filter(item =>
+ item.label.toLowerCase().includes(queryString.toLowerCase())
+ )
+ : hospitals;
+ // el-autocomplete 闇�瑕� value 瀛楁
+ cb(results.map(item => ({ value: item.label })));
+ },
// 鏌ョ湅閲嶅垎閰嶈鎯�
handleViewRedistributionDetail(row) {
this.redistributionDetailLoading = true;
@@ -1067,7 +833,6 @@
if (response.code == 200 && response.data && response.data.length > 0) {
const data = response.data[0];
- data.allocationStatus = JSON.stringify(data.allocationStatus);
// 濉厖琛ㄥ崟鏁版嵁
Object.assign(this.form, data);
// 杞崲闄勪欢涓洪泦鍚�
@@ -1086,29 +851,29 @@
data.serviceDonateorganList
)
? data.serviceDonateorganList.map(item => {
- // 纭繚姣忔潯璁板綍閮芥湁鍒嗛厤鐘舵�佸瓧娈碉紝榛樿鍊间负0
- const allocationstatus = item.allocationstatus || "0";
- let redistributionInfo = null;
+ // 纭繚姣忔潯璁板綍閮芥湁鍒嗛厤鐘舵�佸瓧娈碉紝榛樿鍊间负0
+ const allocationstatus = item.allocationstatus || "0";
+ let redistributionInfo = null;
- // 瑙f瀽閲嶅垎閰嶄俊鎭�
- if (allocationstatus == "3" && item.reallocationreason) {
- try {
- redistributionInfo = JSON.parse(item.reallocationreason);
- console.log(redistributionInfo);
- } catch (error) {
- console.warn("瑙f瀽閲嶅垎閰嶄俊鎭け璐�:", error);
- redistributionInfo = item.reallocationreason;
- }
+ // 瑙f瀽閲嶅垎閰嶄俊鎭�
+ if (allocationstatus == "3" && item.reallocationreason) {
+ try {
+ redistributionInfo = JSON.parse(item.reallocationreason);
+ console.log(redistributionInfo);
+ } catch (error) {
+ console.warn("瑙f瀽閲嶅垎閰嶄俊鎭け璐�:", error);
+ redistributionInfo = item.reallocationreason;
}
+ }
- return {
- ...item,
- allocationstatus,
- redistributionInfo: redistributionInfo
- ? JSON.stringify(redistributionInfo)
- : null
- };
- })
+ return {
+ ...item,
+ allocationstatus,
+ redistributionInfo: redistributionInfo
+ ? JSON.stringify(redistributionInfo)
+ : null
+ };
+ })
: [];
// 鏇存柊閫変腑鐨勫櫒瀹�
@@ -1176,58 +941,78 @@
},
// 鍣ㄥ畼閫夋嫨鐘舵�佸彉鍖�
- handleOrganSelectionChange(selectedValues) {
- if (!this.allocationData.serviceDonateorganList) {
- this.allocationData.serviceDonateorganList = [];
+ async handleOrganSelectionChange(selectedValues) {
+ // 1. 澶勭悊浜掓枼閫昏緫锛堜慨鏀� this.selectedOrgans锛�
+ this.handleExclusiveSelections(selectedValues);
+
+ const finalSelected = this.selectedOrgans;
+ const records = this.allocationData.serviceDonateorganList || [];
+
+ // 2. 鏋勫缓鐩爣鍣ㄥ畼缂栧彿鍒楄〃锛堢洿鎺ヤ娇鐢ㄩ�変腑鐨勫�硷紝涓嶅睍寮�锛�
+ const targetOrganNos = finalSelected; // 杩欓噷涓嶅睍寮�锛屽氨鏄�変腑鐨勫櫒瀹樼紪鍙�
+
+ // 3. 鏂板鎴栨仮澶嶈褰�
+ targetOrganNos.forEach(no => {
+ const existing = records.find(r => r.organno === no);
+ if (existing) {
+ if (existing.delFlag === 1) {
+ existing.delFlag = 0; // 鎭㈠鏄剧ず
}
+ } else {
+ this.createOrganRecord(no);
+ }
+ });
- const currentOrganValues = this.allocationData.serviceDonateorganList.map(
- item => item.organno
+ // 4. 鎵惧嚭闇�瑕佸彇娑堢殑璁板綍锛堜笉鍦ㄧ洰鏍囬泦鍚堜腑锛�
+ const toRemove = records.filter(r => !targetOrganNos.includes(r.organno));
+ const toRemoveSaved = toRemove.filter(r => r.id); // 宸蹭繚瀛橈紝闇�纭
+ const toRemoveUnsaved = toRemove.filter(r => !r.id); // 鏈繚瀛橈紝鐩存帴绉婚櫎
+
+ // 4.1 鐩存帴绉婚櫎鏈繚瀛樼殑璁板綍
+ toRemoveUnsaved.forEach(r => {
+ const idx = records.indexOf(r);
+ if (idx !== -1) records.splice(idx, 1);
+ });
+
+ // 4.2 澶勭悊宸蹭繚瀛樼殑璁板綍锛氬脊绐楃‘璁�
+ if (toRemoveSaved.length > 0) {
+ const organNames = toRemoveSaved.map(r => r.organname).join('銆�');
+ try {
+ await this.$confirm(
+ `鎮ㄧ‘瀹氳鍙栨秷浠ヤ笅宸蹭繚瀛樼殑鍣ㄥ畼鍒嗛厤璁板綍鍚楋紵\n${organNames}\n鍙栨秷鍚庯紝杩欎簺璁板綍灏嗕粠鍒楄〃涓Щ闄わ紙鏁版嵁浠嶄繚鐣欙紝鍙仮澶嶏級銆俙,
+ '鎻愮ず',
+ {
+ confirmButtonText: '纭畾绉婚櫎',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }
);
-
- // 澶勭悊浜掓枼閫昏緫锛堝弬鑰冩崘鐚喅瀹氶〉闈級
- this.handleExclusiveSelections(selectedValues);
-
- // 鏂板閫夋嫨鐨勫櫒瀹�
- selectedValues.forEach(organValue => {
- if (!currentOrganValues.includes(organValue)) {
- this.createOrganRecord(organValue);
+ // 鐢ㄦ埛纭锛氭爣璁� delFlag=1锛屽苟浠庨�変腑鍒楄〃涓Щ闄�
+ toRemoveSaved.forEach(r => {
+ r.delFlag = 1;
+ // 浠� selectedOrgans 涓Щ闄ゅ搴旂殑鍣ㄥ畼缂栧彿
+ const idx = this.selectedOrgans.indexOf(r.organno);
+ if (idx !== -1) this.selectedOrgans.splice(idx, 1);
+ });
+ } catch (error) {
+ // 鐢ㄦ埛鍙栨秷锛氭仮澶嶉�変腑鐘舵�侊紙灏嗗彇娑堢殑鍣ㄥ畼閲嶆柊鍔犲叆 selectedOrgans锛�
+ const parentToRestore = new Set();
+ toRemoveSaved.forEach(r => {
+ // 鐩存帴鎭㈠鍣ㄥ畼缂栧彿锛堝洜涓轰笉灞曞紑锛屾墍浠ュ氨鏄� r.organno锛�
+ if (!this.selectedOrgans.includes(r.organno)) {
+ this.selectedOrgans.push(r.organno);
}
});
+ this.$message.info('宸插彇娑堝垹闄ゆ搷浣�');
+ return; // 閫�鍑烘柟娉曪紝閬垮厤缁х画鎵ц
+ }
+ }
- // 绉婚櫎鍙栨秷閫夋嫨鐨勫櫒瀹�
- this.allocationData.serviceDonateorganList = this.allocationData.serviceDonateorganList.filter(
- record => {
- if (selectedValues.includes(record.organno)) {
- return true;
- } else {
- if (record.id) {
- this.$confirm(
- "鍒犻櫎鍣ㄥ畼鍒嗛厤鏁版嵁鍚庡皢鏃犳硶鎭㈠锛屾偍纭鍒犻櫎璇ユ潯璁板綍鍚楋紵",
- "鎻愮ず",
- {
- confirmButtonText: "纭畾",
- cancelButtonText: "鍙栨秷",
- type: "warning"
- }
- )
- .then(() => {
- this.allocationData.serviceDonateorganList = this.allocationData.serviceDonateorganList.filter(
- r => r.organno !== record.organno
- );
- this.$message.success("鍒犻櫎鎴愬姛");
- })
- .catch(() => {
- this.selectedOrgans.push(record.organno);
- });
- return true; // 绛夊緟鐢ㄦ埛纭
- } else {
- return false; // 鐩存帴鍒犻櫎鏂拌褰�
- }
- }
- }
- );
- },
+ // 5. 娉ㄦ剰锛氬浜庡凡鏍囪鍒犻櫎鐨勮褰曪紝鎴戜滑涓嶄粠 selectedOrgans 涓Щ闄わ紙宸插湪纭鏃剁Щ闄わ級
+ // 浣嗚繕瑕佽�冭檻锛氭煇浜涜褰曞彲鑳藉洜涓轰簰鏂ラ�昏緫琚Щ闄わ紝宸插寘鍚湪 finalSelected 涓鐞嗭紝鏃犻澶栨搷浣�
+ // 鏇存柊琛ㄥ崟瀛楁锛堝鏋滈渶瑕佷繚瀛橀�変腑鐨勫櫒瀹樺垪琛紝鍙互鍦ㄨ繖閲岃缃� this.form.donateorgan锛屼絾鏈」鐩湭鐢級
+ // 濡傛灉闇�瑕侊紝鍙互娣诲姞 this.form.donateorgan = this.selectedOrgans.join(',');
+},
// 澶勭悊浜掓枼閫夋嫨锛堝弬鑰冩崘鐚喅瀹氶〉闈級
handleExclusiveSelections(selectedValues) {
@@ -1282,7 +1067,8 @@
reallocationreason: "",
allocationstatus: "0", // 榛樿鎻愪氦鍒嗛厤鐘舵��
redistributionInfo: null,
- organState: 1
+ organState: 1,
+ delFlag: 0 // 鏂板
});
},
@@ -1308,7 +1094,41 @@
this.redistributionAttachmentList = [];
this.redistributionDialogVisible = true;
},
+ // 浣滃簾鎿嶄綔
+ handleInvalidate(row) {
+ this.$confirm(`纭畾瑕佸皢 "${row.organname}" 鐨勫垎閰嶈褰曚綔搴熷悧锛焋, "鎻愮ず", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning"
+ })
+ .then(() => {
+ // 鎵惧埌褰撳墠璁板綍鐨勭储寮�
+ const index = this.allocationData.serviceDonateorganList.findIndex(
+ item => item === row
+ );
+ if (index !== -1) {
+ // 鏇存柊璁板綍鐘舵�佷负浣滃簾
+ this.allocationData.serviceDonateorganList[index].allocationstatus =
+ "2";
+
+ // 鏇存柊閫変腑鐨勫櫒瀹樺垪琛紙濡傛灉璇ュ櫒瀹樹笉鍐嶆湁鍏朵粬鏈夋晥璁板綍锛�
+ const organNo = row.organno;
+ const hasOtherValidRecord = this.allocationData.serviceDonateorganList.some(
+ item => item.organno === organNo && item.allocationstatus !== "2"
+ );
+
+ if (!hasOtherValidRecord) {
+ this.selectedOrgans = this.selectedOrgans.filter(
+ item => item !== organNo
+ );
+ }
+
+ this.$message.success("璁板綍宸蹭綔搴�");
+ }
+ })
+ .catch(() => { });
+ },
// 閲嶅垎閰嶅璇濇鍏抽棴
handleRedistributionDialogClose() {
this.redistributionForm = {
@@ -1459,12 +1279,13 @@
getOrganRowClassName({ row }) {
if (row.allocationstatus == "3") {
return "redistributed-row"; // 閲嶅垎閰嶈褰曟牱寮�
+ } else if (row.allocationstatus == "2") {
+ return "invalidated-row"; // 浣滃簾璁板綍鏍峰紡
} else if (
- !row.caseno ||
!row.applicanttime ||
!row.organgettime ||
!row.name ||
- !row.transplanthospitalno
+ !row.transplanthospitalname
) {
return "warning-row"; // 淇℃伅涓嶅畬鏁存牱寮�
} else if (row.allocationstatus == "0") {
@@ -1584,7 +1405,7 @@
this.confirmLoading = false;
}
})
- .catch(() => {});
+ .catch(() => { });
},
// 闄勪欢鐩稿叧鏂规硶
@@ -1863,6 +1684,7 @@
font-size: 20px;
font-weight: bold;
}
+
/* 鍦╯tyle閮ㄥ垎娣诲姞 */
.section-title {
font-weight: 600;
@@ -1903,6 +1725,7 @@
overflow-x: auto;
}
}
+
/* 绌虹姸鎬佹牱寮� */
.empty-allocation {
text-align: center;
@@ -1916,7 +1739,9 @@
font-style: italic;
}
-/* 琛ㄦ牸琛屾牱寮� */
+/* ===== 琛ㄦ牸琛屾牱寮� ===== */
+
+/* 閲嶅垎閰嶈鏍峰紡 */
:deep(.redistributed-row) {
background-color: #fdf6ec;
opacity: 0.8;
@@ -1927,6 +1752,7 @@
opacity: 0.9;
}
+/* 淇℃伅涓嶅畬鏁磋鍛婅鏍峰紡 */
:deep(.warning-row) {
background-color: #fff7e6;
}
@@ -1935,12 +1761,99 @@
background-color: #ffecc2;
}
+/* 寰呭鏍歌鏍峰紡 */
:deep(.pending-row) {
background-color: #f0f9ff;
}
:deep(.pending-row:hover) {
background-color: #e0f2ff;
+}
+
+/* ===== 鏂板锛氫綔搴熻鏍峰紡 ===== */
+:deep(.invalidated-row) {
+ background-color: #fef0f0;
+ position: relative;
+}
+
+:deep(.invalidated-row td) {
+ opacity: 0.6;
+ text-decoration: line-through;
+ color: #c0c4cc !important;
+}
+
+:deep(.invalidated-row:hover td) {
+ background-color: #fde2e2 !important;
+ opacity: 0.75;
+}
+
+/* 浣滃簾琛屽唴鐨勮緭鍏ユ鍜岄�夋嫨鍣ㄦ牱寮� */
+:deep(.invalidated-row .el-input__inner),
+:deep(.invalidated-row .el-textarea__inner),
+:deep(.invalidated-row .el-date-editor .el-input__inner) {
+ background-color: #fef0f0 !important;
+ border-color: #fbc4c4 !important;
+ color: #c0c4cc !important;
+ cursor: not-allowed !important;
+}
+
+/* 浣滃簾琛屽唴鐨勬爣绛炬牱寮� */
+:deep(.invalidated-row .el-tag) {
+ opacity: 0.5;
+}
+
+/* 浣滃簾琛屽唴鐨勬寜閽牱寮� */
+:deep(.invalidated-row .el-button--text) {
+ color: #c0c4cc !important;
+ cursor: not-allowed !important;
+}
+
+/* ===== 鎿嶄綔鎸夐挳鏍峰紡 ===== */
+
+/* 鎿嶄綔鎸夐挳瀹瑰櫒 */
+.operation-buttons {
+ display: flex;
+ gap: 4px;
+ justify-content: center;
+ align-items: center;
+}
+
+/* 鎿嶄綔鎸夐挳閫氱敤鏍峰紡 */
+:deep(.el-table .el-button--text) {
+ padding: 4px 6px;
+ font-size: 12px;
+}
+
+/* 閲嶅垎閰嶆寜閽牱寮� */
+:deep(.el-button--text.redistribute-btn) {
+ color: #e6a23c;
+}
+
+:deep(.el-button--text.redistribute-btn:hover:not(:disabled)) {
+ color: #cf9236;
+}
+
+/* 浣滃簾鎸夐挳鏍峰紡 */
+:deep(.el-button--text.invalidate-btn) {
+ color: #f56c6c;
+}
+
+:deep(.el-button--text.invalidate-btn:hover:not(:disabled)) {
+ color: #d9534f;
+}
+
+/* 绂佺敤鐘舵�佺殑鎸夐挳鏍峰紡 */
+:deep(.el-button--text.is-disabled) {
+ color: #c0c4cc !important;
+ cursor: not-allowed !important;
+ opacity: 0.5;
+}
+
+/* 閲嶅垎閰嶄俊鎭彁绀烘鏍峰紡 */
+:deep(.el-tooltip__popper) {
+ max-width: 300px;
+ white-space: pre-line;
+ line-height: 1.6;
}
/* 绂佺敤鐘舵�佺殑杈撳叆妗嗘牱寮� */
@@ -1958,19 +1871,6 @@
cursor: not-allowed;
}
-/* 閲嶅垎閰嶆寜閽牱寮� */
-:deep(.el-button--text.is-disabled) {
- color: #c0c4cc !important;
- cursor: not-allowed;
-}
-
-/* 閲嶅垎閰嶄俊鎭彁绀烘鏍峰紡 */
-:deep(.el-tooltip__popper) {
- max-width: 300px;
- white-space: pre-line;
- line-height: 1.6;
-}
-
/* 鍝嶅簲寮忚璁� */
@media (max-width: 768px) {
.organ-allocation-detail {
@@ -1980,5 +1880,11 @@
.allocation-stats .el-col {
margin-bottom: 10px;
}
+
+ /* 绉诲姩绔搷浣滄寜閽牱寮忚皟鏁� */
+ :deep(.el-table .el-button--text) {
+ padding: 2px 4px;
+ font-size: 11px;
+ }
}
</style>
diff --git a/src/views/business/allocation/index.vue b/src/views/business/allocation/index.vue
index 32a9119..bb1fd82 100644
--- a/src/views/business/allocation/index.vue
+++ b/src/views/business/allocation/index.vue
@@ -229,7 +229,7 @@
export default {
name: "OrganAllocationList",
components: { Pagination },
- dicts: ["sys_user_sex", "allocation_Status"],
+ dicts: ["sys_user_sex", "organ_allocation_status"],
data() {
return {
// 閬僵灞�
diff --git a/src/views/business/appear/CaseDetailPreview.vue b/src/views/business/appear/CaseDetailPreview.vue
index 59e368b..4e6a112 100644
--- a/src/views/business/appear/CaseDetailPreview.vue
+++ b/src/views/business/appear/CaseDetailPreview.vue
@@ -6,7 +6,7 @@
<h4>鍩烘湰淇℃伅</h4>
<div class="preview-content">
<div class="preview-item">
- <label>鎹愮尞缂栧彿锛�</label><span>{{ caseData.donorNo }}</span>
+ <label>鎹愮尞缂栧彿锛�</label><span>{{ caseData.caseNo }}</span>
</div>
<div class="preview-item">
<label>鎹愮尞鑰呭鍚嶏細</label><span>{{ caseData.donorName }}</span>
diff --git a/src/views/business/appear/caseDetail.vue b/src/views/business/appear/caseDetail.vue
index 58eb5c6..c13f35b 100644
--- a/src/views/business/appear/caseDetail.vue
+++ b/src/views/business/appear/caseDetail.vue
@@ -29,11 +29,15 @@
</el-descriptions-item>
<el-descriptions-item label="Rh闃存��">
{{
- caseData.rhYin === "1" ? "鏄�" : caseData.rhYin === "0" ? "鍚�" : "-"
+ caseData.rhYin == "1" ? "鏄�" : caseData.rhYin == "0" ? "鍚�" : "-"
}}
</el-descriptions-item>
+
<el-descriptions-item label="璇佷欢绫诲瀷">
- {{ getIdCardTypeText(caseData.idcardtype) }}
+ <dict-tag
+ :options="dict.type.sys_IDType"
+ :value="caseData.idcardtype"
+ />
</el-descriptions-item>
<el-descriptions-item label="璇佷欢鍙风爜">{{
caseData.idcardno || "-"
@@ -47,12 +51,16 @@
<el-descriptions-item label="绫嶈疮">{{
caseData.nativeplace || "-"
}}</el-descriptions-item>
- <el-descriptions-item label="瀛﹀巻">{{
- caseData.education || "-"
- }}</el-descriptions-item>
- <el-descriptions-item label="鑱屼笟">{{
- caseData.occupation || "-"
- }}</el-descriptions-item>
+ <el-descriptions-item label="瀛﹀巻">
+ <dict-tag
+ :options="dict.type.sys_education"
+ :value="String(caseData.education)"
+ /></el-descriptions-item>
+ <el-descriptions-item label="鑱屼笟">
+ <dict-tag
+ :options="dict.type.sys_occupation"
+ :value="caseData.occupation"
+ /></el-descriptions-item>
<el-descriptions-item label="鍑虹敓鏃ユ湡">{{
formatDate(caseData.birthday)
}}</el-descriptions-item>
@@ -63,7 +71,7 @@
</el-card>
<!-- 鍦板潃淇℃伅妯″潡 -->
- <!-- <el-card class="detail-section">
+ <el-card class="detail-section">
<div slot="header" class="section-header">
<span class="section-title">鍦板潃淇℃伅</span>
</div>
@@ -75,7 +83,7 @@
{{ getFullResidenceAddress() }}
</el-descriptions-item>
</el-descriptions>
- </el-card> -->
+ </el-card>
<!-- 鍖荤枟淇℃伅妯″潡 -->
<el-card class="detail-section">
@@ -106,7 +114,13 @@
>{{ caseData.infectiousOther }}</el-descriptions-item
>
<el-descriptions-item label="鏄惁闇�瑕佽浆杩�">
- {{ caseData.isTransport === "2" ? "闇�瑕�" : "涓嶉渶瑕�" }}
+ {{
+ caseData.isTransport == "1"
+ ? "涓嶉渶瑕�"
+ : caseData.isTransport == "2"
+ ? "闇�瑕�"
+ : "寰呭畾"
+ }}
</el-descriptions-item>
</el-descriptions>
</el-card>
@@ -172,7 +186,7 @@
formatDateTime(caseData.createTime)
}}</el-descriptions-item>
<el-descriptions-item label="鏄惁缁堟妗堜緥">
- {{ caseData.terminationCase === "1" ? "宸茬粓姝�" : "杩涜涓�" }}
+ {{ caseData.terminationCase == "1" ? "宸茬粓姝�" : "杩涜涓�" }}
</el-descriptions-item>
</el-descriptions>
</el-card>
@@ -289,15 +303,15 @@
<!-- 瀹℃壒淇℃伅妯″潡锛堢姸鎬佷负宸插悓鎰忔垨宸查┏鍥炴椂鏄剧ず锛� -->
<el-card
class="detail-section"
- v-if="caseData.reportStatus === '3' || caseData.reportStatus === '4'"
+ v-if="caseData.reportStatus == '3' || caseData.reportStatus == '4'"
>
<div slot="header" class="section-header">
<span class="section-title">瀹℃壒淇℃伅</span>
</div>
<el-descriptions :column="1" border>
<el-descriptions-item label="瀹℃壒缁撴灉">
- <el-tag :type="caseData.reportStatus === '3' ? 'success' : 'danger'">
- {{ caseData.reportStatus === "3" ? "宸插悓鎰�" : "宸查┏鍥�" }}
+ <el-tag :type="caseData.reportStatus == '3' ? 'success' : 'danger'">
+ {{ caseData.reportStatus == "3" ? "宸插悓鎰�" : "宸查┏鍥�" }}
</el-tag>
</el-descriptions-item>
<el-descriptions-item
@@ -331,7 +345,7 @@
<div slot="header" class="section-header">
<span class="section-title">杞繍淇℃伅</span>
<el-button
- v-if="caseData.reportStatus === '3'"
+ v-if="caseData.reportStatus == '3'"
type="primary"
size="small"
icon="el-icon-truck"
@@ -382,7 +396,7 @@
<!-- 鏃犺浆杩愪俊鎭絾闇�瑕佽浆杩愮殑鎻愮ず -->
<el-card
class="detail-section"
- v-else-if="caseData.isTransport === '2' && caseData.reportStatus === '3'"
+ v-else-if="caseData.isTransport == '2' && caseData.reportStatus == '3'"
>
<div slot="header" class="section-header">
<span class="section-title">杞繍淇℃伅</span>
@@ -428,6 +442,15 @@
pdf,
FilePreviewDialog
},
+ dicts: [
+ "sys_user_sex",
+ "sys_BloodType",
+ "sys_Infectious",
+ "sys_IDType",
+ "sys_education",
+ "sys_occupation",
+ "reject_type"
+ ],
props: {
caseData: {
type: Object,
@@ -438,13 +461,13 @@
default: true
}
},
- dicts: ["sys_user_sex", "sys_BloodType", "sys_Infectious", "reject_type"],
data() {
return {
// 棰勮鐩稿叧
previewVisible: false,
currentPreviewFile: null,
-
+ // 鍔ㄦ�佽绠楃殑 baseUrlHt
+ baseUrlHt: "",
// 鍥剧墖棰勮鐩稿叧
imagePreviewUrls: [],
rejectOptions: [
@@ -471,11 +494,31 @@
.filter(url => url);
}
},
+ created() {
+ this.calculateBaseUrl();
+ },
methods: {
handleClose() {
this.$emit("close");
},
+ /** 璁$畻 baseUrlHt */
+ calculateBaseUrl() {
+ const currentUrl = window.location.href;
+ try {
+ const urlObj = new URL(currentUrl);
+ const hostname = urlObj.hostname;
+ this.baseUrlHt = `http://${hostname}:9095`;
+ } catch (error) {
+ console.error("瑙f瀽URL澶辫触:", error);
+ const match = currentUrl.match(/https?:\/\/([^:\/]+)/);
+ if (match) {
+ this.baseUrlHt = `http://${match[1]}:9095`;
+ } else {
+ this.baseUrlHt = "http://localhost:9095";
+ }
+ }
+ },
// 鏍煎紡鍖栨棩鏈熸椂闂�
formatDateTime(dateTime) {
if (!dateTime) return "-";
@@ -657,7 +700,30 @@
},
getFileUrl(file) {
- return file.path || file.fileUrl || "";
+ if (!file) return "";
+ const url = file.path || file.fileUrl || file.url || "";
+ return this.processFileUrl(url);
+ },
+ // URL澶勭悊鍑芥暟 - 灏嗗畬鏁碪RL鏇挎崲涓篵aseUrlHt
+ processFileUrl(url) {
+ if (!url) return "";
+
+ // 濡傛灉宸茬粡鏄畬鏁寸殑http鎴杊ttps閾炬帴
+ if (url.startsWith("http://") || url.startsWith("https://")) {
+ // 鎵惧埌绗笁涓枩鏉犲悗鐨勪綅缃紝鎻愬彇璺緞閮ㄥ垎
+ const thirdSlashIndex = url.indexOf("/", 8);
+ if (thirdSlashIndex !== -1) {
+ return `${this.baseUrlHt}${url.substring(thirdSlashIndex)}`;
+ }
+ return this.baseUrlHt;
+ }
+
+ // 鐩稿璺緞澶勭悊
+ if (url.startsWith("/")) {
+ return `${this.baseUrlHt}${url}`;
+ }
+
+ return `${this.baseUrlHt}/${url}`;
},
getImagePreviewList(file) {
@@ -719,7 +785,7 @@
handlePreview(file) {
this.currentPreviewFile = {
fileName: file.fileName,
- fileUrl: this.getFileUrl(file),
+ fileUrl: this.getFileUrl(file), // 宸茬粡澶勭悊杩嘦RL
fileType: this.getFileType(file.fileName)
};
this.previewVisible = true;
@@ -743,7 +809,7 @@
// 鏂囦欢涓嬭浇
handleDownload(file) {
- const fileUrl = this.getFileUrl(file);
+ const fileUrl = this.getFileUrl(file); // 浣跨敤澶勭悊杩囩殑URL
const fileName = file.fileName;
if (fileUrl) {
diff --git a/src/views/business/appear/index.vue b/src/views/business/appear/index.vue
index 68194a3..58e7a2e 100644
--- a/src/views/business/appear/index.vue
+++ b/src/views/business/appear/index.vue
@@ -2,35 +2,15 @@
<div class="app-container">
<!-- 鎼滅储绛涢�夊尯鍩� -->
<el-card class="filter-card">
- <el-form
- :model="queryParams"
- ref="queryForm"
- :inline="true"
- class="demo-form-inline"
- >
+ <el-form :model="queryParams" ref="queryForm" :inline="true" class="demo-form-inline">
<el-form-item label="濮撳悕" prop="name">
- <el-input
- v-model="queryParams.name"
- placeholder="璇疯緭鍏ユ偅鑰呭鍚�"
- clearable
- style="width: 200px"
- />
+ <el-input v-model="queryParams.name" placeholder="璇疯緭鍏ユ偅鑰呭鍚�" clearable style="width: 200px" />
</el-form-item>
<el-form-item label="涓婃姤鍖婚櫌" prop="caseNo">
- <el-input
- v-model="queryParams.caseNo"
- placeholder="璇疯緭鍏ヤ笂鎶ユ渚嬬紪鍙�"
- clearable
- style="width: 200px"
- />
+ <el-input v-model="queryParams.caseNo" placeholder="璇疯緭鍏ヤ笂鎶ユ渚嬬紪鍙�" clearable style="width: 200px" />
</el-form-item>
<el-form-item label="涓婃姤鐘舵��" prop="reportStatus">
- <el-select
- v-model="queryParams.reportStatus"
- placeholder="璇烽�夋嫨鐘舵��"
- clearable
- style="width: 200px"
- >
+ <el-select v-model="queryParams.reportStatus" placeholder="璇烽�夋嫨鐘舵��" clearable style="width: 200px">
<el-option label="鍏ㄩ儴" value="" />
<el-option label="宸查槄璇�" value="2" />
<el-option label="宸插悓鎰�" value="3" />
@@ -38,56 +18,29 @@
</el-select>
</el-form-item>
<el-form-item>
- <el-button type="primary" icon="el-icon-search" @click="handleQuery"
- >鎼滅储</el-button
- >
+ <el-button type="primary" icon="el-icon-search" @click="handleQuery">鎼滅储</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">閲嶇疆</el-button>
</el-form-item>
</el-form>
</el-card>
- <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
+ <!-- 鎿嶄綔鎸夐挳鍖哄煙 - 淇敼鍒犻櫎鎸夐挳鐨勭鐢ㄦ潯浠� -->
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
- <el-button
- type="danger"
- plain
- icon="el-icon-delete"
- :disabled="multiple"
- @click="handleDelete"
- >鍒犻櫎</el-button
- >
+ <el-button type="danger" plain icon="el-icon-delete" :disabled="multiple || hasApprovedSelected()"
+ @click="handleDelete">
+ 鍒犻櫎
+ </el-button>
</el-col>
</el-row>
<!-- 鏁版嵁琛ㄦ牸 -->
- <el-table
- v-loading="loading"
- :data="caseList"
- @selection-change="handleSelectionChange"
- >
+ <el-table v-loading="loading" :data="caseList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
- <el-table-column
- label="缂栧彿"
- align="center"
- prop="caseNo"
- width="150"
- fixed
- />
- <el-table-column
- label="濮撳悕"
- align="center"
- prop="name"
- width="100"
- fixed
- />
- <el-table-column
- label="涓婃姤鐘舵��"
- align="center"
- prop="reportStatus"
- width="100"
- >
+ <el-table-column label="缂栧彿" align="center" prop="caseNo" width="150" fixed />
+ <el-table-column label="濮撳悕" align="center" prop="name" width="100" fixed />
+ <el-table-column label="涓婃姤鐘舵��" align="center" prop="reportStatus" width="100">
<template #default="scope">
<el-tag :type="scope.row.reportStatus | statusFilter">
{{ scope.row.reportStatus | statusTextFilter }}
@@ -109,118 +62,43 @@
<el-table-column label="骞撮緞" align="center" prop="age" width="80" />
<el-table-column label="琛�鍨�" align="center" prop="bloodType" width="80">
<template #default="scope">
- <dict-tag
- :options="dict.type.sys_BloodType"
- :value="scope.row.bloodType"
- />
+ <dict-tag :options="dict.type.sys_BloodType" :value="scope.row.bloodType" />
</template>
</el-table-column>
- <el-table-column
- label="鐤剧梾璇婃柇"
- align="center"
- prop="diagnosisname"
- min-width="200"
- show-overflow-tooltip
- />
- <el-table-column
- label="GCS璇勫垎"
- align="center"
- prop="gcsScore"
- width="80"
- show-overflow-tooltip
- />
- <el-table-column
- label="涓婃姤鍖婚櫌"
- align="center"
- prop="treatmenthospitalname"
- width="150"
- />
- <el-table-column
- label="涓婃姤鏃堕棿"
- align="center"
- prop="reporttime"
- width="160"
- />
+ <el-table-column label="鐤剧梾璇婃柇" align="center" prop="diagnosisname" min-width="200" show-overflow-tooltip />
+ <el-table-column label="GCS璇勫垎" align="center" prop="gcsScore" width="80" show-overflow-tooltip />
+ <el-table-column label="涓婃姤鍖婚櫌" align="center" prop="treatmenthospitalname" width="150" />
+ <el-table-column label="涓婃姤鏃堕棿" align="center" prop="reporttime" width="160" />
<el-table-column label="鎿嶄綔" align="center" fixed="right" width="300">
<template #default="scope">
- <el-button
- size="mini"
- type="text"
- icon="el-icon-view"
- @click="handleDetail(scope.row)"
- >璇︽儏</el-button
- >
- <el-button
- size="mini"
- type="text"
- icon="el-icon-edit"
- @click="handleEdit(scope.row)"
- v-if="
- scope.row.reportStatus !== '3' &&
- scope.row.reportStatus !== '4' &&
- scope.row.delFlag == 0
- "
- >缂栬緫</el-button
- >
- <el-button
- size="mini"
- type="text"
- icon="el-icon-check"
- @click="handleApprove(scope.row)"
- v-if="scope.row.reportStatus == '2' && scope.row.delFlag == 0"
- >纭</el-button
- >
+ <el-button size="mini" type="text" icon="el-icon-view" @click="handleDetail(scope.row)">璇︽儏</el-button>
+ <el-button size="mini" type="text" icon="el-icon-edit" @click="handleEdit(scope.row)">缂栬緫</el-button>
+ <el-button size="mini" type="text" icon="el-icon-check" @click="handleApprove(scope.row)"
+ v-if="scope.row.reportStatus == '2' && scope.row.delFlag == 0">纭</el-button>
<!-- 绉婚櫎杞繍鎸夐挳 -->
- <el-button
- v-if="scope.row.serviceTransport.length"
- size="mini"
- type="primary"
- @click="goToTransportDetail(scope.row.name)"
- >鏌ョ湅杞繍鍗�</el-button
- >
- <el-button
- v-if="
- scope.row.reportStatus == 3 &&
- !scope.row.serviceTransport.length &&
- scope.row.isTransport == 2
- "
- size="mini"
- type="success"
- @click="Createatransferorder(scope.row)"
- >鍒涘缓杞繍鍗�</el-button
- >
+ <el-button v-if="scope.row.serviceTransport.length" size="mini" type="primary"
+ @click="goToTransportDetail(scope.row.name)">鏌ョ湅杞繍鍗�</el-button>
+ <el-button v-if="
+ scope.row.reportStatus == 3 &&
+ !scope.row.serviceTransport.length &&
+ scope.row.isTransport == 2
+ " size="mini" type="success" @click="Createatransferorder(scope.row)">鍒涘缓杞繍鍗�</el-button>
</template>
</el-table-column>
</el-table>
<!-- 鍒嗛〉 -->
- <pagination
- v-show="total > 0"
- :total="total"
- :page.sync="queryParams.pageNum"
- :limit.sync="queryParams.pageSize"
- @pagination="getList"
- />
+ <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
+ @pagination="getList" />
<!-- 妗堜緥璇︽儏寮规 -->
- <el-dialog
- :title="detailTitle"
- :visible.sync="detailOpen"
- width="900px"
- append-to-body
- :close-on-click-modal="false"
- >
+ <el-dialog :title="detailTitle" :visible.sync="detailOpen" width="900px" append-to-body
+ :close-on-click-modal="false">
<case-detail :caseData="currentCase" @close="detailOpen = false" />
</el-dialog>
<!-- 纭寮规 -->
- <el-dialog
- title="妗堜緥纭"
- :visible.sync="approveOpen"
- width="80vw"
- append-to-body
- class="approve-dialog"
- >
+ <el-dialog title="妗堜緥纭" :visible.sync="approveOpen" width="80vw" append-to-body class="approve-dialog">
<!-- 浣跨敤 div 甯冨眬鏇夸唬 el-container -->
<div class="approve-dialog-content">
<!-- 宸︿晶锛氭渚嬭鎯� -->
@@ -233,28 +111,16 @@
<!-- 鍙充晶锛氱‘璁よ〃鍗� -->
<div class="approve-form-right">
- <el-form
- ref="approveForm"
- :model="approveForm"
- :rules="approveRules"
- label-width="100px"
- >
+ <el-form ref="approveForm" :model="approveForm" :rules="approveRules" label-width="100px">
<el-form-item label="纭缁撴灉" prop="approveResult">
- <el-radio-group
- v-model="approveForm.approveResult"
- @change="handleApproveResultChange"
- >
+ <el-radio-group v-model="approveForm.approveResult" @change="handleApproveResultChange">
<el-radio label="3">鍚屾剰</el-radio>
<el-radio label="4">椹冲洖</el-radio>
</el-radio-group>
</el-form-item>
<!-- 褰撻�夋嫨"鍚屾剰"鏃舵樉绀鸿浆杩愰�夐」 -->
- <el-form-item
- v-if="approveForm.approveResult == '3'"
- label="鏄惁闇�瑕佽浆杩�"
- prop="isTransport"
- >
+ <el-form-item v-if="approveForm.approveResult == '3'" label="鏄惁闇�瑕佽浆杩�" prop="isTransport">
<el-radio-group v-model="approveForm.isTransport">
<el-radio label="1">涓嶉渶瑕�</el-radio>
<el-radio label="2">闇�瑕�</el-radio>
@@ -274,31 +140,15 @@
</el-form-item>
<el-form-item label="椹冲洖鎰忚" prop="confirmResult">
- <el-input
- type="textarea"
- v-model="approveForm.confirmResult"
- placeholder="璇疯緭鍏ヨ缁嗙殑椹冲洖鎰忚"
- :rows="6"
- maxlength="500"
- show-word-limit
- />
+ <el-input type="textarea" v-model="approveForm.confirmResult" placeholder="璇疯緭鍏ヨ缁嗙殑椹冲洖鎰忚" :rows="6"
+ maxlength="500" show-word-limit />
</el-form-item>
</div>
<!-- 褰撻�夋嫨"鍚屾剰"鏃舵樉绀虹‘璁ゆ剰瑙� -->
- <el-form-item
- v-if="approveForm.approveResult == '3'"
- label="纭鎰忚"
- prop="confirmResult"
- >
- <el-input
- type="textarea"
- v-model="approveForm.confirmResult"
- placeholder="璇疯緭鍏ョ‘璁ゆ剰瑙�"
- :rows="6"
- maxlength="500"
- show-word-limit
- />
+ <el-form-item v-if="approveForm.approveResult == '3'" label="纭鎰忚" prop="confirmResult">
+ <el-input type="textarea" v-model="approveForm.confirmResult" placeholder="璇疯緭鍏ョ‘璁ゆ剰瑙�" :rows="6"
+ maxlength="500" show-word-limit />
</el-form-item>
</el-form>
</div>
@@ -311,45 +161,25 @@
</el-dialog>
<!-- 鏂板/缂栬緫妗堜緥寮规 -->
- <el-dialog
- :title="`${isEditing ? '缂栬緫' : '鏂板'}妗堜緥`"
- :visible.sync="editOpen"
- width="68%"
- append-to-body
- :close-on-click-modal="false"
- @close="handleEditClose"
- >
- <el-form
- ref="editForm"
- :model="editForm"
- :rules="editRules"
- label-width="120px"
- >
+ <el-dialog :title="`${isEditing ? '缂栬緫' : '鏂板'}妗堜緥`" :visible.sync="editOpen" width="68%" append-to-body
+ :close-on-click-modal="false" @close="handleEditClose">
+ <el-form ref="editForm" :model="editForm" :rules="editRules" label-width="120px">
<!-- 鍩烘湰淇℃伅 -->
<el-card class="form-section" shadow="never">
<div slot="header" class="section-header">
- <i
- class="el-icon-user"
- style="color: #409EFF; margin-right: 8px;"
- ></i>
+ <i class="el-icon-user" style="color: #409EFF; margin-right: 8px;"></i>
<span>鍩烘湰淇℃伅</span>
</div>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="妗堜緥缂栧彿" prop="caseNo">
- <el-input
- v-model="editForm.caseNo"
- placeholder="璇疯緭鍏ユ渚嬬紪鍙�"
- />
+ <el-input v-model="editForm.caseNo" placeholder="璇疯緭鍏ユ渚嬬紪鍙�" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="鎮h�呭鍚�" prop="name">
- <el-input
- v-model="editForm.name"
- placeholder="璇疯緭鍏ユ偅鑰呭鍚�"
- />
+ <el-input v-model="editForm.name" placeholder="璇疯緭鍏ユ偅鑰呭鍚�" />
</el-form-item>
</el-col>
</el-row>
@@ -357,25 +187,15 @@
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="鎬у埆" prop="sex">
- <el-select
- v-model="editForm.sex"
- placeholder="璇烽�夋嫨鎬у埆"
- style="width: 100%"
- >
- <el-option label="鐢�" value="0" />
- <el-option label="濂�" value="1" />
+ <el-select v-model="editForm.sex" placeholder="璇烽�夋嫨鎬у埆" style="width: 100%">
+ <el-option label="鐢�" value="1" />
+ <el-option label="濂�" value="2" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="骞撮緞" prop="age">
- <el-input-number
- v-model="editForm.age"
- :min="0"
- :max="120"
- placeholder="璇疯緭鍏ュ勾榫�"
- style="width: 100%"
- />
+ <el-input-number v-model="editForm.age" :min="0" :max="120" placeholder="璇疯緭鍏ュ勾榫�" style="width: 100%" />
</el-form-item>
</el-col>
</el-row>
@@ -383,11 +203,7 @@
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="骞撮緞鍗曚綅" prop="ageunit">
- <el-select
- v-model="editForm.ageunit"
- placeholder="璇烽�夋嫨骞撮緞鍗曚綅"
- style="width: 100%"
- >
+ <el-select v-model="editForm.ageunit" placeholder="璇烽�夋嫨骞撮緞鍗曚綅" style="width: 100%">
<el-option label="宀�" value="year" />
<el-option label="鏈�" value="month" />
<el-option label="澶�" value="day" />
@@ -396,15 +212,11 @@
</el-col>
<el-col :span="12">
<el-form-item label="琛�鍨�" prop="bloodType">
- <el-select
- v-model="editForm.bloodType"
- placeholder="璇烽�夋嫨琛�鍨�"
- style="width: 100%"
- >
- <el-option label="A鍨�" :value="1" />
- <el-option label="B鍨�" :value="2" />
- <el-option label="O鍨�" :value="3" />
- <el-option label="AB鍨�" :value="4" />
+ <el-select v-model="editForm.bloodType" placeholder="璇烽�夋嫨琛�鍨�" style="width: 100%">
+ <el-option label="A鍨�" :value="'A鍨�'" />
+ <el-option label="B鍨�" :value="'B鍨�'" />
+ <el-option label="O鍨�" :value="'O鍨�'" />
+ <el-option label="AB鍨�" :value="'AB鍨�'" />
</el-select>
</el-form-item>
</el-col>
@@ -421,13 +233,8 @@
</el-col>
<el-col :span="12">
<el-form-item label="鍑虹敓鏃ユ湡" prop="birthday">
- <el-date-picker
- v-model="editForm.birthday"
- type="date"
- placeholder="閫夋嫨鍑虹敓鏃ユ湡"
- value-format="yyyy-MM-dd"
- style="width: 100%"
- />
+ <el-date-picker v-model="editForm.birthday" type="date" placeholder="閫夋嫨鍑虹敓鏃ユ湡" value-format="yyyy-MM-dd"
+ style="width: 100%" />
</el-form-item>
</el-col>
</el-row>
@@ -435,25 +242,14 @@
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="璇佷欢绫诲瀷" prop="idcardtype">
- <el-select
- v-model="editForm.idcardtype"
- placeholder="璇烽�夋嫨璇佷欢绫诲瀷"
- style="width: 100%"
- >
- <el-option
- v-for="item in dict.type.sys_IDType"
- :label="item.label"
- :value="item.value"
- />
+ <el-select v-model="editForm.idcardtype" placeholder="璇烽�夋嫨璇佷欢绫诲瀷" style="width: 100%">
+ <el-option v-for="item in dict.type.sys_IDType" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="璇佷欢鍙风爜" prop="idcardno">
- <el-input
- v-model="editForm.idcardno"
- placeholder="璇疯緭鍏ヨ瘉浠跺彿鐮�"
- />
+ <el-input v-model="editForm.idcardno" placeholder="璇疯緭鍏ヨ瘉浠跺彿鐮�" />
</el-form-item>
</el-col>
</el-row>
@@ -466,10 +262,7 @@
</el-col>
<el-col :span="12">
<el-form-item label="鍥界睄" prop="nationality">
- <el-input
- v-model="editForm.nationality"
- placeholder="璇疯緭鍏ュ浗绫�"
- />
+ <el-input v-model="editForm.nationality" placeholder="璇疯緭鍏ュ浗绫�" />
</el-form-item>
</el-col>
</el-row>
@@ -477,18 +270,15 @@
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="绫嶈疮" prop="nativeplace">
- <el-input
- v-model="editForm.nativeplace"
- placeholder="璇疯緭鍏ョ睄璐�"
- />
+ <el-input v-model="editForm.nativeplace" placeholder="璇疯緭鍏ョ睄璐�" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="瀛﹀巻" prop="education">
- <el-input
- v-model="editForm.education"
- placeholder="璇疯緭鍏ュ鍘�"
- />
+ <!-- <el-input v-model="editForm.education" placeholder="璇疯緭鍏ュ鍘�" /> -->
+ <el-select v-model="editForm.education" placeholder="璇烽�夋嫨瀛﹀巻绫诲瀷" style="width: 100%">
+ <el-option v-for="item in dict.type.sys_education" :label="item.label" :value="item.value" />
+ </el-select>
</el-form-item>
</el-col>
</el-row>
@@ -496,18 +286,15 @@
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="鑱屼笟" prop="occupation">
- <el-input
- v-model="editForm.occupation"
- placeholder="璇疯緭鍏ヨ亴涓�"
- />
+ <!-- <el-input v-model="editForm.occupation" placeholder="璇疯緭鍏ヨ亴涓�" /> -->
+ <el-select v-model="editForm.occupation" placeholder="璇烽�夋嫨鑱屼笟绫诲瀷" style="width: 100%">
+ <el-option v-for="item in dict.type.sys_occupation" :label="item.label" :value="item.value" />
+ </el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="鑱旂郴鐢佃瘽" prop="phone">
- <el-input
- v-model="editForm.phone"
- placeholder="璇疯緭鍏ヨ仈绯荤數璇�"
- />
+ <el-input v-model="editForm.phone" placeholder="璇疯緭鍏ヨ仈绯荤數璇�" />
</el-form-item>
</el-col>
</el-row>
@@ -516,171 +303,63 @@
<!-- 鍦板潃淇℃伅 -->
<el-card class="form-section" shadow="never">
<div slot="header" class="section-header">
- <i
- class="el-icon-location-information"
- style="color: #67C23A; margin-right: 8px;"
- ></i>
+ <i class="el-icon-location-information" style="color: #67C23A; margin-right: 8px;"></i>
<span>鍦板潃淇℃伅</span>
</div>
<el-row :gutter="20">
<el-col :span="12">
- <el-form-item label="鎴风睄鍦板潃鐪�">
- <el-input
- v-model="editForm.registerprovincename"
- placeholder="璇疯緭鍏ユ埛绫嶅湴鍧�鐪�"
- />
+ <el-form-item label="鐜颁綇鍦板潃" prop="residenceaddress">
+ <li-area-select ref="residenceSelect" v-model="residenceAddress"
+ @change="handleResidenceAddressChange" />
+ <el-input v-model="editForm.residenceaddress" placeholder="璇疯緭鍏ヨ缁嗗湴鍧�" style="margin-top: 8px" />
</el-form-item>
</el-col>
<el-col :span="12">
- <el-form-item label="鎴风睄鍦板潃甯�">
- <el-input
- v-model="editForm.registercityname"
- placeholder="璇疯緭鍏ユ埛绫嶅湴鍧�甯�"
- />
+ <el-form-item label="鎴风睄鍦板潃" prop="registeraddress">
+ <li-area-select ref="registerSelect" v-model="registerAddress" @change="handleRegisterAddressChange" />
+ <el-input v-model="editForm.registeraddress" placeholder="璇疯緭鍏ヨ缁嗗湴鍧�" style="margin-top: 8px" />
</el-form-item>
</el-col>
</el-row>
-
- <el-row :gutter="20">
- <el-col :span="12">
- <el-form-item label="鎴风睄琛楅亾">
- <el-input
- v-model="editForm.registertownname"
- placeholder="璇疯緭鍏ユ埛绫嶈閬�"
- />
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="鎴风睄绀惧尯">
- <el-input
- v-model="editForm.registercommunityname"
- placeholder="璇疯緭鍏ユ埛绫嶇ぞ鍖�"
- />
- </el-form-item>
- </el-col>
- </el-row>
-
- <el-form-item label="鎴风睄璇︾粏鍦板潃" prop="registeraddress">
- <el-input
- v-model="editForm.registeraddress"
- type="textarea"
- :rows="2"
- placeholder="璇疯緭鍏ヨ缁嗙殑鎴风睄鍦板潃"
- />
- </el-form-item>
-
- <el-divider>鐜颁綇鍦板潃</el-divider>
-
- <el-row :gutter="20">
- <el-col :span="12">
- <el-form-item label="鐜颁綇鍦板潃鐪�">
- <el-input
- v-model="editForm.residenceprovincename"
- placeholder="璇疯緭鍏ョ幇浣忓湴鍧�鐪�"
- />
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="鐜颁綇鍦板潃甯�/鍖�">
- <el-input
- v-model="editForm.residencecountyname"
- placeholder="璇疯緭鍏ョ幇浣忓湴鍧�甯�/鍖�"
- />
- </el-form-item>
- </el-col>
- </el-row>
-
- <el-row :gutter="20">
- <el-col :span="12">
- <el-form-item label="鐜颁綇鍦板潃琛楅亾">
- <el-input
- v-model="editForm.residencetownname"
- placeholder="璇疯緭鍏ョ幇浣忓湴鍧�琛楅亾"
- />
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="鐜颁綇鍦板潃绀惧尯">
- <el-input
- v-model="editForm.residencecommunityname"
- placeholder="璇疯緭鍏ョ幇浣忓湴鍧�绀惧尯"
- />
- </el-form-item>
- </el-col>
- </el-row>
-
- <el-form-item label="鐜颁綇璇︾粏鍦板潃" prop="residenceaddress">
- <el-input
- v-model="editForm.residenceaddress"
- type="textarea"
- :rows="2"
- placeholder="璇疯緭鍏ヨ缁嗙殑鐜颁綇鍦板潃"
- />
- </el-form-item>
</el-card>
<!-- 鍖荤枟淇℃伅 -->
<el-card class="form-section" shadow="never">
<div slot="header" class="section-header">
- <i
- class="el-icon-first-aid-kit"
- style="color: #E6A23C; margin-right: 8px;"
- ></i>
+ <i class="el-icon-first-aid-kit" style="color: #E6A23C; margin-right: 8px;"></i>
<span>鍖荤枟淇℃伅</span>
</div>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="鐤剧梾璇婃柇" prop="diagnosisname">
- <el-input
- v-model="editForm.diagnosisname"
- placeholder="璇疯緭鍏ョ柧鐥呰瘖鏂悕绉�"
- />
+ <el-input v-model="editForm.diagnosisname" placeholder="璇疯緭鍏ョ柧鐥呰瘖鏂悕绉�" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="GCS璇勫垎" prop="gcsScore">
- <el-input
- v-model="editForm.gcsScore"
- placeholder="璇疯緭鍏CS璇勫垎"
- />
+ <el-input v-model="editForm.gcsScore" placeholder="璇疯緭鍏CS璇勫垎" />
</el-form-item>
</el-col>
</el-row>
<el-form-item label="鐥呮儏姒傚喌" prop="illnessoverview">
- <el-input
- v-model="editForm.illnessoverview"
- type="textarea"
- :rows="3"
- placeholder="璇疯緭鍏ョ梾鎯呮鍐�"
- maxlength="500"
- show-word-limit
- />
+ <el-input v-model="editForm.illnessoverview" type="textarea" :rows="3" placeholder="璇疯緭鍏ョ梾鎯呮鍐�" maxlength="500"
+ show-word-limit />
</el-form-item>
<el-form-item label="鐥呬汉鐘跺喌" prop="patientstate">
- <el-input
- v-model="editForm.patientstate"
- type="textarea"
- :rows="2"
- placeholder="璇疯緭鍏ョ梾浜虹姸鍐�"
- maxlength="200"
- show-word-limit
- />
+ <el-input v-model="editForm.patientstate" type="textarea" :rows="2" placeholder="璇疯緭鍏ョ梾浜虹姸鍐�" maxlength="200"
+ show-word-limit />
</el-form-item>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="浼犳煋鐥呮儏鍐�" prop="infectious">
<el-checkbox-group v-model="editForm.infectious">
- <el-checkbox
- v-for="item in dict.type.sys_Infectious"
- :label="item.value"
- :value="item.value"
- >{{ item.label }}</el-checkbox
- >
+ <el-checkbox v-for="item in dict.type.sys_Infectious" :label="item.value" :value="item.value">{{
+ item.label }}</el-checkbox>
</el-checkbox-group>
<!-- <el-input
v-model="editForm.infectious"
@@ -690,10 +369,7 @@
</el-col>
<el-col :span="12">
<el-form-item label="浼犳煋鐥呭叾浠栬鏄�">
- <el-input
- v-model="editForm.infectiousOther"
- placeholder="璇疯緭鍏ヤ紶鏌撶梾鍏朵粬璇存槑"
- />
+ <el-input v-model="editForm.infectiousOther" placeholder="璇疯緭鍏ヤ紶鏌撶梾鍏朵粬璇存槑" />
</el-form-item>
</el-col>
</el-row>
@@ -709,45 +385,30 @@
<!-- 鍖婚櫌淇℃伅 -->
<el-card class="form-section" shadow="never">
<div slot="header" class="section-header">
- <i
- class="el-icon-office-building"
- style="color: #909399; margin-right: 8px;"
- ></i>
+ <i class="el-icon-office-building" style="color: #909399; margin-right: 8px;"></i>
<span>鍖婚櫌淇℃伅</span>
</div>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="ICU璇勪及鍖荤敓" prop="icuDoctor">
- <el-input
- v-model="editForm.icuDoctor"
- placeholder="璇疯緭鍏CU璇勪及鍖荤敓"
- />
+ <el-input v-model="editForm.icuDoctor" placeholder="璇疯緭鍏CU璇勪及鍖荤敓" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="ICU鍖荤敓鐢佃瘽" prop="icuDoctorPhone">
- <el-input
- v-model="editForm.icuDoctorPhone"
- placeholder="璇疯緭鍏CU鍖荤敓鎵嬫満鍙�"
- />
+ <el-input v-model="editForm.icuDoctorPhone" placeholder="璇疯緭鍏CU鍖荤敓鎵嬫満鍙�" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="娌荤枟鍖婚櫌" prop="treatmenthospitalname">
- <el-input
- v-model="editForm.treatmenthospitalname"
- placeholder="璇疯緭鍏ユ不鐤楀尰闄㈠悕绉�"
- />
+ <el-input v-model="editForm.treatmenthospitalname" placeholder="璇疯緭鍏ユ不鐤楀尰闄㈠悕绉�" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="娌荤枟绉戝" prop="treatmentdeptname">
- <el-input
- v-model="editForm.treatmentdeptname"
- placeholder="璇疯緭鍏ユ不鐤楃瀹ゅ悕绉�"
- />
+ <el-input v-model="editForm.treatmentdeptname" placeholder="璇疯緭鍏ユ不鐤楃瀹ゅ悕绉�" />
</el-form-item>
</el-col>
</el-row>
@@ -755,18 +416,12 @@
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="浣忛櫌鍙�" prop="inpatientno">
- <el-input
- v-model="editForm.inpatientno"
- placeholder="璇疯緭鍏ヤ綇闄㈠彿"
- />
+ <el-input v-model="editForm.inpatientno" placeholder="璇疯緭鍏ヤ綇闄㈠彿" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="閮ㄩ棬鍚嶇О" prop="deptName">
- <el-input
- v-model="editForm.deptName"
- placeholder="璇疯緭鍏ラ儴闂ㄥ悕绉�"
- />
+ <el-input v-model="editForm.deptName" placeholder="璇疯緭鍏ラ儴闂ㄥ悕绉�" />
</el-form-item>
</el-col>
</el-row>
@@ -774,18 +429,12 @@
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="閮ㄩ棬缂栧彿" prop="deptNo">
- <el-input
- v-model="editForm.deptNo"
- placeholder="璇疯緭鍏ラ儴闂ㄧ紪鍙�"
- />
+ <el-input v-model="editForm.deptNo" placeholder="璇疯緭鍏ラ儴闂ㄧ紪鍙�" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="涓婃姤鍖婚櫌" prop="toHospital">
- <el-input
- v-model="editForm.toHospital"
- placeholder="璇疯緭鍏ヤ笂鎶ョ殑鍖婚櫌"
- />
+ <el-input v-model="editForm.toHospital" placeholder="璇疯緭鍏ヤ笂鎶ョ殑鍖婚櫌" />
</el-form-item>
</el-col>
</el-row>
@@ -794,28 +443,19 @@
<!-- 涓婃姤淇℃伅 -->
<el-card class="form-section" shadow="never">
<div slot="header" class="section-header">
- <i
- class="el-icon-s-data"
- style="color: #F56C6C; margin-right: 8px;"
- ></i>
+ <i class="el-icon-s-data" style="color: #F56C6C; margin-right: 8px;"></i>
<span>涓婃姤淇℃伅</span>
</div>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="鎶ュ憡鑰呭鍚�" prop="infoName">
- <el-input
- v-model="editForm.infoName"
- placeholder="璇疯緭鍏ユ姤鍛婅�呭鍚�"
- />
+ <el-input v-model="editForm.infoName" placeholder="璇疯緭鍏ユ姤鍛婅�呭鍚�" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="鎶ュ憡鑰呯數璇�" prop="reporterphone">
- <el-input
- v-model="editForm.phone"
- placeholder="璇疯緭鍏ユ姤鍛婅�呰仈绯荤數璇�"
- />
+ <el-input v-model="editForm.phone" placeholder="璇疯緭鍏ユ姤鍛婅�呰仈绯荤數璇�" />
</el-form-item>
</el-col>
</el-row>
@@ -823,29 +463,21 @@
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="鍗忚皟鍛樺鍚�" prop="coordinatorName">
- <el-input
- v-model="editForm.coordinatorName"
- placeholder="璇疯緭鍏ュ崗璋冨憳濮撳悕"
- />
+ <el-input v-model="editForm.coordinatorName" placeholder="璇疯緭鍏ュ崗璋冨憳濮撳悕" />
</el-form-item>
</el-col>
- <el-col :span="12">
+ <!-- <el-col :span="12">
<el-form-item label="鍗忚皟鍛樼紪鍙�" prop="coordinatorNo">
<el-input
v-model="editForm.coordinatorNo"
placeholder="璇疯緭鍏ュ崗璋冨憳缂栧彿"
/>
</el-form-item>
- </el-col>
+ </el-col> -->
</el-row>
<el-form-item label="涓婃姤鐘舵��" prop="reportStatus">
- <el-select
- v-model="editForm.reportStatus"
- placeholder="璇烽�夋嫨涓婃姤鐘舵��"
- style="width: 100%"
- :disabled="isEditing"
- >
+ <el-select v-model="editForm.reportStatus" placeholder="璇烽�夋嫨涓婃姤鐘舵��" style="width: 100%" :disabled="isEditing">
<el-option label="宸蹭笂鎶�" value="1" />
<el-option label="宸查槄璇�" value="2" />
<el-option label="宸插悓鎰�" value="3" />
@@ -855,142 +487,111 @@
</el-card>
<!-- 闄勪欢淇℃伅 -->
- <el-card class="form-section" shadow="never">
- <div slot="header" class="section-header">
- <i
- class="el-icon-folder"
- style="color: #409EFF; margin-right: 8px;"
- ></i>
- <span>闄勪欢淇℃伅</span>
- </div>
+<el-card class="form-section" shadow="never">
+ <div slot="header" class="section-header">
+ <i class="el-icon-folder" style="color: #409EFF; margin-right: 8px;"></i>
+ <span>闄勪欢淇℃伅</span>
+ </div>
- <div class="attachment-section">
- <div class="attachment-header">
- <i class="el-icon-paperclip"></i>
- <span class="attachment-title">闄勪欢涓婁紶</span>
- <span class="attachment-tip"
- >鏀寔涓婁紶鐥呭巻銆佹楠屾姤鍛婄瓑鏂囦欢 (鏈�澶歿{
- attachmentLimit
- }}涓�)</span
+ <!-- 涓婁紶缁勪欢锛堢洿鎺ユ斁缃紝鏃犲垎绫婚�夋嫨锛� -->
+ <div class="upload-wrapper">
+ <UploadAttachment
+ ref="uploadAttachment"
+ :file-list="attachmentFileList"
+ :limit="attachmentLimit"
+ :accept="attachmentAccept"
+ @change="handleAttachmentChange"
+ @upload-success="handleUploadSuccess"
+ @upload-error="handleUploadError"
+ @remove="handleAttachmentRemove"
+ />
+ <div style="font-size:12px; color:#909399; margin-top:4px;">
+ 褰撳墠涓婁紶鍒嗙被锛�<el-tag size="small" type="info">{{ activeTab === '鏈垎绫�' ? '鏈垎绫�' : activeTab }}</el-tag>
+ 锛堝垏鎹� Tab 鍙敼鍙樹笂浼犲垎绫伙級
+ </div>
+ </div>
+
+ <!-- 闄勪欢鍒楄〃 - 鍒嗙被Tab灞曠ず锛屾敮鎸佷慨鏀瑰垎绫� -->
+ <div class="attachment-list" v-if="editForm.annexfilesList && editForm.annexfilesList.length > 0">
+ <el-tabs v-model="activeTab" type="border-card">
+ <el-tab-pane
+ v-for="category in categories"
+ :key="category"
+ :label="category + '(' + getCategoryCount(category) + ')'"
+ :name="category"
+ >
+ <el-table :data="getCategoryFiles(category)" style="width: 100%" size="small" border>
+ <el-table-column label="鏂囦欢鍚�" min-width="180">
+ <template #default="scope">
+ <i class="el-icon-document" style="margin-right: 8px; color: #409EFF;"></i>
+ <span class="file-name">{{ scope.row.fileName }}</span>
+ </template>
+ </el-table-column>
+ <!-- 鍙紪杈戝垎绫讳笅鎷� -->
+ <el-table-column label="鍒嗙被" width="150">
+ <template #default="scope">
+ <el-select
+ v-model="scope.row.fileType"
+ size="small"
+ @change="updateAttachmentCategory(scope.row, $event)"
+ placeholder="閫夋嫨鍒嗙被"
>
- </div>
-
- <!-- 浣跨敤 UploadAttachment 缁勪欢 -->
- <UploadAttachment
- ref="uploadAttachment"
- :file-list="attachmentFileList"
- :limit="attachmentLimit"
- :accept="attachmentAccept"
- @change="handleAttachmentChange"
- @upload-success="handleUploadSuccess"
- @upload-error="handleUploadError"
- @remove="handleAttachmentRemove"
- />
- </div>
-
- <!-- 闄勪欢鍒楄〃 -->
- <div
- class="attachment-list"
- v-if="editForm.annexfilesList && editForm.annexfilesList.length > 0"
- >
- <div class="list-title">
- 宸蹭笂浼犻檮浠� ({{ editForm.annexfilesList.length }})
- </div>
- <el-table
- :data="editForm.annexfilesList"
- style="width: 100%"
- size="small"
- border
- >
- <el-table-column label="鏂囦欢鍚�" min-width="200">
- <template #default="scope">
- <i
- class="el-icon-document"
- style="margin-right: 8px; color: #409EFF;"
- ></i>
- <span class="file-name">{{ scope.row.fileName }}</span>
- </template>
- </el-table-column>
- <el-table-column label="鏂囦欢绫诲瀷" width="100">
- <template #default="scope">
- <el-tag size="small">{{
- getFileType(scope.row.fileName)
- }}</el-tag>
- </template>
- </el-table-column>
- <el-table-column label="鍒涘缓鏃堕棿" width="160">
- <template #default="scope">
- <span>{{ formatDateTime(scope.row.createTime) }}</span>
- </template>
- </el-table-column>
- <el-table-column
- label="澶囨敞"
- min-width="150"
- show-overflow-tooltip
- >
- <template #default="scope">
- <span>{{ scope.row.remart || "鏃�" }}</span>
- </template>
- </el-table-column>
- <el-table-column label="鎿嶄綔" width="200" fixed="right">
- <template #default="scope">
- <el-button
- size="mini"
- type="primary"
- @click="handlePreview(scope.row)"
- >
- 棰勮
- </el-button>
- <el-button
- size="mini"
- type="danger"
- @click="handleRemoveAttachment(scope.$index)"
- >
- 鍒犻櫎
- </el-button>
- </template>
- </el-table-column>
- </el-table>
- </div>
- </el-card>
+ <el-option label="鐧昏琛ㄩ檮浠�" value="鐧昏琛ㄩ檮浠�" />
+ <el-option label="璇佷欢鐓�" value="璇佷欢鐓�" />
+ <el-option label="鐤剧梾璇婃柇娌荤枟" value="鐤剧梾璇婃柇娌荤枟" />
+ <el-option label="鏈垎绫�" value="" />
+ </el-select>
+ </template>
+ </el-table-column>
+ <el-table-column label="鏂囦欢绫诲瀷" width="100">
+ <template #default="scope">
+ <el-tag size="small">{{ getFileType(scope.row.fileName) }}</el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column label="鍒涘缓鏃堕棿" width="160">
+ <template #default="scope">
+ <span>{{ formatDateTime(scope.row.createTime) }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column label="澶囨敞" min-width="130" show-overflow-tooltip>
+ <template #default="scope">
+ <span>{{ scope.row.remart || "鏃�" }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column label="鎿嶄綔" width="180" fixed="right">
+ <template #default="scope">
+ <el-button size="mini" type="primary" @click="handlePreview(scope.row)">棰勮</el-button>
+ <el-button size="mini" type="danger" @click="handleRemoveAttachmentByFile(scope.row)">鍒犻櫎</el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+ </el-tab-pane>
+ </el-tabs>
+ </div>
+</el-card>
<!-- 澶囨敞淇℃伅 -->
<el-card class="form-section" shadow="never">
<div slot="header" class="section-header">
- <i
- class="el-icon-edit"
- style="color: #67C23A; margin-right: 8px;"
- ></i>
+ <i class="el-icon-edit" style="color: #67C23A; margin-right: 8px;"></i>
<span>澶囨敞淇℃伅</span>
</div>
<el-form-item prop="remark">
- <el-input
- v-model="editForm.remark"
- type="textarea"
- :rows="4"
- placeholder="璇疯緭鍏ュ娉ㄤ俊鎭�"
- maxlength="500"
- show-word-limit
- />
+ <el-input v-model="editForm.remark" type="textarea" :rows="4" placeholder="璇疯緭鍏ュ娉ㄤ俊鎭�" maxlength="500"
+ show-word-limit />
</el-form-item>
</el-card>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="handleEditClose">鍙栨秷</el-button>
- <el-button type="primary" :loading="saveLoading" @click="handleSave"
- >淇濆瓨</el-button
- >
+ <el-button type="primary" :loading="saveLoading" @click="handleSave">淇濆瓨</el-button>
</div>
</el-dialog>
<!-- 鏂囦欢棰勮寮圭獥 -->
- <FilePreviewDialog
- :visible="previewVisible"
- :file="currentPreviewFile"
- @close="previewVisible = false"
- @download="handleDownload"
- />
+ <FilePreviewDialog :visible="previewVisible" :file="currentPreviewFile" @close="previewVisible = false"
+ @download="handleDownload" />
</div>
</template>
@@ -1005,16 +606,26 @@
donateEdit,
donateAdd
} from "@/api/businessApi/index";
+import LiAreaSelect from "@/components/Address";
+
import dayjs from "dayjs";
export default {
name: "CaseList",
components: {
CaseDetail,
+ LiAreaSelect,
UploadAttachment,
FilePreviewDialog
},
- dicts: ["sys_user_sex", "sys_BloodType", "sys_Infectious", "sys_IDType"],
+ dicts: [
+ "sys_user_sex",
+ "sys_BloodType",
+ "sys_Infectious",
+ "sys_IDType",
+ "sys_education",
+ "sys_occupation"
+ ],
data() {
const validateConfirmResult = (rule, value, callback) => {
@@ -1030,10 +641,15 @@
saveLoading: false,
// 閫変腑鏁扮粍
ids: [],
+ residenceAddress: {},
+ registerAddress: {},
// 闈炲崟涓鐢�
single: true,
// 闈炲涓鐢�
multiple: true,
+ currentCategory: "鐧昏琛ㄩ檮浠�", // 褰撳墠涓婁紶鍒嗙被
+ activeTab: "鐧昏琛ㄩ檮浠�", // 褰撳墠婵�娲荤殑Tab
+ presetCategories: ["鐧昏琛ㄩ檮浠�", "璇佷欢鐓�", "鐤剧梾璇婃柇娌荤枟"], // 棰勮鍒嗙被鍒楄〃
// 鎬绘潯鏁�
total: 0,
// 妗堜緥琛ㄦ牸鏁版嵁
@@ -1064,7 +680,7 @@
approveResult: "3",
confirmResult: "",
rejectType: "", // 椹冲洖鍘熷洜
- isTransport: "1", // 鏄惁闇�瑕佽浆杩�
+ isTransport: "", // 鏄惁闇�瑕佽浆杩�
createTransport: false, // 鏄惁闇�瑕佸垱寤鸿浆杩愬崟
isDonate: "0" // 鏄惁鎹愮尞锛�0-鏈崘鐚紝1-宸叉崘鐚�
},
@@ -1141,6 +757,13 @@
created() {
this.getList();
},
+ computed: {
+ // 鑾峰彇鎵�鏈夊瓨鍦ㄧ殑鍒嗙被锛堟寜鍥哄畾椤哄簭锛夛紝鍖呭惈鈥滄湭鍒嗙被鈥�
+ categories() {
+ // 鍥哄畾杩斿洖鎵�鏈夐璁惧垎绫� + 鏈垎绫伙紝鏃犺鏄惁鏈夋枃浠�
+ return ['鐧昏琛ㄩ檮浠�', '璇佷欢鐓�', '鐤剧梾璇婃柇娌荤枟', '鏈垎绫�'];
+ }
+ },
methods: {
/** 鏌ヨ妗堜緥鍒楄〃 */
async getList() {
@@ -1158,7 +781,19 @@
this.loading = false;
}
},
+ handleResidenceAddressChange(address) {
+ this.editForm.residenceprovince = address.sheng;
+ this.editForm.residencecity = address.shi;
+ this.editForm.residencetown = address.qu;
+ },
+ handleRegisterAddressChange(address) {
+ console.log(this.registerAddress, "registerAddress11");
+
+ this.editForm.registerprovince = address.sheng;
+ this.editForm.registercity = address.shi;
+ this.editForm.registertown = address.qu;
+ },
/** 纭缁撴灉鍙樺寲澶勭悊 */
handleApproveResultChange(value) {
if (value == "3") {
@@ -1266,7 +901,11 @@
/** 澶氶�夋閫変腑鏁版嵁 */
handleSelectionChange(selection) {
+ console.log(selection, "22");
+
this.ids = selection.map(item => item.id);
+ console.log(this.ids, "33");
+
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
@@ -1293,7 +932,21 @@
async handleDetail(row) {
try {
this.currentCase = row;
-
+ if (this.currentCase.registerprovincename) {
+ this.residenceAddress = {
+ sheng: this.currentCase.registerprovincename,
+ shi: this.currentCase.registercityname,
+ qu: this.currentCase.registertownname
+ };
+ }
+ // 鎴风睄鍦板潃
+ if (this.currentCase.residenceprovincename) {
+ this.registerAddress = {
+ sheng: this.currentCase.residenceprovincename,
+ shi: this.currentCase.residencecountyname,
+ qu: this.currentCase.residencetownname
+ };
+ }
// 濡傛灉鐘舵�佹槸"宸蹭笂鎶�"(1)锛屽垯鏇存柊涓�"宸查槄璇�"(2)
if (this.currentCase.reportStatus == "1") {
try {
@@ -1325,7 +978,63 @@
this.detailOpen = true;
}
},
-
+ // 鑾峰彇鏌愬垎绫荤殑鏂囦欢鏁伴噺
+ getCategoryCount(category) {
+ return this.editForm.annexfilesList.filter(item => {
+ const type = item.fileType || "";
+ if (category === "鏈垎绫�") {
+ return !this.presetCategories.includes(type);
+ }
+ return type === category;
+ }).length;
+ },
+ // 鑾峰彇鏌愬垎绫荤殑鏂囦欢鍒楄〃
+ getCategoryFiles(category) {
+ return this.editForm.annexfilesList.filter(item => {
+ const type = item.fileType || "";
+ if (category === "鏈垎绫�") {
+ return !this.presetCategories.includes(type);
+ }
+ return type === category;
+ });
+ },
+ // 鏇存柊闄勪欢鍒嗙被锛堜笅鎷変慨鏀规椂瑙﹀彂锛�
+ updateAttachmentCategory(row, newVal) {
+ const target = this.editForm.annexfilesList.find(item => item === row);
+ if (target) {
+ target.fileType = newVal; // 鍙兘涓虹┖瀛楃涓�
+ // 鍚屾鏇存柊 attachmentFileList
+ const fileItem = this.attachmentFileList.find(f => f.raw === row);
+ if (fileItem) {
+ fileItem.raw.fileType = newVal;
+ fileItem.fileType = newVal || "鏈垎绫�";
+ }
+ // 鍙�夛細濡傛灉褰撳墠婵�娲荤殑tab娌℃湁鏂囦欢浜嗭紝鑷姩鍒囨崲鍒扮涓�涓湁鏂囦欢鐨則ab
+ const currentTabHasFiles =
+ this.getCategoryFiles(this.activeTab).length > 0;
+ if (!currentTabHasFiles) {
+ const firstCategory = this.categories[0];
+ if (firstCategory) this.activeTab = firstCategory;
+ }
+ }
+ },
+ // 鎸夋枃浠跺璞″垹闄わ紙鐢ㄤ簬琛ㄦ牸涓殑鍒犻櫎鎸夐挳锛�
+ handleRemoveAttachmentByFile(file) {
+ const index = this.editForm.annexfilesList.findIndex(
+ item => item === file
+ );
+ if (index > -1) {
+ this.editForm.annexfilesList.splice(index, 1);
+ // 鍚屾鍒犻櫎 attachmentFileList
+ const fileIndex = this.attachmentFileList.findIndex(
+ f => f.raw === file || f.url === file.fileUrl
+ );
+ if (fileIndex > -1) {
+ this.attachmentFileList.splice(fileIndex, 1);
+ }
+ this.$message.success("闄勪欢鍒犻櫎鎴愬姛");
+ }
+ },
/** 缂栬緫鎸夐挳鎿嶄綔 */
async handleEdit(row) {
try {
@@ -1333,19 +1042,36 @@
if (response.code == 200 || response.data) {
this.isEditing = true;
const data = response.data || response;
-
- // 澶勭悊闄勪欢
+ // 纭繚闄勪欢閮芥湁 fileType 瀛楁锛岄粯璁や负绌哄瓧绗︿覆
if (data.annexfilesList) {
+ data.annexfilesList = data.annexfilesList.map(item => ({
+ ...item,
+ fileType: item.fileType || ""
+ }));
this.attachmentFileList = this.parseAttachmentToFileList(
data.annexfilesList
);
} else {
this.attachmentFileList = [];
}
-
+ if (data.registerprovincename) {
+ this.residenceAddress = {
+ sheng: data.residenceprovincename,
+ shi: data.residencecountyname,
+ qu: data.residencetownname
+ };
+ }
+ // 鎴风睄鍦板潃
+ if (data.residenceprovincename) {
+ this.registerAddress = {
+ sheng: data.registerprovincename,
+ shi: data.registercityname,
+ qu: data.registertownname
+ };
+ }
this.currentCase = data;
this.editForm = { ...data };
- this.editForm.idcardtype = this.editForm.idcardtype.toString();
+ this.editForm.idcardtype = this.editForm.idcardtype?.toString() ?? "";
console.log(this.editForm.idcardtype);
this.editForm.infectious = this.editForm.infectious
.split(",")
@@ -1363,7 +1089,12 @@
this.$modal.msgError("鑾峰彇璁板綍澶辫触");
}
},
-
+ hasApprovedSelected() {
+ if (!this.ids || this.ids.length === 0) return false;
+ return this.caseList.some(
+ item => this.ids.includes(item.id) && item.reportStatus === "3"
+ );
+ },
/** 鏂板鎸夐挳鎿嶄綔 */
handleAdd() {
this.isEditing = false;
@@ -1438,7 +1169,7 @@
// 椹冲洖
approveData.rejectType = this.approveForm.rejectType;
approveData.isTransport = "1"; // 椹冲洖鐨勬渚嬩笉闇�瑕佽浆杩�
- approveData.isDonate = "1"; // 椹冲洖鐨勬渚嬫爣璁颁负宸叉崘鐚�
+ approveData.isDonate = "0"; // 椹冲洖鐨勬渚嬫爣璁颁负宸叉崘鐚�
}
// 淇濆瓨妗堜緥纭淇℃伅
@@ -1479,19 +1210,62 @@
}
},
- /** 鍒犻櫎鎸夐挳鎿嶄綔 */
+ /** 鍒犻櫎鎸夐挳鎿嶄綔 - 淇敼锛屽鍔犲凡鍚屾剰鏍¢獙 */
async handleDelete(row) {
- const ids = row.id || this.ids;
+ console.log(this.ids, "1");
+ console.log(row, "2");
+
+ let ids = this.ids;
+ console.log(ids);
+
+ const deleteItems = this.caseList.filter(item => ids.includes(item.id));
+
+ // 妫�鏌ユ槸鍚︽湁宸插悓鎰忕殑妗堜緥
+ const approvedItems = deleteItems.filter(
+ item => item.reportStatus === "3"
+ );
+ if (approvedItems.length > 0) {
+ const names = approvedItems.map(item => item.caseNo).join(",");
+ this.$modal.msgWarning(`宸插悓鎰忕殑妗堜緥涓嶅彲鍒犻櫎锛�${names}`);
+ return;
+ }
+
try {
await this.$modal.confirm(
- '鏄惁纭鍒犻櫎妗堜緥缂栧彿涓�"' + ids + '"鐨勬暟鎹」锛�'
+ '鏄惁纭鍒犻櫎娼滃湪鎹愮尞鑰呬负"' + ids.join(",") + '"鐨勬暟鎹」锛�'
);
- await donateDel(ids);
- this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+
+ // 閫愪釜鍒犻櫎锛屼竴涓渚嬭皟鐢ㄤ竴娆″垹闄ゆ帴鍙�
+ let successCount = 0;
+ let failCount = 0;
+ let failIds = [];
+
+ for (const id of ids) {
+ try {
+ await donateDel(id);
+ successCount++;
+ } catch (error) {
+ console.error(`鍒犻櫎ID ${id} 澶辫触:`, error);
+ failCount++;
+ failIds.push(id);
+ }
+ }
+
+ // 鏄剧ず鍒犻櫎缁撴灉
+ if (failCount === 0) {
+ this.$modal.msgSuccess(`鎴愬姛鍒犻櫎 ${successCount} 涓渚媊);
+ } else {
+ this.$modal.msgWarning(
+ `鎴愬姛鍒犻櫎 ${successCount} 涓渚嬶紝${failCount} 涓渚嬪垹闄ゅけ璐ワ紙ID: ${failIds.join(
+ ","
+ )}锛塦
+ );
+ }
+
this.getList();
} catch (error) {
if (error !== "cancel") {
- console.error("鍒犻櫎澶辫触:", error);
+ console.error("鍒犻櫎鎿嶄綔鍙栨秷鎴栧け璐�:", error);
this.$modal.msgError("鍒犻櫎澶辫触");
}
}
@@ -1568,15 +1342,17 @@
/** 闄勪欢杞崲 */
parseAttachmentToFileList(attachments) {
- if (!attachments || !Array.isArray(attachments)) return [];
- return attachments.map((item, index) => ({
- uid: item.id || `attachment-${index}-${Date.now()}`,
- name: item.fileName,
- url: item.path || item.fileUrl,
- status: "success",
- raw: item
- }));
- },
+ if (!attachments || !Array.isArray(attachments)) return [];
+ return attachments.map((item, index) => ({
+ uid: item.id || `attachment-${index}-${Date.now()}`,
+ name: item.fileName,
+ url: item.path || item.fileUrl,
+ status: 'success',
+ raw: item,
+ fileType: item.fileType || '' // 绌哄瓧绗︿覆琛ㄧず鏈垎绫�
+ }));
+}
+,
/** 闄勪欢鍙樺寲澶勭悊 */
handleAttachmentChange(fileList) {
@@ -1585,24 +1361,35 @@
/** 闄勪欢涓婁紶鎴愬姛澶勭悊 */
handleUploadSuccess({ file, fileList, response }) {
- if (response && response.code == 200) {
- if (!this.editForm.annexfilesList) {
- this.editForm.annexfilesList = [];
- }
- const attachmentObj = {
- fileName: file.name,
- path: response.data || file.url,
- fileUrl: response.data || file.url,
- type: this.getFileExtension(file.name),
- createTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
- remart: file.raw?.remart || "",
- caseNo: this.editForm.caseNo
- };
-
- this.editForm.annexfilesList.push(attachmentObj);
- this.$message.success("鏂囦欢涓婁紶鎴愬姛");
- }
- },
+ if (response && response.code == 200) {
+ if (!this.editForm.annexfilesList) {
+ this.editForm.annexfilesList = [];
+ }
+ // 鏍规嵁褰撳墠婵�娲荤殑 Tab 鍐冲畾鍒嗙被锛堟湭鍒嗙被 Tab 瀵瑰簲绌哄瓧绗︿覆锛�
+ const category = this.activeTab === '鏈垎绫�' ? '' : this.activeTab;
+ const attachmentObj = {
+ fileName: file.name,
+ path: response.data || file.url,
+ fileUrl: response.data || file.url,
+ type: this.getFileExtension(file.name),
+ createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
+ remart: file.raw?.remart || '',
+ caseNo: this.editForm.caseNo,
+ fileType: category // 浣跨敤 activeTab 鍐冲畾
+ };
+ this.editForm.annexfilesList.push(attachmentObj);
+ // 鍚屾鏇存柊 attachmentFileList
+ this.attachmentFileList.push({
+ uid: attachmentObj.path,
+ name: attachmentObj.fileName,
+ url: attachmentObj.path,
+ status: 'success',
+ raw: attachmentObj,
+ fileType: category
+ });
+ this.$message.success('鏂囦欢涓婁紶鎴愬姛');
+ }
+},
/** 闄勪欢涓婁紶閿欒澶勭悊 */
handleUploadError({ file, fileList, error }) {
@@ -1731,6 +1518,10 @@
requestData.infectious = requestData.infectious.join(",");
let response;
+ requestData.isDonate = requestData.isDonate
+ ? requestData.isDonate
+ : "0";
+
if (this.isEditing) {
response = await donateEdit(requestData);
} else {
@@ -1829,16 +1620,18 @@
}
/* 纭寮规鏍峰紡 */
-.approve-dialog >>> .el-dialog__body {
+.approve-dialog>>>.el-dialog__body {
padding: 0;
}
.approve-detail-preview {
height: 100%;
}
+
.approve-dialog-content {
display: flex;
- height: 600px; /* 鍙互璋冩暣楂樺害 */
+ height: 600px;
+ /* 鍙互璋冩暣楂樺害 */
overflow: hidden;
}
@@ -1879,6 +1672,7 @@
border-bottom: 1px solid #e4e7ed;
}
}
+
/* 鍝嶅簲寮忚璁� */
@media (max-width: 1200px) {
.approve-dialog {
diff --git a/src/views/business/assess/assessInfo.vue b/src/views/business/assess/assessInfo.vue
index e75e559..5a06c99 100644
--- a/src/views/business/assess/assessInfo.vue
+++ b/src/views/business/assess/assessInfo.vue
@@ -6,97 +6,43 @@
<el-card class="organ-assessment-card">
<div slot="header" class="clearfix">
<span>鍣ㄥ畼璇勪及琛�</span>
- <!-- <el-button
- v-if="isCoordinator && allOrgansAssessed"
- style="float: right; margin-left: 10px"
- type="primary"
- size="mini"
- @click="handleCompleteAssessment"
- :loading="saveLoading"
- >
- 纭瀹屾垚璇勪及
- </el-button>
- <span v-if="!isCoordinator" class="jstitle">
- 褰撳墠瑙掕壊锛歿{ currentDepartment }}璇勪及浜哄憳
- </span> -->
</div>
<!-- 鎹愮尞鍐冲畾琛ㄥ崟 -->
<el-form>
<el-form-item label-width="100px" label="鎹愮尞鍐冲畾">
- <el-checkbox-group
- v-model="organdecisionValues"
- @change="handleOrganDecisionChange"
- :disabled="!isEdit"
- >
- <el-checkbox
- v-for="dict in dict.type.sys_Organ"
- :key="dict.value"
- :label="dict.value"
- >{{ dict.label }}
+ <el-checkbox-group v-model="organdecisionValues" @change="handleOrganDecisionChange" :disabled="!isEdit">
+ <el-checkbox v-for="dict in dict.type.sys_Organ" :key="dict.value" :label="dict.value">{{ dict.label }}
</el-checkbox>
</el-checkbox-group>
- <el-input
- v-if="showOtherInput"
- v-model="organdecisionOther"
- placeholder="璇疯緭鍏ュ叾浠栨崘鐚喅瀹氱殑鍏蜂綋鍐呭"
- style="margin-top: 10px; width: 300px;"
- :readonly="!isEdit"
- @input="handleOtherDecisionInput"
- ></el-input>
+ <el-input v-if="showOtherInput" v-model="organdecisionOther" placeholder="璇疯緭鍏ュ叾浠栨崘鐚喅瀹氱殑鍏蜂綋鍐呭"
+ style="margin-top: 10px; width: 300px;" :readonly="!isEdit" @input="handleOtherDecisionInput"></el-input>
</el-form-item>
</el-form>
<!-- 鍣ㄥ畼璇勪及琛ㄦ牸 -->
- <el-table
- :data="filteredOrganAssessmentList"
- v-loading="assessmentLoading"
- style="width: 100%"
- :row-class-name="getRowClassName"
- :expand-row-keys="expandedRowKeys"
- @expand-change="handleExpandChange"
- row-key="organno"
- empty-text="褰撳墠鎹愮尞鍐冲畾涓嬫殏鏃犻渶瑕佽瘎浼扮殑鍣ㄥ畼"
- >
+ <el-table :data="filteredOrganAssessmentList" v-loading="assessmentLoading" style="width: 100%"
+ :row-class-name="getRowClassName" :expand-row-keys="expandedRowKeys" @expand-change="handleExpandChange"
+ row-key="organno" empty-text="褰撳墠鎹愮尞鍐冲畾涓嬫殏鏃犻渶瑕佽瘎浼扮殑鍣ㄥ畼">
<el-table-column type="expand">
<template slot-scope="scope">
<div class="organ-expand-content" v-if="scope.row.expanded">
- <el-tabs
- v-model="scope.row.activeTab"
- type="card"
- class="organ-detail-tabs"
- @tab-click="handleTabClick(scope.row, $event)"
- >
+ <el-tabs v-model="scope.row.activeTab" type="card" class="organ-detail-tabs"
+ @tab-click="handleTabClick(scope.row, $event)">
<!-- 鍔ㄦ�佺敓鎴愯瘎浼癟ab -->
- <el-tab-pane
- v-for="(assessment, index) in getOrganAssessments(scope.row)"
- :key="`${scope.row.organno}_${index}`"
- :label="`绗�${index + 1}娆¤瘎浼癭"
- :name="String(index)"
- >
- <organ-assessment-form
- :organ-data="scope.row"
- :assessment-index="index"
- :readonly="!canAssessOrgan(scope.row)"
- :current-user="currentUser"
- @update-assessment="handleUpdateAssessment"
- @delete-assessment="handleDeleteAssessment"
- @save-assessment="handleSaveAssessment"
- />
+ <el-tab-pane v-for="(assessment, index) in getOrganAssessments(scope.row)"
+ :key="`${scope.row.organno}_${index}`" :label="`绗�${index + 1}娆¤瘎浼癭" :name="String(index)">
+ <organ-assessment-form :organ-data="scope.row" :assessment-index="index"
+ :readonly="!canAssessOrgan(scope.row)" :current-user="currentUser"
+ @update-assessment="handleUpdateAssessment" @delete-assessment="handleDeleteAssessment"
+ @save-assessment="handleSaveAssessment" />
</el-tab-pane>
<!-- 娣诲姞璇勪及鎸夐挳 -->
- <el-tab-pane
- name="add"
- v-if="canAssessOrgan(scope.row) && isEdit"
- >
+ <el-tab-pane name="add" v-if="canAssessOrgan(scope.row) && isEdit">
<template slot="label">
- <el-button
- type="text"
- icon="el-icon-plus"
- @click.stop="handleAddNewAssessment(scope.row)"
- size="mini"
- >
+ <el-button type="text" icon="el-icon-plus" @click.stop="handleAddNewAssessment(scope.row)"
+ size="mini">
鏂板璇勪及
</el-button>
</template>
@@ -113,12 +59,12 @@
<el-descriptions-item label="鍣ㄥ畼绫诲瀷">
<span class="summary-item">{{
getOrganLabel(scope.row.organno)
- }}</span>
+ }}</span>
</el-descriptions-item>
<el-descriptions-item label="鑾峰彇鏈烘瀯">
<span class="summary-item">{{
scope.row.gainhospitalname
- }}</span>
+ }}</span>
</el-descriptions-item>
<el-descriptions-item label="璇勪及娆℃暟" :span="2">
<el-tag type="info" size="medium">
@@ -128,57 +74,36 @@
<el-descriptions-item label="鏈�鏂拌瘎浼版椂闂�" :span="2">
<span class="highlight-text">{{
getLatestAssessmentTime(scope.row) || "-"
- }}</span>
+ }}</span>
</el-descriptions-item>
</el-descriptions>
<!-- 璇勪及璇︽儏姹囨�� -->
- <el-card
- header="璇勪及璇︽儏鍒楄〃"
- style="margin-top: 20px;"
- class="assessment-detail-card"
- >
- <div
- v-if="getOrganAssessments(scope.row).length == 0"
- class="no-assessment"
- >
+ <el-card header="璇勪及璇︽儏鍒楄〃" style="margin-top: 20px;" class="assessment-detail-card">
+ <div v-if="getOrganAssessments(scope.row).length == 0" class="no-assessment">
<el-empty description="鏆傛棤璇勪及璁板綍"></el-empty>
</div>
<div v-else>
<!-- 姣忔璇勪及璇︽儏 -->
- <div
- v-for="(assessment, index) in getOrganAssessments(
- scope.row
- )"
- :key="index"
- class="assessment-item"
- >
+ <div v-for="(assessment, index) in getOrganAssessments(
+ scope.row
+ )" :key="index" class="assessment-item">
<el-card shadow="hover" class="assessment-card">
<div slot="header" class="clearfix">
- <span class="assessment-title"
- >绗瑊{ index + 1 }}娆¤瘎浼�</span
- >
- <el-tag
- :type="getAssessmentTagType(assessment.status)"
- size="small"
- class="status-tag"
- >
+ <span class="assessment-title">绗瑊{ index + 1 }}娆¤瘎浼�</span>
+ <el-tag :type="getAssessmentTagType(assessment.status)" size="small" class="status-tag">
{{ getAssessmentStatusText(assessment.status) }}
</el-tag>
</div>
- <el-descriptions
- :column="2"
- border
- class="detail-descriptions"
- >
+ <el-descriptions :column="2" border class="detail-descriptions">
<!-- 璇勪及鏃堕棿 -->
<el-descriptions-item label="璇勪及鏃堕棿" :span="2">
<span class="time-text">
{{
parseTime(assessment.assessmentTime) ||
- "鏈缃�"
+ "鏈缃�"
}}
</span>
</el-descriptions-item>
@@ -192,14 +117,10 @@
<!-- 鍔熻兘鐘舵�� -->
<el-descriptions-item label="鍔熻兘鐘舵��">
- <el-tag
- :type="
- getFunctionStatusTagType(
- assessment.functionStatus
- )
- "
- size="small"
- >
+ <el-tag :type="getFunctionStatusTagType(
+ assessment.functionStatus
+ )
+ " size="small">
{{
getFunctionStatusText(
assessment.functionStatus
@@ -213,34 +134,25 @@
<div class="opinion-content">
{{
assessment.assessmentOpinion ||
- "鏆傛棤璇勪及鎰忚"
+ "鏆傛棤璇勪及鎰忚"
}}
</div>
</el-descriptions-item>
<!-- 闄勪欢鏁伴噺 -->
- <el-descriptions-item
- label="闄勪欢鏁伴噺"
- :span="2"
- v-if="
- assessment.attachments &&
- assessment.attachments.length > 0
- "
- >
+ <el-descriptions-item label="闄勪欢鏁伴噺" :span="2" v-if="
+ assessment.attachments &&
+ assessment.attachments.length > 0
+ ">
<el-tag type="success" size="small">
{{ assessment.attachments.length }}涓�
</el-tag>
- <el-button
- type="text"
- size="mini"
- @click="
- showAttachmentList(
- assessment.attachments,
- index + 1
- )
- "
- style="margin-left: 10px;"
- >
+ <el-button type="text" size="mini" @click="
+ showAttachmentList(
+ assessment.attachments,
+ index + 1
+ )
+ " style="margin-left: 10px;">
鏌ョ湅闄勪欢鍒楄〃
</el-button>
</el-descriptions-item>
@@ -251,57 +163,37 @@
</el-card>
<!-- 鍣ㄥ畼鍩烘湰淇℃伅鍗$墖 -->
- <el-card
- header="鍣ㄥ畼淇℃伅"
- style="margin-top: 20px;"
- class="organ-info-card"
- >
+ <el-card header="鍣ㄥ畼淇℃伅" style="margin-top: 20px;" class="organ-info-card">
<el-descriptions :column="2" border>
<el-descriptions-item label="鑾峰彇鍓嶆椿妫�">
- <el-tag
- :type="
- scope.row.isbiopsybefore == '1'
- ? 'success'
- : 'info'
- "
- size="small"
- >
+ <el-tag :type="scope.row.isbiopsybefore == '1'
+ ? 'success'
+ : 'info'
+ " size="small">
{{ scope.row.isbiopsybefore == "1" ? "鏄�" : "鍚�" }}
</el-tag>
</el-descriptions-item>
<el-descriptions-item label="鑾峰彇鍚庢椿妫�">
- <el-tag
- :type="
- scope.row.isbiopsyafter == '1'
- ? 'success'
- : 'info'
- "
- size="small"
- >
+ <el-tag :type="scope.row.isbiopsyafter == '1'
+ ? 'success'
+ : 'info'
+ " size="small">
{{ scope.row.isbiopsyafter == "1" ? "鏄�" : "鍚�" }}
</el-tag>
</el-descriptions-item>
<el-descriptions-item label="杈圭紭鍣ㄥ畼">
- <el-tag
- :type="
- scope.row.ismarginalorgan == '1'
- ? 'warning'
- : 'info'
- "
- size="small"
- >
+ <el-tag :type="scope.row.ismarginalorgan == '1'
+ ? 'warning'
+ : 'info'
+ " size="small">
{{ scope.row.ismarginalorgan == "1" ? "鏄�" : "鍚�" }}
</el-tag>
</el-descriptions-item>
<el-descriptions-item label="鐥呭師鑿岄槼鎬�">
- <el-tag
- :type="
- scope.row.ispathogenpositive == '1'
- ? 'danger'
- : 'info'
- "
- size="small"
- >
+ <el-tag :type="scope.row.ispathogenpositive == '1'
+ ? 'danger'
+ : 'info'
+ " size="small">
{{
scope.row.ispathogenpositive == "1" ? "鏄�" : "鍚�"
}}
@@ -328,31 +220,16 @@
</template>
</el-table-column>
- <el-table-column
- label="鑾峰彇鏈烘瀯"
- align="center"
- prop="gainhospitalname"
- show-overflow-tooltip
- />
+ <el-table-column label="鑾峰彇鏈烘瀯" align="center" prop="gainhospitalname" show-overflow-tooltip />
<!-- 鍔ㄦ�佹樉绀鸿瘎浼扮姸鎬佸垪 -->
- <el-table-column
- v-for="index in getMaxAssessmentCount()"
- :key="index"
- :label="`绗�${index}娆¤瘎浼癭"
- align="center"
- width="120"
- >
+ <el-table-column v-for="index in getMaxAssessmentCount()" :key="index" :label="`绗�${index}娆¤瘎浼癭" align="center"
+ width="120">
<template slot-scope="scope">
- <el-tag
- v-if="getOrganAssessments(scope.row)[index - 1]"
- :type="
- getAssessmentTagType(
- getOrganAssessments(scope.row)[index - 1].status
- )
- "
- size="small"
- >
+ <el-tag v-if="getOrganAssessments(scope.row)[index - 1]" :type="getAssessmentTagType(
+ getOrganAssessments(scope.row)[index - 1].status
+ )
+ " size="small">
{{
getAssessmentStatusText(
getOrganAssessments(scope.row)[index - 1].status
@@ -365,51 +242,31 @@
<el-table-column label="鏁翠綋鐘舵��" align="center" width="100">
<template slot-scope="scope">
- <el-tag
- :type="
- getOrganOverallStatus(scope.row) == 'completed'
- ? 'success'
- : getOrganOverallStatus(scope.row) == 'assessing'
+ <el-tag :type="getOrganOverallStatus(scope.row) == 'completed'
+ ? 'success'
+ : getOrganOverallStatus(scope.row) == 'assessing'
? 'primary'
: 'warning'
- "
- size="small"
- >
+ " size="small">
{{ getOrganOverallStatusText(scope.row) }}
</el-tag>
</template>
</el-table-column>
- <el-table-column
- label="鎿嶄綔"
- align="center"
- width="150"
- class-name="small-padding fixed-width"
- >
+ <el-table-column label="鎿嶄綔" align="center" width="150" class-name="small-padding fixed-width">
<template slot-scope="scope">
- <el-button
- v-if="canAssessOrgan(scope.row) && isEdit"
- size="mini"
- type="text"
- @click="handleToggleExpand(scope.row)"
- >
+ <el-button v-if="canAssessOrgan(scope.row) && isEdit" size="mini" type="text"
+ @click="handleToggleExpand(scope.row)">
{{
expandedRowKeys.includes(scope.row.organno) ? "鏀惰捣" : "璇︽儏"
}}
</el-button>
- <el-button
- v-else-if="!isEdit"
- size="mini"
- type="text"
- @click="handleToggleExpand(scope.row)"
- >
+ <el-button v-else-if="!isEdit" size="mini" type="text" @click="handleToggleExpand(scope.row)">
{{
expandedRowKeys.includes(scope.row.organno) ? "鏀惰捣" : "鏌ョ湅"
}}
</el-button>
- <el-button v-else size="mini" type="text" disabled
- >鏃犳潈闄�</el-button
- >
+ <el-button v-else size="mini" type="text" disabled>鏃犳潈闄�</el-button>
</template>
</el-table-column>
</el-table>
@@ -417,20 +274,12 @@
<!-- 鏁翠綋淇濆瓨鎸夐挳 -->
<div class="footer-actions" v-if="isEdit">
- <el-button type="primary" @click="handleSaveAll" :loading="saveLoading"
- >淇濆瓨璇勪及琛�</el-button
- >
- <el-button type="success" @click="accomplish" :loading="saveLoading"
- >璇勪及瀹屾垚</el-button
- >
+ <el-button type="primary" @click="handleSaveAll" :loading="saveLoading">淇濆瓨璇勪及琛�</el-button>
+ <el-button type="success" @click="accomplish" :loading="saveLoading">璇勪及瀹屾垚</el-button>
</div>
<!-- 鏂囦欢棰勮寮圭獥 -->
- <FilePreviewDialog
- :visible="attachmentVisible"
- :file="currentPreviewFile"
- @close="attachmentVisible = false"
- />
+ <FilePreviewDialog :visible="attachmentVisible" :file="currentPreviewFile" @close="attachmentVisible = false" />
</div>
</template>
@@ -567,7 +416,7 @@
this.infoid = this.$route.query.infoid;
this.caseId = this.infoid;
this.assessmentId = this.$route.query.id;
- this.isEdit = this.$route.query.assess == "true";
+ this.isEdit = true;
this.getAssessmentDetail();
},
methods: {
@@ -622,8 +471,8 @@
<h4>绗�${assessmentNumber}娆¤瘎浼伴檮浠跺垪琛�</h4>
<ul style="list-style: none; padding-left: 0;">
${attachments
- .map(
- (item, index) => `
+ .map(
+ (item, index) => `
<li style="margin: 5px 0; padding: 5px; background: #f5f7fa; border-radius: 4px;">
<i class="el-icon-document"></i>
<span style="margin-left: 8px;">${item.fileName}</span>
@@ -637,8 +486,8 @@
</el-button>
</li>
`
- )
- .join("")}
+ )
+ .join("")}
</ul>
</div>`,
"闄勪欢鍒楄〃",
@@ -703,7 +552,7 @@
this.handleSaveAll();
})
- .catch(() => {});
+ .catch(() => { });
},
// 鏁翠綋淇濆瓨鏂规硶
async handleSaveAll() {
@@ -760,6 +609,7 @@
if (!this.assessmentData.id && response.data) {
this.assessmentData.id = response.data;
}
+ this.getAssessmentDetail()
this.refreshKey += 1; // 瑙﹀彂閲嶆柊娓叉煋
} else {
this.$message.error("淇濆瓨澶辫触锛�" + (response.msg || "鏈煡閿欒"));
@@ -875,8 +725,7 @@
// 鏄剧ず鍒涘缓鎻愮ず
if (organsToCreate.length > 0) {
this.$message.success(
- `宸蹭负銆�${this.getOrganLabel(decision)}銆戝垱寤�${
- organsToCreate.length
+ `宸蹭负銆�${this.getOrganLabel(decision)}銆戝垱寤�${organsToCreate.length
}涓瘎浼伴」`
);
}
@@ -1059,8 +908,8 @@
const activeTab = this.activeTabMap.has(organno)
? String(this.activeTabMap.get(organno))
: assessments.length > 0
- ? "0"
- : "summary";
+ ? "0"
+ : "summary";
return {
...organ,
@@ -1601,7 +1450,7 @@
background-color: #fafafa;
}
-::v-deep .el-table--enable-row-hover .el-table__body tr:hover > td {
+::v-deep .el-table--enable-row-hover .el-table__body tr:hover>td {
background-color: #ecf5ff;
}
@@ -1679,7 +1528,7 @@
background-color: #e4e7ed;
}
-::v-deep .el-tabs--card > .el-tabs__header .el-tabs__item.is-active {
+::v-deep .el-tabs--card>.el-tabs__header .el-tabs__item.is-active {
background-color: #fff;
border-bottom-color: #fff;
}
diff --git a/src/views/business/assess/index.vue b/src/views/business/assess/index.vue
index 1b7bc39..b62efef 100644
--- a/src/views/business/assess/index.vue
+++ b/src/views/business/assess/index.vue
@@ -123,6 +123,12 @@
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
+ <el-table-column
+ label="鎹愮尞缂栧彿"
+ align="center"
+ prop="caseNo"
+ width="120"
+ />
<el-table-column
label="浣忛櫌鍙�"
align="center"
@@ -207,13 +213,13 @@
class-name="small-padding fixed-width"
>
<template slot-scope="scope">
- <el-button
+ <!-- <el-button
size="mini"
type="text"
icon="el-icon-view"
@click.stop="handleView(scope.row)"
>璇︽儏</el-button
- >
+ > -->
<el-button
v-if="
scope.row.assessState != '3' || scope.row.assessState != '4'
diff --git a/src/views/business/course/components/DeathJudgmentStage.vue b/src/views/business/course/components/DeathJudgmentStage.vue
index 8550177..b71bcf0 100644
--- a/src/views/business/course/components/DeathJudgmentStage.vue
+++ b/src/views/business/course/components/DeathJudgmentStage.vue
@@ -1,5 +1,6 @@
<template>
<div class="death-judgment-detail">
+ <!-- <case-basic-info :case-id="caseId" :show-attachment="true" /> -->
<!-- 鍏叡淇℃伅妯″潡锛堢嫭绔嬫樉绀猴級 -->
<!-- 鍒ゅ畾绫诲瀷鏍囩椤� -->
@@ -45,30 +46,7 @@
<el-input v-model="form.gainhospitalname" :readonly="!isEdit" />
</el-form-item>
</el-col>
- <el-col :span="8">
- <el-form-item label="鏄惁榛樺搥缂呮��" prop="isspendremember">
- <el-select
- v-model="form.isspendremember"
- :disabled="!isEdit"
- style="width: 100%"
- >
- <el-option label="鏄�" :value="1" />
- <el-option label="鍚�" :value="0" />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="鎭㈠閬椾綋浠" prop="isrestoreremains">
- <el-select
- v-model="form.isrestoreremains"
- :disabled="!isEdit"
- style="width: 100%"
- >
- <el-option label="鏄�" :value="1" />
- <el-option label="鍚�" :value="0" />
- </el-select>
- </el-form-item>
- </el-col>
+
</el-row>
</el-form>
</el-card> -->
@@ -76,32 +54,6 @@
<el-card v-if="activeJudgmentType === 'brain'" class="detail-card">
<div slot="header" class="clearfix">
<span class="detail-title">鑴戞浜″垽瀹氫俊鎭�</span>
- <el-button
- v-if="isEdit"
- style="float: right; margin-left: 10px;"
- type="success"
- @click="handleSave"
- :loading="saveLoading"
- >
- 淇濆瓨淇℃伅
- </el-button>
- <el-button
- v-if="isEdit"
- style="float: right; margin-left: 10px;"
- type="success"
- @click="accomplish"
- :loading="saveLoading"
- >
- 瀹屾垚鍒ゅ畾
- </el-button>
- <el-button
- v-else
- style="float: right; margin-left: 10px;"
- type="primary"
- @click="handleEdit"
- >
- 缂栬緫淇℃伅
- </el-button>
</div>
<el-form :model="form" ref="brainForm" :rules="rules" label-width="120px">
@@ -133,6 +85,32 @@
<el-col :span="8">
<el-form-item label="鍒ゅ畾鍖荤敓浜�" prop="deathjudgedoctt">
<el-input v-model="form.deathjudgedoctt" :readonly="!isEdit" />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row :gutter="20">
+ <el-col :span="24">
+ <el-form-item label="鍏朵粬鍒ゅ畾鍖荤敓">
+ <div
+ v-for="(doctor, index) in brainExtraDoctors"
+ :key="index"
+ style="display: flex; align-items: center; margin-bottom: 8px;"
+ >
+ <el-input
+ v-model="brainExtraDoctors[index]"
+ placeholder="璇疯緭鍏ュ尰鐢熷鍚�"
+ style="flex: 1; margin-right: 10px;"
+ :readonly="!isEdit"
+ />
+ <el-button
+ v-if="isEdit"
+ type="danger"
+ icon="el-icon-minus"
+ circle
+ size="mini"
+ @click="removeBrainDoctor(index)"
+ />
+ </div>
</el-form-item>
</el-col>
</el-row>
@@ -290,7 +268,7 @@
<el-row :gutter="20">
<el-col :span="8">
- <el-form-item label="蹇冩浜℃椂闂�" prop="heartdeathtime">
+ <el-form-item label="蹇冩浜″垽瀹氬畬鎴愭椂闂�" prop="heartdeathtime">
<el-date-picker
v-model="form.heartdeathtime"
type="datetime"
@@ -314,6 +292,41 @@
v-model="form.heartdeathjudgedoctt"
:readonly="!isEdit"
/>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row :gutter="20">
+ <el-col :span="24">
+ <el-form-item label="鍏朵粬鍒ゅ畾鍖荤敓">
+ <div
+ v-for="(doctor, index) in heartExtraDoctors"
+ :key="index"
+ style="display: flex; align-items: center; margin-bottom: 8px;"
+ >
+ <el-input
+ v-model="heartExtraDoctors[index]"
+ placeholder="璇疯緭鍏ュ尰鐢熷鍚�"
+ style="flex: 1; margin-right: 10px;"
+ :readonly="!isEdit"
+ />
+ <el-button
+ v-if="isEdit"
+ type="danger"
+ icon="el-icon-minus"
+ circle
+ size="mini"
+ @click="removeHeartDoctor(index)"
+ />
+ </div>
+ <el-button
+ v-if="isEdit"
+ type="primary"
+ icon="el-icon-plus"
+ size="small"
+ @click="addHeartDoctor"
+ >
+ 娣诲姞鍖荤敓
+ </el-button>
</el-form-item>
</el-col>
</el-row>
@@ -436,7 +449,25 @@
</el-tabs>
</div>
</el-card>
-
+ <!-- 搴曢儴鎿嶄綔鎸夐挳 -->
+ <div style="text-align: center; margin: 30px 0;">
+ <el-button
+ v-if="isEdit"
+ type="primary"
+ @click="handleSave"
+ :loading="saveLoading"
+ >
+ 淇濆瓨淇℃伅
+ </el-button>
+ <el-button
+ v-if="isEdit"
+ type="success"
+ @click="accomplish"
+ :loading="saveLoading"
+ >
+ 瀹屾垚鍒ゅ畾
+ </el-button>
+ </div>
<!-- 涓婁紶瀵硅瘽妗嗭紙鑴戞浜★級 -->
<el-dialog
:title="`涓婁紶${getCurrentBrainDeathTypeLabel}璇勪及琛╜"
@@ -524,6 +555,13 @@
</el-button>
</div>
</el-dialog>
+ <!-- 闄勪欢棰勮 -->
+ <FilePreviewDialog
+ :visible="previewVisible"
+ :file="currentPreviewFile"
+ @close="previewVisible = false"
+ @download="handleDownload"
+ />
</div>
</template>
@@ -535,10 +573,11 @@
} from "@/api/businessApi";
import { getToken } from "@/utils/auth";
import CaseBasicInfo from "@/components/CaseBasicInfo";
+import FilePreviewDialog from "@/components/FilePreviewDialog";
export default {
name: "DeathJudgmentDetail",
- components: { CaseBasicInfo },
+ components: { CaseBasicInfo, FilePreviewDialog },
props: {
infoid: {
type: String,
@@ -548,12 +587,15 @@
data() {
return {
caseId: null,
- isEdit: false,
+ isEdit: true,
saveLoading: false,
-
+ brainExtraDoctors: [], // 鑴戞浜″叾浠栧垽瀹氬尰鐢�
+ heartExtraDoctors: [], // 蹇冩浜″叾浠栧垽瀹氬尰鐢�
// 鍒ゅ畾绫诲瀷鏍囩
activeJudgmentType: "brain", // 榛樿鏄剧ず鑴戞浜�
-
+ // 棰勮鐩稿叧
+ previewVisible: false,
+ currentPreviewFile: null,
// 琛ㄥ崟鏁版嵁
form: {
id: undefined,
@@ -604,7 +646,11 @@
{ required: false, message: "蹇冩浜″師鍥犱笉鑳戒负绌�", trigger: "blur" }
],
heartdeathtime: [
- { required: false, message: "蹇冩浜℃椂闂翠笉鑳戒负绌�", trigger: "change" }
+ {
+ required: false,
+ message: "蹇冩浜″垽瀹氬畬鎴愭椂闂翠笉鑳戒负绌�",
+ trigger: "change"
+ }
],
heartdeathjudgedocto: [
{
@@ -637,12 +683,14 @@
{ value: "3", label: "鐭綔浼忔湡浣撴劅璇卞彂鐢典綅璇勪及琛�" },
{ value: "4", label: "缁忛澶氭櫘鍕掕秴澹拌瘎浼拌褰�" },
{ value: "5", label: "鍗仴濮旇剳鎹熶激璐ㄦ帶涓績 - 涓村簥缁煎悎璇勪及琛�" },
- { value: "6", label: "UW璇勫垎琛�" }
+ { value: "7", label: "AT鍓�" },
+ { value: "8", label: "AT鍚�" },
+ { value: "6", label: "UW璇勫垎琛�(鑴戞浜�)" }
],
// 蹇冩浜¤瘎浼拌〃绫诲瀷瀹氫箟
heartDeathAttachmentTypes: [
{ value: "heart_1", label: "蹇冩浜″垽瀹氳〃" },
- { value: "heart_2", label: "蹇冪數鍥捐瘎浼拌〃" }
+ { value: "heart_2", label: "UW璇勫垎琛�(蹇冩浜�)" }
],
// 闄勪欢鍒楄〃鏁版嵁
@@ -665,10 +713,13 @@
}
},
created() {
+ this.infoid = this.infoid;
this.caseId = this.infoid;
+
+ this.activeJudgmentType = this.$route.query.type;
// 浠庤矾鐢卞弬鏁拌幏鍙栭粯璁ゆ樉绀虹被鍨�
if (this.$route.query.judgmentType) {
- this.activeJudgmentType = this.$route.query.type;
+ this.activeJudgmentType = this.$route.query.judgmentType;
}
this.getDetail(this.infoid);
@@ -680,7 +731,32 @@
this.activeJudgmentType = tab.name;
// 鍙互鍦ㄨ繖閲屾坊鍔犲叾浠栧垏鎹㈤�昏緫
},
+ addBrainDoctor() {
+ this.brainExtraDoctors.push("");
+ },
+ removeBrainDoctor(index) {
+ this.brainExtraDoctors.splice(index, 1);
+ },
+ addHeartDoctor() {
+ this.heartExtraDoctors.push("");
+ },
+ removeHeartDoctor(index) {
+ this.heartExtraDoctors.splice(index, 1);
+ },
+ // 搴忓垪鍖栭澶栧尰鐢熷垪琛ㄤ负瀛楃涓诧紙鐢ㄤ腑鏂囬�楀彿鍒嗛殧锛�
+ serializeExtraDoctors(list) {
+ return list.filter(name => name && name.trim()).join("锛�");
+ },
+
+ // 浠庡瓧绗︿覆瑙f瀽鍑哄尰鐢熷垪琛紙鎸変腑鏂囬�楀彿鎷嗗垎锛�
+ parseExtraDoctors(str) {
+ if (!str) return [];
+ return str
+ .split("锛�")
+ .map(s => s.trim())
+ .filter(s => s);
+ },
// 鐢熸垚鎹愮尞鑰呯紪鍙�
generateDonorNo() {
const timestamp = Date.now().toString();
@@ -691,13 +767,8 @@
async getDetail(infoid) {
try {
const response = await queryDathInfoBaseInfo({ infoid });
- let realData = {};
- if (response && response.data) {
- realData = response.data[0];
- } else if (response) {
- realData = response;
- }
+ let realData = response?.data?.[0] || response || {};
// 鏄犲皠瀛楁鍒拌〃鍗�
this.form = {
@@ -716,7 +787,18 @@
if (realData.rememberAnnex) {
this.parseAttachmentData(realData.rememberAnnex, "brain");
}
-
+ if (realData.remark) {
+ const parts = realData.remark.split(" | ");
+ parts.forEach(part => {
+ if (part.includes("鑴戞浜″叾浠栧尰鐢燂細")) {
+ const doctorsStr = part.replace("鑴戞浜″叾浠栧尰鐢燂細", "");
+ this.brainExtraDoctors = this.parseExtraDoctors(doctorsStr);
+ } else if (part.includes("蹇冩浜″叾浠栧尰鐢燂細")) {
+ const doctorsStr = part.replace("蹇冩浜″叾浠栧尰鐢燂細", "");
+ this.heartExtraDoctors = this.parseExtraDoctors(doctorsStr);
+ }
+ });
+ }
// 瑙f瀽蹇冩浜¢檮浠朵俊鎭�
if (realData.heartdeathjudgeannex) {
this.parseAttachmentData(realData.heartdeathjudgeannex, "heart");
@@ -1023,30 +1105,63 @@
},
// 棰勮闄勪欢
- handlePreview(attachment) {
- if (attachment.fileName.endsWith(".pdf")) {
- window.open(attachment.fileUrl, "_blank");
- } else if (attachment.fileName.match(/\.(jpg|jpeg|png)$/i)) {
- this.$alert(
- `<img src="${attachment.fileUrl}" style="max-width: 100%;" alt="${attachment.fileName}">`,
- "鍥剧墖棰勮",
- {
- dangerouslyUseHTMLString: true,
- customClass: "image-preview-dialog"
- }
- );
- } else {
- this.$message.info("璇ユ枃浠剁被鍨嬫殏涓嶆敮鎸佸湪绾块瑙堬紝璇蜂笅杞藉悗鏌ョ湅");
- }
- },
+ handlePreview(file) {
+ console.log(file, "file");
+ this.currentPreviewFile = {
+ fileName: file.fileName,
+ fileUrl: file.path || file.fileUrl,
+ fileType: this.getFileType(file.fileName)
+ };
+ this.previewVisible = true;
+ // if (attachment.fileName.endsWith(".pdf")) {
+ // window.open(attachment.fileUrl, "_blank");
+ // } else if (attachment.fileName.match(/\.(jpg|jpeg|png)$/i)) {
+ // this.$alert(
+ // `<img src="${attachment.fileUrl}" style="max-width: 100%;" alt="${attachment.fileName}">`,
+ // "鍥剧墖棰勮",
+ // {
+ // dangerouslyUseHTMLString: true,
+ // customClass: "image-preview-dialog"
+ // }
+ // );
+ // } else {
+ // this.$message.info("璇ユ枃浠剁被鍨嬫殏涓嶆敮鎸佸湪绾块瑙堬紝璇蜂笅杞藉悗鏌ョ湅");
+ // }
+ },
+ getFileType(fileName) {
+ if (!fileName) return "other";
+
+ const extension = fileName
+ .split(".")
+ .pop()
+ .toLowerCase();
+ const imageTypes = ["jpg", "jpeg", "png", "gif", "bmp", "webp"];
+ const pdfTypes = ["pdf"];
+ const officeTypes = ["doc", "docx", "xls", "xlsx", "ppt", "pptx"];
+
+ if (imageTypes.includes(extension)) return "image";
+ if (pdfTypes.includes(extension)) return "pdf";
+ if (officeTypes.includes(extension)) return "office";
+ return "other";
+ },
// 涓嬭浇闄勪欢
- handleDownload(attachment) {
- const link = document.createElement("a");
- link.href = attachment.fileUrl;
- link.download = attachment.fileName;
- link.click();
- this.$message.success(`寮�濮嬩笅杞�: ${attachment.fileName}`);
+ handleDownload(file) {
+ const fileUrl = file.path || file.fileUrl;
+ const fileName = file.fileName;
+
+ if (fileUrl) {
+ const link = document.createElement("a");
+ link.href = fileUrl;
+ link.download = fileName;
+ link.style.display = "none";
+ document.body.appendChild(link);
+ link.click();
+ document.body.removeChild(link);
+ this.$message.success("寮�濮嬩笅杞芥枃浠�");
+ } else {
+ this.$message.warning("鏂囦欢璺緞涓嶅瓨鍦紝鏃犳硶涓嬭浇");
+ }
},
// 缂栬緫淇℃伅
@@ -1077,13 +1192,32 @@
this.saveLoading = true;
try {
+ // 鏋勫缓棰濆鍖荤敓瀛楃涓�
+ const brainExtraStr = this.serializeExtraDoctors(
+ this.brainExtraDoctors
+ );
+ const heartExtraStr = this.serializeExtraDoctors(
+ this.heartExtraDoctors
+ );
+
+ let remark = this.form.remark || "";
+ // 濡傛灉宸叉湁澶囨敞锛岀敤 ' | ' 鍒嗛殧锛涘惁鍒欑洿鎺ヨ祴鍊�
+ if (brainExtraStr) {
+ remark +=
+ (remark ? " | " : "") + "鑴戞浜″叾浠栧尰鐢燂細" + brainExtraStr;
+ }
+ if (heartExtraStr) {
+ remark +=
+ (remark ? " | " : "") + "蹇冩浜″叾浠栧尰鐢燂細" + heartExtraStr;
+ }
// 鏋勫缓鎻愪氦鏁版嵁
const submitData = {
...this.form,
infoid: this.infoid,
// 纭繚闄勪欢鏁版嵁鏈�鏂�
- rememberAnnex: this.buildBrainDeathAttachmentJson(),
- heartdeathjudgeannex: this.buildHeartDeathAttachmentJson()
+ rememberannex: this.buildBrainDeathAttachmentJson(),
+ heartdeathjudgeannex: this.buildHeartDeathAttachmentJson(),
+ remark: remark // 浣跨敤鍚堝苟鍚庣殑 remark
};
if (submitData.state == 1 || !submitData.state) {
submitData.state = 2;
diff --git a/src/views/business/course/components/DonationConfirmStage.vue b/src/views/business/course/components/DonationConfirmStage.vue
index 7d55c4d..2320f4c 100644
--- a/src/views/business/course/components/DonationConfirmStage.vue
+++ b/src/views/business/course/components/DonationConfirmStage.vue
@@ -79,10 +79,10 @@
</el-form-item>
</el-col>
<el-col :span="6">
- <el-form-item label="涓庢崘鐚�呭叧绯�" prop="signfamilyrelations">
+ <el-form-item label="涓庢崘璧犺�呭叧绯�" prop="signfamilyrelations">
<el-select
v-model="form.signfamilyrelations"
- placeholder="璇烽�夋嫨涓庢崘鐚�呭叧绯�"
+ placeholder="璇烽�夋嫨涓庢崘璧犺�呭叧绯�"
>
<el-option
v-for="dict in dict.type.sys_FamilyRelation || []"
@@ -110,7 +110,48 @@
</el-form-item>
</el-col>
</el-row>
+ <el-row style="margin-bottom: 10px;">
+ <!-- <el-button
+ type="primary"
+ size="mini"
+ icon="el-icon-plus"
+ @click="openOtherFamilyDialog()"
+ >
+ 娣诲姞鍏朵粬瀹跺睘
+ </el-button> -->
+ </el-row>
+ <el-table :data="otherFamilyList" size="small" border>
+ <el-table-column label="濮撳悕" prop="name" />
+ <el-table-column label="涓庢崘璧犺�呭叧绯�" prop="relation">
+ <template slot-scope="scope">
+ <dict-tag
+ :options="dict.type.sys_FamilyRelation"
+ :value="scope.row.relation"
+ />
+ </template>
+ </el-table-column>
+ <el-table-column label="鑱旂郴鐢佃瘽" prop="phone" />
+ <el-table-column label="鎿嶄綔" width="120" align="center">
+ <template slot-scope="scope">
+ <el-button
+ size="mini"
+ type="text"
+ @click="editOtherFamily(scope.$index)"
+ >
+ 缂栬緫
+ </el-button>
+ <el-button
+ size="mini"
+ type="text"
+ style="color:red"
+ @click="deleteOtherFamily(scope.$index)"
+ >
+ 鍒犻櫎
+ </el-button>
+ </template>
+ </el-table-column>
+ </el-table>
<el-row>
<el-form-item label-width="100px" label="鎹愮尞鍐冲畾">
<el-checkbox-group v-model="organdecision">
@@ -159,14 +200,14 @@
<div class="attachment-header">
<span class="upload-title">{{ type.label }}</span>
<el-tooltip content="鐐瑰嚮涓婁紶璇ョ被鍨嬮檮浠�" placement="top">
- <el-button
+ <!-- <el-button
size="mini"
type="primary"
icon="el-icon-plus"
@click="openUploadDialog(type.value)"
>
娣诲姞闄勪欢
- </el-button>
+ </el-button> -->
</el-tooltip>
</div>
@@ -243,7 +284,38 @@
</el-tab-pane>
</el-tabs>
</el-card>
+ <!-- 鍏朵粬瀹跺睘寮圭獥 -->
+ <el-dialog
+ :title="isEditOtherFamily ? '缂栬緫鍏朵粬瀹跺睘' : '娣诲姞鍏朵粬瀹跺睘'"
+ :visible.sync="otherFamilyDialogVisible"
+ width="400px"
+ >
+ <el-form :model="currentOtherFamily" label-width="100px">
+ <el-form-item label="濮撳悕" prop="name">
+ <el-input v-model="currentOtherFamily.name" />
+ </el-form-item>
+ <el-form-item label="鍏崇郴" prop="relation">
+ <el-select v-model="currentOtherFamily.relation" style="width:100%">
+ <el-option
+ v-for="dict in dict.type.sys_FamilyRelation"
+ :key="dict.value"
+ :label="dict.label"
+ :value="dict.value"
+ />
+ </el-select>
+ </el-form-item>
+
+ <el-form-item label="鐢佃瘽" prop="phone">
+ <el-input v-model="currentOtherFamily.phone" />
+ </el-form-item>
+ </el-form>
+
+ <span slot="footer">
+ <el-button @click="otherFamilyDialogVisible = false">鍙栨秷</el-button>
+ <el-button type="primary" @click="saveOtherFamily">纭畾</el-button>
+ </span>
+ </el-dialog>
<!-- 涓婁紶瀵硅瘽妗� -->
<el-dialog
:title="`涓婁紶${getCurrentTypeLabel}闄勪欢`"
@@ -255,14 +327,15 @@
ref="uploadRef"
class="upload-demo"
drag
- action="#"
+ :action="uploadAction"
+ :headers="headers"
multiple
:file-list="tempFileList"
:before-upload="beforeUpload"
:on-change="handleFileChange"
:on-remove="handleTempRemove"
+ :on-success="handleUploadSuccess"
:auto-upload="false"
- :http-request="handleHttpRequest"
>
<i class="el-icon-upload"></i>
<div class="el-upload__text">灏嗘枃浠舵嫋鍒版澶勶紝鎴�<em>鐐瑰嚮涓婁紶</em></div>
@@ -298,13 +371,15 @@
import { relativesList, relativesEdit, relativesAdd } from "@/api/businessApi";
import FilePreviewDialog from "@/components/FilePreviewDialog";
import CaseBasicInfo from "@/components/CaseBasicInfo";
+import { getToken } from "@/utils/auth";
+
export default {
name: "ConfirmationDetail",
components: {
FilePreviewDialog,
CaseBasicInfo
},
- props: {
+ props: {
infoid: {
type: String,
default: true
@@ -337,21 +412,39 @@
relativeidcardno: "",
relativephone: "",
relativeRemark: "",
- assessannex: "" // JSON瀛楃涓插瓨鍌ㄦ墍鏈夐檮浠�
+ assessannex: "", // JSON瀛楃涓插瓨鍌ㄦ墍鏈夐檮浠�
+ otherFamilyMembers: "" // 鉁� 鏂板
},
+ uploadAction: process.env.VUE_APP_BASE_API + "/common/upload",
+ headers: {
+ Authorization: "Bearer " + getToken()
+ },
+ // 鍏朵粬瀹跺睘琛ㄦ牸鏁版嵁
+ otherFamilyList: [],
+
+ // 褰撳墠缂栬緫鐨勫叾浠栧灞烇紙寮圭獥鐢級
+ currentOtherFamily: {
+ name: "",
+ relation: "",
+ phone: ""
+ },
+
+ // 鏄惁缂栬緫妯″紡锛堝叾浠栧灞烇級
+ isEditOtherFamily: false,
+ editOtherFamilyIndex: -1,
+
+ // 鍏朵粬瀹跺睘寮圭獥
+ otherFamilyDialogVisible: false,
organdecision: [],
organdecisionOther: "",
organselection: [
"鑲濊剰",
- "鍙岃偩",
- "宸﹁偩",
- "鍙宠偩",
+ "鑲捐剰",
"蹇冭剰",
"鑲鸿剰",
"鑳拌吅",
"灏忚偁",
- "鍙岀溂缁勭粐",
- "閬椾綋",
+ "鐪艰鑶�",
"鍏朵粬"
],
// 鍔犺浇鐘舵��
@@ -399,7 +492,7 @@
},
created() {
this.caseId = this.infoid;
- this.isEdit = this.$route.query.confirm === "true";
+
if (this.infoid) {
this.getDetail(this.infoid);
}
@@ -442,7 +535,17 @@
} else {
detailData = response;
}
-
+ // 澶勭悊鍏朵粬瀹跺睘鏁版嵁
+ if (detailData.otherFamilyMembers) {
+ try {
+ this.otherFamilyList =
+ typeof detailData.otherFamilyMembers === "string"
+ ? JSON.parse(detailData.otherFamilyMembers)
+ : detailData.otherFamilyMembers || [];
+ } catch (e) {
+ this.otherFamilyList = [];
+ }
+ }
// 鏄犲皠瀛楁鍒拌〃鍗�
this.form = {
...this.form,
@@ -574,55 +677,40 @@
this.tempFileList = fileList;
},
- // 鑷畾涔変笂浼犺姹�
- handleHttpRequest(options) {
- return new Promise((resolve, reject) => {
- this.uploadLoading = true;
+ handleUploadSuccess(response, file) {
+ if (response.code !== 200) {
+ this.$message.error(response.msg || "涓婁紶澶辫触");
+ return;
+ }
- // 妯℃嫙涓婁紶杩囩▼
- setTimeout(() => {
- const newAttachment = {
- id: Date.now(),
- fileName: options.file.name,
- fileUrl: URL.createObjectURL(options.file),
- fileSize: options.file.size,
- fileType: this.getFileExtension(options.file.name),
- type: this.currentUploadType, // 璁板綍闄勪欢绫诲瀷
- uploadTime: new Date().toISOString(),
- uploader: "褰撳墠鐢ㄦ埛"
- };
+ const newAttachment = {
+ id: Date.now(),
+ fileName: file.name,
+ fileUrl: response.url,
+ fileSize: file.size,
+ fileType: this.getFileExtension(file.name),
+ type: this.currentUploadType,
+ uploadTime: this.getCurrentTime(),
+ uploader: "褰撳墠鐢ㄦ埛"
+ };
- // 娣诲姞鍒板搴旂被鍨嬬殑闄勪欢鍒楄〃
- if (this.attachmentData[this.currentUploadType]) {
- this.attachmentData[this.currentUploadType].push(newAttachment);
- }
+ this.attachmentData[this.currentUploadType].push(newAttachment);
+ this.updateAssessannexField();
- this.uploadLoading = false;
- this.updateAssessannexField(); // 鏇存柊瀛樺偍瀛楁
- resolve({ code: 200, data: newAttachment });
- }, 1500);
- });
+ this.$message.success("涓婁紶鎴愬姛");
+ this.uploadLoading = false;
+ this.uploadDialogVisible = false;
+ this.tempFileList = [];
},
- // 鎻愪氦涓婁紶
- async submitUpload() {
+ submitUpload() {
if (this.tempFileList.length === 0) {
this.$message.warning("璇峰厛閫夋嫨瑕佷笂浼犵殑鏂囦欢");
return;
}
- try {
- for (const file of this.tempFileList) {
- await this.$refs.uploadRef.submit();
- }
-
- this.$message.success("鏂囦欢涓婁紶鎴愬姛");
- this.uploadDialogVisible = false;
- this.tempFileList = [];
- } catch (error) {
- this.$message.error("鏂囦欢涓婁紶澶辫触");
- console.error("涓婁紶澶辫触:", error);
- }
+ this.uploadLoading = true;
+ this.$refs.uploadRef.submit(); // 鉁� 鍙皟鐢ㄤ竴娆�
},
// 鍒犻櫎闄勪欢
@@ -641,7 +729,51 @@
})
.catch(() => {});
},
+ openOtherFamilyDialog(index) {
+ this.isEditOtherFamily = typeof index === "number";
+ this.editOtherFamilyIndex = index || -1;
+ this.currentOtherFamily = this.isEditOtherFamily
+ ? { ...this.otherFamilyList[index] }
+ : { name: "", relation: "", phone: "" };
+
+ this.otherFamilyDialogVisible = true;
+ },
+ editOtherFamily(index) {
+ this.openOtherFamilyDialog(index);
+ },
+ deleteOtherFamily(index) {
+ this.$confirm("纭鍒犻櫎璇ュ灞烇紵", "鎻愮ず", { type: "warning" }).then(
+ () => {
+ this.otherFamilyList.splice(index, 1);
+ this.updateOtherFamilyField();
+ }
+ );
+ },
+ saveOtherFamily() {
+ if (
+ !this.currentOtherFamily.name ||
+ !this.currentOtherFamily.relation ||
+ !this.currentOtherFamily.phone
+ ) {
+ this.$message.warning("璇峰~鍐欏畬鏁翠俊鎭�");
+ return;
+ }
+
+ if (this.isEditOtherFamily) {
+ this.otherFamilyList.splice(this.editOtherFamilyIndex, 1, {
+ ...this.currentOtherFamily
+ });
+ } else {
+ this.otherFamilyList.push({ ...this.currentOtherFamily });
+ }
+
+ this.updateOtherFamilyField();
+ this.otherFamilyDialogVisible = false;
+ },
+ updateOtherFamilyField() {
+ this.form.otherFamilyMembers = JSON.stringify(this.otherFamilyList);
+ },
// 鏇存柊assessannex瀛樺偍瀛楁
updateAssessannexField() {
// 灏嗘墍鏈夌被鍨嬬殑闄勪欢鍚堝苟涓轰竴涓暟缁�
@@ -772,9 +904,8 @@
await this.$refs.form.validate();
this.saveLoading = true;
- // 纭繚闄勪欢鏁版嵁鏄渶鏂扮殑
+ this.updateOtherFamilyField();
this.updateAssessannexField();
-
const saveData = {
...this.form,
infoid: this.infoid,
diff --git a/src/views/business/course/components/DonorMaintenanceStage.vue b/src/views/business/course/components/DonorMaintenanceStage.vue
index f30f888..75e2721 100644
--- a/src/views/business/course/components/DonorMaintenanceStage.vue
+++ b/src/views/business/course/components/DonorMaintenanceStage.vue
@@ -23,10 +23,54 @@
/>
<el-table-column label="鍩瑰吇缁撴灉" align="center" prop="result">
<template slot-scope="scope">
- <el-tag
- :type="scope.row.result === '闃存��' ? 'success' : 'danger'"
- effect="plain"
+ <!-- 闃虫�х粨鏋滃甫鎮诞鎻愮ず -->
+ <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
+ v-else-if="
+ scope.row.result === '闃虫��' && !scope.row.positiveDetails
+ "
+ type="danger"
+ effect="plain"
+ @click="handleResultClick(scope.row)"
+ style="cursor: pointer;"
+ >
+ {{ scope.row.result }}
+ </el-tag>
+
+ <!-- 闃存�х粨鏋� -->
+ <el-tag v-else type="success" effect="plain">
{{ scope.row.result }}
</el-tag>
</template>
diff --git a/src/views/business/course/components/EthicalReviewStage.vue b/src/views/business/course/components/EthicalReviewStage.vue
index 3192819..2d4b6ce 100644
--- a/src/views/business/course/components/EthicalReviewStage.vue
+++ b/src/views/business/course/components/EthicalReviewStage.vue
@@ -1,6 +1,5 @@
<template>
<div class="ethics-review-detail">
-
<el-card class="detail-card">
<!-- 浼︾悊瀹℃煡鍩烘湰淇℃伅 -->
<div slot="header" class="clearfix">
@@ -775,7 +774,7 @@
name: "EthicsReviewDetail",
components: { CaseBasicInfo, UploadAttachment, FilePreviewDialog },
dicts: ["sys_user_sex", "sys_ethical", "Review_status"],
- props: {
+ props: {
infoid: {
type: String,
default: true
@@ -1081,7 +1080,6 @@
}
},
created() {
-
this.caseId = this.infoid;
this.getDetail(this.infoid, this.id);
},
@@ -1409,9 +1407,9 @@
if (valid) {
this.saveLoading = true;
// 淇濆瓨娓呯┖id渚夸簬鍚庣鏁翠綋鍒犻櫎鏂板
- this.form.ethicalreviewopinionsList.forEach(item=>{
- item.id=null
- })
+ this.form.ethicalreviewopinionsList.forEach(item => {
+ item.id = null;
+ });
try {
const submitData = {
...this.form,
diff --git a/src/views/business/course/components/MedicalAssessmentStage.vue b/src/views/business/course/components/MedicalAssessmentStage.vue
index c579876..3a4c17d 100644
--- a/src/views/business/course/components/MedicalAssessmentStage.vue
+++ b/src/views/business/course/components/MedicalAssessmentStage.vue
@@ -5,88 +5,43 @@
<el-card class="organ-assessment-card">
<div slot="header" class="clearfix">
<span>鍣ㄥ畼璇勪及琛�</span>
-
- <span v-if="!isCoordinator" class="jstitle">
- 褰撳墠瑙掕壊锛歿{ currentDepartment }}璇勪及浜哄憳
- </span>
</div>
<!-- 鎹愮尞鍐冲畾琛ㄥ崟 -->
<el-form>
<el-form-item label-width="100px" label="鎹愮尞鍐冲畾">
- <el-checkbox-group
- v-model="organdecisionValues"
- @change="handleOrganDecisionChange"
- :disabled="!isEdit"
- >
- <el-checkbox
- v-for="dict in dict.type.sys_Organ"
- :key="dict.value"
- :label="dict.value"
- >{{ dict.label }}
+ <el-checkbox-group v-model="organdecisionValues" @change="handleOrganDecisionChange" :disabled="!isEdit">
+ <el-checkbox v-for="dict in dict.type.sys_Organ" :key="dict.value" :label="dict.value">{{ dict.label }}
</el-checkbox>
</el-checkbox-group>
- <el-input
- v-if="showOtherInput"
- v-model="organdecisionOther"
- placeholder="璇疯緭鍏ュ叾浠栨崘鐚喅瀹氱殑鍏蜂綋鍐呭"
- style="margin-top: 10px; width: 300px;"
- :readonly="!isEdit"
- @input="handleOtherDecisionInput"
- ></el-input>
+ <el-input v-if="showOtherInput" v-model="organdecisionOther" placeholder="璇疯緭鍏ュ叾浠栨崘鐚喅瀹氱殑鍏蜂綋鍐呭"
+ style="margin-top: 10px; width: 300px;" :readonly="!isEdit" @input="handleOtherDecisionInput"></el-input>
</el-form-item>
</el-form>
<!-- 鍣ㄥ畼璇勪及琛ㄦ牸 -->
- <el-table
- :data="filteredOrganAssessmentList"
- v-loading="assessmentLoading"
- style="width: 100%"
- :row-class-name="getRowClassName"
- :expand-row-keys="expandedRowKeys"
- @expand-change="handleExpandChange"
- row-key="organno"
- empty-text="褰撳墠鎹愮尞鍐冲畾涓嬫殏鏃犻渶瑕佽瘎浼扮殑鍣ㄥ畼"
- >
+ <el-table :data="filteredOrganAssessmentList" v-loading="assessmentLoading" style="width: 100%"
+ :row-class-name="getRowClassName" :expand-row-keys="expandedRowKeys" @expand-change="handleExpandChange"
+ row-key="organno" empty-text="褰撳墠鎹愮尞鍐冲畾涓嬫殏鏃犻渶瑕佽瘎浼扮殑鍣ㄥ畼">
<el-table-column type="expand">
<template slot-scope="scope">
<div class="organ-expand-content" v-if="scope.row.expanded">
- <el-tabs
- v-model="scope.row.activeTab"
- type="card"
- class="organ-detail-tabs"
- @tab-click="handleTabClick(scope.row, $event)"
- >
+ <el-tabs v-model="scope.row.activeTab" type="card" class="organ-detail-tabs"
+ @tab-click="handleTabClick(scope.row, $event)">
<!-- 鍔ㄦ�佺敓鎴愯瘎浼癟ab -->
- <el-tab-pane
- v-for="(assessment, index) in getOrganAssessments(scope.row)"
- :key="`${scope.row.organno}_${index}`"
- :label="`绗�${index + 1}娆¤瘎浼癭"
- :name="String(index)"
- >
- <organ-assessment-form
- :organ-data="scope.row"
- :assessment-index="index"
- :readonly="!canAssessOrgan(scope.row)"
- :current-user="currentUser"
- @update-assessment="handleUpdateAssessment"
- @delete-assessment="handleDeleteAssessment"
- @save-assessment="handleSaveAssessment"
- />
+ <el-tab-pane v-for="(assessment, index) in getOrganAssessments(scope.row)"
+ :key="`${scope.row.organno}_${index}`" :label="`绗�${index + 1}娆¤瘎浼癭" :name="String(index)">
+ <organ-assessment-form :organ-data="scope.row" :assessment-index="index"
+ :readonly="!canAssessOrgan(scope.row)" :current-user="currentUser"
+ @update-assessment="handleUpdateAssessment" @delete-assessment="handleDeleteAssessment"
+ @save-assessment="handleSaveAssessment" />
</el-tab-pane>
<!-- 娣诲姞璇勪及鎸夐挳 -->
- <el-tab-pane
- name="add"
- v-if="canAssessOrgan(scope.row) && isEdit"
- >
+ <el-tab-pane name="add" v-if="canAssessOrgan(scope.row) && isEdit">
<template slot="label">
- <el-button
- type="text"
- icon="el-icon-plus"
- @click.stop="handleAddNewAssessment(scope.row)"
- size="mini"
- >
+ <el-button type="text" icon="el-icon-plus" @click.stop="handleAddNewAssessment(scope.row)"
+ size="mini">
鏂板璇勪及
</el-button>
</template>
@@ -103,12 +58,12 @@
<el-descriptions-item label="鍣ㄥ畼绫诲瀷">
<span class="summary-item">{{
getOrganLabel(scope.row.organno)
- }}</span>
+ }}</span>
</el-descriptions-item>
<el-descriptions-item label="鑾峰彇鏈烘瀯">
<span class="summary-item">{{
scope.row.gainhospitalname
- }}</span>
+ }}</span>
</el-descriptions-item>
<el-descriptions-item label="璇勪及娆℃暟" :span="2">
<el-tag type="info" size="medium">
@@ -118,57 +73,36 @@
<el-descriptions-item label="鏈�鏂拌瘎浼版椂闂�" :span="2">
<span class="highlight-text">{{
getLatestAssessmentTime(scope.row) || "-"
- }}</span>
+ }}</span>
</el-descriptions-item>
</el-descriptions>
<!-- 璇勪及璇︽儏姹囨�� -->
- <el-card
- header="璇勪及璇︽儏鍒楄〃"
- style="margin-top: 20px;"
- class="assessment-detail-card"
- >
- <div
- v-if="getOrganAssessments(scope.row).length == 0"
- class="no-assessment"
- >
+ <el-card header="璇勪及璇︽儏鍒楄〃" style="margin-top: 20px;" class="assessment-detail-card">
+ <div v-if="getOrganAssessments(scope.row).length == 0" class="no-assessment">
<el-empty description="鏆傛棤璇勪及璁板綍"></el-empty>
</div>
<div v-else>
<!-- 姣忔璇勪及璇︽儏 -->
- <div
- v-for="(assessment, index) in getOrganAssessments(
- scope.row
- )"
- :key="index"
- class="assessment-item"
- >
+ <div v-for="(assessment, index) in getOrganAssessments(
+ scope.row
+ )" :key="index" class="assessment-item">
<el-card shadow="hover" class="assessment-card">
<div slot="header" class="clearfix">
- <span class="assessment-title"
- >绗瑊{ index + 1 }}娆¤瘎浼�</span
- >
- <el-tag
- :type="getAssessmentTagType(assessment.status)"
- size="small"
- class="status-tag"
- >
+ <span class="assessment-title">绗瑊{ index + 1 }}娆¤瘎浼�</span>
+ <el-tag :type="getAssessmentTagType(assessment.status)" size="small" class="status-tag">
{{ getAssessmentStatusText(assessment.status) }}
</el-tag>
</div>
- <el-descriptions
- :column="2"
- border
- class="detail-descriptions"
- >
+ <el-descriptions :column="2" border class="detail-descriptions">
<!-- 璇勪及鏃堕棿 -->
<el-descriptions-item label="璇勪及鏃堕棿" :span="2">
<span class="time-text">
{{
parseTime(assessment.assessmentTime) ||
- "鏈缃�"
+ "鏈缃�"
}}
</span>
</el-descriptions-item>
@@ -182,14 +116,10 @@
<!-- 鍔熻兘鐘舵�� -->
<el-descriptions-item label="鍔熻兘鐘舵��">
- <el-tag
- :type="
- getFunctionStatusTagType(
- assessment.functionStatus
- )
- "
- size="small"
- >
+ <el-tag :type="getFunctionStatusTagType(
+ assessment.functionStatus
+ )
+ " size="small">
{{
getFunctionStatusText(
assessment.functionStatus
@@ -203,34 +133,25 @@
<div class="opinion-content">
{{
assessment.assessmentOpinion ||
- "鏆傛棤璇勪及鎰忚"
+ "鏆傛棤璇勪及鎰忚"
}}
</div>
</el-descriptions-item>
<!-- 闄勪欢鏁伴噺 -->
- <el-descriptions-item
- label="闄勪欢鏁伴噺"
- :span="2"
- v-if="
- assessment.attachments &&
- assessment.attachments.length > 0
- "
- >
+ <el-descriptions-item label="闄勪欢鏁伴噺" :span="2" v-if="
+ assessment.attachments &&
+ assessment.attachments.length > 0
+ ">
<el-tag type="success" size="small">
{{ assessment.attachments.length }}涓�
</el-tag>
- <el-button
- type="text"
- size="mini"
- @click="
- showAttachmentList(
- assessment.attachments,
- index + 1
- )
- "
- style="margin-left: 10px;"
- >
+ <el-button type="text" size="mini" @click="
+ showAttachmentList(
+ assessment.attachments,
+ index + 1
+ )
+ " style="margin-left: 10px;">
鏌ョ湅闄勪欢鍒楄〃
</el-button>
</el-descriptions-item>
@@ -241,57 +162,37 @@
</el-card>
<!-- 鍣ㄥ畼鍩烘湰淇℃伅鍗$墖 -->
- <el-card
- header="鍣ㄥ畼淇℃伅"
- style="margin-top: 20px;"
- class="organ-info-card"
- >
+ <el-card header="鍣ㄥ畼淇℃伅" style="margin-top: 20px;" class="organ-info-card">
<el-descriptions :column="2" border>
<el-descriptions-item label="鑾峰彇鍓嶆椿妫�">
- <el-tag
- :type="
- scope.row.isbiopsybefore == '1'
- ? 'success'
- : 'info'
- "
- size="small"
- >
+ <el-tag :type="scope.row.isbiopsybefore == '1'
+ ? 'success'
+ : 'info'
+ " size="small">
{{ scope.row.isbiopsybefore == "1" ? "鏄�" : "鍚�" }}
</el-tag>
</el-descriptions-item>
<el-descriptions-item label="鑾峰彇鍚庢椿妫�">
- <el-tag
- :type="
- scope.row.isbiopsyafter == '1'
- ? 'success'
- : 'info'
- "
- size="small"
- >
+ <el-tag :type="scope.row.isbiopsyafter == '1'
+ ? 'success'
+ : 'info'
+ " size="small">
{{ scope.row.isbiopsyafter == "1" ? "鏄�" : "鍚�" }}
</el-tag>
</el-descriptions-item>
<el-descriptions-item label="杈圭紭鍣ㄥ畼">
- <el-tag
- :type="
- scope.row.ismarginalorgan == '1'
- ? 'warning'
- : 'info'
- "
- size="small"
- >
+ <el-tag :type="scope.row.ismarginalorgan == '1'
+ ? 'warning'
+ : 'info'
+ " size="small">
{{ scope.row.ismarginalorgan == "1" ? "鏄�" : "鍚�" }}
</el-tag>
</el-descriptions-item>
<el-descriptions-item label="鐥呭師鑿岄槼鎬�">
- <el-tag
- :type="
- scope.row.ispathogenpositive == '1'
- ? 'danger'
- : 'info'
- "
- size="small"
- >
+ <el-tag :type="scope.row.ispathogenpositive == '1'
+ ? 'danger'
+ : 'info'
+ " size="small">
{{
scope.row.ispathogenpositive == "1" ? "鏄�" : "鍚�"
}}
@@ -318,31 +219,16 @@
</template>
</el-table-column>
- <el-table-column
- label="鑾峰彇鏈烘瀯"
- align="center"
- prop="gainhospitalname"
- show-overflow-tooltip
- />
+ <el-table-column label="鑾峰彇鏈烘瀯" align="center" prop="gainhospitalname" show-overflow-tooltip />
<!-- 鍔ㄦ�佹樉绀鸿瘎浼扮姸鎬佸垪 -->
- <el-table-column
- v-for="index in getMaxAssessmentCount()"
- :key="index"
- :label="`绗�${index}娆¤瘎浼癭"
- align="center"
- width="120"
- >
+ <el-table-column v-for="index in getMaxAssessmentCount()" :key="index" :label="`绗�${index}娆¤瘎浼癭" align="center"
+ width="120">
<template slot-scope="scope">
- <el-tag
- v-if="getOrganAssessments(scope.row)[index - 1]"
- :type="
- getAssessmentTagType(
- getOrganAssessments(scope.row)[index - 1].status
- )
- "
- size="small"
- >
+ <el-tag v-if="getOrganAssessments(scope.row)[index - 1]" :type="getAssessmentTagType(
+ getOrganAssessments(scope.row)[index - 1].status
+ )
+ " size="small">
{{
getAssessmentStatusText(
getOrganAssessments(scope.row)[index - 1].status
@@ -355,51 +241,31 @@
<el-table-column label="鏁翠綋鐘舵��" align="center" width="100">
<template slot-scope="scope">
- <el-tag
- :type="
- getOrganOverallStatus(scope.row) == 'completed'
- ? 'success'
- : getOrganOverallStatus(scope.row) == 'assessing'
+ <el-tag :type="getOrganOverallStatus(scope.row) == 'completed'
+ ? 'success'
+ : getOrganOverallStatus(scope.row) == 'assessing'
? 'primary'
: 'warning'
- "
- size="small"
- >
+ " size="small">
{{ getOrganOverallStatusText(scope.row) }}
</el-tag>
</template>
</el-table-column>
- <el-table-column
- label="鎿嶄綔"
- align="center"
- width="150"
- class-name="small-padding fixed-width"
- >
+ <el-table-column label="鎿嶄綔" align="center" width="150" class-name="small-padding fixed-width">
<template slot-scope="scope">
- <el-button
- v-if="canAssessOrgan(scope.row) && isEdit"
- size="mini"
- type="text"
- @click="handleToggleExpand(scope.row)"
- >
+ <el-button v-if="canAssessOrgan(scope.row) && isEdit" size="mini" type="text"
+ @click="handleToggleExpand(scope.row)">
{{
expandedRowKeys.includes(scope.row.organno) ? "鏀惰捣" : "璇︽儏"
}}
</el-button>
- <el-button
- v-else-if="!isEdit"
- size="mini"
- type="text"
- @click="handleToggleExpand(scope.row)"
- >
+ <el-button v-else-if="!isEdit" size="mini" type="text" @click="handleToggleExpand(scope.row)">
{{
expandedRowKeys.includes(scope.row.organno) ? "鏀惰捣" : "鏌ョ湅"
}}
</el-button>
- <el-button v-else size="mini" type="text" disabled
- >鏃犳潈闄�</el-button
- >
+ <el-button v-else size="mini" type="text" disabled>鏃犳潈闄�</el-button>
</template>
</el-table-column>
</el-table>
@@ -407,18 +273,12 @@
<!-- 鏁翠綋淇濆瓨鎸夐挳 -->
<div class="footer-actions" v-if="isEdit">
- <el-button type="primary" @click="handleSaveAll" :loading="saveLoading"
- >淇濆瓨璇勪及琛�</el-button
- >
- <el-button @click="handleCancel">鍙栨秷</el-button>
+ <el-button type="primary" @click="handleSaveAll" :loading="saveLoading">淇濆瓨璇勪及琛�</el-button>
+ <el-button type="success" @click="accomplish" :loading="saveLoading">璇勪及瀹屾垚</el-button>
</div>
<!-- 鏂囦欢棰勮寮圭獥 -->
- <FilePreviewDialog
- :visible="attachmentVisible"
- :file="currentPreviewFile"
- @close="attachmentVisible = false"
- />
+ <FilePreviewDialog :visible="attachmentVisible" :file="currentPreviewFile" @close="attachmentVisible = false" />
</div>
</template>
@@ -436,7 +296,7 @@
name: "AssessmentDetail",
components: { OrganAssessmentForm, FilePreviewDialog, CaseBasicInfo },
dicts: ["sys_user_sex", "sys_Organ", "sys_0_1"],
- props: {
+ props: {
infoid: {
type: String,
default: true
@@ -557,9 +417,9 @@
}
},
created() {
+
this.caseId = this.infoid;
- this.assessmentId = this.$route.query.id;
- this.isEdit = this.$route.query.assess == "true";
+ this.isEdit = true;
this.getAssessmentDetail();
},
methods: {
@@ -614,8 +474,8 @@
<h4>绗�${assessmentNumber}娆¤瘎浼伴檮浠跺垪琛�</h4>
<ul style="list-style: none; padding-left: 0;">
${attachments
- .map(
- (item, index) => `
+ .map(
+ (item, index) => `
<li style="margin: 5px 0; padding: 5px; background: #f5f7fa; border-radius: 4px;">
<i class="el-icon-document"></i>
<span style="margin-left: 8px;">${item.fileName}</span>
@@ -629,8 +489,8 @@
</el-button>
</li>
`
- )
- .join("")}
+ )
+ .join("")}
</ul>
</div>`,
"闄勪欢鍒楄〃",
@@ -684,7 +544,19 @@
this.$forceUpdate();
}
},
+ accomplish() {
+ this.$confirm("鏄惁瀹屾垚璇ユ渚嬪櫒瀹樿瘎浼版楠わ紵", "鎻愰啋", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning"
+ })
+ .then(() => {
+ this.form.assessState = 3;
+ this.handleSaveAll();
+ })
+ .catch(() => { });
+ },
// 鏁翠綋淇濆瓨鏂规硶
async handleSaveAll() {
this.saveLoading = true;
@@ -729,7 +601,9 @@
})
)
};
-
+ if (saveData.assessState == 1 || !saveData.assessState) {
+ saveData.assessState = 2;
+ }
const saveMethod = this.assessmentData.id ? assessedit : assessAdd;
const response = await saveMethod(saveData);
@@ -738,6 +612,7 @@
if (!this.assessmentData.id && response.data) {
this.assessmentData.id = response.data;
}
+ this.getAssessmentDetail()
this.refreshKey += 1; // 瑙﹀彂閲嶆柊娓叉煋
} else {
this.$message.error("淇濆瓨澶辫触锛�" + (response.msg || "鏈煡閿欒"));
@@ -853,8 +728,7 @@
// 鏄剧ず鍒涘缓鎻愮ず
if (organsToCreate.length > 0) {
this.$message.success(
- `宸蹭负銆�${this.getOrganLabel(decision)}銆戝垱寤�${
- organsToCreate.length
+ `宸蹭负銆�${this.getOrganLabel(decision)}銆戝垱寤�${organsToCreate.length
}涓瘎浼伴」`
);
}
@@ -976,7 +850,7 @@
detailData = response;
}
this.assessmentData = {
- id: detailData.id || this.assessmentId,
+ id: detailData.id ,
infoid: detailData.infoid || this.infoid,
caseNo: detailData.caseNo || "",
name: detailData.name || detailData.donorName || "",
@@ -1037,8 +911,8 @@
const activeTab = this.activeTabMap.has(organno)
? String(this.activeTabMap.get(organno))
: assessments.length > 0
- ? "0"
- : "summary";
+ ? "0"
+ : "summary";
return {
...organ,
@@ -1340,32 +1214,25 @@
}
},
- handleCompleteAssessment() {
- this.$confirm("鏄惁瀹屾垚璇ユ渚嬫墍鏈夊櫒瀹樼殑璇勪及锛�", "鎻愰啋", {
- confirmButtonText: "纭畾",
- cancelButtonText: "鍙栨秷",
- type: "warning"
- })
- .then(() => {
- this.assessmentData.assessState = 3;
- this.saveAssessment();
- })
-
- .catch(() => {});
- },
-
- // 淇濆瓨璇勪及
- async saveAssessment() {
+ // 瀹屾垚璇勪及
+ async handleCompleteAssessment() {
try {
+ await this.$confirm(
+ "纭瀹屾垚鎵�鏈夊櫒瀹樿瘎浼板悧锛熷畬鎴愬悗灏嗘棤娉曚慨鏀�",
+ "纭鎿嶄綔",
+ {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning"
+ }
+ );
+
const updateData = {
- ...this.assessmentData
+ ...this.assessmentData,
+ assessState: "3",
+ assessTime: new Date().toISOString()
};
- if (
- this.assessmentData.assessState == 1 ||
- !this.assessmentData.assessState
- ) {
- this.assessmentData.assessState = 2;
- }
+
const response = await assessedit(updateData);
if (response.code == 200) {
@@ -1586,7 +1453,7 @@
background-color: #fafafa;
}
-::v-deep .el-table--enable-row-hover .el-table__body tr:hover > td {
+::v-deep .el-table--enable-row-hover .el-table__body tr:hover>td {
background-color: #ecf5ff;
}
@@ -1664,7 +1531,7 @@
background-color: #e4e7ed;
}
-::v-deep .el-tabs--card > .el-tabs__header .el-tabs__item.is-active {
+::v-deep .el-tabs--card>.el-tabs__header .el-tabs__item.is-active {
background-color: #fff;
border-bottom-color: #fff;
}
diff --git a/src/views/business/course/components/OrganAllocationStage.vue b/src/views/business/course/components/OrganAllocationStage.vue
index 72caae8..4046433 100644
--- a/src/views/business/course/components/OrganAllocationStage.vue
+++ b/src/views/business/course/components/OrganAllocationStage.vue
@@ -38,18 +38,8 @@
<el-row :gutter="20">
<el-col :span="12">
- <el-form-item label="鐧昏浜�" prop="registrationName">
+ <el-form-item label="璐熻矗浜�" prop="registrationName">
<el-input v-model="form.registrationName" />
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="鐧昏鏃堕棿" prop="registrationTime">
- <el-date-picker
- v-model="form.registrationTime"
- type="datetime"
- value-format="yyyy-MM-dd HH:mm:ss"
- style="width: 100%"
- />
</el-form-item>
</el-col>
</el-row>
@@ -61,23 +51,10 @@
<div slot="header" class="clearfix">
<span class="detail-title">鍣ㄥ畼鍒嗛厤璁板綍</span>
<div style="float: right;">
- <el-tag
- :type="
- form.allocationStatus == '1'
- ? 'success'
- : form.allocationStatus == '2'
- ? 'danger'
- : 'warning'
- "
- >
- {{
- form.allocationStatus == "1"
- ? "宸插垎閰�"
- : form.allocationStatus == "2"
- ? "浣滃簾"
- : "鏈垎閰�"
- }}
- </el-tag>
+ <dict-tag
+ :options="dict.type.organ_allocation_status"
+ :value="form.allocationStatus"
+ />
</div>
</div>
@@ -108,6 +85,7 @@
v-model="otherOrganInput"
placeholder="璇疯緭鍏ュ叾浠栧櫒瀹樺悕绉�"
style="margin-top: 10px; width: 300px;"
+ :disabled="form.allocationStatus == '1'"
/>
</el-form-item>
</el-col>
@@ -117,12 +95,39 @@
<el-col>
<el-form-item>
<el-table
- :data="allocationData.serviceDonateorganList"
+ :data="displayOrgans"
v-loading="loading"
border
style="width: 100%"
:row-class-name="getOrganRowClassName"
>
+ <el-table-column
+ label="搴忓彿"
+ type="index"
+ width="60"
+ align="center"
+ fixed
+ ></el-table-column>
+
+ <el-table-column
+ label="鍒嗛厤鐘舵��"
+ align="center"
+ width="100"
+ prop="allocationstatus"
+ fixed
+ >
+ <template slot-scope="scope">
+ <el-tag
+ :type="
+ getAllocationStatusTagType(scope.row.allocationstatus)
+ "
+ size="small"
+ >
+ {{ getAllocationStatusText(scope.row.allocationstatus) }}
+ </el-tag>
+ </template>
+ </el-table-column>
+
<el-table-column
label="鍣ㄥ畼鍚嶇О"
align="center"
@@ -138,7 +143,7 @@
</template>
</el-table-column>
- <el-table-column
+ <!-- <el-table-column
label="鍒嗛厤绯荤粺缂栧彿"
align="center"
width="150"
@@ -148,13 +153,16 @@
<el-input
v-model="scope.row.caseno"
placeholder="鍒嗛厤绯荤粺缂栧彿"
- :disabled="form.allocationStatus == '1'"
+ :disabled="
+ form.allocationStatus == '1' ||
+ scope.row.allocationstatus == '3'
+ "
/>
</template>
- </el-table-column>
+ </el-table-column> -->
<el-table-column
- label="鍒嗛厤鎺ユ敹鏃堕棿"
+ label="鍒嗛厤寮�濮嬫椂闂�"
align="center"
width="180"
prop="applicanttime"
@@ -167,8 +175,33 @@
v-model="scope.row.applicanttime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
+ placeholder="閫夋嫨寮�濮嬫帴鏀舵椂闂�"
+ :disabled="
+ form.allocationStatus == '1' ||
+ scope.row.allocationstatus == '3'
+ "
+ />
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="鍒嗛厤鎺ユ敹鏃堕棿"
+ align="center"
+ width="180"
+ prop="organgettime"
+ >
+ <template slot-scope="scope">
+ <el-date-picker
+ clearable
+ size="small"
+ style="width: 100%"
+ v-model="scope.row.organgettime"
+ type="datetime"
+ value-format="yyyy-MM-dd HH:mm:ss"
placeholder="閫夋嫨鍒嗛厤鎺ユ敹鏃堕棿"
- :disabled="form.allocationStatus == '1'"
+ :disabled="
+ form.allocationStatus == '1' ||
+ scope.row.allocationstatus == '3'
+ "
/>
</template>
</el-table-column>
@@ -183,7 +216,10 @@
<el-input
v-model="scope.row.name"
placeholder="鍙椾綋濮撴皬"
- :disabled="form.allocationStatus == '1'"
+ :disabled="
+ form.allocationStatus == '1' ||
+ scope.row.allocationstatus == '3'
+ "
/>
</template>
</el-table-column>
@@ -192,21 +228,34 @@
label="绉绘鍖婚櫌"
align="center"
width="200"
- prop="transplanthospitalno"
+ prop="transplanthospitalname"
>
<template slot-scope="scope">
- <div>
- <org-selecter
- ref="tranHosSelect"
- :org-type="'4'"
- :dataList="dataList"
- v-model="scope.row.transplanthospitalno"
- style="width: 100%"
- />
- </div>
+ <el-autocomplete
+ v-model="scope.row.transplanthospitalname"
+ :fetch-suggestions="queryHospitalSearch"
+ placeholder="璇烽�夋嫨鎴栬緭鍏ョЩ妞嶅尰闄�"
+ style="width: 100%"
+ clearable
+ ></el-autocomplete>
</template>
+ <!-- <template slot-scope="scope">
+ <el-select
+ v-model="scope.row.transplanthospitalname"
+ placeholder="璇烽�夋嫨绉绘鍖婚櫌"
+ style="width: 100%"
+ >
+ <el-option
+ v-for="dict in dict.type.Geta_hospital"
+ :key="dict.value"
+ :label="dict.label"
+ :value="dict.value"
+ ></el-option>
+ </el-select>
+ </template> -->
</el-table-column>
+ <!-- 淇敼template涓殑璇存槑鍒� -->
<el-table-column
label="璇存槑"
align="center"
@@ -214,13 +263,51 @@
min-width="200"
>
<template slot-scope="scope">
- <el-input
- type="textarea"
- clearable
- v-model="scope.row.reallocationreason"
- placeholder="璇疯緭鍏ヨ鏄�"
- :disabled="form.allocationStatus == '1'"
- />
+ <div v-if="scope.row.allocationstatus != '3'">
+ <el-input
+ type="textarea"
+ clearable
+ v-model="scope.row.reallocationreason"
+ placeholder="璇疯緭鍏ヨ鏄�"
+ :disabled="
+ form.allocationStatus == '1' ||
+ scope.row.allocationstatus == '3'
+ "
+ />
+ </div>
+ <div v-else>
+ <!-- 閲嶅垎閰嶈褰曪細鏄剧ず璇︾粏鏌ョ湅鎸夐挳 -->
+ <el-button
+ v-if="scope.row.reallocationreason"
+ type="text"
+ size="small"
+ @click="handleViewRedistributionDetail(scope.row)"
+ style="color: #e6a23c;"
+ >
+ <i class="el-icon-document"></i>
+ 鏌ョ湅閲嶅垎閰嶈鎯�
+ </el-button>
+ <span v-else class="no-data">-</span>
+
+ <!-- 淇濈暀鍘熸湁鐨勫伐鍏锋彁绀猴紙鍙Щ闄ゆ垨淇濈暀锛� -->
+ <el-tooltip
+ v-if="scope.row.redistributionInfo"
+ :content="
+ formatRedistributionTooltip(
+ scope.row.redistributionInfo
+ )
+ "
+ placement="top"
+ >
+ <el-button
+ type="text"
+ size="small"
+ style="margin-left: 5px;"
+ >
+ <i class="el-icon-info"></i>
+ </el-button>
+ </el-tooltip>
+ </div>
</template>
</el-table-column>
@@ -230,6 +317,7 @@
width="120"
class-name="small-padding fixed-width"
v-if="form.allocationStatus !== '1'"
+ fixed="right"
>
<template slot-scope="scope">
<el-button
@@ -237,9 +325,30 @@
type="text"
icon="el-icon-copy-document"
@click="handleRedistribution(scope.row)"
- :disabled="!scope.row.caseno"
+ :disabled="scope.row.allocationstatus == '3'"
+ style="color: #e6a23c;"
>
- 閲嶅垎閰�
+ {{
+ scope.row.allocationstatus == "3"
+ ? "宸查噸鍒嗛厤"
+ : "閲嶅垎閰�"
+ }}
+ </el-button>
+ <el-button
+ v-if="scope.row.allocationstatus != '3'"
+ size="mini"
+ type="text"
+ icon="el-icon-delete"
+ @click="handleInvalidate(scope.row)"
+ :disabled="
+ scope.row.allocationstatus == '3' ||
+ scope.row.allocationstatus == '2'
+ "
+ style="color: #f56c6c;"
+ >
+ {{
+ scope.row.allocationstatus == "2" ? "宸蹭綔搴�" : "浣滃簾"
+ }}
</el-button>
</template>
</el-table-column>
@@ -249,7 +358,7 @@
</el-row>
<!-- 鍒嗛厤缁熻淇℃伅 -->
- <div
+ <!-- <div
class="allocation-stats"
v-if="
allocationData.serviceDonateorganList &&
@@ -267,8 +376,8 @@
</el-col>
<el-col :span="6">
<div class="stat-item">
- <span class="stat-label">寰呭畬鍠勪俊鎭�:</span>
- <span class="stat-value">{{ incompleteRecords }} 涓�</span>
+ <span class="stat-label">寰呭鏍�:</span>
+ <span class="stat-value">{{ pendingReviewCount }} 涓�</span>
</div>
</el-col>
<el-col :span="6">
@@ -279,59 +388,25 @@
</el-col>
<el-col :span="6">
<div class="stat-item">
- <span class="stat-label">鍒嗛厤鐘舵��:</span>
- <span class="stat-value">
- <el-tag
- :type="
- form.allocationStatus == '1'
- ? 'success'
- : form.allocationStatus == '2'
- ? 'danger'
- : 'warning'
- "
- >
- {{
- form.allocationStatus == "1"
- ? "宸插垎閰�"
- : form.allocationStatus == "2"
- ? "浣滃簾"
- : "鏈垎閰�"
- }}
- </el-tag>
- </span>
+ <span class="stat-label">閲嶅垎閰�:</span>
+ <span class="stat-value">{{ redistributedCount }} 涓�</span>
</div>
</el-col>
</el-row>
- </div>
+ </div> -->
- <div v-else class="empty-allocation">
+ <div
+ v-if="
+ !allocationData.serviceDonateorganList ||
+ allocationData.serviceDonateorganList.length == 0
+ "
+ class="empty-allocation"
+ >
<el-empty description="鏆傛棤鍒嗛厤璁板綍" :image-size="80">
<span>璇峰厛閫夋嫨瑕佸垎閰嶇殑鍣ㄥ畼</span>
</el-empty>
</div>
</el-form>
-
- <!-- <div class="dialog-footer" v-if="form.allocationStatus !== '1'">
- <el-button
- type="primary"
- @click="handleSaveAllocation"
- :loading="saveLoading"
- :disabled="
- !allocationData.serviceDonateorganList ||
- allocationData.serviceDonateorganList.length == 0
- "
- >
- 淇濆瓨鍒嗛厤璁板綍
- </el-button>
- <el-button
- type="success"
- @click="handleConfirmAllocation"
- :loading="confirmLoading"
- :disabled="incompleteRecords > 0"
- >
- 纭瀹屾垚鍒嗛厤
- </el-button>
- </div> -->
</el-card>
<!-- 闄勪欢绠$悊閮ㄥ垎浼樺寲 -->
@@ -361,7 +436,7 @@
<div class="attachment-list" v-if="attachments && attachments.length > 0">
<div class="list-title">宸蹭笂浼犻檮浠� ({{ attachments.length }})</div>
<el-table :data="attachments" style="width: 100%" size="small">
- <el-table-column label="鏂囦欢鍚�" min-width="200">
+ <el-table-column label="鏂囦欢鍚�" min-width="150">
<template slot-scope="scope">
<i
class="el-icon-document"
@@ -387,7 +462,7 @@
<span>{{ formatFileSize(scope.row.fileSize) }}</span>
</template>
</el-table-column>
- <el-table-column label="鎿嶄綔" width="200" fixed="right">
+ <el-table-column label="鎿嶄綔" width="280" fixed="right">
<template slot-scope="scope">
<el-button
size="mini"
@@ -416,18 +491,36 @@
</el-table>
</div>
</el-card>
-
+ <div style="text-align: center; margin: 30px 0;">
+ <el-button type="primary" @click="handleSave" :loading="saveLoading">
+ 淇濆瓨
+ </el-button>
+ <el-button
+ type="success"
+ @click="handleConfirmAllocation"
+ :disabled="form.allocationStatus == '1'"
+ :loading="confirmLoading"
+ >
+ 纭鍒嗛厤
+ </el-button>
+ </div>
<!-- 閲嶅垎閰嶅璇濇 -->
<el-dialog
title="鍣ㄥ畼閲嶅垎閰�"
:visible.sync="redistributionDialogVisible"
width="500px"
+ @close="handleRedistributionDialogClose"
>
- <el-form :model="redistributionForm" label-width="100px">
+ <el-form
+ :model="redistributionForm"
+ :rules="redistributionRules"
+ ref="redistributionFormRef"
+ label-width="100px"
+ >
<el-form-item label="鍘熷櫒瀹樹俊鎭�">
<el-input v-model="redistributionForm.organname" readonly />
</el-form-item>
- <el-form-item label="閲嶅垎閰嶅師鍥�" prop="reason">
+ <el-form-item label="閲嶅垎閰嶅師鍥�" prop="reason" required>
<el-input
type="textarea"
:rows="4"
@@ -435,15 +528,170 @@
placeholder="璇疯緭鍏ラ噸鍒嗛厤鍘熷洜"
/>
</el-form-item>
+ <el-form-item label="閲嶅垎閰嶆椂闂�" prop="redistributionTime" required>
+ <el-date-picker
+ v-model="redistributionForm.redistributionTime"
+ type="datetime"
+ placeholder="璇烽�夋嫨閲嶅垎閰嶆椂闂�"
+ value-format="yyyy-MM-dd HH:mm:ss"
+ style="width: 100%"
+ />
+ </el-form-item>
+ <el-form-item label="閲嶅垎閰嶉檮浠�">
+ <UploadAttachment
+ ref="redistributionAttachmentUpload"
+ :file-list="redistributionAttachmentList"
+ :limit="5"
+ :accept="attachmentAccept"
+ :multiple="true"
+ @change="handleRedistributionChange"
+ @upload-success="handleRedistributionUploadSuccess"
+ @upload-error="handleRedistributionUploadError"
+ @remove="handleRedistributionAttachmentRemove"
+ />
+ <div style="margin-top: 5px; font-size: 12px; color: #999;">
+ 鏀寔涓婁紶閲嶅垎閰嶇浉鍏虫枃浠� (鏈�澶�5涓�)
+ </div>
+ </el-form-item>
</el-form>
<div slot="footer">
<el-button @click="redistributionDialogVisible = false">鍙栨秷</el-button>
- <el-button type="primary" @click="handleRedistributionConfirm"
- >纭閲嶅垎閰�</el-button
+ <el-button
+ type="primary"
+ @click="handleRedistributionConfirm"
+ :loading="redistributionLoading"
+ >
+ 纭閲嶅垎閰�
+ </el-button>
+ </div>
+ </el-dialog>
+ <!-- 鍦╰emplate涓坊鍔犻噸鍒嗛厤璇︽儏寮圭獥 -->
+ <el-dialog
+ title="閲嶅垎閰嶈鎯�"
+ :visible.sync="redistributionDetailDialogVisible"
+ width="600px"
+ >
+ <div v-loading="redistributionDetailLoading">
+ <div v-if="currentRedistributionDetail" style="padding: 20px;">
+ <!-- 鍩烘湰淇℃伅 -->
+ <el-descriptions title="閲嶅垎閰嶄俊鎭�" :column="2" border>
+ <el-descriptions-item label="鍣ㄥ畼鍚嶇О">
+ {{ currentRedistributionDetail.organname || "-" }}
+ </el-descriptions-item>
+ <el-descriptions-item label="鎿嶄綔浜�">
+ {{ currentRedistributionDetail.operator || "-" }}
+ </el-descriptions-item>
+ <el-descriptions-item label="鎿嶄綔鏃堕棿">
+ {{
+ currentRedistributionDetail.operatorTime
+ ? formatDateTime(currentRedistributionDetail.operatorTime)
+ : "-"
+ }}
+ </el-descriptions-item>
+ <el-descriptions-item label="閲嶅垎閰嶆椂闂�">
+ {{
+ currentRedistributionDetail.redistributionTime
+ ? formatDateTime(
+ currentRedistributionDetail.redistributionTime
+ )
+ : "-"
+ }}
+ </el-descriptions-item>
+ </el-descriptions>
+
+ <!-- 閲嶅垎閰嶅師鍥� -->
+ <div style="margin-top: 20px;">
+ <div class="section-title">閲嶅垎閰嶅師鍥�</div>
+ <div
+ class="section-content"
+ style="padding: 10px; background: #f5f7fa; border-radius: 4px;"
+ >
+ {{ currentRedistributionDetail.reason || "鏃�" }}
+ </div>
+ </div>
+
+ <!-- 閲嶅垎閰嶉檮浠� -->
+ <div
+ style="margin-top: 20px;"
+ v-if="
+ currentRedistributionDetail.attachments &&
+ currentRedistributionDetail.attachments.length > 0
+ "
+ >
+ <div class="section-title">
+ 閲嶅垎閰嶉檮浠� ({{ currentRedistributionDetail.attachments.length }})
+ </div>
+ <div class="redistribution-attachments">
+ <el-table
+ :data="currentRedistributionDetail.attachments"
+ size="small"
+ style="width: 100%"
+ >
+ <el-table-column label="鏂囦欢鍚�" min-width="150">
+ <template slot-scope="scope">
+ <i
+ class="el-icon-document"
+ :style="{ color: getFileIconColor(scope.row.fileName) }"
+ ></i>
+ <span class="file-name">{{ scope.row.fileName }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column label="鏂囦欢绫诲瀷" width="100">
+ <template slot-scope="scope">
+ <el-tag
+ :type="getFileTagType(scope.row.fileName)"
+ size="small"
+ >
+ {{ getFileTypeText(scope.row.fileName) }}
+ </el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column label="涓婁紶鏃堕棿" width="150">
+ <template slot-scope="scope">
+ <span>{{
+ scope.row.uploadTime
+ ? formatDateTime(scope.row.uploadTime)
+ : "-"
+ }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column label="鎿嶄綔" width="150" fixed="right">
+ <template slot-scope="scope">
+ <el-button
+ size="mini"
+ type="primary"
+ @click="handleRedistributionAttachmentPreview(scope.row)"
+ :disabled="!isPreviewable(scope.row.fileName)"
+ >
+ 棰勮
+ </el-button>
+ <el-button
+ size="mini"
+ type="success"
+ @click="handleRedistributionAttachmentDownload(scope.row)"
+ >
+ 涓嬭浇
+ </el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+ </div>
+ </div>
+
+ <div
+ v-else
+ style="margin-top: 20px; text-align: center; color: #909399;"
+ >
+ 鏃犻噸鍒嗛厤闄勪欢
+ </div>
+ </div>
+ </div>
+ <div slot="footer">
+ <el-button @click="redistributionDetailDialogVisible = false"
+ >鍏抽棴</el-button
>
</div>
</el-dialog>
-
<!-- 闄勪欢棰勮瀵硅瘽妗� -->
<FilePreviewDialog
:visible="filePreviewVisible"
@@ -480,6 +728,8 @@
"sys_DonationCategory",
"sys_RecordState",
"sys_Organ",
+ "Geta_hospital",
+
"organ_allocation_status"
],
props: {
@@ -491,7 +741,10 @@
data() {
return {
caseId: null,
-
+ // 閲嶅垎閰嶈鎯呯浉鍏�
+ redistributionDetailDialogVisible: false,
+ redistributionDetailLoading: false,
+ currentRedistributionDetail: null,
// 琛ㄥ崟鏁版嵁
form: {
id: undefined,
@@ -530,9 +783,19 @@
},
// 鍒嗛厤璁板綍楠岃瘉瑙勫垯
allocationRules: {},
+ // 閲嶅垎閰嶉獙璇佽鍒�
+ redistributionRules: {
+ reason: [
+ { required: true, message: "閲嶅垎閰嶅師鍥犱笉鑳戒负绌�", trigger: "blur" }
+ ],
+ redistributionTime: [
+ { required: true, message: "閲嶅垎閰嶆椂闂翠笉鑳戒负绌�", trigger: "blur" }
+ ]
+ },
// 淇濆瓨鍔犺浇鐘舵��
saveLoading: false,
confirmLoading: false,
+ redistributionLoading: false,
// 鍔犺浇鐘舵��
loading: false,
// 閫変腑鐨勫櫒瀹橈紙瀛樺偍瀛楀吀value锛�
@@ -556,8 +819,11 @@
redistributionDialogVisible: false,
redistributionForm: {
organname: "",
- reason: ""
+ reason: "",
+ redistributionTime: ""
},
+ redistributionAttachmentList: [],
+ redistributionFormRef: null,
currentRedistributeRecord: null,
// 鏂囦欢棰勮鐩稿叧
filePreviewVisible: false,
@@ -570,22 +836,40 @@
currentUser() {
return JSON.parse(sessionStorage.getItem("user") || "{}");
},
+ displayOrgans() {
+ return (this.allocationData.serviceDonateorganList || []).filter(
+ item => item.delFlag !== 1
+ );
+ },
// 涓嶅畬鏁寸殑璁板綍鏁伴噺
incompleteRecords() {
if (!this.allocationData.serviceDonateorganList) return 0;
return this.allocationData.serviceDonateorganList.filter(
record =>
- !record.caseno ||
!record.applicanttime ||
+ !record.organgettime ||
!record.name ||
- !record.transplanthospitalno
+ !record.transplanthospitalname
).length;
},
- // 鍞竴鍖婚櫌鏁伴噺
+ // 寰呭鏍歌褰曟暟閲�
+ pendingReviewCount() {
+ if (!this.allocationData.serviceDonateorganList) return 0;
+ return this.allocationData.serviceDonateorganList.filter(
+ record => record.allocationstatus == "0"
+ ).length;
+ },
+ // 閲嶅垎閰嶈褰曟暟閲�
+ redistributedCount() {
+ if (!this.allocationData.serviceDonateorganList) return 0;
+ return this.allocationData.serviceDonateorganList.filter(
+ record => record.allocationstatus == "3"
+ ).length;
+ },
uniqueHospitals() {
if (!this.allocationData.serviceDonateorganList) return 0;
const hospitals = this.allocationData.serviceDonateorganList
- .map(record => record.transplanthospitalno)
+ .map(record => record.transplanthospitalname)
.filter(Boolean);
return new Set(hospitals).size;
},
@@ -596,6 +880,15 @@
// 鍒ゆ柇鏄惁闇�瑕佹樉绀哄叾浠栬緭鍏ユ
showOtherInput() {
return this.selectedOrgans.includes("C01"); // 鍋囪"鍏朵粬"鐨勫瓧鍏稿�兼槸C01
+ },
+ // 鍒嗛厤鐘舵�佸瓧鍏告槧灏�
+ allocationStatusDict() {
+ return {
+ "0": { label: "鎻愪氦鍒嗛厤", type: "info" },
+ "1": { label: "瀹℃牳閫氳繃", type: "success" },
+ "2": { label: "宸蹭綔搴�", type: "danger" },
+ "3": { label: "閲嶅垎閰�", type: "warning" }
+ };
}
},
watch: {
@@ -631,6 +924,110 @@
this.initData();
},
methods: {
+ // 鑾峰彇鍒嗛厤鐘舵�佹爣绛剧被鍨�
+ getAllocationStatusTagType(status) {
+ const statusMap = this.allocationStatusDict;
+ return statusMap[status] ? statusMap[status].type : "info";
+ },
+
+ // 鑾峰彇鍒嗛厤鐘舵�佹枃鏈�
+ getAllocationStatusText(status) {
+ const statusMap = this.allocationStatusDict;
+ return statusMap[status] ? statusMap[status].label : "鏈煡鐘舵��";
+ },
+ queryHospitalSearch(queryString, cb) {
+ const hospitals = this.dict.type.Geta_hospital || [];
+ const results = queryString
+ ? hospitals.filter(item =>
+ item.label.toLowerCase().includes(queryString.toLowerCase())
+ )
+ : hospitals;
+
+ // el-autocomplete 闇�瑕� value 瀛楁
+ cb(results.map(item => ({ value: item.label })));
+ },
+ // 鏌ョ湅閲嶅垎閰嶈鎯�
+ handleViewRedistributionDetail(row) {
+ this.redistributionDetailLoading = true;
+ this.redistributionDetailDialogVisible = true;
+
+ try {
+ if (row.redistributionInfo) {
+ // 瑙f瀽閲嶅垎閰嶄俊鎭�
+ const redistributionInfo = JSON.parse(row.redistributionInfo);
+ this.currentRedistributionDetail = {
+ organname: row.organname || "-",
+ ...redistributionInfo
+ };
+ } else {
+ this.currentRedistributionDetail = {
+ organname: row.organname || "-",
+ reason: "鏃犻噸鍒嗛厤鍘熷洜",
+ attachments: []
+ };
+ }
+ } catch (error) {
+ console.error("瑙f瀽閲嶅垎閰嶄俊鎭け璐�:", error);
+ this.$message.error("閲嶅垎閰嶄俊鎭В鏋愬け璐�");
+ this.currentRedistributionDetail = {
+ organname: row.organname || "-",
+ reason: "閲嶅垎閰嶄俊鎭牸寮忛敊璇�",
+ attachments: []
+ };
+ } finally {
+ this.redistributionDetailLoading = false;
+ }
+ },
+
+ // 棰勮閲嶅垎閰嶉檮浠�
+ handleRedistributionAttachmentPreview(file) {
+ this.currentPreviewFile = {
+ fileName: file.fileName,
+ fileUrl: file.path || file.fileUrl,
+ fileType: this.getFileType(file.fileName)
+ };
+ this.filePreviewVisible = true;
+ },
+
+ // 涓嬭浇閲嶅垎閰嶉檮浠�
+ handleRedistributionAttachmentDownload(file) {
+ const fileUrl = file.path || file.fileUrl;
+ const fileName = file.fileName;
+
+ if (fileUrl) {
+ const link = document.createElement("a");
+ link.href = fileUrl;
+ link.download = fileName;
+ link.style.display = "none";
+ document.body.appendChild(link);
+ link.click();
+ document.body.removeChild(link);
+ this.$message.success("寮�濮嬩笅杞芥枃浠�");
+ } else {
+ this.$message.warning("鏂囦欢璺緞涓嶅瓨鍦紝鏃犳硶涓嬭浇");
+ }
+ },
+
+ // 澧炲己鏍煎紡鍖栧伐鍏锋彁绀烘柟娉�
+ formatRedistributionTooltip(redistributionInfo) {
+ if (!redistributionInfo) return "";
+ try {
+ const info = JSON.parse(redistributionInfo);
+ let tooltip = `閲嶅垎閰嶅師鍥�: ${info.reason}\n閲嶅垎閰嶆椂闂�: ${info.redistributionTime}`;
+
+ // 娣诲姞闄勪欢淇℃伅
+ if (info.attachments && info.attachments.length > 0) {
+ tooltip += `\n\n闄勪欢(${info.attachments.length}涓�):`;
+ info.attachments.forEach((att, index) => {
+ tooltip += `\n${index + 1}. ${att.fileName}`;
+ });
+ }
+
+ return tooltip;
+ } catch (error) {
+ return redistributionInfo;
+ }
+ },
// 鏍规嵁瀛楀吀value鑾峰彇label
getOrganLabel(organValue) {
const dictItem = this.organDict.find(item => item.value == organValue);
@@ -639,7 +1036,6 @@
// 鍒濆鍖栨暟鎹�
initData() {
- const id = null;
const infoid = this.infoid;
if (!infoid) {
@@ -657,13 +1053,14 @@
.substring(0, 19);
if (infoid) {
- this.getDetail(infoid, id);
+ this.getDetail(infoid);
} else {
this.generateDonorNo();
}
this.getHospitalData();
},
+
// 鐢熸垚鎹愮尞鑰呯紪鍙�
generateDonorNo() {
const timestamp = Date.now().toString();
@@ -685,16 +1082,15 @@
this.form.attachments = [];
}
},
+
// 鑾峰彇璇︽儏
async getDetail(infoid, id) {
this.loading = true;
-
try {
const response = await allocationList({ infoid });
if (response.code == 200 && response.data && response.data.length > 0) {
const data = response.data[0];
- data.allocationStatus = JSON.stringify(data.allocationStatus);
// 濉厖琛ㄥ崟鏁版嵁
Object.assign(this.form, data);
// 杞崲闄勪欢涓洪泦鍚�
@@ -712,7 +1108,30 @@
this.allocationData.serviceDonateorganList = Array.isArray(
data.serviceDonateorganList
)
- ? data.serviceDonateorganList
+ ? data.serviceDonateorganList.map(item => {
+ // 纭繚姣忔潯璁板綍閮芥湁鍒嗛厤鐘舵�佸瓧娈碉紝榛樿鍊间负0
+ const allocationstatus = item.allocationstatus || "0";
+ let redistributionInfo = null;
+
+ // 瑙f瀽閲嶅垎閰嶄俊鎭�
+ if (allocationstatus == "3" && item.reallocationreason) {
+ try {
+ redistributionInfo = JSON.parse(item.reallocationreason);
+ console.log(redistributionInfo);
+ } catch (error) {
+ console.warn("瑙f瀽閲嶅垎閰嶄俊鎭け璐�:", error);
+ redistributionInfo = item.reallocationreason;
+ }
+ }
+
+ return {
+ ...item,
+ allocationstatus,
+ redistributionInfo: redistributionInfo
+ ? JSON.stringify(redistributionInfo)
+ : null
+ };
+ })
: [];
// 鏇存柊閫変腑鐨勫櫒瀹�
@@ -760,6 +1179,7 @@
this.loading = false;
}
},
+
// 鑾峰彇鍖婚櫌鏁版嵁
async getHospitalData() {
try {
@@ -777,58 +1197,79 @@
this.$message.error("鑾峰彇鍖婚櫌鏁版嵁澶辫触");
}
},
+
// 鍣ㄥ畼閫夋嫨鐘舵�佸彉鍖�
- handleOrganSelectionChange(selectedValues) {
- if (!this.allocationData.serviceDonateorganList) {
- this.allocationData.serviceDonateorganList = [];
- }
-
- const currentOrganValues = this.allocationData.serviceDonateorganList.map(
- item => item.organno
- );
-
- // 澶勭悊浜掓枼閫昏緫锛堝弬鑰冩崘鐚喅瀹氶〉闈級
+ async handleOrganSelectionChange(selectedValues) {
+ // 1. 澶勭悊浜掓枼閫昏緫锛堜慨鏀� this.selectedOrgans锛�
this.handleExclusiveSelections(selectedValues);
- // 鏂板閫夋嫨鐨勫櫒瀹�
- selectedValues.forEach(organValue => {
- if (!currentOrganValues.includes(organValue)) {
- this.createOrganRecord(organValue);
+ const finalSelected = this.selectedOrgans;
+ const records = this.allocationData.serviceDonateorganList || [];
+
+ // 2. 鏋勫缓鐩爣鍣ㄥ畼缂栧彿鍒楄〃锛堢洿鎺ヤ娇鐢ㄩ�変腑鐨勫�硷紝涓嶅睍寮�锛�
+ const targetOrganNos = finalSelected; // 杩欓噷涓嶅睍寮�锛屽氨鏄�変腑鐨勫櫒瀹樼紪鍙�
+
+ // 3. 鏂板鎴栨仮澶嶈褰�
+ targetOrganNos.forEach(no => {
+ const existing = records.find(r => r.organno === no);
+ if (existing) {
+ if (existing.delFlag === 1) {
+ existing.delFlag = 0; // 鎭㈠鏄剧ず
+ }
+ } else {
+ this.createOrganRecord(no);
}
});
- // 绉婚櫎鍙栨秷閫夋嫨鐨勫櫒瀹�
- this.allocationData.serviceDonateorganList = this.allocationData.serviceDonateorganList.filter(
- record => {
- if (selectedValues.includes(record.organno)) {
- return true;
- } else {
- if (record.id) {
- this.$confirm(
- "鍒犻櫎鍣ㄥ畼鍒嗛厤鏁版嵁鍚庡皢鏃犳硶鎭㈠锛屾偍纭鍒犻櫎璇ユ潯璁板綍鍚楋紵",
- "鎻愮ず",
- {
- confirmButtonText: "纭畾",
- cancelButtonText: "鍙栨秷",
- type: "warning"
- }
- )
- .then(() => {
- this.allocationData.serviceDonateorganList = this.allocationData.serviceDonateorganList.filter(
- r => r.organno !== record.organno
- );
- this.$message.success("鍒犻櫎鎴愬姛");
- })
- .catch(() => {
- this.selectedOrgans.push(record.organno);
- });
- return true; // 绛夊緟鐢ㄦ埛纭
- } else {
- return false; // 鐩存帴鍒犻櫎鏂拌褰�
+ // 4. 鎵惧嚭闇�瑕佸彇娑堢殑璁板綍锛堜笉鍦ㄧ洰鏍囬泦鍚堜腑锛�
+ const toRemove = records.filter(r => !targetOrganNos.includes(r.organno));
+ const toRemoveSaved = toRemove.filter(r => r.id); // 宸蹭繚瀛橈紝闇�纭
+ const toRemoveUnsaved = toRemove.filter(r => !r.id); // 鏈繚瀛橈紝鐩存帴绉婚櫎
+
+ // 4.1 鐩存帴绉婚櫎鏈繚瀛樼殑璁板綍
+ toRemoveUnsaved.forEach(r => {
+ const idx = records.indexOf(r);
+ if (idx !== -1) records.splice(idx, 1);
+ });
+
+ // 4.2 澶勭悊宸蹭繚瀛樼殑璁板綍锛氬脊绐楃‘璁�
+ if (toRemoveSaved.length > 0) {
+ const organNames = toRemoveSaved.map(r => r.organname).join("銆�");
+ try {
+ await this.$confirm(
+ `鎮ㄧ‘瀹氳鍙栨秷浠ヤ笅宸蹭繚瀛樼殑鍣ㄥ畼鍒嗛厤璁板綍鍚楋紵\n${organNames}\n鍙栨秷鍚庯紝杩欎簺璁板綍灏嗕粠鍒楄〃涓Щ闄わ紙鏁版嵁浠嶄繚鐣欙紝鍙仮澶嶏級銆俙,
+ "鎻愮ず",
+ {
+ confirmButtonText: "纭畾绉婚櫎",
+ cancelButtonText: "鍙栨秷",
+ type: "warning"
}
- }
+ );
+ // 鐢ㄦ埛纭锛氭爣璁� delFlag=1锛屽苟浠庨�変腑鍒楄〃涓Щ闄�
+ toRemoveSaved.forEach(r => {
+ r.delFlag = 1;
+ // 浠� selectedOrgans 涓Щ闄ゅ搴旂殑鍣ㄥ畼缂栧彿
+ const idx = this.selectedOrgans.indexOf(r.organno);
+ if (idx !== -1) this.selectedOrgans.splice(idx, 1);
+ });
+ } catch (error) {
+ // 鐢ㄦ埛鍙栨秷锛氭仮澶嶉�変腑鐘舵�侊紙灏嗗彇娑堢殑鍣ㄥ畼閲嶆柊鍔犲叆 selectedOrgans锛�
+ const parentToRestore = new Set();
+ toRemoveSaved.forEach(r => {
+ // 鐩存帴鎭㈠鍣ㄥ畼缂栧彿锛堝洜涓轰笉灞曞紑锛屾墍浠ュ氨鏄� r.organno锛�
+ if (!this.selectedOrgans.includes(r.organno)) {
+ this.selectedOrgans.push(r.organno);
+ }
+ });
+ this.$message.info("宸插彇娑堝垹闄ゆ搷浣�");
+ return; // 閫�鍑烘柟娉曪紝閬垮厤缁х画鎵ц
}
- );
+ }
+
+ // 5. 娉ㄦ剰锛氬浜庡凡鏍囪鍒犻櫎鐨勮褰曪紝鎴戜滑涓嶄粠 selectedOrgans 涓Щ闄わ紙宸插湪纭鏃剁Щ闄わ級
+ // 浣嗚繕瑕佽�冭檻锛氭煇浜涜褰曞彲鑳藉洜涓轰簰鏂ラ�昏緫琚Щ闄わ紝宸插寘鍚湪 finalSelected 涓鐞嗭紝鏃犻澶栨搷浣�
+ // 鏇存柊琛ㄥ崟瀛楁锛堝鏋滈渶瑕佷繚瀛橀�変腑鐨勫櫒瀹樺垪琛紝鍙互鍦ㄨ繖閲岃缃� this.form.donateorgan锛屼絾鏈」鐩湭鐢級
+ // 濡傛灉闇�瑕侊紝鍙互娣诲姞 this.form.donateorgan = this.selectedOrgans.join(',');
},
// 澶勭悊浜掓枼閫夋嫨锛堝弬鑰冩崘鐚喅瀹氶〉闈級
@@ -877,11 +1318,15 @@
organno: organValue,
caseno: "",
applicanttime: "",
+ organgettime: "",
name: "",
transplanthospitalno: "",
transplantHospitalName: "",
reallocationreason: "",
- organState: 1
+ allocationstatus: "0", // 榛樿鎻愪氦鍒嗛厤鐘舵��
+ redistributionInfo: null,
+ organState: 1,
+ delFlag: 0 // 鏂板
});
},
@@ -894,38 +1339,219 @@
row.transplantHospitalName = hospital.hospitalName;
}
},
+
// 閲嶅垎閰嶆搷浣�
handleRedistribution(row) {
this.currentRedistributeRecord = row;
this.redistributionForm.organname = row.organname;
- this.redistributionForm.reason = row.reallocationreason || "";
+ this.redistributionForm.reason = "";
+ this.redistributionForm.redistributionTime = new Date()
+ .toISOString()
+ .replace("T", " ")
+ .substring(0, 19);
+ this.redistributionAttachmentList = [];
this.redistributionDialogVisible = true;
},
- // 纭閲嶅垎閰�
- handleRedistributionConfirm() {
- if (!this.redistributionForm.reason) {
- this.$message.warning("璇疯緭鍏ラ噸鍒嗛厤鍘熷洜");
- return;
- }
+ // 浣滃簾鎿嶄綔
+ handleInvalidate(row) {
+ this.$confirm(`纭畾瑕佸皢 "${row.organname}" 鐨勫垎閰嶈褰曚綔搴熷悧锛焋, "鎻愮ず", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning"
+ })
+ .then(() => {
+ // 鎵惧埌褰撳墠璁板綍鐨勭储寮�
+ const index = this.allocationData.serviceDonateorganList.findIndex(
+ item => item === row
+ );
- if (this.currentRedistributeRecord) {
- this.currentRedistributeRecord.reallocationreason = this.redistributionForm.reason;
- this.$message.success("閲嶅垎閰嶅師鍥犲凡鏇存柊");
- this.redistributionDialogVisible = false;
+ if (index !== -1) {
+ // 鏇存柊璁板綍鐘舵�佷负浣滃簾
+ this.allocationData.serviceDonateorganList[index].allocationstatus =
+ "2";
+
+ // 鏇存柊閫変腑鐨勫櫒瀹樺垪琛紙濡傛灉璇ュ櫒瀹樹笉鍐嶆湁鍏朵粬鏈夋晥璁板綍锛�
+ const organNo = row.organno;
+ const hasOtherValidRecord = this.allocationData.serviceDonateorganList.some(
+ item => item.organno === organNo && item.allocationstatus !== "2"
+ );
+
+ if (!hasOtherValidRecord) {
+ this.selectedOrgans = this.selectedOrgans.filter(
+ item => item !== organNo
+ );
+ }
+
+ this.$message.success("璁板綍宸蹭綔搴�");
+ }
+ })
+ .catch(() => {});
+ },
+ // 閲嶅垎閰嶅璇濇鍏抽棴
+ handleRedistributionDialogClose() {
+ this.redistributionForm = {
+ organname: "",
+ reason: "",
+ redistributionTime: ""
+ };
+ this.redistributionAttachmentList = [];
+ this.currentRedistributeRecord = null;
+ },
+
+ // 閲嶅垎閰嶉檮浠朵笂浼犳垚鍔�
+ handleRedistributionUploadSuccess({ file, fileList, response }) {
+ if (response.code == 200) {
+ const attachmentObj = {
+ fileName: file.name,
+ path: response.fileUrl || file.url,
+ fileUrl: response.fileUrl || file.url,
+ fileType: this.getFileExtension(file.name),
+ fileSize: file.size,
+ uploadTime: dayjs().format("YYYY-MM-DD HH:mm:ss")
+ };
+ console.log(11);
+
+ this.redistributionAttachmentList = fileList;
+ this.$message.success("閲嶅垎閰嶉檮浠朵笂浼犳垚鍔�");
}
},
+
+ // 閲嶅垎閰嶉檮浠朵笂浼犻敊璇�
+ handleRedistributionUploadError({ file, fileList, error }) {
+ console.error("閲嶅垎閰嶉檮浠朵笂浼犲け璐�:", error);
+ this.$message.error("閲嶅垎閰嶉檮浠朵笂浼犲け璐ワ紝璇烽噸璇�");
+ },
+
+ // 閲嶅垎閰嶉檮浠剁Щ闄�
+ handleRedistributionAttachmentRemove(file) {
+ if (file.url) {
+ const index = this.redistributionAttachmentList.findIndex(
+ item => item.path == file.url || item.fileUrl == file.url
+ );
+ if (index > -1) {
+ this.redistributionAttachmentList.splice(index, 1);
+ }
+ }
+ },
+
+ // 纭閲嶅垎閰�
+ async handleRedistributionConfirm() {
+ this.$refs.redistributionFormRef.validate(async valid => {
+ if (!valid) {
+ this.$message.warning("璇峰畬鍠勯噸鍒嗛厤淇℃伅");
+ return;
+ }
+ console.log(1, this.redistributionAttachmentList);
+
+ this.redistributionLoading = true;
+
+ try {
+ // 鏋勫缓閲嶅垎閰嶄俊鎭璞�
+ const redistributionInfo = {
+ reason: this.redistributionForm.reason,
+ redistributionTime: this.redistributionForm.redistributionTime,
+ attachments: this.redistributionAttachmentList.map(att => ({
+ // fileName: att.fileName,
+ // path: att.path || att.fileUrl,
+ // fileUrl: att.path || att.fileUrl,
+ // fileType: this.getFileExtension(att.name),
+ // fileSize: att.fileSize,
+ // uploadTime: att.uploadTime
+ fileName: att.name,
+ path: att.url,
+ fileUrl: att.url,
+ fileType: this.getFileExtension(att.name),
+ fileSize: att.size,
+ uploadTime: dayjs().format("YYYY-MM-DD HH:mm:ss")
+ })),
+
+ operator: this.currentUser.username || this.currentUser.nickName,
+ operatorTime: new Date()
+ .toISOString()
+ .replace("T", " ")
+ .substring(0, 19)
+ };
+ console.log(2, this.redistributionAttachmentList);
+
+ // 鎵惧埌褰撳墠璁板綍鐨勭储寮�
+ const currentIndex = this.allocationData.serviceDonateorganList.findIndex(
+ item => item == this.currentRedistributeRecord
+ );
+
+ if (currentIndex !== -1) {
+ // 1. 鏇存柊鍘熻褰曠殑鐘舵�佷负3锛堥噸鍒嗛厤锛夊苟淇濆瓨閲嶅垎閰嶄俊鎭�
+ const originalRecord = { ...this.currentRedistributeRecord };
+ originalRecord.allocationstatus = "3";
+ originalRecord.reallocationreason = JSON.stringify(
+ redistributionInfo
+ );
+ originalRecord.redistributionInfo = JSON.stringify(
+ redistributionInfo
+ );
+
+ // 2. 鍒涘缓鏂扮殑璁板綍
+ const newRecord = {
+ ...this.currentRedistributeRecord,
+ id: null, // 鏂拌褰旾D涓虹┖
+ allocationstatus: "0", // 鏂拌褰曠姸鎬佷负鎻愪氦鍒嗛厤
+ reallocationreason: "", // 娓呯┖閲嶅垎閰嶅師鍥�
+ redistributionInfo: null,
+ // 閲嶇疆鐩稿叧瀛楁锛屼絾淇濈暀鍣ㄥ畼淇℃伅
+ caseno: "",
+ applicanttime: "",
+ organgettime: "",
+ name: "",
+ transplanthospitalno: "",
+ transplantHospitalName: ""
+ };
+
+ // 3. 鍦ㄦ暟缁勪腑鎻掑叆鏂拌褰曪紙鍦ㄦ棫璁板綍涔嬪悗锛�
+ this.allocationData.serviceDonateorganList.splice(
+ currentIndex + 1,
+ 0,
+ newRecord
+ );
+ // 4. 鏇存柊鍘熻褰�
+ this.allocationData.serviceDonateorganList[
+ currentIndex
+ ] = originalRecord;
+
+ // 5. 鏇存柊閫変腑鐨勫櫒瀹樺垪琛�
+ this.selectedOrgans.push(this.currentRedistributeRecord.organno);
+
+ this.$message.success("閲嶅垎閰嶆搷浣滄垚鍔熷畬鎴�");
+ this.redistributionDialogVisible = false;
+ } else {
+ this.$message.error("鏈壘鍒板搴旂殑璁板綍");
+ }
+ } catch (error) {
+ console.error("閲嶅垎閰嶆搷浣滃け璐�:", error);
+ this.$message.error("閲嶅垎閰嶆搷浣滃け璐�");
+ } finally {
+ this.redistributionLoading = false;
+ }
+ });
+ },
+
// 鍣ㄥ畼琛屾牱寮�
getOrganRowClassName({ row }) {
- if (
- !row.caseno ||
+ if (row.allocationstatus == "3") {
+ return "redistributed-row"; // 閲嶅垎閰嶈褰曟牱寮�
+ } else if (row.allocationstatus == "2") {
+ return "invalidated-row"; // 浣滃簾璁板綍鏍峰紡
+ } else if (
!row.applicanttime ||
+ !row.organgettime ||
!row.name ||
- !row.transplanthospitalno
+ !row.transplanthospitalname
) {
- return "warning-row";
+ return "warning-row"; // 淇℃伅涓嶅畬鏁存牱寮�
+ } else if (row.allocationstatus == "0") {
+ return "pending-row"; // 寰呭鏍告牱寮�
}
return "";
},
+
// 鏋勫缓 filePatch 瀛楁
buildFilePatch() {
if (!this.attachments || this.attachments.length == 0) {
@@ -933,6 +1559,7 @@
}
return JSON.stringify(this.attachments);
},
+
// 淇濆瓨鍩烘湰淇℃伅
async handleSave() {
this.$refs.form.validate(async valid => {
@@ -948,17 +1575,26 @@
serviceDonateorganList:
this.allocationData.serviceDonateorganList || []
};
- if (
- submitData.allocationStatus == 1 ||
- !submitData.allocationStatus
- ) {
- submitData.allocationStatus = 2;
- }
- saveData.fileName = this.buildFilePatch();
+
+ // 纭繚姣忔潯璁板綍閮芥湁鍒嗛厤鐘舵��
saveData.serviceDonateorganList.forEach(item => {
item.baseid = this.form.id;
item.infoid = this.form.infoid;
+ // 纭繚鏈夊垎閰嶇姸鎬佸瓧娈�
+ if (!item.allocationstatus) {
+ item.allocationstatus = "0";
+ }
+ // 濡傛灉鏄噸鍒嗛厤璁板綍锛岀‘淇濇湁閲嶅垎閰嶄俊鎭�
+ if (item.allocationstatus == "3" && !item.reallocationreason) {
+ item.reallocationreason = item.redistributionInfo || "";
+ }
});
+
+ if (saveData.allocationStatus == 1 || !saveData.allocationStatus) {
+ saveData.allocationStatus = 2;
+ }
+ saveData.fileName = this.buildFilePatch();
+
const apiMethod = this.form.id ? allocationedit : allocationadd;
const response = await apiMethod(saveData);
@@ -966,9 +1602,6 @@
this.$message.success("淇濆瓨鎴愬姛");
if (!this.form.id && response.data) {
this.form.id = response.data;
- // this.$router.replace({
- // query: { ...this.$route.query, id: this.form.id }
- // });
}
} else {
this.$message.error("淇濆瓨澶辫触锛�" + (response.msg || "鏈煡閿欒"));
@@ -981,38 +1614,7 @@
}
});
},
- // 淇濆瓨鍒嗛厤璁板綍
- async handleSaveAllocation() {
- if (!this.form.id) {
- this.$message.warning("璇峰厛淇濆瓨鍩烘湰淇℃伅");
- return;
- }
- this.saveLoading = true;
- try {
- const saveData = {
- ...this.form,
- attachments: this.attachments,
- serviceDonateorganList:
- this.allocationData.serviceDonateorganList || []
- };
-
- const response = await allocationedit(saveData);
-
- if (response.code == 200) {
- this.$message.success("鍒嗛厤璁板綍淇濆瓨鎴愬姛");
- } else {
- this.$message.error(
- "淇濆瓨鍒嗛厤璁板綍澶辫触锛�" + (response.msg || "鏈煡閿欒")
- );
- }
- } catch (error) {
- console.error("淇濆瓨鍒嗛厤璁板綍澶辫触:", error);
- this.$message.error("淇濆瓨鍒嗛厤璁板綍澶辫触");
- } finally {
- this.saveLoading = false;
- }
- },
// 纭瀹屾垚鍒嗛厤
async handleConfirmAllocation() {
if (this.incompleteRecords > 0) {
@@ -1068,6 +1670,9 @@
/** 闄勪欢鍙樺寲澶勭悊 */
handleAttachmentChange(fileList) {
this.attachmentFileList = fileList;
+ },
+ handleRedistributionChange(fileList) {
+ this.redistributionAttachmentList = fileList;
},
/** 闄勪欢绉婚櫎澶勭悊 */
@@ -1125,9 +1730,9 @@
fileUrl: file.path || file.fileUrl,
fileType: this.getFileType(file.fileName)
};
- // this.filePreviewTitle = file.fileName;
this.filePreviewVisible = true;
},
+
handleDownloadAttachment(file) {
const fileUrl = file.path || file.fileUrl;
const fileName = file.fileName;
@@ -1206,6 +1811,8 @@
/** 鑾峰彇鏂囦欢鎵╁睍鍚� */
getFileExtension(filename) {
+ console.log(filename, "filename");
+
return filename
.split(".")
.pop()
@@ -1336,6 +1943,47 @@
font-weight: bold;
}
+/* 鍦╯tyle閮ㄥ垎娣诲姞 */
+.section-title {
+ font-weight: 600;
+ color: #303133;
+ margin-bottom: 8px;
+ font-size: 14px;
+}
+
+.section-content {
+ background: #f5f7fa;
+ padding: 12px;
+ border-radius: 4px;
+ border-left: 3px solid #e6a23c;
+ line-height: 1.6;
+}
+
+.redistribution-attachments {
+ margin-top: 10px;
+ border: 1px solid #ebeef5;
+ border-radius: 4px;
+ overflow: hidden;
+}
+
+/* 閲嶅垎閰嶈鎯呰〃鏍兼牱寮� */
+:deep(.redistribution-attachments .el-table) {
+ border: none;
+}
+
+:deep(.redistribution-attachments .el-table th) {
+ background-color: #f5f7fa;
+ color: #606266;
+ font-weight: 600;
+}
+
+/* 鍝嶅簲寮忚皟鏁� */
+@media (max-width: 768px) {
+ .redistribution-attachments {
+ overflow-x: auto;
+ }
+}
+
/* 绌虹姸鎬佹牱寮� */
.empty-allocation {
text-align: center;
@@ -1343,21 +1991,142 @@
color: #909399;
}
-/* 瀵硅瘽妗嗗簳閮ㄦ寜閽� */
-.dialog-footer {
- margin-top: 20px;
- text-align: center;
- padding-top: 20px;
- border-top: 1px solid #e4e7ed;
+/* 鏃犳暟鎹牱寮� */
+.no-data {
+ color: #909399;
+ font-style: italic;
}
-/* 琛ㄦ牸琛屾牱寮� */
+/* ===== 琛ㄦ牸琛屾牱寮� ===== */
+
+/* 閲嶅垎閰嶈鏍峰紡 */
+:deep(.redistributed-row) {
+ background-color: #fdf6ec;
+ opacity: 0.8;
+}
+
+:deep(.redistributed-row:hover) {
+ background-color: #faecd8;
+ opacity: 0.9;
+}
+
+/* 淇℃伅涓嶅畬鏁磋鍛婅鏍峰紡 */
:deep(.warning-row) {
background-color: #fff7e6;
}
:deep(.warning-row:hover) {
background-color: #ffecc2;
+}
+
+/* 寰呭鏍歌鏍峰紡 */
+:deep(.pending-row) {
+ background-color: #f0f9ff;
+}
+
+:deep(.pending-row:hover) {
+ background-color: #e0f2ff;
+}
+
+/* ===== 鏂板锛氫綔搴熻鏍峰紡 ===== */
+:deep(.invalidated-row) {
+ background-color: #fef0f0;
+ position: relative;
+}
+
+:deep(.invalidated-row td) {
+ opacity: 0.6;
+ text-decoration: line-through;
+ color: #c0c4cc !important;
+}
+
+:deep(.invalidated-row:hover td) {
+ background-color: #fde2e2 !important;
+ opacity: 0.75;
+}
+
+/* 浣滃簾琛屽唴鐨勮緭鍏ユ鍜岄�夋嫨鍣ㄦ牱寮� */
+:deep(.invalidated-row .el-input__inner),
+:deep(.invalidated-row .el-textarea__inner),
+:deep(.invalidated-row .el-date-editor .el-input__inner) {
+ background-color: #fef0f0 !important;
+ border-color: #fbc4c4 !important;
+ color: #c0c4cc !important;
+ cursor: not-allowed !important;
+}
+
+/* 浣滃簾琛屽唴鐨勬爣绛炬牱寮� */
+:deep(.invalidated-row .el-tag) {
+ opacity: 0.5;
+}
+
+/* 浣滃簾琛屽唴鐨勬寜閽牱寮� */
+:deep(.invalidated-row .el-button--text) {
+ color: #c0c4cc !important;
+ cursor: not-allowed !important;
+}
+
+/* ===== 鎿嶄綔鎸夐挳鏍峰紡 ===== */
+
+/* 鎿嶄綔鎸夐挳瀹瑰櫒 */
+.operation-buttons {
+ display: flex;
+ gap: 4px;
+ justify-content: center;
+ align-items: center;
+}
+
+/* 鎿嶄綔鎸夐挳閫氱敤鏍峰紡 */
+:deep(.el-table .el-button--text) {
+ padding: 4px 6px;
+ font-size: 12px;
+}
+
+/* 閲嶅垎閰嶆寜閽牱寮� */
+:deep(.el-button--text.redistribute-btn) {
+ color: #e6a23c;
+}
+
+:deep(.el-button--text.redistribute-btn:hover:not(:disabled)) {
+ color: #cf9236;
+}
+
+/* 浣滃簾鎸夐挳鏍峰紡 */
+:deep(.el-button--text.invalidate-btn) {
+ color: #f56c6c;
+}
+
+:deep(.el-button--text.invalidate-btn:hover:not(:disabled)) {
+ color: #d9534f;
+}
+
+/* 绂佺敤鐘舵�佺殑鎸夐挳鏍峰紡 */
+:deep(.el-button--text.is-disabled) {
+ color: #c0c4cc !important;
+ cursor: not-allowed !important;
+ opacity: 0.5;
+}
+
+/* 閲嶅垎閰嶄俊鎭彁绀烘鏍峰紡 */
+:deep(.el-tooltip__popper) {
+ max-width: 300px;
+ white-space: pre-line;
+ line-height: 1.6;
+}
+
+/* 绂佺敤鐘舵�佺殑杈撳叆妗嗘牱寮� */
+:deep(.el-input.is-disabled .el-input__inner) {
+ background-color: #f5f7fa;
+ border-color: #e4e7ed;
+ color: #c0c4cc;
+ cursor: not-allowed;
+}
+
+:deep(.el-textarea.is-disabled .el-textarea__inner) {
+ background-color: #f5f7fa;
+ border-color: #e4e7ed;
+ color: #c0c4cc;
+ cursor: not-allowed;
}
/* 鍝嶅簲寮忚璁� */
@@ -1369,5 +2138,11 @@
.allocation-stats .el-col {
margin-bottom: 10px;
}
+
+ /* 绉诲姩绔搷浣滄寜閽牱寮忚皟鏁� */
+ :deep(.el-table .el-button--text) {
+ padding: 2px 4px;
+ font-size: 11px;
+ }
}
</style>
diff --git a/src/views/business/course/components/OrganProcurementStage.vue b/src/views/business/course/components/OrganProcurementStage.vue
index 4bbbf52..fe95cd1 100644
--- a/src/views/business/course/components/OrganProcurementStage.vue
+++ b/src/views/business/course/components/OrganProcurementStage.vue
@@ -5,7 +5,6 @@
<el-card class="detail-card">
<div slot="header" class="clearfix">
<span class="detail-title">鍣ㄥ畼鑾峰彇鍩烘湰淇℃伅</span>
-
</div>
<el-form :model="form" ref="form" :rules="rules" label-width="120px">
@@ -124,19 +123,35 @@
</el-row>
<el-row :gutter="20">
- <el-col :span="8">
+ <!-- <el-col :span="8">
<el-form-item label="鍗忚皟鍛樼瀛�" prop="coordinatorSign">
<el-input v-model="form.coordinatorSign" />
</el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="绛惧瓧鏃堕棿" prop="coordinatorSignTime">
+ </el-col> -->
+ <!-- <el-col :span="8">
+ <el-form-item label="鑾峰彇鏃堕棿" prop="coordinatorSignTime">
<el-date-picker
v-model="form.coordinatorSignTime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
style="width: 100%"
/>
+ </el-form-item>
+ </el-col> -->
+ <el-col :span="8">
+ <el-form-item label="鏄惁榛樺搥缂呮��" prop="isspendremember">
+ <el-select v-model="form.isspendremember" style="width: 100%">
+ <el-option label="鏄�" :value="1" />
+ <el-option label="鍚�" :value="0" />
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="鎭㈠閬椾綋浠" prop="isrestoreremains">
+ <el-select v-model="form.isrestoreremains" style="width: 100%">
+ <el-option label="鏄�" :value="1" />
+ <el-option label="鍚�" :value="0" />
+ </el-select>
</el-form-item>
</el-col>
</el-row>
@@ -151,12 +166,12 @@
</el-form-item>
</el-col>
<el-col :span="8">
- <el-form-item label="鑱旂粶浜轰竴" prop="coordinatedusernameo">
+ <el-form-item label="鍗忚皟鍛樹竴" prop="coordinatedusernameo">
<el-input v-model="form.coordinatedusernameo" />
</el-form-item>
</el-col>
<el-col :span="8">
- <el-form-item label="鑱旂粶浜轰簩" prop="coordinatedusernamet">
+ <el-form-item label="鍗忚皟鍛樹簩" prop="coordinatedusernamet">
<el-input v-model="form.coordinatedusernamet" />
</el-form-item>
</el-col>
@@ -174,14 +189,14 @@
/>
</el-form-item>
</el-col>
- <el-col :span="8">
- <el-form-item label="鑾峰彇鏈烘瀯缂栫爜" prop="gainhospitalno">
+ <!-- <el-col :span="8">
+ <el-form-item label="鎹愮尞缂栧彿" prop="gainhospitalno">
<el-input
v-model="form.gainhospitalno"
- placeholder="璇疯緭鍏ヨ幏鍙栨満鏋勭紪鐮�"
+ placeholder="璇疯緭鍏ユ崘鐚紪鍙�"
/>
</el-form-item>
- </el-col>
+ </el-col> -->
</el-row>
</el-form>
</el-card>
@@ -191,7 +206,6 @@
<div slot="header" class="clearfix">
<span class="detail-title">鍣ㄥ畼鑾峰彇璁板綍</span>
<div style="float: right;">
-
<dict-tag
:options="dict.type.Obtain_status"
:value="form.witnessState"
@@ -228,7 +242,7 @@
<el-col>
<el-form-item>
<el-table
- :data="procurementData.serviceDonationwitnessorgans"
+ :data="displayOrgans"
v-loading="loading"
border
style="width: 100%"
@@ -252,7 +266,7 @@
<el-table-column
label="鑾峰彇寮�濮嬫椂闂�"
align="center"
- width="180"
+ width="260"
prop="organStartTime"
>
<template slot-scope="scope">
@@ -271,7 +285,7 @@
<el-table-column
label="鍣ㄥ畼绂讳綋鏃堕棿"
align="center"
- width="180"
+ width="260"
prop="organgettime"
>
<template slot-scope="scope">
@@ -290,30 +304,39 @@
<el-table-column
label="鑾峰彇鍖婚櫌"
align="center"
- width="200"
- prop="gainhospitalno"
+ width="300"
+ prop="gainhospitalname"
>
- <template slot-scope="scope">
+ <!-- <template slot-scope="scope">
<el-select
- v-model="scope.row.gainhospitalno"
+ v-model="scope.row.gainhospitalname"
placeholder="璇烽�夋嫨鑾峰彇鍖婚櫌"
style="width: 100%"
- @change="handleHospitalChange(scope.row, $event)"
>
<el-option
- v-for="hospital in hospitalList"
- :key="hospital.hospitalNo"
- :label="hospital.hospitalName"
- :value="hospital.hospitalNo"
- />
+ v-for="dict in dict.type.Geta_hospital"
+ :key="dict.value"
+ :label="dict.label"
+ :value="dict.value"
+ ></el-option>
+
</el-select>
+ </template> -->
+ <template slot-scope="scope">
+ <el-autocomplete
+ v-model="scope.row.gainhospitalname"
+ :fetch-suggestions="queryHospitalSearch"
+ placeholder="璇烽�夋嫨鎴栬緭鍏ヨ幏鍙栧尰闄�"
+ style="width: 100%"
+ clearable
+ ></el-autocomplete>
</template>
</el-table-column>
<el-table-column
label="鑾峰彇鍖诲笀"
align="center"
- width="120"
+ width="150"
prop="organgetdoct"
>
<template slot-scope="scope">
@@ -325,51 +348,6 @@
</el-table-column>
<!-- <el-table-column
- label="鍔╂墜"
- align="center"
- width="120"
- prop="assistant"
- >
- <template slot-scope="scope">
- <el-input
- v-model="scope.row.assistant"
- placeholder="鍔╂墜"
-
- />
- </template>
- </el-table-column> -->
-
- <!-- <el-table-column
- label="鑾峰彇鎶ゅ+"
- align="center"
- width="120"
- prop="procurementNurse"
- >
- <template slot-scope="scope">
- <el-input
- v-model="scope.row.procurementNurse"
- placeholder="鑾峰彇鎶ゅ+"
-
- />
- </template>
- </el-table-column>
-
- <el-table-column
- label="鎵嬫湳瀹ゆ姢澹�"
- align="center"
- width="120"
- prop="operatingRoomNurse"
- >
- <template slot-scope="scope">
- <el-input
- v-model="scope.row.operatingRoomNurse"
- placeholder="鎵嬫湳瀹ゆ姢澹�"
-
- />
- </template>
- </el-table-column> -->
-
- <el-table-column
label="鑾峰彇鐘舵��"
align="center"
width="120"
@@ -389,7 +367,7 @@
/>
</el-select>
</template>
- </el-table-column>
+ </el-table-column> -->
<el-table-column
label="璇存槑"
@@ -429,55 +407,6 @@
</el-col>
</el-row>
- <!-- 鑾峰彇缁熻淇℃伅 -->
- <!-- <div
- class="procurement-stats"
- v-if="
- procurementData.serviceDonationwitnessorgans &&
- procurementData.serviceDonationwitnessorgans.length > 0
- "
- >
- <el-row :gutter="20">
- <el-col :span="6">
- <div class="stat-item">
- <span class="stat-label">宸茶幏鍙栧櫒瀹�:</span>
- <span class="stat-value"
- >{{
- procurementData.serviceDonationwitnessorgans.length
- }}
- 涓�</span
- >
- </div>
- </el-col>
- <el-col :span="6">
- <div class="stat-item">
- <span class="stat-label">寰呭畬鍠勪俊鎭�:</span>
- <span class="stat-value">{{ incompleteRecords }} 涓�</span>
- </div>
- </el-col>
- <el-col :span="6">
- <div class="stat-item">
- <span class="stat-label">娑夊強鍖婚櫌:</span>
- <span class="stat-value">{{ uniqueHospitals }} 瀹�</span>
- </div>
- </el-col>
- <el-col :span="6">
- <div class="stat-item">
- <span class="stat-label">鑾峰彇鐘舵��:</span>
- <span class="stat-value">
- <el-tag
- :type="
- form.witnessState === 'completed' ? 'success' : 'warning'
- "
- >
- {{ form.witnessState === "completed" ? "宸插畬鎴�" : "杩涜涓�" }}
- </el-tag>
- </span>
- </div>
- </el-col>
- </el-row>
- </div> -->
-
<div
v-if="!procurementData.serviceDonationwitnessorgans"
class="empty-procurement"
@@ -489,89 +418,130 @@
</el-form>
</el-card>
- <!-- 闄勪欢绠$悊閮ㄥ垎浼樺寲 -->
+ <!-- 闄勪欢绠$悊閮ㄥ垎 - 鍒嗙被Tab灞曠ず -->
<el-card class="attachment-card">
- <div class="attachment-header">
- <i class="el-icon-paperclip"></i>
- <span class="attachment-title">鐩稿叧闄勪欢</span>
- <span class="attachment-tip"
- >鏀寔涓婁紶鍣ㄥ畼鑾峰彇鐩稿叧鏂囦欢 (鏈�澶歿{ attachmentLimit }}涓�)</span
- >
+ <div slot="header" class="clearfix">
+ <span class="detail-title">鐩稿叧闄勪欢</span>
</div>
- <!-- 浣跨敤 UploadAttachment 缁勪欢 -->
- <UploadAttachment
- ref="uploadAttachment"
- :file-list="attachmentFileList"
- :limit="attachmentLimit"
- :accept="attachmentAccept"
- :multiple="true"
- @change="handleAttachmentChange"
- @upload-success="handleUploadSuccess"
- @upload-error="handleUploadError"
- @remove="handleAttachmentRemove"
- />
+ <!-- 涓婁紶鍖哄煙锛堟棤鍒嗙被閫夋嫨锛岀敱Tab鎺у埗锛� -->
+ <div class="upload-wrapper">
+ <UploadAttachment
+ ref="uploadAttachment"
+ :file-list="attachmentFileList"
+ :limit="attachmentLimit"
+ :accept="attachmentAccept"
+ :multiple="true"
+ @change="handleAttachmentChange"
+ @upload-success="handleUploadSuccess"
+ @upload-error="handleUploadError"
+ @remove="handleAttachmentRemove"
+ />
+ <div style="font-size:12px; color:#909399; margin-top:4px;">
+ 褰撳墠涓婁紶鍒嗙被锛�<el-tag size="small" type="info">{{
+ activeTab === "鏈垎绫�" ? "鏈垎绫�" : activeTab
+ }}</el-tag>
+ 锛堝垏鎹� Tab 鍙敼鍙樹笂浼犲垎绫伙級
+ </div>
+ </div>
- <!-- 闄勪欢鍒楄〃灞曠ず -->
+ <!-- 闄勪欢鍒楄〃 - 鍒嗙被Tab灞曠ず锛屾敮鎸佷慨鏀瑰垎绫� -->
<div class="attachment-list" v-if="attachments && attachments.length > 0">
- <div class="list-title">宸蹭笂浼犻檮浠� ({{ attachments.length }})</div>
- <el-table :data="attachments" style="width: 100%" size="small">
- <el-table-column label="鏂囦欢鍚�" min-width="200">
- <template slot-scope="scope">
- <i
- class="el-icon-document"
- :style="{ color: getFileIconColor(scope.row.fileName) }"
- ></i>
- <span class="file-name">{{ scope.row.fileName }}</span>
- </template>
- </el-table-column>
- <el-table-column label="鏂囦欢绫诲瀷" width="100">
- <template slot-scope="scope">
- <el-tag :type="getFileTagType(scope.row.fileName)" size="small">
- {{ getFileTypeText(scope.row.fileName) }}
- </el-tag>
- </template>
- </el-table-column>
- <el-table-column label="涓婁紶鏃堕棿" width="160">
- <template slot-scope="scope">
- <span>{{ formatDateTime(scope.row.uploadTime) }}</span>
- </template>
- </el-table-column>
- <el-table-column label="鏂囦欢澶у皬" width="100">
- <template slot-scope="scope">
- <span>{{ formatFileSize(scope.row.fileSize) }}</span>
- </template>
- </el-table-column>
- <el-table-column label="鎿嶄綔" width="200" fixed="right">
- <template slot-scope="scope">
- <el-button
- size="mini"
- type="primary"
- @click="handlePreview(scope.row)"
- :disabled="!isPreviewable(scope.row.fileName)"
- >
- 棰勮
- </el-button>
- <el-button
- size="mini"
- type="success"
- @click="handleDownload(scope.row)"
- >
- 涓嬭浇
- </el-button>
- <el-button
- size="mini"
- type="danger"
- @click="handleRemoveAttachment(scope.$index)"
- >
- 鍒犻櫎
- </el-button>
- </template>
- </el-table-column>
- </el-table>
+ <el-tabs v-model="activeTab" type="border-card">
+ <el-tab-pane
+ v-for="category in categories"
+ :key="category"
+ :label="category + '(' + getCategoryCount(category) + ')'"
+ :name="category"
+ >
+ <el-table
+ :data="getCategoryFiles(category)"
+ style="width: 100%"
+ size="small"
+ border
+ >
+ <el-table-column label="鏂囦欢鍚�" min-width="180">
+ <template #default="scope">
+ <i
+ class="el-icon-document"
+ style="margin-right: 8px; color: #409EFF;"
+ ></i>
+ <span class="file-name">{{ scope.row.fileName }}</span>
+ </template>
+ </el-table-column>
+ <!-- 鍙紪杈戝垎绫讳笅鎷� -->
+ <el-table-column label="鍒嗙被" width="150">
+ <template #default="scope">
+ <el-select
+ v-model="scope.row.fileType"
+ size="small"
+ @change="updateAttachmentCategory(scope.row, $event)"
+ placeholder="閫夋嫨鍒嗙被"
+ >
+ <el-option label="鍘熻〃鎷嶇収" value="鍘熻〃鎷嶇収" />
+ <el-option label="浼︾悊瀹℃煡鏉愭枡" value="浼︾悊瀹℃煡鏉愭枡" />
+ <el-option label="姝讳骸鍒ゅ畾鏉愭枡" value="姝讳骸鍒ゅ畾鏉愭枡" />
+ <el-option label="榛樺搥浠紡鐓х墖" value="榛樺搥浠紡鐓х墖" />
+ <el-option label="鎹愮尞瑙佽瘉瑙嗛" value="鎹愮尞瑙佽瘉瑙嗛" />
+ <el-option label="鏈垎绫�" value="" />
+ </el-select>
+ </template>
+ </el-table-column>
+ <el-table-column label="鏂囦欢绫诲瀷" width="100">
+ <template #default="scope">
+ <el-tag size="small">{{
+ getFileTypeText(scope.row.fileName)
+ }}</el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column label="涓婁紶鏃堕棿" width="160">
+ <template #default="scope">
+ <span>{{ formatDateTime(scope.row.uploadTime) }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column label="鏂囦欢澶у皬" width="100">
+ <template #default="scope">
+ <span>{{ formatFileSize(scope.row.fileSize) }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column label="鎿嶄綔" width="180" fixed="right">
+ <template #default="scope">
+ <el-button
+ size="mini"
+ type="primary"
+ @click="handlePreview(scope.row)"
+ >棰勮</el-button
+ >
+ <el-button
+ size="mini"
+ type="danger"
+ @click="handleRemoveAttachmentByFile(scope.row)"
+ >鍒犻櫎</el-button
+ >
+ </template>
+ </el-table-column>
+ </el-table>
+ </el-tab-pane>
+ </el-tabs>
+ </div>
+
+ <!-- 鏃犻檮浠舵椂鏄剧ず -->
+ <div v-else style="text-align:center; padding:20px; color:#909399;">
+ 鏆傛棤闄勪欢锛岃涓婁紶
</div>
</el-card>
-
+ <div style="text-align: center; margin: 30px 0;">
+ <el-button type="primary" @click="handleSave" :loading="saveLoading">
+ 淇濆瓨
+ </el-button>
+ <el-button
+ type="success"
+ @click="handleProcure"
+ :loading="confirmLoading"
+ >
+ 纭鑾峰彇
+ </el-button>
+ </div>
<!-- 缂栬緫鑾峰彇璁板綍瀵硅瘽妗� -->
<el-dialog
title="缂栬緫鍣ㄥ畼鑾峰彇璁板綍"
@@ -585,7 +555,7 @@
<el-input v-model="currentRecord.organname" readonly />
</el-form-item>
</el-col>
- <el-col :span="12">
+ <!-- <el-col :span="12">
<el-form-item label="鑾峰彇鐘舵��">
<el-select v-model="currentRecord.organstate" style="width: 100%">
<el-option
@@ -596,7 +566,7 @@
/>
</el-select>
</el-form-item>
- </el-col>
+ </el-col> -->
</el-row>
<el-row :gutter="20">
@@ -644,10 +614,7 @@
/>
</el-form-item>
- <el-form-item
- label="鏈幏鍙栬鏄�"
- v-if="currentRecord.organstate === '0'"
- >
+ <el-form-item label="鏈幏鍙栬鏄�">
<el-input
type="textarea"
:rows="3"
@@ -706,11 +673,12 @@
},
dicts: [
"sys_BloodType",
+ "Geta_hospital",
"sys_DonationCategory",
"sys_Organ",
"Obtain_status"
],
- props: {
+ props: {
infoid: {
type: String,
default: true
@@ -772,6 +740,18 @@
coordinatorSignTime: "",
attachments: []
},
+ activeTab: "鍘熻〃鎷嶇収", // 褰撳墠婵�娲荤殑闄勪欢鍒嗙被Tab
+ presetCategories: [
+ "鍘熻〃鎷嶇収",
+ "浼︾悊瀹℃煡鏉愭枡",
+ "姝讳骸鍒ゅ畾鏉愭枡",
+ "榛樺搥浠紡鐓х墖",
+ "鎹愮尞瑙佽瘉瑙嗛"
+ ], // 棰勮鍒嗙被
+ organExpansionMap: {
+ C64: { subItems: ["C64L", "C64R"], subNames: ["宸﹁偩", "鍙宠偩"] },
+ C34: { subItems: ["C34L", "C34R"], subNames: ["宸﹁偤", "鍙宠偤"] }
+ },
// 琛ㄥ崟楠岃瘉瑙勫垯
rules: {
name: [
@@ -823,6 +803,32 @@
// 褰撳墠鐢ㄦ埛淇℃伅
currentUser() {
return JSON.parse(sessionStorage.getItem("user") || "{}");
+ },
+ displayOrgans() {
+ return (this.procurementData.serviceDonationwitnessorgans || []).filter(
+ item => item.delFlag !== 1
+ );
+ },
+ categories() {
+ // 濮嬬粓杩斿洖鎵�鏈夐璁惧垎绫� + 鏈垎绫伙紝鏃犺鏄惁鏈夋暟鎹�
+ return [
+ "鍘熻〃鎷嶇収",
+ "浼︾悊瀹℃煡鏉愭枡",
+ "姝讳骸鍒ゅ畾鏉愭枡",
+ "榛樺搥浠紡鐓х墖",
+ "鎹愮尞瑙佽瘉瑙嗛",
+ "鏈垎绫�"
+ ];
+ },
+ organReverseMap() {
+ const map = {};
+ for (const key in this.organExpansionMap) {
+ const { subItems } = this.organExpansionMap[key];
+ subItems.forEach(item => {
+ map[item] = key;
+ });
+ }
+ return map;
},
// 涓嶅畬鏁寸殑璁板綍鏁伴噺
incompleteRecords() {
@@ -878,8 +884,7 @@
// 鍒濆鍖栨暟鎹�
initData() {
- const id = null;
- const infoid = this.infoid;
+ const infoid = this.infoid;
if (!infoid) {
this.$message.error("缂哄皯蹇呰鐨勮矾鐢卞弬鏁� infoid");
@@ -896,13 +901,18 @@
this.getHospitalData();
},
- // 鐢熸垚鎹愮尞鑰呯紪鍙�
- // generateDonorNo() {
- // const timestamp = Date.now().toString();
- // this.form.donorno = "D" + timestamp.slice(-8);
- // this.form.caseNo = "CASE" + timestamp.slice(-6);
- // this.form.inpatientno = "IP" + timestamp.slice(-6);
- // },
+ getOrganNameByNo(organno) {
+ // 妫�鏌ユ槸鍚﹀湪鏄犲皠鐨勫瓙椤逛腑
+ for (const key in this.organExpansionMap) {
+ const { subItems, subNames } = this.organExpansionMap[key];
+ const idx = subItems.indexOf(organno);
+ if (idx !== -1) {
+ return subNames[idx];
+ }
+ }
+ // 鍚﹀垯浠庡瓧鍏镐腑鑾峰彇
+ return this.getOrganLabel(organno);
+ },
// 鑾峰彇璇︽儏
async getDetail(infoid) {
this.loading = true;
@@ -923,10 +933,25 @@
// 鍒濆鍖栭檮浠�
if (this.form.deathjudgeannex) {
- this.form.attachments = JSON.parse(this.form.deathjudgeannex);
- this.attachments = Array.isArray(this.form.attachments)
- ? [...this.form.attachments]
- : [];
+ const parsed = JSON.parse(this.form.deathjudgeannex);
+ this.attachments = parsed.map(item => ({
+ ...item,
+ fileType: item.fileType || "" // 榛樿绌哄瓧绗︿覆琛ㄧず鏈垎绫�
+ }));
+ this.form.attachments = this.attachments;
+ // 鍚屾 attachmentFileList
+ this.attachmentFileList = this.attachments.map(item => ({
+ uid: item.id || Math.random(),
+ name: item.fileName,
+ url: item.path || item.fileUrl,
+ fileSize: item.fileSize,
+ uploadTime: item.uploadTime,
+ status: "success",
+ raw: item
+ }));
+ } else {
+ this.attachments = [];
+ this.attachmentFileList = [];
}
// 澶勭悊鎹愮尞鍣ㄥ畼瀛楁
@@ -948,6 +973,7 @@
}
this.$message.success("鏁版嵁鍔犺浇鎴愬姛");
+ this.syncOrgansFromSelection();
} else {
this.$message.warning("鏈壘鍒板搴旂殑鍣ㄥ畼鑾峰彇鏁版嵁");
}
@@ -957,6 +983,52 @@
} finally {
this.loading = false;
}
+ },
+ syncOrgansFromSelection() {
+ const records = this.procurementData.serviceDonationwitnessorgans || [];
+ const targetNos = [];
+ this.selectedOrgans.forEach(val => {
+ if (this.organExpansionMap[val]) {
+ targetNos.push(...this.organExpansionMap[val].subItems);
+ } else {
+ targetNos.push(val);
+ }
+ });
+
+ // 鏂板鎴栨仮澶�
+ targetNos.forEach(no => {
+ const existing = records.find(r => r.organno === no);
+ if (existing) {
+ if (existing.delFlag === 1) {
+ existing.delFlag = 0; // 鎭㈠鏄剧ず
+ }
+ } else {
+ records.push({
+ id: null,
+ organname: this.getOrganNameByNo(no),
+ organno: no,
+ organStartTime: "",
+ organgettime: "",
+ gainhospitalno: "",
+ gainhospitalname: "",
+ organgetdoct: "",
+ assistant: "",
+ procurementNurse: "",
+ operatingRoomNurse: "",
+ anesthesiologist: "",
+ organstate: "1",
+ notgetreason: "",
+ delFlag: 0
+ });
+ }
+ });
+
+ // 锛堝彲閫夛級濡傛灉鍔犺浇鏃跺悗绔繑鍥炰簡 delFlag=1 鐨勮褰曪紝浣嗗疄闄呭簲璇ユ樉绀猴紝寮哄埗閲嶇疆
+ records.forEach(r => {
+ if (r.delFlag === 1) r.delFlag = 0;
+ });
+
+ this.form.organdonation = this.selectedOrgans.join(",");
},
// 鑾峰彇鍖婚櫌鏁版嵁
async getHospitalData() {
@@ -975,87 +1047,139 @@
this.$message.error("鑾峰彇鍖婚櫌鏁版嵁澶辫触");
}
},
+ // 绉绘鍖婚櫌妯$硦鎼滅储
+ queryHospitalSearch(queryString, cb) {
+ const hospitals = this.dict.type.Geta_hospital || [];
+ const results = queryString
+ ? hospitals.filter(item =>
+ item.label.toLowerCase().includes(queryString.toLowerCase())
+ )
+ : hospitals;
+
+ // el-autocomplete 闇�瑕� value 瀛楁
+ cb(results.map(item => ({ value: item.label })));
+ },
// 鍣ㄥ畼閫夋嫨鐘舵�佸彉鍖�
- handleOrganSelectionChange(selectedValues) {
- if (!this.procurementData.serviceDonationwitnessorgans) {
- this.procurementData.serviceDonationwitnessorgans = [];
- }
-
- const currentOrganValues = this.procurementData.serviceDonationwitnessorgans.map(
- item => item.organno
- );
-
- // 澶勭悊浜掓枼閫昏緫
+ async handleOrganSelectionChange(selectedValues) {
+ // 1. 澶勭悊浜掓枼閫昏緫锛堜慨鏀� this.selectedOrgans锛�
this.handleExclusiveSelections(selectedValues);
- // 鏇存柊鎹愮尞鍣ㄥ畼瀛楁
- this.form.organdonation = selectedValues.join(",");
+ const finalSelected = this.selectedOrgans;
+ const records = this.procurementData.serviceDonationwitnessorgans || [];
- // 鏂板閫夋嫨鐨勫櫒瀹�
- selectedValues.forEach(organValue => {
- if (!currentOrganValues.includes(organValue)) {
- this.createOrganRecord(organValue);
+ // 2. 鏋勫缓鐩爣鍣ㄥ畼缂栧彿鍒楄〃锛堝睍寮�缁勫悎鍣ㄥ畼锛�
+ const targetOrganNos = [];
+ finalSelected.forEach(val => {
+ if (this.organExpansionMap[val]) {
+ targetOrganNos.push(...this.organExpansionMap[val].subItems);
+ } else {
+ targetOrganNos.push(val);
}
});
- // 绉婚櫎鍙栨秷閫夋嫨鐨勫櫒瀹�
- this.procurementData.serviceDonationwitnessorgans = this.procurementData.serviceDonationwitnessorgans.filter(
- record => {
- if (selectedValues.includes(record.organno)) {
- return true;
- } else {
- if (record.id) {
- this.$confirm(
- "鍒犻櫎鍣ㄥ畼鑾峰彇鏁版嵁鍚庡皢鏃犳硶鎭㈠锛屾偍纭鍒犻櫎璇ユ潯璁板綍鍚楋紵",
- "鎻愮ず",
- {
- confirmButtonText: "纭畾",
- cancelButtonText: "鍙栨秷",
- type: "warning"
- }
- )
- .then(() => {
- this.procurementData.serviceDonationwitnessorgans = this.procurementData.serviceDonationwitnessorgans.filter(
- r => r.organno !== record.organno
- );
- this.$message.success("鍒犻櫎鎴愬姛");
- })
- .catch(() => {
- this.selectedOrgans.push(record.organno);
- });
- return true;
- } else {
- return false;
- }
+ // 3. 鏂板鎴栨仮澶嶇洰鏍囧櫒瀹樿褰曪紙鏃犲脊绐楋級
+ targetOrganNos.forEach(no => {
+ const existing = records.find(r => r.organno === no);
+ if (existing) {
+ if (existing.delFlag === 1) {
+ existing.delFlag = 0; // 鎭㈠鏄剧ず
}
+ } else {
+ records.push({
+ id: null,
+ organname: this.getOrganNameByNo(no),
+ organno: no,
+ organStartTime: "",
+ organgettime: "",
+ gainhospitalno: "",
+ gainhospitalname: "",
+ organgetdoct: "",
+ assistant: "",
+ procurementNurse: "",
+ operatingRoomNurse: "",
+ anesthesiologist: "",
+ organstate: "1",
+ notgetreason: "",
+ delFlag: 0
+ });
}
- );
+ });
+
+ // 4. 鎵惧嚭闇�瑕佸彇娑堢殑璁板綍锛堜笉鍦ㄧ洰鏍囬泦鍚堜腑锛�
+ const toRemove = records.filter(r => !targetOrganNos.includes(r.organno));
+ const toRemoveSaved = toRemove.filter(r => r.id); // 宸蹭繚瀛橈紝闇�纭
+ const toRemoveUnsaved = toRemove.filter(r => !r.id); // 鏈繚瀛橈紝鐩存帴绉婚櫎
+
+ // 4.1 鐩存帴绉婚櫎鏈繚瀛樼殑璁板綍
+ toRemoveUnsaved.forEach(r => {
+ const idx = records.indexOf(r);
+ if (idx !== -1) records.splice(idx, 1);
+ });
+
+ // 4.2 澶勭悊宸蹭繚瀛樼殑璁板綍锛氬脊绐楃‘璁�
+ if (toRemoveSaved.length > 0) {
+ const organNames = toRemoveSaved.map(r => r.organname).join("銆�");
+ try {
+ await this.$confirm(
+ `鎮ㄧ‘瀹氳鍙栨秷浠ヤ笅宸蹭繚瀛樼殑鍣ㄥ畼鑾峰彇璁板綍鍚楋紵\n${organNames}\n鍙栨秷鍚庯紝杩欎簺璁板綍灏嗕粠鍒楄〃涓Щ闄わ紙鏁版嵁浠嶄繚鐣欙紝鍙仮澶嶏級銆俙,
+ "鎻愮ず",
+ {
+ confirmButtonText: "纭畾绉婚櫎",
+ cancelButtonText: "鍙栨秷",
+ type: "warning"
+ }
+ );
+ // 鐢ㄦ埛纭锛氭爣璁� delFlag=1
+ toRemoveSaved.forEach(r => {
+ r.delFlag = 1;
+ });
+ } catch (error) {
+ // 鐢ㄦ埛鍙栨秷锛氭仮澶嶉�変腑鐘舵��
+ const parentToRestore = new Set();
+ toRemoveSaved.forEach(r => {
+ const parent = this.organReverseMap[r.organno];
+ if (parent) {
+ parentToRestore.add(parent);
+ } else {
+ parentToRestore.add(r.organno);
+ }
+ });
+ parentToRestore.forEach(val => {
+ if (!this.selectedOrgans.includes(val)) {
+ this.selectedOrgans.push(val);
+ }
+ });
+ this.$message.info("宸插彇娑堝垹闄ゆ搷浣�");
+ // 鏇存柊琛ㄥ崟瀛楁锛堜繚鎸佷竴鑷存�э級
+ this.form.organdonation = this.selectedOrgans.join(",");
+ return; // 閫�鍑烘柟娉曪紝閬垮厤缁х画鎵ц
+ }
+ }
+
+ // 5. 鏇存柊琛ㄥ崟瀛楁
+ this.form.organdonation = this.selectedOrgans.join(",");
},
// 澶勭悊浜掓枼閫夋嫨
handleExclusiveSelections(selectedValues) {
- // 濡傛灉閫夋嫨浜�"鍙岃偩"(鍋囪瀛楀吀鍊间负C64)锛岃嚜鍔ㄥ彇娑堝崟鐙殑"宸﹁偩"(C64L)鍜�"鍙宠偩"(C64R)閫夋嫨
+ // 鍙岃偩涓庡乏鍙宠偩浜掓枼
if (selectedValues.includes("C64")) {
this.selectedOrgans = selectedValues.filter(
item => item !== "C64L" && item !== "C64R"
);
- }
- // 濡傛灉閫夋嫨浜�"宸﹁偩"鎴�"鍙宠偩"锛屽彇娑�"鍙岃偩"閫夋嫨
- else if (
+ } else if (
selectedValues.includes("C64L") ||
selectedValues.includes("C64R")
) {
this.selectedOrgans = selectedValues.filter(item => item !== "C64");
}
- // 濡傛灉閫夋嫨浜�"鍏ㄨ偤"(鍋囪瀛楀吀鍊间负C34)锛岃嚜鍔ㄥ彇娑堝崟鐙殑"宸﹁偤"(C34L)鍜�"鍙宠偤"(C34R)閫夋嫨
+ // 鍏ㄨ偤涓庡乏鍙宠偤浜掓枼
if (selectedValues.includes("C34")) {
this.selectedOrgans = selectedValues.filter(
item => item !== "C34L" && item !== "C34R"
);
- }
- // 濡傛灉閫夋嫨浜�"宸﹁偤"鎴�"鍙宠偤"锛屽彇娑�"鍏ㄨ偤"閫夋嫨
- else if (
+ } else if (
selectedValues.includes("C34L") ||
selectedValues.includes("C34R")
) {
@@ -1135,13 +1259,19 @@
if (valid) {
this.saveLoading = true;
try {
+ console.log(this.procurementData.serviceDonationwitnessorgans);
+
const saveData = {
...this.form,
deathjudgeannex: JSON.stringify(this.attachments),
organdonation: this.selectedOrgans.join(","),
serviceDonationwitnessorganList:
+ this.procurementData.serviceDonationwitnessorgans || [],
+ serviceDonationwitnessorgans:
this.procurementData.serviceDonationwitnessorgans || []
};
+ console.log(saveData.serviceDonationwitnessorganList);
+ console.log(saveData.serviceDonationwitnessorgans);
const apiMethod = this.form.id ? witnessedit : witnessadd;
const response = await apiMethod(saveData);
@@ -1264,40 +1394,101 @@
},
/** 闄勪欢绉婚櫎澶勭悊 */
- handleAttachmentRemove(file) {
- if (file.url) {
- const index = this.attachments.findIndex(
- item => item.path === file.url || item.fileUrl === file.url
- );
- if (index > -1) {
- this.attachments.splice(index, 1);
- this.$message.success("闄勪欢鍒犻櫎鎴愬姛");
- }
- }
- },
+ handleAttachmentRemove(file) {
+ // 鐩存帴璋冪敤鏂扮殑鍒犻櫎鏂规硶
+ if (file.raw) {
+ this.handleRemoveAttachmentByFile(file.raw);
+ } else if (file.url) {
+ const target = this.attachments.find(
+ item => item.path === file.url || item.fileUrl === file.url
+ );
+ if (target) {
+ this.handleRemoveAttachmentByFile(target);
+ }
+ }
+},
/** 涓婁紶鎴愬姛澶勭悊 */
handleUploadSuccess({ file, fileList, response }) {
- if (response.code === 200) {
- const attachmentObj = {
- fileName: file.name,
- path: response.fileUrl || file.url,
- fileUrl: response.fileUrl || file.url,
- fileType: this.getFileExtension(file.name),
- fileSize: file.size,
- uploadTime: dayjs().format("YYYY-MM-DD HH:mm:ss")
- };
+ if (response.code === 200) {
+ // 鏍规嵁褰撳墠婵�娲荤殑 Tab 鍐冲畾鍒嗙被锛堟湭鍒嗙被 Tab 瀵瑰簲绌哄瓧绗︿覆锛�
+ const category = this.activeTab === '鏈垎绫�' ? '' : this.activeTab;
+ const attachmentObj = {
+ fileName: file.name,
+ path: response.fileUrl || file.url,
+ fileUrl: response.fileUrl || file.url,
+ fileType: category, // 鍏抽敭锛氳褰曞垎绫�
+ fileSize: file.size,
+ uploadTime: dayjs().format('YYYY-MM-DD HH:mm:ss')
+ };
- if (!Array.isArray(this.attachments)) {
- this.attachments = [];
- }
+ if (!Array.isArray(this.attachments)) {
+ this.attachments = [];
+ }
+ this.attachments.push(attachmentObj);
+ this.attachmentFileList = fileList;
+ this.$message.success('鏂囦欢涓婁紶鎴愬姛');
+ }
+},
+// 鑾峰彇鏌愬垎绫荤殑鏂囦欢鏁伴噺
+getCategoryCount(category) {
+ return this.attachments.filter(item => {
+ const type = item.fileType || '';
+ if (category === '鏈垎绫�') {
+ return !this.presetCategories.includes(type);
+ }
+ return type === category;
+ }).length;
+},
- this.attachments.push(attachmentObj);
- this.attachmentFileList = fileList;
- this.$message.success("鏂囦欢涓婁紶鎴愬姛");
- }
- },
+// 鑾峰彇鏌愬垎绫荤殑鏂囦欢鍒楄〃
+getCategoryFiles(category) {
+ return this.attachments.filter(item => {
+ const type = item.fileType || '';
+ if (category === '鏈垎绫�') {
+ return !this.presetCategories.includes(type);
+ }
+ return type === category;
+ });
+},
+// 鏇存柊闄勪欢鍒嗙被锛堜笅鎷変慨鏀规椂瑙﹀彂锛�
+updateAttachmentCategory(row, newVal) {
+ const target = this.attachments.find(item => item === row);
+ if (target) {
+ target.fileType = newVal; // 鍙兘涓虹┖瀛楃涓�
+ // 鍚屾鏇存柊 attachmentFileList
+ const fileItem = this.attachmentFileList.find(
+ f => f.raw === row || f.url === row.fileUrl
+ );
+ if (fileItem) {
+ fileItem.raw.fileType = newVal;
+ fileItem.fileType = newVal || '鏈垎绫�';
+ }
+ // 濡傛灉褰撳墠婵�娲荤殑tab娌℃湁鏂囦欢浜嗭紝鑷姩鍒囨崲鍒扮涓�涓湁鏂囦欢鐨則ab
+ const currentTabHasFiles = this.getCategoryFiles(this.activeTab).length > 0;
+ if (!currentTabHasFiles) {
+ const firstCategory = this.categories[0];
+ if (firstCategory) this.activeTab = firstCategory;
+ }
+ }
+},
+
+// 鎸夋枃浠跺璞″垹闄わ紙鐢ㄤ簬琛ㄦ牸涓殑鍒犻櫎鎸夐挳锛�
+handleRemoveAttachmentByFile(file) {
+ const index = this.attachments.findIndex(item => item === file);
+ if (index > -1) {
+ this.attachments.splice(index, 1);
+ // 鍚屾鍒犻櫎 attachmentFileList
+ const fileIndex = this.attachmentFileList.findIndex(
+ f => f.raw === file || f.url === file.fileUrl
+ );
+ if (fileIndex > -1) {
+ this.attachmentFileList.splice(fileIndex, 1);
+ }
+ this.$message.success('闄勪欢鍒犻櫎鎴愬姛');
+ }
+},
/** 涓婁紶閿欒澶勭悊 */
handleUploadError({ file, fileList, error }) {
console.error("闄勪欢涓婁紶澶辫触:", error);
diff --git a/src/views/business/course/components/OrganUtilizationStage.vue b/src/views/business/course/components/OrganUtilizationStage.vue
index 233eabe..0545d9b 100644
--- a/src/views/business/course/components/OrganUtilizationStage.vue
+++ b/src/views/business/course/components/OrganUtilizationStage.vue
@@ -5,7 +5,6 @@
<el-card class="detail-card">
<div slot="header" class="clearfix">
<span class="detail-title">鍣ㄥ畼鍒╃敤鍩烘湰淇℃伅</span>
-
</div>
<el-row :gutter="20">
@@ -45,7 +44,7 @@
</el-col>
</el-row>
- <el-row :gutter="20">
+ <!-- <el-row :gutter="20">
<el-col :span="12">
<el-form-item label="鐧昏浜�" prop="createBy">
<el-input v-model="form.createBy" />
@@ -61,7 +60,7 @@
/>
</el-form-item>
</el-col>
- </el-row>
+ </el-row> -->
</el-card>
<el-card class="detail-card">
<div slot="header" class="clearfix">
@@ -69,7 +68,7 @@
</div>
<el-row :gutter="20">
<el-col :span="6">
- <el-form-item align="left" label="閬椾綋鎹愮尞" prop="isbodydonation">
+ <el-form-item align="left" label="閬椾綋鎺ユ敹" prop="isbodydonation">
<el-radio-group v-model="form.isbodydonation">
<el-radio
v-for="dict in dict.type.sys_0_1 || []"
@@ -80,24 +79,28 @@
</el-radio-group>
</el-form-item>
</el-col>
- <el-col :span="18" v-if="form.isbodydonation == 1">
- <el-form-item
- align="left"
- label="鎺ユ敹鍗曚綅"
- prop="receivingunitname"
- >
- <el-input
- v-model="form.receivingunitname"
- placeholder="璇疯緭鍏ユ帴鏀跺崟浣�"
- />
- </el-form-item>
- </el-col>
- <el-col :span="8" v-else>
+
+ <el-col :span="8">
<el-form-item align="left" label="鎺ユ敹瀹跺睘" prop="relationname">
<el-input
v-model="form.relationname"
placeholder="璇疯緭鍏ユ帴鏀跺灞�"
/>
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="涓庢崘鐚�呭叧绯�" prop="signfamilyrelations">
+ <el-select
+ v-model="form.signfamilyrelations"
+ placeholder="璇烽�夋嫨涓庢崘鐚�呭叧绯�"
+ >
+ <el-option
+ v-for="dict in dict.type.sys_FamilyRelation || []"
+ :key="dict.value"
+ :label="dict.label"
+ :value="dict.value"
+ ></el-option>
+ </el-select>
</el-form-item>
</el-col>
</el-row>
@@ -144,7 +147,7 @@
<el-col>
<el-form-item>
<el-table
- :data="utilizationData.serviceDonatecomporganList"
+ :data="displayOrgans"
v-loading="loading"
border
style="width: 100%"
@@ -357,14 +360,14 @@
</template>
</el-table-column>
- <el-table-column label="绯荤粺缂栧彿" align="center" prop="caseNo">
+ <!-- <el-table-column label="绯荤粺缂栧彿" align="center" prop="caseNo">
<template slot-scope="scope">
<el-input
v-model="scope.row.caseNo"
placeholder="绯荤粺缂栧彿"
/>
</template>
- </el-table-column>
+ </el-table-column> -->
<el-table-column
label="绉绘鍖婚櫌"
@@ -373,22 +376,15 @@
prop="hospitalno"
>
<template slot-scope="scope">
- <el-select
- v-model="scope.row.hospitalno"
- placeholder="璇烽�夋嫨绉绘鍖婚櫌"
+ <el-autocomplete
+ v-model="scope.row.hospitalname"
+ :fetch-suggestions="queryHospitalSearch"
+ placeholder="璇烽�夋嫨鎴栬緭鍏ョЩ妞嶅尰闄�"
style="width: 100%"
- @change="handleHospitalChange(scope.row, $event)"
- >
- <el-option
- v-for="hospital in hospitalList"
- :key="hospital.hospitalNo"
- :label="hospital.hospitalName"
- :value="hospital.hospitalNo"
- />
- </el-select>
+ clearable
+ ></el-autocomplete>
</template>
</el-table-column>
-
<el-table-column
label="绉绘鐘舵��"
align="center"
@@ -470,89 +466,129 @@
</el-card>
<!-- 闄勪欢绠$悊閮ㄥ垎 -->
- <!-- 闄勪欢绠$悊閮ㄥ垎 - 浼樺寲涓哄畬鏁村姛鑳� -->
+ <!-- 闄勪欢绠$悊閮ㄥ垎 - 鍒嗙被Tab灞曠ず -->
<el-card class="attachment-card">
- <div class="attachment-header">
- <i class="el-icon-paperclip"></i>
- <span class="attachment-title">鐩稿叧闄勪欢</span>
- <span class="attachment-tip"
- >鏀寔涓婁紶鍣ㄥ畼鍒╃敤鐩稿叧鏂囦欢 (鏈�澶歿{ attachmentLimit }}涓�)</span
- >
+ <div slot="header" class="clearfix">
+ <span class="detail-title">鐩稿叧闄勪欢</span>
</div>
- <!-- 浣跨敤 UploadAttachment 缁勪欢 -->
- <UploadAttachment
- ref="uploadAttachment"
- :file-list="attachmentFileList"
- :limit="attachmentLimit"
- :accept="attachmentAccept"
- :multiple="true"
- @change="handleAttachmentChange"
- @upload-success="handleUploadSuccess"
- @upload-error="handleUploadError"
- @remove="handleAttachmentRemove"
- />
+ <!-- 涓婁紶鍖哄煙锛堟棤鍒嗙被閫夋嫨锛岀敱Tab鎺у埗锛� -->
+ <div class="upload-wrapper">
+ <UploadAttachment
+ ref="uploadAttachment"
+ :file-list="attachmentFileList"
+ :limit="attachmentLimit"
+ :accept="attachmentAccept"
+ :multiple="true"
+ @change="handleAttachmentChange"
+ @upload-success="handleUploadSuccess"
+ @upload-error="handleUploadError"
+ @remove="handleAttachmentRemove"
+ />
+ <div style="font-size:12px; color:#909399; margin-top:4px;">
+ 褰撳墠涓婁紶鍒嗙被锛�<el-tag size="small" type="info">{{
+ activeTab === "鏈垎绫�" ? "鏈垎绫�" : activeTab
+ }}</el-tag>
+ 锛堝垏鎹� Tab 鍙敼鍙樹笂浼犲垎绫伙級
+ </div>
+ </div>
- <!-- 闄勪欢鍒楄〃灞曠ず -->
+ <!-- 闄勪欢鍒楄〃 - 鍒嗙被Tab灞曠ず锛屾敮鎸佷慨鏀瑰垎绫� -->
<div class="attachment-list" v-if="attachments && attachments.length > 0">
- <div class="list-title">宸蹭笂浼犻檮浠� ({{ attachments.length }})</div>
- <el-table :data="attachments" style="width: 100%" size="small">
- <el-table-column label="鏂囦欢鍚�" min-width="200">
- <template slot-scope="scope">
- <i
- class="el-icon-document"
- :style="{ color: getFileIconColor(scope.row.fileName) }"
- ></i>
- <span class="file-name">{{ scope.row.fileName }}</span>
- </template>
- </el-table-column>
- <el-table-column label="鏂囦欢绫诲瀷" width="100">
- <template slot-scope="scope">
- <el-tag :type="getFileTagType(scope.row.fileName)" size="small">
- {{ getFileTypeText(scope.row.fileName) }}
- </el-tag>
- </template>
- </el-table-column>
- <el-table-column label="涓婁紶鏃堕棿" width="200">
- <template slot-scope="scope">
- <span>{{ formatDateTime(scope.row.uploadTime) }}</span>
- </template>
- </el-table-column>
- <el-table-column label="鏂囦欢澶у皬" width="180">
- <template slot-scope="scope">
- <span>{{ formatFileSize(scope.row.fileSize) }}</span>
- </template>
- </el-table-column>
- <el-table-column label="鎿嶄綔" width="260" fixed="right">
- <template slot-scope="scope">
- <el-button
- size="mini"
- type="primary"
- @click="handlePreview(scope.row)"
- :disabled="!isPreviewable(scope.row.fileName)"
- >
- 棰勮
- </el-button>
- <el-button
- size="mini"
- type="success"
- @click="handleDownloadAttachment(scope.row)"
- >
- 涓嬭浇
- </el-button>
- <el-button
- size="mini"
- type="danger"
- @click="handleRemoveAttachment(scope.$index)"
- >
- 鍒犻櫎
- </el-button>
- </template>
- </el-table-column>
- </el-table>
+ <el-tabs v-model="activeTab" type="border-card">
+ <el-tab-pane
+ v-for="category in categories"
+ :key="category"
+ :label="category + '(' + getCategoryCount(category) + ')'"
+ :name="category"
+ >
+ <el-table
+ :data="getCategoryFiles(category)"
+ style="width: 100%"
+ size="small"
+ border
+ >
+ <el-table-column label="鏂囦欢鍚�" min-width="180">
+ <template #default="scope">
+ <i
+ class="el-icon-document"
+ style="margin-right: 8px; color: #409EFF;"
+ ></i>
+ <span class="file-name">{{ scope.row.fileName }}</span>
+ </template>
+ </el-table-column>
+ <!-- 鍙紪杈戝垎绫讳笅鎷� -->
+ <el-table-column label="鍒嗙被" width="150">
+ <template #default="scope">
+ <el-select
+ v-model="scope.row.fileType"
+ size="small"
+ @change="updateAttachmentCategory(scope.row, $event)"
+ placeholder="閫夋嫨鍒嗙被"
+ >
+ <el-option label="鍘熻〃鎷嶇収" value="鍘熻〃鎷嶇収" />
+ <el-option label="鎺ュ彈纭涔�" value="鎺ュ彈纭涔�" />
+ <el-option label="寮冪敤璇存槑" value="寮冪敤璇存槑" />
+ <el-option label="鎹愮尞璇佷功鐓х墖" value="鎹愮尞璇佷功鐓х墖" />
+ <el-option label="鏈垎绫�" value="" />
+ </el-select>
+ </template>
+ </el-table-column>
+ <el-table-column label="鏂囦欢绫诲瀷" width="100">
+ <template #default="scope">
+ <el-tag size="small">{{
+ getFileTypeText(scope.row.fileName)
+ }}</el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column label="涓婁紶鏃堕棿" width="160">
+ <template #default="scope">
+ <span>{{ formatDateTime(scope.row.uploadTime) }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column label="鏂囦欢澶у皬" width="120">
+ <template #default="scope">
+ <span>{{ formatFileSize(scope.row.fileSize) }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column label="鎿嶄綔" width="180" fixed="right">
+ <template #default="scope">
+ <el-button
+ size="mini"
+ type="primary"
+ @click="handlePreview(scope.row)"
+ >棰勮</el-button
+ >
+ <el-button
+ size="mini"
+ type="danger"
+ @click="handleRemoveAttachmentByFile(scope.row)"
+ >鍒犻櫎</el-button
+ >
+ </template>
+ </el-table-column>
+ </el-table>
+ </el-tab-pane>
+ </el-tabs>
+ </div>
+
+ <!-- 鏃犻檮浠舵椂鏄剧ず -->
+ <div v-else style="text-align:center; padding:20px; color:#909399;">
+ 鏆傛棤闄勪欢锛岃涓婁紶
</div>
</el-card>
-
+ <div style="text-align: center; margin: 30px 0;">
+ <el-button type="primary" @click="handleSave" :loading="saveLoading">
+ 淇濆瓨
+ </el-button>
+ <el-button
+ type="success"
+ @click="handleComplete"
+ :loading="confirmLoading"
+ >
+ 瀹屾垚鍒╃敤
+ </el-button>
+ </div>
<!-- 鏂囦欢棰勮瀵硅瘽妗� -->
<FilePreviewDialog
:visible="filePreviewVisible"
@@ -581,17 +617,25 @@
FilePreviewDialog,
CaseBasicInfo
},
- dicts: ["sys_BloodType", "sys_Organ", "sys_0_1", "utilize_statue"],
props: {
infoid: {
type: String,
default: true
}
},
+ dicts: [
+ "Geta_hospital",
+ "sys_BloodType",
+ "sys_Organ",
+ "sys_FamilyRelation",
+ "sys_0_1",
+ "utilize_statue"
+ ],
data() {
return {
caseId: null,
-
+ activeTab: "鍘熻〃鎷嶇収", // 褰撳墠婵�娲荤殑闄勪欢鍒嗙被Tab
+ presetCategories: ["鍘熻〃鎷嶇収", "鎺ュ彈纭涔�", "寮冪敤璇存槑", "鎹愮尞璇佷功鐓х墖"], // 棰勮鍒嗙被
// 琛ㄥ崟鏁版嵁 - 鏍规嵁鎺ュ彛鍙傛暟璋冩暣
form: {
id: undefined,
@@ -617,7 +661,7 @@
coordinatedusernamet: "",
assessannex: "",
donateorgan: "",
- isbodydonation: "0",
+ isbodydonation: "1",
receivingunitname: "",
createBy: "",
createTime: "",
@@ -652,8 +696,13 @@
transplantStatusList: [
{ value: "1", label: "宸茬Щ妞�" },
{ value: "0", label: "鏈Щ妞�" },
- { value: "2", label: "绉绘涓�" }
+ { value: "2", label: "绉绘涓�" },
+ { value: "3", label: "搴撳瓨" }
],
+ organExpansionMap: {
+ C64: { subItems: ["C64L", "C64R"], subNames: ["宸﹁偩", "鍙宠偩"] },
+ C34: { subItems: ["C34L", "C34R"], subNames: ["宸﹁偤", "鍙宠偤"] }
+ },
// 鍒╃敤璁板綍鏁版嵁
utilizationData: {
serviceDonatecomporganList: []
@@ -688,6 +737,11 @@
currentUser() {
return JSON.parse(sessionStorage.getItem("user") || "{}");
},
+ categories() {
+ // 濮嬬粓杩斿洖鎵�鏈夐璁惧垎绫� + 鏈垎绫伙紝鍗充娇娌℃湁鏁版嵁涔熸樉绀�
+ const allCategories = ['鍘熻〃鎷嶇収', '鎺ュ彈纭涔�', '寮冪敤璇存槑', '鎹愮尞璇佷功鐓х墖', '鏈垎绫�'];
+ return allCategories;
+ },
// 宸茬Щ妞嶆暟閲�
transplantedCount() {
if (!this.utilizationData.serviceDonatecomporganList) return 0;
@@ -702,6 +756,22 @@
.map(record => record.hospitalno)
.filter(Boolean);
return new Set(hospitals).size;
+ },
+ organReverseMap() {
+ const map = {};
+ for (const key in this.organExpansionMap) {
+ const { subItems } = this.organExpansionMap[key];
+ subItems.forEach(item => {
+ map[item] = key;
+ });
+ }
+ return map;
+ },
+ // 杩囨护鎺� delFlag=1 鐨勮褰曪紙鐢ㄤ簬琛ㄦ牸灞曠ず锛�
+ displayOrgans() {
+ return (this.utilizationData.serviceDonatecomporganList || []).filter(
+ item => item.delFlag !== 1
+ );
},
// 鑾峰彇鍣ㄥ畼瀛楀吀
organDict() {
@@ -746,19 +816,33 @@
.replace("T", " ")
.substring(0, 19);
- this.generateDonorNo();
this.getDetail();
- this.getHospitalData();
},
+ syncOrgansFromSelection() {
+ const records = this.utilizationData.serviceDonatecomporganList || [];
+ const targetNos = [];
+ this.selectedOrgans.forEach(val => {
+ if (this.organExpansionMap[val]) {
+ targetNos.push(...this.organExpansionMap[val].subItems);
+ } else {
+ targetNos.push(val);
+ }
+ });
- // 鐢熸垚鎹愮尞鑰呯紪鍙�
- generateDonorNo() {
- const timestamp = Date.now().toString();
- this.form.donorno = "D" + timestamp.slice(-8);
- this.form.caseNo = "CASE" + timestamp.slice(-6);
- this.form.inpatientno = "IP" + timestamp.slice(-6);
+ targetNos.forEach(no => {
+ const existing = records.find(r => r.organno === no);
+ if (existing) {
+ if (existing.delFlag === 1) existing.delFlag = 0;
+ } else {
+ // 浣跨敤鍒涘缓鏂规硶锛岃嚜鍔ㄥ寘鍚� delFlag:0
+ this.createOrganRecord(no);
+ }
+ });
+
+ // 寮哄埗鎵�鏈夎褰� delFlag=0锛堝姞杞芥椂搴旇鍏ㄩ儴鏈夋晥锛�
+ records.forEach(r => (r.delFlag = 0));
+ this.form.donateorgan = this.selectedOrgans.join(",");
},
-
// 鑾峰彇璇︽儏
async getDetail() {
this.loading = true;
@@ -773,9 +857,10 @@
if (!data.completeState || data.completeState == 1) {
data.completeState = "2";
}
+ this.form = data;
// 濉厖琛ㄥ崟鏁版嵁
- Object.assign(this.form, data);
-
+ // Object.assign(this.form, data);
+ this.form.signfamilyrelations = this.form.signfamilyrelations || "";
// 澶勭悊鎹愮尞鍣ㄥ畼瀛楁
if (data.donateorgan) {
const organArray = Array.isArray(data.donateorgan)
@@ -801,14 +886,31 @@
console.log(this.utilizationData.serviceDonatecomporganList);
// 鍒濆鍖栭檮浠�
+ // 鏀逛负锛堢‘淇濇瘡涓檮浠堕兘鏈� fileType 瀛楁锛�
if (this.form.assessannex) {
- this.form.attachments = JSON.parse(this.form.assessannex);
- this.attachments = Array.isArray(this.form.attachments)
- ? [...this.form.attachments]
- : [];
+ const parsed = JSON.parse(this.form.assessannex);
+ this.attachments = parsed.map(item => ({
+ ...item,
+ fileType: item.fileType || "" // 榛樿绌哄瓧绗︿覆琛ㄧず鏈垎绫�
+ }));
+ this.form.attachments = this.attachments;
+ // 鍚屾 attachmentFileList
+ this.attachmentFileList = this.attachments.map(item => ({
+ uid: item.id || Math.random(),
+ name: item.fileName,
+ url: item.path || item.fileUrl,
+ fileSize: item.fileSize,
+ uploadTime: item.uploadTime,
+ status: "success",
+ raw: item
+ }));
+ } else {
+ this.attachments = [];
+ this.attachmentFileList = [];
}
this.$message.success("鏁版嵁鍔犺浇鎴愬姛");
+ this.syncOrgansFromSelection();
} else {
this.$message.warning("鏈壘鍒板搴旂殑鍣ㄥ畼鍒╃敤鏁版嵁");
}
@@ -821,81 +923,125 @@
},
// 鑾峰彇鍖婚櫌鏁版嵁
- async getHospitalData() {
- try {
- // TODO: 鏇挎崲涓哄疄闄呯殑鍖婚櫌鍒楄〃鎺ュ彛
- // 鏆傛椂浣跨敤妯℃嫙鏁版嵁
- this.hospitalList = [
- { hospitalNo: "H001", hospitalName: "鍖椾含鍗忓拰鍖婚櫌" },
- { hospitalNo: "H002", hospitalName: "涓婃捣鍗庡北鍖婚櫌" },
- { hospitalNo: "H003", hospitalName: "涓婃捣鐟為噾鍖婚櫌" },
- { hospitalNo: "H004", hospitalName: "骞垮窞涓北鍖婚櫌" },
- { hospitalNo: "H005", hospitalName: "姝︽眽鍚屾祹鍖婚櫌" },
- { hospitalNo: "H006", hospitalName: "鎴愰兘鍗庤タ鍖婚櫌" }
- ];
- } catch (error) {
- console.error("鑾峰彇鍖婚櫌鏁版嵁澶辫触:", error);
- this.$message.error("鑾峰彇鍖婚櫌鏁版嵁澶辫触");
- }
- },
+ // async getHospitalData() {
+ // try {
+ // // TODO: 鏇挎崲涓哄疄闄呯殑鍖婚櫌鍒楄〃鎺ュ彛
+ // // 鏆傛椂浣跨敤妯℃嫙鏁版嵁
+ // this.hospitalList = [
+ // { hospitalNo: "H001", hospitalName: "鍖椾含鍗忓拰鍖婚櫌" },
+ // { hospitalNo: "H002", hospitalName: "涓婃捣鍗庡北鍖婚櫌" },
+ // { hospitalNo: "H003", hospitalName: "涓婃捣鐟為噾鍖婚櫌" },
+ // { hospitalNo: "H004", hospitalName: "骞垮窞涓北鍖婚櫌" },
+ // { hospitalNo: "H005", hospitalName: "姝︽眽鍚屾祹鍖婚櫌" },
+ // { hospitalNo: "H006", hospitalName: "鎴愰兘鍗庤タ鍖婚櫌" }
+ // ];
+ // } catch (error) {
+ // console.error("鑾峰彇鍖婚櫌鏁版嵁澶辫触:", error);
+ // this.$message.error("鑾峰彇鍖婚櫌鏁版嵁澶辫触");
+ // }
+ // },
// 鍣ㄥ畼閫夋嫨鐘舵�佸彉鍖�
- handleOrganSelectionChange(selectedValues) {
- if (!this.utilizationData.serviceDonatecomporganList) {
- this.utilizationData.serviceDonatecomporganList = [];
- }
-
- const currentOrganValues = this.utilizationData.serviceDonatecomporganList.map(
- item => item.organno
- );
-
- // 澶勭悊浜掓枼閫昏緫
+ async handleOrganSelectionChange(selectedValues) {
+ // 1. 澶勭悊浜掓枼閫昏緫锛堜慨鏀� this.selectedOrgans锛�
this.handleExclusiveSelections(selectedValues);
- // 鏇存柊鎹愮尞鍣ㄥ畼瀛楁
- this.form.donateorgan = selectedValues.join(",");
+ const finalSelected = this.selectedOrgans;
+ const records = this.utilizationData.serviceDonatecomporganList || [];
- // 鏂板閫夋嫨鐨勫櫒瀹�
- selectedValues.forEach(organValue => {
- if (!currentOrganValues.includes(organValue)) {
- this.createOrganRecord(organValue);
+ // 2. 鏋勫缓鐩爣鍣ㄥ畼缂栧彿鍒楄〃锛堝睍寮�缁勫悎鍣ㄥ畼锛�
+ const targetOrganNos = [];
+ finalSelected.forEach(val => {
+ if (this.organExpansionMap[val]) {
+ targetOrganNos.push(...this.organExpansionMap[val].subItems);
+ } else {
+ targetOrganNos.push(val);
}
});
- // 绉婚櫎鍙栨秷閫夋嫨鐨勫櫒瀹�
- this.utilizationData.serviceDonatecomporganList = this.utilizationData.serviceDonatecomporganList.filter(
- record => {
- if (selectedValues.includes(record.organno)) {
- return true;
- } else {
- if (record.id) {
- this.$confirm(
- "鍒犻櫎鍣ㄥ畼鍒╃敤鏁版嵁鍚庡皢鏃犳硶鎭㈠锛屾偍纭鍒犻櫎璇ユ潯璁板綍鍚楋紵",
- "鎻愮ず",
- {
- confirmButtonText: "纭畾",
- cancelButtonText: "鍙栨秷",
- type: "warning"
- }
- )
- .then(() => {
- this.utilizationData.serviceDonatecomporganList = this.utilizationData.serviceDonatecomporganList.filter(
- r => r.organno !== record.organno
- );
- this.$message.success("鍒犻櫎鎴愬姛");
- })
- .catch(() => {
- this.selectedOrgans.push(record.organno);
- });
- return true;
- } else {
- return false;
- }
+ // 3. 鏂板鎴栨仮澶嶈褰曪紙鏃犻渶寮圭獥锛�
+ targetOrganNos.forEach(no => {
+ const existing = records.find(r => r.organno === no);
+ if (existing) {
+ if (existing.delFlag === 1) {
+ existing.delFlag = 0; // 鎭㈠鏄剧ず
}
+ } else {
+ this.createOrganRecord(no); // 鏂板璁板綍锛堝寘鍚� delFlag:0锛�
}
- );
- },
+ });
+ // 4. 鎵惧嚭闇�瑕佸彇娑堢殑璁板綍锛堜笉鍦ㄧ洰鏍囬泦鍚堜腑鐨勶級
+ const toRemove = records.filter(r => !targetOrganNos.includes(r.organno));
+ const toRemoveSaved = toRemove.filter(r => r.id); // 宸蹭繚瀛橈紝闇�纭
+ const toRemoveUnsaved = toRemove.filter(r => !r.id); // 鏈繚瀛橈紝鐩存帴绉婚櫎
+
+ // 4.1 鐩存帴绉婚櫎鏈繚瀛樼殑璁板綍
+ toRemoveUnsaved.forEach(r => {
+ const idx = records.indexOf(r);
+ if (idx !== -1) records.splice(idx, 1);
+ });
+
+ // 4.2 澶勭悊宸蹭繚瀛樼殑璁板綍锛氬脊绐楃‘璁�
+ if (toRemoveSaved.length > 0) {
+ const organNames = toRemoveSaved.map(r => r.organname).join("銆�");
+ try {
+ await this.$confirm(
+ `鎮ㄧ‘瀹氳鍙栨秷浠ヤ笅宸蹭繚瀛樼殑鍣ㄥ畼鍒╃敤璁板綍鍚楋紵\n${organNames}\n鍙栨秷鍚庯紝杩欎簺璁板綍灏嗕粠鍒楄〃涓Щ闄わ紙鏁版嵁浠嶄繚鐣欙紝鍙仮澶嶏級銆俙,
+ "鎻愮ず",
+ {
+ confirmButtonText: "纭畾绉婚櫎",
+ cancelButtonText: "鍙栨秷",
+ type: "warning"
+ }
+ );
+ // 鐢ㄦ埛纭锛氭爣璁� delFlag=1
+ toRemoveSaved.forEach(r => {
+ r.delFlag = 1;
+ });
+ } catch (error) {
+ // 鐢ㄦ埛鍙栨秷锛氭仮澶嶉�変腑鐘舵��
+ // 灏嗗彇娑堢殑鍣ㄥ畼閲嶆柊鍔犲叆 this.selectedOrgans
+ const parentToRestore = new Set();
+ toRemoveSaved.forEach(r => {
+ const parent = this.organReverseMap[r.organno];
+ if (parent) {
+ parentToRestore.add(parent);
+ } else {
+ parentToRestore.add(r.organno);
+ }
+ });
+ parentToRestore.forEach(val => {
+ if (!this.selectedOrgans.includes(val)) {
+ this.selectedOrgans.push(val);
+ }
+ });
+ // 鎻愮ず鐢ㄦ埛鎿嶄綔宸插彇娑�
+ this.$message.info("宸插彇娑堝垹闄ゆ搷浣�");
+ // 鏇存柊琛ㄥ崟瀛楁锛堜繚鎸佷竴鑷存�э級
+ this.form.donateorgan = this.selectedOrgans.join(",");
+ // 娉ㄦ剰锛氭鏃� records 涓凡鏂板浜嗙洰鏍囧櫒瀹橈紝骞朵笖涔嬪墠鐨勮褰曟湭琚爣璁板垹闄わ紝鐘舵�佷竴鑷淬��
+ // 浣嗘槸锛屾垜浠繕闇�瑕佺Щ闄や箣鍓嶆柊澧炰絾鐢ㄦ埛鍙兘涓嶆兂淇濈暀鐨勮褰曪紵涓嶄細锛屽洜涓烘柊澧炵殑鏄洰鏍囧櫒瀹橈紝鐢ㄦ埛鏄兂淇濈暀鐨勩��
+ // 鍥犳鐩存帴杩斿洖鍗冲彲銆�
+ return;
+ }
+ }
+
+ // 5. 鏇存柊琛ㄥ崟瀛楁
+ this.form.donateorgan = this.selectedOrgans.join(",");
+ },
+ // 绉绘鍖婚櫌妯$硦鎼滅储
+ queryHospitalSearch(queryString, cb) {
+ const hospitals = this.dict.type.Geta_hospital || [];
+ const results = queryString
+ ? hospitals.filter(item =>
+ item.label.toLowerCase().includes(queryString.toLowerCase())
+ )
+ : hospitals;
+
+ // el-autocomplete 闇�瑕� value 瀛楁
+ cb(results.map(item => ({ value: item.label })));
+ },
// 澶勭悊浜掓枼閫夋嫨
handleExclusiveSelections(selectedValues) {
// 濡傛灉閫夋嫨浜�"鍙岃偩"(鍋囪瀛楀吀鍊间负C64)锛岃嚜鍔ㄥ彇娑堝崟鐙殑"宸﹁偩"(C64L)鍜�"鍙宠偩"(C64R)閫夋嫨
@@ -942,6 +1088,7 @@
transplanttime: "",
transplantstate: "1",
abandonreason: "",
+ delFlag: 0, // 鏂板
sex: "",
age: "",
birthday: "",
@@ -967,16 +1114,6 @@
getOrganLabel(organValue) {
const dictItem = this.organDict.find(item => item.value === organValue);
return dictItem ? dictItem.label : organValue;
- },
-
- // 鍖婚櫌閫夋嫨鍙樺寲
- handleHospitalChange(row, hospitalNo) {
- const hospital = this.hospitalList.find(
- item => item.hospitalNo === hospitalNo
- );
- if (hospital) {
- row.hospitalname = hospital.hospitalName;
- }
},
// 绉绘鐘舵�佸彉鍖栧鐞�
@@ -1027,7 +1164,7 @@
getOrganRowClassName({ row }) {
if (
row.transplantstate === "1" &&
- (!row.caseNo || !row.hospitalno || !row.name || !row.transplanttime)
+ (!row.hospitalno || !row.name || !row.transplanttime)
) {
return "warning-row";
}
@@ -1158,19 +1295,13 @@
const incompleteRecords = this.utilizationData.serviceDonatecomporganList.filter(
record => {
if (record.transplantstate === "1") {
- return (
- !record.caseNo ||
- !record.hospitalno ||
- !record.name ||
- !record.transplanttime
- );
+ return !record.hospitalno || !record.name || !record.transplanttime;
} else if (record.transplantstate === "0") {
return !record.abandonreason;
}
return false;
}
);
-
if (incompleteRecords.length > 0) {
this.$message.warning("璇峰厛瀹屽杽鎵�鏈夊埄鐢ㄨ褰曠殑淇℃伅");
@@ -1297,11 +1428,13 @@
/** 涓婁紶鎴愬姛澶勭悊 */
handleUploadSuccess({ file, fileList, response }) {
if (response.code === 200) {
+ // 鏍规嵁褰撳墠婵�娲荤殑 Tab 鍐冲畾鍒嗙被锛堟湭鍒嗙被 Tab 瀵瑰簲绌哄瓧绗︿覆锛�
+ const category = this.activeTab === "鏈垎绫�" ? "" : this.activeTab;
const attachmentObj = {
fileName: file.name,
path: response.fileUrl || file.url,
fileUrl: response.fileUrl || file.url,
- fileType: this.getFileExtension(file.name),
+ fileType: category, // 鍏抽敭锛氳褰曞垎绫�
fileSize: file.size,
uploadTime: dayjs().format("YYYY-MM-DD HH:mm:ss")
};
@@ -1309,13 +1442,71 @@
if (!Array.isArray(this.attachments)) {
this.attachments = [];
}
-
this.attachments.push(attachmentObj);
- this.attachmentFileList = fileList;
+ this.attachmentFileList = fileList; // 淇濇寔鍚屾
this.$message.success("鏂囦欢涓婁紶鎴愬姛");
}
},
+ // 鑾峰彇鏌愬垎绫荤殑鏂囦欢鏁伴噺
+ getCategoryCount(category) {
+ return this.attachments.filter(item => {
+ const type = item.fileType || "";
+ if (category === "鏈垎绫�") {
+ return !this.presetCategories.includes(type);
+ }
+ return type === category;
+ }).length;
+ },
+ // 鑾峰彇鏌愬垎绫荤殑鏂囦欢鍒楄〃
+ getCategoryFiles(category) {
+ return this.attachments.filter(item => {
+ const type = item.fileType || "";
+ if (category === "鏈垎绫�") {
+ return !this.presetCategories.includes(type);
+ }
+ return type === category;
+ });
+ },
+
+ // 鏇存柊闄勪欢鍒嗙被锛堜笅鎷変慨鏀规椂瑙﹀彂锛�
+ updateAttachmentCategory(row, newVal) {
+ const target = this.attachments.find(item => item === row);
+ if (target) {
+ target.fileType = newVal; // 鍙兘涓虹┖瀛楃涓�
+ // 鍚屾鏇存柊 attachmentFileList
+ const fileItem = this.attachmentFileList.find(
+ f => f.raw === row || f.url === row.fileUrl
+ );
+ if (fileItem) {
+ fileItem.raw.fileType = newVal;
+ fileItem.fileType = newVal || "鏈垎绫�";
+ }
+ // 濡傛灉褰撳墠婵�娲荤殑tab娌℃湁鏂囦欢浜嗭紝鑷姩鍒囨崲鍒扮涓�涓湁鏂囦欢鐨則ab
+ const currentTabHasFiles =
+ this.getCategoryFiles(this.activeTab).length > 0;
+ if (!currentTabHasFiles) {
+ const firstCategory = this.categories[0];
+ if (firstCategory) this.activeTab = firstCategory;
+ }
+ }
+ },
+
+ // 鎸夋枃浠跺璞″垹闄わ紙鐢ㄤ簬琛ㄦ牸涓殑鍒犻櫎鎸夐挳锛�
+ handleRemoveAttachmentByFile(file) {
+ const index = this.attachments.findIndex(item => item === file);
+ if (index > -1) {
+ this.attachments.splice(index, 1);
+ // 鍚屾鍒犻櫎 attachmentFileList
+ const fileIndex = this.attachmentFileList.findIndex(
+ f => f.raw === file || f.url === file.fileUrl
+ );
+ if (fileIndex > -1) {
+ this.attachmentFileList.splice(fileIndex, 1);
+ }
+ this.$message.success("闄勪欢鍒犻櫎鎴愬姛");
+ }
+ },
/** 涓婁紶閿欒澶勭悊 */
handleUploadError({ file, fileList, error }) {
console.error("闄勪欢涓婁紶澶辫触:", error);
@@ -1324,9 +1515,8 @@
/** 鎵嬪姩鍒犻櫎闄勪欢 */
handleRemoveAttachment(index) {
- this.attachments.splice(index, 1);
- this.attachmentFileList.splice(index, 1);
- this.$message.success("闄勪欢鍒犻櫎鎴愬姛");
+ // 鐩存帴璋冪敤鏂扮殑鍒犻櫎鏂规硶
+ this.handleRemoveAttachmentByFile(file.raw || file);
},
/** 鏂囦欢棰勮 */
diff --git a/src/views/business/course/components/components/UrineRoutinePanel.vue b/src/views/business/course/components/components/UrineRoutinePanel.vue
index e5c5d49..524e75d 100644
--- a/src/views/business/course/components/components/UrineRoutinePanel.vue
+++ b/src/views/business/course/components/components/UrineRoutinePanel.vue
@@ -29,7 +29,6 @@
border
style="width: 100%"
class="medical-table"
-
:key="tableKey"
@header-dragend="handleHeaderDragEnd"
v-loading="tableLoading"
@@ -43,7 +42,7 @@
>
<template #default="scope">
<div class="item-name-cell">
- <span :class="{'required-item': scope.row.required}">
+ <span :class="{ 'required-item': scope.row.required }">
{{ scope.row.itemName }}
</span>
<el-tooltip
@@ -85,8 +84,12 @@
:value="option.value"
/>
</el-select>
- <span v-else class="value-text" :title="getSelectLabel(scope.row, index)">
- {{ getSelectLabel(scope.row, index) || '-' }}
+ <span
+ v-else
+ class="value-text"
+ :title="getSelectLabel(scope.row, index)"
+ >
+ {{ getSelectLabel(scope.row, index) || "-" }}
</span>
</template>
@@ -102,9 +105,12 @@
/>
<div v-else class="value-display-container">
<span class="value-text" :title="scope.row.values[index]">
- {{ scope.row.values[index] || '-' }}
+ {{ scope.row.values[index] || "-" }}
</span>
- <span v-if="scope.row.values[index] && scope.row.unit" class="unit-text">
+ <span
+ v-if="scope.row.values[index] && scope.row.unit"
+ class="unit-text"
+ >
{{ scope.row.unit }}
</span>
</div>
@@ -133,7 +139,9 @@
<el-card shadow="never">
<div class="stats-content">
<span class="stats-title">鏁版嵁缁熻:</span>
- <span class="stats-item">鎬昏褰曟暟: {{ dynamicColumns.length }} 涓椂闂寸偣</span>
+ <span class="stats-item"
+ >鎬昏褰曟暟: {{ dynamicColumns.length }} 涓椂闂寸偣</span
+ >
<span class="stats-item">宸插~鍐�: {{ filledCount }} 椤�</span>
<span class="stats-item">瀹屾垚搴�: {{ completionRate }}%</span>
</div>
@@ -145,7 +153,9 @@
<div class="attachment-header">
<i class="el-icon-paperclip"></i>
<span class="attachment-title">闄勪欢涓婁紶</span>
- <span class="attachment-tip">鏀寔涓婁紶灏垮父瑙勬楠屾姤鍛婂崟绛夋枃浠� (鏈�澶�10涓�)</span>
+ <span class="attachment-tip"
+ >鏀寔涓婁紶灏垮父瑙勬楠屾姤鍛婂崟绛夋枃浠� (鏈�澶�10涓�)</span
+ >
</div>
<upload-attachment
:file-list="attachments"
@@ -206,7 +216,11 @@
>
鍒犻櫎
</el-button>
- <el-button type="primary" @click="confirmAddColumn" :loading="saveLoading">
+ <el-button
+ type="primary"
+ @click="confirmAddColumn"
+ :loading="saveLoading"
+ >
纭畾
</el-button>
</span>
@@ -218,9 +232,9 @@
import UploadAttachment from "@/components/UploadAttachment";
export default {
- name: 'UrineRoutinePanel',
+ name: "UrineRoutinePanel",
components: {
- UploadAttachment,
+ UploadAttachment
},
props: {
isEditing: {
@@ -241,31 +255,27 @@
tableData: [],
dynamicColumns: [
{
- label: '2024-12-27\n08:00',
- key: 'time1',
- date: '2024-12-27',
- time: '08:00',
- remark: '鏅ㄥ翱妫�娴�'
+ label: "2024-12-27\n08:00",
+ key: "time1",
+ date: "2024-12-27",
+ time: "08:00",
+ remark: "鏅ㄥ翱妫�娴�"
}
],
attachments: [],
columnDialogVisible: false,
columnForm: {
- date: '',
- time: '',
- remark: ''
+ date: "",
+ time: "",
+ remark: ""
},
editingColumnIndex: null,
tableKey: 0,
tableLoading: false,
saveLoading: false,
columnRules: {
- date: [
- { required: true, message: '璇烽�夋嫨鏃ユ湡', trigger: 'change' }
- ],
- time: [
- { required: true, message: '璇烽�夋嫨鏃堕棿', trigger: 'change' }
- ]
+ date: [{ required: true, message: "璇烽�夋嫨鏃ユ湡", trigger: "change" }],
+ time: [{ required: true, message: "璇烽�夋嫨鏃堕棿", trigger: "change" }]
}
};
},
@@ -274,7 +284,7 @@
let count = 0;
this.tableData.forEach(row => {
row.values.forEach(value => {
- if (value && value.toString().trim() !== '') {
+ if (value && value.toString().trim() !== "") {
count++;
}
});
@@ -289,8 +299,8 @@
watch: {
isEditing(newVal) {
if (!newVal) {
- this.$emit('data-change', {
- type: 'urine_routine',
+ this.$emit("data-change", {
+ type: "urine_routine",
data: this.tableData,
columns: this.dynamicColumns,
attachments: this.attachments
@@ -313,89 +323,86 @@
methods: {
initTableData() {
const medicalItems = [
-
{
- itemName: '灏块噺',
- type: 'number',
+ itemName: "灏块噺",
+ type: "number",
required: true,
- unit: 'ml/h',
- reference: '姝e父鑼冨洿瑙嗘儏鍐佃�屽畾'
+ unit: "ml/h",
+ reference: "姝e父鑼冨洿瑙嗘儏鍐佃�屽畾"
},
{
- itemName: '棰滆壊',
- type: 'select',
+ itemName: "棰滆壊",
+ type: "select",
required: true,
options: [
- { value: '娣¢粍鑹�', label: '娣¢粍鑹�' },
- { value: '榛勮壊', label: '榛勮壊' },
- { value: '娣遍粍鑹�', label: '娣遍粍鑹�' },
- { value: '绾㈣壊', label: '绾㈣壊' },
- { value: '鐧借壊', label: '鐧借壊' },
- { value: '鍏朵粬', label: '鍏朵粬' }
+ { value: "娣¢粍鑹�", label: "娣¢粍鑹�" },
+ { value: "榛勮壊", label: "榛勮壊" },
+ { value: "娣遍粍鑹�", label: "娣遍粍鑹�" },
+ { value: "绾㈣壊", label: "绾㈣壊" },
+ { value: "鐧借壊", label: "鐧借壊" },
+ { value: "鍏朵粬", label: "鍏朵粬" }
]
},
{
- itemName: '澶栬',
- type: 'select',
+ itemName: "澶栬",
+ type: "select",
required: false,
options: [
- { value: '娓呬寒', label: '娓呬寒' },
- { value: '寰祳', label: '寰祳' },
- { value: '娴戞祳', label: '娴戞祳' },
- { value: '娌夋穩', label: '娌夋穩' },
- { value: '鍏朵粬', label: '鍏朵粬' }
+ { value: "娓呬寒", label: "娓呬寒" },
+ { value: "寰祳", label: "寰祳" },
+ { value: "娴戞祳", label: "娴戞祳" },
+ { value: "娌夋穩", label: "娌夋穩" },
+ { value: "鍏朵粬", label: "鍏朵粬" }
]
},
{
- itemName: '灏胯泲鐧�',
- type: 'select',
+ itemName: "灏胯泲鐧�",
+ type: "select",
required: true,
options: [
- { value: '-', label: '闃存��(-)' },
- { value: '卤', label: '寰噺(卤)' },
- { value: '+', label: '闃虫��(+)' },
- { value: '++', label: '闃虫��(++)' },
- { value: '+++', label: '闃虫��(+++)' }
+ { value: "-", label: "闃存��(-)" },
+ { value: "卤", label: "寰噺(卤)" },
+ { value: "+", label: "闃虫��(+)" },
+ { value: "++", label: "闃虫��(++)" },
+ { value: "+++", label: "闃虫��(+++)" }
],
- reference: '姝e父涓洪槾鎬�(-)'
+ reference: "姝e父涓洪槾鎬�(-)"
},
{
- itemName: 'pH鍊�',
- type: 'number',
+ itemName: "pH鍊�",
+ type: "number",
required: true,
- placeholder: '4.5-8.0',
- unit: '',
- reference: '4.5-8.0',
+ placeholder: "4.5-8.0",
+ unit: "",
+ reference: "4.5-8.0",
min: 4.5,
max: 8.0
},
{
- itemName: '鐧界粏鑳�',
- type: 'select',
+ itemName: "鐧界粏鑳�",
+ type: "number",
required: true,
- options: [
- { value: '-', label: '闃存��(-)' },
- { value: '+', label: '闃虫��(+)' },
- { value: '++', label: '闃虫��(++)' },
- { value: '+++', label: '闃虫��(+++)' }
- ],
- reference: '姝e父涓洪槾鎬�(-)'
+ unit: "/渭L",
+ reference: "0-385",
+ min: 0,
+ max: 385,
+ placeholder: "0-385"
},
{
- itemName: '绾㈢粏鑳�',
- type: 'number',
+ itemName: "绾㈢粏鑳�",
+ type: "number",
required: true,
- unit: '/渭L',
- reference: '0-9.2',
+ unit: "/渭L",
+ reference: "0-9.2",
min: 0,
max: 9.2
},
{
- itemName: '缁嗚弻',
- type: 'number',
+ itemName: "缁嗚弻",
+ type: "number",
required: true,
- unit: '/渭L',
- reference: '0-385',
+ unit: "/渭L",
+ reference: "0-385",
min: 0,
max: 385
}
@@ -403,22 +410,25 @@
this.tableData = medicalItems.map(item => ({
...item,
- values: new Array(this.dynamicColumns.length).fill('')
+ values: new Array(this.dynamicColumns.length).fill("")
}));
},
getSelectLabel(row, columnIndex) {
- if (!row.options || !row.values[columnIndex]) return row.values[columnIndex];
- const option = row.options.find(opt => opt.value === row.values[columnIndex]);
+ if (!row.options || !row.values[columnIndex])
+ return row.values[columnIndex];
+ const option = row.options.find(
+ opt => opt.value === row.values[columnIndex]
+ );
return option ? option.label : row.values[columnIndex];
},
addColumn() {
this.editingColumnIndex = null;
this.columnForm = {
- date: new Date().toISOString().split('T')[0],
- time: '08:00',
- remark: ''
+ date: new Date().toISOString().split("T")[0],
+ time: "08:00",
+ remark: ""
};
this.columnDialogVisible = true;
this.$nextTick(() => {
@@ -432,15 +442,15 @@
this.columnForm = {
date: column.date,
time: column.time,
- remark: column.remark || ''
+ remark: column.remark || ""
};
this.columnDialogVisible = true;
},
confirmAddColumn() {
- this.$refs.columnForm.validate((valid) => {
+ this.$refs.columnForm.validate(valid => {
if (!valid) {
- this.$message.warning('璇峰畬鍠勬椂闂寸偣淇℃伅');
+ this.$message.warning("璇峰畬鍠勬椂闂寸偣淇℃伅");
return;
}
@@ -453,7 +463,7 @@
column.date = this.columnForm.date;
column.time = this.columnForm.time;
column.remark = this.columnForm.remark;
- this.$message.success('鏃堕棿鐐逛慨鏀规垚鍔�');
+ this.$message.success("鏃堕棿鐐逛慨鏀规垚鍔�");
} else {
// 鏂板鍒�
const newIndex = this.dynamicColumns.length + 1;
@@ -467,9 +477,9 @@
this.dynamicColumns.push(newColumn);
this.tableData.forEach(row => {
- row.values.push('');
+ row.values.push("");
});
- this.$message.success('鏃堕棿鐐规坊鍔犳垚鍔�');
+ this.$message.success("鏃堕棿鐐规坊鍔犳垚鍔�");
}
this.columnDialogVisible = false;
@@ -480,10 +490,10 @@
handleDeleteColumn() {
if (this.editingColumnIndex !== null) {
- this.$confirm('纭畾瑕佸垹闄よ繖涓椂闂寸偣鍚楋紵', '鎻愮ず', {
- confirmButtonText: '纭畾',
- cancelButtonText: '鍙栨秷',
- type: 'warning'
+ this.$confirm("纭畾瑕佸垹闄よ繖涓椂闂寸偣鍚楋紵", "鎻愮ず", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning"
}).then(() => {
this.dynamicColumns.splice(this.editingColumnIndex, 1);
this.tableData.forEach(row => {
@@ -491,7 +501,7 @@
});
this.columnDialogVisible = false;
this.tableKey += 1;
- this.$message.success('鏃堕棿鐐瑰垹闄ゆ垚鍔�');
+ this.$message.success("鏃堕棿鐐瑰垹闄ゆ垚鍔�");
});
}
},
@@ -499,9 +509,9 @@
handleDialogClosed() {
this.editingColumnIndex = null;
this.columnForm = {
- date: '',
- time: '',
- remark: ''
+ date: "",
+ time: "",
+ remark: ""
};
this.$refs.columnForm && this.$refs.columnForm.clearValidate();
},
@@ -511,8 +521,8 @@
},
handleValueChange(row, columnIndex) {
- this.$emit('data-change', {
- type: 'urine_routine',
+ this.$emit("data-change", {
+ type: "urine_routine",
data: this.tableData,
columns: this.dynamicColumns
});
@@ -520,17 +530,17 @@
handleAttachmentChange(fileList) {
this.attachments = fileList;
- this.$emit('attachment-change', {
- type: 'urine_routine',
+ this.$emit("attachment-change", {
+ type: "urine_routine",
attachments: fileList
});
},
forceTableLayout() {
this.$nextTick(() => {
- const table = this.$el.querySelector('.el-table');
+ const table = this.$el.querySelector(".el-table");
if (table) {
- window.dispatchEvent(new Event('resize'));
+ window.dispatchEvent(new Event("resize"));
}
});
},
@@ -742,10 +752,12 @@
}
/* 鍔ㄧ敾鏁堟灉 */
-.fade-enter-active, .fade-leave-active {
+.fade-enter-active,
+.fade-leave-active {
transition: opacity 0.3s;
}
-.fade-enter, .fade-leave-to {
+.fade-enter,
+.fade-leave-to {
opacity: 0;
}
</style>
diff --git a/src/views/business/course/index.vue b/src/views/business/course/index.vue
index 02501b3..431fb4b 100644
--- a/src/views/business/course/index.vue
+++ b/src/views/business/course/index.vue
@@ -102,7 +102,7 @@
}
// 瀹屾垚 / 瀹屾垚XX
- if (/瀹屾垚/.test(l)) {
+ if (/瀹屾垚|瀹岀粨/.test(l)) {
return "completed";
}
@@ -134,7 +134,7 @@
medicalevaluation: "state_Evaluation",
relativesconfirmation: "affirm_type",
donateflowcharts: "sys_ethical",
- donateorgansService: "allocation_Status",
+ donateorgansService: "organ_allocation_status",
donationwitness: "Obtain_status",
donatecompletioninfo: "utilize_statue"
};
@@ -182,7 +182,7 @@
"state_Evaluation",
"affirm_type",
"sys_ethical",
- "allocation_Status",
+ "organ_allocation_status",
"Obtain_status",
"utilize_statue"
], // 杩欓噷鍙0鏄庝竴涓嵆鍙紝鍏朵綑閫氳繃 dict.type[xxx] 浣跨敤
diff --git a/src/views/business/decide/DecideInfo.vue b/src/views/business/decide/DecideInfo.vue
index cdc5db6..9522c29 100644
--- a/src/views/business/decide/DecideInfo.vue
+++ b/src/views/business/decide/DecideInfo.vue
@@ -54,26 +54,9 @@
<el-card v-if="activeJudgmentType === 'brain'" class="detail-card">
<div slot="header" class="clearfix">
<span class="detail-title">鑴戞浜″垽瀹氫俊鎭�</span>
+
<el-button
- v-if="isEdit"
- style="float: right; margin-left: 10px;"
- type="success"
- @click="handleSave"
- :loading="saveLoading"
- >
- 淇濆瓨淇℃伅
- </el-button>
- <el-button
- v-if="isEdit"
- style="float: right; margin-left: 10px;"
- type="success"
- @click="accomplish"
- :loading="saveLoading"
- >
- 瀹屾垚鍒ゅ畾
- </el-button>
- <el-button
- v-else
+ v-if="!isEdit"
style="float: right; margin-left: 10px;"
type="primary"
@click="handleEdit"
@@ -111,6 +94,41 @@
<el-col :span="8">
<el-form-item label="鍒ゅ畾鍖荤敓浜�" prop="deathjudgedoctt">
<el-input v-model="form.deathjudgedoctt" :readonly="!isEdit" />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row :gutter="20">
+ <el-col :span="24">
+ <el-form-item label="鍏朵粬鍒ゅ畾鍖荤敓">
+ <div
+ v-for="(doctor, index) in brainExtraDoctors"
+ :key="index"
+ style="display: flex; align-items: center; margin-bottom: 8px;"
+ >
+ <el-input
+ v-model="brainExtraDoctors[index]"
+ placeholder="璇疯緭鍏ュ尰鐢熷鍚�"
+ style="flex: 1; margin-right: 10px;"
+ :readonly="!isEdit"
+ />
+ <el-button
+ v-if="isEdit"
+ type="danger"
+ icon="el-icon-minus"
+ circle
+ size="mini"
+ @click="removeBrainDoctor(index)"
+ />
+ </div>
+ <el-button
+ v-if="isEdit"
+ type="primary"
+ icon="el-icon-plus"
+ size="small"
+ @click="addBrainDoctor"
+ >
+ 娣诲姞鍖荤敓
+ </el-button>
</el-form-item>
</el-col>
</el-row>
@@ -268,7 +286,7 @@
<el-row :gutter="20">
<el-col :span="8">
- <el-form-item label="蹇冩浜℃椂闂�" prop="heartdeathtime">
+ <el-form-item label="蹇冩浜″垽瀹氬畬鎴愭椂闂�" prop="heartdeathtime">
<el-date-picker
v-model="form.heartdeathtime"
type="datetime"
@@ -292,6 +310,41 @@
v-model="form.heartdeathjudgedoctt"
:readonly="!isEdit"
/>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row :gutter="20">
+ <el-col :span="24">
+ <el-form-item label="鍏朵粬鍒ゅ畾鍖荤敓">
+ <div
+ v-for="(doctor, index) in heartExtraDoctors"
+ :key="index"
+ style="display: flex; align-items: center; margin-bottom: 8px;"
+ >
+ <el-input
+ v-model="heartExtraDoctors[index]"
+ placeholder="璇疯緭鍏ュ尰鐢熷鍚�"
+ style="flex: 1; margin-right: 10px;"
+ :readonly="!isEdit"
+ />
+ <el-button
+ v-if="isEdit"
+ type="danger"
+ icon="el-icon-minus"
+ circle
+ size="mini"
+ @click="removeHeartDoctor(index)"
+ />
+ </div>
+ <el-button
+ v-if="isEdit"
+ type="primary"
+ icon="el-icon-plus"
+ size="small"
+ @click="addHeartDoctor"
+ >
+ 娣诲姞鍖荤敓
+ </el-button>
</el-form-item>
</el-col>
</el-row>
@@ -414,7 +467,25 @@
</el-tabs>
</div>
</el-card>
-
+ <!-- 搴曢儴鎿嶄綔鎸夐挳 -->
+ <div style="text-align: center; margin: 30px 0;">
+ <el-button
+ v-if="isEdit"
+ type="primary"
+ @click="handleSave"
+ :loading="saveLoading"
+ >
+ 淇濆瓨淇℃伅
+ </el-button>
+ <el-button
+ v-if="isEdit"
+ type="success"
+ @click="accomplish"
+ :loading="saveLoading"
+ >
+ 瀹屾垚鍒ゅ畾
+ </el-button>
+ </div>
<!-- 涓婁紶瀵硅瘽妗嗭紙鑴戞浜★級 -->
<el-dialog
:title="`涓婁紶${getCurrentBrainDeathTypeLabel}璇勪及琛╜"
@@ -529,10 +600,11 @@
data() {
return {
caseId: null,
- isEdit: false,
+ isEdit: true,
saveLoading: false,
infoid: undefined,
-
+ brainExtraDoctors: [], // 鑴戞浜″叾浠栧垽瀹氬尰鐢�
+ heartExtraDoctors: [], // 蹇冩浜″叾浠栧垽瀹氬尰鐢�
// 鍒ゅ畾绫诲瀷鏍囩
activeJudgmentType: "brain", // 榛樿鏄剧ず鑴戞浜�
// 棰勮鐩稿叧
@@ -568,7 +640,7 @@
responsibleuserid: "",
responsibleusername: "",
recordstate: "0",
- remark: ""
+ extContent: ""
},
// 琛ㄥ崟楠岃瘉瑙勫垯
rules: {
@@ -588,7 +660,11 @@
{ required: false, message: "蹇冩浜″師鍥犱笉鑳戒负绌�", trigger: "blur" }
],
heartdeathtime: [
- { required: false, message: "蹇冩浜℃椂闂翠笉鑳戒负绌�", trigger: "change" }
+ {
+ required: false,
+ message: "蹇冩浜″垽瀹氬畬鎴愭椂闂翠笉鑳戒负绌�",
+ trigger: "change"
+ }
],
heartdeathjudgedocto: [
{
@@ -621,12 +697,14 @@
{ value: "3", label: "鐭綔浼忔湡浣撴劅璇卞彂鐢典綅璇勪及琛�" },
{ value: "4", label: "缁忛澶氭櫘鍕掕秴澹拌瘎浼拌褰�" },
{ value: "5", label: "鍗仴濮旇剳鎹熶激璐ㄦ帶涓績 - 涓村簥缁煎悎璇勪及琛�" },
- { value: "6", label: "UW璇勫垎琛�" }
+ { value: "7", label: "AT鍓�" },
+ { value: "8", label: "AT鍚�" },
+ { value: "6", label: "UW璇勫垎琛�(鑴戞浜�)" }
],
// 蹇冩浜¤瘎浼拌〃绫诲瀷瀹氫箟
heartDeathAttachmentTypes: [
{ value: "heart_1", label: "蹇冩浜″垽瀹氳〃" },
- { value: "heart_2", label: "蹇冪數鍥捐瘎浼拌〃" }
+ { value: "heart_2", label: "UW璇勫垎琛�(蹇冩浜�)" }
],
// 闄勪欢鍒楄〃鏁版嵁
@@ -651,7 +729,7 @@
created() {
this.infoid = this.$route.query.infoid;
this.caseId = this.infoid;
- this.isEdit = this.$route.query.isEdit === "true";
+
this.activeJudgmentType = this.$route.query.type;
// 浠庤矾鐢卞弬鏁拌幏鍙栭粯璁ゆ樉绀虹被鍨�
if (this.$route.query.judgmentType) {
@@ -667,7 +745,32 @@
this.activeJudgmentType = tab.name;
// 鍙互鍦ㄨ繖閲屾坊鍔犲叾浠栧垏鎹㈤�昏緫
},
+ addBrainDoctor() {
+ this.brainExtraDoctors.push("");
+ },
+ removeBrainDoctor(index) {
+ this.brainExtraDoctors.splice(index, 1);
+ },
+ addHeartDoctor() {
+ this.heartExtraDoctors.push("");
+ },
+ removeHeartDoctor(index) {
+ this.heartExtraDoctors.splice(index, 1);
+ },
+ // 搴忓垪鍖栭澶栧尰鐢熷垪琛ㄤ负瀛楃涓诧紙鐢ㄤ腑鏂囬�楀彿鍒嗛殧锛�
+ serializeExtraDoctors(list) {
+ return list.filter(name => name && name.trim()).join("锛�");
+ },
+
+ // 浠庡瓧绗︿覆瑙f瀽鍑哄尰鐢熷垪琛紙鎸変腑鏂囬�楀彿鎷嗗垎锛�
+ parseExtraDoctors(str) {
+ if (!str) return [];
+ return str
+ .split("锛�")
+ .map(s => s.trim())
+ .filter(s => s);
+ },
// 鐢熸垚鎹愮尞鑰呯紪鍙�
generateDonorNo() {
const timestamp = Date.now().toString();
@@ -678,13 +781,8 @@
async getDetail(infoid) {
try {
const response = await queryDathInfoBaseInfo({ infoid });
- let realData = {};
- if (response && response.data) {
- realData = response.data[0];
- } else if (response) {
- realData = response;
- }
+ let realData = response?.data?.[0] || response || {};
// 鏄犲皠瀛楁鍒拌〃鍗�
this.form = {
@@ -703,7 +801,18 @@
if (realData.rememberAnnex) {
this.parseAttachmentData(realData.rememberAnnex, "brain");
}
-
+ if (realData.extContent) {
+ const parts = realData.extContent.split(" | ");
+ parts.forEach(part => {
+ if (part.includes("鑴戞浜″叾浠栧尰鐢燂細")) {
+ const doctorsStr = part.replace("鑴戞浜″叾浠栧尰鐢燂細", "");
+ this.brainExtraDoctors = this.parseExtraDoctors(doctorsStr);
+ } else if (part.includes("蹇冩浜″叾浠栧尰鐢燂細")) {
+ const doctorsStr = part.replace("蹇冩浜″叾浠栧尰鐢燂細", "");
+ this.heartExtraDoctors = this.parseExtraDoctors(doctorsStr);
+ }
+ });
+ }
// 瑙f瀽蹇冩浜¢檮浠朵俊鎭�
if (realData.heartdeathjudgeannex) {
this.parseAttachmentData(realData.heartdeathjudgeannex, "heart");
@@ -1097,13 +1206,32 @@
this.saveLoading = true;
try {
+ // 鏋勫缓棰濆鍖荤敓瀛楃涓�
+ const brainExtraStr = this.serializeExtraDoctors(
+ this.brainExtraDoctors
+ );
+ const heartExtraStr = this.serializeExtraDoctors(
+ this.heartExtraDoctors
+ );
+
+ let extContent = this.form.extContent || "";
+ // 濡傛灉宸叉湁澶囨敞锛岀敤 ' | ' 鍒嗛殧锛涘惁鍒欑洿鎺ヨ祴鍊�
+ if (brainExtraStr) {
+ extContent +=
+ (extContent ? " | " : "") + "鑴戞浜″叾浠栧尰鐢燂細" + brainExtraStr;
+ }
+ if (heartExtraStr) {
+ extContent +=
+ (extContent ? " | " : "") + "蹇冩浜″叾浠栧尰鐢燂細" + heartExtraStr;
+ }
// 鏋勫缓鎻愪氦鏁版嵁
const submitData = {
...this.form,
infoid: this.infoid,
// 纭繚闄勪欢鏁版嵁鏈�鏂�
- rememberAnnex: this.buildBrainDeathAttachmentJson(),
- heartdeathjudgeannex: this.buildHeartDeathAttachmentJson()
+ rememberannex: this.buildBrainDeathAttachmentJson(),
+ heartdeathjudgeannex: this.buildHeartDeathAttachmentJson(),
+ extContent: extContent // 浣跨敤鍚堝苟鍚庣殑 extContent
};
if (submitData.state == 1 || !submitData.state) {
submitData.state = 2;
diff --git a/src/views/business/ethicalReview/ethicalReviewInfo.vue b/src/views/business/ethicalReview/ethicalReviewInfo.vue
index 529af28..2da5b62 100644
--- a/src/views/business/ethicalReview/ethicalReviewInfo.vue
+++ b/src/views/business/ethicalReview/ethicalReviewInfo.vue
@@ -6,38 +6,6 @@
<!-- 浼︾悊瀹℃煡鍩烘湰淇℃伅 -->
<div slot="header" class="clearfix">
<span class="detail-title">浼︾悊瀹℃煡鍩烘湰淇℃伅</span>
- <div style="float: right;">
- <el-button type="primary" @click="handleSave" :loading="saveLoading">
- 淇濆瓨
- </el-button>
-
- <el-button
- type="success"
- @click="handleCompleteReview"
- :disabled="form.status == '3' || form.status == '2'"
- :loading="completeLoading"
- >
- 瀹℃煡瀹屾垚
- </el-button>
-
- <el-button
- type="warning"
- @click="handleSuspendReview"
- :disabled="form.status == '2' || form.status == '3'"
- :loading="suspendLoading"
- >
- 瀹℃煡涓
- </el-button>
-
- <el-button
- type="danger"
- @click="handleEndReview"
- :disabled="form.status == '2'"
- :loading="endLoading"
- >
- 缁撴潫瀹℃煡
- </el-button>
- </div>
</div>
<el-form :model="form" ref="form" :rules="rules" label-width="120px">
@@ -458,7 +426,38 @@
</el-table-column>
</el-table>
</el-card>
+ <div style="text-align: center; margin: 30px 0;">
+ <el-button type="primary" @click="handleSave" :loading="saveLoading">
+ 淇濆瓨
+ </el-button>
+ <el-button
+ v-if="form.status != '3'"
+ type="success"
+ @click="handleCompleteReview"
+ :loading="completeLoading"
+ >
+ 瀹℃煡瀹屾垚
+ </el-button>
+
+ <el-button
+ type="warning"
+ @click="handleSuspendReview"
+ :disabled="form.status == '2' || form.status == '3'"
+ :loading="suspendLoading"
+ >
+ 瀹℃煡涓
+ </el-button>
+
+ <el-button
+ type="danger"
+ @click="handleEndReview"
+ :disabled="form.status == '2'"
+ :loading="endLoading"
+ >
+ 缁撴潫瀹℃煡
+ </el-button>
+ </div>
<!-- 娣诲姞涓撳瀵硅瘽妗� -->
<el-dialog
title="娣诲姞涓撳"
@@ -1173,7 +1172,13 @@
} else if (infoid) {
response = await reviewinitiateBaseInfoList({ infoid: infoid });
}
-
+ if (
+ !response.data.status ||
+ response.data.status == 0 ||
+ response.data.status == 1
+ ) {
+ response.data.status = "2";
+ }
if (response.code == 200) {
let detailData = {};
@@ -2309,7 +2314,7 @@
// .substring(0, 19)
// };
const sendDatas = {
- expertNo: expert.expertNo || "",
+ expertNo: expert.donorno || "",//7.14
id: expert.id || "",
infoId: this.infoid || ""
};
diff --git a/src/views/business/ethicalReview/index.vue b/src/views/business/ethicalReview/index.vue
index 9cc3b6a..3033248 100644
--- a/src/views/business/ethicalReview/index.vue
+++ b/src/views/business/ethicalReview/index.vue
@@ -158,7 +158,7 @@
/>
</template>
</el-table-column>
- <el-table-column
+ <!-- <el-table-column
label="瀹℃煡缁撹"
align="center"
prop="expertConclusion"
@@ -170,7 +170,7 @@
:value="scope.row.expertConclusion"
/>
</template>
- </el-table-column>
+ </el-table-column> -->
<el-table-column
label="瀹℃煡鎰忚"
align="center"
diff --git a/src/views/business/maintain/index.vue b/src/views/business/maintain/index.vue
index 65f602c..51f58a3 100644
--- a/src/views/business/maintain/index.vue
+++ b/src/views/business/maintain/index.vue
@@ -116,7 +116,7 @@
<el-table-column
label="鎹愮尞缂栧彿"
align="center"
- prop="inpatientno"
+ prop="caseNo"
width="120"
/>
<el-table-column
@@ -125,12 +125,7 @@
prop="inpatientno"
width="120"
/>
- <el-table-column
- label="濮撳悕"
- align="center"
- prop="name"
- width="120"
- />
+ <el-table-column label="濮撳悕" align="center" prop="name" width="120" />
<el-table-column label="鎬у埆" align="center" prop="sex" width="80">
<template slot-scope="scope">
<dict-tag
@@ -139,7 +134,21 @@
/>
</template>
</el-table-column>
- <el-table-column label="骞撮緞" align="center" prop="age" width="80" />
+ <el-table-column label="骞撮緞" align="center" prop="age" width="100">
+ <template slot-scope="scope">
+ {{
+ `${
+ scope.row.age && scope.row.age !== 0
+ ? `${scope.row.age}${scope.row.ageunit || ""}`
+ : ""
+ } ${
+ scope.row.age2 && scope.row.age2 !== 0
+ ? `${scope.row.age2}${scope.row.ageunit2}`
+ : ""
+ }`.trim()
+ }}
+ </template>
+ </el-table-column>
<el-table-column
label="琛�鍨�"
align="center"
@@ -187,9 +196,7 @@
>
<template slot-scope="scope">
<span>{{
- scope.row.updateTime
- ? parseTime(scope.row.updateTime)
- : "-"
+ scope.row.updateTime ? parseTime(scope.row.updateTime) : "-"
}}</span>
</template>
</el-table-column>
@@ -201,9 +208,7 @@
>
<template slot-scope="scope">
<span>{{
- scope.row.updateTime
- ? parseTime(scope.row.updateTime)
- : "-"
+ scope.row.updateTime ? parseTime(scope.row.updateTime) : "-"
}}</span>
</template>
</el-table-column>
@@ -281,7 +286,7 @@
export default {
name: "MaintenanceList",
components: { Pagination },
- dicts: ["sys_user_sex",'sys_BloodType','maintain_type'],
+ dicts: ["sys_user_sex", "sys_BloodType", "maintain_type"],
data() {
return {
// 閬僵灞�
@@ -369,18 +374,6 @@
this.maintenanceList = response.data;
this.total = response.total || 0;
- // 澶勭悊骞撮緞鏄剧ず
- this.maintenanceList.forEach(item => {
- if (item.startAge !== undefined && item.endAge !== undefined) {
- item.age = `${item.startAge}-${item.endAge}`;
- } else if (item.startAge !== undefined) {
- item.age = `${item.startAge}+`;
- } else if (item.endAge !== undefined) {
- item.age = `0-${item.endAge}`;
- } else {
- item.age = "-";
- }
- });
} else {
this.$message.error(response.msg || "鑾峰彇鏁版嵁澶辫触");
}
diff --git a/src/views/business/maintain/maintainInfo.vue b/src/views/business/maintain/maintainInfo.vue
index a0d327a..212bdc6 100644
--- a/src/views/business/maintain/maintainInfo.vue
+++ b/src/views/business/maintain/maintainInfo.vue
@@ -52,20 +52,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>
@@ -215,6 +250,30 @@
:initial-data="assessmentData.urineRoutine"
:is-editing="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="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="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="isEdit && activeTab === 'pancreasLab'"
+ @data-change="handlePancreasLabDataChange"
/>
</el-tab-pane>
</el-tabs>
@@ -463,6 +522,9 @@
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 +538,10 @@
LiverKidneyPanel,
BloodRoutinePanel,
UrineRoutinePanel,
- CaseBasicInfo
+ CaseBasicInfo,
+ HeartLabPanel,
+ LungLabPanel,
+ PancreasLabPanel
},
dicts: [
"sys_donornode",
@@ -595,6 +660,9 @@
liverKidney: {},
bloodRoutine: {},
urineRoutine: {},
+ heartLab: {}, // 鏂板
+ lungLab: {}, // 鏂板
+ pancreasLab: {}, // 鏂板
cultureResults: [],
nursingRecords: []
}
@@ -668,6 +736,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);
}
@@ -735,6 +812,9 @@
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
}
@@ -773,7 +853,16 @@
this.$message.error("淇濆瓨澶辫触");
}
},
-
+ // 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 +1363,7 @@
color: #f56c6c;
font-weight: bold;
}
+.custom-positive-tooltip {
+ max-width: 400px;
+}
</style>
diff --git a/src/views/business/transfer/TransportEdit.vue b/src/views/business/transfer/TransportEdit.vue
index e37071e..7481687 100644
--- a/src/views/business/transfer/TransportEdit.vue
+++ b/src/views/business/transfer/TransportEdit.vue
@@ -202,7 +202,7 @@
</el-row>
<el-row :gutter="20">
- <el-col :span="12">
+ <!-- <el-col :span="12">
<el-form-item label="杞繍鐘舵��" prop="transitStatus">
<el-select
v-model="formData.transitStatus"
@@ -216,7 +216,7 @@
<el-option label="鏆傚瓨" :value="5" />
</el-select>
</el-form-item>
- </el-col>
+ </el-col> -->
<el-col :span="12">
<el-form-item label="璐熻矗鍗忚皟鍛�" prop="contactPerson">
<el-input
@@ -247,22 +247,23 @@
/>
</el-form-item>
</el-col>
- <el-col :span="12">
+ <!-- <el-col :span="12">
<el-form-item label="鍖荤敓鐢佃瘽" prop="doctorPhone">
<el-input
v-model="formData.doctorPhone"
placeholder="璇疯緭鍏ュ尰鐢熸墜鏈哄彿"
/>
</el-form-item>
- </el-col>
- </el-row>
-
- <el-row :gutter="20">
- <el-col :span="12">
+ </el-col> -->
+ <el-col :span="12">
<el-form-item label="杞繍鎶ゅ+" prop="nurse">
<el-input v-model="formData.nurse" placeholder="璇疯緭鍏ユ姢澹鍚�" />
</el-form-item>
</el-col>
+ </el-row>
+
+ <!-- <el-row :gutter="20">
+
<el-col :span="12">
<el-form-item label="鎶ゅ+鐢佃瘽" prop="nursePhone">
<el-input
@@ -271,7 +272,7 @@
/>
</el-form-item>
</el-col>
- </el-row>
+ </el-row> -->
<el-row :gutter="20">
<el-col :span="12">
@@ -282,17 +283,15 @@
/>
</el-form-item>
</el-col>
- <el-col :span="12">
+ <!-- <el-col :span="12">
<el-form-item label="椹鹃┒鍛樼數璇�" prop="driverPhone">
<el-input
v-model="formData.driverPhone"
placeholder="璇疯緭鍏ラ┚椹跺憳鎵嬫満鍙�"
/>
</el-form-item>
- </el-col>
+ </el-col> -->
</el-row>
-
-
</el-card>
<!-- 闄勪欢淇℃伅 -->
@@ -430,7 +429,13 @@
</template>
<script>
-import { transportAdd, transportEdit } from "@/api/businessApi/index";
+import {
+ transportAdd,
+ transportEdit,
+ donateInfo,
+ donateList,
+ donateEdit
+} from "@/api/businessApi/index";
import UploadAttachment from "@/components/UploadAttachment";
import FilePreviewDialog from "@/components/FilePreviewDialog";
import dayjs from "dayjs";
@@ -502,7 +507,6 @@
watch: {
editOpen(val) {
if (val) {
-
if (this.isEdit) {
// 缂栬緫妯″紡锛屼娇鐢ㄤ紶鍏ョ殑杞繍鍗曟暟鎹�
@@ -552,7 +556,7 @@
transportStartPlace: undefined,
transportStartTime: undefined,
contactPerson: undefined,
- transitStatus: 1,
+ transitStatus: 2,
doctor: undefined,
doctorPhone: undefined,
nurse: undefined,
@@ -573,7 +577,6 @@
/** 鐢ㄦ渚嬫暟鎹~鍏呰〃鍗� */
fillFormWithCaseData(caseData) {
-
this.formData = {
...this.formData,
caseNo: caseData.caseNo || "",
@@ -757,6 +760,7 @@
this.saveLoading = true;
const requestData = { ...this.formData };
+
let response;
if (this.isEdit) {
response = await transportEdit(requestData);
@@ -768,6 +772,16 @@
this.$message.success(this.isEdit ? "淇敼鎴愬姛" : "鏂板缓鎴愬姛");
this.handleClose();
this.$emit("save-success");
+
+ if (requestData.transitStatus == 3) {
+ const resappear = await donateInfo(requestData.reportId);
+ if (resappear.code) {
+ let obj = resappear.data;
+ obj.isDonate = 1;
+ await donateEdit(obj);
+ this.$modal.msgSuccess(`瀵瑰簲涓婃姤妗堜緥宸茶繘鍏ユ寮忔渚嬫祦绋媊);
+ }
+ }
} else {
this.$message.error(response.msg || "鎿嶄綔澶辫触");
}
diff --git a/src/views/login.vue b/src/views/login.vue
index 61b37c0..a340e6c 100644
--- a/src/views/login.vue
+++ b/src/views/login.vue
@@ -6,7 +6,14 @@
:rules="loginRules"
class="login-form"
>
- <h3 class="title">闈掑矝澶у闄勫睘鍖婚櫌opo</h3>
+ <div class="login-header">
+ <img
+ src="@/assets/logo/OPO_Logo.png"
+ class="hospital-logo"
+ alt="鍖婚櫌logo"
+ />
+ <h3 class="title">闈掑矝澶у闄勫睘鍖婚櫌opo</h3>
+ </div>
<el-form-item prop="username">
<el-input
v-model="loginForm.username"
@@ -25,6 +32,7 @@
<el-input
v-model="loginForm.password"
type="password"
+ show-password
auto-complete="off"
@focus="tip"
placeholder="瀵嗙爜"
@@ -79,9 +87,18 @@
</div>
</el-form-item>
</el-form>
- <!-- 搴曢儴 -->
+ <!-- 搴曢儴淇℃伅 -->
<div class="el-login-footer">
- <span>Copyright 漏 娴欐睙鐪丱PO绠$悊涓績</span>
+ <div class="footer-content">
+ <div class="footer-row">
+ <span class="tech-label">鎶�鏈敮鎸侊細</span>
+ <img src="@/assets/logo/Hrs.png" class="tech-logo" alt="logo" />
+ <span class="tech-name">娴欐睙浜ュ皵鏃剁鎶�鏈夐檺鍏徃</span>
+ </div>
+ <div class="footer-row">
+ <span class="hotline">鏈嶅姟鐑嚎锛�17778760073</span>
+ </div>
+ </div>
</div>
</div>
</template>
@@ -328,17 +345,78 @@
vertical-align: middle;
}
}
+.login-header {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ margin-bottom: 30px; /* 涓庡師鏉� title 鐨� margin-bottom 涓�鑷� */
+}
+
+.hospital-logo {
+ width: 48px;
+ height: 48px;
+ border-radius: 50%;
+ margin-right: 14px;
+ border: 2px solid rgba(255, 255, 255, 0.3);
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
+ background: #fff; /* 闃叉閫忔槑鑳屾櫙 */
+}
+
+.title {
+ margin: 0;
+ text-align: center;
+ color: #707070;
+ font-size: 22px;
+ font-weight: bold;
+}
.el-login-footer {
- height: 40px;
- line-height: 40px;
position: fixed;
- bottom: 0;
+ bottom: 20px;
+ left: 0;
+ right: 0;
width: 100%;
text-align: center;
- color: #fff;
- font-family: Arial;
+ font-size: 13px;
+ color: rgba(255, 255, 255, 0.6);
+ z-index: 10;
+}
+
+.footer-content {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ gap: 4px;
+}
+
+.footer-row {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+
+.tech-logo {
+ width: 28px;
+ height: 28px;
+ margin: 0 6px;
+ vertical-align: middle;
+}
+
+.tech-label,
+.tech-name,
+.hotline {
+ color: rgba(255, 255, 255, 0.75);
+ font-size: 13px;
+}
+
+.tech-name {
+ color: rgba(255, 255, 255, 0.9);
+ font-weight: 500;
+}
+
+.hotline {
font-size: 12px;
- letter-spacing: 1px;
+ color: rgba(255, 255, 255, 0.55);
}
.login-code-img {
height: 38px;
diff --git a/src/views/project/donateannex/index.vue b/src/views/project/donateannex/index.vue
index 9a28fff..f853c1b 100644
--- a/src/views/project/donateannex/index.vue
+++ b/src/views/project/donateannex/index.vue
@@ -9,9 +9,9 @@
>
<el-row>
<el-col :span="6">
- <el-form-item label="鎹愮尞缂栧彿" prop="donorno">
+ <el-form-item label="鎹愮尞缂栧彿" prop="caseNo">
<el-input
- v-model="queryParams.donorno"
+ v-model="queryParams.caseNo"
placeholder="璇疯緭鍏ユ崘鐚紪鍙�"
clearable
size="small"
@@ -138,7 +138,7 @@
<el-table-column
label="鎹愮尞缂栧彿"
align="center"
- prop="donorno"
+ prop="caseNo"
width="140"
/>
<el-table-column
@@ -203,7 +203,7 @@
</template>
</el-table-column> -->
<!-- <el-table-column label="闄勪欢缂栧彿" align="center" prop="id" /> -->
- <!-- <el-table-column label="鎹愮尞缂栧彿" align="center" prop="donorno" /> -->
+ <!-- <el-table-column label="鎹愮尞缂栧彿" align="center" prop="caseNo" /> -->
<el-table-column label="闄勪欢缂栧彿" align="center" prop="annexno" />
<el-table-column label="闄勪欢鍚嶇О" align="center" prop="annexname" />
<el-table-column
@@ -243,8 +243,8 @@
<!-- 娣诲姞鎴栦慨鏀规崘鐚檮浠跺璇濇 -->
<!-- <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
- <el-form-item label="鎹愮尞鑰呯紪鍙�" prop="donorno">
- <el-input v-model="form.donorno" placeholder="璇疯緭鍏ユ崘鐚�呯紪鍙�" />
+ <el-form-item label="鎹愮尞鑰呯紪鍙�" prop="caseNo">
+ <el-input v-model="form.caseNo" placeholder="璇疯緭鍏ユ崘鐚�呯紪鍙�" />
</el-form-item>
<el-form-item label="闄勪欢鍚嶇О" prop="annexname">
<el-input v-model="form.annexname" placeholder="璇疯緭鍏ラ檮浠跺悕绉�" />
@@ -270,8 +270,8 @@
append-to-body
>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
- <el-form-item label="鎹愮尞缂栧彿" prop="donorno">
- <el-input v-model="form.donorno" placeholder="璇疯緭鍏ユ崘鐚�呯紪鍙�" />
+ <el-form-item label="鎹愮尞缂栧彿" prop="caseNo">
+ <el-input v-model="form.caseNo" placeholder="璇疯緭鍏ユ崘鐚�呯紪鍙�" />
</el-form-item>
<el-form-item label="濮撳悕" prop="name">
@@ -411,12 +411,12 @@
title: "",
// 鏄惁鏄剧ず寮瑰嚭灞�
open: false,
- donorno: "",
+ caseNo: "",
// 鏌ヨ鍙傛暟
queryParams: {
pageNum: 1,
pageSize: 10,
- donorno: null,
+ caseNo: null,
annexname: null,
annexno: null
},
@@ -686,7 +686,7 @@
}
],
//鎹愯禒缂栧彿
- donorno: "0001",
+ caseNo: "0001",
infoid: "8",
openType: "edit"
};
@@ -701,7 +701,7 @@
listnewDonateannex(this.queryParams).then(response => {
console.log("鏂版暟鎹�", response);
this.donateannexList = response.rows;
- console.log(this.donateannexList.donorNo);
+ console.log(this.donateannexList.caseNo);
this.total = response.total;
this.loading = false;
});
@@ -712,7 +712,7 @@
this.reset();
},
curCase: {
- donorno: "",
+ caseNo: "",
name: "",
registerAddresss: "",
infoid: ""
@@ -765,7 +765,7 @@
bloodtype: "0",
inpatientno: null,
rhyin: 0,
- donorno: null,
+ caseNo: null,
donationcategory: null,
illnessoverview: null,
diseasetype: [],
@@ -824,7 +824,7 @@
if (this.openType == "edit") {
this.title = "淇敼鎹愮尞鍩虹";
let searchParam = {
- donorno: this.donorno,
+ caseNo: this.caseNo,
infoid: this.infoid,
isdel: 0
};
@@ -935,7 +935,7 @@
let updateParam = {
id: this.attachJsonPosition[i].id,
infoid: this.infoid,
- donorno: this.donorno,
+ caseNo: this.caseNo,
delFlag: 0,
annexname: this.attachJsonPosition[i].annexname,
annexno: this.attachJsonPosition[i].annexno,
@@ -950,7 +950,7 @@
for (let i = 0; i < this.attachJsonPosition.length; i++) {
let addParam = {
infoid: this.infoid,
- donorno: this.donorno,
+ caseNo: this.caseNo,
delFlag: 0,
annexname: this.attachJsonPosition[i].annexname,
annexno: this.attachJsonPosition[i].annexno,
diff --git a/src/views/project/donatebaseinfo/EditCaseModal.vue b/src/views/project/donatebaseinfo/EditCaseModal.vue
index f89c500..e0cae19 100644
--- a/src/views/project/donatebaseinfo/EditCaseModal.vue
+++ b/src/views/project/donatebaseinfo/EditCaseModal.vue
@@ -17,12 +17,59 @@
<!-- 鍩虹淇℃伅閮ㄥ垎 -->
<el-card header="鍩虹淇℃伅" class="form-section">
<el-row :gutter="20">
- <el-col :span="11">
- <el-form-item label="妗堜緥缂栧彿" prop="caseNo">
+ <el-col :span="12">
+ <el-form-item
+ label="褰撳墠鍖荤枟鏈烘瀯"
+ prop="currentMedicalInstitution"
+ >
+ <el-input
+ v-model="formData.currentMedicalInstitution"
+ placeholder="璇疯緭鍏ュ綋鍓嶅尰鐤楁満鏋�"
+ />
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="褰撳墠鍖荤枟鏈烘瀯绉戝" prop="currentDept">
+ <el-input
+ v-model="formData.currentDept"
+ placeholder="璇疯緭鍏ュ綋鍓嶅尰鐤楁満鏋勭瀹�"
+ />
+ </el-form-item>
+ </el-col>
+ </el-row>
+
+ <el-row :gutter="20">
+ <el-col :span="12">
+ <el-form-item label="棣栬瘖鍖荤枟鏈烘瀯" prop="firstMedicalInstitution">
+ <el-input
+ v-model="formData.firstMedicalInstitution"
+ placeholder="璇疯緭鍏ラ璇婂尰鐤楁満鏋�"
+ />
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="棣栬瘖鍖荤枟鏈烘瀯绉戝" prop="firstDept">
+ <el-input
+ v-model="formData.firstDept"
+ placeholder="璇疯緭鍏ラ璇婂尰鐤楁満鏋勭瀹�"
+ />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row :gutter="20">
+ <el-col :span="12">
+ <el-form-item label="鎹愮尞缂栧彿" prop="caseNo">
<el-input
v-model="formData.caseNo"
- :disabled="isEdit"
- placeholder="绯荤粺鑷姩鐢熸垚"
+ placeholder="璇疯緭鍏ユ崘鐚紪鍙�"
+ />
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="涓婃姤鍖婚櫌" prop="treatmenthospitalname">
+ <el-input
+ v-model="formData.treatmenthospitalname"
+ placeholder="璇疯緭鍏ヤ笂鎶ュ尰闄�"
/>
</el-form-item>
</el-col>
@@ -37,12 +84,12 @@
</el-row>
<el-row :gutter="20">
- <el-col :span="6">
+ <el-col :span="8">
<el-form-item label="濮撳悕" prop="name">
<el-input v-model="formData.name" placeholder="蹇呭~椤�" />
</el-form-item>
</el-col>
- <el-col :span="6">
+ <el-col :span="8">
<el-form-item label="鎬у埆" prop="sex">
<el-select v-model="formData.sex" placeholder="璇烽�夋嫨鎬у埆">
<el-option label="鐢�" value="1" />
@@ -50,7 +97,48 @@
</el-select>
</el-form-item>
</el-col>
- <el-col :span="6">
+ <el-col :span="8">
+ <el-form-item label="鍥界睄" prop="nationality">
+ <el-input
+ v-model="formData.nationality"
+ placeholder="璇疯緭鍏ュ浗绫�"
+ />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row :gutter="20">
+ <el-col :span="8">
+ <el-form-item label="鍑虹敓鏃ユ湡" prop="birthday">
+ <el-date-picker
+ v-model="formData.birthday"
+ type="date"
+ placeholder="閫夋嫨鍑虹敓鏃ユ湡"
+ value-format="yyyy-MM-dd"
+ style="width: 100%"
+ @change="calculateAge"
+ />
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="骞撮緞" prop="andAge">
+ <el-input v-model="formData.andAge" disabled />
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="姘戞棌" prop="nation">
+ <el-select v-model="formData.nation" placeholder="璇烽�夋嫨姘戞棌">
+ <el-option
+ v-for="dict in dict.type.sys_nation || []"
+ :key="dict.value"
+ :label="dict.label"
+ :value="dict.value"
+ />
+ </el-select>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row :gutter="20">
+ <el-col :span="12">
<el-form-item label="璇佷欢绫诲瀷" prop="idcardtype">
<el-select
v-model="formData.idcardtype"
@@ -65,7 +153,7 @@
</el-select>
</el-form-item>
</el-col>
- <el-col :span="6">
+ <el-col :span="12">
<el-form-item label="璇佷欢鍙风爜" prop="idcardno">
<el-input
v-model="formData.idcardno"
@@ -76,55 +164,8 @@
</el-col>
</el-row>
- <el-row :gutter="20">
- <el-col :span="6">
- <el-form-item label="鍑虹敓鏃ユ湡" prop="birthday">
- <el-date-picker
- v-model="formData.birthday"
- type="date"
- placeholder="閫夋嫨鍑虹敓鏃ユ湡"
- value-format="yyyy-MM-dd"
- style="width: 100%"
- @change="calculateAge"
- />
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="骞撮緞" prop="andAge">
- <el-input v-model="formData.andAge" disabled />
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="姘戞棌" prop="nation">
- <el-select v-model="formData.nation" placeholder="璇烽�夋嫨姘戞棌">
- <el-option
- v-for="dict in dict.type.sys_nation || []"
- :key="dict.value"
- :label="dict.label"
- :value="dict.value"
- />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="鍥界睄" prop="nationality">
- <el-input
- v-model="formData.nationality"
- placeholder="璇疯緭鍏ュ浗绫�"
- />
- </el-form-item>
- </el-col>
- </el-row>
+ <!-- <el-row :gutter="20">
- <el-row :gutter="20">
- <el-col :span="6">
- <el-form-item label="鑱旂郴鐢佃瘽" prop="phone">
- <el-input
- v-model="formData.phone"
- placeholder="璇疯緭鍏ヨ仈绯荤數璇�"
- />
- </el-form-item>
- </el-col>
<el-col :span="6">
<el-form-item label="瀛﹀巻" prop="education">
<el-select
@@ -163,13 +204,34 @@
/>
</el-form-item>
</el-col>
- </el-row>
+ </el-row> -->
<el-row :gutter="20">
- <el-col :span="8">
- <el-form-item label="涓婃姤鍖婚櫌" prop="treatmenthospitalname">
+ <el-col :span="12">
+ <el-form-item label="鐜板眳浣忓湴" prop="residenceaddress">
+ <li-area-select
+ ref="residenceSelect"
+ v-model="residenceAddress"
+ @change="handleResidenceAddressChange"
+ />
<el-input
- v-model="formData.treatmenthospitalname"
- placeholder="璇疯緭鍏ヤ笂鎶ュ尰闄�"
+ v-model="formData.residenceaddress"
+ placeholder="璇疯緭鍏ヨ缁嗗湴鍧�"
+ style="margin-top: 8px"
+ @blur="handleResidenceDetailBlur"
+ />
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="浣忓潃" prop="registeraddress">
+ <li-area-select
+ ref="registerSelect"
+ v-model="registerAddress"
+ @change="handleRegisterAddressChange"
+ />
+ <el-input
+ v-model="formData.registeraddress"
+ placeholder="璇疯緭鍏ヨ缁嗗湴鍧�"
+ style="margin-top: 8px"
/>
</el-form-item>
</el-col>
@@ -179,7 +241,7 @@
<!-- 鍖荤枟淇℃伅閮ㄥ垎 -->
<el-card header="鍖荤枟淇℃伅" class="form-section">
<el-row :gutter="20">
- <el-col :span="8">
+ <!-- <el-col :span="8">
<el-form-item label="鍏ラ櫌鏃堕棿" prop="Reporttothehospital">
<el-date-picker
v-model="formData.entryTime"
@@ -189,23 +251,12 @@
style="width: 100%"
/>
</el-form-item>
- </el-col>
+ </el-col> -->
<el-col :span="8">
<el-form-item label="浣忛櫌鍙�" prop="inpatientno">
<el-input
v-model="formData.inpatientno"
placeholder="璇疯緭鍏ヤ綇闄㈠彿"
- />
- </el-form-item>
- </el-col>
- </el-row>
-
- <el-row :gutter="20">
- <el-col :span="12">
- <el-form-item label="鐤剧梾璇婃柇" prop="diagnosisname">
- <el-input
- v-model="formData.diagnosisname"
- placeholder="璇疯緭鍏ョ柧鐥呰瘖鏂悕绉�"
/>
</el-form-item>
</el-col>
@@ -237,26 +288,39 @@
</el-form-item>
</el-col>
</el-row>
-
+ <el-row :gutter="20">
+ <el-col :span="12">
+ <el-form-item label="鐤剧梾璇婃柇" prop="diagnosisname">
+ <el-input
+ v-model="formData.diagnosisname"
+ placeholder="璇疯緭鍏ョ柧鐥呰瘖鏂悕绉�"
+ />
+ </el-form-item>
+ </el-col>
+ </el-row>
<!-- 鐤剧梾绫诲瀷 -->
<el-row>
- <el-form-item label="鐤剧梾绫诲瀷" align="left">
- <el-checkbox-group v-model="formData.diseasetype">
- <el-checkbox
- v-for="dict in dict.type.sys_DiseaseType || []"
- :key="dict.value"
- :label="dict.value"
- >
- {{ dict.label }}
- </el-checkbox>
- </el-checkbox-group>
- </el-form-item>
- <el-form-item label="鍏朵粬" prop="diseasetypeOther">
- <el-input
- v-model="formData.diseasetypeOther"
- placeholder="璇疯緭鍏ュ叾浠�"
- />
- </el-form-item>
+ <el-col :span="16">
+ <el-form-item label="鐤剧梾绫诲瀷" align="left">
+ <el-checkbox-group v-model="formData.diseasetype">
+ <el-checkbox
+ v-for="dict in dict.type.sys_DiseaseType || []"
+ :key="dict.value"
+ :label="dict.value"
+ >
+ {{ dict.label }}
+ </el-checkbox>
+ </el-checkbox-group>
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="鍏朵粬" prop="diseasetypeOther">
+ <el-input
+ v-model="formData.diseasetypeOther"
+ placeholder="璇疯緭鍏ュ叾浠�"
+ />
+ </el-form-item>
+ </el-col>
</el-row>
<!-- 浼犳煋鐥� -->
@@ -314,48 +378,7 @@
</el-col>
</el-row>
- <el-row :gutter="20">
- <el-col :span="12">
- <el-form-item
- label="褰撳墠鍖荤枟鏈烘瀯"
- prop="currentMedicalInstitution"
- >
- <el-input
- v-model="formData.currentMedicalInstitution"
- placeholder="璇疯緭鍏ュ綋鍓嶅尰鐤楁満鏋�"
- />
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="褰撳墠鍖荤枟鏈烘瀯绉戝" prop="currentDept">
- <el-input
- v-model="formData.currentDept"
- placeholder="璇疯緭鍏ュ綋鍓嶅尰鐤楁満鏋勭瀹�"
- />
- </el-form-item>
- </el-col>
- </el-row>
-
- <el-row :gutter="20">
- <el-col :span="12">
- <el-form-item label="棣栨鍖荤枟鏈烘瀯" prop="firstMedicalInstitution">
- <el-input
- v-model="formData.firstMedicalInstitution"
- placeholder="璇疯緭鍏ラ娆″尰鐤楁満鏋�"
- />
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="棣栨鍖荤枟鏈烘瀯绉戝" prop="firstDept">
- <el-input
- v-model="formData.firstDept"
- placeholder="璇疯緭鍏ラ娆″尰鐤楁満鏋勭瀹�"
- />
- </el-form-item>
- </el-col>
- </el-row>
-
- <el-row :gutter="20">
+ <!-- <el-row :gutter="20">
<el-col :span="8">
<el-form-item label="GCS璇勫垎" prop="gcsScore">
<el-input
@@ -373,9 +396,9 @@
/>
</el-form-item>
</el-col>
- </el-row>
+ </el-row> -->
- <el-row>
+ <!-- <el-row>
<el-col :span="24">
<el-form-item label="鐥呮儏姒傚喌" prop="illnessoverview">
<el-input
@@ -386,43 +409,8 @@
/>
</el-form-item>
</el-col>
- </el-row>
+ </el-row> -->
</el-card>
-
- <!-- 鍦板潃淇℃伅閮ㄥ垎 -->
- <el-card header="鍦板潃淇℃伅" class="form-section">
- <el-row :gutter="20">
- <el-col :span="12">
- <el-form-item label="鐜颁綇鍦板潃" prop="residenceaddress">
- <li-area-select
- ref="residenceSelect"
- v-model="residenceAddress"
- @change="handleResidenceAddressChange"
- />
- <el-input
- v-model="formData.residenceaddress"
- placeholder="璇疯緭鍏ヨ缁嗗湴鍧�"
- style="margin-top: 8px"
- />
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="鎴风睄鍦板潃" prop="registeraddress">
- <li-area-select
- ref="registerSelect"
- v-model="registerAddress"
- @change="handleRegisterAddressChange"
- />
- <el-input
- v-model="formData.registeraddress"
- placeholder="璇疯緭鍏ヨ缁嗗湴鍧�"
- style="margin-top: 8px"
- />
- </el-form-item>
- </el-col>
- </el-row>
- </el-card>
-
<!-- 鎰忔効鍜屼翰灞炰俊鎭儴鍒� -->
<el-card header="鎰忔効鍜屼翰灞炰俊鎭�" class="form-section">
<!-- 鏈汉鎰忔効 -->
@@ -483,7 +471,7 @@
</el-form-item>
</el-col>
<el-col :span="8">
- <el-form-item label="涓庢崘鐚�呭叧绯�" prop="familyrelations">
+ <el-form-item label="涓庢綔鍦ㄦ崘鐚�呭叧绯�" prop="familyrelations">
<el-select
v-model="formData.familyrelations"
placeholder="璇烽�夋嫨涓庢崘鐚�呭叧绯�"
@@ -500,55 +488,118 @@
</el-row>
<!-- 淇℃伅鏉ユ簮 -->
- <el-row>
- <el-col :span="12">
- <el-form-item align="left" label="淇℃伅鏉ユ簮">
- <el-checkbox-group v-model="formData.infosources">
- <el-checkbox
- v-for="dict in dict.type.sys_InfoSources || []"
- :key="dict.value"
- :label="dict.value"
- >
- {{ dict.label }}
- </el-checkbox>
- </el-checkbox-group>
+ </el-card>
+ <!-- 鍦板潃淇℃伅閮ㄥ垎 -->
+ <!-- <el-card header="鍦板潃淇℃伅" class="form-section">
+
+ </el-card> -->
+ <!-- 鎶ュ憡淇℃伅閮ㄥ垎 -->
+ <el-card header="鎶ュ憡淇℃伅" class="form-section">
+ <el-row :gutter="20">
+ <!-- <el-col :span="8">
+ <el-form-item label="鎶ュ憡浜虹紪鍙�" prop="reporterno">
+ <el-select
+ v-model="formData.reporterno"
+ @change="handleReporterChange"
+ >
+ <el-option
+ v-for="reporter in reporters"
+ :key="reporter.reportNo"
+ :label="reporter.reportName"
+ :value="reporter.reportNo"
+ />
+ </el-select>
+ </el-form-item>
+ </el-col> -->
+ <el-row>
+ <el-col :span="12">
+ <el-form-item align="left" label="淇℃伅鏉ユ簮">
+ <el-checkbox-group v-model="formData.infosources">
+ <el-checkbox
+ v-for="dict in dict.type.sys_InfoSources || []"
+ :key="dict.value"
+ :label="dict.value"
+ >
+ {{ dict.label }}
+ </el-checkbox>
+ </el-checkbox-group>
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="鍏朵粬" prop="infosourcesOther">
+ <el-input
+ v-model="formData.infosourcesOther"
+ placeholder="璇疯緭鍏ヤ俊鎭潵婧愬叾浠�"
+ />
+ </el-form-item>
+ </el-col>
+ </el-row>
+
+ <!-- 淇℃伅鍛� -->
+ <el-row>
+ <el-col :span="8">
+ <el-form-item label="淇℃伅鍛�" prop="infoName">
+ <el-input
+ v-model="formData.infoName"
+ placeholder="璇疯緭鍏ヤ俊鎭憳"
+ />
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="鑱旂郴鐢佃瘽" prop="infophone">
+ <el-input
+ v-model="formData.infophone"
+ placeholder="璇疯緭鍏ヤ俊鎭憳鑱旂郴鐢佃瘽"
+ />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-col :span="8">
+ <el-form-item label="鎶ュ憡浜虹瀛�" prop="reportername">
+ <el-input
+ v-model="formData.reportername"
+ placeholder="鎶ュ憡浜哄鍚�"
+ :disabled="true"
+ />
</el-form-item>
</el-col>
<el-col :span="8">
- <el-form-item label="鍏朵粬" prop="infosourcesOther">
+ <el-form-item label="鑱旂郴鐢佃瘽" prop="reporterphone">
<el-input
- v-model="formData.infosourcesOther"
- placeholder="璇疯緭鍏ヤ俊鎭潵婧愬叾浠�"
+ v-model="formData.reporterphone"
+ placeholder="鎶ュ憡浜鸿仈绯荤數璇�"
/>
</el-form-item>
</el-col>
</el-row>
- <!-- 淇℃伅鍛� -->
- <el-row>
- <el-col :span="8">
- <el-form-item label="淇℃伅鍛�" prop="infoname">
- <el-input
- v-model="formData.infoname"
- placeholder="璇疯緭鍏ヤ俊鎭憳"
+ <el-row :gutter="20">
+ <el-col :span="12">
+ <el-form-item label="鎶ュ憡鏃堕棿" prop="reporttime">
+ <el-date-picker
+ v-model="formData.reporttime"
+ type="date"
+ placeholder="閫夋嫨鎶ュ憡鏃堕棿"
+ value-format="yyyy-MM-dd "
+ style="width: 100%"
/>
</el-form-item>
</el-col>
- <el-col :span="8">
- <el-form-item label="鑱旂郴鐢佃瘽" prop="infophone">
+ <!-- <el-col :span="12">
+ <el-form-item label="閮ㄩ棬ID" prop="deptid">
<el-input
- v-model="formData.infophone"
- placeholder="璇疯緭鍏ヤ俊鎭憳鑱旂郴鐢佃瘽"
+ v-model="formData.deptid"
+ placeholder="璇疯緭鍏ラ儴闂↖D"
/>
</el-form-item>
- </el-col>
+ </el-col> -->
</el-row>
</el-card>
<!-- 鎹愮尞淇℃伅閮ㄥ垎 -->
<el-card header="鎹愮尞淇℃伅" class="form-section">
<el-row :gutter="20">
- <el-col :span="8">
+ <!-- <el-col :span="8">
<el-form-item label="鎹愮尞绫诲埆" prop="donationcategory">
<el-select
v-model="formData.donationcategory"
@@ -562,9 +613,9 @@
/>
</el-select>
</el-form-item>
- </el-col>
+ </el-col> -->
<el-col :span="8">
- <el-form-item label="妗堜緥鏃堕棿" prop="donatetime">
+ <el-form-item label="妗堜緥涓婃姤鏃堕棿" prop="donatetime">
<el-date-picker
v-model="formData.donatetime"
type="datetime"
@@ -587,34 +638,26 @@
</el-col>
</el-row>
- <el-row :gutter="20">
- <el-col :span="12">
- <el-form-item label="鑾峰彇缁勭粐缂栧彿" prop="acquisitiontissueno">
- <el-input
- v-model="formData.acquisitiontissueno"
- placeholder="璇疯緭鍏ヨ幏鍙栫粍缁囩紪鍙�"
- />
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="鑾峰彇缁勭粐鍚嶇О" prop="acquisitiontissuename">
- <el-input
- v-model="formData.acquisitiontissuename"
- placeholder="璇疯緭鍏ヨ幏鍙栫粍缁囧悕绉�"
- />
- </el-form-item>
- </el-col>
- </el-row>
-
<!-- 绾㈠崄瀛椾細鍜岃仈绯讳汉 -->
<el-row>
<el-col :span="8">
<el-form-item align="left" label="绾㈠崄瀛椾細" prop="redorganno">
- <org-selecter
+ <!-- <org-selecter
ref="addCrossOrgSelect"
:org-type="'2'"
v-model="formData.redorganno"
- />
+ /> -->
+ <el-select
+ v-model="formData.redorganname"
+ placeholder="璇烽�夋嫨绾㈠崄瀛椾細鏈烘瀯鍚嶇О"
+ >
+ <el-option
+ v-for="dict in dict.type.sys_redcrossagency"
+ :key="dict.value"
+ :label="dict.label"
+ :value="dict.value"
+ ></el-option>
+ </el-select>
</el-form-item>
</el-col>
<el-col :span="8">
@@ -637,67 +680,84 @@
</el-form-item>
</el-col>
</el-row>
- </el-card>
-
- <!-- 鎶ュ憡淇℃伅閮ㄥ垎 -->
- <el-card header="鎶ュ憡淇℃伅" class="form-section">
<el-row :gutter="20">
- <el-col :span="8">
- <el-form-item label="鎶ュ憡浜虹紪鍙�" prop="reporterno">
- <el-select
- v-model="formData.reporterno"
- @change="handleReporterChange"
- >
- <el-option
- v-for="reporter in reporters"
- :key="reporter.reportNo"
- :label="reporter.reportName"
- :value="reporter.reportNo"
- />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="鎶ュ憡浜哄鍚�" prop="reportername">
+ <!-- <el-col :span="12">
+ <el-form-item label="鑾峰彇缁勭粐缂栧彿" prop="acquisitiontissueno">
<el-input
- v-model="formData.reportername"
- placeholder="鎶ュ憡浜哄鍚�"
- :disabled="true"
+ v-model="formData.acquisitiontissueno"
+ placeholder="璇疯緭鍏ヨ幏鍙栫粍缁囩紪鍙�"
/>
</el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="鎶ュ憡浜虹數璇�" prop="reporterphone">
- <el-input
- v-model="formData.reporterphone"
- placeholder="鎶ュ憡浜鸿仈绯荤數璇�"
- />
- </el-form-item>
- </el-col>
- </el-row>
-
- <el-row :gutter="20">
+ </el-col> -->
<el-col :span="12">
- <el-form-item label="鎶ュ憡鏃堕棿" prop="reporttime">
- <el-date-picker
- v-model="formData.reporttime"
- type="datetime"
- placeholder="閫夋嫨鎶ュ憡鏃堕棿"
- value-format="yyyy-MM-dd HH:mm:ss"
- style="width: 100%"
- />
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="閮ㄩ棬ID" prop="deptid">
+ <el-form-item label="鑾峰彇缁勭粐鍚嶇О" prop="acquisitiontissuename">
<el-input
- v-model="formData.deptid"
- placeholder="璇疯緭鍏ラ儴闂↖D"
+ v-model="formData.acquisitiontissuename"
+ placeholder="璇疯緭鍏ヨ幏鍙栫粍缁囧悕绉�"
/>
</el-form-item>
</el-col>
</el-row>
</el-card>
+ <!-- 涓婃姤闃舵闄勪欢 -->
+<el-card v-if="reportAttachments && reportAttachments.length > 0" class="form-section" shadow="never">
+ <div slot="header" class="section-header">
+ <i class="el-icon-paperclip" style="color: #409EFF; margin-right: 8px;"></i>
+ <span>涓婃姤闃舵闄勪欢</span>
+ </div>
+ <div class="attachment-list">
+ <el-tabs v-model="reportActiveTab" type="border-card">
+ <el-tab-pane
+ v-for="category in reportCategories"
+ :key="category"
+ :label="category + '(' + getReportCategoryCount(category) + ')'"
+ :name="category"
+ >
+ <el-table :data="getReportCategoryFiles(category)" style="width: 100%" size="small" border>
+ <el-table-column label="鏂囦欢鍚�" min-width="200">
+ <template #default="scope">
+ <i class="el-icon-document" style="margin-right: 8px; color: #409EFF;"></i>
+ <span class="file-name">{{ scope.row.fileName }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column label="鏂囦欢绫诲瀷" width="100">
+ <template #default="scope">
+ <el-tag size="small">{{ getFileType(scope.row.fileName) }}</el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column label="鍒涘缓鏃堕棿" width="160">
+ <template #default="scope">
+ <span>{{ formatDateTime(scope.row.createTime) }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column label="鎿嶄綔" width="120">
+ <template #default="scope">
+ <el-button size="mini" type="primary" @click="handleReportPreview(scope.row)">棰勮</el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+ </el-tab-pane>
+ </el-tabs>
+ </div>
+</el-card>
+
+<!-- 鍔犺浇涓崰浣� -->
+<el-card v-else-if="reportAttachmentLoading" class="form-section" shadow="never">
+ <div slot="header" class="section-header">
+ <i class="el-icon-paperclip" style="color: #409EFF; margin-right: 8px;"></i>
+ <span>涓婃姤闃舵闄勪欢</span>
+ </div>
+ <div style="text-align:center; padding:20px;">鍔犺浇闄勪欢涓�...</div>
+</el-card>
+
+<!-- 鏈� reportId 浣嗘棤闄勪欢 -->
+<el-card v-else-if="editData.reportId" class="form-section" shadow="never">
+ <div slot="header" class="section-header">
+ <i class="el-icon-paperclip" style="color: #409EFF; margin-right: 8px;"></i>
+ <span>涓婃姤闃舵闄勪欢</span>
+ </div>
+ <div style="text-align:center; padding:20px; color:#909399;">鏆傛棤涓婃姤闄勪欢</div>
+</el-card>
</el-form>
<div slot="footer" class="dialog-footer">
@@ -720,6 +780,7 @@
updateDonatebaseinfo
} from "@/api/project/donatebaseinfo";
import OrgSelecter from "@/views/project/components/orgselect";
+import { donateInfo } from "@/api/businessApi/index";
import LiAreaSelect from "@/components/Address";
export default {
@@ -731,6 +792,7 @@
// 娣诲姞鎵�鏈夐渶瑕佺殑瀛楀吀绫诲瀷
dicts: [
+ "sys_redcrossagency",
"sys_bloodtype_rhd",
"sys_BloodType",
"sys_user_sex",
@@ -774,9 +836,16 @@
residenceAddress: {},
registerAddress: {},
formData: this.getDefaultFormData(),
+ reportAttachments: [], // 涓婃姤闃舵鐨勯檮浠跺垪琛�
+ reportAttachmentLoading: false, // 鍔犺浇鐘舵��
+ reportActiveTab: "鐧昏琛ㄩ檮浠�", // 褰撳墠婵�娲荤殑闄勪欢鍒嗙被 Tab
+ presetCategories: ["鐧昏琛ㄩ檮浠�", "璇佷欢鐓�", "鐤剧梾璇婃柇娌荤枟"], // 棰勮鍒嗙被
rules: {
name: [
{ required: true, message: "璇疯緭鍏ユ崘鐚�呭鍚�", trigger: "blur" }
+ ],
+ caseNo: [
+ { required: true, message: "璇疯緭鍏ユ崘鐚�呯紪鍙�", trigger: "blur" }
],
sex: [{ required: true, message: "璇烽�夋嫨鎬у埆", trigger: "change" }],
idcardtype: [
@@ -802,6 +871,12 @@
],
reporttime: [
{ required: true, message: "璇烽�夋嫨鎶ュ憡鏃堕棿", trigger: "change" }
+ ],
+ residenceaddress: [
+ { required: true, message: "璇疯緭鍏ョ幇灞呬綇鍦拌缁嗗湴鍧�", trigger: "blur" }
+ ],
+ registeraddress: [
+ { required: true, message: "璇疯緭鍏ヤ綇鍧�璇︾粏鍦板潃", trigger: "blur" }
]
}
};
@@ -820,6 +895,21 @@
this.handleClose();
}
}
+ },
+ reportCategories() {
+ if (!this.reportAttachments || this.reportAttachments.length === 0)
+ return [];
+ const cats = new Set();
+ this.reportAttachments.forEach(item => {
+ const type = item.fileType || item.filetype || "";
+ if (this.presetCategories.includes(type)) {
+ cats.add(type);
+ } else {
+ cats.add("鏈垎绫�");
+ }
+ });
+ const order = ["鐧昏琛ㄩ檮浠�", "璇佷欢鐓�", "鐤剧梾璇婃柇娌荤枟", "鏈垎绫�"];
+ return order.filter(c => cats.has(c));
}
},
watch: {
@@ -831,6 +921,16 @@
});
} else {
this.handleClose();
+ }
+ },
+ "editData.reportId": {
+ immediate: true,
+ handler(newVal) {
+ if (newVal) {
+ this.loadReportAttachments(newVal);
+ } else {
+ this.reportAttachments = [];
+ }
}
},
editData: {
@@ -914,7 +1014,7 @@
majorrelatives: null,
familyrelations: null,
infosources: [],
- infoname: null,
+ infoName: null,
infophone: null,
redorganno: null,
contactperson: null,
@@ -924,8 +1024,7 @@
donationcategory: null,
donatetime: null,
recordstate: "0",
- acquisitiontissueno: "ZJOPO",
- acquisitiontissuename: "娴欐睙鐪佷汉浣撳櫒瀹樿幏鍙栫粍缁�",
+ acquisitiontissuename: "闈掑矝澶у闄勫睘鍖婚櫌",
// 鎶ュ憡淇℃伅
reporterno: null,
@@ -955,8 +1054,11 @@
this.formData.bloodtype = "0";
this.formData.rhyin = "0";
this.formData.recordstate = "0";
- this.formData.acquisitiontissueno = "ZJOPO";
- this.formData.acquisitiontissuename = "娴欐睙鐪佷汉浣撳櫒瀹樿幏鍙栫粍缁�";
+ this.formData.acquisitiontissuename = "闈掑矝澶у闄勫睘鍖婚櫌";
+
+ // 璁剧疆淇℃伅鍛樺拰鐢佃瘽榛樿鍊�
+ this.formData.infoName = "瀛欐枃鏈�";
+ this.formData.infophone = "18661808259";
}
} catch (error) {
console.error("鍒濆鍖栬〃鍗曞け璐�:", error);
@@ -973,6 +1075,8 @@
async loadEditData() {
try {
const response = await getDonatebaseinfo(this.editData.id);
+ response.data.firstMedicalInstitution =
+ response.data.treatmenthospitalname;
const data = response.data;
console.log("鍔犺浇鍒扮殑鏁版嵁:", data);
@@ -996,25 +1100,29 @@
this.formData = { ...this.getDefaultFormData(), ...data };
console.log("鍚堝苟鍚庣殑formData:", this.formData);
+ this.formData.infoName = "瀛欐枃鏈�";
+ this.formData.infophone = "18661808259";
+ if (!this.formData.currentMedicalInstitution)
+ this.formData.currentMedicalInstitution = "闈掑矝澶у闄勫睘鍖婚櫌";
- // 璁剧疆鍦板潃淇℃伅
- if (data.residenceprovince) {
+ if (!this.formDatacurrentDept) this.formData.currentDept = "鍣ㄥ畼鎹愮尞绉�";
+ // 鏍规嵁杩斿洖鏁版嵁璁剧疆鍦板潃灞曠ず淇℃伅
+ if (data.residenceprovincename) {
this.residenceAddress = {
- sheng: data.residenceprovince,
- shi: data.residencecity,
- qu: data.residencetown
+ sheng: data.residenceprovincename,
+ shi: data.residencecountyname,
+ qu: data.residencecommunityname
};
}
-
+ // 鎴风睄鍦板潃
if (data.registerprovince) {
this.registerAddress = {
sheng: data.registerprovince,
- shi: data.registercity,
- qu: data.registertown
+ shi: data.registercityname,
+ qu: data.registercommunityname
};
}
- console.log(this.registerAddress,'registerAddress12');
-
+ console.log(this.registerAddress, "registerAddress12");
this.calculateAge(data.birthday);
} catch (error) {
@@ -1120,17 +1228,38 @@
},
handleResidenceAddressChange(address) {
- this.formData.residenceprovince = address.sheng;
- this.formData.residencecity = address.shi;
- this.formData.residencetown = address.qu;
- },
+ this.formData.residenceprovincename = address.sheng;
+ this.formData.residencecountyname = address.shi;
+ this.formData.residencecommunityname = address.qu;
+ // 姣忔鐜颁綇鍧�鐪佸競鍖哄彉鍖栨椂锛屽鏋滄埛绫嶅湴鍧�鐨勭渷甯傚尯瀹屽叏涓虹┖锛屽垯鑷姩濉厖
+ const registerProvinceEmpty = !this.formData.registerprovince;
+ const registerCityEmpty = !this.formData.registercityname;
+ const registerTownEmpty = !this.formData.registercommunityname;
+
+ if (registerProvinceEmpty || registerCityEmpty || registerTownEmpty) {
+ this.formData.registerprovince = address.sheng;
+ this.formData.registercityname = address.shi;
+ this.formData.registercommunityname = address.qu;
+ this.registerAddress = {
+ sheng: address.sheng,
+ shi: address.shi,
+ qu: address.qu
+ };
+ }
+ },
+ // 鐜板眳浣忓湴璇︾粏鍦板潃澶辩劍鏃讹紝濡傛灉浣忓潃璇︾粏鍦板潃涓虹┖鍒欒嚜鍔ㄥ~鍏�
+ handleResidenceDetailBlur() {
+ if (this.formData.residenceaddress && !this.formData.registeraddress) {
+ this.formData.registeraddress = this.formData.residenceaddress;
+ }
+ },
handleRegisterAddressChange(address) {
- console.log(this.registerAddress,'registerAddress11');
+ console.log(this.registerAddress, "registerAddress11");
this.formData.registerprovince = address.sheng;
- this.formData.registercity = address.shi;
- this.formData.registertown = address.qu;
+ this.formData.registercityname = address.shi;
+ this.formData.registercommunityname = address.qu;
},
handleClose() {
@@ -1149,7 +1278,18 @@
this.$message.error("璇风‘璁よ〃鍗曞繀濉俊鎭畬鏁村悗鎻愪氦");
return;
}
-
+ // 棰濆鏍¢獙鐜板眳浣忓湴鍜屼綇鍧�鐨勭渷甯傚尯鏄惁宸查�夋嫨
+ if (
+ !this.formData.residenceprovincename ||
+ !this.formData.residencecountyname
+ ) {
+ this.$message.error("璇峰畬鍠勭幇灞呬綇鍦扮殑鐪佸競鍖轰俊鎭�");
+ return;
+ }
+ if (!this.formData.registerprovince || !this.formData.registercityname) {
+ this.$message.error("璇峰畬鍠勪綇鍧�鐨勭渷甯傚尯淇℃伅");
+ return;
+ }
this.submitLoading = true;
try {
const submitData = this.processSubmitData();
@@ -1225,6 +1365,79 @@
}
return data;
+ },
+ /** 鍔犺浇涓婃姤妗堜緥闄勪欢 */
+ async loadReportAttachments(reportId) {
+ this.reportAttachmentLoading = true;
+ try {
+ const res = await donateInfo(reportId);
+ const data = res.data || res;
+ this.reportAttachments = (data.annexfilesList || []).map(item => ({
+ ...item,
+ fileType: item.fileType || item.filetype || "" // 鍏煎瀛楁澶у皬鍐�
+ }));
+ } catch (error) {
+ console.error("鍔犺浇涓婃姤闄勪欢澶辫触:", error);
+ this.$message.error("鍔犺浇涓婃姤闄勪欢澶辫触");
+ } finally {
+ this.reportAttachmentLoading = false;
+ }
+ },
+
+ /** 鑾峰彇鏌愬垎绫绘枃浠舵暟閲� */
+ getReportCategoryCount(category) {
+ return this.reportAttachments.filter(item => {
+ const type = item.fileType || "";
+ if (category === "鏈垎绫�") {
+ return !this.presetCategories.includes(type);
+ }
+ return type === category;
+ }).length;
+ },
+
+ /** 鑾峰彇鏌愬垎绫绘枃浠跺垪琛� */
+ getReportCategoryFiles(category) {
+ return this.reportAttachments.filter(item => {
+ const type = item.fileType || "";
+ if (category === "鏈垎绫�") {
+ return !this.presetCategories.includes(type);
+ }
+ return type === category;
+ });
+ },
+
+ /** 棰勮涓婃姤闄勪欢锛堢洿鎺ュ湪鏂扮獥鍙f墦寮�锛� */
+ handleReportPreview(file) {
+ const url = file.fileUrl || file.path;
+ if (url) {
+ window.open(url, "_blank");
+ } else {
+ this.$message.warning("鏂囦欢鍦板潃涓嶅瓨鍦�");
+ }
+ },
+
+ /** 鑾峰彇鏂囦欢绫诲瀷锛堢敤浜庢爣绛炬樉绀猴級 */
+ getFileType(fileName) {
+ if (!fileName) return "other";
+ const extension = fileName
+ .split(".")
+ .pop()
+ .toLowerCase();
+ const imageTypes = ["jpg", "jpeg", "png", "gif", "bmp", "webp"];
+ const pdfTypes = ["pdf"];
+ const officeTypes = ["doc", "docx", "xls", "xlsx"];
+ if (imageTypes.includes(extension)) return "image";
+ if (pdfTypes.includes(extension)) return "pdf";
+ if (officeTypes.includes(extension)) return "office";
+ return "other";
+ },
+
+ /** 鏃ユ湡鏃堕棿鏍煎紡鍖栵紙澶嶇敤锛� */
+ formatDateTime(dateTime) {
+ if (!dateTime) return "";
+ return this.$moment
+ ? this.$moment(dateTime).format("YYYY-MM-DD HH:mm:ss")
+ : dateTime;
}
}
};
@@ -1234,6 +1447,7 @@
.form-section {
margin-bottom: 20px;
}
+
.form-section:last-child {
margin-bottom: 0;
}
diff --git a/src/views/project/donatebaseinfo/index.vue b/src/views/project/donatebaseinfo/index.vue
index 63e3fca..7fd434e 100644
--- a/src/views/project/donatebaseinfo/index.vue
+++ b/src/views/project/donatebaseinfo/index.vue
@@ -90,16 +90,13 @@
:default-sort="{ prop: 'donatetime', order: 'descending' }"
>
<el-table-column label="濮撳悕" align="center" prop="name" width="100" />
+
<el-table-column
- label="妗堜緥鏃堕棿"
+ label="鎹愮尞缂栧彿"
align="center"
- prop="donatetime"
- width="100"
- >
- <template slot-scope="scope">
- <span>{{ parseTime(scope.row.donatetime, "{y}-{m}-{d}") }}</span>
- </template>
- </el-table-column>
+ prop="caseNo"
+ width="200"
+ />
<el-table-column
label="浣忛櫌鍙�"
align="center"
@@ -120,19 +117,6 @@
/>
</div>
<div v-else><el-button type="danger" plain>浠诲姟缁堟</el-button></div>
- </template>
- </el-table-column>
- <el-table-column
- label="鎹愮尞绫诲埆"
- align="center"
- prop="donationcategory"
- width="150"
- >
- <template slot-scope="scope">
- <dict-tag
- :options="dict.type.sys_DonationCategory"
- :value="scope.row.donationcategory"
- />
</template>
</el-table-column>
@@ -159,12 +143,12 @@
}}
</template>
</el-table-column>
- <el-table-column
+ <!-- <el-table-column
label="GCS璇勫垎"
align="center"
prop="gcsScore"
width="100"
- />
+ /> -->
<el-table-column label="琛�鍨�" align="center" prop="bloodtype" width="100">
<template slot-scope="scope">
<dict-tag
@@ -173,7 +157,19 @@
/>
</template>
</el-table-column>
-
+ <el-table-column
+ label="鎹愮尞绫诲埆"
+ align="center"
+ prop="donationcategory"
+ width="150"
+ >
+ <template slot-scope="scope">
+ <dict-tag
+ :options="dict.type.sys_DonationCategory"
+ :value="scope.row.donationcategory"
+ />
+ </template>
+ </el-table-column>
<el-table-column label="浼犳煋鐥�" align="center" prop="infectious">
<template slot-scope="scope">
<span v-for="item in scope.row.infectious.split(',')"
@@ -189,6 +185,16 @@
width="100"
/>
<el-table-column
+ label="涓婃姤鏃堕棿"
+ align="center"
+ prop="donatetime"
+ width="100"
+ >
+ <template slot-scope="scope">
+ <span>{{ parseTime(scope.row.donatetime, "{y}-{m}-{d}") }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column
label="鎿嶄綔"
width="220"
align="center"
diff --git a/src/views/project/donateconsolationfund/index.vue b/src/views/project/donateconsolationfund/index.vue
index 1902d2f..4616177 100644
--- a/src/views/project/donateconsolationfund/index.vue
+++ b/src/views/project/donateconsolationfund/index.vue
@@ -9,9 +9,9 @@
>
<el-row align="left">
<el-col :span="24">
- <el-form-item label="鎹愮尞缂栧彿" prop="donorno">
+ <el-form-item label="鎹愮尞缂栧彿" prop="caseNo">
<el-input
- v-model="queryParams.donorno"
+ v-model="queryParams.caseNo"
placeholder="璇疯緭鍏ユ崘鐚紪鍙�"
clearable
size="small"
@@ -89,7 +89,7 @@
:data="donatebaseinfoList"
@row-click="selectDonotor"
>
- <el-table-column label="鎹愮尞缂栧彿" align="center" prop="donorno" />
+ <el-table-column label="鎹愮尞缂栧彿" align="center" prop="caseNo" />
<el-table-column
label="鎹愮尞杩涘害"
width="150"
@@ -148,7 +148,7 @@
</el-col>
<el-col :span="9">
<el-form-item label="鎹愮尞缂栧彿">
- <el-input v-model="curCase.donorno" disabled></el-input>
+ <el-input v-model="curCase.caseNo" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="9">
@@ -333,10 +333,10 @@
<!-- <el-form ref="applyForm" :model="applicationForm" label-width="120px"> -->
<el-row>
<el-col :span="8">
- <el-form-item label="鎹愮尞缂栧彿" prop="donorno">
+ <el-form-item label="鎹愮尞缂栧彿" prop="caseNo">
<el-input
disabled
- v-model="form.donorno"
+ v-model="form.caseNo"
placeholder="璇疯緭鍏ユ崘鐚紪鍙�"
clearable
/>
@@ -798,7 +798,7 @@
//褰撳墠閫変腑鎹愮尞鑰呭鍚�
curdonordoname: "",
//褰撳墠閫変腑鎹愮尞鑰呬綇闄㈠彿
- curdonorno: "",
+ curcaseNo: "",
// 閬僵灞�
loading: true,
// 瀵煎嚭閬僵灞�
@@ -836,7 +836,7 @@
residencetown: null,
recordstate: null,
treatmenthospitalname: null,
- donorno: null,
+ caseNo: null,
reportername: null,
reporttime: null,
},
@@ -1061,14 +1061,14 @@
},
//鍔ㄦ�佽绠楃◣鍓嶉噾棰�
change(scope) {},
- autodonorno() {
+ autocaseNo() {
listDonatebaseinfo().then((res) => {
// console.log("鎵�鏈夋崘鐚�呭垪琛細",res);
res.rows.forEach((data) => {
// console.log("data:",data);
if (this.form.doname === data.name) {
- this.form.donorno = data.donorno;
- console.log(this.form.donorno);
+ this.form.caseNo = data.caseNo;
+ console.log(this.form.caseNo);
} else {
// this.$modal.alertWarning("瀵逛笉璧凤紝鏃犺鎹愮尞浜�");
}
@@ -1118,7 +1118,7 @@
id: null,
infoid: null,
- donorno: null,
+ caseNo: null,
delFlag: null,
createBy: null,
createTime: null,
@@ -1176,7 +1176,7 @@
this.reset();
this.queryParams.params = {};
- this.form.donorno = this.curCase.donorno;
+ this.form.caseNo = this.curCase.caseNo;
this.form.name = this.curCase.name;
this.form.infoid = this.curCase.id;
// this.form.createTime = nowdate;
@@ -1198,7 +1198,7 @@
this.isopen = 0;
this.reset();
this.queryParams.params = {};
- this.form.donorno = this.curCase.donorno;
+ this.form.caseNo = this.curCase.caseNo;
this.form.infoid = this.curCase.id;
this.initFundApplyForm();
this.dialogOpen = true;
@@ -1397,7 +1397,7 @@
recordstatus: "0",
delFlag: null,
donorname: null,
- donorno: null,
+ caseNo: null,
createBy: null,
createTime: null,
updateBy: null,
@@ -1459,7 +1459,7 @@
if (!row.id) {
row.fundid = this.form.id;
row.donorname = this.form.donorname;
- row.donorno = this.form.donorno;
+ row.caseNo = this.form.caseNo;
addFunddetail(row).then((res) => {
getownFundDetail(this.form.id).then((res) => {
getownFundDetail(this.form.id).then((res) => {
diff --git a/src/views/project/donatefinish/index.vue b/src/views/project/donatefinish/index.vue
index 8911505..eedbc44 100644
--- a/src/views/project/donatefinish/index.vue
+++ b/src/views/project/donatefinish/index.vue
@@ -56,7 +56,7 @@
size="small"
>
<el-option
- v-for="dict in dict.type.sys_donornode"
+ v-for="dict in dict.type.sys_caseNode"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@@ -202,7 +202,7 @@
<template slot-scope="scope">
<div v-if="!scope.row.terminationCase">
<dict-tag
- :options="dict.type.sys_donornode"
+ :options="dict.type.sys_caseNode"
:value="scope.row.workflow"
/>
</div>
@@ -222,7 +222,7 @@
size="mini"
type="text"
icon="el-icon-refrigerator"
- @click="updatedonorno(scope.row)"
+ @click="updatecaseNo(scope.row)"
>鏇存柊缂栧彿</el-button
> -->
<el-button
@@ -284,10 +284,10 @@
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row>
<el-col :span="8">
- <el-form-item label="鎹愮尞缂栧彿" prop="donorno">
+ <el-form-item label="鎹愮尞缂栧彿" prop="caseNo">
<el-input
disabled
- v-model="curCase.donorno"
+ v-model="curCase.caseNo"
placeholder="璇疯緭鍏ユ崘鐚�呯紪鍙�"
/>
</el-form-item>
@@ -503,7 +503,7 @@
<annex-upload
ref="finishannex"
:infoid="curCase.id"
- :donorno="curCase.donorno"
+ :caseNo="curCase.caseNo"
:flowname="flowname"
:annexno="annexno"
/>
@@ -583,7 +583,7 @@
"sys_Infectious",
"sys_InfoSources",
"sys_OtherCases",
- "sys_donornode",
+ "sys_caseNode",
"sys_DiseaseType",
"sys_SelfWill",
"sys_FamilyRelation",
@@ -679,7 +679,7 @@
recordstate: null,
treatmenthospitalname: null,
treatmenthospitalno: null,
- donorno: null,
+ caseNo: null,
reportername: null,
reporttime: null,
city: null
@@ -702,7 +702,7 @@
]
},
curCase: {
- donorno: "",
+ caseNo: "",
name: "",
registerAddresss: "",
infoid: ""
@@ -728,7 +728,7 @@
this.selecttime = "";
this.reportervalue = "";
this.reportlist = [];
- this.queryParams.donorno = "";
+ this.queryParams.caseNo = "";
this.queryParams.recordstate = "";
this.queryParams.name = "";
this.queryParams.treatmenthospitalno = "";
@@ -856,7 +856,7 @@
console.log(this.starttime);
console.log(this.endtime);
},
- updatedonorno(row) {
+ updatecaseNo(row) {
console.log("row", row);
updatedonatorno(row.infoid).then(res => {
console.log("1221212", res);
@@ -1011,7 +1011,7 @@
this.form = {
id: null,
infoid: null,
- donorno: null,
+ caseNo: null,
delFlag: null,
createBy: null,
createTime: null,
@@ -1049,7 +1049,7 @@
// "2"
recordstate: null,
treatmenthospitalname: null,
- donorno: null,
+ caseNo: null,
acquisitiontissueno: null,
reportername: null,
reporttime: null,
@@ -1092,7 +1092,7 @@
// this.curCase = {
// id: row.id,
// recordstate: null,
- // donorno: row.donorno,
+ // caseNo: row.caseNo,
// };
// this.form.coordinateduserido = row.coordinateduserido;
// this.form.coordinateduseridt = row.coordinateduseridt;
@@ -1151,7 +1151,7 @@
this.loading = true;
this.reset();
this.curCase.registerAddresss = row.registeraddresss;
- this.curCase.donorno = row.donorno;
+ this.curCase.caseNo = row.caseNo;
this.curCase.name = row.name;
this.curCase.infoid = row.infoid;
this.open = true;
@@ -1166,7 +1166,7 @@
let oraganqueryParam = {
infoid: row.id
// donorname: this.curCase.name,
- // donorno: this.curCase.donorno,
+ // caseNo: this.curCase.caseNo,
// registeraddress: this.curCase.registeraddresss,
};
listDonateorgan(oraganqueryParam).then(response => {
@@ -1202,7 +1202,7 @@
this.loading = true;
this.$refs["form"].validate(valid => {
if (valid) {
- this.form.donorno = this.curCase.donorno;
+ this.form.caseNo = this.curCase.caseNo;
this.form.infoid = this.curCase.id;
this.form.donateorgan = JSON.stringify(this.form.donateorganList);
// let forms = delete this.form.donateorganList;
diff --git a/src/views/project/donatefinishcheck/index.vue b/src/views/project/donatefinishcheck/index.vue
index b33269b..a2b6100 100644
--- a/src/views/project/donatefinishcheck/index.vue
+++ b/src/views/project/donatefinishcheck/index.vue
@@ -226,10 +226,10 @@
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row>
<el-col :span="8">
- <el-form-item label="鎹愮尞缂栧彿" prop="donorno">
+ <el-form-item label="鎹愮尞缂栧彿" prop="caseNo">
<el-input
disabled
- v-model="curCase.donorno"
+ v-model="curCase.caseNo"
placeholder="璇疯緭鍏ユ崘鐚�呯紪鍙�"
/>
</el-form-item>
@@ -454,7 +454,7 @@
<annex-upload
ref="finishannex"
:infoid="curCase.id"
- :donorno="curCase.donorno"
+ :caseNo="curCase.caseNo"
:flowname="flowname"
:annexno="annexno"
/>
@@ -589,7 +589,7 @@
data() {
return {
curCase: {
- donorno: "",
+ caseNo: "",
name: "",
registerAddresss: "",
infoid: "",
@@ -644,7 +644,7 @@
queryParams: {
pageNum: 1,
pageSize: 10,
- donorno: null,
+ caseNo: null,
recordstate: "13",
// treatmenthospitalno: null,
treatmenthospitalname: null,
@@ -754,7 +754,7 @@
this.loading = true;
this.reset();
this.curCase.registerAddresss = row.registeraddresss;
- this.curCase.donorno = row.donorno;
+ this.curCase.caseNo = row.caseNo;
this.curCase.name = row.name;
this.curCase.infoid = row.id;
this.curCase.id = row.id;
@@ -763,11 +763,11 @@
this.curdonotor = row;
//鏌ヨ
let searchParam = {
- donorno: row.donorno,
+ caseNo: row.caseNo,
};
let oraganqueryParam = {
// donorname: this.curCase.name,
- // donorno: this.curCase.donorno,
+ // caseNo: this.curCase.caseNo,
// registeraddress: this.curCase.registeraddresss,
infoid:this.curCase.id
};
@@ -969,7 +969,7 @@
bloodtype: "0",
inpatientno: null,
rhyin: 0,
- donorno: null,
+ caseNo: null,
donationcategory: null,
illnessoverview: null,
diseasetype: [],
@@ -1024,7 +1024,7 @@
// "2"
recordstate: null,
treatmenthospitalname: null,
- donorno: null,
+ caseNo: null,
acquisitiontissueno: null,
reportername: null,
reporttime: null,
@@ -1193,7 +1193,7 @@
this.reviewForm = {
id: null,
infoid: null,
- donorno: null,
+ caseNo: null,
delFlag: null,
createBy: null,
createTime: null,
@@ -1212,7 +1212,7 @@
// console.log(JSON.stringify(this.curCase));
this.resetReviewForm();
this.reviewForm.infoid = row.id;
- this.reviewForm.donorno = row.donorno;
+ this.reviewForm.caseNo = row.caseNo;
this.reviewForm.flowname = this.flowname;
this.isShowReviewDialog = true;
},
@@ -1272,7 +1272,7 @@
getReview(row) {
this.curCase = row;
let searchParam = {
- donorno: row.donorno,
+ caseNo: row.caseNo,
flowname: this.flowname,
};
listDonateflowchart(searchParam).then((response) => {
@@ -1281,13 +1281,13 @@
if (response.rows.length == 0) {
this.resetReviewForm();
this.reviewForm.infoid = row.id;
- this.reviewForm.donorno = row.donorno;
+ this.reviewForm.caseNo = row.caseNo;
this.reviewForm.flowname = this.flowname;
this.isShowReviewDialog = true;
} else if (response.rows.length == 1) {
this.reviewForm = response.rows[0];
this.reviewForm.infoid = row.id;
- this.reviewForm.donorno = row.donorno;
+ this.reviewForm.caseNo = row.caseNo;
this.reviewForm.flowname = this.flowname;
this.isShowReviewDialog = true;
}
diff --git a/src/views/project/donatefollowup/index.vue b/src/views/project/donatefollowup/index.vue
index efaef54..728d3ce 100644
--- a/src/views/project/donatefollowup/index.vue
+++ b/src/views/project/donatefollowup/index.vue
@@ -64,7 +64,7 @@
</el-col>
</el-row>
-
+
</el-form>
<el-row :gutter="10" class="mb8">
@@ -129,9 +129,9 @@
>
<!-- <el-table-column type="selection" width="55" align="center" /> -->
-
+
<el-table-column label="鎹愮尞鑰�" width="100" align="center" prop="name" />
-
+
<el-table-column
label="鍣ㄥ畼"
width="100"
@@ -272,7 +272,7 @@
<el-form-item label="鎹愮尞缂栧彿">
<el-input
disabled
- v-model="this.curCase.donorno"
+ v-model="this.curCase.caseNo"
placeholder="璇疯緭鍏ラ殢璁挎弿杩�"
/> </el-form-item
></el-col>
@@ -536,8 +536,7 @@
this.form.organid = row.id;
this.form.infoid = row.infoid;
- this.curCase.donorno = row.donorno;
- this.curCase.donorno = row.donorno;
+ this.curCase.caseNo = row.caseNo;
this.curCase.name = row.name;
this.curCase.transplanthospitalname = row.transplanthospitalname;
this.curCase.organname = row.organname;
@@ -548,7 +547,7 @@
},
/** 淇敼鎸夐挳鎿嶄綔 */
handleUpdate(row) {
- this.curCase.donorno = row.donorno;
+ this.curCase.caseNo = row.caseNo;
this.curCase.name = row.name;
this.curCase.transplanthospitalname = row.transplanthospitalname;
this.curCase.organname = row.organname;
diff --git a/src/views/project/donateorgan/index.vue b/src/views/project/donateorgan/index.vue
index 822b024..f17ac20 100644
--- a/src/views/project/donateorgan/index.vue
+++ b/src/views/project/donateorgan/index.vue
@@ -317,8 +317,8 @@
<el-form ref="form" :model="form" label-width="130px" :rules="rules">
<el-row>
<el-col :span="12">
- <el-form-item label="鎹愮尞缂栧彿" prop="donorno">
- <el-input v-model="form.donorno" placeholder="" disabled />
+ <el-form-item label="鎹愮尞缂栧彿" prop="caseNo">
+ <el-input v-model="form.caseNo" placeholder="" disabled />
</el-form-item>
</el-col>
<!-- <el-col :span="24"> -->
diff --git a/src/views/project/donatereview/index.vue b/src/views/project/donatereview/index.vue
index 66c7017..321cd05 100644
--- a/src/views/project/donatereview/index.vue
+++ b/src/views/project/donatereview/index.vue
@@ -266,8 +266,8 @@
</el-form-item>
</el-col> -->
<el-col :span="8">
- <el-form-item label="鎹愮尞缂栧彿" prop="donorno">
- <el-input v-model="form.donorno" placeholder="璇疯緭鍏ユ崘鐚�呯紪鍙�" />
+ <el-form-item label="鎹愮尞缂栧彿" prop="caseNo">
+ <el-input v-model="form.caseNo" placeholder="璇疯緭鍏ユ崘鐚�呯紪鍙�" />
</el-form-item>
</el-col>
<el-col :span="8">
@@ -769,7 +769,7 @@
<!-- :annexno="annexno" -->
<annex-upload
:infoid="form.id"
- :donorno="form.donorno"
+ :caseNo="form.caseNo"
:flowname="flowname"
/>
</el-form-item>
@@ -934,7 +934,7 @@
queryParams: {
pageNum: 1,
pageSize: 10,
- donorno: null,
+ caseNo: null,
recordstate: null,
// treatmenthospitalno: null,
treatmenthospitalname: null,
@@ -1142,7 +1142,7 @@
this.form = {
id: null,
name: null,
- donorno: null,
+ caseNo: null,
// diagnosisname:null,
sex: null,
idcardtype: null,
@@ -1187,7 +1187,7 @@
bloodtype: "0",
inpatientno: null,
rhyin: 0,
- donorno: null,
+ caseNo: null,
donationcategory: null,
illnessoverview: null,
diseasetype: [],
@@ -1242,7 +1242,7 @@
// "2"
recordstate: null,
treatmenthospitalname: null,
- donorno: null,
+ caseNo: null,
acquisitiontissueno: null,
reportername: null,
reporttime: null,
@@ -1512,7 +1512,7 @@
this.reviewForm = {
id: null,
infoid: null,
- donorno: null,
+ caseNo: null,
delFlag: null,
createBy: null,
createTime: null,
@@ -1531,7 +1531,7 @@
// console.log(JSON.stringify(this.curCase));
this.resetReviewForm();
this.reviewForm.infoid = row.id;
- this.reviewForm.donorno = row.donorno;
+ this.reviewForm.caseNo = row.caseNo;
this.reviewForm.flowname = this.flowname;
this.isShowReviewDialog = true;
},
@@ -1593,7 +1593,7 @@
this.reset();
let searchParam = {
infoid: row.id,
- donorno: row.donorno,
+ caseNo: row.caseNo,
flowname: this.flowname,
};
listDonateflowchart(searchParam).then((response) => {
@@ -1621,14 +1621,14 @@
if (response.rows.length == 0) {
this.resetReviewForm();
this.reviewForm.infoid = row.id;
- this.reviewForm.donorno = row.donorno;
+ this.reviewForm.caseNo = row.caseNo;
this.reviewForm.flowname = this.flowname;
this.isShowReviewDialog = true;
this.open = true;
} else if (response.rows.length == 1) {
this.reviewForm = response.rows[0];
this.reviewForm.infoid = row.id;
- this.reviewForm.donorno = row.donorno;
+ this.reviewForm.caseNo = row.caseNo;
this.reviewForm.flowname = this.flowname;
this.isShowReviewDialog = true;
this.open = true;
diff --git a/src/views/project/donationdetails/index.vue b/src/views/project/donationdetails/index.vue
index a16ee2b..9b5f0ad 100644
--- a/src/views/project/donationdetails/index.vue
+++ b/src/views/project/donationdetails/index.vue
@@ -174,8 +174,8 @@
>
<el-row style="margin-top: 10px">
<el-col :span="6">
- <el-form-item label="鎹愮尞缂栧彿" prop="donorno">
- <el-input v-model="form.donorno" disabled />
+ <el-form-item label="鎹愮尞缂栧彿" prop="caseNo">
+ <el-input v-model="form.caseNo" disabled />
</el-form-item>
</el-col>
<el-col :span="6">
@@ -1428,7 +1428,7 @@
width="90"
prop="organno"
/> -->
- <el-table-column
+ <!-- <el-table-column
label="鍒嗛厤绯荤粺缂栧彿"
align="center"
width="120"
@@ -1440,7 +1440,7 @@
placeholder="鍒嗛厤绯荤粺缂栧彿"
/>
</template>
- </el-table-column>
+ </el-table-column> -->
<el-table-column
label="鍒嗛厤鎺ユ敹鏃堕棿"
align="center"
@@ -2205,7 +2205,7 @@
width="90"
prop="organno"
/> -->
- <el-table-column
+ <!-- <el-table-column
label="绯荤粺缂栧彿"
align="center"
width="120"
@@ -2217,7 +2217,7 @@
placeholder="绯荤粺缂栧彿"
/>
</template>
- </el-table-column>
+ </el-table-column> -->
<el-table-column
label="绉绘鍖婚櫌"
align="center"
@@ -2716,7 +2716,7 @@
infoid: 736,
drawer: false,
form: {
- donorno: "",
+ caseNo: "",
reporterno: "",
reporterphone: "",
name: "",
@@ -3654,7 +3654,7 @@
data.patientstate = data.patientstate.join(",");
// 鑾峰彇鎹愮尞缂栧彿
getDonationNumber(data).then(res => {
- this.form.donorno = res.msg;
+ this.form.caseNo = res.msg;
this.istb = true;
this.Processvalidation();
});
@@ -3879,7 +3879,7 @@
organno: value,
id: null,
infoid: this.infoid,
- donorno: this.form.donorno,
+ caseNo: this.form.caseNo,
organstate: 1
});
}
@@ -3949,7 +3949,7 @@
organno: value,
id: null,
infoid: this.infoid,
- donorno: this.form.donorno,
+ caseNo: this.form.caseNo,
organstate: "1"
});
}
@@ -4025,7 +4025,7 @@
organno: value,
id: null,
infoid: this.infoid,
- donorno: this.form.donorno,
+ caseNo: this.form.caseNo,
organstate: 1,
transplantstate: 1
});
@@ -4361,9 +4361,7 @@
row.reallocationreason =
"宸查噸鏂板垎閰�,鍘熷垎閰嶄俊鎭�(濮撳悕:" +
row.name +
- "銆佺郴缁熺紪鍙�:" +
- row.caseno +
- "銆佹帴鏀舵椂闂�:" +
+ "銆佹帴鏀舵椂闂�:" +
row.applicanttime +
")";
row.name = null;
diff --git a/src/views/project/unitCost/particulars/index.vue b/src/views/project/unitCost/particulars/index.vue
index 8947231..33eb553 100644
--- a/src/views/project/unitCost/particulars/index.vue
+++ b/src/views/project/unitCost/particulars/index.vue
@@ -161,7 +161,7 @@
/>
</template>
</el-table-column>
- <el-table-column
+ <!-- <el-table-column
label="鍒嗛厤绯荤粺缂栧彿"
align="center"
width="120"
@@ -174,7 +174,7 @@
placeholder="鍒嗛厤绯荤粺缂栧彿"
/>
</template>
- </el-table-column>
+ </el-table-column> -->
<el-table-column
label="鍙椾綋濮撴皬"
align="center"
@@ -394,12 +394,12 @@
</el-table-column>
<el-table-column prop="organno" label="鍣ㄥ畼缂栧彿" width="120">
</el-table-column>
- <el-table-column
+ <!-- <el-table-column
prop="caseno"
label="鍒嗛厤绯荤粺缂栧彿"
show-overflow-tooltip
>
- </el-table-column>
+ </el-table-column> -->
<el-table-column
prop="name"
label="鍙椾綋濮撴皬"
@@ -1142,7 +1142,6 @@
"organtime",
"remark",
"name",
- "caseno",
"receiveTime"
];
columns.forEach((column, index) => {
diff --git a/vue.config.js b/vue.config.js
index e5f4f33..806ab39 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -13,7 +13,7 @@
//瀹樻柟vue.config.js 鍙傝�冩枃妗� https://cli.vuejs.org/zh/config/#css-loaderoptions
// 杩欓噷鍙垪涓�閮ㄥ垎锛屽叿浣撻厤缃弬鑰冩枃妗�
module.exports = {
- // 閮ㄧ讲鐢熶骇鐜鍜屽紑鍙戠幆澧冧笅鐨刄RL銆�
+ // 閮ㄧ讲鐢熶骇鐜鍜屽紑鍙戠幆澧冧笅鐨刄RL銆倆
// 榛樿鎯呭喌涓嬶紝Vue CLI 浼氬亣璁句綘鐨勫簲鐢ㄦ槸琚儴缃插湪涓�涓煙鍚嶇殑鏍硅矾寰勪笂
// 渚嬪 https://www.ruoyi.vip/銆傚鏋滃簲鐢ㄨ閮ㄧ讲鍦ㄤ竴涓瓙璺緞涓婏紝浣犲氨闇�瑕佺敤杩欎釜閫夐」鎸囧畾杩欎釜瀛愯矾寰勩�備緥濡傦紝濡傛灉浣犵殑搴旂敤琚儴缃插湪 https://www.ruoyi.vip/admin/锛屽垯璁剧疆 baseUrl 涓� /admin/銆�
publicPath: process.env.NODE_ENV === "production" ? "/" : "/",
@@ -36,6 +36,7 @@
// target: `http://www.qdopo.com:9095`,
// target:`http://192.168.76.25:9095`,//鎵撳寘鍦板潃
target:`http://192.168.100.10:8080`,
+ // target: `http://localhost:8080`,
// target:`http://192.168.100.137:8080`,
// target: `https://slb.hospitalstar.com:9093`,
changeOrigin: true,
diff --git "a/\347\256\241\347\220\206\347\253\257 \0502\051.zip" "b/\347\256\241\347\220\206\347\253\257 \0502\051.zip"
deleted file mode 100644
index 0491ae9..0000000
--- "a/\347\256\241\347\220\206\347\253\257 \0502\051.zip"
+++ /dev/null
Binary files differ
diff --git "a/\347\256\241\347\220\206\347\253\257.zip" "b/\347\256\241\347\220\206\347\253\257.zip"
deleted file mode 100644
index f9206e4..0000000
--- "a/\347\256\241\347\220\206\347\253\257.zip"
+++ /dev/null
Binary files differ
diff --git "a/\347\256\241\347\220\206\347\253\257 \0503\051.zip" "b/\347\256\241\347\220\206\347\253\2577.20.zip"
similarity index 90%
rename from "\347\256\241\347\220\206\347\253\257 \0503\051.zip"
rename to "\347\256\241\347\220\206\347\253\2577.20.zip"
index 56e4c0d..d3cc747 100644
--- "a/\347\256\241\347\220\206\347\253\257 \0503\051.zip"
+++ "b/\347\256\241\347\220\206\347\253\2577.20.zip"
Binary files differ
--
Gitblit v1.9.3