From 5aa165156994b1b8a601063fa0a1107d1893ea57 Mon Sep 17 00:00:00 2001
From: WXL <wl_5969728@163.com>
Date: 星期四, 19 三月 2026 16:48:13 +0800
Subject: [PATCH] 更新
---
src/views/business/course/components/MedicalAssessmentStage.vue | 1751 +++++++++-
src/views/business/OrganUtilization/index.vue | 184
src/views/business/course/components/DonationConfirmStage.vue | 908 +++--
vue.config.js | 4
src/components/assessInfoComponents/AttachmentPreview.vue | 0
src/views/business/allocation/index.vue | 28
src/components/MaintainComponents/UrineRoutinePanel.vue | 0
src/views/project/components/orgselect/index.vue | 3
src/views/business/course/components/DonorMaintenanceStage.vue | 1343 ++++---
src/components/MaintainComponents/LiverKidneyPanel.vue | 0
src/views/business/course/components/DeathJudgmentStage.vue | 418 +
src/views/business/GetWitness/GetWitnessInfo.vue | 1646 +++++----
src/components/MaintainComponents/BloodRoutinePanel.vue | 0
src/api/businessApi/GetWitness.js | 28
src/views/business/course/index.vue | 714 ++-
/dev/null | 353 --
src/views/business/course/donationProcess.js | 462 +-
src/views/business/GetWitness/index.vue | 118
src/components/assessInfoComponents/OrganAssessmentForm.vue | 0
src/views/business/maintain/maintainInfo.vue | 6
src/views/business/allocation/allocationInfo.vue | 1161 +++++--
src/api/businessApi/OrganUtilization.js | 28
src/views/business/assess/assessInfo.vue | 2
23 files changed, 5,711 insertions(+), 3,446 deletions(-)
diff --git a/src/api/businessApi/GetWitness.js b/src/api/businessApi/GetWitness.js
index e69de29..20297cc 100644
--- a/src/api/businessApi/GetWitness.js
+++ b/src/api/businessApi/GetWitness.js
@@ -0,0 +1,28 @@
+import request from '@/utils/request'
+
+// 妗堜緥鍒楄〃鍙婅鎯�
+export function witnessList(data) {
+ return request({
+ url: '/project/donationwitness/getDonationwitnessBaseInfo',
+ method: 'post',
+ data: data
+ })
+}
+// 鑾峰彇瑙佽瘉淇敼
+export function witnessadd(data) {
+ return request({
+ url: '/project/donationwitness/add',
+ method: 'post',
+ data: data
+ })
+}
+// 鑾峰彇瑙佽瘉淇敼
+export function witnessedit(data) {
+ return request({
+ url: '/project/donationwitness/edit',
+ method: 'post',
+ data: data
+ })
+}
+
+
diff --git a/src/api/businessApi/OrganUtilization.js b/src/api/businessApi/OrganUtilization.js
index e69de29..b123ba6 100644
--- a/src/api/businessApi/OrganUtilization.js
+++ b/src/api/businessApi/OrganUtilization.js
@@ -0,0 +1,28 @@
+import request from '@/utils/request'
+
+// 妗堜緥鍒楄〃鍙婅鎯�
+export function completionList(data) {
+ return request({
+ url: '/project/donatecompletioninfo/getDonationCompletionBaseInfo',
+ method: 'post',
+ data: data
+ })
+}
+// 鑾峰彇瑙佽瘉淇敼
+export function completionadd(data) {
+ return request({
+ url: '/project/donatecompletioninfo/add',
+ method: 'post',
+ data: data
+ })
+}
+// 鑾峰彇瑙佽瘉淇敼
+export function completionedit(data) {
+ return request({
+ url: '/project/donatecompletioninfo/edit',
+ method: 'post',
+ data: data
+ })
+}
+
+
diff --git a/src/views/business/maintain/components/BloodRoutinePanel.vue b/src/components/MaintainComponents/BloodRoutinePanel.vue
similarity index 100%
rename from src/views/business/maintain/components/BloodRoutinePanel.vue
rename to src/components/MaintainComponents/BloodRoutinePanel.vue
diff --git a/src/views/business/maintain/components/LiverKidneyPanel.vue b/src/components/MaintainComponents/LiverKidneyPanel.vue
similarity index 100%
rename from src/views/business/maintain/components/LiverKidneyPanel.vue
rename to src/components/MaintainComponents/LiverKidneyPanel.vue
diff --git a/src/views/business/maintain/components/UrineRoutinePanel.vue b/src/components/MaintainComponents/UrineRoutinePanel.vue
similarity index 100%
rename from src/views/business/maintain/components/UrineRoutinePanel.vue
rename to src/components/MaintainComponents/UrineRoutinePanel.vue
diff --git a/src/views/business/assess/components/AttachmentPreview.vue b/src/components/assessInfoComponents/AttachmentPreview.vue
similarity index 100%
rename from src/views/business/assess/components/AttachmentPreview.vue
rename to src/components/assessInfoComponents/AttachmentPreview.vue
diff --git a/src/views/business/assess/components/OrganAssessmentForm.vue b/src/components/assessInfoComponents/OrganAssessmentForm.vue
similarity index 100%
rename from src/views/business/assess/components/OrganAssessmentForm.vue
rename to src/components/assessInfoComponents/OrganAssessmentForm.vue
diff --git a/src/views/business/GetWitness/GetWitnessInfo.vue b/src/views/business/GetWitness/GetWitnessInfo.vue
index 096378a..c0ee34d 100644
--- a/src/views/business/GetWitness/GetWitnessInfo.vue
+++ b/src/views/business/GetWitness/GetWitnessInfo.vue
@@ -11,7 +11,8 @@
<el-button
type="success"
@click="handleProcure"
- :disabled="form.procurementStatus === 'procured'"
+ :disabled="form.recordstate === 'completed'"
+ :loading="confirmLoading"
>
纭鑾峰彇
</el-button>
@@ -21,26 +22,26 @@
<el-form :model="form" ref="form" :rules="rules" label-width="120px">
<el-row :gutter="20">
<el-col :span="8">
- <el-form-item label="浣忛櫌鍙�" prop="hospitalNo">
- <el-input v-model="form.hospitalNo" readonly />
+ <el-form-item label="浣忛櫌鍙�" prop="inpatientno">
+ <el-input v-model="form.inpatientno" readonly />
</el-form-item>
</el-col>
<el-col :span="8">
- <el-form-item label="浣忛櫌鍙�" prop="caseNo">
- <el-input v-model="form.caseNo" readonly />
+ <el-form-item label="妗堜緥缂栧彿" prop="caseNo">
+ <el-input v-model="form.caseNo" />
</el-form-item>
</el-col>
<el-col :span="8">
- <el-form-item label="鎹愮尞鑰呭鍚�" prop="donorName">
- <el-input v-model="form.donorName" />
+ <el-form-item label="鎹愮尞鑰呭鍚�" prop="name">
+ <el-input v-model="form.name" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="8">
- <el-form-item label="鎬у埆" prop="gender">
- <el-select v-model="form.gender" style="width: 100%">
+ <el-form-item label="鎬у埆" prop="sex">
+ <el-select v-model="form.sex" style="width: 100%">
<el-option label="鐢�" value="0" />
<el-option label="濂�" value="1" />
</el-select>
@@ -52,36 +53,96 @@
</el-form-item>
</el-col>
<el-col :span="8">
- <el-form-item label="鍑虹敓鏃ユ湡" prop="birthDate">
- <el-date-picker
- v-model="form.birthDate"
- type="date"
- value-format="yyyy-MM-dd"
- style="width: 100%"
- />
+ <el-form-item label="鎹愮尞绫诲埆" prop="donationcategory">
+ <el-select v-model="form.donationcategory" style="width: 100%">
+ <el-option
+ v-for="dict in dict.type.sys_DonationCategory || []"
+ :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="8">
+ <el-form-item label="琛�鍨�" prop="bloodtype">
+ <el-select v-model="form.bloodtype" style="width: 100%">
+ <el-option
+ v-for="dict in dict.type.sys_BloodType || []"
+ :key="dict.value"
+ :label="dict.label"
+ :value="dict.value"
+ />
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="璇佷欢鍙风爜" prop="idcardno">
+ <el-input v-model="form.idcardno" />
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="璁板綍鐘舵��" prop="recordstate">
+ <el-input v-model="form.recordstate" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
- <el-form-item label="鐤剧梾璇婃柇" prop="diagnosis">
+ <el-form-item label="鐤剧梾璇婃柇" prop="diagnosisname">
<el-input
type="textarea"
:rows="2"
- v-model="form.diagnosis"
+ v-model="form.diagnosisname"
placeholder="璇疯緭鍏ョ柧鐥呰瘖鏂俊鎭�"
/>
</el-form-item>
</el-col>
<el-col :span="12">
- <el-form-item label="鑾峰彇鏃堕棿" prop="procurementTime">
+ <el-form-item label="姝讳骸鏃堕棿" prop="deathtime">
<el-date-picker
- v-model="form.procurementTime"
+ v-model="form.deathtime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
style="width: 100%"
- :disabled="form.procurementStatus !== 'procured'"
+ :disabled="form.recordstate === 'completed'"
+ />
+ </el-form-item>
+ </el-col>
+ </el-row>
+
+ <!-- 鎵嬫湳鐩稿叧淇℃伅 -->
+ <el-divider content-position="left">鎵嬫湳淇℃伅</el-divider>
+
+ <el-row :gutter="20">
+ <el-col :span="8">
+ <el-form-item label="鎵嬫湳鍖荤敓" prop="operationdoctor">
+ <el-input v-model="form.operationdoctor" />
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="鎵嬫湳寮�濮嬫椂闂�" prop="operationbegtime">
+ <el-date-picker
+ v-model="form.operationbegtime"
+ type="datetime"
+ value-format="yyyy-MM-dd HH:mm:ss"
+ style="width: 100%"
+ :disabled="form.recordstate === 'completed'"
+ />
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="鎵嬫湳缁撴潫鏃堕棿" prop="operationendtime">
+ <el-date-picker
+ v-model="form.operationendtime"
+ type="datetime"
+ value-format="yyyy-MM-dd HH:mm:ss"
+ style="width: 100%"
+ :disabled="form.recordstate === 'completed'"
/>
</el-form-item>
</el-col>
@@ -89,27 +150,30 @@
<el-row :gutter="20">
<el-col :span="8">
- <el-form-item label="鎵嬫湳鍚嶇О" prop="surgeryName">
- <el-input v-model="form.surgeryName" />
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="鎵嬫湳寮�濮嬫椂闂�" prop="surgeryStartTime">
+ <el-form-item
+ label="鑵逛富鍔ㄨ剦鎻掔鏃堕棿"
+ prop="abdominalaortacannulatime"
+ >
<el-date-picker
- v-model="form.surgeryStartTime"
+ v-model="form.abdominalaortacannulatime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
style="width: 100%"
+ :disabled="form.recordstate === 'completed'"
/>
</el-form-item>
</el-col>
<el-col :span="8">
- <el-form-item label="渚涗綋姝讳骸鏃堕棿" prop="donorDeathTime">
+ <el-form-item
+ label="鑵逛富鍔ㄨ剦鐏屾敞鏃堕棿"
+ prop="abdominalaortaperfusiontime"
+ >
<el-date-picker
- v-model="form.donorDeathTime"
+ v-model="form.abdominalaortaperfusiontime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
style="width: 100%"
+ :disabled="form.recordstate === 'completed'"
/>
</el-form-item>
</el-col>
@@ -117,51 +181,152 @@
<el-row :gutter="20">
<el-col :span="8">
- <el-form-item label="鑵逛富鍔ㄨ剦鎻掔鏃堕棿" prop="abdominalAortaCannulationTime">
+ <el-form-item
+ label="闂ㄩ潤鑴夋彃绠℃椂闂�"
+ prop="portalveincannulatime"
+ >
<el-date-picker
- v-model="form.abdominalAortaCannulationTime"
+ v-model="form.portalveincannulatime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
style="width: 100%"
+ :disabled="form.recordstate === 'completed'"
/>
</el-form-item>
</el-col>
<el-col :span="8">
- <el-form-item label="涓嬭厰闈欒剦鎻掔鏃堕棿" prop="inferiorVenaCavaCannulationTime">
+ <el-form-item
+ label="闂ㄩ潤鑴夌亴娉ㄦ椂闂�"
+ prop="portalveinperfusiontime"
+ >
<el-date-picker
- v-model="form.inferiorVenaCavaCannulationTime"
+ v-model="form.portalveinperfusiontime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
style="width: 100%"
+ :disabled="form.recordstate === 'completed'"
+ />
+ </el-form-item>
+ </el-col>
+ </el-row>
+
+ <!-- 鍗忚皟鍛樹俊鎭� -->
+ <el-divider content-position="left">鍗忚皟鍛樹俊鎭�</el-divider>
+
+ <el-row :gutter="20">
+ <el-col :span="8">
+ <el-form-item label="鍗忚皟鍛樺鍚�" prop="coordinatorName">
+ <el-input v-model="form.coordinatorName" />
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="杩涙墜鏈鏃堕棿" prop="coordinatorInOperating">
+ <el-date-picker
+ v-model="form.coordinatorInOperating"
+ type="datetime"
+ value-format="yyyy-MM-dd HH:mm:ss"
+ style="width: 100%"
+ :disabled="form.recordstate === 'completed'"
/>
</el-form-item>
</el-col>
<el-col :span="8">
- <el-form-item label="鑲犵郴鑶滀笂闈欒剦鎻掔鏃堕棿" prop="superiorMesentericVeinCannulationTime">
+ <el-form-item label="鍑烘墜鏈鏃堕棿" prop="coordinatorOutOperating">
<el-date-picker
- v-model="form.superiorMesentericVeinCannulationTime"
+ v-model="form.coordinatorOutOperating"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
style="width: 100%"
+ :disabled="form.recordstate === 'completed'"
/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
- <el-col :span="12">
- <el-form-item label="鐧昏浜�" prop="registrant">
- <el-input v-model="form.registrant" />
+ <el-col :span="8">
+ <el-form-item label="鍗忚皟鍛樼瀛�" prop="coordinatorSign">
+ <el-input v-model="form.coordinatorSign" />
</el-form-item>
</el-col>
- <el-col :span="12">
- <el-form-item label="鐧昏鏃堕棿" prop="registrationTime">
+ <el-col :span="8">
+ <el-form-item label="绛惧瓧鏃堕棿" prop="coordinatorSignTime">
<el-date-picker
- v-model="form.registrationTime"
+ v-model="form.coordinatorSignTime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
style="width: 100%"
- readonly
+ :disabled="form.recordstate === 'completed'"
+ />
+ </el-form-item>
+ </el-col>
+ </el-row>
+
+ <!-- 璐熻矗浜轰俊鎭� -->
+ <el-divider content-position="left">璐熻矗浜轰俊鎭�</el-divider>
+
+ <el-row :gutter="20">
+ <el-col :span="8">
+ <el-form-item label="璐熻矗浜哄鍚�" prop="responsibleusername">
+ <el-input v-model="form.responsibleusername" />
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <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-input v-model="form.coordinatedusernamet" />
+ </el-form-item>
+ </el-col>
+ </el-row>
+
+ <!-- 鑾峰彇鏈烘瀯淇℃伅 -->
+ <el-divider content-position="left">鑾峰彇鏈烘瀯淇℃伅</el-divider>
+
+ <el-row :gutter="20">
+ <el-col :span="8">
+ <el-form-item label="鑾峰彇鏈烘瀯鍚嶇О" prop="gainhospitalname">
+ <el-input
+ v-model="form.gainhospitalname"
+ placeholder="璇疯緭鍏ヨ幏鍙栨満鏋勫悕绉�"
+ />
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="鑾峰彇鏈烘瀯缂栫爜" prop="gainhospitalno">
+ <el-input
+ v-model="form.gainhospitalno"
+ placeholder="璇疯緭鍏ヨ幏鍙栨満鏋勭紪鐮�"
+ />
+ </el-form-item>
+ </el-col>
+ </el-row>
+
+ <!-- 璁板綍淇℃伅 -->
+ <el-divider content-position="left">璁板綍淇℃伅</el-divider>
+
+ <el-row :gutter="20">
+ <el-col :span="8">
+ <el-form-item label="浣忛櫌鍙�" prop="donorno">
+ <el-input v-model="form.donorno" readonly />
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="鎵�鍦ㄥ尰鐤楁満鏋�" prop="treatmenthospitalname">
+ <el-input
+ v-model="form.treatmenthospitalname"
+ placeholder="璇疯緭鍏ュ尰鐤楁満鏋勫悕绉�"
+ />
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="鍖荤枟鏈烘瀯缂栫爜" prop="treatmenthospitalno">
+ <el-input
+ v-model="form.treatmenthospitalno"
+ placeholder="璇疯緭鍏ュ尰鐤楁満鏋勭紪鐮�"
/>
</el-form-item>
</el-col>
@@ -174,8 +339,12 @@
<div slot="header" class="clearfix">
<span class="detail-title">鍣ㄥ畼鑾峰彇璁板綍</span>
<div style="float: right;">
- <el-tag :type="form.procurementStatus === 'procured' ? 'success' : 'warning'">
- {{ form.procurementStatus === 'procured' ? '宸茶幏鍙�' : '寰呰幏鍙�' }}
+ <el-tag
+ :type="
+ form.recordstate === 'completed' ? 'success' : 'warning'
+ "
+ >
+ {{ form.recordstate === "completed" ? "宸插畬鎴�" : "杩涜涓�" }}
</el-tag>
</div>
</div>
@@ -188,13 +357,16 @@
>
<el-row>
<el-col>
- <el-form-item label-width="100px" label="鑾峰彇鍣ㄥ畼">
- <el-checkbox-group v-model="selectedOrgans" @change="handleOrganSelectionChange">
+ <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.procurementStatus === 'procured'"
+ :disabled="form.recordstate === 'completed'"
>
{{ dict.label }}
</el-checkbox>
@@ -207,7 +379,7 @@
<el-col>
<el-form-item>
<el-table
- :data="procurementData.records"
+ :data="procurementData.serviceDonationwitnessorgans"
v-loading="loading"
border
style="width: 100%"
@@ -217,11 +389,11 @@
label="鍣ㄥ畼鍚嶇О"
align="center"
width="120"
- prop="organName"
+ prop="organname"
>
<template slot-scope="scope">
<el-input
- v-model="scope.row.organName"
+ v-model="scope.row.organname"
placeholder="鍣ㄥ畼鍚嶇О"
:disabled="true"
/>
@@ -243,7 +415,7 @@
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="閫夋嫨鑾峰彇寮�濮嬫椂闂�"
- :disabled="form.procurementStatus === 'procured'"
+ :disabled="form.recordstate === 'completed'"
/>
</template>
</el-table-column>
@@ -263,7 +435,7 @@
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="閫夋嫨鍣ㄥ畼绂讳綋鏃堕棿"
- :disabled="form.procurementStatus === 'procured'"
+ :disabled="form.recordstate === 'completed'"
/>
</template>
</el-table-column>
@@ -279,7 +451,7 @@
v-model="scope.row.gainHospitalNo"
placeholder="璇烽�夋嫨鑾峰彇鍖婚櫌"
style="width: 100%"
- :disabled="form.procurementStatus === 'procured'"
+ :disabled="form.recordstate === 'completed'"
@change="handleHospitalChange(scope.row, $event)"
>
<el-option
@@ -302,7 +474,7 @@
<el-input
v-model="scope.row.organGetDoctor"
placeholder="鑾峰彇鍖诲笀"
- :disabled="form.procurementStatus === 'procured'"
+ :disabled="form.recordstate === 'completed'"
/>
</template>
</el-table-column>
@@ -317,7 +489,7 @@
<el-input
v-model="scope.row.assistant"
placeholder="鍔╂墜"
- :disabled="form.procurementStatus === 'procured'"
+ :disabled="form.recordstate === 'completed'"
/>
</template>
</el-table-column>
@@ -332,7 +504,7 @@
<el-input
v-model="scope.row.procurementNurse"
placeholder="鑾峰彇鎶ゅ+"
- :disabled="form.procurementStatus === 'procured'"
+ :disabled="form.recordstate === 'completed'"
/>
</template>
</el-table-column>
@@ -347,7 +519,7 @@
<el-input
v-model="scope.row.operatingRoomNurse"
placeholder="鎵嬫湳瀹ゆ姢澹�"
- :disabled="form.procurementStatus === 'procured'"
+ :disabled="form.recordstate === 'completed'"
/>
</template>
</el-table-column>
@@ -362,7 +534,7 @@
<el-input
v-model="scope.row.anesthesiologist"
placeholder="楹婚唹鍖荤敓"
- :disabled="form.procurementStatus === 'procured'"
+ :disabled="form.recordstate === 'completed'"
/>
</template>
</el-table-column>
@@ -378,7 +550,7 @@
v-model="scope.row.organState"
placeholder="璇烽�夋嫨鑾峰彇鐘舵��"
style="width: 100%"
- :disabled="form.procurementStatus === 'procured'"
+ :disabled="form.recordstate === 'completed'"
>
<el-option
v-for="dict in organStateList"
@@ -402,7 +574,7 @@
clearable
v-model="scope.row.notGetReason"
placeholder="璇疯緭鍏ユ湭鑾峰彇璇存槑"
- :disabled="form.procurementStatus === 'procured'"
+ :disabled="form.recordstate === 'completed'"
/>
</template>
</el-table-column>
@@ -412,7 +584,7 @@
align="center"
width="120"
class-name="small-padding fixed-width"
- v-if="form.procurementStatus !== 'procured'"
+ v-if="form.recordstate !== 'completed'"
>
<template slot-scope="scope">
<el-button
@@ -431,12 +603,17 @@
</el-row>
<!-- 鑾峰彇缁熻淇℃伅 -->
- <div class="procurement-stats" v-if="procurementData.records.length > 0">
+ <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.records.length }} 涓�</span>
+ <span class="stat-value"
+ >{{ procurementData.serviceDonationwitnessorgans.length }} 涓�</span
+ >
</div>
</el-col>
<el-col :span="6">
@@ -455,8 +632,18 @@
<div class="stat-item">
<span class="stat-label">鑾峰彇鐘舵��:</span>
<span class="stat-value">
- <el-tag :type="form.procurementStatus === 'procured' ? 'success' : 'warning'">
- {{ form.procurementStatus === 'procured' ? '宸插畬鎴�' : '杩涜涓�' }}
+ <el-tag
+ :type="
+ form.recordstate === 'completed'
+ ? 'success'
+ : 'warning'
+ "
+ >
+ {{
+ form.recordstate === "completed"
+ ? "宸插畬鎴�"
+ : "杩涜涓�"
+ }}
</el-tag>
</span>
</div>
@@ -471,12 +658,12 @@
</div>
</el-form>
- <div class="dialog-footer" v-if="form.procurementStatus !== 'procured'">
+ <div class="dialog-footer" v-if="form.recordstate !== 'completed'">
<el-button
type="primary"
@click="handleSaveProcurement"
:loading="saveLoading"
- :disabled="procurementData.records.length === 0"
+ :disabled="!procurementData.serviceDonationwitnessorgans || procurementData.serviceDonationwitnessorgans.length === 0"
>
淇濆瓨鑾峰彇璁板綍
</el-button>
@@ -491,70 +678,86 @@
</div>
</el-card>
- <!-- 闄勪欢绠$悊閮ㄥ垎 -->
+ <!-- 闄勪欢绠$悊閮ㄥ垎浼樺寲 -->
<el-card class="attachment-card">
- <div slot="header" class="clearfix">
- <span class="detail-title">鐩稿叧闄勪欢</span>
- <el-button
- type="primary"
- size="mini"
- icon="el-icon-upload"
- @click="handleUploadAttachment"
+ <div class="attachment-header">
+ <i class="el-icon-paperclip"></i>
+ <span class="attachment-title">鐩稿叧闄勪欢</span>
+ <span class="attachment-tip"
+ >鏀寔涓婁紶鍣ㄥ畼鑾峰彇鐩稿叧鏂囦欢 (鏈�澶歿{ attachmentLimit }}涓�)</span
>
- 涓婁紶闄勪欢
- </el-button>
</div>
- <div class="attachment-list">
- <el-table :data="attachments" style="width: 100%">
- <el-table-column label="鏂囦欢鍚嶇О" min-width="200">
+ <!-- 浣跨敤 UploadAttachment 缁勪欢 -->
+ <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">
- <div class="file-info">
- <i :class="getFileIcon(scope.row.fileName)" style="margin-right: 8px; color: #409EFF;"></i>
- <span>{{ scope.row.fileName }}</span>
- </div>
+ <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" align="center">
+ <el-table-column label="鏂囦欢绫诲瀷" width="100">
<template slot-scope="scope">
- <el-tag size="small">{{ getFileType(scope.row.fileName) }}</el-tag>
+ <el-tag :type="getFileTagType(scope.row.fileName)" size="small">
+ {{ getFileTypeText(scope.row.fileName) }}
+ </el-tag>
</template>
</el-table-column>
-
- <el-table-column label="鏂囦欢澶у皬" width="100" align="center">
+ <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="160" align="center">
- <template slot-scope="scope">
- <span>{{ parseTime(scope.row.uploadTime) }}</span>
- </template>
- </el-table-column>
-
- <el-table-column label="鎿嶄綔" width="150" align="center">
+ <el-table-column label="鎿嶄綔" width="200" fixed="right">
<template slot-scope="scope">
<el-button
size="mini"
- type="text"
- icon="el-icon-view"
- @click="handlePreviewAttachment(scope.row)"
- >棰勮</el-button>
+ type="primary"
+ @click="handlePreview(scope.row)"
+ :disabled="!isPreviewable(scope.row.fileName)"
+ >
+ 棰勮
+ </el-button>
<el-button
size="mini"
- type="text"
- icon="el-icon-download"
- @click="handleDownloadAttachment(scope.row)"
- >涓嬭浇</el-button>
+ type="success"
+ @click="handleDownload(scope.row)"
+ >
+ 涓嬭浇
+ </el-button>
<el-button
size="mini"
- type="text"
- icon="el-icon-delete"
- style="color: #F56C6C;"
- @click="handleRemoveAttachment(scope.row)"
- >鍒犻櫎</el-button>
+ type="danger"
+ @click="handleRemoveAttachment(scope.$index)"
+ >
+ 鍒犻櫎
+ </el-button>
</template>
</el-table-column>
</el-table>
@@ -571,7 +774,7 @@
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="鍣ㄥ畼鍚嶇О">
- <el-input v-model="currentRecord.organName" readonly />
+ <el-input v-model="currentRecord.organname" readonly />
</el-form-item>
</el-col>
<el-col :span="12">
@@ -591,12 +794,18 @@
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="鑾峰彇鍖诲笀">
- <el-input v-model="currentRecord.organGetDoctor" placeholder="璇疯緭鍏ヨ幏鍙栧尰甯�" />
+ <el-input
+ v-model="currentRecord.organGetDoctor"
+ placeholder="璇疯緭鍏ヨ幏鍙栧尰甯�"
+ />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="鍔╂墜">
- <el-input v-model="currentRecord.assistant" placeholder="璇疯緭鍏ュ姪鎵嬪鍚�" />
+ <el-input
+ v-model="currentRecord.assistant"
+ placeholder="璇疯緭鍏ュ姪鎵嬪鍚�"
+ />
</el-form-item>
</el-col>
</el-row>
@@ -604,21 +813,33 @@
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="鑾峰彇鎶ゅ+">
- <el-input v-model="currentRecord.procurementNurse" placeholder="璇疯緭鍏ヨ幏鍙栨姢澹�" />
+ <el-input
+ v-model="currentRecord.procurementNurse"
+ placeholder="璇疯緭鍏ヨ幏鍙栨姢澹�"
+ />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="鎵嬫湳瀹ゆ姢澹�">
- <el-input v-model="currentRecord.operatingRoomNurse" placeholder="璇疯緭鍏ユ墜鏈鎶ゅ+" />
+ <el-input
+ v-model="currentRecord.operatingRoomNurse"
+ placeholder="璇疯緭鍏ユ墜鏈鎶ゅ+"
+ />
</el-form-item>
</el-col>
</el-row>
<el-form-item label="楹婚唹鍖荤敓">
- <el-input v-model="currentRecord.anesthesiologist" placeholder="璇疯緭鍏ラ夯閱夊尰鐢�" />
+ <el-input
+ v-model="currentRecord.anesthesiologist"
+ placeholder="璇疯緭鍏ラ夯閱夊尰鐢�"
+ />
</el-form-item>
- <el-form-item label="鏈幏鍙栬鏄�" v-if="currentRecord.organState === '0'">
+ <el-form-item
+ label="鏈幏鍙栬鏄�"
+ v-if="currentRecord.organState === '0'"
+ >
<el-input
type="textarea"
:rows="3"
@@ -633,67 +854,108 @@
<el-button type="primary" @click="handleEditConfirm">纭</el-button>
</div>
</el-dialog>
+
+ <!-- 鏂囦欢棰勮寮圭獥 -->
+ <el-dialog
+ :title="filePreviewTitle"
+ :visible.sync="filePreviewVisible"
+ width="800px"
+ @close="filePreviewVisible = false"
+ >
+ <div v-if="currentPreviewFile">
+ <div v-if="currentPreviewFile.fileType === 'image'">
+ <img :src="currentPreviewFile.fileUrl" style="max-width: 100%; max-height: 500px;" />
+ </div>
+ <div v-else-if="currentPreviewFile.fileType === 'pdf'">
+ <iframe :src="currentPreviewFile.fileUrl" width="100%" height="500px"></iframe>
+ </div>
+ <div v-else>
+ <p>涓嶆敮鎸侀瑙堟鏂囦欢绫诲瀷锛岃涓嬭浇鏌ョ湅</p>
+ </div>
+ </div>
+ </el-dialog>
</div>
</template>
<script>
-import {
- getOrganProcurementDetail,
- updateOrganProcurement,
- saveProcurementRecords,
- getHospitalList,
- getCoordinatorList
-} from "./organProcurement";
+import { witnessList, witnessadd, witnessedit } from "@/api/businessApi";
+import UploadAttachment from "@/components/UploadAttachment";
+import dayjs from "dayjs";
export default {
name: "OrganProcurementDetail",
- dicts: ["sys_user_sex", "sys_Organ", "sys_0_1", "sys_DonationCategory"],
+ components: {
+ UploadAttachment
+ },
+ dicts: ["sys_BloodType", "sys_DonationCategory", "sys_Organ"],
data() {
return {
// 琛ㄥ崟鏁版嵁
form: {
id: undefined,
- hospitalNo: "",
+ infoid: undefined,
+ name: "",
+ inpatientno: "",
+ recordstate: "pending",
caseNo: "",
- donorName: "",
- gender: "",
+ donorno: "",
+ treatmenthospitalname: "",
+ treatmenthospitalno: "",
+ sex: "",
age: "",
- birthDate: "",
- diagnosis: "",
- procurementStatus: "pending",
- procurementTime: "",
- registrant: "",
- registrationTime: "",
- surgeryName: "",
- surgeryStartTime: "",
- donorDeathTime: "",
- abdominalAortaCannulationTime: "",
- inferiorVenaCavaCannulationTime: "",
- superiorMesentericVeinCannulationTime: "",
- donationCategory: "1",
- deathJudgeDoctor1: "",
- deathJudgeDoctor2: "",
- deathReason: "",
- operationEndTime: "",
+ bloodtype: "",
+ idcardno: "",
+ diagnosisname: "",
+ coordinatorName: "",
+ gainhospitalno: "",
+ gainhospitalname: "",
+ deathtime: "",
+ deathreason: "",
+ deathjudgedocto: "",
+ deathjudgedoctt: "",
+ deathjudgeannex: "",
+ operationbegtime: "",
+ operationendtime: "",
+ operationdoctor: "",
+ isspendremember: 1,
+ isrestoreremains: 1,
+ rememberannex: "",
+ responsibleuserid: "",
+ responsibleusername: "",
+ coordinateduserido: "",
+ coordinatedusernameo: "",
+ coordinateduseridt: "",
+ coordinatedusernamet: "",
+ abdominalaortacannulatime: "",
+ abdominalaortaperfusiontime: "",
+ portalveincannulatime: "",
+ portalveinperfusiontime: "",
+ pulmonaryarterycannulatime: "",
+ pulmonaryarteryperfusiontime: "",
+ aortacannulatime: "",
+ aortaperfusiontime: "",
+ organdonation: "",
+ organdonationOther: "",
+ donationcategory: "",
coordinatorInOperating: "",
coordinatorOutOperating: "",
+ coordinatorSign: "",
coordinatorSignTime: "",
- responsibleUserName: "",
- coordinatedUserId1: "",
- coordinatedUserId2: "",
- isSpendRemember: 1,
- isRestoreRemains: 1
+ attachments: []
},
// 琛ㄥ崟楠岃瘉瑙勫垯
rules: {
- donorName: [
+ name: [
{ required: true, message: "鎹愮尞鑰呭鍚嶄笉鑳戒负绌�", trigger: "blur" }
],
- diagnosis: [
+ diagnosisname: [
{ required: true, message: "鐤剧梾璇婃柇涓嶈兘涓虹┖", trigger: "blur" }
],
- surgeryName: [
- { required: true, message: "鎵嬫湳鍚嶇О涓嶈兘涓虹┖", trigger: "blur" }
+ donationcategory: [
+ { required: true, message: "鎹愮尞绫诲埆涓嶈兘涓虹┖", trigger: "change" }
+ ],
+ operationdoctor: [
+ { required: true, message: "鎵嬫湳鍖荤敓涓嶈兘涓虹┖", trigger: "blur" }
]
},
// 鑾峰彇璁板綍楠岃瘉瑙勫垯
@@ -707,8 +969,6 @@
selectedOrgans: [],
// 鍖婚櫌鍒楄〃
hospitalList: [],
- // 鍗忚皟鍛樺垪琛�
- coordinatorList: [],
// 鍣ㄥ畼鐘舵�佸垪琛�
organStateList: [
{ value: "1", label: "宸茶幏鍙�" },
@@ -717,14 +977,22 @@
],
// 鑾峰彇璁板綍鏁版嵁
procurementData: {
- records: []
+ serviceDonationwitnessorgans: []
},
// 闄勪欢鏁版嵁
attachments: [],
+ attachmentFileList: [],
+ // 闄勪欢鐩稿叧閰嶇疆
+ attachmentLimit: 10,
+ attachmentAccept: ".pdf,.jpg,.jpeg,.png,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.txt",
// 缂栬緫瀵硅瘽妗�
editDialogVisible: false,
currentRecord: {},
- currentEditIndex: -1
+ currentEditIndex: -1,
+ // 鏂囦欢棰勮鐩稿叧
+ filePreviewVisible: false,
+ currentPreviewFile: null,
+ filePreviewTitle: ""
};
},
computed: {
@@ -734,7 +1002,8 @@
},
// 涓嶅畬鏁寸殑璁板綍鏁伴噺
incompleteRecords() {
- return this.procurementData.records.filter(
+ if (!this.procurementData.serviceDonationwitnessorgans) return 0;
+ return this.procurementData.serviceDonationwitnessorgans.filter(
record =>
!record.organStartTime ||
!record.organGetTime ||
@@ -744,110 +1013,164 @@
},
// 鍞竴鍖婚櫌鏁伴噺
uniqueHospitals() {
- const hospitals = this.procurementData.records
+ if (!this.procurementData.serviceDonationwitnessorgans) return 0;
+ const hospitals = this.procurementData.serviceDonationwitnessorgans
.map(record => record.gainHospitalNo)
.filter(Boolean);
return new Set(hospitals).size;
+ },
+ // 鑾峰彇鍣ㄥ畼瀛楀吀
+ organDict() {
+ return this.dict.type.sys_Organ || [];
+ }
+ },
+ watch: {
+ // 鐩戝惉闄勪欢鏁版嵁鍙樺寲
+ 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
}
},
created() {
- const id = this.$route.query.id;
- if (id) {
- this.getDetail(id);
- } else {
- this.generateCaseNo();
- this.form.registrant = this.currentUser.username || "褰撳墠鐢ㄦ埛";
- this.form.registrationTime = new Date()
- .toISOString()
- .replace("T", " ")
- .substring(0, 19);
- }
- this.getHospitalData();
- this.getCoordinatorData();
+ this.initData();
},
methods: {
- // 鐢熸垚浣忛櫌鍙�
- generateCaseNo() {
+ // 鏍规嵁瀛楀吀value鑾峰彇label
+ getOrganLabel(organValue) {
+ const dictItem = this.organDict.find(item => item.value === organValue);
+ return dictItem ? dictItem.label : organValue;
+ },
+
+ // 鍒濆鍖栨暟鎹�
+ initData() {
+ const { id, infoid } = this.$route.query;
+
+ if (!infoid) {
+ this.$message.error("缂哄皯蹇呰鐨勮矾鐢卞弬鏁� infoid");
+ this.$router.back();
+ return;
+ }
+
+ this.form.infoid = infoid;
+ this.generateDonorNo();
+
+ if (infoid) {
+ this.getDetail(infoid);
+ }
+
+ this.getHospitalData();
+ },
+ // 鐢熸垚鎹愮尞鑰呯紪鍙�
+ generateDonorNo() {
const timestamp = Date.now().toString();
- this.form.hospitalNo = "D" + timestamp.slice(-6);
- this.form.caseNo = "C" + timestamp.slice(-6);
+ this.form.donorno = "D" + timestamp.slice(-8);
+ this.form.caseNo = "CASE" + timestamp.slice(-6);
+ this.form.inpatientno = "IP" + timestamp.slice(-6);
},
// 鑾峰彇璇︽儏
- getDetail(id) {
+ async getDetail(infoid) {
this.loading = true;
- getOrganProcurementDetail(id)
- .then(response => {
- if (response.code === 200) {
- this.form = response.data;
- if (response.data.procurementRecords) {
- this.procurementData.records = response.data.procurementRecords;
- this.selectedOrgans = response.data.procurementRecords.map(
- item => item.organNo
- );
- }
+ try {
+ const response = await witnessList({ infoid });
+ if (
+ response.code === 200 &&
+ response.data &&
+ response.data.length > 0
+ ) {
+ const data = response.data[0];
+
+ // 濉厖琛ㄥ崟鏁版嵁
+ Object.assign(this.form, data);
+
+ // 鍒濆鍖栭檮浠�
+ if (this.form.attachments) {
+ this.attachments = Array.isArray(this.form.attachments)
+ ? [...this.form.attachments]
+ : [];
}
- this.loading = false;
- })
- .catch(error => {
- console.error("鑾峰彇鍣ㄥ畼鑾峰彇璇︽儏澶辫触:", error);
- this.loading = false;
- this.$message.error("鑾峰彇璇︽儏澶辫触");
- });
+
+ // 澶勭悊鎹愮尞鍣ㄥ畼瀛楁
+ if (data.organdonation) {
+ const organArray = Array.isArray(data.organdonation)
+ ? data.organdonation
+ : (data.organdonation || "").split(",").filter(item => item);
+ this.selectedOrgans = organArray;
+ this.form.organdonationOther = data.organdonationOther || "";
+ }
+
+ // 澶勭悊鍣ㄥ畼鑾峰彇璁板綍
+ if (data.serviceDonationwitnessorgans) {
+ this.procurementData.serviceDonationwitnessorgans = Array.isArray(
+ data.serviceDonationwitnessorgans
+ )
+ ? data.serviceDonationwitnessorgans
+ : [];
+ }
+
+ this.$message.success("鏁版嵁鍔犺浇鎴愬姛");
+ } else {
+ this.$message.warning("鏈壘鍒板搴旂殑鍣ㄥ畼鑾峰彇鏁版嵁");
+ }
+ } catch (error) {
+ console.error("鑾峰彇鍣ㄥ畼鑾峰彇璇︽儏澶辫触:", error);
+ this.$message.error("鑾峰彇璇︽儏澶辫触");
+ } finally {
+ this.loading = false;
+ }
},
// 鑾峰彇鍖婚櫌鏁版嵁
- getHospitalData() {
- getHospitalList().then(response => {
- if (response.code === 200) {
- this.hospitalList = response.data;
- }
- });
- },
- // 鑾峰彇鍗忚皟鍛樻暟鎹�
- getCoordinatorData() {
- getCoordinatorList().then(response => {
- if (response.code === 200) {
- this.coordinatorList = response.data;
- }
- });
+ async getHospitalData() {
+ try {
+ // TODO: 鏇挎崲涓哄疄闄呯殑鍖婚櫌鍒楄〃鎺ュ彛
+ // 鏆傛椂浣跨敤妯℃嫙鏁版嵁
+ this.hospitalList = [
+ { hospitalNo: "H001", hospitalName: "鍖椾含鍗忓拰鍖婚櫌" },
+ { hospitalNo: "H002", hospitalName: "涓婃捣鍗庡北鍖婚櫌" },
+ { hospitalNo: "H003", hospitalName: "骞垮窞涓北鍖婚櫌" },
+ { hospitalNo: "H004", hospitalName: "姝︽眽鍚屾祹鍖婚櫌" },
+ { hospitalNo: "H005", hospitalName: "鎴愰兘鍗庤タ鍖婚櫌" }
+ ];
+ } catch (error) {
+ console.error("鑾峰彇鍖婚櫌鏁版嵁澶辫触:", error);
+ this.$message.error("鑾峰彇鍖婚櫌鏁版嵁澶辫触");
+ }
},
// 鍣ㄥ畼閫夋嫨鐘舵�佸彉鍖�
handleOrganSelectionChange(selectedValues) {
- const currentOrganNos = this.procurementData.records.map(
- item => item.organNo
+ if (!this.procurementData.serviceDonationwitnessorgans) {
+ this.procurementData.serviceDonationwitnessorgans = [];
+ }
+
+ const currentOrganValues = this.procurementData.serviceDonationwitnessorgans.map(
+ item => item.organno
);
+
+ // 澶勭悊浜掓枼閫昏緫
+ this.handleExclusiveSelections(selectedValues);
+
+ // 鏇存柊鎹愮尞鍣ㄥ畼瀛楁
+ this.form.organdonation = selectedValues.join(",");
// 鏂板閫夋嫨鐨勫櫒瀹�
selectedValues.forEach(organValue => {
- if (!currentOrganNos.includes(organValue)) {
- const organInfo = this.dict.type.sys_Organ.find(
- item => item.value === organValue
- );
- if (organInfo) {
- this.procurementData.records.push({
- organName: organInfo.label,
- organNo: organValue,
- id: null,
- procurementId: this.form.id,
- organStartTime: "",
- organGetTime: "",
- gainHospitalNo: "",
- gainHospitalName: "",
- organGetDoctor: "",
- assistant: "",
- procurementNurse: "",
- operatingRoomNurse: "",
- anesthesiologist: "",
- organState: "1",
- notGetReason: ""
- });
- }
+ if (!currentOrganValues.includes(organValue)) {
+ this.createOrganRecord(organValue);
}
});
// 绉婚櫎鍙栨秷閫夋嫨鐨勫櫒瀹�
- this.procurementData.records = this.procurementData.records.filter(
+ this.procurementData.serviceDonationwitnessorgans = this.procurementData.serviceDonationwitnessorgans.filter(
record => {
- if (selectedValues.includes(record.organNo)) {
+ if (selectedValues.includes(record.organno)) {
return true;
} else {
if (record.id) {
@@ -861,13 +1184,13 @@
}
)
.then(() => {
- this.procurementData.records = this.procurementData.records.filter(
- r => r.organNo !== record.organNo
+ this.procurementData.serviceDonationwitnessorgans = this.procurementData.serviceDonationwitnessorgans.filter(
+ r => r.organno !== record.organno
);
this.$message.success("鍒犻櫎鎴愬姛");
})
.catch(() => {
- this.selectedOrgans.push(record.organNo);
+ this.selectedOrgans.push(record.organno);
});
return true;
} else {
@@ -877,6 +1200,54 @@
}
);
},
+
+ // 澶勭悊浜掓枼閫夋嫨
+ handleExclusiveSelections(selectedValues) {
+ // 濡傛灉閫夋嫨浜�"鍙岃偩"(鍋囪瀛楀吀鍊间负C64)锛岃嚜鍔ㄥ彇娑堝崟鐙殑"宸﹁偩"(C64L)鍜�"鍙宠偩"(C64R)閫夋嫨
+ if (selectedValues.includes("C64")) {
+ this.selectedOrgans = selectedValues.filter(
+ item => item !== "C64L" && item !== "C64R"
+ );
+ }
+ // 濡傛灉閫夋嫨浜�"宸﹁偩"鎴�"鍙宠偩"锛屽彇娑�"鍙岃偩"閫夋嫨
+ 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 (selectedValues.includes("C34L") || selectedValues.includes("C34R")) {
+ this.selectedOrgans = selectedValues.filter(item => item !== "C34");
+ }
+ },
+
+ // 鍒涘缓鍣ㄥ畼璁板綍
+ createOrganRecord(organValue) {
+ const organName = this.getOrganLabel(organValue);
+
+ this.procurementData.serviceDonationwitnessorgans.push({
+ id: null,
+ organname: organName,
+ organno: organValue,
+ organStartTime: "",
+ organGetTime: "",
+ gainHospitalNo: "",
+ gainHospitalName: "",
+ organGetDoctor: "",
+ assistant: "",
+ procurementNurse: "",
+ operatingRoomNurse: "",
+ anesthesiologist: "",
+ organState: "1",
+ notGetReason: ""
+ });
+ },
+
// 鍖婚櫌閫夋嫨鍙樺寲
handleHospitalChange(row, hospitalNo) {
const hospital = this.hospitalList.find(
@@ -888,8 +1259,8 @@
},
// 缂栬緫鑾峰彇璁板綍
handleEditProcurement(row) {
- const index = this.procurementData.records.findIndex(
- item => item.organNo === row.organNo
+ const index = this.procurementData.serviceDonationwitnessorgans.findIndex(
+ item => item.organno === row.organno
);
if (index !== -1) {
this.currentRecord = { ...row };
@@ -900,7 +1271,7 @@
// 纭缂栬緫
handleEditConfirm() {
if (this.currentEditIndex !== -1) {
- this.procurementData.records[this.currentEditIndex] = {
+ this.procurementData.serviceDonationwitnessorgans[this.currentEditIndex] = {
...this.currentRecord
};
this.$message.success("鑾峰彇璁板綍鏇存柊鎴愬姛");
@@ -920,60 +1291,77 @@
return "";
},
// 淇濆瓨鍩烘湰淇℃伅
- handleSave() {
- this.$refs.form.validate(valid => {
+ async handleSave() {
+ this.$refs.form.validate(async valid => {
if (valid) {
this.saveLoading = true;
- const apiMethod = this.form.id
- ? updateOrganProcurement
- : addOrganProcurement;
+ try {
+ const saveData = {
+ ...this.form,
+ attachments: this.attachments,
+ organdonation: this.selectedOrgans.join(","),
+ serviceDonationwitnessorgans:
+ this.procurementData.serviceDonationwitnessorgans || []
+ };
- apiMethod(this.form)
- .then(response => {
- if (response.code === 200) {
- this.$message.success("淇濆瓨鎴愬姛");
- if (!this.form.id) {
- this.form.id = response.data.id;
- this.$router.replace({
- query: { ...this.$route.query, id: this.form.id }
- });
- }
+ const apiMethod = this.form.id ? witnessedit : witnessadd;
+ const response = await apiMethod(saveData);
+
+ if (response.code === 200) {
+ this.$message.success("淇濆瓨鎴愬姛");
+ if (!this.form.id && response.data && response.data.id) {
+ this.form.id = response.data.id;
+ this.$router.replace({
+ query: { ...this.$route.query, id: this.form.id }
+ });
}
- })
- .catch(error => {
- console.error("淇濆瓨澶辫触:", error);
- this.$message.error("淇濆瓨澶辫触");
- })
- .finally(() => {
- this.saveLoading = false;
- });
+ } else {
+ this.$message.error("淇濆瓨澶辫触锛�" + (response.msg || "鏈煡閿欒"));
+ }
+ } catch (error) {
+ console.error("淇濆瓨澶辫触:", error);
+ this.$message.error("淇濆瓨澶辫触");
+ } finally {
+ this.saveLoading = false;
+ }
}
});
},
// 淇濆瓨鑾峰彇璁板綍
- handleSaveProcurement() {
+ async handleSaveProcurement() {
if (!this.form.id) {
this.$message.warning("璇峰厛淇濆瓨鍩烘湰淇℃伅");
return;
}
this.saveLoading = true;
- saveProcurementRecords(this.form.id, this.procurementData.records)
- .then(response => {
- if (response.code === 200) {
- this.$message.success("鑾峰彇璁板綍淇濆瓨鎴愬姛");
- }
- })
- .catch(error => {
- console.error("淇濆瓨鑾峰彇璁板綍澶辫触:", error);
- this.$message.error("淇濆瓨鑾峰彇璁板綍澶辫触");
- })
- .finally(() => {
- this.saveLoading = false;
- });
+ try {
+ const saveData = {
+ ...this.form,
+ attachments: this.attachments,
+ organdonation: this.selectedOrgans.join(","),
+ serviceDonationwitnessorgans:
+ this.procurementData.serviceDonationwitnessorgans || []
+ };
+
+ const response = await witnessedit(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;
+ }
},
// 纭瀹屾垚鑾峰彇
- handleConfirmProcurement() {
+ async handleConfirmProcurement() {
if (this.incompleteRecords > 0) {
this.$message.warning("璇峰厛瀹屽杽鎵�鏈夎幏鍙栬褰曠殑淇℃伅");
return;
@@ -984,118 +1372,223 @@
cancelButtonText: "鍙栨秷",
type: "warning"
})
- .then(() => {
+ .then(async () => {
this.confirmLoading = true;
- this.form.procurementStatus = "procured";
- this.form.procurementTime = new Date()
+ this.form.recordstate = "completed";
+ this.form.operationendtime = this.form.operationendtime || new Date()
.toISOString()
.replace("T", " ")
.substring(0, 19);
- updateOrganProcurement(this.form)
- .then(response => {
- if (response.code === 200) {
- this.$message.success("鍣ㄥ畼鑾峰彇宸插畬鎴�");
- }
- })
- .catch(error => {
- console.error("纭鑾峰彇澶辫触:", error);
- this.$message.error("纭鑾峰彇澶辫触");
- })
- .finally(() => {
- this.confirmLoading = false;
- });
+ try {
+ const saveData = {
+ ...this.form,
+ attachments: this.attachments,
+ organdonation: this.selectedOrgans.join(","),
+ serviceDonationwitnessorgans:
+ this.procurementData.serviceDonationwitnessorgans || []
+ };
+
+ const response = await witnessedit(saveData);
+
+ if (response.code === 200) {
+ this.$message.success("鍣ㄥ畼鑾峰彇宸插畬鎴�");
+ } else {
+ this.$message.error(
+ "纭鑾峰彇澶辫触锛�" + (response.msg || "鏈煡閿欒")
+ );
+ this.form.recordstate = "pending";
+ this.form.operationendtime = "";
+ }
+ } catch (error) {
+ console.error("纭鑾峰彇澶辫触:", error);
+ this.$message.error("纭鑾峰彇澶辫触");
+ this.form.recordstate = "pending";
+ this.form.operationendtime = "";
+ } finally {
+ this.confirmLoading = false;
+ }
})
.catch(() => {});
},
- // 涓婁紶闄勪欢
- handleUploadAttachment() {
- this.$message.info("闄勪欢涓婁紶鍔熻兘");
+ // 纭鑾峰彇鎸夐挳鍒悕
+ handleProcure() {
+ this.handleConfirmProcurement();
},
- // 棰勮闄勪欢
- handlePreviewAttachment(attachment) {
- this.$message.info("闄勪欢棰勮鍔熻兘");
+
+ // 闄勪欢鐩稿叧鏂规硶
+ /** 闄勪欢鍙樺寲澶勭悊 */
+ handleAttachmentChange(fileList) {
+ this.attachmentFileList = fileList;
},
- // 涓嬭浇闄勪欢
- handleDownloadAttachment(attachment) {
- this.$message.info("闄勪欢涓嬭浇鍔熻兘");
- },
- // 鍒犻櫎闄勪欢
- handleRemoveAttachment(attachment) {
- this.$confirm("纭畾瑕佸垹闄よ繖涓檮浠跺悧锛�", "鎻愮ず", {
- confirmButtonText: "纭畾",
- cancelButtonText: "鍙栨秷",
- type: "warning"
- })
- .then(() => {
+
+ /** 闄勪欢绉婚櫎澶勭悊 */
+ 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("闄勪欢鍒犻櫎鎴愬姛");
- })
- .catch(() => {});
+ }
+ }
},
- // 鑾峰彇鏂囦欢鍥炬爣
- getFileIcon(fileName) {
- const ext = fileName
- .split(".")
- .pop()
- .toLowerCase();
- const iconMap = {
- pdf: "el-icon-document",
- doc: "el-icon-document",
- docx: "el-icon-document",
- xls: "el-icon-document",
- xlsx: "el-icon-document",
- jpg: "el-icon-picture",
- jpeg: "el-icon-picture",
- png: "el-icon-picture"
+
+ /** 涓婁紶鎴愬姛澶勭悊 */
+ 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.$message.success("鏂囦欢涓婁紶鎴愬姛");
+ }
+ },
+
+ /** 涓婁紶閿欒澶勭悊 */
+ handleUploadError({ file, fileList, error }) {
+ console.error("闄勪欢涓婁紶澶辫触:", error);
+ this.$message.error("鏂囦欢涓婁紶澶辫触锛岃閲嶈瘯");
+ },
+
+ /** 鎵嬪姩鍒犻櫎闄勪欢 */
+ handleRemoveAttachment(index) {
+ this.attachments.splice(index, 1);
+ this.attachmentFileList.splice(index, 1);
+ this.$message.success("闄勪欢鍒犻櫎鎴愬姛");
+ },
+
+ /** 鏂囦欢棰勮 */
+ handlePreview(file) {
+ this.currentPreviewFile = {
+ fileName: file.fileName,
+ fileUrl: file.path || file.fileUrl,
+ fileType: this.getFileType(file.fileName)
};
- return iconMap[ext] || "el-icon-document";
+ this.filePreviewTitle = file.fileName;
+ this.filePreviewVisible = true;
},
- // 鑾峰彇鏂囦欢绫诲瀷
+
+ /** 鏂囦欢涓嬭浇 */
+ 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("鏂囦欢璺緞涓嶅瓨鍦紝鏃犳硶涓嬭浇");
+ }
+ },
+
+ /** 鑾峰彇鏂囦欢绫诲瀷 */
getFileType(fileName) {
- const ext = fileName
- .split(".")
- .pop()
- .toLowerCase();
- const typeMap = {
- pdf: "PDF",
- doc: "DOC",
- docx: "DOCX",
- xls: "XLS",
- xlsx: "XLSX",
- jpg: "JPG",
- jpeg: "JPEG",
- png: "PNG"
- };
- return typeMap[ext] || ext.toUpperCase();
+ 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";
},
- // 鏂囦欢澶у皬鏍煎紡鍖�
- formatFileSize(size) {
- if (size === 0) return "0 B";
+
+ /** 鑾峰彇鏂囦欢鍥炬爣棰滆壊 */
+ getFileIconColor(fileName) {
+ const type = this.getFileType(fileName);
+ const colorMap = {
+ image: "#67C23A",
+ pdf: "#F56C6C",
+ office: "#409EFF",
+ other: "#909399"
+ };
+ return colorMap[type] || "#909399";
+ },
+
+ /** 鑾峰彇鏂囦欢鏍囩绫诲瀷 */
+ getFileTagType(fileName) {
+ const type = this.getFileType(fileName);
+ const typeMap = {
+ image: "success",
+ pdf: "danger",
+ office: "primary",
+ other: "info"
+ };
+ return typeMap[type] || "info";
+ },
+
+ /** 鑾峰彇鏂囦欢绫诲瀷鏂囨湰 */
+ getFileTypeText(fileName) {
+ const type = this.getFileType(fileName);
+ const textMap = {
+ image: "鍥剧墖",
+ pdf: "PDF",
+ office: "鏂囨。",
+ other: "鍏朵粬"
+ };
+ return textMap[type] || "鏈煡";
+ },
+
+ /** 妫�鏌ユ槸鍚﹀彲棰勮 */
+ isPreviewable(fileName) {
+ const type = this.getFileType(fileName);
+ return ["image", "pdf"].includes(type);
+ },
+
+ /** 鑾峰彇鏂囦欢鎵╁睍鍚� */
+ 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(size) / Math.log(k));
- return parseFloat((size / Math.pow(k, i)).toFixed(2)) + " " + sizes[i];
+ const i = Math.floor(Math.log(bytes) / Math.log(k));
+ return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + " " + sizes[i];
},
- // 鏃堕棿鏍煎紡鍖�
- parseTime(time) {
- if (!time) return "";
- const date = new Date(time);
- return `${date.getFullYear()}-${(date.getMonth() + 1)
- .toString()
- .padStart(2, "0")}-${date
- .getDate()
- .toString()
- .padStart(2, "0")} ${date
- .getHours()
- .toString()
- .padStart(2, "0")}:${date
- .getMinutes()
- .toString()
- .padStart(2, "0")}`;
+
+ /** 鏃ユ湡鏃堕棿鏍煎紡鍖� */
+ 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;
+ }
}
}
};
</script>
+
<style scoped>
.organ-procurement-detail {
padding: 20px;
@@ -1122,6 +1615,44 @@
border-radius: 8px;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
border: 1px solid #e4e7ed;
+ padding: 20px;
+ background: #fafafa;
+}
+
+.attachment-header {
+ display: flex;
+ align-items: center;
+ gap: 8px;
+ margin-bottom: 16px;
+ padding-bottom: 8px;
+ border-bottom: 1px solid #ebeef5;
+}
+
+.attachment-title {
+ font-weight: 600;
+ color: #303133;
+}
+
+.attachment-tip {
+ font-size: 12px;
+ color: #909399;
+ margin-left: auto;
+}
+
+.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;
}
.detail-title {
@@ -1193,385 +1724,14 @@
background-color: #ffecc2 !important;
}
-:deep(.el-table .cell) {
- padding: 8px 12px;
- line-height: 1.5;
-}
-
-:deep(.el-table th) {
- background-color: #f5f7fa;
- color: #606266;
- font-weight: 600;
-}
-
-:deep(.el-table--border) {
- border: 1px solid #e4e7ed;
- border-radius: 4px;
-}
-
-:deep(.el-table--border th) {
- border-right: 1px solid #e4e7ed;
-}
-
-:deep(.el-table--border td) {
- border-right: 1px solid #e4e7ed;
-}
-
-/* 琛ㄥ崟鏍峰紡浼樺寲 */
-:deep(.el-form-item__label) {
- font-weight: 500;
- color: #606266;
-}
-
-:deep(.el-input__inner) {
- border-radius: 4px;
- border: 1px solid #dcdfe6;
- transition: border-color 0.3s ease;
-}
-
-:deep(.el-input__inner:focus) {
- border-color: #409EFF;
- box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
-}
-
-:deep(.el-textarea__inner) {
- border-radius: 4px;
- resize: vertical;
- min-height: 60px;
-}
-
-:deep(.el-select) {
- width: 100%;
-}
-
-/* 鎸夐挳鏍峰紡浼樺寲 */
-:deep(.el-button--primary) {
- background: linear-gradient(135deg, #409EFF 0%, #3375e0 100%);
- border: none;
- border-radius: 4px;
- transition: all 0.3s ease;
-}
-
-:deep(.el-button--primary:hover) {
- transform: translateY(-1px);
- box-shadow: 0 4px 12px rgba(64, 158, 255, 0.4);
-}
-
-:deep(.el-button--success) {
- background: linear-gradient(135deg, #67C23A 0%, #529b2f 100%);
- border: none;
- border-radius: 4px;
- transition: all 0.3s ease;
-}
-
-:deep(.el-button--success:hover) {
- transform: translateY(-1px);
- box-shadow: 0 4px 12px rgba(103, 194, 58, 0.4);
-}
-
-:deep(.el-button--warning) {
- background: linear-gradient(135deg, #E6A23C 0%, #d18c2a 100%);
- border: none;
- border-radius: 4px;
- transition: all 0.3s ease;
-}
-
-:deep(.el-button--warning:hover) {
- transform: translateY(-1px);
- box-shadow: 0 4px 12px rgba(230, 162, 60, 0.4);
-}
-
-:deep(.el-button--danger) {
- background: linear-gradient(135deg, #F56C6C 0%, #e05b5b 100%);
- border: none;
- border-radius: 4px;
- transition: all 0.3s ease;
-}
-
-:deep(.el-button--danger:hover) {
- transform: translateY(-1px);
- box-shadow: 0 4px 12px rgba(245, 108, 108, 0.4);
-}
-
-/* 鏍囩鏍峰紡 */
-:deep(.el-tag) {
- border-radius: 12px;
- border: none;
- font-weight: 500;
- padding: 4px 12px;
-}
-
-:deep(.el-tag--success) {
- background: linear-gradient(135deg, #67C23A 0%, #529b2f 100%);
- color: white;
-}
-
-:deep(.el-tag--warning) {
- background: linear-gradient(135deg, #E6A23C 0%, #d18c2a 100%);
- color: white;
-}
-
-/* 澶嶉�夋缁勬牱寮� */
-:deep(.el-checkbox-group) {
- display: flex;
- flex-wrap: wrap;
- gap: 15px;
- margin-top: 10px;
-}
-
-:deep(.el-checkbox) {
- margin-right: 0;
-}
-
-:deep(.el-checkbox__input.is-checked .el-checkbox__inner) {
- background: linear-gradient(135deg, #409EFF 0%, #3375e0 100%);
- border-color: #409EFF;
-}
-
-:deep(.el-checkbox__input.is-checked + .el-checkbox__label) {
- color: #409EFF;
- font-weight: 500;
-}
-
-/* 鏃ユ湡閫夋嫨鍣ㄦ牱寮� */
-:deep(.el-date-editor) {
- width: 100%;
-}
-
-:deep(.el-picker-panel) {
- border-radius: 8px;
- box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
-}
-
-/* 鍔犺浇鐘舵�� */
-:deep(.el-loading-mask) {
- border-radius: 4px;
-}
-
-/* 鍗$墖澶撮儴鏍峰紡浼樺寲 */
-:deep(.el-card__header) {
- background: linear-gradient(135deg, #f5f7fa 0%, #e4e7ed 100%);
- border-bottom: 1px solid #e4e7ed;
- padding: 15px 20px;
-}
-
/* 鍝嶅簲寮忚璁� */
-@media (max-width: 1200px) {
- .organ-procurement-detail {
- padding: 15px;
- }
-
- :deep(.el-col) {
- margin-bottom: 10px;
- }
-}
-
@media (max-width: 768px) {
.organ-procurement-detail {
padding: 10px;
}
- .detail-title {
- font-size: 16px;
- }
-
- .stat-item {
- padding: 5px;
- }
-
- .stat-label {
- font-size: 10px;
- }
-
- .stat-value {
- font-size: 14px;
- }
-
- :deep(.el-table .cell) {
- padding: 4px 8px;
- font-size: 12px;
- }
-
- :deep(.el-checkbox-group) {
- gap: 8px;
- }
-
- .dialog-footer .el-button {
- margin: 5px;
- min-width: 100px;
- }
-}
-
-@media (max-width: 480px) {
- .organ-procurement-detail {
- padding: 5px;
- }
-
- :deep(.el-card__header) {
- padding: 10px 15px;
- }
-
- :deep(.el-form-item__label) {
- font-size: 12px;
- }
-
- :deep(.el-table) {
- font-size: 11px;
- }
-}
-
-/* 鍔ㄧ敾鏁堟灉 */
-.fade-enter-active, .fade-leave-active {
- transition: opacity 0.3s ease;
-}
-
-.fade-enter, .fade-leave-to {
- opacity: 0;
-}
-
-/* 鑷畾涔夋粴鍔ㄦ潯 */
-:deep(::-webkit-scrollbar) {
- width: 6px;
- height: 6px;
-}
-
-:deep(::-webkit-scrollbar-track) {
- background: #f1f1f1;
- border-radius: 3px;
-}
-
-:deep(::-webkit-scrollbar-thumb) {
- background: #c1c1c1;
- border-radius: 3px;
-}
-
-:deep(::-webkit-scrollbar-thumb:hover) {
- background: #a8a8a8;
-}
-
-/* 鏂囦欢淇℃伅鏍峰紡 */
-.file-info {
- display: flex;
- align-items: center;
- padding: 5px 0;
-}
-
-.file-info i {
- font-size: 18px;
- margin-right: 10px;
-}
-
-/* 鎿嶄綔鎸夐挳缁勬牱寮� */
-:deep(.small-padding .el-button) {
- margin: 0 2px;
- padding: 4px 8px;
-}
-
-/* 琛ㄥ崟琛岄棿璺濅紭鍖� */
-:deep(.el-form-item) {
- margin-bottom: 18px;
-}
-
-:deep(.el-row) {
- margin-bottom: 10px;
-}
-
-/* 瀵硅瘽妗嗘牱寮忎紭鍖� */
-:deep(.el-dialog) {
- border-radius: 8px;
- box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
-}
-
-:deep(.el-dialog__header) {
- background: linear-gradient(135deg, #f5f7fa 0%, #e4e7ed 100%);
- border-bottom: 1px solid #e4e7ed;
- padding: 15px 20px;
- border-radius: 8px 8px 0 0;
-}
-
-:deep(.el-dialog__title) {
- font-weight: 600;
- color: #303133;
-}
-
-:deep(.el-dialog__body) {
- padding: 20px;
-}
-
-:deep(.el-dialog__footer) {
- padding: 15px 20px;
- border-top: 1px solid #e4e7ed;
-}
-
-/* 鐗规畩鐘舵�佹彁绀� */
-.procurement-warning {
- background-color: #fff7e6;
- border: 1px solid #ffecc2;
- border-radius: 4px;
- padding: 10px 15px;
- margin: 10px 0;
- color: #e6a23c;
- font-size: 14px;
-}
-
-.procurement-success {
- background-color: #f0f9ff;
- border: 1px solid #b3e0ff;
- border-radius: 4px;
- padding: 10px 15px;
- margin: 10px 0;
- color: #409EFF;
- font-size: 14px;
-}
-
-/* 鏃堕棿绾挎牱寮忥紙鐢ㄤ簬鎵嬫湳鏃堕棿灞曠ず锛� */
-.procurement-timeline {
- margin: 20px 0;
- padding: 15px;
- background: #f8f9fa;
- border-radius: 4px;
-}
-
-.timeline-item {
- display: flex;
- align-items: center;
- margin-bottom: 10px;
- padding: 8px 12px;
- background: white;
- border-radius: 4px;
- border-left: 4px solid #409EFF;
-}
-
-.timeline-label {
- font-weight: 500;
- min-width: 120px;
- color: #606266;
-}
-
-.timeline-value {
- color: #303133;
- font-weight: 500;
-}
-
-/* 鎵撳嵃鏍峰紡 */
-@media print {
- .organ-procurement-detail {
- padding: 0;
- background: white;
- }
-
- .detail-card,
- .procurement-card,
- .attachment-card {
- box-shadow: none;
- border: 1px solid #ddd;
- margin-bottom: 15px;
- page-break-inside: avoid;
- }
-
- .dialog-footer,
- .el-button {
- display: none;
+ .procurement-stats .el-col {
+ margin-bottom: 10px;
}
}
</style>
diff --git a/src/views/business/GetWitness/index.vue b/src/views/business/GetWitness/index.vue
index 47467b1..7e2c926 100644
--- a/src/views/business/GetWitness/index.vue
+++ b/src/views/business/GetWitness/index.vue
@@ -8,33 +8,33 @@
:inline="true"
label-width="100px"
>
- <el-form-item label="浣忛櫌鍙�" prop="hospitalNo">
+ <el-form-item label="浣忛櫌鍙�" prop="inpatientno">
<el-input
- v-model="queryParams.hospitalNo"
+ v-model="queryParams.inpatientno"
placeholder="璇疯緭鍏ヤ綇闄㈠彿"
clearable
style="width: 200px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
- <el-form-item label="鎹愮尞鑰呭鍚�" prop="donorName">
+ <el-form-item label="鎹愮尞鑰呭鍚�" prop="name">
<el-input
- v-model="queryParams.donorName"
+ v-model="queryParams.name"
placeholder="璇疯緭鍏ユ崘鐚�呭鍚�"
clearable
style="width: 200px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
- <el-form-item label="鑾峰彇鐘舵��" prop="procurementStatus">
+ <el-form-item label="鑾峰彇鐘舵��" prop="recordstate">
<el-select
- v-model="queryParams.procurementStatus"
+ v-model="queryParams.recordstate"
placeholder="璇烽�夋嫨鑾峰彇鐘舵��"
clearable
style="width: 200px"
>
- <el-option label="宸茶幏鍙�" value="procured" />
- <el-option label="寰呰幏鍙�" value="pending" />
+ <el-option label="宸茶幏鍙�" value="1" />
+ <el-option label="寰呰幏鍙�" value="0" />
</el-select>
</el-form-item>
<el-form-item>
@@ -60,13 +60,6 @@
@click="handleUpdate"
>淇敼</el-button
>
- <el-button
- type="danger"
- icon="el-icon-delete"
- :disabled="multiple"
- @click="handleDelete"
- >鍒犻櫎</el-button
- >
</el-col>
<el-col :span="8" style="text-align: right">
<el-tooltip content="鍒锋柊" placement="top">
@@ -87,20 +80,20 @@
<el-table-column
label="浣忛櫌鍙�"
align="center"
- prop="hospitalNo"
+ prop="inpatientno"
width="120"
/>
<el-table-column
label="鎹愮尞鑰呭鍚�"
align="center"
- prop="donorName"
+ prop="name"
width="120"
/>
- <el-table-column label="鎬у埆" align="center" prop="gender" width="80">
+ <el-table-column label="鎬у埆" align="center" prop="sex" width="80">
<template slot-scope="scope">
<dict-tag
:options="dict.type.sys_user_sex"
- :value="parseInt(scope.row.gender)"
+ :value="scope.row.sex"
/>
</template>
</el-table-column>
@@ -108,56 +101,50 @@
<el-table-column
label="鐤剧梾璇婃柇"
align="center"
- prop="diagnosis"
+ prop="diagnosisname"
min-width="180"
show-overflow-tooltip
/>
<el-table-column
label="鑾峰彇鐘舵��"
align="center"
- prop="procurementStatus"
+ prop="recordstate"
width="100"
>
<template slot-scope="scope">
- <el-tag :type="scope.row.procurementStatus === 'procured' ? 'success' : 'warning'">
- {{ scope.row.procurementStatus === 'procured' ? '宸茶幏鍙�' : '寰呰幏鍙�' }}
+ <el-tag
+ :type="scope.row.recordstate === '1' ? 'success' : 'warning'"
+ >
+ {{ scope.row.recordstate === "1" ? "宸茶幏鍙�" : "寰呰幏鍙�" }}
</el-tag>
</template>
</el-table-column>
<el-table-column
- label="鑾峰彇鏃堕棿"
+ label="鑾峰彇鎵嬫湳鏃堕棿"
align="center"
- prop="procurementTime"
+ prop="operationendtime"
width="160"
>
<template slot-scope="scope">
<span>{{
- scope.row.procurementTime
- ? parseTime(scope.row.procurementTime, "{y}-{m}-{d} {h}:{i}")
+ scope.row.operationendtime
+ ? parseTime(scope.row.operationendtime, "{y}-{m}-{d} {h}:{i}")
: "-"
}}</span>
</template>
</el-table-column>
<el-table-column
- label="鐧昏浜�"
+ label="鎵嬫湳鍖荤敓"
align="center"
- prop="registrant"
+ prop="operationdoctor"
width="100"
/>
<el-table-column
- label="鐧昏鏃堕棿"
+ label="璐熻矗浜�"
align="center"
- prop="registrationTime"
- width="160"
- >
- <template slot-scope="scope">
- <span>{{
- scope.row.registrationTime
- ? parseTime(scope.row.registrationTime, "{y}-{m}-{d} {h}:{i}")
- : "-"
- }}</span>
- </template>
- </el-table-column>
+ prop="responsibleusername"
+ width="100"
+ />
<el-table-column
label="鎿嶄綔"
align="center"
@@ -180,14 +167,6 @@
@click="handleUpdate(scope.row)"
>淇敼</el-button
>
- <el-button
- size="mini"
- type="text"
- icon="el-icon-delete"
- style="color: #F56C6C"
- @click="handleDelete(scope.row)"
- >鍒犻櫎</el-button
- >
</template>
</el-table-column>
</el-table>
@@ -205,7 +184,8 @@
</template>
<script>
-import { listOrganProcurement, delOrganProcurement } from "./organProcurement";
+// import { witnessList, delWitness } from "@/api/case/witness";
+import { witnessList } from "@/api/businessApi";
import Pagination from "@/components/Pagination";
export default {
@@ -230,9 +210,9 @@
queryParams: {
pageNum: 1,
pageSize: 10,
- hospitalNo: undefined,
- donorName: undefined,
- procurementStatus: undefined
+ inpatientno: undefined,
+ name: undefined,
+ recordstate: undefined
}
};
},
@@ -243,13 +223,13 @@
// 鏌ヨ鍣ㄥ畼鑾峰彇鍒楄〃
getList() {
this.loading = true;
- listOrganProcurement(this.queryParams)
+ witnessList(this.queryParams)
.then(response => {
if (response.code === 200) {
- this.organProcurementList = response.data.rows;
- this.total = response.data.total;
+ this.organProcurementList = response.data;
+ this.total = response.total;
} else {
- this.$message.error("鑾峰彇鏁版嵁澶辫触");
+ this.$message.error(response.msg || "鑾峰彇鏁版嵁澶辫触");
}
this.loading = false;
})
@@ -279,7 +259,7 @@
handleView(row) {
this.$router.push({
path: "/case/GetWitnessInfo",
- query: { id: row.id }
+ query: { id: row.id, infoid: row.infoid }
});
},
// 鏂板鎸夐挳鎿嶄綔
@@ -288,30 +268,10 @@
},
// 淇敼鎸夐挳鎿嶄綔
handleUpdate(row) {
- const id = row.id || this.ids[0];
this.$router.push({
path: "/case/GetWitnessInfo",
- query: { id: id }
+ query: { id: row.id, infoid: row.infoid }
});
- },
- // 鍒犻櫎鎸夐挳鎿嶄綔
- handleDelete(row) {
- const ids = row.id ? [row.id] : this.ids;
- this.$confirm("鏄惁纭鍒犻櫎閫変腑鐨勬暟鎹」锛�", "璀﹀憡", {
- confirmButtonText: "纭畾",
- cancelButtonText: "鍙栨秷",
- type: "warning"
- })
- .then(() => {
- return delOrganProcurement(ids);
- })
- .then(response => {
- if (response.code === 200) {
- this.$message.success("鍒犻櫎鎴愬姛");
- this.getList();
- }
- })
- .catch(() => {});
},
// 鏃堕棿鏍煎紡鍖�
parseTime(time, pattern) {
diff --git a/src/views/business/GetWitness/organProcurement.js b/src/views/business/GetWitness/organProcurement.js
deleted file mode 100644
index 705bd52..0000000
--- a/src/views/business/GetWitness/organProcurement.js
+++ /dev/null
@@ -1,353 +0,0 @@
-// 妯℃嫙鍣ㄥ畼鑾峰彇鏁版嵁
-const mockOrganProcurementData = [
- {
- id: 1,
- hospitalNo: "D202512001",
- caseNo: "C202512001",
- donorName: "寮犱笁",
- gender: "2",
- age: 45,
- birthDate: "1978-05-15",
- diagnosis: "鑴戝浼�",
- procurementStatus: "procured",
- procurementTime: "2025-12-01 16:30:00",
- registrant: "鏉庡崗璋冨憳",
- registrationTime: "2025-12-01 15:00:00",
- createTime: "2025-12-01 10:00:00",
- surgeryName: "澶氬櫒瀹樿幏鍙栨墜鏈�",
- surgeryStartTime: "2025-12-01 14:00:00",
- donorDeathTime: "2025-12-01 13:30:00",
- abdominalAortaCannulationTime: "2025-12-01 14:30:00",
- inferiorVenaCavaCannulationTime: "2025-12-01 14:35:00",
- superiorMesentericVeinCannulationTime: "2025-12-01 14:40:00"
- },
- {
- id: 2,
- hospitalNo: "D202512002",
- caseNo: "C202512002",
- donorName: "鏉庡洓",
- gender: "1",
- age: 38,
- birthDate: "1985-08-22",
- diagnosis: "蹇冭剰楠ゅ仠",
- procurementStatus: "procured",
- procurementTime: "2025-12-02 11:20:00",
- registrant: "寮犲崗璋冨憳",
- registrationTime: "2025-12-02 10:00:00",
- createTime: "2025-12-02 08:30:00",
- surgeryName: "蹇冭剰鑾峰彇鎵嬫湳",
- surgeryStartTime: "2025-12-02 10:30:00",
- donorDeathTime: "2025-12-02 10:00:00",
- abdominalAortaCannulationTime: "2025-12-02 10:45:00",
- inferiorVenaCavaCannulationTime: "2025-12-02 10:50:00",
- superiorMesentericVeinCannulationTime: "2025-12-02 10:55:00"
- },
- {
- id: 3,
- hospitalNo: "D202512003",
- caseNo: "C202512003",
- donorName: "鐜嬩簲",
- gender: "2",
- age: 52,
- birthDate: "1971-03-10",
- diagnosis: "鑴戞姝�",
- procurementStatus: "pending",
- procurementTime: "",
- registrant: "璧靛崗璋冨憳",
- registrationTime: "2025-12-03 17:20:00",
- createTime: "2025-12-03 14:00:00",
- surgeryName: "",
- surgeryStartTime: "",
- donorDeathTime: "",
- abdominalAortaCannulationTime: "",
- inferiorVenaCavaCannulationTime: "",
- superiorMesentericVeinCannulationTime: ""
- }
-];
-
-// 妯℃嫙鍣ㄥ畼鑾峰彇璁板綍鏁版嵁
-const mockProcurementRecordData = [
- {
- id: 1,
- procurementId: 1,
- organName: "鑲濊剰",
- organNo: "L001",
- organStartTime: "2025-12-01 15:00:00",
- organGetTime: "2025-12-01 15:45:00",
- gainHospitalNo: "H1001",
- gainHospitalName: "闈掑矝澶у闄勫睘鍖婚櫌",
- organGetDoctor: "鐜嬪尰鐢�",
- assistant: "鏉庡尰鐢�",
- procurementNurse: "寮犳姢澹�",
- operatingRoomNurse: "鍒樻姢澹�",
- anesthesiologist: "闄堥夯閱夊笀",
- organState: "1",
- notGetReason: ""
- },
- {
- id: 2,
- procurementId: 1,
- organName: "鑲捐剰",
- organNo: "K001",
- organStartTime: "2025-12-01 15:10:00",
- organGetTime: "2025-12-01 15:50:00",
- gainHospitalNo: "H1002",
- gainHospitalName: "闈掑矝甯傚競绔嬪尰闄�",
- organGetDoctor: "璧靛尰鐢�",
- assistant: "閽卞尰鐢�",
- procurementNurse: "瀛欐姢澹�",
- operatingRoomNurse: "鍛ㄦ姢澹�",
- anesthesiologist: "鍚撮夯閱夊笀",
- organState: "1",
- notGetReason: ""
- },
- {
- id: 3,
- procurementId: 1,
- organName: "蹇冭剰",
- organNo: "H001",
- organStartTime: "2025-12-01 15:20:00",
- organGetTime: "2025-12-01 16:00:00",
- gainHospitalNo: "H1003",
- gainHospitalName: "灞变笢澶у榻愰瞾鍖婚櫌",
- organGetDoctor: "閮戝尰鐢�",
- assistant: "鐜嬪尰鐢�",
- procurementNurse: "鏋楁姢澹�",
- operatingRoomNurse: "榛勬姢澹�",
- anesthesiologist: "鏉ㄩ夯閱夊笀",
- organState: "1",
- notGetReason: ""
- }
-];
-
-// 妯℃嫙鍖婚櫌鏁版嵁
-const mockHospitalData = [
- { id: 1, hospitalNo: "H1001", hospitalName: "闈掑矝澶у闄勫睘鍖婚櫌", type: "4" },
- { id: 2, hospitalNo: "H1002", hospitalName: "闈掑矝甯傚競绔嬪尰闄�", type: "4" },
- { id: 3, hospitalNo: "H1003", hospitalName: "灞变笢澶у榻愰瞾鍖婚櫌", type: "4" },
- { id: 4, hospitalNo: "H1004", hospitalName: "闈掑矝甯備腑蹇冨尰闄�", type: "4" },
- { id: 5, hospitalNo: "H1005", hospitalName: "闈掑矝甯傛捣鎱堝尰鐤楅泦鍥�", type: "4" }
-];
-
-// 妯℃嫙鍗忚皟鍛樻暟鎹�
-const mockCoordinatorData = [
- { reportNo: "C001", reportName: "寮犲崗璋冨憳" },
- { reportNo: "C002", reportName: "鏉庡崗璋冨憳" },
- { reportNo: "C003", reportName: "鐜嬪崗璋冨憳" },
- { reportNo: "C004", reportName: "璧靛崗璋冨憳" }
-];
-
-// 妯℃嫙API鍝嶅簲寤惰繜
-const delay = (ms = 500) => new Promise(resolve => setTimeout(resolve, ms));
-
-// 鏌ヨ鍣ㄥ畼鑾峰彇鍒楄〃
-export const listOrganProcurement = async (queryParams = {}) => {
- await delay();
-
- const {
- pageNum = 1,
- pageSize = 10,
- hospitalNo,
- donorName,
- procurementStatus
- } = queryParams;
-
- // 杩囨护鏁版嵁
- let filteredData = mockOrganProcurementData.filter(item => {
- let match = true;
-
- if (hospitalNo && !item.hospitalNo.includes(hospitalNo)) {
- match = false;
- }
-
- if (donorName && !item.donorName.includes(donorName)) {
- match = false;
- }
-
- if (procurementStatus && item.procurementStatus !== procurementStatus) {
- match = false;
- }
-
- return match;
- });
-
- // 鍒嗛〉
- const startIndex = (pageNum - 1) * pageSize;
- const endIndex = startIndex + parseInt(pageSize);
- const paginatedData = filteredData.slice(startIndex, endIndex);
-
- return {
- code: 200,
- message: "success",
- data: {
- rows: paginatedData,
- total: filteredData.length,
- pageNum: parseInt(pageNum),
- pageSize: parseInt(pageSize)
- }
- };
-};
-
-// 鑾峰彇鍣ㄥ畼鑾峰彇璇︾粏淇℃伅
-export const getOrganProcurementDetail = async (id) => {
- await delay();
-
- const detail = mockOrganProcurementData.find(item => item.id == id);
-
- if (detail) {
- // 鑾峰彇鑾峰彇璁板綍
- const procurementRecords = mockProcurementRecordData.filter(item => item.procurementId == id);
-
- return {
- code: 200,
- message: "success",
- data: {
- ...detail,
- procurementRecords
- }
- };
- } else {
- return {
- code: 404,
- message: "鍣ㄥ畼鑾峰彇璁板綍涓嶅瓨鍦�"
- };
- }
-};
-
-// 鏂板鍣ㄥ畼鑾峰彇
-export const addOrganProcurement = async (data) => {
- await delay();
-
- const newId = Math.max(...mockOrganProcurementData.map(item => item.id), 0) + 1;
- const hospitalNo = `D${new Date().getFullYear()}${String(new Date().getMonth() + 1).padStart(2, '0')}${String(newId).padStart(3, '0')}`;
- const caseNo = `C${new Date().getFullYear()}${String(new Date().getMonth() + 1).padStart(2, '0')}${String(newId).padStart(3, '0')}`;
-
- const newRecord = {
- ...data,
- id: newId,
- hospitalNo,
- caseNo,
- registrationTime: new Date().toISOString().replace('T', ' ').substring(0, 19),
- createTime: new Date().toISOString().replace('T', ' ').substring(0, 19)
- };
-
- mockOrganProcurementData.unshift(newRecord);
-
- return {
- code: 200,
- message: "鏂板鎴愬姛",
- data: newRecord
- };
-};
-
-// 淇敼鍣ㄥ畼鑾峰彇
-export const updateOrganProcurement = async (data) => {
- await delay();
-
- const index = mockOrganProcurementData.findIndex(item => item.id == data.id);
-
- if (index !== -1) {
- mockOrganProcurementData[index] = {
- ...mockOrganProcurementData[index],
- ...data,
- updateTime: new Date().toISOString().replace('T', ' ').substring(0, 19)
- };
-
- return {
- code: 200,
- message: "淇敼鎴愬姛",
- data: mockOrganProcurementData[index]
- };
- } else {
- return {
- code: 404,
- message: "鍣ㄥ畼鑾峰彇璁板綍涓嶅瓨鍦�"
- };
- }
-};
-
-// 鍒犻櫎鍣ㄥ畼鑾峰彇
-export const delOrganProcurement = async (ids) => {
- await delay();
-
- const idArray = Array.isArray(ids) ? ids : [ids];
-
- idArray.forEach(id => {
- const index = mockOrganProcurementData.findIndex(item => item.id == id);
- if (index !== -1) {
- mockOrganProcurementData.splice(index, 1);
- }
- });
-
- return {
- code: 200,
- message: "鍒犻櫎鎴愬姛"
- };
-};
-
-// 淇濆瓨鍣ㄥ畼鑾峰彇璁板綍
-export const saveProcurementRecords = async (procurementId, records) => {
- await delay();
-
- // 鍒犻櫎璇ヨ幏鍙朓D鐨勬墍鏈夎褰�
- const existingIndexes = [];
- mockProcurementRecordData.forEach((item, index) => {
- if (item.procurementId == procurementId) {
- existingIndexes.push(index);
- }
- });
-
- // 浠庡悗寰�鍓嶅垹闄ら伩鍏嶇储寮曢棶棰�
- existingIndexes.reverse().forEach(index => {
- mockProcurementRecordData.splice(index, 1);
- });
-
- // 娣诲姞鏂拌褰�
- records.forEach(record => {
- const newId = Math.max(...mockProcurementRecordData.map(item => item.id), 0) + 1;
- mockProcurementRecordData.push({
- ...record,
- id: newId,
- procurementId: procurementId
- });
- });
-
- return {
- code: 200,
- message: "淇濆瓨鎴愬姛",
- data: records
- };
-};
-
-// 鑾峰彇鍖婚櫌鍒楄〃
-export const getHospitalList = async () => {
- await delay();
-
- return {
- code: 200,
- message: "success",
- data: mockHospitalData
- };
-};
-
-// 鑾峰彇鍗忚皟鍛樺垪琛�
-export const getCoordinatorList = async () => {
- await delay();
-
- return {
- code: 200,
- message: "success",
- data: mockCoordinatorData
- };
-};
-
-export default {
- listOrganProcurement,
- getOrganProcurementDetail,
- addOrganProcurement,
- updateOrganProcurement,
- delOrganProcurement,
- saveProcurementRecords,
- getHospitalList,
- getCoordinatorList
-};
diff --git a/src/views/business/OrganUtilization/index.vue b/src/views/business/OrganUtilization/index.vue
index 5483757..8177eba 100644
--- a/src/views/business/OrganUtilization/index.vue
+++ b/src/views/business/OrganUtilization/index.vue
@@ -8,34 +8,35 @@
:inline="true"
label-width="100px"
>
- <el-form-item label="浣忛櫌鍙�" prop="hospitalNo">
+ <el-form-item label="浣忛櫌鍙�" prop="inpatientno">
<el-input
- v-model="queryParams.hospitalNo"
+ v-model="queryParams.inpatientno"
placeholder="璇疯緭鍏ヤ綇闄㈠彿"
clearable
style="width: 200px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
- <el-form-item label="鎹愮尞鑰呭鍚�" prop="donorName">
+ <el-form-item label="鎹愮尞鑰呭鍚�" prop="name">
<el-input
- v-model="queryParams.donorName"
+ v-model="queryParams.name"
placeholder="璇疯緭鍏ユ崘鐚�呭鍚�"
clearable
style="width: 200px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
- <el-form-item label="鍒╃敤鐘舵��" prop="utilizationStatus">
+ <el-form-item label="璁板綍鐘舵��" prop="recordstate">
<el-select
- v-model="queryParams.utilizationStatus"
- placeholder="璇烽�夋嫨鍒╃敤鐘舵��"
+ v-model="queryParams.recordstate"
+ placeholder="璇烽�夋嫨璁板綍鐘舵��"
clearable
style="width: 200px"
>
<el-option label="宸插畬鎴�" value="completed" />
- <el-option label="杩涜涓�" value="in_progress" />
+ <el-option label="杩涜涓�" value="processing" />
<el-option label="寰呭鐞�" value="pending" />
+ <el-option label="宸插叧闂�" value="closed" />
</el-select>
</el-form-item>
<el-form-item>
@@ -88,61 +89,81 @@
<el-table-column
label="浣忛櫌鍙�"
align="center"
- prop="hospitalNo"
+ prop="inpatientno"
+ width="120"
+ />
+ <el-table-column
+ label="妗堜緥缂栧彿"
+ align="center"
+ prop="caseNo"
width="120"
/>
<el-table-column
label="鎹愮尞鑰呭鍚�"
align="center"
- prop="donorName"
+ prop="name"
width="120"
/>
- <el-table-column label="鎬у埆" align="center" prop="gender" width="80">
+ <el-table-column label="鎬у埆" align="center" prop="sex" width="80">
<template slot-scope="scope">
<dict-tag
:options="dict.type.sys_user_sex"
- :value="parseInt(scope.row.gender)"
+ :value="scope.row.sex"
/>
</template>
</el-table-column>
<el-table-column label="骞撮緞" align="center" prop="age" width="80" />
+ <el-table-column label="琛�鍨�" align="center" prop="bloodtype" width="80">
+ <template slot-scope="scope">
+ <dict-tag
+ v-if="scope.row.bloodtype"
+ :options="dict.type.sys_BloodType"
+ :value="scope.row.bloodtype"
+ />
+ <span v-else>-</span>
+ </template>
+ </el-table-column>
<el-table-column
label="鐤剧梾璇婃柇"
align="center"
- prop="diagnosis"
+ prop="diagnosisname"
min-width="180"
show-overflow-tooltip
/>
<el-table-column
- label="鍒╃敤鐘舵��"
+ label="瀹屾垚鏃堕棿"
align="center"
- prop="utilizationStatus"
- width="100"
- >
- <template slot-scope="scope">
- <el-tag :type="getStatusTagType(scope.row.utilizationStatus)">
- {{ getStatusText(scope.row.utilizationStatus) }}
- </el-tag>
- </template>
- </el-table-column>
- <el-table-column
- label="鐧昏浜�"
- align="center"
- prop="registrant"
- width="100"
- />
- <el-table-column
- label="鐧昏鏃堕棿"
- align="center"
- prop="registrationTime"
+ prop="completetime"
width="160"
>
<template slot-scope="scope">
<span>{{
- scope.row.registrationTime
- ? parseTime(scope.row.registrationTime, "{y}-{m}-{d} {h}:{i}")
+ scope.row.completetime
+ ? parseTime(scope.row.completetime, "{y}-{m}-{d} {h}:{i}")
: "-"
}}</span>
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="璐熻矗浜�"
+ align="center"
+ prop="responsibleusername"
+ width="100"
+ >
+ <template slot-scope="scope">
+ <span>{{ scope.row.responsibleusername || "-" }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="璁板綍鐘舵��"
+ align="center"
+ prop="recordstate"
+ width="100"
+ >
+ <template slot-scope="scope">
+ <el-tag :type="getStatusTagType(scope.row.recordstate)">
+ {{ getStatusText(scope.row.recordstate) }}
+ </el-tag>
</template>
</el-table-column>
<el-table-column
@@ -192,13 +213,13 @@
</template>
<script>
-import { listOrganUtilization, delOrganUtilization } from "./organUtilization";
+import { completionList, completionadd, completionedit } from "@/api/businessApi";
import Pagination from "@/components/Pagination";
export default {
name: "OrganUtilizationList",
components: { Pagination },
- dicts: ["sys_user_sex"],
+ dicts: ["sys_user_sex", "sys_BloodType"],
data() {
return {
// 閬僵灞�
@@ -217,9 +238,11 @@
queryParams: {
pageNum: 1,
pageSize: 10,
- hospitalNo: undefined,
- donorName: undefined,
- utilizationStatus: undefined
+ inpatientno: undefined,
+ name: undefined,
+ recordstate: undefined,
+ caseNo: undefined,
+ donorno: undefined
}
};
},
@@ -228,30 +251,44 @@
},
methods: {
// 鏌ヨ鍣ㄥ畼鍒╃敤鍒楄〃
- getList() {
+ async getList() {
this.loading = true;
- listOrganUtilization(this.queryParams)
- .then(response => {
- if (response.code === 200) {
- this.organUtilizationList = response.data.rows;
- this.total = response.data.total;
+ try {
+ const response = await completionList(this.queryParams);
+
+ if (response.code === 200) {
+ // 澶勭悊涓嶅悓鏍煎紡鐨勫搷搴旀暟鎹�
+ let data = response.data;
+ if (Array.isArray(data)) {
+ this.organUtilizationList = data;
+ this.total = data.length;
+ } else if (data && data.rows) {
+ this.organUtilizationList = data.rows;
+ this.total = data.total || data.rows.length;
+ } else if (data && data.list) {
+ this.organUtilizationList = data.list;
+ this.total = data.total || data.list.length;
} else {
- this.$message.error("鑾峰彇鏁版嵁澶辫触");
+ this.organUtilizationList = [];
+ this.total = 0;
}
- this.loading = false;
- })
- .catch(error => {
- console.error("鑾峰彇鍣ㄥ畼鍒╃敤鍒楄〃澶辫触:", error);
- this.loading = false;
- this.$message.error("鑾峰彇鏁版嵁澶辫触");
- });
+ } else {
+ this.$message.error("鑾峰彇鏁版嵁澶辫触锛�" + (response.msg || "鏈煡閿欒"));
+ }
+ } catch (error) {
+ console.error("鑾峰彇鍣ㄥ畼鍒╃敤鍒楄〃澶辫触:", error);
+ this.$message.error("鑾峰彇鏁版嵁澶辫触");
+ } finally {
+ this.loading = false;
+ }
},
// 鑾峰彇鐘舵�佹爣绛剧被鍨�
getStatusTagType(status) {
const typeMap = {
completed: "success",
- in_progress: "warning",
- pending: "info"
+ processing: "warning",
+ pending: "info",
+ closed: "danger"
};
return typeMap[status] || "info";
},
@@ -259,8 +296,9 @@
getStatusText(status) {
const textMap = {
completed: "宸插畬鎴�",
- in_progress: "杩涜涓�",
- pending: "寰呭鐞�"
+ processing: "杩涜涓�",
+ pending: "寰呭鐞�",
+ closed: "宸插叧闂�"
};
return textMap[status] || "鏈煡";
},
@@ -284,7 +322,10 @@
handleView(row) {
this.$router.push({
path: "/case/organUtilizationInfo",
- query: { id: row.id }
+ query: {
+ id: row.id,
+ infoid: row.infoid
+ }
});
},
// 鏂板鎸夐挳鎿嶄綔
@@ -294,9 +335,13 @@
// 淇敼鎸夐挳鎿嶄綔
handleUpdate(row) {
const id = row.id || this.ids[0];
+ const infoid = row.infoid;
this.$router.push({
path: "/case/organUtilizationInfo",
- query: { id: id }
+ query: {
+ id: id,
+ infoid: infoid
+ }
});
},
// 鍒犻櫎鎸夐挳鎿嶄綔
@@ -307,14 +352,17 @@
cancelButtonText: "鍙栨秷",
type: "warning"
})
- .then(() => {
- return delOrganUtilization(ids);
- })
- .then(response => {
- if (response.code === 200) {
- this.$message.success("鍒犻櫎鎴愬姛");
- this.getList();
- }
+ .then(async () => {
+ // TODO: 杩欓噷闇�瑕佽皟鐢ㄥ垹闄ゆ帴鍙o紝浣嗙洰鍓岮PI涓病鏈夋彁渚涘垹闄ゆ帴鍙�
+ // 濡傛灉闇�瑕佸垹闄ゅ姛鑳斤紝闇�瑕佸厛纭鍚庣鏄惁鏈夊搴旂殑鍒犻櫎鎺ュ彛
+ this.$message.warning("鍒犻櫎鍔熻兘鏆傛湭瀹炵幇锛岃纭鍚庣鎺ュ彛");
+
+ // 涓存椂妯℃嫙鍒犻櫎鎴愬姛
+ // const response = await completiondelete(ids);
+ // if (response.code === 200) {
+ // this.$message.success("鍒犻櫎鎴愬姛");
+ // this.getList();
+ // }
})
.catch(() => {});
},
diff --git a/src/views/business/allocation/allocationInfo.vue b/src/views/business/allocation/allocationInfo.vue
index b1d7285..fa02806 100644
--- a/src/views/business/allocation/allocationInfo.vue
+++ b/src/views/business/allocation/allocationInfo.vue
@@ -10,8 +10,9 @@
</el-button>
<el-button
type="success"
- @click="handleAllocate"
- :disabled="form.allocationStatus === 'allocated'"
+ @click="handleConfirmAllocation"
+ :disabled="form.allocationStatus === '1'"
+ :loading="confirmLoading"
>
纭鍒嗛厤
</el-button>
@@ -21,26 +22,26 @@
<el-form :model="form" ref="form" :rules="rules" label-width="120px">
<el-row :gutter="20">
<el-col :span="8">
- <el-form-item label="浣忛櫌鍙�" prop="hospitalNo">
- <el-input v-model="form.hospitalNo" readonly />
+ <el-form-item label="浣忛櫌鍙�" prop="donorno">
+ <el-input v-model="form.donorno" readonly />
</el-form-item>
</el-col>
<el-col :span="8">
- <el-form-item label="浣忛櫌鍙�" prop="caseNo">
- <el-input v-model="form.caseNo" readonly />
+ <el-form-item label="妗堜緥缂栧彿" prop="caseNo">
+ <el-input v-model="form.caseNo" />
</el-form-item>
</el-col>
<el-col :span="8">
- <el-form-item label="鎹愮尞鑰呭鍚�" prop="donorName">
- <el-input v-model="form.donorName" />
+ <el-form-item label="鎹愮尞鑰呭鍚�" prop="name">
+ <el-input v-model="form.name" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="8">
- <el-form-item label="鎬у埆" prop="gender">
- <el-select v-model="form.gender" style="width: 100%">
+ <el-form-item label="鎬у埆" prop="sex">
+ <el-select v-model="form.sex" style="width: 100%">
<el-option label="鐢�" value="0" />
<el-option label="濂�" value="1" />
</el-select>
@@ -51,25 +52,52 @@
<el-input v-model="form.age" />
</el-form-item>
</el-col>
+ <!-- <el-col :span="8">
+ <el-form-item label="鎹愮尞绫诲埆" prop="donationcategory">
+ <el-select v-model="form.donationcategory" style="width: 100%">
+ <el-option
+ v-for="dict in dict.type.sys_DonationCategory || []"
+ :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="8">
- <el-form-item label="鍑虹敓鏃ユ湡" prop="birthDate">
- <el-date-picker
- v-model="form.birthDate"
- type="date"
- value-format="yyyy-MM-dd"
- style="width: 100%"
- />
+ <el-form-item label="琛�鍨�" prop="bloodtype">
+ <el-select v-model="form.bloodtype" style="width: 100%">
+ <el-option
+ v-for="dict in dict.type.sys_BloodType || []"
+ :key="dict.value"
+ :label="dict.label"
+ :value="dict.value"
+ />
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="璇佷欢鍙风爜" prop="idcardno">
+ <el-input v-model="form.idcardno" />
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="璁板綍鐘舵��" prop="recordstate">
+ <el-input v-model="form.recordstate" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
- <el-form-item label="鐤剧梾璇婃柇" prop="diagnosis">
+ <el-form-item label="鐤剧梾璇婃柇" prop="diagnosisname">
<el-input
type="textarea"
:rows="2"
- v-model="form.diagnosis"
+ v-model="form.diagnosisname"
placeholder="璇疯緭鍏ョ柧鐥呰瘖鏂俊鎭�"
/>
</el-form-item>
@@ -81,7 +109,7 @@
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
style="width: 100%"
- :disabled="form.allocationStatus !== 'allocated'"
+ :disabled="form.allocationStatus === '1'"
/>
</el-form-item>
</el-col>
@@ -89,8 +117,27 @@
<el-row :gutter="20">
<el-col :span="12">
- <el-form-item label="鐧昏浜�" prop="registrant">
- <el-input v-model="form.registrant" />
+ <el-form-item label="鎵�鍦ㄥ尰鐤楁満鏋�" prop="treatmenthospitalname">
+ <el-input
+ v-model="form.treatmenthospitalname"
+ placeholder="璇疯緭鍏ュ尰鐤楁満鏋勫悕绉�"
+ />
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="鍖荤枟鏈烘瀯缂栫爜" prop="treatmenthospitalno">
+ <el-input
+ v-model="form.treatmenthospitalno"
+ placeholder="璇疯緭鍏ュ尰鐤楁満鏋勭紪鐮�"
+ />
+ </el-form-item>
+ </el-col>
+ </el-row>
+
+ <el-row :gutter="20">
+ <el-col :span="12">
+ <el-form-item label="鐧昏浜�" prop="registrationName">
+ <el-input v-model="form.registrationName" readonly />
</el-form-item>
</el-col>
<el-col :span="12">
@@ -115,10 +162,20 @@
<div style="float: right;">
<el-tag
:type="
- form.allocationStatus === 'allocated' ? 'success' : 'warning'
+ form.allocationStatus === '1'
+ ? 'success'
+ : form.allocationStatus === '2'
+ ? 'danger'
+ : 'warning'
"
>
- {{ form.allocationStatus === "allocated" ? "宸插垎閰�" : "寰呭垎閰�" }}
+ {{
+ form.allocationStatus === "1"
+ ? "宸插垎閰�"
+ : form.allocationStatus === "2"
+ ? "浣滃簾"
+ : "鏈垎閰�"
+ }}
</el-tag>
</div>
</div>
@@ -137,14 +194,20 @@
@change="handleOrganSelectionChange"
>
<el-checkbox
- v-for="organ in organDict"
- :key="organ.value"
- :label="organ.value"
- :disabled="form.allocationStatus === 'allocated'"
+ v-for="dict in dict.type.sys_Organ || []"
+ :key="dict.value"
+ :label="dict.value"
+ :disabled="form.allocationStatus === '1'"
>
- {{ organ.label }}
+ {{ dict.label }}
</el-checkbox>
</el-checkbox-group>
+ <el-input
+ v-if="showOtherInput"
+ v-model="otherOrganInput"
+ placeholder="璇疯緭鍏ュ叾浠栧櫒瀹樺悕绉�"
+ style="margin-top: 10px; width: 300px;"
+ />
</el-form-item>
</el-col>
</el-row>
@@ -153,7 +216,7 @@
<el-col>
<el-form-item>
<el-table
- :data="allocationData.records"
+ :data="allocationData.serviceDonateorganList"
v-loading="loading"
border
style="width: 100%"
@@ -163,11 +226,11 @@
label="鍣ㄥ畼鍚嶇О"
align="center"
width="120"
- prop="organName"
+ prop="organname"
>
<template slot-scope="scope">
<el-input
- v-model="scope.row.organName"
+ v-model="scope.row.organname"
placeholder="鍣ㄥ畼鍚嶇О"
:disabled="true"
/>
@@ -178,13 +241,13 @@
label="鍒嗛厤绯荤粺缂栧彿"
align="center"
width="150"
- prop="systemNo"
+ prop="caseno"
>
<template slot-scope="scope">
<el-input
- v-model="scope.row.systemNo"
+ v-model="scope.row.caseno"
placeholder="鍒嗛厤绯荤粺缂栧彿"
- :disabled="form.allocationStatus === 'allocated'"
+ :disabled="form.allocationStatus === '1'"
/>
</template>
</el-table-column>
@@ -193,18 +256,18 @@
label="鍒嗛厤鎺ユ敹鏃堕棿"
align="center"
width="180"
- prop="applicantTime"
+ prop="applicanttime"
>
<template slot-scope="scope">
<el-date-picker
clearable
size="small"
style="width: 100%"
- v-model="scope.row.applicantTime"
+ v-model="scope.row.applicanttime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="閫夋嫨鍒嗛厤鎺ユ敹鏃堕棿"
- :disabled="form.allocationStatus === 'allocated'"
+ :disabled="form.allocationStatus === '1'"
/>
</template>
</el-table-column>
@@ -213,13 +276,13 @@
label="鍙椾綋濮撴皬"
align="center"
width="120"
- prop="recipientName"
+ prop="name"
>
<template slot-scope="scope">
<el-input
- v-model="scope.row.recipientName"
+ v-model="scope.row.name"
placeholder="鍙椾綋濮撴皬"
- :disabled="form.allocationStatus === 'allocated'"
+ :disabled="form.allocationStatus === '1'"
/>
</template>
</el-table-column>
@@ -228,39 +291,34 @@
label="绉绘鍖婚櫌"
align="center"
width="200"
- prop="transplantHospitalNo"
+ prop="transplanthospitalno"
>
<template slot-scope="scope">
- <el-select
- v-model="scope.row.transplantHospitalNo"
- placeholder="璇烽�夋嫨绉绘鍖婚櫌"
- style="width: 100%"
- :disabled="form.allocationStatus === 'allocated'"
- @change="handleHospitalChange(scope.row, $event)"
- >
- <el-option
- v-for="hospital in hospitalList"
- :key="hospital.hospitalNo"
- :label="hospital.hospitalName"
- :value="hospital.hospitalNo"
+ <div>
+ <org-selecter
+ ref="tranHosSelect"
+ :org-type="'4'"
+ :dataList="dataList"
+ v-model="scope.row.transplanthospitalno"
+ style="width: 100%"
/>
- </el-select>
+ </div>
</template>
</el-table-column>
<el-table-column
label="璇存槑"
align="center"
- prop="reallocationReason"
+ prop="reallocationreason"
min-width="200"
>
<template slot-scope="scope">
<el-input
type="textarea"
clearable
- v-model="scope.row.reallocationReason"
+ v-model="scope.row.reallocationreason"
placeholder="璇疯緭鍏ヨ鏄�"
- :disabled="form.allocationStatus === 'allocated'"
+ :disabled="form.allocationStatus === '1'"
/>
</template>
</el-table-column>
@@ -270,7 +328,7 @@
align="center"
width="120"
class-name="small-padding fixed-width"
- v-if="form.allocationStatus !== 'allocated'"
+ v-if="form.allocationStatus !== '1'"
>
<template slot-scope="scope">
<el-button
@@ -278,7 +336,7 @@
type="text"
icon="el-icon-copy-document"
@click="handleRedistribution(scope.row)"
- :disabled="!scope.row.systemNo"
+ :disabled="!scope.row.caseno"
>
閲嶅垎閰�
</el-button>
@@ -290,13 +348,19 @@
</el-row>
<!-- 鍒嗛厤缁熻淇℃伅 -->
- <div class="allocation-stats" v-if="allocationData.records.length > 0">
+ <div
+ class="allocation-stats"
+ v-if="
+ allocationData.serviceDonateorganList &&
+ allocationData.serviceDonateorganList.length > 0
+ "
+ >
<el-row :gutter="20">
<el-col :span="6">
<div class="stat-item">
<span class="stat-label">宸插垎閰嶅櫒瀹�:</span>
<span class="stat-value"
- >{{ allocationData.records.length }} 涓�</span
+ >{{ allocationData.serviceDonateorganList.length }} 涓�</span
>
</div>
</el-col>
@@ -318,15 +382,19 @@
<span class="stat-value">
<el-tag
:type="
- form.allocationStatus === 'allocated'
+ form.allocationStatus === '1'
? 'success'
+ : form.allocationStatus === '2'
+ ? 'danger'
: 'warning'
"
>
{{
- form.allocationStatus === "allocated"
- ? "宸插畬鎴�"
- : "杩涜涓�"
+ form.allocationStatus === "1"
+ ? "宸插垎閰�"
+ : form.allocationStatus === "2"
+ ? "浣滃簾"
+ : "鏈垎閰�"
}}
</el-tag>
</span>
@@ -342,12 +410,15 @@
</div>
</el-form>
- <div class="dialog-footer" v-if="form.allocationStatus !== 'allocated'">
+ <div class="dialog-footer" v-if="form.allocationStatus !== '1'">
<el-button
type="primary"
@click="handleSaveAllocation"
:loading="saveLoading"
- :disabled="allocationData.records.length === 0"
+ :disabled="
+ !allocationData.serviceDonateorganList ||
+ allocationData.serviceDonateorganList.length === 0
+ "
>
淇濆瓨鍒嗛厤璁板綍
</el-button>
@@ -362,88 +433,89 @@
</div>
</el-card>
- <!-- 闄勪欢绠$悊閮ㄥ垎 -->
+ <!-- 闄勪欢绠$悊閮ㄥ垎浼樺寲 -->
<el-card class="attachment-card">
- <div slot="header" class="clearfix">
- <span class="detail-title">鐩稿叧闄勪欢</span>
- <upload-attachment
- :file-list="attachments"
- @change="handleAttachmentChange"
- :limit="10"
- :accept="'.pdf,.jpg,.jpeg,.png,.doc,.docx'"
- />
+ <div class="attachment-header">
+ <i class="el-icon-paperclip"></i>
+ <span class="attachment-title">鐩稿叧闄勪欢</span>
+ <span class="attachment-tip"
+ >鏀寔涓婁紶鍣ㄥ畼鍒嗛厤鐩稿叧鏂囦欢 (鏈�澶歿{ attachmentLimit }}涓�)</span
+ >
</div>
- <div class="attachment-list">
- <el-table :data="attachments" style="width: 100%">
- <el-table-column label="鏂囦欢鍚嶇О" min-width="200">
+ <!-- 浣跨敤 UploadAttachment 缁勪欢 -->
+ <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">
- <div class="file-info">
- <i
- :class="getFileIcon(scope.row.fileName)"
- style="margin-right: 8px; color: #409EFF;"
- ></i>
- <span>{{ scope.row.fileName }}</span>
- </div>
+ <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" align="center">
+ <el-table-column label="鏂囦欢绫诲瀷" width="100">
<template slot-scope="scope">
- <el-tag size="small">{{
- getFileType(scope.row.fileName)
- }}</el-tag>
+ <el-tag :type="getFileTagType(scope.row.fileName)" size="small">
+ {{ getFileTypeText(scope.row.fileName) }}
+ </el-tag>
</template>
</el-table-column>
-
- <el-table-column label="鏂囦欢澶у皬" width="100" align="center">
+ <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="160" align="center">
- <template slot-scope="scope">
- <span>{{ parseTime(scope.row.uploadTime) }}</span>
- </template>
- </el-table-column>
-
- <el-table-column label="鎿嶄綔" width="150" align="center">
+ <el-table-column label="鎿嶄綔" width="200" fixed="right">
<template slot-scope="scope">
<el-button
size="mini"
- type="text"
- icon="el-icon-view"
- @click="handlePreviewAttachment(scope.row)"
- >棰勮</el-button
+ type="primary"
+ @click="handlePreview(scope.row)"
+ :disabled="!isPreviewable(scope.row.fileName)"
>
+ 棰勮
+ </el-button>
<el-button
size="mini"
- type="text"
- icon="el-icon-download"
+ type="success"
@click="handleDownloadAttachment(scope.row)"
- >涓嬭浇</el-button
>
+ 涓嬭浇
+ </el-button>
<el-button
size="mini"
- type="text"
- icon="el-icon-delete"
- style="color: #F56C6C;"
- @click="handleRemoveAttachment(scope.row)"
- >鍒犻櫎</el-button
+ type="danger"
+ @click="handleRemoveAttachment(scope.$index)"
>
+ 鍒犻櫎
+ </el-button>
</template>
</el-table-column>
</el-table>
</div>
</el-card>
- <!-- 闄勪欢棰勮瀵硅瘽妗� -->
- <attachment-preview
- :visible="attachmentPreviewVisible"
- :file-list="currentAttachmentList"
- :title="attachmentPreviewTitle"
- @close="attachmentPreviewVisible = false"
- />
+
<!-- 閲嶅垎閰嶅璇濇 -->
<el-dialog
title="鍣ㄥ畼閲嶅垎閰�"
@@ -452,7 +524,7 @@
>
<el-form :model="redistributionForm" label-width="100px">
<el-form-item label="鍘熷櫒瀹樹俊鎭�">
- <el-input v-model="redistributionForm.organName" readonly />
+ <el-input v-model="redistributionForm.organname" readonly />
</el-form-item>
<el-form-item label="閲嶅垎閰嶅師鍥�" prop="reason">
<el-input
@@ -470,49 +542,84 @@
>
</div>
</el-dialog>
+
+
+
+ <!-- 闄勪欢棰勮瀵硅瘽妗� -->
+ <FilePreviewDialog
+ :visible="filePreviewVisible"
+ :file="currentPreviewFile"
+ @close="filePreviewVisible = false"
+ @download="handleDownloadAttachment"
+ />
</div>
</template>
<script>
import {
- getOrganAllocationDetail,
- updateOrganAllocation,
- saveAllocationRecords,
- getHospitalList,
- getOrganDict
-} from "./organAllocation";
+ allocationList,
+ allocationadd,
+ allocationedit
+} from "@/api/businessApi";
import UploadAttachment from "@/components/UploadAttachment";
-import AttachmentPreview from "@/components/AttachmentPreview";
+import FilePreviewDialog from "@/components/FilePreviewDialog";
+import OrgSelecter from "@/views/project/components/orgselect";
+
+import dayjs from "dayjs";
+
export default {
name: "OrganAllocationDetail",
components: {
UploadAttachment,
- AttachmentPreview,
+ OrgSelecter,
+ FilePreviewDialog
},
+ dicts: [
+ "sys_BloodType",
+ "sys_DonationCategory",
+ "sys_RecordState",
+ "sys_Organ"
+ ],
data() {
return {
// 琛ㄥ崟鏁版嵁
form: {
id: undefined,
- hospitalNo: "",
+ infoid: undefined,
+ donationcategory: "",
+ recordstate: "",
caseNo: "",
- donorName: "",
- gender: "",
+ donorno: "",
+ treatmenthospitalname: "",
+ treatmenthospitalno: "",
+ sex: "",
+ name: "",
age: "",
- birthDate: "",
- diagnosis: "",
- allocationStatus: "pending",
+ bloodtype: "",
+ idcardno: "",
+ diagnosisname: "",
+ allocationStatus: "0", // 0:鏈垎閰嶏紱1锛氬凡鍒嗛厤锛�2浣滃簾
allocationTime: "",
- registrant: "",
- registrationTime: ""
+ registrationCode: "",
+ registrationName: "",
+ registrationTime: "",
+ attachments: [] // 娣诲姞闄勪欢瀛楁
},
+ // 闄勪欢棰勮鐩稿叧
+ attachmentPreviewVisible: false,
+ currentAttachmentList: [],
+ attachmentPreviewTitle: "",
+ dataList: [],
// 琛ㄥ崟楠岃瘉瑙勫垯
rules: {
- donorName: [
+ name: [
{ required: true, message: "鎹愮尞鑰呭鍚嶄笉鑳戒负绌�", trigger: "blur" }
],
- diagnosis: [
+ diagnosisname: [
{ required: true, message: "鐤剧梾璇婃柇涓嶈兘涓虹┖", trigger: "blur" }
+ ],
+ recordstate: [
+ { required: true, message: "璁板綍鐘舵�佷笉鑳戒负绌�", trigger: "change" }
]
},
// 鍒嗛厤璁板綍楠岃瘉瑙勫垯
@@ -522,25 +629,34 @@
confirmLoading: false,
// 鍔犺浇鐘舵��
loading: false,
- // 閫変腑鐨勫櫒瀹�
+ // 閫変腑鐨勫櫒瀹橈紙瀛樺偍瀛楀吀value锛�
selectedOrgans: [],
- // 鍣ㄥ畼瀛楀吀
- organDict: [],
+ // 鍏朵粬鍣ㄥ畼杈撳叆
+ otherOrganInput: "",
// 鍖婚櫌鍒楄〃
hospitalList: [],
// 鍒嗛厤璁板綍鏁版嵁
allocationData: {
- records: []
+ serviceDonateorganList: []
},
// 闄勪欢鏁版嵁
attachments: [],
+ attachmentFileList: [],
+ // 闄勪欢鐩稿叧閰嶇疆
+ attachmentLimit: 10,
+ attachmentAccept:
+ ".pdf,.jpg,.jpeg,.png,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.txt",
// 閲嶅垎閰嶅璇濇
redistributionDialogVisible: false,
redistributionForm: {
- organName: "",
+ organname: "",
reason: ""
},
- currentRedistributeRecord: null
+ currentRedistributeRecord: null,
+ // 鏂囦欢棰勮鐩稿叧
+ filePreviewVisible: false,
+ currentPreviewFile: null,
+ filePreviewTitle: ""
};
},
computed: {
@@ -550,120 +666,218 @@
},
// 涓嶅畬鏁寸殑璁板綍鏁伴噺
incompleteRecords() {
- return this.allocationData.records.filter(
+ if (!this.allocationData.serviceDonateorganList) return 0;
+ return this.allocationData.serviceDonateorganList.filter(
record =>
- !record.systemNo ||
- !record.applicantTime ||
- !record.recipientName ||
- !record.transplantHospitalNo
+ !record.caseno ||
+ !record.applicanttime ||
+ !record.name ||
+ !record.transplanthospitalno
).length;
},
// 鍞竴鍖婚櫌鏁伴噺
uniqueHospitals() {
- const hospitals = this.allocationData.records
- .map(record => record.transplantHospitalNo)
+ if (!this.allocationData.serviceDonateorganList) return 0;
+ const hospitals = this.allocationData.serviceDonateorganList
+ .map(record => record.transplanthospitalno)
.filter(Boolean);
return new Set(hospitals).size;
+ },
+ // 鑾峰彇鍣ㄥ畼瀛楀吀
+ organDict() {
+ return this.dict.type.sys_Organ || [];
+ },
+ // 鍒ゆ柇鏄惁闇�瑕佹樉绀哄叾浠栬緭鍏ユ
+ showOtherInput() {
+ return this.selectedOrgans.includes("C01"); // 鍋囪"鍏朵粬"鐨勫瓧鍏稿�兼槸C01
+ }
+ },
+ watch: {
+ // 鐩戝惉闄勪欢鏁版嵁鍙樺寲
+ 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
+ },
+ // 鐩戝惉鍏朵粬鍣ㄥ畼杈撳叆鍙樺寲
+ otherOrganInput(newValue) {
+ if (newValue && this.selectedOrgans.includes("C01")) {
+ // 鏇存柊鍣ㄥ畼瀛楀吀涓殑"鍏朵粬"鏍囩鏄剧ず
+ const otherRecord = this.allocationData.serviceDonateorganList.find(
+ item => item.organname && item.organname.includes("鍏朵粬")
+ );
+ if (otherRecord) {
+ otherRecord.organname = `鍏朵粬(${newValue})`;
+ }
+ }
}
},
created() {
- const id = this.$route.query.id;
- if (id) {
- this.getDetail(id);
- } else {
- this.generateCaseNo();
- this.form.registrant = this.currentUser.username || "褰撳墠鐢ㄦ埛";
+ this.initData();
+ },
+ methods: {
+ // 鏍规嵁瀛楀吀value鑾峰彇label
+ getOrganLabel(organValue) {
+ const dictItem = this.organDict.find(item => item.value === organValue);
+ return dictItem ? dictItem.label : organValue;
+ },
+
+ // 鍒濆鍖栨暟鎹�
+ initData() {
+ const { id, infoid } = this.$route.query;
+
+ if (!infoid) {
+ this.$message.error("缂哄皯蹇呰鐨勮矾鐢卞弬鏁� infoid");
+ this.$router.back();
+ return;
+ }
+
+ this.form.infoid = infoid;
+ this.form.registrationName =
+ this.currentUser.nickName || this.currentUser.username || "褰撳墠鐢ㄦ埛";
this.form.registrationTime = new Date()
.toISOString()
.replace("T", " ")
.substring(0, 19);
- }
- this.getOrganDictionary();
- this.getHospitalData();
- },
- methods: {
- // 鐢熸垚浣忛櫌鍙�
- generateCaseNo() {
+
+ if (infoid) {
+ this.getDetail(infoid);
+ } else {
+ this.generateDonorNo();
+ }
+
+ this.getHospitalData();
+ },
+ // 鐢熸垚鎹愮尞鑰呯紪鍙�
+ generateDonorNo() {
const timestamp = Date.now().toString();
- this.form.hospitalNo = "D" + timestamp.slice(-6);
- this.form.caseNo = "C" + timestamp.slice(-6);
+ this.form.donorno = "D" + timestamp.slice(-8);
+ this.form.caseNo = "CASE" + timestamp.slice(-6);
},
// 鑾峰彇璇︽儏
- getDetail(id) {
+ async getDetail(infoid) {
this.loading = true;
- getOrganAllocationDetail(id)
- .then(response => {
- if (response.code === 200) {
- this.form = response.data;
- if (response.data.allocationRecords) {
- this.allocationData.records = response.data.allocationRecords;
- this.selectedOrgans = response.data.allocationRecords.map(
- item => item.organNo
- );
+ try {
+ const response = await allocationList({ infoid });
+ if (
+ response.code === 200 &&
+ response.data &&
+ response.data.length > 0
+ ) {
+ const data = response.data[0];
+
+ // 濉厖琛ㄥ崟鏁版嵁
+ Object.assign(this.form, data);
+
+ // 鍒濆鍖栭檮浠�
+ if (this.form.attachments) {
+ this.attachments = Array.isArray(this.form.attachments)
+ ? [...this.form.attachments]
+ : [];
+ }
+
+ // 澶勭悊鍒嗛厤璁板綍
+ if (data.serviceDonateorganList) {
+ this.allocationData.serviceDonateorganList = Array.isArray(
+ data.serviceDonateorganList
+ )
+ ? data.serviceDonateorganList
+ : [];
+
+ // 鏇存柊閫変腑鐨勫櫒瀹�
+ this.selectedOrgans = this.allocationData.serviceDonateorganList
+ .map(item => {
+ // 浠庡悗绔暟鎹腑鑾峰彇鍣ㄥ畼鐨剉alue
+ if (item.organno) {
+ return item.organno;
+ }
+
+ // 濡傛灉鍚庣鍙湁鍣ㄥ畼鍚嶇О锛屽皾璇曚粠瀛楀吀涓尮閰�
+ if (item.organname) {
+ const dictItem = this.organDict.find(
+ org =>
+ org.label === item.organname ||
+ (item.organname && item.organname.includes(org.label))
+ );
+ return dictItem ? dictItem.value : null;
+ }
+
+ return null;
+ })
+ .filter(Boolean);
+
+ // 澶勭悊"鍏朵粬"鍣ㄥ畼
+ const otherRecord = this.allocationData.serviceDonateorganList.find(
+ item => item.organname && item.organname.includes("鍏朵粬(")
+ );
+ if (otherRecord) {
+ const match = otherRecord.organname.match(/鍏朵粬\((.*?)\)/);
+ if (match) {
+ this.otherOrganInput = match[1];
+ }
}
}
- this.loading = false;
- })
- .catch(error => {
- console.error("鑾峰彇鍣ㄥ畼鍒嗛厤璇︽儏澶辫触:", error);
- this.loading = false;
- this.$message.error("鑾峰彇璇︽儏澶辫触");
- });
- },
- // 鑾峰彇鍣ㄥ畼瀛楀吀
- getOrganDictionary() {
- getOrganDict().then(response => {
- if (response.code === 200) {
- this.organDict = response.data;
+
+ this.$message.success("鏁版嵁鍔犺浇鎴愬姛");
+ } else {
+ this.$message.warning("鏈壘鍒板搴旂殑鍣ㄥ畼鍒嗛厤鏁版嵁");
}
- });
+ } catch (error) {
+ console.error("鑾峰彇鍣ㄥ畼鍒嗛厤璇︽儏澶辫触:", error);
+ this.$message.error("鑾峰彇璇︽儏澶辫触");
+ } finally {
+ this.loading = false;
+ }
},
// 鑾峰彇鍖婚櫌鏁版嵁
- getHospitalData() {
- getHospitalList().then(response => {
- if (response.code === 200) {
- this.hospitalList = response.data;
- }
- });
- },
- handleAttachmentChange(fileList) {
-console.log(fileList,'娴嬭瘯');
-
+ async getHospitalData() {
+ try {
+ // TODO: 鏇挎崲涓哄疄闄呯殑鍖婚櫌鍒楄〃鎺ュ彛
+ // 鏆傛椂浣跨敤妯℃嫙鏁版嵁
+ this.hospitalList = [
+ { hospitalNo: "H001", hospitalName: "鍖椾含鍗忓拰鍖婚櫌" },
+ { hospitalNo: "H002", hospitalName: "涓婃捣鍗庡北鍖婚櫌" },
+ { hospitalNo: "H003", hospitalName: "骞垮窞涓北鍖婚櫌" },
+ { hospitalNo: "H004", hospitalName: "姝︽眽鍚屾祹鍖婚櫌" },
+ { hospitalNo: "H005", hospitalName: "鎴愰兘鍗庤タ鍖婚櫌" }
+ ];
+ } catch (error) {
+ console.error("鑾峰彇鍖婚櫌鏁版嵁澶辫触:", error);
+ this.$message.error("鑾峰彇鍖婚櫌鏁版嵁澶辫触");
+ }
},
// 鍣ㄥ畼閫夋嫨鐘舵�佸彉鍖�
handleOrganSelectionChange(selectedValues) {
- const currentOrganNos = this.allocationData.records.map(
- item => item.organNo
+ if (!this.allocationData.serviceDonateorganList) {
+ this.allocationData.serviceDonateorganList = [];
+ }
+
+ const currentOrganValues = this.allocationData.serviceDonateorganList.map(
+ item => item.organno
);
+
+ // 澶勭悊浜掓枼閫昏緫锛堝弬鑰冩崘鐚喅瀹氶〉闈級
+ this.handleExclusiveSelections(selectedValues);
// 鏂板閫夋嫨鐨勫櫒瀹�
selectedValues.forEach(organValue => {
- if (!currentOrganNos.includes(organValue)) {
- const organInfo = this.organDict.find(
- item => item.value === organValue
- );
- if (organInfo) {
- this.allocationData.records.push({
- organName: organInfo.label,
- organNo: organValue,
- id: null,
- allocationId: this.form.id,
- systemNo: "",
- applicantTime: "",
- recipientName: "",
- transplantHospitalNo: "",
- transplantHospitalName: "",
- reallocationReason: "",
- organState: 1
- });
- }
+ if (!currentOrganValues.includes(organValue)) {
+ this.createOrganRecord(organValue);
}
});
// 绉婚櫎鍙栨秷閫夋嫨鐨勫櫒瀹�
- this.allocationData.records = this.allocationData.records.filter(
+ this.allocationData.serviceDonateorganList = this.allocationData.serviceDonateorganList.filter(
record => {
- if (selectedValues.includes(record.organNo)) {
+ if (selectedValues.includes(record.organno)) {
return true;
} else {
if (record.id) {
@@ -677,14 +891,13 @@
}
)
.then(() => {
- // 瀹為檯椤圭洰涓繖閲屽簲璇ヨ皟鐢ㄥ垹闄PI
- this.allocationData.records = this.allocationData.records.filter(
- r => r.organNo !== record.organNo
+ this.allocationData.serviceDonateorganList = this.allocationData.serviceDonateorganList.filter(
+ r => r.organno !== record.organno
);
this.$message.success("鍒犻櫎鎴愬姛");
})
.catch(() => {
- this.selectedOrgans.push(record.organNo);
+ this.selectedOrgans.push(record.organno);
});
return true; // 绛夊緟鐢ㄦ埛纭
} else {
@@ -694,6 +907,61 @@
}
);
},
+
+ // 澶勭悊浜掓枼閫夋嫨锛堝弬鑰冩崘鐚喅瀹氶〉闈級
+ handleExclusiveSelections(selectedValues) {
+ // 濡傛灉閫夋嫨浜�"鍙岃偩"(鍋囪瀛楀吀鍊间负C64)锛岃嚜鍔ㄥ彇娑堝崟鐙殑"宸﹁偩"(C64L)鍜�"鍙宠偩"(C64R)閫夋嫨
+ if (selectedValues.includes("C64")) {
+ this.selectedOrgans = selectedValues.filter(
+ item => item !== "C64L" && item !== "C64R"
+ );
+ }
+ // 濡傛灉閫夋嫨浜�"宸﹁偩"鎴�"鍙宠偩"锛屽彇娑�"鍙岃偩"閫夋嫨
+ 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 (
+ selectedValues.includes("C34L") ||
+ selectedValues.includes("C34R")
+ ) {
+ this.selectedOrgans = selectedValues.filter(item => item !== "C34");
+ }
+ },
+
+ // 鍒涘缓鍣ㄥ畼璁板綍
+ createOrganRecord(organValue) {
+ let organName = this.getOrganLabel(organValue);
+
+ // 濡傛灉鏄�"鍏朵粬"鍣ㄥ畼涓旀湁杈撳叆鍊�
+ if (organValue === "C01" && this.otherOrganInput) {
+ organName = `鍏朵粬(${this.otherOrganInput})`;
+ }
+
+ this.allocationData.serviceDonateorganList.push({
+ id: null,
+ organname: organName,
+ organno: organValue,
+ caseno: "",
+ applicanttime: "",
+ name: "",
+ transplanthospitalno: "",
+ transplantHospitalName: "",
+ reallocationreason: "",
+ organState: 1
+ });
+ },
+
// 鍖婚櫌閫夋嫨鍙樺寲
handleHospitalChange(row, hospitalNo) {
const hospital = this.hospitalList.find(
@@ -706,8 +974,8 @@
// 閲嶅垎閰嶆搷浣�
handleRedistribution(row) {
this.currentRedistributeRecord = row;
- this.redistributionForm.organName = row.organName;
- this.redistributionForm.reason = row.reallocationReason || "";
+ this.redistributionForm.organname = row.organname;
+ this.redistributionForm.reason = row.reallocationreason || "";
this.redistributionDialogVisible = true;
},
// 纭閲嶅垎閰�
@@ -718,7 +986,7 @@
}
if (this.currentRedistributeRecord) {
- this.currentRedistributeRecord.reallocationReason = this.redistributionForm.reason;
+ this.currentRedistributeRecord.reallocationreason = this.redistributionForm.reason;
this.$message.success("閲嶅垎閰嶅師鍥犲凡鏇存柊");
this.redistributionDialogVisible = false;
}
@@ -726,70 +994,89 @@
// 鍣ㄥ畼琛屾牱寮�
getOrganRowClassName({ row }) {
if (
- !row.systemNo ||
- !row.applicantTime ||
- !row.recipientName ||
- !row.transplantHospitalNo
+ !row.caseno ||
+ !row.applicanttime ||
+ !row.name ||
+ !row.transplanthospitalno
) {
return "warning-row";
}
return "";
},
// 淇濆瓨鍩烘湰淇℃伅
- handleSave() {
- this.$refs.form.validate(valid => {
- if (valid) {
- this.saveLoading = true;
- const apiMethod = this.form.id
- ? updateOrganAllocation
- : addOrganAllocation;
+ async handleSave() {
+ this.$refs.form.validate(async valid => {
+ if (!valid) {
+ this.$message.warning("璇峰畬鍠勮〃鍗曚俊鎭�");
+ return;
+ }
- apiMethod(this.form)
- .then(response => {
- if (response.code === 200) {
- this.$message.success("淇濆瓨鎴愬姛");
- if (!this.form.id) {
- this.form.id = response.data.id;
- this.$router.replace({
- query: { ...this.$route.query, id: this.form.id }
- });
- }
- }
- })
- .catch(error => {
- console.error("淇濆瓨澶辫触:", error);
- this.$message.error("淇濆瓨澶辫触");
- })
- .finally(() => {
- this.saveLoading = false;
- });
+ this.saveLoading = true;
+ try {
+ const saveData = {
+ ...this.form,
+ attachments: this.attachments,
+ serviceDonateorganList:
+ this.allocationData.serviceDonateorganList || []
+ };
+ console.log(this.form.recordstate);
+ this.form.recordstate = 1;
+ const apiMethod = this.form.id ? allocationedit : allocationadd;
+ const response = await apiMethod(saveData);
+
+ if (response.code === 200) {
+ this.$message.success("淇濆瓨鎴愬姛");
+ if (!this.form.id && response.data && response.data.id) {
+ this.form.id = response.data.id;
+ this.$router.replace({
+ query: { ...this.$route.query, id: this.form.id }
+ });
+ }
+ } else {
+ this.$message.error("淇濆瓨澶辫触锛�" + (response.msg || "鏈煡閿欒"));
+ }
+ } catch (error) {
+ console.error("淇濆瓨澶辫触:", error);
+ this.$message.error("淇濆瓨澶辫触");
+ } finally {
+ this.saveLoading = false;
}
});
},
// 淇濆瓨鍒嗛厤璁板綍
- handleSaveAllocation() {
+ async handleSaveAllocation() {
if (!this.form.id) {
this.$message.warning("璇峰厛淇濆瓨鍩烘湰淇℃伅");
return;
}
this.saveLoading = true;
- saveAllocationRecords(this.form.id, this.allocationData.records)
- .then(response => {
- if (response.code === 200) {
- this.$message.success("鍒嗛厤璁板綍淇濆瓨鎴愬姛");
- }
- })
- .catch(error => {
- console.error("淇濆瓨鍒嗛厤璁板綍澶辫触:", error);
- this.$message.error("淇濆瓨鍒嗛厤璁板綍澶辫触");
- })
- .finally(() => {
- this.saveLoading = false;
- });
+ 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;
+ }
},
// 纭瀹屾垚鍒嗛厤
- handleConfirmAllocation() {
+ async handleConfirmAllocation() {
if (this.incompleteRecords > 0) {
this.$message.warning("璇峰厛瀹屽杽鎵�鏈夊垎閰嶈褰曠殑淇℃伅");
return;
@@ -800,117 +1087,217 @@
cancelButtonText: "鍙栨秷",
type: "warning"
})
- .then(() => {
+ .then(async () => {
this.confirmLoading = true;
- this.form.allocationStatus = "allocated";
+ this.form.allocationStatus = "1";
this.form.allocationTime = new Date()
.toISOString()
.replace("T", " ")
.substring(0, 19);
- updateOrganAllocation(this.form)
- .then(response => {
- if (response.code === 200) {
- this.$message.success("鍣ㄥ畼鍒嗛厤宸插畬鎴�");
- }
- })
- .catch(error => {
- console.error("纭鍒嗛厤澶辫触:", error);
- this.$message.error("纭鍒嗛厤澶辫触");
- })
- .finally(() => {
- this.confirmLoading = false;
- });
+ 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 || "鏈煡閿欒")
+ );
+ this.form.allocationStatus = "0";
+ this.form.allocationTime = "";
+ }
+ } catch (error) {
+ console.error("纭鍒嗛厤澶辫触:", error);
+ this.$message.error("纭鍒嗛厤澶辫触");
+ this.form.allocationStatus = "0";
+ this.form.allocationTime = "";
+ } finally {
+ this.confirmLoading = false;
+ }
})
.catch(() => {});
},
- // 涓婁紶闄勪欢
- handleUploadAttachment() {
- // 闄勪欢涓婁紶閫昏緫
- this.$message.info("闄勪欢涓婁紶鍔熻兘");
+
+ // 闄勪欢鐩稿叧鏂规硶
+ /** 闄勪欢鍙樺寲澶勭悊 */
+ handleAttachmentChange(fileList) {
+ this.attachmentFileList = fileList;
},
- // 棰勮闄勪欢
- handlePreviewAttachment(attachment) {
- // 闄勪欢棰勮閫昏緫
- this.$message.info("闄勪欢棰勮鍔熻兘");
- },
- // 涓嬭浇闄勪欢
- handleDownloadAttachment(attachment) {
- // 闄勪欢涓嬭浇閫昏緫
- this.$message.info("闄勪欢涓嬭浇鍔熻兘");
- },
- // 鍒犻櫎闄勪欢
- handleRemoveAttachment(attachment) {
- this.$confirm("纭畾瑕佸垹闄よ繖涓檮浠跺悧锛�", "鎻愮ず", {
- confirmButtonText: "纭畾",
- cancelButtonText: "鍙栨秷",
- type: "warning"
- })
- .then(() => {
+
+ /** 闄勪欢绉婚櫎澶勭悊 */
+ 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("闄勪欢鍒犻櫎鎴愬姛");
- })
- .catch(() => {});
+ }
+ }
},
- // 鑾峰彇鏂囦欢鍥炬爣
- getFileIcon(fileName) {
- const ext = fileName
- .split(".")
- .pop()
- .toLowerCase();
- const iconMap = {
- pdf: "el-icon-document",
- doc: "el-icon-document",
- docx: "el-icon-document",
- xls: "el-icon-document",
- xlsx: "el-icon-document",
- jpg: "el-icon-picture",
- jpeg: "el-icon-picture",
- png: "el-icon-picture"
+
+ /** 涓婁紶鎴愬姛澶勭悊 */
+ 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.$message.success("鏂囦欢涓婁紶鎴愬姛");
+ }
+ },
+
+ /** 涓婁紶閿欒澶勭悊 */
+ handleUploadError({ file, fileList, error }) {
+ console.error("闄勪欢涓婁紶澶辫触:", error);
+ this.$message.error("鏂囦欢涓婁紶澶辫触锛岃閲嶈瘯");
+ },
+
+ /** 鎵嬪姩鍒犻櫎闄勪欢 */
+ handleRemoveAttachment(index) {
+ this.attachments.splice(index, 1);
+ this.attachmentFileList.splice(index, 1);
+ this.$message.success("闄勪欢鍒犻櫎鎴愬姛");
+ },
+
+ /** 鏂囦欢棰勮 */
+ handlePreview(file) {
+ this.currentPreviewFile = {
+ fileName: file.fileName,
+ fileUrl: file.path || file.fileUrl,
+ fileType: this.getFileType(file.fileName)
};
- return iconMap[ext] || "el-icon-document";
+ // this.filePreviewTitle = file.fileName;
+ this.filePreviewVisible = true;
},
- // 鑾峰彇鏂囦欢绫诲瀷
+ handleDownloadAttachment(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("鏂囦欢璺緞涓嶅瓨鍦紝鏃犳硶涓嬭浇");
+ }
+ },
+
+ /** 鑾峰彇鏂囦欢绫诲瀷 */
getFileType(fileName) {
- const ext = fileName
+ if (!fileName) return "other";
+ const extension = fileName
.split(".")
.pop()
.toLowerCase();
- const typeMap = {
- pdf: "PDF",
- doc: "DOC",
- docx: "DOCX",
- xls: "XLS",
- xlsx: "XLSX",
- jpg: "JPG",
- jpeg: "JPEG",
- png: "PNG"
- };
- return typeMap[ext] || ext.toUpperCase();
+ 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";
},
- // 鏂囦欢澶у皬鏍煎紡鍖�
- formatFileSize(size) {
- if (size === 0) return "0 B";
+
+ /** 鑾峰彇鏂囦欢鍥炬爣棰滆壊 */
+ getFileIconColor(fileName) {
+ const type = this.getFileType(fileName);
+ const colorMap = {
+ image: "#67C23A",
+ pdf: "#F56C6C",
+ office: "#409EFF",
+ other: "#909399"
+ };
+ return colorMap[type] || "#909399";
+ },
+
+ /** 鑾峰彇鏂囦欢鏍囩绫诲瀷 */
+ getFileTagType(fileName) {
+ const type = this.getFileType(fileName);
+ const typeMap = {
+ image: "success",
+ pdf: "danger",
+ office: "primary",
+ other: "info"
+ };
+ return typeMap[type] || "info";
+ },
+
+ /** 鑾峰彇鏂囦欢绫诲瀷鏂囨湰 */
+ getFileTypeText(fileName) {
+ const type = this.getFileType(fileName);
+ const textMap = {
+ image: "鍥剧墖",
+ pdf: "PDF",
+ office: "鏂囨。",
+ other: "鍏朵粬"
+ };
+ return textMap[type] || "鏈煡";
+ },
+
+ /** 妫�鏌ユ槸鍚﹀彲棰勮 */
+ isPreviewable(fileName) {
+ const type = this.getFileType(fileName);
+ return ["image", "pdf"].includes(type);
+ },
+
+ /** 鑾峰彇鏂囦欢鎵╁睍鍚� */
+ 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(size) / Math.log(k));
- return parseFloat((size / Math.pow(k, i)).toFixed(2)) + " " + sizes[i];
+ const i = Math.floor(Math.log(bytes) / Math.log(k));
+ return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + " " + sizes[i];
},
- // 鏃堕棿鏍煎紡鍖�
- parseTime(time) {
- if (!time) return "";
- const date = new Date(time);
- return `${date.getFullYear()}-${(date.getMonth() + 1)
- .toString()
- .padStart(2, "0")}-${date
- .getDate()
- .toString()
- .padStart(2, "0")} ${date
- .getHours()
- .toString()
- .padStart(2, "0")}:${date
- .getMinutes()
- .toString()
- .padStart(2, "0")}`;
+
+ /** 鏃ユ湡鏃堕棿鏍煎紡鍖� */
+ 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;
+ }
}
}
};
@@ -938,6 +1325,44 @@
margin-bottom: 20px;
border-radius: 8px;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+ padding: 20px;
+ background: #fafafa;
+}
+
+.attachment-header {
+ display: flex;
+ align-items: center;
+ gap: 8px;
+ margin-bottom: 16px;
+ padding-bottom: 8px;
+ border-bottom: 1px solid #ebeef5;
+}
+
+.attachment-title {
+ font-weight: 600;
+ color: #303133;
+}
+
+.attachment-tip {
+ font-size: 12px;
+ color: #909399;
+ margin-left: auto;
+}
+
+.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;
}
.detail-title {
@@ -964,17 +1389,13 @@
}
.stat-label {
- /* font-size: 12px; */
opacity: 0.9;
-
- /* color: #606266; */
margin-bottom: 5px;
}
.stat-value {
font-size: 20px;
font-weight: bold;
- /* color: #303133; */
}
/* 绌虹姸鎬佹牱寮� */
diff --git a/src/views/business/allocation/index.vue b/src/views/business/allocation/index.vue
index 17bbc59..b2cdf06 100644
--- a/src/views/business/allocation/index.vue
+++ b/src/views/business/allocation/index.vue
@@ -121,12 +121,7 @@
prop="donorno"
width="120"
/>
- <el-table-column
- label="濮撳悕"
- align="center"
- prop="name"
- width="100"
- />
+ <el-table-column label="濮撳悕" align="center" prop="name" width="100" />
<el-table-column
label="浣忛櫌鍙�"
align="center"
@@ -263,7 +258,7 @@
</template>
<script>
-import { allocationList, } from "@/api/businessApi";
+import { allocationList } from "@/api/businessApi";
import Pagination from "@/components/Pagination";
export default {
@@ -315,9 +310,14 @@
delete params.allocationTimeRange;
// 濡傛灉鏈夋椂闂磋寖鍥村弬鏁�
- if (this.queryParams.allocationTimeRange && this.queryParams.allocationTimeRange.length === 2) {
- params.allocationTimeStart = this.queryParams.allocationTimeRange[0] + ' 00:00:00';
- params.allocationTimeEnd = this.queryParams.allocationTimeRange[1] + ' 23:59:59';
+ if (
+ this.queryParams.allocationTimeRange &&
+ this.queryParams.allocationTimeRange.length === 2
+ ) {
+ params.allocationTimeStart =
+ this.queryParams.allocationTimeRange[0] + " 00:00:00";
+ params.allocationTimeEnd =
+ this.queryParams.allocationTimeRange[1] + " 23:59:59";
}
allocationList(params)
@@ -357,7 +357,7 @@
handleView(row) {
this.$router.push({
path: "/case/allocationInfo",
- query: { id: row.infoid }
+ query: { id: row.id, infoid: row.infoid }
});
},
// 鏂板鎸夐挳鎿嶄綔
@@ -366,15 +366,15 @@
},
// 淇敼鎸夐挳鎿嶄綔
handleUpdate(row) {
- const id = row.infoid || this.ids[0];
this.$router.push({
path: "/case/allocationInfo",
- query: { id: id }
+ query: { id: row.id, infoid: row.infoid }
});
},
// 鍒犻櫎鎸夐挳鎿嶄綔
handleDelete(row) {
- const selectedRow = row || (this.selectedRows.length === 1 ? this.selectedRows[0] : null);
+ const selectedRow =
+ row || (this.selectedRows.length === 1 ? this.selectedRows[0] : null);
if (!selectedRow) {
this.$message.warning("璇烽�夋嫨涓�鏉¤褰�");
return;
diff --git a/src/views/business/assess/assessInfo.vue b/src/views/business/assess/assessInfo.vue
index 36cdba3..36453c1 100644
--- a/src/views/business/assess/assessInfo.vue
+++ b/src/views/business/assess/assessInfo.vue
@@ -428,7 +428,7 @@
assessAdd
} from "@/api/businessApi/index";
import FilePreviewDialog from "@/components/FilePreviewDialog";
-import OrganAssessmentForm from "./components/OrganAssessmentForm.vue";
+import OrganAssessmentForm from "@/components/assessInfoComponents/OrganAssessmentForm.vue";
export default {
name: "AssessmentDetail",
diff --git a/src/views/business/course/components/DeathJudgmentStage.vue b/src/views/business/course/components/DeathJudgmentStage.vue
index b72f626..ce25f7f 100644
--- a/src/views/business/course/components/DeathJudgmentStage.vue
+++ b/src/views/business/course/components/DeathJudgmentStage.vue
@@ -4,14 +4,70 @@
<!-- 鍩虹淇℃伅 -->
<div slot="header" class="clearfix">
<span class="detail-title">姝讳骸鍒ゅ畾鍩烘湰淇℃伅</span>
+ <el-button
+ v-if="isEdit"
+ type="success"
+ style="float: right"
+ @click="handleSave"
+ :loading="saveLoading"
+ >
+ 淇濆瓨淇℃伅
+ </el-button>
+ <el-button
+ v-else
+ type="primary"
+ style="float: right"
+ @click="handleEdit"
+ >
+ 缂栬緫淇℃伅
+ </el-button>
</div>
<el-form :model="form" ref="form" :rules="rules" label-width="120px">
<el-row :gutter="20">
<el-col :span="8">
- <el-form-item label="姝讳骸鍘熷洜" prop="deathReason">
+ <el-form-item label="鎹愮尞鑰呯紪鍙�" prop="donorno">
+ <el-input
+ v-model="form.donorno"
+ :readonly="!isEdit"
+ placeholder="鑷姩鐢熸垚鎹愮尞鑰呯紪鍙�"
+ />
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="鎹愮尞鑰呭鍚�" prop="name">
+ <el-input v-model="form.name" :readonly="!isEdit" />
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="鎬у埆" prop="sex">
<el-select
- v-model="form.deathReason"
+ v-model="form.sex"
+ :disabled="!isEdit"
+ style="width: 100%"
+ >
+ <el-option label="鐢�" value="1" />
+ <el-option label="濂�" value="2" />
+ </el-select>
+ </el-form-item>
+ </el-col>
+ </el-row>
+
+ <el-row :gutter="20">
+ <el-col :span="8">
+ <el-form-item label="骞撮緞" prop="age">
+ <el-input v-model="form.age" :readonly="!isEdit" />
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="鐤剧梾璇婃柇" prop="diagnosisname">
+ <el-input v-model="form.diagnosisname" :readonly="!isEdit" />
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="姝讳骸鍘熷洜" prop="deathreason">
+ <el-select
+ v-model="form.deathreason"
:disabled="!isEdit"
style="width: 100%"
>
@@ -25,9 +81,9 @@
<el-row :gutter="20">
<el-col :span="8">
- <el-form-item label="姝讳骸鏃堕棿" prop="deathTime">
+ <el-form-item label="姝讳骸鏃堕棿" prop="deathtime">
<el-date-picker
- v-model="form.deathTime"
+ v-model="form.deathtime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
style="width: 100%"
@@ -36,20 +92,63 @@
</el-form-item>
</el-col>
<el-col :span="8">
- <el-form-item label="鍒ゅ畾鍖荤敓涓�" prop="judgmentDoctor">
- <el-input v-model="form.judgmentDoctorone" :readonly="!isEdit" />
+ <el-form-item label="鍒ゅ畾鍖荤敓涓�" prop="deathjudgedocto">
+ <el-input v-model="form.deathjudgedocto" :readonly="!isEdit" />
</el-form-item>
</el-col>
<el-col :span="8">
- <el-form-item label="鍒ゅ畾鍖荤敓浜�" prop="judgmentDoctor">
- <el-input v-model="form.judgmentDoctortwo" :readonly="!isEdit" />
+ <el-form-item label="鍒ゅ畾鍖荤敓浜�" prop="deathjudgedoctt">
+ <el-input v-model="form.deathjudgedoctt" :readonly="!isEdit" />
</el-form-item>
</el-col>
</el-row>
- <el-row>
+
+ <el-row :gutter="20">
<el-col :span="8">
- <el-form-item label="鐧昏浜�" prop="registrant">
- <el-input v-model="form.registrant" :readonly="!isEdit" />
+ <el-form-item label="鍣ㄥ畼鑾峰彇鏈烘瀯" prop="gainhospitalname">
+ <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-row :gutter="20">
+ <el-col :span="8">
+ <el-form-item label="璐熻矗浜�" prop="responsibleusername">
+ <el-input
+ v-model="form.responsibleusername"
+ :readonly="!isEdit"
+ />
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="璁板綍鐘舵��" prop="recordstate">
+ <el-tag :type="getStatusTag(form.recordstate)">
+ {{ getStatusText(form.recordstate) }}
+ </el-tag>
</el-form-item>
</el-col>
</el-row>
@@ -70,7 +169,7 @@
<el-card class="attachment-card">
<div slot="header" class="clearfix">
<span class="detail-title">姝讳骸鍒ゅ畾璇勪及琛ㄩ檮浠�</span>
- <el-button
+ <!-- <el-button
v-if="isEdit"
type="primary"
size="mini"
@@ -78,7 +177,7 @@
:loading="uploadLoading"
>
涓婁紶闄勪欢
- </el-button>
+ </el-button> -->
</div>
<!-- 闄勪欢绫诲瀷閫夐」鍗� -->
@@ -203,12 +302,14 @@
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"
>
<i class="el-icon-upload"></i>
@@ -236,13 +337,17 @@
</template>
<script>
-import {
- getDeathJudgmentDetail,
- updateDeathJudgment
-} from "./api/mockDeathJudgmentApi";
+import { deathinfoedit, queryDathInfoBaseInfo } from "@/api/businessApi";
+import { getToken } from "@/utils/auth";
export default {
name: "DeathJudgmentDetail",
+ props: {
+ infoid: {
+ type: String,
+ default: true
+ }
+ },
data() {
return {
// 鏄惁缂栬緫妯″紡
@@ -252,31 +357,39 @@
// 琛ㄥ崟鏁版嵁
form: {
id: undefined,
- hospitalNo: "",
- donorName: "",
- gender: "",
+ infoid: undefined,
+ donorno: "",
+ name: "",
+ sex: "",
age: "",
- diagnosis: "",
- deathReason: "",
- deathTime: "",
- judgmentDoctor: "",
- judgmentDescription: "",
- registrant: "",
- registrationTime: ""
+ diagnosisname: "",
+ deathreason: "",
+ deathtime: "",
+ deathjudgedocto: "",
+ deathjudgedoctt: "",
+ gainhospitalno: "",
+ gainhospitalname: "",
+ isspendremember: 0,
+ isrestoreremains: 0,
+ rememberannex: "",
+ responsibleuserid: "",
+ responsibleusername: "",
+ recordstate: "0",
+ judgmentDescription: ""
},
// 琛ㄥ崟楠岃瘉瑙勫垯
rules: {
- donorName: [
+ name: [
{ required: true, message: "鎹愮尞鑰呭鍚嶄笉鑳戒负绌�", trigger: "blur" }
],
- deathReason: [
+ deathreason: [
{ required: true, message: "姝讳骸鍘熷洜涓嶈兘涓虹┖", trigger: "change" }
],
- deathTime: [
+ deathtime: [
{ required: true, message: "姝讳骸鏃堕棿涓嶈兘涓虹┖", trigger: "change" }
],
- judgmentDoctor: [
- { required: true, message: "鍒ゅ畾鍖荤敓涓嶈兘涓虹┖", trigger: "blur" }
+ deathjudgedocto: [
+ { required: true, message: "鍒ゅ畾鍖荤敓涓�涓嶈兘涓虹┖", trigger: "blur" }
]
},
// 闄勪欢鐩稿叧鏁版嵁
@@ -286,7 +399,10 @@
uploadLoading: false,
tempFileList: [],
currentUploadType: "",
-
+ uploadAction: process.env.VUE_APP_BASE_API + "/common/upload",
+ headers: {
+ Authorization: "Bearer " + getToken()
+ },
// 璇勪及琛ㄧ被鍨嬪畾涔�
attachmentTypes: [
{ value: "1", label: "鑴戞浜″垽瀹氳〃" },
@@ -311,58 +427,89 @@
}
},
created() {
- const id = this.$route.query.id;
- this.isEdit =
- this.$route.path.includes("/edit") || this.$route.path.includes("/add");
- if (id && !this.$route.path.includes("/add")) {
- this.getDetail(id);
- } else if (this.$route.path.includes("/add")) {
- this.generateHospitalNo();
- }
+ this.getDetail(this.infoid);
this.getAttachmentList();
},
methods: {
- // 鐢熸垚浣忛櫌鍙�
- generateHospitalNo() {
- // 妯℃嫙鐢熸垚浣忛櫌鍙凤細D + 鏃堕棿鎴冲悗6浣�
+ // 鐢熸垚鎹愮尞鑰呯紪鍙�
+ generateDonorNo() {
const timestamp = Date.now().toString();
- this.form.hospitalNo = "D" + timestamp.slice(-6);
+ this.form.donorno = "DONOR" + timestamp.slice(-8);
},
// 鑾峰彇璇︽儏
- getDetail(id) {
- getDeathJudgmentDetail(id).then(response => {
- if (response.code === 200) {
- this.form = response.data;
+ async getDetail(id) {
+ try {
+ const response = await queryDathInfoBaseInfo({ infoid: id });
+ let realData = {};
+
+ if (response && response.data) {
+ realData = response.data[0];
+ } else if (response) {
+ realData = response;
}
- });
+
+ // 鏄犲皠瀛楁鍒拌〃鍗�
+ this.form = {
+ ...this.form,
+ ...realData,
+ // 纭繚鏁板�肩被鍨嬪瓧娈垫纭浆鎹�
+ isspendremember: realData.isspendremember
+ ? parseInt(realData.isspendremember)
+ : 0,
+ isrestoreremains: realData.isrestoreremains
+ ? parseInt(realData.isrestoreremains)
+ : 0
+ };
+
+ // 瑙f瀽闄勪欢淇℃伅
+ if (realData.rememberannex) {
+ this.parseAttachmentData(realData.rememberannex);
+ }
+ } catch (error) {
+ console.error("鑾峰彇姝讳骸鍒ゅ畾璇︽儏澶辫触:", error);
+ this.$message.error("鏁版嵁鍔犺浇澶辫触");
+ }
+ },
+ // 瑙f瀽闄勪欢鏁版嵁
+ parseAttachmentData(attachmentJson) {
+ try {
+ if (attachmentJson) {
+ const attachments = JSON.parse(attachmentJson);
+ if (Array.isArray(attachments)) {
+ this.attachmentList = attachments;
+ }
+ }
+ } catch (error) {
+ console.error("瑙f瀽闄勪欢鏁版嵁澶辫触:", error);
+ }
+ },
+ // 鏋勫缓闄勪欢JSON鏁版嵁
+ buildAttachmentJson() {
+ return JSON.stringify(this.attachmentList);
+ },
+ // 鑾峰彇鐘舵�佹爣绛炬牱寮�
+ getStatusTag(status) {
+ const statusMap = {
+ "0": "warning", // 缁存姢涓�
+ "1": "success", // 宸插畬鎴�
+ "99": "danger" // 宸茬粓姝�
+ };
+ return statusMap[status] || "info";
+ },
+ // 鑾峰彇鐘舵�佹枃鏈�
+ getStatusText(status) {
+ const textMap = {
+ "0": "缁存姢涓�",
+ "1": "宸插畬鎴�",
+ "99": "宸茬粓姝�"
+ };
+ return textMap[status] || "鏈煡鐘舵��";
},
// 鑾峰彇闄勪欢鍒楄〃
getAttachmentList() {
this.attachmentLoading = true;
- // 妯℃嫙闄勪欢鏁版嵁 - 瀹為檯椤圭洰涓粠鎺ュ彛鑾峰彇
+ // 瀹為檯椤圭洰涓粠鎺ュ彛鑾峰彇闄勪欢鏁版嵁
setTimeout(() => {
- this.attachmentList = [
- {
- id: 1,
- type: "1",
- typeName: "鑴戞浜″垽瀹氳〃",
- fileName: "鑴戞浜″垽瀹氳〃_202512001.pdf",
- fileSize: 2548321,
- uploadTime: "2025-12-01 10:30:00",
- uploader: "寮犲尰鐢�",
- fileUrl: "/attachments/brain_death_1.pdf"
- },
- {
- id: 2,
- type: "2",
- typeName: "鑴戠數鍥捐瘎浼拌〃",
- fileName: "鑴戠數鍥捐瘎浼拌〃_202512001.docx",
- fileSize: 512345,
- uploadTime: "2025-12-01 14:20:00",
- uploader: "鏉庡尰鐢�",
- fileUrl: "/attachments/eeg_1.docx"
- }
- ];
this.attachmentLoading = false;
}, 500);
},
@@ -413,7 +560,6 @@
const maxSize = 10 * 1024 * 1024; // 10MB
- // 鏍¢獙鏂囦欢绫诲瀷
const isTypeOk =
allowedTypes.includes(file.type) ||
file.name.endsWith(".pdf") ||
@@ -432,7 +578,6 @@
return false;
}
- // 鏍¢獙鏂囦欢澶у皬
if (file.size > maxSize) {
this.$message.error("鏂囦欢澶у皬涓嶈兘瓒呰繃10MB");
return false;
@@ -448,17 +593,11 @@
handleTempRemove(file, fileList) {
this.tempFileList = fileList;
},
- // 鎻愪氦涓婁紶
- async submitUpload() {
- if (this.tempFileList.length === 0) {
- this.$message.warning("璇峰厛閫夋嫨瑕佷笂浼犵殑鏂囦欢");
- return;
- }
-
- this.uploadLoading = true;
-
- try {
- // 妯℃嫙涓婁紶杩囩▼ - 瀹為檯椤圭洰涓皟鐢ㄤ笂浼犳帴鍙�
+ /** 涓婁紶鎴愬姛澶勭悊 */
+ handleUploadSuccess(response, file, fileList) {
+ if (response.code === 200) {
+ file.url = response.data || response.url;
+ this.$message.success("鏂囦欢涓婁紶鎴愬姛");
for (const file of this.tempFileList) {
const newAttachment = {
id: Date.now() + Math.random(),
@@ -468,21 +607,60 @@
fileSize: file.size,
uploadTime: new Date().toISOString(),
uploader: "褰撳墠鐢ㄦ埛",
- fileUrl: URL.createObjectURL(file.raw)
+ fileUrl: file.url
};
this.attachmentList.push(newAttachment);
}
+ // 鏇存柊闄勪欢JSON鏁版嵁鍒拌〃鍗�
+ this.form.rememberannex = this.buildAttachmentJson();
+
this.$message.success("鏂囦欢涓婁紶鎴愬姛");
this.uploadDialogVisible = false;
- this.tempFileList = [];
- } catch (error) {
- this.$message.error("鏂囦欢涓婁紶澶辫触");
- console.error("涓婁紶澶辫触:", error);
- } finally {
this.uploadLoading = false;
+ this.tempFileList = [];
+ } else {
+ this.$message.error(response.msg || "鏂囦欢涓婁紶澶辫触");
}
+ },
+ // 鎻愪氦涓婁紶
+ async submitUpload() {
+ if (this.tempFileList.length === 0) {
+ this.$message.warning("璇峰厛閫夋嫨瑕佷笂浼犵殑鏂囦欢");
+ return;
+ }
+ this.$refs.uploadRef.submit();
+ this.uploadLoading = true;
+
+ // try {
+ // for (const file of this.tempFileList) {
+ // const newAttachment = {
+ // id: Date.now() + Math.random(),
+ // type: this.currentUploadType,
+ // typeName: this.getCurrentTypeLabel,
+ // fileName: file.name,
+ // fileSize: file.size,
+ // uploadTime: new Date().toISOString(),
+ // uploader: "褰撳墠鐢ㄦ埛",
+ // fileUrl: URL.createObjectURL(file.raw)
+ // };
+
+ // this.attachmentList.push(newAttachment);
+ // }
+
+ // // 鏇存柊闄勪欢JSON鏁版嵁鍒拌〃鍗�
+ // this.form.rememberannex = this.buildAttachmentJson();
+
+ // this.$message.success("鏂囦欢涓婁紶鎴愬姛");
+ // this.uploadDialogVisible = false;
+ // this.tempFileList = [];
+ // } catch (error) {
+ // this.$message.error("鏂囦欢涓婁紶澶辫触");
+ // console.error("涓婁紶澶辫触:", error);
+ // } finally {
+ // this.uploadLoading = false;
+ // }
},
// 鍒犻櫎闄勪欢
handleRemoveAttachment(attachment) {
@@ -497,6 +675,8 @@
);
if (index !== -1) {
this.attachmentList.splice(index, 1);
+ // 鏇存柊闄勪欢JSON鏁版嵁鍒拌〃鍗�
+ this.form.rememberannex = this.buildAttachmentJson();
this.$message.success("璇勪及琛ㄥ垹闄ゆ垚鍔�");
}
})
@@ -521,38 +701,48 @@
},
// 涓嬭浇闄勪欢
handleDownload(attachment) {
- // 瀹為檯椤圭洰涓皟鐢ㄤ笅杞芥帴鍙�
const link = document.createElement("a");
link.href = attachment.fileUrl;
link.download = attachment.fileName;
link.click();
this.$message.success(`寮�濮嬩笅杞�: ${attachment.fileName}`);
},
+ // 缂栬緫淇℃伅
+ handleEdit() {
+ this.isEdit = true;
+ },
// 淇濆瓨淇℃伅
- handleSave() {
- this.$refs.form.validate(valid => {
+ async handleSave() {
+ this.$refs.form.validate(async valid => {
if (valid) {
this.saveLoading = true;
- // 妯℃嫙淇濆瓨杩囩▼
- updateDeathJudgment(this.form)
- .then(response => {
- if (response.code === 200) {
- this.$message.success("淇濆瓨鎴愬姛");
- if (this.$route.path.includes("/add")) {
- this.$router.push("/case/deathJudgment");
- } else {
- this.isEdit = false;
- }
+ try {
+ // 鏋勫缓鎻愪氦鏁版嵁
+ const submitData = {
+ ...this.form,
+ // 纭繚闄勪欢鏁版嵁鏈�鏂�
+ rememberannex: this.buildAttachmentJson()
+ };
+
+ const response = await deathinfoedit(submitData);
+
+ if (response.code === 200) {
+ this.$message.success("淇濆瓨鎴愬姛");
+ this.isEdit = false;
+
+ if (this.$route.path.includes("/add")) {
+ this.$router.push("/case/deathJudgment");
}
- })
- .catch(error => {
- console.error("淇濆瓨澶辫触:", error);
- this.$message.error("淇濆瓨澶辫触");
- })
- .finally(() => {
- this.saveLoading = false;
- });
+ } else {
+ this.$message.error(response.message || "淇濆瓨澶辫触");
+ }
+ } catch (error) {
+ console.error("淇濆瓨澶辫触:", error);
+ this.$message.error("淇濆瓨澶辫触");
+ } finally {
+ this.saveLoading = false;
+ }
}
});
},
diff --git a/src/views/business/course/components/DonationConfirmStage.vue b/src/views/business/course/components/DonationConfirmStage.vue
index d28a24c..8f69cb6 100644
--- a/src/views/business/course/components/DonationConfirmStage.vue
+++ b/src/views/business/course/components/DonationConfirmStage.vue
@@ -5,87 +5,192 @@
<div slot="header" class="clearfix">
<span class="detail-title">鎹愮尞纭鍩烘湰淇℃伅</span>
<el-button
- v-if="$route.query.confirm"
- type="primary"
- style="float: right; padding: 3px 0"
+ type="success"
+ style="float: right;"
@click="handleSave"
+ :loading="saveLoading"
>
淇濆瓨纭淇℃伅
</el-button>
</div>
<el-form :model="form" ref="form" label-width="120px">
-
<el-row :gutter="20">
<el-col :span="8">
- <el-form-item label="鍗忚皟鍛�1" prop="coordinator1">
- <el-input v-model="form.coordinator1" :readonly="!isEdit" />
+ <el-form-item label="浣忛櫌鍙�" prop="caseNo">
+ <el-input v-model="form.caseNo" />
</el-form-item>
</el-col>
<el-col :span="8">
- <el-form-item label="鍗忚皟鍛�2" prop="coordinator2">
- <el-input v-model="form.coordinator2" :readonly="!isEdit" />
+ <el-form-item label="鎹愮尞鑰呭鍚�" prop="name">
+ <el-input v-model="form.name" />
</el-form-item>
</el-col>
<el-col :span="8">
- <el-form-item label="涓氬姟浜哄憳" prop="assignee">
- <el-input v-model="form.assignee" :readonly="!isEdit" />
+ <el-form-item label="鎬у埆" prop="sex">
+ <el-select v-model="form.sex" style="width: 100%">
+ <el-option label="鐢�" value="1" />
+ <el-option label="濂�" value="2" />
+ </el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="8">
- <el-form-item label="纭鐘舵��" prop="confirmationStatus">
+ <el-form-item label="骞撮緞" prop="age">
+ <el-input v-model="form.age" />
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="鐤剧梾璇婃柇" prop="diagnosisname">
+ <el-input v-model="form.diagnosisname" />
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="鎵�鍦ㄥ尰鐤楁満鏋�" prop="treatmenthospitalname">
+ <el-input v-model="form.treatmenthospitalname" />
+ </el-form-item>
+ </el-col>
+ </el-row>
+
+ <el-row :gutter="20">
+ <el-col :span="8">
+ <el-form-item label="鍗忚皟鍛�1" prop="coordinatedusernameo">
+ <el-input v-model="form.coordinatedusernameo" />
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="鍗忚皟鍛�2" prop="coordinatedusernamet">
+ <el-input v-model="form.coordinatedusernamet" />
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="涓氬姟浜哄憳" prop="responsibleusername">
+ <el-input v-model="form.responsibleusername" />
+ </el-form-item>
+ </el-col>
+ </el-row>
+
+ <el-row :gutter="20">
+ <!-- <el-col :span="8">
+ <el-form-item label="纭鐘舵��" prop="relativeconfirmationsign">
<el-select
- v-model="form.confirmationStatus"
- :disabled="!isEdit"
+ 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-col> -->
<el-col :span="8">
- <el-form-item label="纭鏃堕棿" prop="confirmationTime">
+ <el-form-item label="绛惧瓧鏃堕棿" prop="signdate">
<el-date-picker
- v-model="form.confirmationTime"
+ v-model="form.signdate"
type="datetime"
- value-format="yyyy-MM-dd HH:mm:ss"
+ value-format="yyyy-MM-dd"
style="width: 100%"
- :disabled="!isEdit"
+ />
+ </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-form-item label="瀹跺睘鎰忚澶囨敞" prop="familyRemark">
+ <el-row>
+ <el-form-item label-width="100px" label="鎹愮尞鍐冲畾">
+ <el-checkbox-group v-model="organdecision">
+ <el-checkbox
+ v-for="item in organselection"
+ :key="item"
+ :label="item"
+ >{{ item }}
+ </el-checkbox>
+ </el-checkbox-group>
+ <el-input
+ v-if="organdecision.includes('鍏朵粬')"
+ v-model="organdecisionOther"
+ placeholder="璇疯緭鍏ュ叾浠栨崘鐚喅瀹氱殑鍏蜂綋鍐呭"
+ style="margin-top: 10px; width: 300px;"
+ ></el-input>
+ </el-form-item>
+ </el-row>
+
+ <el-form-item label="瀹跺睘鎰忚澶囨敞" prop="relativeRemark">
<el-input
type="textarea"
:rows="3"
- v-model="form.familyRemark"
- :readonly="!isEdit"
+ v-model="form.relativeRemark"
placeholder="璁板綍瀹跺睘鐨勬剰瑙佸拰娌熼�氭儏鍐�"
/>
</el-form-item>
</el-form>
</el-card>
- <!-- 闄勪欢鍒楄〃 -->
+ <!-- 闄勪欢淇℃伅 - 鎸夌被鍨嬪垎绫� -->
<el-card class="attachment-card">
<div slot="header" class="clearfix">
<span class="detail-title">鐩稿叧闄勪欢涓婁紶</span>
- <el-button
- v-if="isEdit"
- type="primary"
- size="mini"
- @click="handleSaveAll"
- :loading="saveLoading"
- >
- 淇濆瓨鎵�鏈夐檮浠�
- </el-button>
</div>
<!-- 闄勪欢绫诲瀷閫夐」鍗� -->
@@ -96,8 +201,8 @@
:label="type.label"
:name="type.value"
>
- <div class="attachment-upload-section">
- <div class="upload-header">
+ <div class="attachment-section">
+ <div class="attachment-header">
<span class="upload-title">{{ type.label }}</span>
<el-tooltip content="鐐瑰嚮涓婁紶璇ョ被鍨嬮檮浠�" placement="top">
<el-button
@@ -105,97 +210,87 @@
type="primary"
icon="el-icon-plus"
@click="openUploadDialog(type.value)"
- :disabled="!isEdit"
>
娣诲姞闄勪欢
</el-button>
</el-tooltip>
</div>
- <!-- 闄勪欢鍒楄〃 -->
- <el-table
- :data="getAttachmentsByType(type.value)"
- v-loading="attachmentLoading"
- style="width: 100%; margin-top: 15px;"
- >
- <el-table-column label="鏂囦欢鍚嶇О" min-width="200">
- <template slot-scope="scope">
- <div class="file-info">
+ <!-- 褰撳墠绫诲瀷鐨勯檮浠跺垪琛� -->
+ <div class="attachment-list">
+ <el-table
+ :data="getAttachmentsByType(type.value)"
+ size="small"
+ v-loading="attachmentLoading"
+ style="width: 100%;"
+ >
+ <el-table-column label="鏂囦欢鍚�" min-width="200">
+ <template slot-scope="scope">
<i
class="el-icon-document"
- style="margin-right: 8px; color: #409EFF;"
+ style="color: #409EFF; margin-right: 8px;"
></i>
- <span>{{ scope.row.fileName }}</span>
- </div>
- </template>
- </el-table-column>
+ <span class="file-name">{{ scope.row.fileName }}</span>
+ </template>
+ </el-table-column>
- <el-table-column label="鏂囦欢澶у皬" width="100" align="center">
- <template slot-scope="scope">
- <span>{{ formatFileSize(scope.row.fileSize) }}</span>
- </template>
- </el-table-column>
+ <el-table-column label="鏂囦欢绫诲瀷" width="100" align="center">
+ <template slot-scope="scope">
+ <el-tag size="small">{{
+ getFileType(scope.row.fileName)
+ }}</el-tag>
+ </template>
+ </el-table-column>
- <el-table-column label="涓婁紶鏃堕棿" width="160" align="center">
- <template slot-scope="scope">
- <span>{{ parseTime(scope.row.uploadTime) }}</span>
- </template>
- </el-table-column>
+ <el-table-column label="鏂囦欢澶у皬" width="100" align="center">
+ <template slot-scope="scope">
+ <span>{{ formatFileSize(scope.row.fileSize) }}</span>
+ </template>
+ </el-table-column>
- <el-table-column label="涓婁紶浜�" width="100" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.uploader }}</span>
- </template>
- </el-table-column>
+ <el-table-column label="涓婁紶鏃堕棿" width="160" align="center">
+ <template slot-scope="scope">
+ <span>{{ formatDateTime(scope.row.uploadTime) }}</span>
+ </template>
+ </el-table-column>
- <el-table-column
- label="鎿嶄綔"
- width="120"
- align="center"
- v-if="isEdit"
+ <el-table-column label="鎿嶄綔" width="150" align="center">
+ <template slot-scope="scope">
+ <el-button
+ size="mini"
+ type="primary"
+ @click="handlePreview(scope.row)"
+ >
+ 棰勮
+ </el-button>
+ <el-button
+ size="mini"
+ type="danger"
+ @click="handleRemoveAttachment(type.value, scope.$index)"
+ >
+ 鍒犻櫎
+ </el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+
+ <!-- 绌虹姸鎬佹彁绀� -->
+ <div
+ v-if="getAttachmentsByType(type.value).length === 0"
+ class="empty-attachment"
>
- <template slot-scope="scope">
- <el-button
- size="mini"
- type="text"
- icon="el-icon-view"
- @click="handlePreview(scope.row)"
- >棰勮</el-button
- >
- <el-button
- size="mini"
- type="text"
- icon="el-icon-delete"
- style="color: #F56C6C;"
- @click="handleRemoveAttachment(scope.row, type.value)"
- >鍒犻櫎</el-button
- >
- </template>
- </el-table-column>
-
- <el-table-column label="鎿嶄綔" width="80" align="center" v-else>
- <template slot-scope="scope">
- <el-button
- size="mini"
- type="text"
- icon="el-icon-view"
- @click="handlePreview(scope.row)"
- >棰勮</el-button
- >
- </template>
- </el-table-column>
- </el-table>
-
- <div
- v-if="getAttachmentsByType(type.value).length === 0"
- class="empty-attachment"
- >
- <el-empty description="鏆傛棤闄勪欢" :image-size="80"></el-empty>
+ <el-empty
+ :description="`鏆傛棤${type.label}闄勪欢`"
+ :image-size="80"
+ ></el-empty>
+ </div>
</div>
</div>
</el-tab-pane>
</el-tabs>
</el-card>
+
+ <!-- 涓婁紶瀵硅瘽妗� -->
<el-dialog
:title="`涓婁紶${getCurrentTypeLabel}闄勪欢`"
:visible.sync="uploadDialogVisible"
@@ -234,17 +329,33 @@
</el-button>
</span>
</el-dialog>
+
+ <!-- 鏂囦欢棰勮寮圭獥 -->
+ <FilePreviewDialog
+ :visible="previewVisible"
+ :file="currentPreviewFile"
+ @close="previewVisible = false"
+ @download="handleDownload"
+ />
</div>
</template>
<script>
-import {
- getConfirmationDetail,
- updateConfirmation
-} from "./api/mockConfirmationApi";
+import { relativesList, relativesEdit } from "@/api/businessApi";
+import FilePreviewDialog from "@/components/FilePreviewDialog";
export default {
name: "ConfirmationDetail",
+ components: {
+ FilePreviewDialog
+ },
+ props: {
+ infoid: {
+ type: String,
+ default: true
+ }
+ },
+ dicts: ["sys_FamilyRelation"],
data() {
return {
// 鏄惁缂栬緫妯″紡
@@ -252,28 +363,53 @@
// 琛ㄥ崟鏁版嵁
form: {
id: undefined,
+ infoid: undefined,
caseNo: "",
- donorName: "",
- gender: "",
+ name: "",
+ sex: "",
age: "",
- diagnosis: "",
- hospitalName: "",
- coordinator1: "",
- coordinator2: "",
- assignee: "",
- confirmationStatus: "0",
- confirmationTime: "",
- familyRemark: ""
+ diagnosisname: "",
+ treatmenthospitalname: "",
+ coordinatedusernameo: "",
+ coordinatedusernamet: "",
+ responsibleusername: "",
+ relativeconfirmationsign: "0",
+ signdate: "",
+ relativeconfirmationsignname: "",
+ signfamilyrelations: "",
+ relativeidcardno: "",
+ relativephone: "",
+ relativeRemark: "",
+ assessannex: "" // JSON瀛楃涓插瓨鍌ㄦ墍鏈夐檮浠�
},
- // 闄勪欢鍒楄〃
+ organdecision: [],
+ organdecisionOther: "",
+ organselection: [
+ "鑲濊剰",
+ "鍙岃偩",
+ "宸﹁偩",
+ "鍙宠偩",
+ "蹇冭剰",
+ "鑲鸿剰",
+ "鑳拌吅",
+ "灏忚偁",
+ "鍙岀溂缁勭粐",
+ "閬椾綋",
+ "鍏朵粬"
+ ],
+ // 鍔犺浇鐘舵��
+ loading: false,
+ saveLoading: false,
// 闄勪欢鐩稿叧鏁版嵁
activeAttachmentType: "1",
attachmentLoading: false,
uploadDialogVisible: false,
uploadLoading: false,
- saveLoading: false,
tempFileList: [],
currentUploadType: "",
+ // 棰勮鐩稿叧
+ previewVisible: false,
+ currentPreviewFile: null,
// 闄勪欢绫诲瀷瀹氫箟
attachmentTypes: [
@@ -285,36 +421,18 @@
{ value: "6", label: "蹇冩浜″垽瀹氱煡鎯呭悓鎰忎功" }
],
- // 闄勪欢鍒楄〃鏁版嵁
- attachmentList: [
- // 妯℃嫙鏁版嵁 - 瀹為檯椤圭洰涓粠鎺ュ彛鑾峰彇
- {
- id: 1,
- type: "1",
- typeName: "浜轰綋鍣ㄥ畼娼滃湪鎹愮尞鑰呯櫥璁拌〃",
- fileName: "娼滃湪鎹愮尞鑰呯櫥璁拌〃_202512001.pdf",
- fileSize: 2548321,
- uploadTime: "2025-12-01 10:30:00",
- uploader: "寮犱笁",
- fileUrl: "/attachments/1.pdf"
- },
- {
- id: 2,
- type: "1",
- typeName: "浜轰綋鍣ㄥ畼娼滃湪鎹愮尞鑰呯櫥璁拌〃",
- fileName: "琛ュ厖璇存槑.docx",
- fileSize: 512345,
- uploadTime: "2025-12-01 14:20:00",
- uploader: "鏉庡洓",
- fileUrl: "/attachments/2.docx"
- }
- ]
+ // 闄勪欢鏁版嵁缁撴瀯 - 鎸夌被鍨嬪垎寮�瀛樺偍
+ attachmentData: {
+ "1": [], // 绫诲瀷1鐨勯檮浠跺垪琛�
+ "2": [],
+ "3": [],
+ "4": [],
+ "5": [],
+ "6": []
+ }
};
},
computed: {
- isEdit() {
- return this.$route.query.confirm === "true";
- },
getCurrentTypeLabel() {
const type = this.attachmentTypes.find(
t => t.value === this.currentUploadType
@@ -323,113 +441,125 @@
}
},
created() {
- const id = this.$route.query.id;
this.isEdit = this.$route.query.confirm === "true";
- if (id) {
- this.getDetail(id);
+ console.log(this.infoid, "this.infoid");
+
+ if (this.infoid) {
+ console.log(1);
+
+ this.getDetail(this.infoid);
}
- this.getAttachmentList();
},
methods: {
// 鑾峰彇璇︽儏
- getDetail(id) {
- getConfirmationDetail(id).then(response => {
+ async getDetail(infoid) {
+ this.loading = true;
+ try {
+ const response = await relativesList({ infoid });
+ console.log(2);
+
if (response.code === 200) {
- this.form = response.data;
+ console.log(3);
+ this.handleDetailData(response);
+ } else {
+ this.$message.error("鑾峰彇璇︽儏澶辫触锛�" + (response.msg || "鏈煡閿欒"));
}
- });
+ } catch (error) {
+ console.error("鑾峰彇鎹愮尞纭璇︽儏澶辫触:", error);
+ this.$message.error("鑾峰彇璇︽儏澶辫触");
+ } finally {
+ this.loading = false;
+ }
},
- // 鑾峰彇闄勪欢鍒楄〃
- getAttachmentList() {
- this.attachmentLoading = true;
- // 妯℃嫙闄勪欢鏁版嵁
- this.attachmentList = [
- {
- id: 1,
- type: "1",
- typeName: "浜轰綋鍣ㄥ畼娼滃湪鎹愮尞鑰呯櫥璁拌〃",
- fileName: "娼滃湪鎹愮尞鑰呯櫥璁拌〃_202512001.pdf",
- uploadTime: "2025-12-01 10:30:00",
- uploader: "寮犱笁",
- fileSize: "2.5MB",
- fileUrl: "/attachments/1.pdf"
- },
- {
- id: 2,
- type: "2",
- typeName: "浜轰綋鍣ㄥ畼鎹愮尞浜插睘纭鐧昏琛�",
- fileName: "浜插睘纭鐧昏琛╛202512001.pdf",
- uploadTime: "2025-12-01 14:20:00",
- uploader: "鏉庡洓",
- fileSize: "1.8MB",
- fileUrl: "/attachments/2.pdf"
- },
- {
- id: 3,
- type: "3",
- typeName: "鎹愮尞鑰呭強鐩寸郴浜插睘韬唤璇併�佹埛鍙g翱鐩稿叧璇佹槑",
- fileName: "韬唤璇佹槑_202512001.zip",
- uploadTime: "2025-12-01 16:45:00",
- uploader: "鐜嬩簲",
- fileSize: "5.2MB",
- fileUrl: "/attachments/3.zip"
- },
- {
- id: 4,
- type: "4",
- typeName: "鍏皯韬晠鍚庝汉浣撳櫒瀹橈紙瑙掕啘锛夐仐浣撴崘鐚憡鐭ヤ功",
- fileName: "鎹愮尞鍛婄煡涔202512001.pdf",
- uploadTime: "2025-12-02 09:15:00",
- uploader: "寮犱笁",
- fileSize: "1.2MB",
- fileUrl: "/attachments/4.pdf"
- },
- {
- id: 5,
- type: "5",
- typeName: "鑴戞浜″垽瀹氱煡鎯呭悓鎰忎功",
- fileName: "鑴戞浜″垽瀹氬悓鎰忎功_202512001.pdf",
- uploadTime: "2025-12-02 11:30:00",
- uploader: "鏉庡洓",
- fileSize: "0.8MB",
- fileUrl: "/attachments/5.pdf"
- },
- {
- id: 6,
- type: "6",
- typeName: "蹇冩浜″垽瀹氱煡鎯呭悓鎰忎功",
- fileName: "蹇冩浜″垽瀹氬悓鎰忎功_202512001.pdf",
- uploadTime: "2025-12-02 13:20:00",
- uploader: "鐜嬩簲",
- fileSize: "0.9MB",
- fileUrl: "/attachments/6.pdf"
+
+ // 澶勭悊璇︽儏鏁版嵁
+ handleDetailData(response) {
+ let detailData = null;
+
+ // 鏍规嵁鎺ュ彛瀹為檯杩斿洖鐨勬暟鎹粨鏋勮繘琛岃皟鏁�
+ if (response.data) {
+ if (Array.isArray(response.data)) {
+ detailData = response.data[0] || {};
+ } else if (response.data.rows && Array.isArray(response.data.rows)) {
+ detailData = response.data.rows[0] || {};
+ } else if (Array.isArray(response.data.list)) {
+ detailData = response.data.list[0] || {};
+ } else {
+ detailData = response.data;
}
- ];
- this.attachmentLoading = false;
+ } else {
+ detailData = response;
+ }
+
+ // 鏄犲皠瀛楁鍒拌〃鍗�
+ this.form = {
+ ...this.form,
+ id: detailData.id || this.$route.query.id,
+ infoid: detailData.infoid || this.infoid,
+ caseNo: detailData.caseNo || "",
+ name: detailData.name || "",
+ sex: detailData.sex || "",
+ age: detailData.age || "",
+ diagnosisname: detailData.diagnosisname || "",
+ treatmenthospitalname: detailData.treatmenthospitalname || "",
+ coordinatedusernameo: detailData.coordinatedusernameo || "",
+ coordinatedusernamet: detailData.coordinatedusernamet || "",
+ responsibleusername: detailData.responsibleusername || "",
+ relativeconfirmationsign: detailData.relativeconfirmationsign || "0",
+ signdate: detailData.signdate,
+ relativeconfirmationsignname:
+ detailData.relativeconfirmationsignname || "",
+ signfamilyrelations: detailData.signfamilyrelations || "",
+ relativeidcardno: detailData.relativeidcardno || "",
+ relativephone: detailData.relativephone || "",
+ relativeRemark: detailData.relativeRemark || "",
+ assessannex: detailData.assessannex || ""
+ };
+
+ // 澶勭悊鎹愮尞鍐冲畾鏁版嵁
+ 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();
},
- // 涓嬭浇闄勪欢
- handleDownload(row) {
- // 瀹為檯椤圭洰涓繖閲岃皟鐢ㄦ枃浠朵笅杞芥帴鍙�
- this.$message.success(`涓嬭浇鏂囦欢: ${row.fileName}`);
- console.log("涓嬭浇鏂囦欢:", row.fileUrl);
- },
- // 淇濆瓨纭淇℃伅
- handleSave() {
- this.$refs.form.validate(valid => {
- if (valid) {
- updateConfirmation(this.form).then(response => {
- if (response.code === 200) {
- this.$message.success("淇濆瓨鎴愬姛");
- this.isEdit = false;
- this.$router.push("/case/confirmation");
- }
+
+ // 澶勭悊assessannex瀛楁鏁版嵁骞舵寜绫诲瀷鍒嗙被
+ processAssessannexData() {
+ if (this.form.assessannex) {
+ try {
+ const annexData =
+ 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"; // 榛樿鍒扮涓�绉嶇被鍨�
+ if (this.attachmentData[type]) {
+ this.attachmentData[type].push(attachment);
+ }
+ });
+ }
+ } catch (error) {
+ console.warn("assessannex鏁版嵁瑙f瀽澶辫触:", error);
}
- });
+ }
},
- // 鏍规嵁绫诲瀷鑾峰彇闄勪欢
+
+ // 鏍规嵁绫诲瀷鑾峰彇闄勪欢鍒楄〃
getAttachmentsByType(type) {
- return this.attachmentList.filter(item => item.type === type);
+ return this.attachmentData[type] || [];
},
// 鎵撳紑涓婁紶瀵硅瘽妗�
@@ -444,35 +574,38 @@
});
},
- // 涓婁紶鍓嶆牎楠�
+ // 涓婁紶鍓嶆牎楠孾7](@ref)
beforeUpload(file) {
const allowedTypes = [
- 'application/pdf',
- 'image/jpeg',
- 'image/png',
- 'application/msword',
- 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
+ "application/pdf",
+ "image/jpeg",
+ "image/png",
+ "application/msword",
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
];
const maxSize = 10 * 1024 * 1024; // 10MB
// 鏍¢獙鏂囦欢绫诲瀷
- const isTypeOk = allowedTypes.includes(file.type) ||
- file.name.endsWith('.pdf') ||
- file.name.endsWith('.jpg') ||
- file.name.endsWith('.jpeg') ||
- file.name.endsWith('.png') ||
- file.name.endsWith('.doc') ||
- file.name.endsWith('.docx');
+ const isTypeOk =
+ allowedTypes.includes(file.type) ||
+ file.name.endsWith(".pdf") ||
+ file.name.endsWith(".jpg") ||
+ file.name.endsWith(".jpeg") ||
+ file.name.endsWith(".png") ||
+ file.name.endsWith(".doc") ||
+ file.name.endsWith(".docx");
if (!isTypeOk) {
- this.$message.error('鏂囦欢鏍煎紡涓嶆敮鎸侊紝璇蜂笂浼爌df銆乯pg銆乸ng銆乨oc鎴杁ocx鏍煎紡鏂囦欢');
+ this.$message.error(
+ "鏂囦欢鏍煎紡涓嶆敮鎸侊紝璇蜂笂浼爌df銆乯pg銆乸ng銆乨oc鎴杁ocx鏍煎紡鏂囦欢"
+ );
return false;
}
// 鏍¢獙鏂囦欢澶у皬
if (file.size > maxSize) {
- this.$message.error('鏂囦欢澶у皬涓嶈兘瓒呰繃10MB');
+ this.$message.error("鏂囦欢澶у皬涓嶈兘瓒呰繃10MB");
return false;
}
@@ -491,25 +624,29 @@
// 鑷畾涔変笂浼犺姹�
handleHttpRequest(options) {
- // 妯℃嫙涓婁紶杩囩▼
return new Promise((resolve, reject) => {
this.uploadLoading = true;
- // 妯℃嫙涓婁紶寤惰繜
+ // 妯℃嫙涓婁紶杩囩▼
setTimeout(() => {
const newAttachment = {
id: Date.now(),
- type: this.currentUploadType,
- typeName: this.getCurrentTypeLabel,
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: '褰撳墠鐢ㄦ埛', // 瀹為檯椤圭洰涓粠鐢ㄦ埛淇℃伅鑾峰彇
- fileUrl: URL.createObjectURL(options.file) // 涓存椂URL锛屽疄闄呴」鐩腑涓烘湇鍔″櫒杩斿洖鐨刄RL
+ uploader: "褰撳墠鐢ㄦ埛"
};
- this.attachmentList.push(newAttachment);
+ // 娣诲姞鍒板搴旂被鍨嬬殑闄勪欢鍒楄〃
+ if (this.attachmentData[this.currentUploadType]) {
+ this.attachmentData[this.currentUploadType].push(newAttachment);
+ }
+
this.uploadLoading = false;
+ this.updateAssessannexField(); // 鏇存柊瀛樺偍瀛楁
resolve({ code: 200, data: newAttachment });
}, 1500);
});
@@ -518,90 +655,184 @@
// 鎻愪氦涓婁紶
async submitUpload() {
if (this.tempFileList.length === 0) {
- this.$message.warning('璇峰厛閫夋嫨瑕佷笂浼犵殑鏂囦欢');
+ this.$message.warning("璇峰厛閫夋嫨瑕佷笂浼犵殑鏂囦欢");
return;
}
try {
- // 渚濇涓婁紶鎵�鏈夋枃浠�
for (const file of this.tempFileList) {
await this.$refs.uploadRef.submit();
}
- this.$message.success('鏂囦欢涓婁紶鎴愬姛');
+ this.$message.success("鏂囦欢涓婁紶鎴愬姛");
this.uploadDialogVisible = false;
this.tempFileList = [];
} catch (error) {
- this.$message.error('鏂囦欢涓婁紶澶辫触');
- console.error('涓婁紶澶辫触:', error);
+ this.$message.error("鏂囦欢涓婁紶澶辫触");
+ console.error("涓婁紶澶辫触:", error);
}
},
// 鍒犻櫎闄勪欢
- handleRemoveAttachment(attachment, type) {
- this.$confirm('纭畾瑕佸垹闄よ繖涓檮浠跺悧锛�', '鎻愮ず', {
- confirmButtonText: '纭畾',
- cancelButtonText: '鍙栨秷',
- type: 'warning'
- }).then(() => {
- const index = this.attachmentList.findIndex(item => item.id === attachment.id);
- if (index !== -1) {
- this.attachmentList.splice(index, 1);
- this.$message.success('闄勪欢鍒犻櫎鎴愬姛');
-
- // 瀹為檯椤圭洰涓皟鐢ㄥ垹闄ゆ帴鍙�
- // this.deleteAttachment(attachment.id);
- }
- }).catch(() => {});
+ handleRemoveAttachment(type, index) {
+ this.$confirm("纭畾瑕佸垹闄よ繖涓檮浠跺悧锛�", "鎻愮ず", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning"
+ })
+ .then(() => {
+ if (this.attachmentData[type] && this.attachmentData[type][index]) {
+ this.attachmentData[type].splice(index, 1);
+ this.$message.success("闄勪欢鍒犻櫎鎴愬姛");
+ this.updateAssessannexField(); // 鏇存柊瀛樺偍瀛楁
+ }
+ })
+ .catch(() => {});
},
- // 棰勮闄勪欢
- handlePreview(attachment) {
- // 瀹為檯椤圭洰涓牴鎹枃浠剁被鍨嬭皟鐢ㄤ笉鍚岀殑棰勮鏂瑰紡
- if (attachment.fileName.endsWith('.pdf')) {
- // 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'
- });
+ // 鏇存柊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,
+ fileUrl: file.fileUrl,
+ fileType: this.getFileType(file.fileName)
+ };
+ this.previewVisible = true;
+ },
+
+ // 鏂囦欢涓嬭浇
+ handleDownload(file) {
+ const fileUrl = 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.info('璇ユ枃浠剁被鍨嬫殏涓嶆敮鎸佸湪绾块瑙堬紝璇蜂笅杞藉悗鏌ョ湅');
+ this.$message.warning("鏂囦欢璺緞涓嶅瓨鍦紝鏃犳硶涓嬭浇");
}
},
- // 淇濆瓨鎵�鏈夐檮浠朵俊鎭�
- handleSaveAll() {
- this.saveLoading = true;
+ // 鑾峰彇鏂囦欢绫诲瀷
+ getFileType(fileName) {
+ if (!fileName) return "other";
+ const extension = this.getFileExtension(fileName);
+ const imageTypes = ["jpg", "jpeg", "png"];
+ const pdfTypes = ["pdf"];
+ const officeTypes = ["doc", "docx"];
- // 妯℃嫙淇濆瓨杩囩▼
- setTimeout(() => {
- this.$message.success('闄勪欢淇℃伅淇濆瓨鎴愬姛');
- this.saveLoading = false;
+ if (imageTypes.includes(extension)) return "image";
+ if (pdfTypes.includes(extension)) return "pdf";
+ if (officeTypes.includes(extension)) return "office";
+ return "other";
+ },
- // 瀹為檯椤圭洰涓皟鐢ㄤ繚瀛樻帴鍙�
- // this.saveAttachments();
- }, 1000);
+ // 鑾峰彇鏂囦欢鎵╁睍鍚�
+ getFileExtension(filename) {
+ return filename
+ .split(".")
+ .pop()
+ .toLowerCase();
},
// 鏂囦欢澶у皬鏍煎紡鍖�
formatFileSize(size) {
- if (size === 0) return '0 B';
+ if (!size) return "0 B";
const k = 1024;
- const sizes = ['B', 'KB', 'MB', 'GB'];
+ const sizes = ["B", "KB", "MB", "GB"];
const i = Math.floor(Math.log(size) / Math.log(k));
- return parseFloat((size / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];
+ return parseFloat((size / Math.pow(k, i)).toFixed(2)) + " " + sizes[i];
},
- // 鏃堕棿鏍煎紡鍖�
- parseTime(time) {
- if (!time) return '';
- const date = new Date(time);
- return `${date.getFullYear()}-${(date.getMonth() + 1).toString().padStart(2, '0')}-${date.getDate().toString().padStart(2, '0')} ${date.getHours().toString().padStart(2, '0')}:${date.getMinutes().toString().padStart(2, '0')}`;
+ // 鏃ユ湡鏃堕棿鏍煎紡鍖�
+ 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)
+ .toString()
+ .padStart(2, "0")}-${now
+ .getDate()
+ .toString()
+ .padStart(2, "0")} ${now
+ .getHours()
+ .toString()
+ .padStart(2, "0")}:${now
+ .getMinutes()
+ .toString()
+ .padStart(2, "0")}:${now
+ .getSeconds()
+ .toString()
+ .padStart(2, "0")}`;
+ },
+
+ // 淇濆瓨纭淇℃伅
+ async handleSave() {
+ try {
+ await this.$refs.form.validate();
+ this.saveLoading = true;
+
+ // 纭繚闄勪欢鏁版嵁鏄渶鏂扮殑
+ this.updateAssessannexField();
+
+ const saveData = {
+ ...this.form,
+ organdecision: this.organdecision.join(","),
+ organdecisionOther: this.organdecisionOther
+ // assessannex瀛楁宸插湪updateAssessannexField涓洿鏂�
+ };
+
+ const response = await relativesEdit(saveData);
+
+ if (response.code === 200) {
+ this.$message.success("淇濆瓨鎴愬姛");
+ this.$router.push("/case/affirm");
+ } else {
+ this.$message.error("淇濆瓨澶辫触锛�" + (response.msg || "鏈煡閿欒"));
+ }
+ } catch (error) {
+ if (error !== "cancel") {
+ console.error("淇濆瓨澶辫触:", error);
+ this.$message.error("淇濆瓨澶辫触");
+ }
+ } finally {
+ this.saveLoading = false;
+ }
}
}
};
@@ -623,37 +854,20 @@
.detail-title {
font-size: 16px;
font-weight: bold;
+ margin-right: 20px;
}
-.fixed-width .el-button {
- margin: 0 5px;
-}
-.confirmation-detail {
- padding: 20px;
+.attachment-section {
+ padding: 15px;
}
-.detail-card {
- margin-bottom: 20px;
-}
-
-.attachment-card {
- margin-bottom: 20px;
-}
-
-.detail-title {
- font-size: 16px;
- font-weight: bold;
-}
-
-.attachment-upload-section {
- padding: 10px;
-}
-
-.upload-header {
+.attachment-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 15px;
+ padding-bottom: 10px;
+ border-bottom: 1px solid #ebeef5;
}
.upload-title {
@@ -662,9 +876,8 @@
color: #303133;
}
-.file-info {
- display: flex;
- align-items: center;
+.attachment-list {
+ margin-top: 15px;
}
.empty-attachment {
@@ -673,13 +886,8 @@
color: #909399;
}
-/* 鍥剧墖棰勮瀵硅瘽妗嗘牱寮� */
-:deep(.image-preview-dialog) {
- width: auto;
- max-width: 90vw;
-}
-
-:deep(.image-preview-dialog .el-message-box__content) {
- text-align: center;
+.file-name {
+ font-size: 13px;
+ color: #606266;
}
</style>
diff --git a/src/views/business/course/components/DonorMaintenanceStage.vue b/src/views/business/course/components/DonorMaintenanceStage.vue
index a14b856..e07bdc9 100644
--- a/src/views/business/course/components/DonorMaintenanceStage.vue
+++ b/src/views/business/course/components/DonorMaintenanceStage.vue
@@ -1,8 +1,156 @@
<template>
<div class="maintenance-detail">
<!-- 鍩虹淇℃伅 -->
+ <el-card class="detail-card">
+ <div slot="header" class="clearfix">
+ <span class="detail-title">渚涜�呭熀鏈俊鎭�</span>
+ </div>
+
+ <el-form :model="form" ref="form" label-width="120px">
+ <el-row :gutter="20">
+ <el-col :span="8">
+ <el-form-item label="浣忛櫌鍙�" prop="caseNo">
+ <el-input v-model="form.caseNo" />
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="鎹愮尞鑰呭鍚�" prop="name">
+ <el-input v-model="form.name" />
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="鎬у埆" prop="gender">
+ <el-select v-model="form.sex" style="width: 100%">
+ <el-option label="鐢�" value="0" />
+ <el-option label="濂�" value="1" />
+ </el-select>
+ </el-form-item>
+ </el-col>
+ </el-row>
+
+ <el-row :gutter="20">
+ <el-col :span="8">
+ <el-form-item label="骞撮緞" prop="age">
+ <el-input v-model="form.age" />
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="鐤剧梾璇婃柇" prop="diagnosisname">
+ <el-input v-model="form.diagnosisname" />
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="棣栬瘖鍖荤枟鏈烘瀯" prop="treatmenthospitalname">
+ <el-input v-model="form.treatmenthospitalname" />
+ </el-form-item>
+ </el-col>
+ </el-row>
+
+ <el-row :gutter="20">
+ <el-col :span="8">
+ <el-form-item label="鎮h�呯姸鎬�" prop="recordstate">
+ <el-select v-model="form.recordstate" style="width: 100%">
+ <el-option
+ v-for="dict in dict.type.sys_DonationCategory || []"
+ :key="dict.value"
+ :label="dict.label"
+ :value="dict.value"
+ ></el-option>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item
+ label="鏈畬鎴愬師鍥�"
+ prop="incompleteReason"
+ v-if="form.recordstate === '5'"
+ >
+ <el-input
+ v-model="form.incompleteReason"
+ placeholder="璇疯緭鍏ユ湭瀹屾垚鎹愮尞鐨勫師鍥�"
+ />
+ </el-form-item>
+ </el-col>
+ </el-row>
+
+ <el-row :gutter="20">
+ <el-col :span="8">
+ <el-form-item label="涓婃姤鏃堕棿" prop="reporttime">
+ <el-date-picker
+ v-model="form.reporttime"
+ 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="deathTime">
+ <el-date-picker
+ v-model="form.deathTime"
+ 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="coordinatorName">
+ <el-input v-model="form.coordinatorName" />
+ </el-form-item>
+ </el-col>
+ </el-row>
+
+ <el-row :gutter="20">
+ <el-col :span="8">
+ <el-form-item label="琛�鍨�" prop="bloodtype">
+ <el-select v-model="form.bloodtype" style="width: 100%">
+ <el-option
+ v-for="dict in dict.type.sys_BloodType"
+ :key="dict.value"
+ :label="dict.label"
+ :value="dict.value"
+ ></el-option>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="Rh(D)" prop="rhYin">
+ <el-radio-group v-model="form.rhYin">
+ <el-radio
+ v-for="dict in dict.type.sys_bloodtype_rhd || []"
+ :key="dict.value"
+ :label="dict.value"
+ >{{ dict.label }}</el-radio
+ >
+ </el-radio-group>
+ </el-form-item>
+ </el-col>
+ </el-row>
+
+ <el-form-item label="鐗规畩鐥呭彶" prop="specialMedicalHistory">
+ <el-input
+ type="textarea"
+ :rows="3"
+ v-model="form.specialMedicalHistory"
+ placeholder="璁板綍鐗规畩鐥呭彶淇℃伅"
+ />
+ </el-form-item>
+ </el-form>
+ </el-card>
<el-card class="assessment-card">
+ <div slot="header" class="clearfix">
+ <span class="detail-title">渚涜�呰瘎浼板悇椤硅褰�</span>
+ <el-button
+ type="primary"
+ size="mini"
+ @click="toggleEditMode"
+ style="float: right;"
+ >
+ {{ isEdit ? "瀹屾垚缂栬緫" : "寮�濮嬬紪杈�" }}
+ </el-button>
+ </div>
<el-tabs v-model="activeTab" type="card" @tab-click="handleTabClick">
<!-- 鍩瑰吇缁撴灉璁板綍 -->
@@ -10,6 +158,14 @@
<el-card class="culture-card">
<div slot="header" class="clearfix">
<span class="detail-title">鍩瑰吇缁撴灉璁板綍</span>
+ <el-button
+ type="primary"
+ size="mini"
+ icon="el-icon-plus"
+ @click="handleAddCulture"
+ >
+ 鏂板鍩瑰吇璁板綍
+ </el-button>
</div>
<el-table :data="cultureList" v-loading="cultureLoading">
@@ -17,14 +173,7 @@
label="鍩瑰吇绫诲瀷"
align="center"
prop="cultureType"
- >
- <!-- <template slot-scope="scope">
- <dict-tag
- :options="cultureTypeOptions"
- :value="scope.row.cultureType"
- />
- </template> -->
- </el-table-column>
+ />
<el-table-column
label="閲囨牱鏃堕棿"
align="center"
@@ -40,7 +189,6 @@
</el-tag>
</template>
</el-table-column>
- <!-- 闄勪欢鍒� -->
<el-table-column label="闄勪欢" align="center">
<template slot-scope="scope">
<el-button
@@ -56,16 +204,31 @@
<span v-else>鏃犻檮浠�</span>
</template>
</el-table-column>
-
+ <el-table-column
+ label="鎿嶄綔"
+ align="center"
+ width="200"
+ class-name="small-padding fixed-width"
+ >
+ <template slot-scope="scope">
+ <el-button
+ size="mini"
+ type="text"
+ icon="el-icon-edit"
+ @click="handleEditCulture(scope.row)"
+ >缂栬緫</el-button
+ >
+ <el-button
+ size="mini"
+ type="text"
+ icon="el-icon-delete"
+ style="color: #F56C6C;"
+ @click="handleDeleteCulture(scope.row)"
+ >鍒犻櫎</el-button
+ >
+ </template>
+ </el-table-column>
</el-table>
-
- <pagination
- v-show="cultureTotal > 0"
- :total="cultureTotal"
- :page.sync="cultureQueryParams.pageNum"
- :limit.sync="cultureQueryParams.pageSize"
- @pagination="getCultureList"
- />
</el-card>
</el-tab-pane>
@@ -73,6 +236,7 @@
<el-tab-pane label="鑲濆姛鑳借偩鍔熻兘" name="liverKidney">
<liver-kidney-panel
ref="liverKidney"
+ :initial-data="assessmentData.liverKidney"
:is-editing="isEdit && activeTab === 'liverKidney'"
@data-change="handleLiverKidneyDataChange"
/>
@@ -82,6 +246,7 @@
<el-tab-pane label="琛�甯歌" name="bloodRoutine">
<blood-routine-panel
ref="bloodRoutine"
+ :initial-data="assessmentData.bloodRoutine"
:is-editing="isEdit && activeTab === 'bloodRoutine'"
@data-change="handleBloodRoutineDataChange"
/>
@@ -91,18 +256,26 @@
<el-tab-pane label="灏垮父瑙�" name="urineRoutine">
<urine-routine-panel
ref="urineRoutine"
+ :initial-data="assessmentData.urineRoutine"
:is-editing="isEdit && activeTab === 'urineRoutine'"
@data-change="handleUrineRoutineDataChange"
/>
</el-tab-pane>
</el-tabs>
</el-card>
- <!-- 鍩瑰吇缁撴灉璁板綍 -->
- <!-- 绠�鍖栧悗鐨勬姢鐞嗘牳鏌ヨ褰� -->
+ <!-- 鎶ょ悊鏍告煡璁板綍 -->
<el-card class="record-card">
<div slot="header" class="clearfix">
<span class="detail-title">鎶ょ悊鏍告煡璁板綍</span>
+ <el-button
+ type="primary"
+ size="mini"
+ icon="el-icon-plus"
+ @click="handleAddRecord"
+ >
+ 鏂板鏍告煡璁板綍
+ </el-button>
</div>
<el-table :data="recordList" v-loading="recordLoading">
@@ -125,7 +298,6 @@
min-width="200"
show-overflow-tooltip
/>
- <!-- 闄勪欢鍒� -->
<el-table-column label="闄勪欢" align="center" width="120">
<template slot-scope="scope">
<el-button
@@ -139,16 +311,33 @@
<span v-else>鏃犻檮浠�</span>
</template>
</el-table-column>
+ <el-table-column
+ label="鎿嶄綔"
+ align="center"
+ width="180"
+ class-name="small-padding fixed-width"
+ >
+ <template slot-scope="scope">
+ <el-button
+ size="mini"
+ type="text"
+ icon="el-icon-edit"
+ @click="handleEditRecord(scope.row)"
+ >缂栬緫</el-button
+ >
+ <el-button
+ size="mini"
+ type="text"
+ icon="el-icon-delete"
+ style="color: #F56C6C;"
+ @click="handleDeleteRecord(scope.row)"
+ >鍒犻櫎</el-button
+ >
+ </template>
+ </el-table-column>
</el-table>
-
- <pagination
- v-show="recordTotal > 0"
- :total="recordTotal"
- :page.sync="recordQueryParams.pageNum"
- :limit.sync="recordQueryParams.pageSize"
- @pagination="getRecordList"
- />
</el-card>
+
<!-- 鍩瑰吇璁板綍缂栬緫瀵硅瘽妗� -->
<el-dialog
:title="cultureDialogTitle"
@@ -207,11 +396,17 @@
</el-col>
</el-row>
- <!-- 闄勪欢涓婁紶 -->
<el-form-item label="闄勪欢">
- <upload-attachment
- :file-list="cultureForm.attachments"
+ <UploadAttachment
+ ref="cultureUploadAttachment"
+ :file-list="cultureFileList"
+ :limit="10"
+ :accept="attachmentAccept"
+ :multiple="true"
@change="handleCultureAttachmentChange"
+ @upload-success="handleCultureUploadSuccess"
+ @upload-error="handleCultureUploadError"
+ @remove="handleCultureAttachmentRemove"
/>
</el-form-item>
</el-form>
@@ -271,181 +466,154 @@
/>
</el-form-item>
- <!-- 闄勪欢涓婁紶 -->
<el-form-item label="闄勪欢">
- <upload-attachment
- :file-list="recordForm.attachments"
+ <UploadAttachment
+ ref="recordUploadAttachment"
+ :file-list="recordFileList"
+ :limit="10"
+ :accept="attachmentAccept"
+ :multiple="true"
@change="handleRecordAttachmentChange"
+ @upload-success="handleRecordUploadSuccess"
+ @upload-error="handleRecordUploadError"
+ @remove="handleRecordAttachmentRemove"
/>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="recordDialogVisible = false">鍙栨秷</el-button>
- <el-button
- type="primary"
- @click="handleSaveRecord"
- :loading="recordSaveLoading"
- >淇濆瓨</el-button
- >
</span>
</el-dialog>
<!-- 闄勪欢棰勮瀵硅瘽妗� -->
- <attachment-preview
- :visible="attachmentPreviewVisible"
- :file-list="currentAttachmentList"
+ <el-dialog
:title="attachmentPreviewTitle"
- @close="attachmentPreviewVisible = false"
+ :visible.sync="attachmentPreviewVisible"
+ width="900px"
+ @close="handleAttachmentPreviewClose"
+ >
+ <el-table :data="currentAttachmentList" 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="150" fixed="right">
+ <template slot-scope="scope">
+ <el-button
+ size="mini"
+ type="primary"
+ @click="handlePreviewAttachment(scope.row)"
+ :disabled="!isPreviewable(scope.row.fileName)"
+ >
+ 棰勮
+ </el-button>
+ <el-button
+ size="mini"
+ type="success"
+ @click="handleDownloadAttachment(scope.row)"
+ >
+ 涓嬭浇
+ </el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+ </el-dialog>
+
+ <!-- 鏂囦欢棰勮寮圭獥 -->
+ <FilePreviewDialog
+ :visible="filePreviewVisible"
+ :file="currentPreviewFile"
+ @close="filePreviewVisible = false"
+ @download="handleDownloadAttachment"
/>
</div>
</template>
<script>
-import { getMaintenanceDetail, updateMaintenance } from "./api//mockMaintenanceApi";
-import {
- listCultureResults,
- addCultureResult,
- updateCultureResult,
- deleteCultureResult
-} from "./api/mockMaintenanceApi";
-import {
- listNursingRecords,
- addNursingRecord,
- updateNursingRecord,
- deleteNursingRecord
-} from "./api//mockMaintenanceApi";
+import { maintainList, maintainedit, maintainAdd } from "@/api/businessApi";
import Pagination from "@/components/Pagination";
import UploadAttachment from "@/components/UploadAttachment";
-import AttachmentPreview from "@/components/AttachmentPreview";
-import LiverKidneyPanel from "./components/LiverKidneyPanel.vue";
-import BloodRoutinePanel from "./components/BloodRoutinePanel.vue";
-import UrineRoutinePanel from "./components/UrineRoutinePanel.vue";
+import FilePreviewDialog from "@/components/FilePreviewDialog";
+import LiverKidneyPanel from "@/components/MaintainComponents/LiverKidneyPanel.vue";
+import BloodRoutinePanel from "@/components/MaintainComponents/BloodRoutinePanel.vue";
+import UrineRoutinePanel from "@/components/MaintainComponents/UrineRoutinePanel.vue";
+import dayjs from "dayjs";
export default {
name: "MaintenanceDetail",
components: {
Pagination,
UploadAttachment,
- AttachmentPreview,
+ FilePreviewDialog,
LiverKidneyPanel,
BloodRoutinePanel,
UrineRoutinePanel
},
+ dicts: [
+ "sys_donornode",
+ "sys_BloodType",
+ "sys_EthicalReview",
+ "sys_BaseAssessConclusion",
+ "sys_bloodtype_rhd",
+ "sys_DonationCategory"
+ ],
+ props: {
+ infoid: {
+ type: String,
+ default: true
+ }
+ },
data() {
return {
- isEdit: true,
+ isEdit: false,
+ currentMaintenanceId: null,
+ isEditMode: false,
form: {
id: undefined,
caseNo: "",
- donorName: "",
+ name: "",
gender: "",
age: "",
- diagnosis: "",
- hospitalName: "",
- patientStatus: "1",
- admissionTime: "",
- dischargeTime: "",
- coordinator: "",
- bloodType: "",
+ diagnosisname: "",
+ treatmenthospitalname: "",
+ recordstate: "1",
+ reporttime: "",
+ deathTime: "",
+ coordinatorName: "",
+ bloodtype: "",
rhFactor: "",
specialMedicalHistory: "",
incompleteReason: ""
},
activeTab: "culture",
- // 鍩瑰吇缁撴灉鐩稿叧鏁版嵁
- // 鍩瑰吇缁撴灉鐩稿叧鏁版嵁
- cultureList: [
- {
- id: 1,
- cultureType: "琛�鍩瑰吇",
- sampleTime: "2024-12-19 10:30:00",
- result: "闃存��",
- bacteria: "",
- drugSensitivity: "",
- testingInstitution: "闈掑矝澶у闄勫睘鍖婚櫌",
- specimenType: "琛�娑�",
- remarks: "甯歌妫�娴�",
- attachments: [
- {
- id: 1,
- fileName: "琛�鍩瑰吇鎶ュ憡.pdf",
- fileUrl:
- "http://localhost:8080/profile/upload/2025/12/27/1.COPO渚涗綋璇勪及琛�.pdf",
- fileSize: 1024000,
- uploadTime: "2024-12-19 11:00:00"
- }
- ]
- },
- {
- id: 3,
- cultureType: "琛�鍩瑰吇",
- sampleTime: "2024-12-20 09:15:00",
- result: "闃存��",
- bacteria: "",
- drugSensitivity: "",
- testingInstitution: "骞垮窞妫�娴嬩腑蹇�",
- specimenType: "灏挎恫",
- remarks: "娓呮磥涓灏挎爣鏈�",
- attachments: []
- },
- {
- id: 2,
- cultureType: "鐥板煿鍏荤粨鏋�",
- sampleTime: "2024-12-19 14:20:00",
- result: "闃虫��",
- bacteria: "閲戦粍鑹茶憽钀勭悆鑿�",
- drugSensitivity: "瀵归潚闇夌礌鏁忔劅锛屽澶村绫讳腑浠�",
- testingInstitution: "涓婃捣鍖诲妫�楠屾墍",
- specimenType: "鐥版恫",
- remarks: "鑽晱璇曢獙瀹屾垚",
- attachments: [
- {
- id: 2,
- fileName: "鐥板煿鍏荤粨鏋�.jpg",
- fileUrl:
- "https://img95.699pic.com/photo/40142/8262.jpg_wh860.jpg",
- fileSize: 512000,
- uploadTime: "2024-12-19 15:30:00"
- },
- {
- id: 3,
- fileName: "鑽晱鎶ュ憡.pdf",
- fileUrl:
- "http://localhost:8080/profile/upload/2025/12/27/(鍚撮緳8.7)姣忔棩宸ヤ綔鎬荤粨.pdf",
- fileSize: 768000,
- uploadTime: "2024-12-19 16:00:00"
- }
- ]
- },
+ extracontentinfo: {},
- {
- id: 4,
- cultureType: "鐪熻弻鍩瑰吇",
- sampleTime: "2024-12-20 11:45:00",
- result: "闃虫��",
- bacteria: "澶ц偁鏉嗚弻",
- drugSensitivity: "瀵瑰乏姘ф盁娌欐槦鏁忔劅",
- testingInstitution: "娣卞湷浜烘皯鍖婚櫌",
- specimenType: "浼ゅ彛鍒嗘硨鐗�",
- remarks: "鏈悗浼ゅ彛鎰熸煋鐩戞祴",
- attachments: [
- {
- id: 4,
- fileName: "鐪熻弻鍩瑰吇.pdf",
- fileUrl: "/reports/culture4.pdf",
- fileSize: 890000,
- uploadTime: "2024-12-20 13:20:00"
- }
- ]
- }
- ],
+ // 鍩瑰吇缁撴灉鐩稿叧鏁版嵁
+ cultureList: [],
cultureLoading: false,
- cultureTotal: 5,
- cultureQueryParams: {
- pageNum: 1,
- pageSize: 10
- },
cultureDialogVisible: false,
cultureDialogTitle: "",
cultureSaveLoading: false,
@@ -454,8 +622,9 @@
cultureType: "",
sampleTime: "",
result: "闃存��",
- attachments: [] // 鏂板闄勪欢瀛楁
+ attachments: []
},
+ cultureFileList: [],
cultureRules: {
cultureType: [
{ required: true, message: "璇烽�夋嫨鍩瑰吇绫诲瀷", trigger: "change" }
@@ -477,120 +646,8 @@
],
// 鎶ょ悊鏍告煡璁板綍鐩稿叧鏁版嵁
- recordList: [
- {
- id: 1,
- recordTime: "2024-12-19 08:30:00",
- recorder: "寮犳姢澹�",
- temperature: 36.8,
- heartRate: 78,
- bloodPressure: "120/80",
- respirationRate: 18,
- oxygenSaturation: 98,
- urineOutput: 60,
- cvp: 8,
- checkRecord: "鎮h�呯敓鍛戒綋寰佸钩绋筹紝鎰忚瘑娓呮锛岄厤鍚堟不鐤�",
- remarks: "澶滈棿鐫$湢鑹ソ",
- attachments: [
- {
- id: 1,
- fileName: "鏃╃彮鎶ょ悊璁板綍.jpg",
- fileUrl: "/records/nursing1.jpg",
- fileSize: 1024000,
- uploadTime: "2024-12-19 09:00:00"
- }
- ]
- },
- {
- id: 2,
- recordTime: "2024-12-19 14:30:00",
- recorder: "鏉庢姢澹�",
- temperature: 37.2,
- heartRate: 82,
- bloodPressure: "118/76",
- respirationRate: 16,
- oxygenSaturation: 97,
- urineOutput: 45,
- cvp: 7.5,
- checkRecord: "鎮h�呭崍鍚庝綋娓╃暐鏈夊崌楂橈紝瑙傚療涓�",
- remarks: "寤鸿澧炲姞姘村垎鎽勫叆",
- attachments: []
- },
- {
- id: 3,
- recordTime: "2024-12-19 20:30:00",
- recorder: "鐜嬫姢澹�",
- temperature: 36.9,
- heartRate: 75,
- bloodPressure: "122/78",
- respirationRate: 17,
- oxygenSaturation: 98,
- urineOutput: 55,
- cvp: 8.2,
- checkRecord: "鏅氶棿鐢熷懡浣撳緛绋冲畾锛屾偅鑰呬紤鎭壇濂�",
- remarks: "澶滈棿鐩戞祴鏃犲紓甯�",
- attachments: [
- {
- id: 2,
- fileName: "鏅氱彮鎶ょ悊璁板綍.pdf",
- fileUrl: "/records/nursing3.pdf",
- fileSize: 890000,
- uploadTime: "2024-12-19 21:00:00"
- },
- {
- id: 3,
- fileName: "浣撳緛鐩戞祴琛�.xlsx",
- fileUrl: "/records/monitoring3.xlsx",
- fileSize: 256000,
- uploadTime: "2024-12-19 21:15:00"
- }
- ]
- },
- {
- id: 4,
- recordTime: "2024-12-20 08:30:00",
- recorder: "璧垫姢澹�",
- temperature: 36.7,
- heartRate: 80,
- bloodPressure: "119/77",
- respirationRate: 18,
- oxygenSaturation: 99,
- urineOutput: 65,
- cvp: 7.8,
- checkRecord: "鏅ㄩ棿鐢熷懡浣撳緛姝e父锛屾偅鑰呯簿绁炵姸鎬佽壇濂�",
- remarks: "鍑嗗浠婃棩妫�鏌�",
- attachments: []
- },
- {
- id: 5,
- recordTime: "2024-12-20 12:30:00",
- recorder: "鍒樻姢澹�",
- temperature: 37.1,
- heartRate: 85,
- bloodPressure: "121/79",
- respirationRate: 19,
- oxygenSaturation: 96,
- urineOutput: 40,
- cvp: 8.5,
- checkRecord: "鍗堥棿浣撴俯鐣ユ湁娉㈠姩锛岀户缁瀵�",
- remarks: "宸查�氱煡鍖荤敓",
- attachments: [
- {
- id: 4,
- fileName: "鍗堥棿鎶ょ悊璁板綍.jpg",
- fileUrl: "/records/nursing5.jpg",
- fileSize: 765000,
- uploadTime: "2024-12-20 13:00:00"
- }
- ]
- }
- ],
+ recordList: [],
recordLoading: false,
- recordTotal: 4,
- recordQueryParams: {
- pageNum: 1,
- pageSize: 10
- },
recordDialogVisible: false,
recordDialogTitle: "",
recordSaveLoading: false,
@@ -598,9 +655,10 @@
id: undefined,
recordTime: "",
recorder: "",
- checkRecord: "", // 鏀逛负鍗曞瓧娈佃褰�
- attachments: [] // 鏂板闄勪欢瀛楁
+ checkRecord: "",
+ attachments: []
},
+ recordFileList: [],
recordRules: {
recordTime: [
{ required: true, message: "璇烽�夋嫨鏍告煡鏃堕棿", trigger: "change" }
@@ -616,87 +674,112 @@
// 闄勪欢棰勮鐩稿叧
attachmentPreviewVisible: false,
currentAttachmentList: [],
- attachmentPreviewTitle: ""
+ attachmentPreviewTitle: "",
+
+ // 鏂囦欢棰勮鐩稿叧
+ filePreviewVisible: false,
+ currentPreviewFile: null,
+
+ // 闄勪欢鐩稿叧閰嶇疆
+ attachmentLimit: 10,
+ attachmentAccept:
+ ".pdf,.jpg,.jpeg,.png,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.txt",
+
+ // 璇勪及鏁版嵁瀛樺偍
+ assessmentData: {
+ liverKidney: {},
+ bloodRoutine: {},
+ urineRoutine: {},
+ cultureResults: [],
+ nursingRecords: []
+ }
};
},
created() {
- const id = this.$route.query.id;
- // this.isEdit = this.$route.query.edit === "true";
- if (id) {
- this.getDetail(id);
- this.getCultureList();
- this.getRecordList();
+ this.loadMaintenanceData();
+ },
+ watch: {
+ $route(to, from) {
+ this.loadMaintenanceData();
}
},
methods: {
- // 鑾峰彇璇︽儏
- getDetail(id) {
- getMaintenanceDetail(id).then(response => {
+ // 鍔犺浇缁存姢鏁版嵁
+ async loadMaintenanceData() {
+ try {
+ this.cultureLoading = true;
+ this.recordLoading = true;
+
+ const queryParams = {};
+ console.log(this.infoid, "this.infoid");
+
+ if (this.infoid) {
+ queryParams.infoid = this.infoid;
+ } else {
+ this.$message.error("缂哄皯蹇呰鐨勮矾鐢卞弬鏁�");
+ return;
+ }
+ const response = await maintainList(queryParams);
if (response.code === 200) {
- this.form = response.data;
- }
- });
- },
- // 鍩瑰吇璁板綍闄勪欢鍙樻洿
- handleCultureAttachmentChange(fileList) {
- this.cultureForm.attachments = fileList;
- },
+ let maintenanceData = response.data[0];
- // 鎶ょ悊璁板綍闄勪欢鍙樻洿
- handleRecordAttachmentChange(fileList) {
- this.recordForm.attachments = fileList;
- },
-
- // 鏌ョ湅鍩瑰吇璁板綍闄勪欢
- handleViewCultureAttachments(row) {
- console.log(22, row.attachments);
-
- this.currentAttachmentList = row.attachments || [];
- this.attachmentPreviewTitle = `鍩瑰吇璁板綍闄勪欢 - ${row.cultureType}`;
- this.attachmentPreviewVisible = true;
- },
- handleTabClick(tab) {
- this.$nextTick(() => {
- console.log(tab.name, 88);
- const tableRef=null;
- if (tab.name == "liverKidney") {
- tableRef = this.$refs.liverKidney; // 璇锋浛鎹负鎮ㄧ殑琛ㄦ牸 ref
- } else if (tab.name == "bloodRoutine") {
- tableRef = this.$refs.bloodRoutine; // 璇锋浛鎹负鎮ㄧ殑琛ㄦ牸 ref
- } else if (tab.name == "bloodRoutine") {
- tableRef = this.$refs.bloodRoutine; // 璇锋浛鎹负鎮ㄧ殑琛ㄦ牸 ref
- }
- // 濡傛灉鏄� el-table锛屽皾璇曡皟鐢ㄥ叾 doLayout 鏂规硶
- if (tableRef && tableRef.doLayout) {
- tableRef.doLayout();
- }
-
- // 鎴栬�咃紝鏇撮�氱敤鐨勫己鍒堕噸鏂版覆鏌撴柟寮�
- this.$forceUpdate(); // 鎱庣敤锛屽彲鑳藉紩鍙戝叾浠栭棶棰榌1](@ref)
- });
- },
- // 鏌ョ湅鎶ょ悊璁板綍闄勪欢
- handleViewRecordAttachments(row) {
- this.currentAttachmentList = row.attachments || [];
- this.attachmentPreviewTitle = `鎶ょ悊鏍告煡璁板綍闄勪欢 - ${row.recorder}`;
- this.attachmentPreviewVisible = true;
- },
- // 鍩瑰吇璁板綍鐩稿叧鏂规硶
- getCultureList() {
- this.cultureLoading = true;
- listCultureResults(this.form.id, this.cultureQueryParams)
- .then(response => {
- if (response.code === 200) {
- // this.cultureList = response.data.rows;
- // this.cultureTotal = response.data.total;
+ if (Array.isArray(maintenanceData)) {
+ maintenanceData = maintenanceData[0] || {};
}
- this.cultureLoading = false;
- })
- .catch(() => {
- this.cultureLoading = false;
- });
+ if (maintenanceData.extracontent) {
+ this.extracontentinfo = JSON.parse(maintenanceData.extracontent);
+ if (this.extracontentinfo.specialMedicalHistory) {
+ this.form.specialMedicalHistory = this.extracontentinfo.specialMedicalHistory;
+ }
+ }
+
+ if (maintenanceData.itemDesc) {
+ try {
+ const itemDescData = maintenanceData.itemDesc;
+ this.assessmentData = { ...this.assessmentData, ...itemDescData };
+
+ if (itemDescData.cultureResults) {
+ this.cultureList = itemDescData.cultureResults;
+ }
+ if (itemDescData.nursingRecords) {
+ this.recordList = itemDescData.nursingRecords;
+ }
+ if (itemDescData.liverKidney) {
+ this.assessmentData.liverKidney = itemDescData.liverKidney;
+ }
+ if (itemDescData.bloodRoutine) {
+ this.assessmentData.bloodRoutine = itemDescData.bloodRoutine;
+ }
+ if (itemDescData.urineRoutine) {
+ this.assessmentData.urineRoutine = itemDescData.urineRoutine;
+ }
+ } catch (error) {
+ console.error("瑙f瀽itemDesc JSON澶辫触:", error);
+ }
+ }
+
+ this.form = { ...this.form, ...maintenanceData };
+ this.$message.success("鏁版嵁鍔犺浇鎴愬姛");
+ } else {
+ this.$message.error("鏁版嵁鍔犺浇澶辫触锛�" + (response.msg || "鏈煡閿欒"));
+ }
+ } catch (error) {
+ console.error("鍔犺浇缁存姢鏁版嵁澶辫触:", error);
+ this.$message.error("鏁版嵁鍔犺浇澶辫触");
+ } finally {
+ this.cultureLoading = false;
+ this.recordLoading = false;
+ }
},
+ // 鍒囨崲缂栬緫妯″紡
+ toggleEditMode() {
+ this.isEdit = !this.isEdit;
+ if (!this.isEdit) {
+ }
+ },
+
+ // 鍩瑰吇璁板綍鐩稿叧鏂规硶
handleAddCulture() {
this.cultureDialogTitle = "鏂板鍩瑰吇璁板綍";
this.cultureForm = {
@@ -704,12 +787,9 @@
cultureType: "",
sampleTime: "",
result: "闃存��",
- bacteria: "",
- drugSensitivity: "",
- testingInstitution: "",
- specimenType: "",
- remarks: ""
+ attachments: []
};
+ this.cultureFileList = [];
this.cultureDialogVisible = true;
this.$nextTick(() => {
this.$refs.cultureForm && this.$refs.cultureForm.clearValidate();
@@ -719,76 +799,42 @@
handleEditCulture(row) {
this.cultureDialogTitle = "缂栬緫鍩瑰吇璁板綍";
this.cultureForm = { ...row };
+ this.cultureFileList = row.attachments
+ ? row.attachments.map(item => ({
+ uid: item.id || Math.random(),
+ name: item.fileName,
+ fileSize: item.fileSize,
+ url: item.path || item.fileUrl,
+ uploadTime: item.uploadTime,
+ status: "success"
+ }))
+ : [];
this.cultureDialogVisible = true;
this.$nextTick(() => {
this.$refs.cultureForm && this.$refs.cultureForm.clearValidate();
});
},
- handleViewCulture(row) {
- this.$alert(
- `
- <div>
- <p><strong>鍩瑰吇绫诲瀷锛�</strong>${this.getCultureTypeLabel(
- row.cultureType
- )}</p>
- <p><strong>閲囨牱鏃堕棿锛�</strong>${row.sampleTime}</p>
- <p><strong>鍩瑰吇缁撴灉锛�</strong>${row.result}</p>
- <p><strong>妫�娴嬫満鏋勶細</strong>${row.testingInstitution}</p>
- </div>
- `,
- "鍩瑰吇璁板綍璇︽儏",
- {
- dangerouslyUseHTMLString: true,
- customClass: "detail-dialog"
- }
- );
- },
- toggleEditMode() {
- this.isEdit = !this.isEdit;
- // if (!this.isEdit) {
- // this.saveAllData();
- // }
- },
- handleLiverKidneyDataChange(data) {
- console.log("鑲濆姛鑳借偩鍔熻兘鏁版嵁鍙樻洿:", data);
- // 澶勭悊鏁版嵁淇濆瓨鎴栦复鏃跺瓨鍌�
- },
- handleBloodRoutineDataChange(data) {
- console.log("琛�甯歌鍔熻兘鏁版嵁鍙樻洿:", data);
- // 澶勭悊鏁版嵁淇濆瓨鎴栦复鏃跺瓨鍌�
- },
- handleUrineRoutineDataChange(data) {
- console.log("灏垮父瑙勫姛鑳芥暟鎹彉鏇�:", data);
- // 澶勭悊鏁版嵁淇濆瓨鎴栦复鏃跺瓨鍌�
- },
- // 淇濆瓨鍩瑰吇璁板綍
handleSaveCulture() {
this.$refs.cultureForm.validate(valid => {
if (valid) {
this.cultureSaveLoading = true;
- const api = this.cultureForm.id
- ? updateCultureResult
- : addCultureResult;
- const requestData = {
- ...this.cultureForm,
- maintenanceId: this.form.id
- };
- api(requestData)
- .then(response => {
- if (response.code === 200) {
- this.$message.success(
- this.cultureForm.id ? "淇敼鎴愬姛" : "鏂板鎴愬姛"
- );
- this.cultureDialogVisible = false;
- this.getCultureList();
- }
- this.cultureSaveLoading = false;
- })
- .catch(() => {
- this.cultureSaveLoading = false;
- });
+ if (this.cultureForm.id) {
+ const index = this.cultureList.findIndex(
+ item => item.id === this.cultureForm.id
+ );
+ if (index !== -1) {
+ this.cultureList.splice(index, 1, { ...this.cultureForm });
+ }
+ } else {
+ this.cultureForm.id = Date.now();
+ this.cultureList.push({ ...this.cultureForm });
+ }
+
+ this.$message.success(this.cultureForm.id ? "淇敼鎴愬姛" : "鏂板鎴愬姛");
+ this.cultureDialogVisible = false;
+ this.cultureSaveLoading = false;
}
});
},
@@ -800,37 +846,15 @@
type: "warning"
})
.then(() => {
- deleteCultureResult(row.id).then(response => {
- if (response.code === 200) {
- this.$message.success("鍒犻櫎鎴愬姛");
- this.getCultureList();
- }
- });
+ this.cultureList = this.cultureList.filter(
+ item => item.id !== row.id
+ );
+ this.$message.success("鍒犻櫎鎴愬姛");
})
.catch(() => {});
},
- getCultureTypeLabel(value) {
- const type = this.cultureTypeOptions.find(item => item.value === value);
- return type ? type.label : "鏈煡";
- },
-
- // 鎶ょ悊鏍告煡璁板綍鐩稿叧鏂规硶
- getRecordList() {
- this.recordLoading = true;
- listNursingRecords(this.form.id, this.recordQueryParams)
- .then(response => {
- if (response.code === 200) {
- // this.recordList = response.data.rows;
- // this.recordTotal = response.data.total;
- }
- this.recordLoading = false;
- })
- .catch(() => {
- this.recordLoading = false;
- });
- },
-
+ // 鎶ょ悊璁板綍鐩稿叧鏂规硶
handleAddRecord() {
this.recordDialogTitle = "鏂板鎶ょ悊鏍告煡璁板綍";
this.recordForm = {
@@ -839,16 +863,11 @@
.toISOString()
.replace("T", " ")
.substring(0, 19),
- recorder: "褰撳墠鐢ㄦ埛", // 瀹為檯椤圭洰涓粠鐢ㄦ埛淇℃伅鑾峰彇
- temperature: 36.5,
- heartRate: 80,
- bloodPressure: "120/80",
- respirationRate: 18,
- oxygenSaturation: 98,
- urineOutput: 50,
- cvp: 8,
- remarks: ""
+ recorder: "褰撳墠鐢ㄦ埛",
+ checkRecord: "",
+ attachments: []
};
+ this.recordFileList = [];
this.recordDialogVisible = true;
this.$nextTick(() => {
this.$refs.recordForm && this.$refs.recordForm.clearValidate();
@@ -858,64 +877,42 @@
handleEditRecord(row) {
this.recordDialogTitle = "缂栬緫鎶ょ悊鏍告煡璁板綍";
this.recordForm = { ...row };
+ this.recordFileList = row.attachments
+ ? row.attachments.map(item => ({
+ uid: item.id || Math.random(),
+ name: item.fileName,
+ fileSize: item.fileSize,
+ url: item.path || item.fileUrl,
+ uploadTime: item.uploadTime,
+ status: "success"
+ }))
+ : [];
this.recordDialogVisible = true;
this.$nextTick(() => {
this.$refs.recordForm && this.$refs.recordForm.clearValidate();
});
},
- handleViewRecord(row) {
- this.$alert(
- `
- <div>
- <p><strong>鏍告煡鏃堕棿锛�</strong>${row.recordTime}</p>
- <p><strong>鏍告煡浜猴細</strong>${row.recorder}</p>
- <p><strong>鐢熷懡浣撳緛锛�</strong></p>
- <ul>
- <li>浣撴俯锛�${row.temperature}鈩�</li>
- <li>蹇冪巼锛�${row.heartRate}娆�/鍒�</li>
- <li>琛�鍘嬶細${row.bloodPressure}mmHg</li>
- <li>鍛煎惛锛�${row.respirationRate}娆�/鍒�</li>
- <li>琛�姘чケ鍜屽害锛�${row.oxygenSaturation}%</li>
- <li>灏块噺锛�${row.urineOutput}ml/h</li>
- </ul>
- <p><strong>澶囨敞锛�</strong>${row.remarks || "鏃�"}</p>
- </div>
- `,
- "鎶ょ悊鏍告煡璁板綍璇︽儏",
- {
- dangerouslyUseHTMLString: true,
- customClass: "detail-dialog"
- }
- );
- },
-
handleSaveRecord() {
this.$refs.recordForm.validate(valid => {
if (valid) {
this.recordSaveLoading = true;
- const api = this.recordForm.id
- ? updateNursingRecord
- : addNursingRecord;
- const requestData = {
- ...this.recordForm,
- maintenanceId: this.form.id
- };
- api(requestData)
- .then(response => {
- if (response.code === 200) {
- this.$message.success(
- this.recordForm.id ? "淇敼鎴愬姛" : "鏂板鎴愬姛"
- );
- this.recordDialogVisible = false;
- this.getRecordList();
- }
- this.recordSaveLoading = false;
- })
- .catch(() => {
- this.recordSaveLoading = false;
- });
+ if (this.recordForm.id) {
+ const index = this.recordList.findIndex(
+ item => item.id === this.recordForm.id
+ );
+ if (index !== -1) {
+ this.recordList.splice(index, 1, { ...this.recordForm });
+ }
+ } else {
+ this.recordForm.id = Date.now();
+ this.recordList.push({ ...this.recordForm });
+ }
+
+ this.$message.success(this.recordForm.id ? "淇敼鎴愬姛" : "鏂板鎴愬姛");
+ this.recordDialogVisible = false;
+ this.recordSaveLoading = false;
}
});
},
@@ -927,26 +924,260 @@
type: "warning"
})
.then(() => {
- deleteNursingRecord(row.id).then(response => {
- if (response.code === 200) {
- this.$message.success("鍒犻櫎鎴愬姛");
- this.getRecordList();
- }
- });
+ this.recordList = this.recordList.filter(item => item.id !== row.id);
+ this.$message.success("鍒犻櫎鎴愬姛");
})
.catch(() => {});
},
- // 淇濆瓨鍩烘湰淇℃伅
- handleSave() {
- this.$refs.form.validate(valid => {
- if (valid) {
- updateMaintenance(this.form).then(response => {
- if (response.code === 200) {
- this.$message.success("淇濆瓨鎴愬姛");
- this.isEdit = false;
- }
- });
+ // 鍩瑰吇璁板綍闄勪欢鐩稿叧鏂规硶
+ handleCultureAttachmentChange(fileList) {
+ this.cultureFileList = fileList;
+ },
+
+ handleCultureUploadSuccess({ 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.cultureForm.attachments)) {
+ this.cultureForm.attachments = [];
+ }
+
+ this.cultureForm.attachments.push(attachmentObj);
+ this.cultureFileList = fileList;
+ this.$message.success("鏂囦欢涓婁紶鎴愬姛");
+ }
+ },
+
+ handleCultureUploadError({ file, fileList, error }) {
+ console.error("鍩瑰吇璁板綍闄勪欢涓婁紶澶辫触:", error);
+ this.$message.error("鏂囦欢涓婁紶澶辫触锛岃閲嶈瘯");
+ },
+
+ handleCultureAttachmentRemove(file) {
+ if (file.url) {
+ const index = this.cultureForm.attachments.findIndex(
+ item => item.path === file.url || item.fileUrl === file.url
+ );
+ if (index > -1) {
+ this.cultureForm.attachments.splice(index, 1);
+ this.$message.success("闄勪欢鍒犻櫎鎴愬姛");
+ }
+ }
+ },
+
+ // 鎶ょ悊璁板綍闄勪欢鐩稿叧鏂规硶
+ handleRecordAttachmentChange(fileList) {
+ this.recordFileList = fileList;
+ },
+
+ handleRecordUploadSuccess({ 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.recordForm.attachments)) {
+ this.recordForm.attachments = [];
+ }
+
+ this.recordForm.attachments.push(attachmentObj);
+ this.recordFileList = fileList;
+ this.$message.success("鏂囦欢涓婁紶鎴愬姛");
+ }
+ },
+
+ handleRecordUploadError({ file, fileList, error }) {
+ console.error("鎶ょ悊璁板綍闄勪欢涓婁紶澶辫触:", error);
+ this.$message.error("鏂囦欢涓婁紶澶辫触锛岃閲嶈瘯");
+ },
+
+ handleRecordAttachmentRemove(file) {
+ if (file.url) {
+ const index = this.recordForm.attachments.findIndex(
+ item => item.path === file.url || item.fileUrl === file.url
+ );
+ if (index > -1) {
+ this.recordForm.attachments.splice(index, 1);
+ this.$message.success("闄勪欢鍒犻櫎鎴愬姛");
+ }
+ }
+ },
+
+ handleViewCultureAttachments(row) {
+ this.currentAttachmentList = row.attachments || [];
+ this.attachmentPreviewTitle = `鍩瑰吇璁板綍闄勪欢 - ${row.cultureType}`;
+ this.attachmentPreviewVisible = true;
+ },
+
+ handleViewRecordAttachments(row) {
+ this.currentAttachmentList = row.attachments || [];
+ this.attachmentPreviewTitle = `鎶ょ悊鏍告煡璁板綍闄勪欢 - ${row.recorder}`;
+ this.attachmentPreviewVisible = true;
+ },
+
+ handleAttachmentPreviewClose() {
+ this.currentAttachmentList = [];
+ this.attachmentPreviewTitle = "";
+ },
+
+ handlePreviewAttachment(file) {
+ this.currentPreviewFile = {
+ fileName: file.fileName,
+ fileUrl: file.path || file.fileUrl,
+ fileType: this.getFileType(file.fileName)
+ };
+ this.filePreviewVisible = true;
+ },
+
+ handleDownloadAttachment(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("鏂囦欢璺緞涓嶅瓨鍦紝鏃犳硶涓嬭浇");
+ }
+ },
+
+ /** 鑾峰彇鏂囦欢绫诲瀷 */
+ 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";
+ },
+
+ /** 鑾峰彇鏂囦欢鍥炬爣棰滆壊 */
+ getFileIconColor(fileName) {
+ const type = this.getFileType(fileName);
+ const colorMap = {
+ image: "#67C23A",
+ pdf: "#F56C6C",
+ office: "#409EFF",
+ other: "#909399"
+ };
+ return colorMap[type] || "#909399";
+ },
+
+ /** 鑾峰彇鏂囦欢鏍囩绫诲瀷 */
+ getFileTagType(fileName) {
+ const type = this.getFileType(fileName);
+ const typeMap = {
+ image: "success",
+ pdf: "danger",
+ office: "primary",
+ other: "info"
+ };
+ return typeMap[type] || "info";
+ },
+
+ /** 鑾峰彇鏂囦欢绫诲瀷鏂囨湰 */
+ getFileTypeText(fileName) {
+ const type = this.getFileType(fileName);
+ const textMap = {
+ image: "鍥剧墖",
+ pdf: "PDF",
+ office: "鏂囨。",
+ other: "鍏朵粬"
+ };
+ return textMap[type] || "鏈煡";
+ },
+
+ /** 妫�鏌ユ槸鍚﹀彲棰勮 */
+ isPreviewable(fileName) {
+ const type = this.getFileType(fileName);
+ return ["image", "pdf"].includes(type);
+ },
+
+ /** 鑾峰彇鏂囦欢鎵╁睍鍚� */
+ 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(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;
+ }
+ },
+
+ // 璇勪及鏁版嵁鍙樻洿澶勭悊
+ handleLiverKidneyDataChange(data) {
+ this.assessmentData.liverKidney = data;
+ },
+
+ handleBloodRoutineDataChange(data) {
+ this.assessmentData.bloodRoutine = data;
+ },
+
+ handleUrineRoutineDataChange(data) {
+ this.assessmentData.urineRoutine = data;
+ },
+
+ handleTabClick(tab) {
+ this.$nextTick(() => {
+ let tableRef = null;
+ if (tab.name === "liverKidney") {
+ tableRef = this.$refs.liverKidney;
+ } else if (tab.name === "bloodRoutine") {
+ tableRef = this.$refs.bloodRoutine;
+ } else if (tab.name === "urineRoutine") {
+ tableRef = this.$refs.urineRoutine;
+ }
+
+ if (tableRef && tableRef.doLayout) {
+ tableRef.doLayout();
}
});
}
@@ -963,92 +1194,30 @@
margin-bottom: 20px;
}
-.culture-card {
- margin-bottom: 20px;
-}
-
-.record-card {
- margin-bottom: 20px;
-}
-
-.detail-title {
- font-size: 16px;
- font-weight: bold;
-}
-.maintenance-detail {
- padding: 20px;
-}
-
-.detail-card {
- margin-bottom: 20px;
-}
-
-.culture-card {
- margin-bottom: 20px;
-}
-
-.record-card {
- margin-bottom: 20px;
-}
-
-.detail-title {
- font-size: 16px;
- font-weight: bold;
-}
-.medical-panel {
- padding: 20px;
-}
-
-.attachment-section {
- margin-top: 20px;
- padding: 15px;
- border: 1px solid #ebeef5;
- border-radius: 4px;
-}
-
-.attachment-title {
- font-weight: bold;
- margin-bottom: 10px;
- color: #409eff;
-}
-
-.required-item::before {
- content: "*";
- color: #f56c6c;
- margin-right: 4px;
-}
-
.assessment-card {
margin-bottom: 20px;
}
-.medical-table {
- width: 100%;
+.record-card {
margin-bottom: 20px;
}
-.dynamic-column {
- min-width: 120px;
+.detail-title {
+ font-size: 16px;
+ font-weight: bold;
+ margin-right: 20px;
}
+
+.culture-card {
+ margin-bottom: 20px;
+}
+
.fixed-width .el-button {
margin: 0 2px;
}
-/* 璇︽儏瀵硅瘽妗嗘牱寮� */
-:deep(.detail-dialog) {
- width: 500px;
-}
-
-:deep(.detail-dialog .el-message-box__content) {
- line-height: 1.8;
-}
-
-:deep(.detail-dialog ul) {
- margin: 10px 0;
- padding-left: 20px;
-}
-
-:deep(.detail-dialog li) {
- margin-bottom: 5px;
+.file-name {
+ font-size: 13px;
+ margin-left: 8px;
}
</style>
diff --git a/src/views/business/course/components/MedicalAssessmentStage.vue b/src/views/business/course/components/MedicalAssessmentStage.vue
index e96310a..e05103c 100644
--- a/src/views/business/course/components/MedicalAssessmentStage.vue
+++ b/src/views/business/course/components/MedicalAssessmentStage.vue
@@ -1,87 +1,374 @@
<template>
<div class="assessment-detail">
+ <el-card class="basic-info-card">
+ <div slot="header" class="clearfix">
+ <span>妗堜緥鍩烘湰淇℃伅</span>
+ <el-button
+ style="float: right; padding: 3px 0"
+ type="text"
+ @click="handleAttachmentPreview"
+ >
+ <i class="el-icon-folder-opened"></i> 鏌ョ湅闄勪欢
+ </el-button>
+ </div>
+ <el-descriptions :column="2" border>
+ <el-descriptions-item label="浣忛櫌鍙�">{{
+ assessmentData.caseNo
+ }}</el-descriptions-item>
+ <el-descriptions-item label="娼滃湪鎹愮尞鑰呭鍚�">{{
+ assessmentData.name || assessmentData.donorName
+ }}</el-descriptions-item>
+ <el-descriptions-item label="鎬у埆">
+ <dict-tag
+ :options="dict.type.sys_user_sex"
+ :value="assessmentData.sex"
+ />
+ </el-descriptions-item>
+ <el-descriptions-item label="骞撮緞"
+ >{{ assessmentData.age }}宀�</el-descriptions-item
+ >
+ <el-descriptions-item label="琛�鍨�">
+ {{ assessmentData.bloodtype }}
+ </el-descriptions-item>
+ <el-descriptions-item label="璇佷欢鍙风爜">{{
+ assessmentData.idcardno
+ }}</el-descriptions-item>
+ <el-descriptions-item label="鐤剧梾璇婃柇">{{
+ assessmentData.diagnosisname
+ }}</el-descriptions-item>
+ <el-descriptions-item label="鎵�鍦ㄥ尰鐤楁満鏋�">{{
+ assessmentData.treatmenthospitalname
+ }}</el-descriptions-item>
+ <el-descriptions-item label="鍗忚皟鍛�">{{
+ assessmentData.coordinatorName
+ }}</el-descriptions-item>
+ <el-descriptions-item label="璇勪及鏃堕棿">{{
+ assessmentData.assessTime
+ }}</el-descriptions-item>
+ <el-descriptions-item label="璇勪及鐘舵��">
+ <el-tag :type="statusFilter(assessmentData.assessState)">
+ {{ statusTextFilter(assessmentData.assessState) }}
+ </el-tag>
+ </el-descriptions-item>
+ </el-descriptions>
+ </el-card>
<el-card class="organ-assessment-card">
<div slot="header" class="clearfix">
<span>鍣ㄥ畼璇勪及琛�</span>
- <!-- <el-button
+ <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">
+ </el-button>
+ <span v-if="!isCoordinator" class="jstitle">
褰撳墠瑙掕壊锛歿{ currentDepartment }}璇勪及浜哄憳
- </span> -->
+ </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>
+ </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-form-item>
+ </el-form>
+
+ <!-- 鍣ㄥ畼璇勪及琛ㄦ牸 -->
<el-table
- :data="organAssessmentList"
+ :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)"
+ >
+ <!-- 鍔ㄦ�佺敓鎴愯瘎浼癟ab -->
+ <el-tab-pane
+ v-for="(assessment, index) in getOrganAssessments(scope.row)"
+ :key="`${scope.row.organno}_${index}`"
+ :label="`绗�${index + 1}娆¤瘎浼癭"
+ :name="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"
+ >
+ <template slot="label">
+ <el-button
+ type="text"
+ icon="el-icon-plus"
+ @click.stop="handleAddNewAssessment(scope.row)"
+ size="mini"
+ >
+ 鏂板璇勪及
+ </el-button>
+ </template>
+ <div class="add-assessment-prompt">
+ <el-empty description="鐐瑰嚮涓婃柟鎸夐挳娣诲姞鏂扮殑璇勪及"></el-empty>
+ </div>
+ </el-tab-pane>
+
+ <!-- 璇勪及姹囨�籘ab -->
+ <el-tab-pane label="璇勪及姹囨��" name="summary">
+ <div class="assessment-summary">
+ <!-- 鍩烘湰淇℃伅姹囨�� -->
+ <el-descriptions title="鍩烘湰淇℃伅姹囨��" :column="2" border>
+ <el-descriptions-item label="鍣ㄥ畼绫诲瀷">
+ <span class="summary-item">{{ getOrganLabel(scope.row.organno) }}</span>
+ </el-descriptions-item>
+ <el-descriptions-item label="鑾峰彇鏈烘瀯">
+ <span class="summary-item">{{ scope.row.gainhospitalname }}</span>
+ </el-descriptions-item>
+ <el-descriptions-item label="璇勪及娆℃暟" :span="2">
+ <el-tag type="info" size="medium">
+ {{ getAssessmentCount(scope.row) }}娆�
+ </el-tag>
+ </el-descriptions-item>
+ <el-descriptions-item label="鏈�鏂拌瘎浼版椂闂�" :span="2">
+ <span class="highlight-text">{{ getLatestAssessmentTime(scope.row) || "-" }}</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-empty description="鏆傛棤璇勪及璁板綍"></el-empty>
+ </div>
+
+ <div v-else>
+ <!-- 姣忔璇勪及璇︽儏 -->
+ <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"
+ >
+ {{ getAssessmentStatusText(assessment.status) }}
+ </el-tag>
+ </div>
+
+ <el-descriptions :column="2" border class="detail-descriptions">
+ <el-descriptions-item label="璇勪及鏃堕棿" :span="2">
+ <span class="time-text">{{ assessment.assessmentTime || "-" }}</span>
+ </el-descriptions-item>
+
+ <el-descriptions-item label="璇勪及浜�">
+ <el-tag type="info" size="small">
+ {{ assessment.assessor || "鏈~鍐�" }}
+ </el-tag>
+ </el-descriptions-item>
+
+ <el-descriptions-item label="鍔熻兘鐘舵��">
+ <el-tag
+ :type="getFunctionStatusTagType(assessment.functionStatus)"
+ size="small"
+ >
+ {{ getFunctionStatusText(assessment.functionStatus) }}
+ </el-tag>
+ </el-descriptions-item>
+
+ <el-descriptions-item label="璇勪及鎰忚" :span="2">
+ <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-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>
+ </el-descriptions-item>
+ </el-descriptions>
+ </el-card>
+ </div>
+ </div>
+ </el-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"
+ >
+ {{ scope.row.isbiopsybefore === "1" ? "鏄�" : "鍚�" }}
+ </el-tag>
+ </el-descriptions-item>
+ <el-descriptions-item label="鑾峰彇鍚庢椿妫�">
+ <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"
+ >
+ {{
+ scope.row.ismarginalorgan === "1" ? "鏄�" : "鍚�"
+ }}
+ </el-tag>
+ </el-descriptions-item>
+ <el-descriptions-item label="鐥呭師鑿岄槼鎬�">
+ <el-tag
+ :type="
+ scope.row.ispathogenpositive === '1'
+ ? 'danger'
+ : 'info'
+ "
+ size="small"
+ >
+ {{
+ scope.row.ispathogenpositive === "1" ? "鏄�" : "鍚�"
+ }}
+ </el-tag>
+ </el-descriptions-item>
+ </el-descriptions>
+ </el-card>
+ </div>
+</el-tab-pane>
+ </el-tabs>
+ </div>
+ </template>
+ </el-table-column>
+
+ <el-table-column label="鍣ㄥ畼绫诲瀷" align="center" prop="organname">
+ <template slot-scope="scope">
+ {{ getOrganLabel(scope.row.organno) }}
+ </template>
+ </el-table-column>
+
+ <el-table-column label="鍣ㄥ畼缂栧彿" align="center" prop="organnumber" />
+
<el-table-column
- label="鍣ㄥ畼绫诲瀷"
+ label="鑾峰彇鏈烘瀯"
align="center"
- prop="organType"
+ prop="gainhospitalname"
+ show-overflow-tooltip
+ />
+
+ <!-- 鍔ㄦ�佹樉绀鸿瘎浼扮姸鎬佸垪 -->
+ <el-table-column
+ v-for="index in getMaxAssessmentCount()"
+ :key="index"
+ :label="`绗�${index}娆¤瘎浼癭"
+ align="center"
width="120"
>
<template slot-scope="scope">
- <dict-tag
- :options="organTypeOptions"
- :value="scope.row.organType"
- />
- </template>
- </el-table-column>
- <el-table-column
- label="璇勪及绉戝"
- align="center"
- prop="department"
- width="120"
- />
- <el-table-column
- label="璇勪及浜哄憳"
- align="center"
- prop="assessor"
- width="100"
- />
- <el-table-column label="璇勪及鐘舵��" align="center" width="100">
- <template slot-scope="scope">
<el-tag
- :type="scope.row.assessmentStatus === '1' ? 'success' : 'warning'"
+ v-if="getOrganAssessments(scope.row)[index - 1]"
+ :type="
+ getAssessmentTagType(
+ getOrganAssessments(scope.row)[index - 1].status
+ )
+ "
size="small"
>
- {{ scope.row.assessmentStatus === "1" ? "宸茶瘎浼�" : "寰呰瘎浼�" }}
+ {{
+ getAssessmentStatusText(
+ getOrganAssessments(scope.row)[index - 1].status
+ )
+ }}
+ </el-tag>
+ <el-tag v-else type="info" size="small">鏈瘎浼�</el-tag>
+ </template>
+ </el-table-column>
+
+ <el-table-column label="鏁翠綋鐘舵��" align="center" width="100">
+ <template slot-scope="scope">
+ <el-tag
+ :type="
+ getOrganOverallStatus(scope.row) === 'completed'
+ ? 'success'
+ : getOrganOverallStatus(scope.row) === 'assessing'
+ ? 'primary'
+ : 'warning'
+ "
+ size="small"
+ >
+ {{ getOrganOverallStatusText(scope.row) }}
</el-tag>
</template>
</el-table-column>
- <el-table-column label="鍔熻兘鐘舵��" align="center" width="100">
- <template slot-scope="scope">
- <el-tag
- :type="getFunctionStatusType(scope.row.functionStatus)"
- size="small"
- >
- {{ getFunctionStatusText(scope.row.functionStatus) }}
- </el-tag>
- </template>
- </el-table-column>
- <el-table-column
- label="璇勪及鎰忚"
- align="center"
- prop="assessmentOpinion"
- min-width="150"
- show-overflow-tooltip
- />
- <el-table-column label="璇勪及鏃堕棿" align="center" width="120">
- <template slot-scope="scope">
- <span>{{ scope.row.assessmentTime || "-" }}</span>
- </template>
- </el-table-column>
+
<el-table-column
label="鎿嶄綔"
align="center"
@@ -90,264 +377,995 @@
>
<template slot-scope="scope">
<el-button
- v-if="canAssessOrgan(scope.row)"
+ v-if="canAssessOrgan(scope.row) && isEdit"
size="mini"
type="text"
- @click="handleOrganAssess(scope.row)"
- >{{
- scope.row.assessmentStatus === "1" ? "鏌ョ湅/淇敼" : "璇勪及"
- }}</el-button
+ @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)"
+ >
+ {{
+ expandedRowKeys.includes(scope.row.organno) ? "鏀惰捣" : "鏌ョ湅"
+ }}
+ </el-button>
<el-button v-else size="mini" type="text" disabled
>鏃犳潈闄�</el-button
- >
- <el-button
- v-if="isCoordinator"
- size="mini"
- type="text"
- @click="handleViewOrganDetail(scope.row)"
- >璇︽儏</el-button
>
</template>
</el-table-column>
</el-table>
-
- <!-- 鍣ㄥ畼璇勪及璇︽儏 -->
- <el-collapse
- v-model="activeOrgans"
- accordion
- class="organ-detail-collapse"
- >
- <el-collapse-item
- v-for="organ in organAssessmentList"
- :key="organ.organType"
- :name="organ.organType"
- :title="getOrganTitle(organ)"
- >
- <organ-assessment-form
- :organ-data="organ"
- :readonly="!canAssessOrgan(organ)"
- @save="handleSaveOrganAssessment"
- />
- </el-collapse-item>
- </el-collapse>
</el-card>
- <!-- 闄勪欢棰勮寮圭獥 -->
- <attachment-preview
+ <!-- 鏁翠綋淇濆瓨鎸夐挳 -->
+ <div class="footer-actions" v-if="isEdit">
+ <el-button type="primary" @click="handleSaveAll" :loading="saveLoading"
+ >淇濆瓨璇勪及琛�</el-button
+ >
+ <el-button @click="handleCancel">鍙栨秷</el-button>
+ </div>
+
+ <!-- 鏂囦欢棰勮寮圭獥 -->
+ <FilePreviewDialog
:visible="attachmentVisible"
- :attachment-list="attachmentList"
+ :file="currentPreviewFile"
@close="attachmentVisible = false"
/>
</div>
</template>
<script>
-// import { getAssessment, updateOrganAssessment, completeAssessment } from "@/api/case/assessment";
import {
- getAssessment,
- updateOrganAssessment,
- completeAssessment
-} from "./api/mockAssessmentApi";
-
-import OrganAssessmentForm from "./components/OrganAssessmentForm.vue";
-import AttachmentPreview from "./components/AttachmentPreview.vue";
+ evaluateBaseInfolist,
+ assessedit,
+ assessAdd
+} from "@/api/businessApi/index";
+import FilePreviewDialog from "@/components/FilePreviewDialog";
+import OrganAssessmentForm from "@/components/assessInfoComponents/OrganAssessmentForm.vue";
export default {
name: "AssessmentDetail",
- components: { OrganAssessmentForm, AttachmentPreview },
+ components: { OrganAssessmentForm, FilePreviewDialog },
+ dicts: ["sys_user_sex", "sys_Organ", "sys_0_1"],
+ props: {
+ infoid: {
+ type: String,
+ default: true
+ }
+ },
data() {
return {
- // 璇勪及ID
- assessmentId: undefined,
- // 璇勪及鏁版嵁
- assessmentData: {},
- // 鍣ㄥ畼璇勪及鍒楄〃
- organAssessmentList: [],
- // 闄勪欢鍒楄〃
- attachmentList: [],
+ // 鏄惁缂栬緫妯″紡
+ isEdit: false,
// 鍔犺浇鐘舵��
assessmentLoading: false,
- // 褰撳墠鐢ㄦ埛淇℃伅
+ saveLoading: false,
+ // 鏁版嵁ID
+
+ assessmentId: undefined,
+ // 涓昏鏁版嵁
+ assessmentData: {},
+ organAssessmentList: [], // 鎵�鏈夊櫒瀹樻暟鎹�
+ // 灞曞紑琛岀浉鍏�
+ expandedRowKeys: [],
+ // 闄勪欢鐩稿叧
+ currentPreviewFile: null,
+ attachmentVisible: false,
+ // 鎹愮尞鍐冲畾鐩稿叧
+ organdecisionValues: [], // 瀛樺偍瀛楀吀value
+ organdecisionOther: "",
+ // 璁板綍鎹愮尞鍐冲畾鍙樺寲鍓嶇殑鍊�
+ prevOrgandecisionValues: [],
+ // 鍣ㄥ畼绫诲瀷鏄犲皠鍏崇郴
+ organDecisionMapping: {
+ C38: ["C38"], // 蹇冭剰 -> 蹇冭剰
+ C22: ["C22"], // 鍏ㄨ倽 -> 鍏ㄨ倽
+ C22L: ["C22L"], // 宸﹀崐鑲� -> 宸﹀崐鑲�
+ C22L0: ["C22L0"], // 宸﹀鍙� -> 宸﹀鍙�
+ C22R: ["C22R"], // 鍙冲崐鑲� -> 鍙冲崐鑲�
+ C22R0: ["C22R0"], // 鍙充笁鍙� -> 鍙充笁鍙�
+ C64: ["C64L", "C64R"], // 鍙岃偩 -> 宸﹁偩, 鍙宠偩
+ C64L: ["C64L"], // 宸﹁偩 -> 宸﹁偩
+ C64R: ["C64R"], // 鍙宠偩 -> 鍙宠偩
+ C34: ["C34L", "C34R"], // 鍏ㄨ偤 -> 宸﹁偤, 鍙宠偤
+ C34L: ["C34L"], // 宸﹁偤 -> 宸﹁偤
+ C34R: ["C34R"], // 鍙宠偤 -> 鍙宠偤
+ C17: ["C17"], // 灏忚偁 -> 灏忚偁
+ C25: ["C25"], // 鑳拌吅 -> 鑳拌吅
+ C00: [], // 閬椾綋 -> 涓嶆槧灏勫叿浣撳櫒瀹橈紙閬椾綋鏄暣浣擄級
+ C69L: ["C69L"], // 宸︾溂瑙掕啘 -> 宸︾溂瑙掕啘
+ C69R: ["C69R"], // 鍙崇溂瑙掕啘 -> 鍙崇溂瑙掕啘
+ C01: [] // 鍏朵粬 -> 涓嶆槧灏勫叿浣撳櫒瀹�
+ },
+ // 鐢ㄦ埛淇℃伅
currentUser: {
id: "001",
name: "寮犲尰鐢�",
- department: "蹇冭剰澶栫",
- role: "department" // coordinator: 鍗忚皟鍛�, department: 绉戝浜哄憳
+ department: "蹇冭剰绉�",
+ role: "coordinator"
},
- // 灞曞紑鐨勫櫒瀹�
- activeOrgans: [],
- // 闄勪欢棰勮鍙鎬�
- attachmentVisible: false,
- // 瀛楀吀閫夐」
- genderOptions: [
- { value: "0", label: "鐢�" },
- { value: "1", label: "濂�" }
- ],
- bloodTypeOptions: [
- { value: "A", label: "A鍨�" },
- { value: "B", label: "B鍨�" },
- { value: "O", label: "O鍨�" },
- { value: "AB", label: "AB鍨�" }
- ],
- assessmentTypeOptions: [
- { value: "1", label: "鍒濇璇勪及" },
- { value: "2", label: "鏈�缁堣瘎浼�" }
- ],
- organTypeOptions: [
- { value: "heart", label: "蹇冭剰" },
- { value: "liver", label: "鑲濊剰" },
- { value: "kidney", label: "鑲捐剰" },
- { value: "lung", label: "鑲鸿剰" },
- { value: "pancreas", label: "鑳拌吅" },
- { value: "intestine", label: "鑲犻亾" },
- { value: "cornea", label: "瑙掕啘" },
- { value: "skin", label: "鐨偆" }
- ]
+ // 璁板綍琚垹闄ょ殑鍣ㄥ畼璇勪及
+ deletedOrganAssessments: [],
+ // 鐢ㄤ簬杩借釜tab婵�娲荤姸鎬�
+ activeTabMap: new Map(),
+ // 鍒锋柊key
+ refreshKey: 0
};
},
computed: {
- // 鏄惁鏄崗璋冨憳
isCoordinator() {
return this.currentUser.role === "coordinator";
},
- // 褰撳墠绉戝
currentDepartment() {
return this.currentUser.department;
},
- // 鎵�鏈夊櫒瀹樻槸鍚﹂兘宸茶瘎浼�
- allOrgansAssessed() {
- return this.organAssessmentList.every(
- organ => organ.assessmentStatus === "1"
+ // 鏍规嵁鎹愮尞鍐冲畾杩囨护鍚庣殑鍣ㄥ畼鍒楄〃
+ filteredOrganAssessmentList() {
+ if (!this.organdecisionValues || this.organdecisionValues.length === 0) {
+ return [];
+ }
+
+ const selectedOrgans = new Set();
+ this.organdecisionValues.forEach(decision => {
+ const organs = this.organDecisionMapping[decision] || [];
+ organs.forEach(organ => selectedOrgans.add(organ));
+ });
+
+ return this.organAssessmentList.filter(
+ organ =>
+ selectedOrgans.has(organ.organno) &&
+ organ.delFlag !== "1" &&
+ !this.deletedOrganAssessments.includes(organ.organno)
);
+ },
+ // 妫�鏌ユ墍鏈夎繃婊ゅ悗鐨勫櫒瀹樻槸鍚﹂兘宸茶瘎浼�
+ allOrgansAssessed() {
+ return this.filteredOrganAssessmentList.every(organ => {
+ const assessments = this.getOrganAssessments(organ);
+ return (
+ assessments &&
+ assessments.length > 0 &&
+ assessments.every(assessment => assessment.status === "assessed")
+ );
+ });
+ },
+ // 鑾峰彇鍣ㄥ畼瀛楀吀
+ organDict() {
+ return this.dict.type.sys_Organ || [];
+ },
+ // 鍒ゆ柇鏄惁闇�瑕佹樉绀哄叾浠栬緭鍏ユ
+ showOtherInput() {
+ return this.organdecisionValues.includes("C01");
+ }
+ },
+ watch: {
+ // 鐩戝惉鎹愮尞鍐冲畾鍙樺寲锛岀敤浜庡鏉傞�昏緫澶勭悊
+ organdecisionValues: {
+ handler(newVal, oldVal) {
+ this.handleComplexDecisionChange(newVal, oldVal);
+ },
+ deep: true
}
},
created() {
this.assessmentId = this.$route.query.id;
+ this.isEdit = this.$route.query.assess === "true";
this.getAssessmentDetail();
},
methods: {
- // 鑾峰彇璇勪及璇︽儏 - 浣跨敤Mock鏁版嵁
- getAssessmentDetail() {
- this.assessmentLoading = true;
- getAssessment(this.assessmentId)
- .then(response => {
- if (response.code === 200) {
- this.assessmentData = response.data.caseInfo;
- this.organAssessmentList = response.data.organAssessments || [];
- this.attachmentList = response.data.attachments || [];
- } else {
- this.$message.error("鑾峰彇璇勪及璇︽儏澶辫触");
+ // 鏍规嵁瀛楀吀value鑾峰彇label
+ getOrganLabel(organValue) {
+ const dictItem = this.organDict.find(item => item.value === organValue);
+ return dictItem ? dictItem.label : organValue;
+ },
+
+ // Tab鐐瑰嚮浜嬩欢
+ handleTabClick(organ, tab) {
+ if (tab.name !== "add") {
+ this.activeTabMap.set(organ.organno, tab.name);
+ }
+ },
+// 鑾峰彇鍔熻兘鐘舵�佹爣绛剧被鍨�
+ getFunctionStatusTagType(status) {
+ const typeMap = {
+ "1": "success", // 姝e父
+ "2": "warning", // 杞诲害寮傚父
+ "3": "danger", // 閲嶅害寮傚父
+ "4": "info" // 鏃犳硶璇勪及
+ };
+ return typeMap[status] || "info";
+ },
+
+ // 鑾峰彇鍔熻兘鐘舵�佹枃鏈�
+ getFunctionStatusText(status) {
+ const textMap = {
+ "1": "姝e父",
+ "2": "杞诲害寮傚父",
+ "3": "閲嶅害寮傚父",
+ "4": "鏃犳硶璇勪及"
+ };
+ return textMap[status] || "鏈瘎浼�";
+ },
+
+ // 鏄剧ず闄勪欢鍒楄〃
+ showAttachmentList(attachments, assessmentNumber) {
+ if (!attachments || attachments.length === 0) {
+ this.$message.info(`绗�${assessmentNumber}娆¤瘎浼版殏鏃犻檮浠禶);
+ return;
+ }
+
+ this.$alert(
+ `<div>
+ <h4>绗�${assessmentNumber}娆¤瘎浼伴檮浠跺垪琛�</h4>
+ <ul style="list-style: none; padding-left: 0;">
+ ${attachments.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>
+ <el-button
+ type="text"
+ size="mini"
+ onclick="window.open('${item.path || item.fileUrl}')"
+ style="margin-left: 10px;"
+ >
+ 涓嬭浇
+ </el-button>
+ </li>
+ `).join('')}
+ </ul>
+ </div>`,
+ '闄勪欢鍒楄〃',
+ {
+ dangerouslyUseHTMLString: true,
+ showConfirmButton: false,
+ showCancelButton: true,
+ cancelButtonText: '鍏抽棴'
+ }
+ );
+ },
+ // 鑾峰彇鍣ㄥ畼鐨勮瘎浼板垪琛�
+ getOrganAssessments(organ) {
+ if (!organ.assesscontent) return [];
+ try {
+ const assessData =
+ typeof organ.assesscontent === "string"
+ ? JSON.parse(organ.assesscontent)
+ : organ.assesscontent;
+
+ if (Array.isArray(assessData)) {
+ return assessData.filter(item => item.delFlag !== "1");
+ }
+ return [];
+ } catch (error) {
+ console.warn("瑙f瀽璇勪及鍐呭澶辫触:", error);
+ return [];
+ }
+ },
+
+ // 鑾峰彇璇勪及鏁伴噺
+ getAssessmentCount(organ) {
+ return this.getOrganAssessments(organ).length;
+ },
+
+ // 澶勭悊璇勪及鏇存柊
+ handleUpdateAssessment(data) {
+ const { organData, assessmentData, assessmentIndex } = data;
+ const assessments = this.getOrganAssessments(organData);
+
+ if (assessments[assessmentIndex]) {
+ // 鍒涘缓鏂扮殑璇勪及鏁扮粍
+ const newAssessments = [...assessments];
+ newAssessments[assessmentIndex] = {
+ ...assessments[assessmentIndex],
+ ...assessmentData
+ };
+
+ // 鏇存柊 assesscontent
+ this.$set(organData, "assesscontent", JSON.stringify(newAssessments));
+ this.$forceUpdate();
+ }
+ },
+
+ // 鏁翠綋淇濆瓨鏂规硶
+ async handleSaveAll() {
+ this.saveLoading = true;
+ try {
+ const saveData = {
+ id: this.assessmentData.id || undefined,
+ infoid: this.infoid,
+ caseNo: this.assessmentData.caseNo,
+ donorno: this.assessmentData.donorno,
+ treatmenthospitalname: this.assessmentData.treatmenthospitalname,
+ treatmenthospitalno: this.assessmentData.treatmenthospitalno,
+ sex: this.assessmentData.sex,
+ age: this.assessmentData.age,
+ bloodtype: this.assessmentData.bloodtype,
+ idcardno: this.assessmentData.idcardno,
+ diagnosisname: this.assessmentData.diagnosisname,
+ coordinatorName: this.assessmentData.coordinatorName,
+ assessTime:
+ this.assessmentData.assessTime || new Date().toISOString(),
+ assessState: this.assessmentData.assessState,
+ assessannex: this.assessmentData.assessannex,
+ organdecision: this.organdecisionValues.join(","),
+ organdecisionOther: this.organdecisionOther,
+ serviceMedicalevaluationorganList: this.organAssessmentList.map(
+ organ => ({
+ id: organ.id,
+ infoid: organ.infoid,
+ donorno: organ.donorno,
+ organno: organ.organno,
+ organname: this.getOrganLabel(organ.organno),
+ organnumber: organ.organnumber,
+ gainhospitalno: organ.gainhospitalno,
+ gainhospitalname: organ.gainhospitalname,
+ isbiopsybefore: organ.isbiopsybefore,
+ isbiopsyafter: organ.isbiopsyafter,
+ ismarginalorgan: organ.ismarginalorgan,
+ ispathogenpositive: organ.ispathogenpositive,
+ ispnf: organ.ispnf,
+ isdgf: organ.isdgf,
+ delFlag: organ.delFlag || "0",
+ assesscontent: organ.assesscontent || "[]"
+ })
+ )
+ };
+
+ const saveMethod = this.assessmentData.id ? assessedit : assessAdd;
+ const response = await saveMethod(saveData);
+
+ if (response.code === 200) {
+ this.$message.success("璇勪及琛ㄤ繚瀛樻垚鍔燂紒");
+ if (!this.assessmentData.id && response.data && response.data.id) {
+ this.assessmentData.id = response.data.id;
}
- this.assessmentLoading = false;
- })
- .catch(error => {
- console.error("鑾峰彇璇勪及璇︽儏澶辫触:", error);
- this.assessmentLoading = false;
- this.$message.error("鑾峰彇璇勪及璇︽儏澶辫触");
+ this.refreshKey += 1; // 瑙﹀彂閲嶆柊娓叉煋
+ } else {
+ this.$message.error("淇濆瓨澶辫触锛�" + (response.msg || "鏈煡閿欒"));
+ }
+ } catch (error) {
+ console.error("淇濆瓨璇勪及琛ㄥけ璐�:", error);
+ this.$message.error("淇濆瓨澶辫触锛岃閲嶈瘯");
+ } finally {
+ this.saveLoading = false;
+ }
+ },
+
+ // 鍙栨秷鎸夐挳浜嬩欢
+ handleCancel() {
+ this.$router.go(-1);
+ },
+
+ // 鎹愮尞鍐冲畾鍙樻洿澶勭悊
+ async handleOrganDecisionChange(newDecision) {
+ const oldDecision = [...this.prevOrgandecisionValues];
+ this.autoHandleDecisionChange(newDecision);
+
+ const removedDecisions = oldDecision.filter(
+ item => !newDecision.includes(item)
+ );
+
+ for (const decision of removedDecisions) {
+ await this.handleRemovedDecision(decision);
+ }
+
+ this.prevOrgandecisionValues = [...newDecision];
+ this.$forceUpdate();
+
+ if (newDecision.length === 0) {
+ this.expandedRowKeys = [];
+ }
+ },
+
+ // 鍏朵粬鎹愮尞鍐冲畾杈撳叆澶勭悊
+ handleOtherDecisionInput(value) {
+ // 杈撳叆鏃朵笉鍋氬崟鐙繚瀛橈紝绛夊緟鏁翠綋淇濆瓨
+ },
+
+ // 鑷姩澶勭悊鍐冲畾鍙樻洿閫昏緫
+ autoHandleDecisionChange(newDecision) {
+ // 濡傛灉閫夋嫨浜�"鍙岃偩"(value: C64)锛岃嚜鍔ㄥ彇娑堝崟鐙殑"宸﹁偩"(value: C64L)鍜�"鍙宠偩"(value: C64R)閫夋嫨
+ if (newDecision.includes("C64")) {
+ this.organdecisionValues = newDecision.filter(
+ item => item !== "C64L" && item !== "C64R"
+ );
+ }
+ // 濡傛灉閫夋嫨浜�"宸﹁偩"鎴�"鍙宠偩"锛屽彇娑�"鍙岃偩"閫夋嫨
+ else if (newDecision.includes("C64L") || newDecision.includes("C64R")) {
+ this.organdecisionValues = newDecision.filter(item => item !== "C64");
+ }
+
+ // 濡傛灉閫夋嫨浜�"鍏ㄨ偤"(value: C34)锛岃嚜鍔ㄥ彇娑堝崟鐙殑"宸﹁偤"(value: C34L)鍜�"鍙宠偤"(value: C34R)閫夋嫨
+ if (newDecision.includes("C34")) {
+ this.organdecisionValues = newDecision.filter(
+ item => item !== "C34L" && item !== "C34R"
+ );
+ }
+ // 濡傛灉閫夋嫨浜�"宸﹁偤"鎴�"鍙宠偤"锛屽彇娑�"鍏ㄨ偤"閫夋嫨
+ else if (newDecision.includes("C34L") || newDecision.includes("C34R")) {
+ this.organdecisionValues = newDecision.filter(item => item !== "C34");
+ }
+
+ // 澶勭悊鍏朵粬浜掓枼閫昏緫
+ this.handleExclusiveDecisions();
+ },
+
+ // 澶勭悊浜掓枼鐨勬崘鐚喅瀹�
+ handleExclusiveDecisions() {
+ // 閬椾綋鎹愮尞(value: 10)涓庡叾浠栧櫒瀹樻崘鐚簰鏂ワ紙鏍规嵁涓氬姟闇�姹傝皟鏁达級
+ if (this.organdecisionValues.includes("10")) {
+ // 鍙互璁剧疆鍙繚鐣欓仐浣撴崘鐚紝鎴栬�呮牴鎹笟鍔¢渶姹傚鐞�
+ }
+ },
+
+ // 澶嶆潅鍐崇瓥鍙樺寲澶勭悊
+ handleComplexDecisionChange(newVal, oldVal) {
+ // 澶勭悊鏂板鐨勯�夋嫨
+ const addedDecisions = newVal.filter(item => !oldVal.includes(item));
+ const removedDecisions = oldVal.filter(item => !newVal.includes(item));
+
+ // 瀵规柊澧炲姞鐨勯�夋嫨杩涜鐗规畩澶勭悊
+ addedDecisions.forEach(decision => {
+ this.handleNewDecision(decision);
+ });
+
+ // 瀵圭Щ闄ょ殑閫夋嫨杩涜娓呯悊
+ removedDecisions.forEach(decision => {
+ this.handleRemovedDecision(decision);
+ });
+ },
+
+ // 澶勭悊鏂板鐨勬崘鐚喅瀹�
+ handleNewDecision(decision) {
+ // 鏍规嵁鏄犲皠鍏崇郴鑷姩鍒涘缓瀵瑰簲鐨勫櫒瀹樿瘎浼伴」
+ this.autoCreateOrganAssessments(decision);
+ },
+
+ // 鑷姩鍒涘缓鍣ㄥ畼璇勪及椤�
+ autoCreateOrganAssessments(decision) {
+ const organsToCreate = this.organDecisionMapping[decision];
+
+ if (organsToCreate && organsToCreate.length > 0) {
+ organsToCreate.forEach(organValue => {
+ this.ensureOrganExists(organValue);
});
+
+ // 鏄剧ず鍒涘缓鎻愮ず
+ if (organsToCreate.length > 0) {
+ this.$message.success(
+ `宸蹭负銆�${this.getOrganLabel(decision)}銆戝垱寤�${
+ organsToCreate.length
+ }涓瘎浼伴」`
+ );
+ }
+ } else {
+ console.warn(
+ `鎹愮尞鍐冲畾銆�${this.getOrganLabel(decision)}銆戞病鏈夐厤缃櫒瀹樻槧灏勫叧绯籤
+ );
+ }
},
- // 鐘舵�佽繃婊ゅ櫒
- statusFilter(status) {
- const statusMap = {
- "0": "warning",
- "1": "primary",
- "2": "success",
- "3": "danger"
+
+ // 澶勭悊绉婚櫎鐨勬崘鐚喅瀹�
+ async handleRemovedDecision(decision) {
+ const relatedOrgans = this.organDecisionMapping[decision] || [];
+
+ for (const organValue of relatedOrgans) {
+ const organIndex = this.organAssessmentList.findIndex(
+ organ => organ.organno === organValue && organ.delFlag !== "1"
+ );
+
+ if (organIndex !== -1) {
+ const organ = this.organAssessmentList[organIndex];
+ const organLabel = this.getOrganLabel(organValue);
+
+ try {
+ await this.$confirm(
+ `鎹愮尞鍐冲畾"${this.getOrganLabel(
+ decision
+ )}"宸插彇娑堬紝鏄惁鍒犻櫎瀵瑰簲鐨�${organLabel}璇勪及璁板綍锛焋,
+ "纭鍒犻櫎",
+ {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning"
+ }
+ );
+
+ this.$set(this.organAssessmentList[organIndex], "delFlag", "1");
+ this.deletedOrganAssessments.push(organValue);
+
+ const keyIndex = this.expandedRowKeys.indexOf(organValue);
+ if (keyIndex > -1) {
+ this.expandedRowKeys.splice(keyIndex, 1);
+ }
+
+ this.$message.success(`${organLabel}璇勪及璁板綍宸叉爣璁板垹闄);
+ } catch (cancelError) {
+ if (!this.organdecisionValues.includes(decision)) {
+ this.organdecisionValues.push(decision);
+ }
+ this.$message.info(`宸插彇娑堝垹闄�${organLabel}璇勪及璁板綍`);
+ }
+ }
+ }
+ },
+
+ // 纭繚鍣ㄥ畼瀛樺湪
+ ensureOrganExists(organValue) {
+ const exists = this.organAssessmentList.some(
+ organ => organ.organno === organValue && organ.delFlag !== "1"
+ );
+
+ if (!exists) {
+ const newOrgan = {
+ id: null,
+ organno: organValue,
+ organname: this.getOrganLabel(organValue),
+ gainhospitalname: "寰呭垎閰嶆満鏋�",
+ isbiopsybefore: "0",
+ isbiopsyafter: "0",
+ ismarginalorgan: "0",
+ ispathogenpositive: "0",
+ assesscontent: JSON.stringify([this.getDefaultAssessment(0)]),
+ activeTab: 0,
+ expanded: false,
+ createTime: new Date().toISOString(),
+ delFlag: "0"
+ };
+
+ this.organAssessmentList = [...this.organAssessmentList, newOrgan];
+ return true;
+ }
+ return false;
+ },
+
+ // 鑾峰彇璇勪及璇︽儏
+ async getAssessmentDetail() {
+ this.assessmentLoading = true;
+ try {
+ const response = await evaluateBaseInfolist({ infoid: this.infoid });
+
+ if (response.code === 200) {
+ this.handleResponseData(response);
+ } else {
+ this.$message.error("鑾峰彇璇︽儏澶辫触锛�" + (response.msg || "鏈煡閿欒"));
+ }
+ } catch (error) {
+ console.error("鑾峰彇璇勪及璇︽儏澶辫触:", error);
+ this.$message.error("鑾峰彇璇︽儏澶辫触");
+ } finally {
+ this.assessmentLoading = false;
+ }
+ },
+
+ // 澶勭悊鎺ュ彛鍝嶅簲鏁版嵁
+ handleResponseData(response) {
+ let detailData = null;
+
+ if (response.data) {
+ if (Array.isArray(response.data)) {
+ detailData = response.data[0] || {};
+ } else if (response.data.rows && Array.isArray(response.data.rows)) {
+ detailData = response.data.rows[0] || {};
+ } else if (Array.isArray(response.data.list)) {
+ detailData = response.data.list[0] || {};
+ } else {
+ detailData = response.data;
+ }
+ } else {
+ detailData = response;
+ }
+
+ this.assessmentData = {
+ id: detailData.id || this.assessmentId,
+ infoid: detailData.infoid || this.infoid,
+ caseNo: detailData.caseNo || "",
+ name: detailData.name || detailData.donorName || "",
+ sex: detailData.sex || "",
+ age: detailData.age || "",
+ bloodtype: detailData.bloodtype || "",
+ idcardno: detailData.idcardno || "",
+ diagnosisname: detailData.diagnosisname || "",
+ treatmenthospitalname: detailData.treatmenthospitalname || "",
+ coordinatorName: detailData.coordinatorName || "",
+ assessTime: detailData.assessTime || "",
+ assessState: detailData.assessState || "1",
+ assessannex: detailData.assessannex || ""
};
- return statusMap[status] || "info";
+
+ if (detailData.organdecision) {
+ const decisionArray = Array.isArray(detailData.organdecision)
+ ? detailData.organdecision
+ : (detailData.organdecision || "").split(",").filter(item => item);
+
+ this.organdecisionValues = decisionArray;
+ this.prevOrgandecisionValues = [...decisionArray];
+ this.organdecisionOther = detailData.organdecisionOther || "";
+ }
+
+ this.processOrganAssessmentData(detailData);
},
- statusTextFilter(status) {
+
+ // 澶勭悊鍣ㄥ畼璇勪及鏁版嵁
+ processOrganAssessmentData(detailData) {
+ let organList = [];
+
+ if (detailData.serviceMedicalevaluationorganList) {
+ if (Array.isArray(detailData.serviceMedicalevaluationorganList)) {
+ organList = detailData.serviceMedicalevaluationorganList;
+ }
+ }
+
+ this.organAssessmentList = organList.map(organ => {
+ const organno = organ.organno;
+
+ // 濡傛灉 assesscontent 鏄瓧绗︿覆锛岀‘淇濆畠鏄湁鏁堢殑 JSON
+ if (organ.assesscontent && typeof organ.assesscontent === "string") {
+ try {
+ JSON.parse(organ.assesscontent);
+ } catch (error) {
+ console.warn(
+ "鏃犳晥鐨� assesscontent锛岄噸缃负绌烘暟缁�:",
+ organ.assesscontent
+ );
+ organ.assesscontent = "[]";
+ }
+ } else if (!organ.assesscontent) {
+ organ.assesscontent = "[]";
+ }
+
+ const assessments = this.getOrganAssessments(organ);
+ const activeTab = this.activeTabMap.has(organno)
+ ? this.activeTabMap.get(organno)
+ : assessments.length > 0
+ ? 0
+ : "summary";
+
+ return {
+ ...organ,
+ organname: this.getOrganLabel(organ.organno) || organ.organname,
+ activeTab: activeTab,
+ expanded: false,
+ delFlag: organ.delFlag || "0"
+ };
+ });
+ },
+
+ // 鑾峰彇榛樿璇勪及鏁版嵁缁撴瀯
+ getDefaultAssessment(index) {
+ return {
+ index: index,
+ status: "pending",
+ assessmentTime: "",
+ assessor: "",
+ functionStatus: "",
+ assessmentOpinion: "",
+ clinicalData: {},
+ labResults: {},
+ createTime: new Date().toISOString(),
+ delFlag: "0"
+ };
+ },
+
+ // 璁$畻鏈�澶ц瘎浼版鏁�
+ getMaxAssessmentCount() {
+ const maxCount = Math.max(
+ ...this.organAssessmentList
+ .filter(organ => organ.delFlag !== "1")
+ .map(organ => this.getAssessmentCount(organ))
+ );
+ return Math.max(maxCount, 1);
+ },
+
+ // 鑾峰彇鍣ㄥ畼鏁翠綋鐘舵��
+ getOrganOverallStatus(organ) {
+ const assessments = this.getOrganAssessments(organ);
+ if (assessments.length === 0) {
+ return "pending";
+ }
+
+ const validAssessments = assessments.filter(a => a.delFlag !== "1");
+ if (validAssessments.length === 0) {
+ return "pending";
+ }
+
+ const allAssessed = validAssessments.every(
+ assessment => assessment.status === "assessed"
+ );
+ const someAssessed = validAssessments.some(
+ assessment => assessment.status === "assessed"
+ );
+
+ if (allAssessed) return "completed";
+ if (someAssessed) return "assessing";
+ return "pending";
+ },
+
+ getOrganOverallStatusText(organ) {
+ const status = this.getOrganOverallStatus(organ);
const statusMap = {
- "0": "寰呰瘎浼�",
- "1": "璇勪及涓�",
- "2": "宸插畬鎴�",
- "3": "宸插叧闂�"
+ pending: "寰呰瘎浼�",
+ assessing: "璇勪及涓�",
+ completed: "宸插畬鎴�"
};
return statusMap[status] || "鏈煡";
},
- // 鑾峰彇鍔熻兘鐘舵�佺被鍨�
- getFunctionStatusType(status) {
+
+ // 鍒囨崲灞曞紑琛�
+ handleToggleExpand(row) {
+ const key = row.organno;
+ const index = this.expandedRowKeys.indexOf(key);
+
+ if (index > -1) {
+ this.expandedRowKeys.splice(index, 1);
+ row.expanded = false;
+ } else {
+ this.expandedRowKeys = [key];
+ this.organAssessmentList.forEach(item => {
+ item.expanded = item.organno === key;
+ });
+ }
+ },
+
+ // 灞曞紑琛屽彉鍖�
+ handleExpandChange(row, expandedRows) {
+ this.expandedRowKeys = expandedRows.map(item => item.organno);
+ this.organAssessmentList.forEach(item => {
+ item.expanded = this.expandedRowKeys.includes(item.organno);
+ });
+ },
+
+ // 娣诲姞鏂拌瘎浼�
+ handleAddNewAssessment(organ) {
+ const assessments = this.getOrganAssessments(organ);
+ const newAssessment = {
+ ...this.getDefaultAssessment(assessments.length),
+ assessor: this.currentUser.name
+ };
+
+ const newAssessments = [...assessments, newAssessment];
+ this.$set(organ, "assesscontent", JSON.stringify(newAssessments));
+
+ organ.activeTab = assessments.length;
+ this.activeTabMap.set(organ.organno, assessments.length);
+
+ this.$message.success("宸叉坊鍔犳柊鐨勮瘎浼�");
+ },
+
+ // 澶勭悊鍒犻櫎璇勪及浜嬩欢
+ handleDeleteAssessment(data) {
+ const { organData, assessmentIndex } = data;
+ this.deleteOrganAssessment(organData, assessmentIndex);
+ },
+ // 澶勭悊璇勪及淇濆瓨
+ handleSaveAssessment(data) {
+ const { organData, assessmentData, assessmentIndex } = data;
+ const assessments = this.getOrganAssessments(organData);
+
+ console.log("淇濆瓨璇勪及鏁版嵁:", data);
+
+ if (assessments[assessmentIndex]) {
+ // 鍒涘缓鏂扮殑璇勪及鏁扮粍
+ const newAssessments = [...assessments];
+ newAssessments[assessmentIndex] = {
+ ...assessments[assessmentIndex],
+ ...assessmentData,
+ status: "assessed", // 鏍囪涓哄凡璇勪及
+ assessmentTime: new Date().toISOString(), // 璁剧疆璇勪及鏃堕棿
+ delFlag: "0" // 纭繚鍒犻櫎鏍囧織
+ };
+
+ // 鏇存柊 assesscontent
+ this.$set(organData, "assesscontent", JSON.stringify(newAssessments));
+
+ // 寮哄埗閲嶆柊娓叉煋
+ this.$forceUpdate();
+
+ this.$message.success("璇勪及淇濆瓨鎴愬姛");
+
+ // 妫�鏌ユ槸鍚﹂渶瑕佽嚜鍔ㄥ垏鎹㈠埌涓嬩竴涓瘎浼�
+ this.checkAndSwitchTab(organData, assessmentIndex);
+ }
+ },
+
+ // 妫�鏌ュ苟鑷姩鍒囨崲tab
+ checkAndSwitchTab(organData, currentIndex) {
+ const assessments = this.getOrganAssessments(organData);
+ if (currentIndex < assessments.length - 1) {
+ // 濡傛灉杩樻湁涓嬩竴涓瘎浼帮紝鑷姩鍒囨崲鍒颁笅涓�涓�
+ organData.activeTab = currentIndex + 1;
+ this.activeTabMap.set(organData.organno, currentIndex + 1);
+ } else {
+ // 濡傛灉娌℃湁涓嬩竴涓瘎浼帮紝鍒囨崲鍒版眹鎬婚〉
+ organData.activeTab = "summary";
+ this.activeTabMap.set(organData.organno, "summary");
+ }
+ },
+
+ // 鍒犻櫎鍣ㄥ畼璇勪及
+ async deleteOrganAssessment(organ, assessmentIndex) {
+ try {
+ await this.$confirm(
+ `纭鍒犻櫎绗�${assessmentIndex + 1}娆¤瘎浼拌褰曞悧锛焋,
+ "纭鍒犻櫎",
+ {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning"
+ }
+ );
+
+ const assessments = this.getOrganAssessments(organ);
+ if (assessments[assessmentIndex]) {
+ // 鏍囪涓哄垹闄�
+ assessments[assessmentIndex].delFlag = "1";
+
+ // 杩囨护鎺夊凡鍒犻櫎鐨勮瘎浼�
+ const newAssessments = assessments.filter(
+ item => item.delFlag !== "1"
+ );
+
+ // 閲嶆柊璁$畻璇勪及绱㈠紩
+ newAssessments.forEach((assessment, index) => {
+ assessment.index = index;
+ });
+
+ // 鏇存柊 assesscontent
+ this.$set(organ, "assesscontent", JSON.stringify(newAssessments));
+
+ // 澶勭悊tab鍒囨崲
+ if (newAssessments.length === 0) {
+ organ.activeTab = "summary";
+ this.activeTabMap.set(organ.organno, "summary");
+ } else if (organ.activeTab === assessmentIndex) {
+ const newIndex = Math.max(0, assessmentIndex - 1);
+ organ.activeTab = newIndex;
+ this.activeTabMap.set(organ.organno, newIndex);
+ } else if (organ.activeTab === "summary") {
+ this.activeTabMap.set(organ.organno, "summary");
+ }
+
+ this.$message.success("璇勪及璁板綍宸插垹闄�");
+ this.$forceUpdate();
+ }
+ } catch (cancelError) {
+ this.$message.info("宸插彇娑堝垹闄�");
+ }
+ },
+
+ // 鑾峰彇鏈�鏂拌瘎浼版椂闂�
+ getLatestAssessmentTime(organ) {
+ const assessments = this.getOrganAssessments(organ);
+ if (assessments.length === 0) return null;
+
+ const assessed = assessments.filter(
+ a => a.assessmentTime && a.delFlag !== "1"
+ );
+ if (assessed.length === 0) return null;
+
+ return assessed.sort(
+ (a, b) => new Date(b.assessmentTime) - new Date(a.assessmentTime)
+ )[0].assessmentTime;
+ },
+
+ // 鑾峰彇璇勪及鐘舵�佹爣绛剧被鍨�
+ getAssessmentTagType(status) {
const typeMap = {
- "1": "success", // 姝e父
- "2": "warning", // 杞诲害寮傚父
- "3": "danger", // 閲嶅害寮傚父
- "4": "info" // 鏃犳硶璇勪及
+ pending: "warning",
+ assessing: "primary",
+ assessed: "success"
};
return typeMap[status] || "info";
},
- // 鑾峰彇鍔熻兘鐘舵�佹枃鏈�
- getFunctionStatusText(status) {
+
+ // 鑾峰彇璇勪及鐘舵�佹枃鏈�
+ getAssessmentStatusText(status) {
const textMap = {
- "1": "姝e父",
- "2": "杞诲害寮傚父",
- "3": "閲嶅害寮傚父",
- "4": "鏃犳硶璇勪及"
+ pending: "寰呰瘎浼�",
+ assessing: "璇勪及涓�",
+ assessed: "宸茶瘎浼�"
};
return textMap[status] || "鏈煡";
},
- // 妫�鏌ユ槸鍚︽湁鏉冮檺璇勪及璇ュ櫒瀹�
+
+ // 妫�鏌ヨ瘎浼版潈闄�
canAssessOrgan(organ) {
if (this.isCoordinator) return true;
- return organ.department === this.currentDepartment;
+ if (!this.isEdit) return false;
+ return (
+ organ.gainhospitalname &&
+ organ.gainhospitalname.includes(this.currentDepartment)
+ );
},
+
// 鑾峰彇琛岀被鍚�
getRowClassName({ row }) {
return this.canAssessOrgan(row) ? "assessable-row" : "non-assessable-row";
},
- // 鑾峰彇鍣ㄥ畼鏍囬
- getOrganTitle(organ) {
- const organName =
- this.organTypeOptions.find(opt => opt.value === organ.organType)
- ?.label || organ.organType;
- return `${organName}璇勪及璇︽儏锛�${organ.department}锛塦;
+
+ // 鐘舵�佽繃婊ゅ櫒
+ statusFilter(status) {
+ const statusMap = {
+ "1": "warning",
+ "2": "primary",
+ "3": "success"
+ };
+ return statusMap[status] || "info";
},
- // 鍣ㄥ畼璇勪及
- handleOrganAssess(organ) {
- this.activeOrgans = [organ.organType];
+
+ statusTextFilter(status) {
+ const statusMap = {
+ "1": "寰呰瘎浼�",
+ "2": "璇勪及涓�",
+ "3": "宸插畬鎴�"
+ };
+ return statusMap[status] || "鏈煡";
},
- // 鏌ョ湅鍣ㄥ畼璇︽儏
- handleViewOrganDetail(organ) {
- this.activeOrgans = [organ.organType];
- },
- // 淇濆瓨鍣ㄥ畼璇勪及 - 浣跨敤Mock API
- handleSaveOrganAssessment(organData) {
- updateOrganAssessment(organData)
- .then(response => {
- if (response.code === 200) {
- this.$message.success("璇勪及淇濆瓨鎴愬姛");
- // 鍒锋柊鏁版嵁
- this.getAssessmentDetail();
- }
- })
- .catch(error => {
- console.error("淇濆瓨璇勪及澶辫触:", error);
- this.$message.error("淇濆瓨澶辫触");
- });
- },
- // 鏌ョ湅闄勪欢棰勮
+
+ // 鏌ョ湅闄勪欢
handleAttachmentPreview() {
- this.attachmentVisible = true;
+ if (this.assessmentData.assessannex) {
+ try {
+ const annexData =
+ typeof this.assessmentData.assessannex === "string"
+ ? JSON.parse(this.assessmentData.assessannex)
+ : this.assessmentData.assessannex;
+
+ if (Array.isArray(annexData) && annexData.length > 0) {
+ this.currentPreviewFile = annexData[0];
+ this.attachmentVisible = true;
+ } else {
+ this.$message.info("鏆傛棤闄勪欢鍙瑙�");
+ }
+ } catch (error) {
+ this.$message.info("闄勪欢鏁版嵁鏍煎紡閿欒");
+ }
+ } else {
+ this.$message.info("鏆傛棤闄勪欢");
+ }
},
- // 瀹屾垚璇勪及 - 浣跨敤Mock API
- handleCompleteAssessment() {
- this.$confirm("纭瀹屾垚鎵�鏈夊櫒瀹樿瘎浼板悧锛熷畬鎴愬悗灏嗘棤娉曚慨鏀�", "纭鎿嶄綔", {
- confirmButtonText: "纭畾",
- cancelButtonText: "鍙栨秷",
- type: "warning"
- }).then(() => {
- completeAssessment(this.assessmentId)
- .then(response => {
- if (response.code === 200) {
- this.$message.success("璇勪及瀹屾垚纭鎴愬姛");
- this.getAssessmentDetail();
- }
- })
- .catch(error => {
- console.error("瀹屾垚璇勪及澶辫触:", error);
- this.$message.error("鎿嶄綔澶辫触");
- });
- });
+
+ // 瀹屾垚璇勪及
+ async handleCompleteAssessment() {
+ try {
+ await this.$confirm(
+ "纭瀹屾垚鎵�鏈夊櫒瀹樿瘎浼板悧锛熷畬鎴愬悗灏嗘棤娉曚慨鏀�",
+ "纭鎿嶄綔",
+ {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning"
+ }
+ );
+
+ const updateData = {
+ ...this.assessmentData,
+ assessState: "3",
+ assessTime: new Date().toISOString()
+ };
+
+ const response = await assessedit(updateData);
+
+ if (response.code === 200) {
+ this.$message.success("璇勪及瀹屾垚纭鎴愬姛");
+ this.assessmentData.assessState = "3";
+ this.isEdit = false;
+ } else {
+ this.$message.error("鎿嶄綔澶辫触锛�" + (response.msg || "鏈煡閿欒"));
+ }
+ } catch (error) {
+ if (error !== "cancel") {
+ console.error("瀹屾垚璇勪及澶辫触:", error);
+ this.$message.error("鎿嶄綔澶辫触");
+ }
+ }
}
}
};
@@ -366,8 +1384,46 @@
margin-bottom: 20px;
}
-.organ-detail-collapse {
+/* 灞曞紑琛屾牱寮� */
+.organ-expand-content {
+ padding: 20px;
+ background: #fafafa;
+ border-radius: 4px;
+ margin: 10px 0;
+}
+
+.organ-detail-tabs {
+ background: white;
+ border-radius: 4px;
+ padding: 20px;
+}
+
+.add-assessment-prompt {
+ text-align: center;
+ padding: 40px 0;
+}
+
+.assessment-summary {
+ padding: 10px;
+}
+
+/* 搴曢儴淇濆瓨鎸夐挳鏍峰紡 */
+.footer-actions {
margin-top: 20px;
+ text-align: center;
+ padding: 20px;
+ border-top: 1px solid #eaeaea;
+}
+
+/* 鍝嶅簲寮忚璁� */
+@media (max-width: 768px) {
+ .assessment-detail {
+ padding: 10px;
+ }
+
+ .organ-expand-content {
+ padding: 10px;
+ }
}
::v-deep .assessable-row {
@@ -378,6 +1434,24 @@
background-color: #fafafa;
}
+.jstitle {
+ float: right;
+ font-size: 18px !important;
+ font-weight: 600;
+ color: #2645f7;
+ font-size: 12px;
+}
+
+/* 琛ㄦ牸灞曞紑鍥炬爣鏍峰紡 */
+::v-deep .el-table__expand-icon {
+ cursor: pointer;
+}
+
+::v-deep .el-table__expanded-cell {
+ padding: 0 !important;
+}
+
+/* 纭繚鎻忚堪鍒楄〃鏍囩瀹藉害涓�鑷� */
::v-deep .el-descriptions__label {
width: 120px;
background-color: #f5f7fa;
@@ -387,11 +1461,210 @@
.fixed-width .el-button {
margin: 0 2px;
}
-.jstitle {
- float: right;
- font-size: 18px !important;
+/* 姹囨�婚〉闈㈡牱寮� */
+.assessment-summary {
+ padding: 10px;
+}
+
+.summary-item {
+ font-weight: 500;
+ color: #303133;
+}
+
+.highlight-text {
+ color: #409EFF;
+ font-weight: 500;
+}
+
+.assessment-detail-card {
+ border: 1px solid #e6ebf5;
+}
+
+.organ-info-card {
+ border: 1px solid #e6ebf5;
+ background-color: #fafafa;
+}
+
+.no-assessment {
+ text-align: center;
+ padding: 40px 0;
+ color: #909399;
+}
+
+.assessment-item {
+ margin-bottom: 20px;
+}
+
+.assessment-item:last-child {
+ margin-bottom: 0;
+}
+
+.assessment-card {
+ border: 1px solid #dcdfe6;
+ border-radius: 8px;
+ transition: all 0.3s;
+}
+
+.assessment-card:hover {
+ box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+ border-color: #409EFF;
+}
+
+.assessment-title {
+ font-size: 16px;
font-weight: 600;
- color: #2645f7;
+ color: #303133;
+}
+
+.status-tag {
+ float: right;
+ margin-right: 0;
+}
+
+.time-text {
+ color: #67C23A;
+ font-weight: 500;
+}
+
+.opinion-content {
+ padding: 8px 12px;
+ background: #f5f7fa;
+ border-radius: 4px;
+ line-height: 1.5;
+ color: #606266;
+ white-space: pre-wrap;
+ word-break: break-word;
+}
+
+.detail-descriptions {
+ background: #fff;
+}
+
+/* 浼樺寲琛ㄦ牸鏍峰紡 */
+::v-deep .el-table {
+ color: #303133;
+ font-size: 14px;
+}
+
+::v-deep .el-table th {
+ background-color: #f5f7fa;
+ color: #303133;
+ font-weight: 600;
+ padding: 12px 0;
+}
+
+::v-deep .el-table tr {
+ background-color: #fff;
+}
+
+::v-deep .el-table tr:hover {
+ background-color: #f5f7fa;
+}
+
+::v-deep .el-table .cell {
+ padding: 12px 10px;
+ line-height: 1.5;
+}
+
+::v-deep .el-table--striped .el-table__body tr.el-table__row--striped td {
+ background-color: #fafafa;
+}
+
+::v-deep .el-table--enable-row-hover .el-table__body tr:hover>td {
+ background-color: #ecf5ff;
+}
+
+/* 鍙瘎浼拌鏍峰紡 */
+::v-deep .assessable-row {
+ background-color: #f0f9ff !important;
+}
+
+::v-deep .assessable-row:hover {
+ background-color: #d9ecff !important;
+}
+
+::v-deep .non-assessable-row {
+ background-color: #fafafa !important;
+}
+
+/* 鎻忚堪鍒楄〃鏍峰紡浼樺寲 */
+::v-deep .el-descriptions__label {
+ width: 120px;
+ background-color: #f5f7fa;
+ font-weight: 600;
+ color: #303133;
+}
+
+::v-deep .el-descriptions__content {
+ background-color: #fff;
+ color: #606266;
+}
+
+::v-deep .el-descriptions__body {
+ background-color: #fff;
+}
+
+/* 鍗$墖鏍峰紡浼樺寲 */
+::v-deep .el-card__header {
+ background-color: #f5f7fa;
+ border-bottom: 1px solid #e6ebf5;
+ padding: 12px 20px;
+ font-weight: 600;
+ color: #303133;
+}
+
+::v-deep .el-card__body {
+ padding: 20px;
+}
+
+/* 鏍囩鏍峰紡浼樺寲 */
+::v-deep .el-tag {
+ font-weight: 500;
+ border-radius: 12px;
+ padding: 0 10px;
+ height: 24px;
+ line-height: 22px;
+}
+
+/* 鎸夐挳鏍峰紡浼樺寲 */
+::v-deep .el-button--mini {
+ padding: 7px 12px;
font-size: 12px;
+ border-radius: 4px;
+}
+
+/* Tab鏍峰紡浼樺寲 */
+::v-deep .el-tabs__item {
+ font-weight: 500;
+ color: #606266;
+}
+
+::v-deep .el-tabs__item.is-active {
+ color: #409EFF;
+ font-weight: 600;
+}
+
+::v-deep .el-tabs__nav-wrap::after {
+ background-color: #e4e7ed;
+}
+
+::v-deep .el-tabs--card>.el-tabs__header .el-tabs__item.is-active {
+ background-color: #fff;
+ border-bottom-color: #fff;
+}
+
+/* 鍝嶅簲寮忚璁� */
+@media (max-width: 768px) {
+ .assessment-summary {
+ padding: 5px;
+ }
+
+ ::v-deep .el-table .cell {
+ padding: 8px 5px;
+ }
+
+ .assessment-card {
+ margin-bottom: 10px;
+ }
}
</style>
diff --git a/src/views/business/course/donationProcess.js b/src/views/business/course/donationProcess.js
index 38051e3..ce32f60 100644
--- a/src/views/business/course/donationProcess.js
+++ b/src/views/business/course/donationProcess.js
@@ -1,48 +1,48 @@
// 妯℃嫙鎹愮尞杩涚▼鏁版嵁
const mockDonationProcessData = {
caseInfo: {
- id: '202512001',
- caseNo: 'C202512001',
- hospitalNo: 'D202512001',
- donorName: '寮犱笁',
- gender: '0',
+ id: "202512001",
+ caseNo: "C202512001",
+ hospitalNo: "D202512001",
+ donorName: "寮犱笁",
+ gender: "0",
age: 45,
- bloodType: 'A',
- diagnosis: '鑴戝浼�',
- status: 'in_progress',
- createTime: '2025-12-01 08:00:00',
- registrant: '鏉庡崗璋冨憳',
- currentStage: 'organ_allocation',
+ bloodType: "A",
+ diagnosis: "鑴戝浼�",
+ status: "in_progress",
+ createTime: "2025-12-01 08:00:00",
+ registrant: "鏉庡崗璋冨憳",
+ currentStage: "organ_allocation",
// 鏂板鍩烘湰淇℃伅
height: 175,
weight: 70,
- bloodPressure: '120/80',
- contactPerson: '寮犵埗',
- contactPhone: '13800138000',
- hospital: '闈掑矝澶у闄勫睘鍖婚櫌',
- department: '绁炵粡澶栫',
- attendingDoctor: '鐜嬩富浠�'
+ bloodPressure: "120/80",
+ contactPerson: "寮犵埗",
+ contactPhone: "13800138000",
+ hospital: "闈掑矝澶у闄勫睘鍖婚櫌",
+ department: "绁炵粡澶栫",
+ attendingDoctor: "鐜嬩富浠�"
},
processStages: [
{
- key: 'donor_maintenance',
- name: '渚涜�呯淮鎶�',
- status: 'completed',
- completeTime: '2025-12-01 10:00:00',
- updateTime: '2025-12-01 10:00:00',
- operator: '寮犲尰鐢�',
+ key: "donor_maintenance",
+ name: "渚涜�呯淮鎶�",
+ status: "completed",
+ completeTime: "2025-12-01 10:00:00",
+ updateTime: "2025-12-01 10:00:00",
+ operator: "寮犲尰鐢�",
details: {
maintenanceRecords: 5,
- lastCheckup: '2025-12-01 09:30:00',
+ lastCheckup: "2025-12-01 09:30:00",
vitalSigns: {
heartRate: 75,
- bloodPressure: '118/76',
+ bloodPressure: "118/76",
temperature: 36.5,
oxygenSaturation: 98
},
medications: [
- { name: '澶氬反鑳�', dosage: '5渭g/kg/min', time: '2025-12-01 08:00:00' },
- { name: '鐢橀湶閱�', dosage: '125ml', time: '2025-12-01 09:00:00' }
+ { name: "澶氬反鑳�", dosage: "5渭g/kg/min", time: "2025-12-01 08:00:00" },
+ { name: "鐢橀湶閱�", dosage: "125ml", time: "2025-12-01 09:00:00" }
],
labResults: {
wbc: 8.5,
@@ -54,218 +54,227 @@
}
},
{
- key: 'medical_assessment',
- name: '鍖诲璇勪及',
- status: 'completed',
- completeTime: '2025-12-02 14:30:00',
- updateTime: '2025-12-02 14:30:00',
- operator: '鏉庝富浠�',
- details: {
- assessmentItems: [
- { name: '绁炵粡绯荤粺璇勪及', result: '鑴戞浜$‘璁�', status: 'completed' },
- { name: '蹇冭绠$郴缁熻瘎浼�', result: '鍔熻兘姝e父', status: 'completed' },
- { name: '鍛煎惛绯荤粺璇勪及', result: '鍛煎惛鏈虹淮鎸�', status: 'completed' },
- { name: '鑲濊偩鍔熻兘璇勪及', result: '鍔熻兘鑹ソ', status: 'completed' },
- { name: '鎰熸煋鎬х柧鐥呯瓫鏌�', result: '闃存��', status: 'completed' }
- ],
- imagingResults: {
- ctBrain: '鑴戞按鑲匡紝鑴戝共鍙嶅皠娑堝け',
- chestXRay: '鍙岃偤娓呮櫚',
- abdominalUS: '鑲濊儐鑳拌劸鏈寮傚父'
- },
- conclusion: '绗﹀悎鍣ㄥ畼鎹愮尞鍖诲鏍囧噯',
- contraindications: '鏃犵粷瀵圭蹇岀棁'
- }
- },
- {
- key: 'death_judgment',
- name: '姝讳骸鍒ゅ畾',
- status: 'completed',
- completeTime: '2025-12-03 09:15:00',
- updateTime: '2025-12-03 09:15:00',
- operator: '鐜嬪尰鐢�',
- details: {
- judgmentType: '鑴戞浜″垽瀹�',
- judgmentTime: '2025-12-03 09:00:00',
- doctors: ['寮犱富浠�', '鐜嬪尰鐢�'],
- testResults: [
- { test: '鑷富鍛煎惛娴嬭瘯', result: '鏃犺嚜涓诲懠鍚�', time: '2025-12-03 08:30:00' },
- { test: '鐬冲瓟瀵瑰厜鍙嶅皠', result: '鍙嶅皠娑堝け', time: '2025-12-03 08:45:00' },
- { test: '鑴戝共鍚璇卞彂鐢典綅', result: '鑴戝共鍔熻兘涓уけ', time: '2025-12-03 09:00:00' }
- ],
- certificateNo: 'SW20251203001',
- legalDocuments: ['姝讳骸璇佹槑涔�', '鑴戞浜″垽瀹氫功']
- }
- },
- {
- key: 'donation_confirm',
- name: '鎹愮尞纭',
- status: 'completed',
- completeTime: '2025-12-03 11:00:00',
- updateTime: '2025-12-03 11:00:00',
- operator: '璧靛崗璋冨憳',
+ key: "donation_confirm",
+ name: "鎹愮尞鎰忔効",
+ status: "completed",
+ completeTime: "2025-12-03 11:00:00",
+ updateTime: "2025-12-03 11:00:00",
+ operator: "璧靛崗璋冨憳",
details: {
familyConsent: {
- mainRelative: '寮犵埗',
- relationship: '鐖跺瓙',
- consentTime: '2025-12-03 10:45:00',
- consentForm: '宸茬缃�',
- witness: '鏉庢姢澹�'
+ mainRelative: "寮犵埗",
+ relationship: "鐖跺瓙",
+ consentTime: "2025-12-03 10:45:00",
+ consentForm: "宸茬缃�",
+ witness: "鏉庢姢澹�"
},
- donationType: '澶氬櫒瀹樻崘鐚�',
- organs: ['鑲濊剰', '鑲捐剰', '蹇冭剰', '瑙掕啘'],
- legalDocuments: [
- '鍣ㄥ畼鎹愮尞鍚屾剰涔�',
- '瀹跺睘鍏崇郴璇佹槑',
- '鍖荤枟鍏嶈矗澹版槑'
- ],
- coordinator: '璧靛崗璋冨憳',
- confirmationTime: '2025-12-03 11:00:00'
+ donationType: "澶氬櫒瀹樻崘鐚�",
+ organs: ["鑲濊剰", "鑲捐剰", "蹇冭剰", "瑙掕啘"],
+ legalDocuments: ["鍣ㄥ畼鎹愮尞鍚屾剰涔�", "瀹跺睘鍏崇郴璇佹槑", "鍖荤枟鍏嶈矗澹版槑"],
+ coordinator: "璧靛崗璋冨憳",
+ confirmationTime: "2025-12-03 11:00:00"
}
},
{
- key: 'ethical_review',
- name: '浼︾悊瀹℃煡',
- status: 'in_progress',
- completeTime: '2025-12-03 15:20:00',
- updateTime: '2025-12-03 15:20:00',
- operator: '浼︾悊濮斿憳浼�',
+ key: "medical_assessment",
+ name: "鍖诲璇勪及",
+ status: "completed",
+ completeTime: "2025-12-02 14:30:00",
+ updateTime: "2025-12-02 14:30:00",
+ operator: "鏉庝富浠�",
details: {
- committee: '鍖婚櫌浼︾悊瀹℃煡濮斿憳浼�',
- meetingTime: '2025-12-03 14:00:00',
- members: ['寮犳暀鎺�', '鏉庝富浠�', '鐜嬪尰鐢�', '璧靛鍛�', '閽变笓瀹�'],
+ assessmentItems: [
+ { name: "绁炵粡绯荤粺璇勪及", result: "鑴戞浜$‘璁�", status: "completed" },
+ { name: "蹇冭绠$郴缁熻瘎浼�", result: "鍔熻兘姝e父", status: "completed" },
+ { name: "鍛煎惛绯荤粺璇勪及", result: "鍛煎惛鏈虹淮鎸�", status: "completed" },
+ { name: "鑲濊偩鍔熻兘璇勪及", result: "鍔熻兘鑹ソ", status: "completed" },
+ { name: "鎰熸煋鎬х柧鐥呯瓫鏌�", result: "闃存��", status: "completed" }
+ ],
+ imagingResults: {
+ ctBrain: "鑴戞按鑲匡紝鑴戝共鍙嶅皠娑堝け",
+ chestXRay: "鍙岃偤娓呮櫚",
+ abdominalUS: "鑲濊儐鑳拌劸鏈寮傚父"
+ },
+ conclusion: "绗﹀悎鍣ㄥ畼鎹愮尞鍖诲鏍囧噯",
+ contraindications: "鏃犵粷瀵圭蹇岀棁"
+ }
+ },
+
+ {
+ key: "death_judgment",
+ name: "姝讳骸鍒ゅ畾",
+ status: "completed",
+ completeTime: "2025-12-03 09:15:00",
+ updateTime: "2025-12-03 09:15:00",
+ operator: "鐜嬪尰鐢�",
+ details: {
+ judgmentType: "鑴戞浜″垽瀹�",
+ judgmentTime: "2025-12-03 09:00:00",
+ doctors: ["寮犱富浠�", "鐜嬪尰鐢�"],
+ testResults: [
+ {
+ test: "鑷富鍛煎惛娴嬭瘯",
+ result: "鏃犺嚜涓诲懠鍚�",
+ time: "2025-12-03 08:30:00"
+ },
+ {
+ test: "鐬冲瓟瀵瑰厜鍙嶅皠",
+ result: "鍙嶅皠娑堝け",
+ time: "2025-12-03 08:45:00"
+ },
+ {
+ test: "鑴戝共鍚璇卞彂鐢典綅",
+ result: "鑴戝共鍔熻兘涓уけ",
+ time: "2025-12-03 09:00:00"
+ }
+ ],
+ certificateNo: "SW20251203001",
+ legalDocuments: ["姝讳骸璇佹槑涔�", "鑴戞浜″垽瀹氫功"]
+ }
+ },
+ {
+ key: "ethical_review",
+ name: "浼︾悊瀹℃煡",
+ status: "in_progress",
+ completeTime: "2025-12-03 15:20:00",
+ updateTime: "2025-12-03 15:20:00",
+ operator: "浼︾悊濮斿憳浼�",
+ details: {
+ committee: "鍖婚櫌浼︾悊瀹℃煡濮斿憳浼�",
+ meetingTime: "2025-12-03 14:00:00",
+ members: ["寮犳暀鎺�", "鏉庝富浠�", "鐜嬪尰鐢�", "璧靛鍛�", "閽变笓瀹�"],
reviewItems: [
- { item: '鎹愮尞鎰忔効鐪熷疄鎬�', result: '纭鐪熷疄', vote: '鍏ㄧエ閫氳繃' },
- { item: '鍖诲璇勪及鍑嗙‘鎬�', result: '纭鍑嗙‘', vote: '鍏ㄧエ閫氳繃' },
- { item: '娉曞緥鏂囦欢瀹屾暣鎬�', result: '纭瀹屾暣', vote: '鍏ㄧエ閫氳繃' }
+ { item: "鎹愮尞鎰忔効鐪熷疄鎬�", result: "纭鐪熷疄", vote: "鍏ㄧエ閫氳繃" },
+ { item: "鍖诲璇勪及鍑嗙‘鎬�", result: "纭鍑嗙‘", vote: "鍏ㄧエ閫氳繃" },
+ { item: "娉曞緥鏂囦欢瀹屾暣鎬�", result: "纭瀹屾暣", vote: "鍏ㄧエ閫氳繃" }
],
- conclusion: '绗﹀悎浼︾悊瑕佹眰锛屽悓鎰忚繘琛屽櫒瀹樻崘鐚�',
- resolutionNo: 'LL20251203001'
+ conclusion: "绗﹀悎浼︾悊瑕佹眰锛屽悓鎰忚繘琛屽櫒瀹樻崘鐚�",
+ resolutionNo: "LL20251203001"
}
},
{
- key: 'organ_allocation',
- name: '鍣ㄥ畼鍒嗛厤',
- status: 'pending',
- updateTime: '2025-12-04 10:00:00',
- operator: '鍒嗛厤绯荤粺',
+ key: "organ_allocation",
+ name: "鍣ㄥ畼鍒嗛厤",
+ status: "pending",
+ updateTime: "2025-12-04 10:00:00",
+ operator: "鍒嗛厤绯荤粺",
details: {
- allocationStartTime: '2025-12-04 09:00:00',
- allocationSystem: '涓浗浜轰綋鍣ㄥ畼鍒嗛厤涓庡叡浜绠楁満绯荤粺',
+ allocationStartTime: "2025-12-04 09:00:00",
+ allocationSystem: "涓浗浜轰綋鍣ㄥ畼鍒嗛厤涓庡叡浜绠楁満绯荤粺",
organs: [
{
- organ: '鑲濊剰',
- status: '鍒嗛厤涓�',
+ organ: "鑲濊剰",
+ status: "鍒嗛厤涓�",
matchScore: 95,
- recommendedRecipient: '鐜嬪厛鐢�',
+ recommendedRecipient: "鐜嬪厛鐢�",
recipientAge: 45,
- recipientBloodType: 'A',
- hospital: '闈掑矝澶у闄勫睘鍖婚櫌',
- urgency: '绱ф��'
+ recipientBloodType: "A",
+ hospital: "闈掑矝澶у闄勫睘鍖婚櫌",
+ urgency: "绱ф��"
},
{
- organ: '鑲捐剰',
- status: '鍖归厤瀹屾垚',
+ organ: "鑲捐剰",
+ status: "鍖归厤瀹屾垚",
matchScore: 92,
- recommendedRecipient: '鏉庡コ澹�',
+ recommendedRecipient: "鏉庡コ澹�",
recipientAge: 38,
- recipientBloodType: 'A',
- hospital: '闈掑矝甯傚競绔嬪尰闄�',
- urgency: '楂�'
+ recipientBloodType: "A",
+ hospital: "闈掑矝甯傚競绔嬪尰闄�",
+ urgency: "楂�"
},
{
- organ: '蹇冭剰',
- status: '寰呭垎閰�',
+ organ: "蹇冭剰",
+ status: "寰呭垎閰�",
matchScore: 88,
- recommendedRecipient: '闄堝厛鐢�',
+ recommendedRecipient: "闄堝厛鐢�",
recipientAge: 52,
- recipientBloodType: 'O',
- hospital: '灞变笢澶у榻愰瞾鍖婚櫌',
- urgency: '绱ф��'
+ recipientBloodType: "O",
+ hospital: "灞变笢澶у榻愰瞾鍖婚櫌",
+ urgency: "绱ф��"
}
],
allocationFactors: [
- { factor: '鐥呮儏鍗遍噸绋嬪害', weight: 35 },
- { factor: '缁勭粐閰嶅瀷鍖归厤', weight: 25 },
- { factor: '绛夊緟鏃堕棿', weight: 15 },
- { factor: '鍦扮悊鍥犵礌', weight: 10 },
- { factor: '骞撮緞鍥犵礌', weight: 15 }
+ { factor: "鐥呮儏鍗遍噸绋嬪害", weight: 35 },
+ { factor: "缁勭粐閰嶅瀷鍖归厤", weight: 25 },
+ { factor: "绛夊緟鏃堕棿", weight: 15 },
+ { factor: "鍦扮悊鍥犵礌", weight: 10 },
+ { factor: "骞撮緞鍥犵礌", weight: 15 }
]
}
},
{
- key: 'organ_procurement',
- name: '鍣ㄥ畼鑾峰彇',
- status: 'pending',
- updateTime: '2025-12-03 16:00:00',
- operator: '寰呭垎閰�',
+ key: "organ_procurement",
+ name: "鍣ㄥ畼鑾峰彇",
+ status: "pending",
+ updateTime: "2025-12-03 16:00:00",
+ operator: "寰呭垎閰�",
details: {
- scheduledTime: '2025-12-04 14:00:00',
- operationRoom: '鎵嬫湳瀹や竴鍙�',
+ scheduledTime: "2025-12-04 14:00:00",
+ operationRoom: "鎵嬫湳瀹や竴鍙�",
surgicalTeam: {
- surgeon: '寰呭垎閰�',
- assistant: '寰呭垎閰�',
- anesthesiologist: '寰呭垎閰�',
- nurse: '寰呭垎閰�'
+ surgeon: "寰呭垎閰�",
+ assistant: "寰呭垎閰�",
+ anesthesiologist: "寰呭垎閰�",
+ nurse: "寰呭垎閰�"
},
preservationPlan: {
- method: '浣庢俯鏈烘鐏屾敞',
- solution: 'UW淇濆瓨娑�',
- temperature: '4掳C'
+ method: "浣庢俯鏈烘鐏屾敞",
+ solution: "UW淇濆瓨娑�",
+ temperature: "4掳C"
},
organs: [
{
- organ: '鑲濊剰',
+ organ: "鑲濊剰",
planned: true,
- preservation: '寰呭噯澶�',
- estimatedTime: '4灏忔椂'
+ preservation: "寰呭噯澶�",
+ estimatedTime: "4灏忔椂"
},
{
- organ: '鑲捐剰',
+ organ: "鑲捐剰",
planned: true,
- preservation: '寰呭噯澶�',
- estimatedTime: '3灏忔椂'
+ preservation: "寰呭噯澶�",
+ estimatedTime: "3灏忔椂"
},
{
- organ: '蹇冭剰',
+ organ: "蹇冭剰",
planned: true,
- preservation: '寰呭噯澶�',
- estimatedTime: '5灏忔椂'
+ preservation: "寰呭噯澶�",
+ estimatedTime: "5灏忔椂"
}
]
}
},
{
- key: 'organ_utilization',
- name: '鍣ㄥ畼鍒╃敤',
- status: 'pending',
- updateTime: '2025-12-03 16:00:00',
- operator: '寰呭垎閰�',
+ key: "organ_utilization",
+ name: "鍣ㄥ畼鍒╃敤",
+ status: "pending",
+ updateTime: "2025-12-03 16:00:00",
+ operator: "寰呭垎閰�",
details: {
transplantCenters: [
{
- hospital: '闈掑矝澶у闄勫睘鍖婚櫌',
- organ: '鑲濊剰',
- recipient: '鐜嬪厛鐢�',
- scheduledTime: '2025-12-04 18:00:00',
- surgicalTeam: '寰呯‘璁�'
+ hospital: "闈掑矝澶у闄勫睘鍖婚櫌",
+ organ: "鑲濊剰",
+ recipient: "鐜嬪厛鐢�",
+ scheduledTime: "2025-12-04 18:00:00",
+ surgicalTeam: "寰呯‘璁�"
},
{
- hospital: '闈掑矝甯傚競绔嬪尰闄�',
- organ: '鑲捐剰',
- recipient: '鏉庡コ澹�',
- scheduledTime: '2025-12-04 19:00:00',
- surgicalTeam: '寰呯‘璁�'
+ hospital: "闈掑矝甯傚競绔嬪尰闄�",
+ organ: "鑲捐剰",
+ recipient: "鏉庡コ澹�",
+ scheduledTime: "2025-12-04 19:00:00",
+ surgicalTeam: "寰呯‘璁�"
}
],
followupPlan: {
- frequency: '鏈悗1涓湀銆�3涓湀銆�6涓湀銆�1骞�',
- items: ['鑲濆姛鑳芥鏌�', '鍏嶇柅鎶戝埗鍓傛祿搴�', '褰卞儚瀛︽鏌�'],
- coordinator: '寰呭垎閰�'
+ frequency: "鏈悗1涓湀銆�3涓湀銆�6涓湀銆�1骞�",
+ items: ["鑲濆姛鑳芥鏌�", "鍏嶇柅鎶戝埗鍓傛祿搴�", "褰卞儚瀛︽鏌�"],
+ coordinator: "寰呭垎閰�"
},
qualityMetrics: {
expectedSurvivalRate: 92,
- complicationRisk: '涓瓑',
+ complicationRisk: "涓瓑",
successRate: 95
}
}
@@ -274,40 +283,40 @@
// 鏂板鏃堕棿绾夸簨浠�
timelineEvents: [
{
- time: '2025-12-01 08:00:00',
- event: '妗堜緥鐧昏',
- operator: '鏉庡崗璋冨憳',
- description: '鎹愮尞妗堜緥姝e紡鐧昏鍚姩'
+ time: "2025-12-01 08:00:00",
+ event: "妗堜緥鐧昏",
+ operator: "鏉庡崗璋冨憳",
+ description: "鎹愮尞妗堜緥姝e紡鐧昏鍚姩"
},
{
- time: '2025-12-01 10:00:00',
- event: '渚涜�呯淮鎶ゅ畬鎴�',
- operator: '寮犲尰鐢�',
- description: '瀹屾垚渚涜�呯敓鍛戒綋寰佺淮鎶ゅ拰鍖荤枟绠$悊'
+ time: "2025-12-01 10:00:00",
+ event: "渚涜�呯淮鎶ゅ畬鎴�",
+ operator: "寮犲尰鐢�",
+ description: "瀹屾垚渚涜�呯敓鍛戒綋寰佺淮鎶ゅ拰鍖荤枟绠$悊"
},
{
- time: '2025-12-02 14:30:00',
- event: '鍖诲璇勪及瀹屾垚',
- operator: '鏉庝富浠�',
- description: '鍏ㄩ潰鍖诲璇勪及纭绗﹀悎鎹愮尞鏍囧噯'
+ time: "2025-12-02 14:30:00",
+ event: "鍖诲璇勪及瀹屾垚",
+ operator: "鏉庝富浠�",
+ description: "鍏ㄩ潰鍖诲璇勪及纭绗﹀悎鎹愮尞鏍囧噯"
},
{
- time: '2025-12-03 09:15:00',
- event: '姝讳骸鍒ゅ畾瀹屾垚',
- operator: '鐜嬪尰鐢�',
- description: '鑴戞浜″垽瀹氱▼搴忓畬鎴�'
+ time: "2025-12-03 09:15:00",
+ event: "姝讳骸鍒ゅ畾瀹屾垚",
+ operator: "鐜嬪尰鐢�",
+ description: "鑴戞浜″垽瀹氱▼搴忓畬鎴�"
},
{
- time: '2025-12-03 11:00:00',
- event: '鎹愮尞纭瀹屾垚',
- operator: '璧靛崗璋冨憳',
- description: '瀹跺睘绛剧讲鎹愮尞鍚屾剰涔�'
+ time: "2025-12-03 11:00:00",
+ event: "鎹愮尞纭瀹屾垚",
+ operator: "璧靛崗璋冨憳",
+ description: "瀹跺睘绛剧讲鎹愮尞鍚屾剰涔�"
},
{
- time: '2025-12-03 15:20:00',
- event: '浼︾悊瀹℃煡閫氳繃',
- operator: '浼︾悊濮斿憳浼�',
- description: '浼︾悊瀹℃煡濮斿憳浼氬叏绁ㄩ�氳繃'
+ time: "2025-12-03 15:20:00",
+ event: "浼︾悊瀹℃煡閫氳繃",
+ operator: "浼︾悊濮斿憳浼�",
+ description: "浼︾悊瀹℃煡濮斿憳浼氬叏绁ㄩ�氳繃"
}
],
// 鏂板缁熻淇℃伅
@@ -315,15 +324,15 @@
totalStages: 8,
completedStages: 5,
completionRate: 62.5,
- timeElapsed: '2澶�6灏忔椂',
- estimatedCompletion: '2025-12-04 20:00:00',
+ timeElapsed: "2澶�6灏忔椂",
+ estimatedCompletion: "2025-12-04 20:00:00",
organsToDonate: 4,
potentialRecipients: 3
}
};
// 鑾峰彇鎹愮尞杩涚▼璇︽儏
-export const getDonationProcessDetail = async (caseId) => {
+export const getDonationProcessDetail = async caseId => {
await new Promise(resolve => setTimeout(resolve, 500));
// 妯℃嫙鏍规嵁caseId杩斿洖涓嶅悓鏁版嵁
@@ -332,7 +341,7 @@
return {
code: 200,
- message: 'success',
+ message: "success",
data: data
};
};
@@ -342,19 +351,24 @@
await new Promise(resolve => setTimeout(resolve, 300));
// 妯℃嫙鏇存柊閫昏緫
- const stage = mockDonationProcessData.processStages.find(s => s.key === stageKey);
+ const stage = mockDonationProcessData.processStages.find(
+ s => s.key === stageKey
+ );
if (stage) {
stage.status = status;
- stage.updateTime = new Date().toISOString().replace('T', ' ').substring(0, 19);
+ stage.updateTime = new Date()
+ .toISOString()
+ .replace("T", " ")
+ .substring(0, 19);
- if (status === 'completed') {
+ if (status === "completed") {
stage.completeTime = stage.updateTime;
}
}
return {
code: 200,
- message: '闃舵鐘舵�佹洿鏂版垚鍔�',
+ message: "闃舵鐘舵�佹洿鏂版垚鍔�",
data: {
caseId,
stageKey,
@@ -368,40 +382,42 @@
export const getStageDetail = async (caseId, stageKey) => {
await new Promise(resolve => setTimeout(resolve, 200));
- const stage = mockDonationProcessData.processStages.find(s => s.key === stageKey);
+ const stage = mockDonationProcessData.processStages.find(
+ s => s.key === stageKey
+ );
if (!stage) {
return {
code: 404,
- message: '闃舵涓嶅瓨鍦�',
+ message: "闃舵涓嶅瓨鍦�",
data: null
};
}
return {
code: 200,
- message: 'success',
+ message: "success",
data: stage
};
};
// 鑾峰彇鏃堕棿绾夸簨浠�
-export const getTimelineEvents = async (caseId) => {
+export const getTimelineEvents = async caseId => {
await new Promise(resolve => setTimeout(resolve, 150));
return {
code: 200,
- message: 'success',
+ message: "success",
data: mockDonationProcessData.timelineEvents
};
};
// 鑾峰彇妗堜緥缁熻淇℃伅
-export const getCaseStatistics = async (caseId) => {
+export const getCaseStatistics = async caseId => {
await new Promise(resolve => setTimeout(resolve, 100));
return {
code: 200,
- message: 'success',
+ message: "success",
data: mockDonationProcessData.statistics
};
};
@@ -412,12 +428,15 @@
return {
code: 200,
- message: '瀹℃牳鎻愪氦鎴愬姛',
+ message: "瀹℃牳鎻愪氦鎴愬姛",
data: {
caseId,
stageKey,
reviewId: `REV${Date.now()}`,
- submitTime: new Date().toISOString().replace('T', ' ').substring(0, 19),
+ submitTime: new Date()
+ .toISOString()
+ .replace("T", " ")
+ .substring(0, 19),
...reviewData
}
};
@@ -429,14 +448,17 @@
return {
code: 200,
- message: '鏂囦欢涓婁紶鎴愬姛',
+ message: "鏂囦欢涓婁紶鎴愬姛",
data: {
caseId,
stageKey,
fileId: `FILE${Date.now()}`,
fileName: fileInfo.name,
fileSize: fileInfo.size,
- uploadTime: new Date().toISOString().replace('T', ' ').substring(0, 19),
+ uploadTime: new Date()
+ .toISOString()
+ .replace("T", " ")
+ .substring(0, 19),
url: `/files/${caseId}/${stageKey}/${fileInfo.name}`
}
};
diff --git a/src/views/business/course/index.vue b/src/views/business/course/index.vue
index 9342dda..3a939e1 100644
--- a/src/views/business/course/index.vue
+++ b/src/views/business/course/index.vue
@@ -2,7 +2,7 @@
<div class="donation-process-detail">
<el-card class="process-card">
<div class="process-container">
- <!-- 宸︿晶鏃堕棿绾� -->
+ <!-- 宸︿晶鏃堕棿绾� - 鐙珛鍥哄畾锛屽唴閮ㄥ彲婊氬姩 -->
<div class="timeline-section">
<div class="section-header">
<h3>鎹愮尞杩涚▼鏃堕棿绾�</h3>
@@ -11,45 +11,55 @@
</el-tag>
</div>
- <div class="timeline-container">
- <div
- v-for="stage in processStages"
- :key="stage.key"
- class="timeline-item"
- :class="{
- 'active': activeStage === stage.key,
- 'completed': stage.status === 'completed',
- 'in-progress': stage.status === 'in_progress',
- 'pending': stage.status === 'pending'
- }"
- @click="handleStageClick(stage)"
- >
- <div class="timeline-marker">
- <i v-if="stage.status === 'completed'" class="el-icon-check"></i>
- <i v-else-if="stage.status === 'in_progress'" class="el-icon-loading"></i>
- <i v-else class="el-icon-time"></i>
- </div>
-
- <div class="timeline-content">
- <div class="stage-header">
- <span class="stage-name">{{ stage.name }}</span>
- <el-tag
- size="small"
- :type="getStageStatusTag(stage.status)"
- >
- {{ getStageStatusText(stage.status) }}
- </el-tag>
+ <div class="timeline-scroll-container">
+ <div class="timeline-container">
+ <div
+ v-for="stage in processStages"
+ :key="stage.key"
+ class="timeline-item"
+ :class="{
+ active: activeStage === stage.key,
+ completed: stage.status === 'completed',
+ 'in-progress': stage.status === 'in_progress',
+ pending: stage.status === 'pending'
+ }"
+ @click="handleStageClick(stage)"
+ >
+ <div class="timeline-marker">
+ <i
+ v-if="stage.status === 'completed'"
+ class="el-icon-check"
+ ></i>
+ <i
+ v-else-if="stage.status === 'in_progress'"
+ class="el-icon-loading"
+ ></i>
+ <i v-else class="el-icon-time"></i>
</div>
- <div class="stage-info">
- <div v-if="stage.completeTime" class="time-info">
- <span>瀹屾垚鏃堕棿: {{ formatTime(stage.completeTime) }}</span>
+ <div class="timeline-content">
+ <div class="stage-header">
+ <span class="stage-name">{{ stage.name }}</span>
+ <el-tag
+ size="small"
+ :type="getStageStatusTag(stage.status)"
+ >
+ {{ getStageStatusText(stage.status) }}
+ </el-tag>
</div>
- <div v-if="stage.updateTime" class="time-info">
- <span>鏈�杩戞洿鏂�: {{ formatTime(stage.updateTime) }}</span>
- </div>
- <div v-if="stage.operator" class="operator-info">
- <span>璐熻矗浜�: {{ stage.operator }}</span>
+
+ <div class="stage-info">
+ <div v-if="stage.completeTime" class="time-info">
+ <span
+ >瀹屾垚鏃堕棿: {{ formatTime(stage.completeTime) }}</span
+ >
+ </div>
+ <div v-if="stage.updateTime" class="time-info">
+ <span>鏈�杩戞洿鏂�: {{ formatTime(stage.updateTime) }}</span>
+ </div>
+ <div v-if="stage.operator" class="operator-info">
+ <span>璐熻矗浜�: {{ stage.operator }}</span>
+ </div>
</div>
</div>
</div>
@@ -57,9 +67,9 @@
</div>
</div>
- <!-- 鍙充晶鍐呭鍖哄煙 -->
+ <!-- 鍙充晶鍐呭鍖哄煙 - 鐙珛婊氬姩 -->
<div class="content-section">
- <!-- 妗堜緥鍩烘湰淇℃伅 -->
+ <!-- 妗堜緥鍩烘湰淇℃伅 - 鍥哄畾楂樺害锛屽彲婊氬姩 -->
<div class="basic-info-section">
<div class="section-header">
<h3>妗堜緥鍩烘湰淇℃伅</h3>
@@ -72,88 +82,67 @@
</el-button>
</div>
- <el-descriptions :column="2" border>
- <el-descriptions-item label="浣忛櫌鍙�">
- {{ caseInfo.caseNo }}
- </el-descriptions-item>
- <el-descriptions-item label="浣忛櫌鍙�">
- {{ caseInfo.hospitalNo }}
- </el-descriptions-item>
- <el-descriptions-item label="鎹愮尞鑰呭鍚�">
- {{ caseInfo.donorName }}
- </el-descriptions-item>
- <el-descriptions-item label="鎬у埆">
- <dict-tag
- :options="dict.type.sys_user_sex"
- :value="parseInt(caseInfo.gender)"
- />
- </el-descriptions-item>
- <el-descriptions-item label="骞撮緞">
- {{ caseInfo.age }} 宀�
- </el-descriptions-item>
- <el-descriptions-item label="琛�鍨�">
- <dict-tag
- :options="dict.type.sys_BloodType"
- :value="caseInfo.bloodType"
- />
- </el-descriptions-item>
- <el-descriptions-item label="鐤剧梾璇婃柇">
- {{ caseInfo.diagnosis }}
- </el-descriptions-item>
- <el-descriptions-item label="妗堜緥鐘舵��">
- <el-tag :type="getOverallStatusTag(caseInfo.status)">
- {{ getStatusText(caseInfo.status) }}
- </el-tag>
- </el-descriptions-item>
- <el-descriptions-item label="鍒涘缓鏃堕棿">
- {{ formatTime(caseInfo.createTime) }}
- </el-descriptions-item>
- <el-descriptions-item label="鐧昏浜�">
- {{ caseInfo.registrant }}
- </el-descriptions-item>
- <el-descriptions-item label="褰撳墠闃舵">
- {{ getCurrentStageName() }}
- </el-descriptions-item>
- </el-descriptions>
+ <div class="basic-info-content">
+ <el-descriptions :column="2" border>
+ <el-descriptions-item label="浣忛櫌鍙�">
+ {{ caseInfo.caseNo }}
+ </el-descriptions-item>
+ <el-descriptions-item label="浣忛櫌鍙�">
+ {{ caseInfo.hospitalNo }}
+ </el-descriptions-item>
+ <el-descriptions-item label="鎹愮尞鑰呭鍚�">
+ {{ caseInfo.donorName }}
+ </el-descriptions-item>
+ <el-descriptions-item label="鎬у埆">
+ <dict-tag
+ :options="dict.type.sys_user_sex"
+ :value="parseInt(caseInfo.gender)"
+ />
+ </el-descriptions-item>
+ <el-descriptions-item label="骞撮緞">
+ {{ caseInfo.age }} 宀�
+ </el-descriptions-item>
+ <el-descriptions-item label="琛�鍨�">
+ <dict-tag
+ :options="dict.type.sys_BloodType"
+ :value="caseInfo.bloodType"
+ />
+ </el-descriptions-item>
+ <el-descriptions-item label="鐤剧梾璇婃柇">
+ {{ caseInfo.diagnosis }}
+ </el-descriptions-item>
+ <el-descriptions-item label="妗堜緥鐘舵��">
+ <el-tag :type="getOverallStatusTag(caseInfo.status)">
+ {{ getStatusText(caseInfo.status) }}
+ </el-tag>
+ </el-descriptions-item>
+ <el-descriptions-item label="鍒涘缓鏃堕棿">
+ {{ formatTime(caseInfo.createTime) }}
+ </el-descriptions-item>
+ <el-descriptions-item label="鐧昏浜�">
+ {{ caseInfo.registrant }}
+ </el-descriptions-item>
+ <el-descriptions-item label="褰撳墠闃舵">
+ {{ getCurrentStageName() }}
+ </el-descriptions-item>
+ </el-descriptions>
+ </div>
</div>
- <!-- 闃舵璇︽儏鍐呭 -->
+ <!-- 闃舵璇︽儏鍐呭 - 鑷�傚簲楂樺害锛屽彲婊氬姩 -->
<div class="stage-detail-section">
<div class="section-header">
<h3>{{ activeStageName }} - 闃舵璇︽儏</h3>
- <div class="stage-actions">
- <!-- <el-button
- v-if="activeStageData.status !== 'completed'"
- type="success"
- size="small"
- @click="handleCompleteStage"
- >
- 瀹屾垚闃舵
- </el-button>
- <el-button
- type="primary"
- size="small"
- @click="handleViewDetail"
- >
- 鏌ョ湅璇︽儏
- </el-button>
- <el-button
- v-if="activeStageData.status === 'completed'"
- type="warning"
- size="small"
- @click="handleModifyStage"
- >
- 淇敼淇℃伅
- </el-button> -->
- </div>
+ <div class="stage-actions"></div>
</div>
<!-- 鍔ㄦ�侀樁娈靛唴瀹� -->
- <div class="stage-content">
+ <div class="stage-content-wrapper">
<component
:is="getStageComponent()"
:stageData="activeStageData"
:caseInfo="caseInfo"
+ :infoid="caseId"
/>
</div>
</div>
@@ -164,19 +153,19 @@
</template>
<script>
-import { getDonationProcessDetail } from './donationProcess';
-import DonorMaintenanceStage from './components/DonorMaintenanceStage';
-import MedicalAssessmentStage from './components/MedicalAssessmentStage';
-import DeathJudgmentStage from './components/DeathJudgmentStage';
-import DonationConfirmStage from './components/DonationConfirmStage';
-import EthicalReviewStage from './components/EthicalReviewStage';
-import OrganAllocationStage from './components/OrganAllocationStage';
-import OrganProcurementStage from './components/OrganProcurementStage';
-import OrganUtilizationStage from './components/OrganUtilizationStage';
+import { getDonationProcessDetail } from "./donationProcess";
+import DonorMaintenanceStage from "./components/DonorMaintenanceStage";
+import MedicalAssessmentStage from "./components/MedicalAssessmentStage";
+import DeathJudgmentStage from "./components/DeathJudgmentStage";
+import DonationConfirmStage from "./components/DonationConfirmStage";
+import EthicalReviewStage from "./components/EthicalReviewStage";
+import OrganAllocationStage from "./components/OrganAllocationStage";
+import OrganProcurementStage from "./components/OrganProcurementStage";
+import OrganUtilizationStage from "./components/OrganUtilizationStage";
import dayjs from "dayjs";
export default {
- name: 'DonationProcessDetail',
+ name: "DonationProcessDetail",
components: {
DonorMaintenanceStage,
MedicalAssessmentStage,
@@ -187,96 +176,97 @@
OrganProcurementStage,
OrganUtilizationStage
},
- dicts: ['sys_user_sex', 'sys_BloodType', 'sys_0_1'],
+ dicts: ["sys_user_sex", "sys_BloodType", "sys_0_1"],
data() {
return {
caseId: null,
caseInfo: {
- id: '',
- caseNo: '',
- hospitalNo: '',
- donorName: '',
- gender: '',
- age: '',
- bloodType: '',
- diagnosis: '',
- status: 'in_progress',
- createTime: '',
- registrant: '',
- currentStage: 'donor_maintenance'
+ id: "",
+ caseNo: "",
+ hospitalNo: "",
+ donorName: "",
+ gender: "",
+ age: "",
+ bloodType: "",
+ diagnosis: "",
+ status: "in_progress",
+ createTime: "",
+ registrant: "",
+ currentStage: "donor_maintenance"
},
processStages: [
{
- key: 'donor_maintenance',
- name: '渚涜�呯淮鎶�',
- status: 'completed',
- completeTime: '2025-12-01 10:00:00',
- updateTime: '2025-12-01 10:00:00',
- operator: '寮犲尰鐢�'
+ key: "donor_maintenance",
+ name: "渚涜�呯淮鎶�",
+ status: "completed",
+ completeTime: "2025-12-01 10:00:00",
+ updateTime: "2025-12-01 10:00:00",
+ operator: "寮犲尰鐢�"
},
{
- key: 'medical_assessment',
- name: '鍖诲璇勪及',
- status: 'completed',
- completeTime: '2025-12-02 14:30:00',
- updateTime: '2025-12-02 14:30:00',
- operator: '鏉庝富浠�'
+ key: "death_judgment",
+ name: "姝讳骸鍒ゅ畾",
+ status: "completed",
+ completeTime: "2025-12-02 14:30:00",
+ updateTime: "2025-12-02 14:30:00",
+ operator: "鐜嬪尰鐢�"
},
{
- key: 'death_judgment',
- name: '姝讳骸鍒ゅ畾',
- status: 'completed',
- completeTime: '2025-12-03 09:15:00',
- updateTime: '2025-12-03 09:15:00',
- operator: '鐜嬪尰鐢�'
+ key: "medical_assessment",
+ name: "鍖诲璇勪及",
+ status: "completed",
+
+ completeTime: "2025-12-03 09:15:00",
+ updateTime: "2025-12-03 09:15:00",
+ operator: "鏉庝富浠�"
},
{
- key: 'donation_confirm',
- name: '鎹愮尞纭',
- status: 'completed',
- completeTime: '2025-12-03 11:00:00',
- updateTime: '2025-12-03 11:00:00',
- operator: '璧靛崗璋冨憳'
+ key: "donation_confirm",
+ name: "鎹愮尞纭",
+ status: "completed",
+ completeTime: "2025-12-03 11:00:00",
+ updateTime: "2025-12-03 11:00:00",
+ operator: "璧靛崗璋冨憳"
},
{
- key: 'ethical_review',
- name: '浼︾悊瀹℃煡',
- status: 'completed',
- completeTime: '2025-12-03 15:20:00',
- updateTime: '2025-12-03 15:20:00',
- operator: '浼︾悊濮斿憳浼�'
+ key: "ethical_review",
+ name: "浼︾悊瀹℃煡",
+ status: "completed",
+ completeTime: "2025-12-03 15:20:00",
+ updateTime: "2025-12-03 15:20:00",
+ operator: "浼︾悊濮斿憳浼�"
},
{
- key: 'organ_allocation',
- name: '鍣ㄥ畼鍒嗛厤',
- status: 'in_progress',
- updateTime: '2025-12-04 10:00:00',
- operator: '鍒嗛厤绯荤粺'
+ key: "organ_allocation",
+ name: "鍣ㄥ畼鍒嗛厤",
+ status: "in_progress",
+ updateTime: "2025-12-04 10:00:00",
+ operator: "鍒嗛厤绯荤粺"
},
{
- key: 'organ_procurement',
- name: '鍣ㄥ畼鑾峰彇',
- status: 'pending',
- operator: '寰呭垎閰�'
+ key: "organ_procurement",
+ name: "鍣ㄥ畼鑾峰彇",
+ status: "pending",
+ operator: "寰呭垎閰�"
},
{
- key: 'organ_utilization',
- name: '鍣ㄥ畼鍒╃敤',
- status: 'pending',
- operator: '寰呭垎閰�'
+ key: "organ_utilization",
+ name: "鍣ㄥ畼鍒╃敤",
+ status: "pending",
+ operator: "寰呭垎閰�"
}
],
- activeStage: 'organ_allocation',
- activeStageName: '鍣ㄥ畼鍒嗛厤',
+ activeStage: "organ_allocation",
+ activeStageName: "鍣ㄥ畼鍒嗛厤",
activeStageData: {},
loading: false
};
},
- computed: {
-
- },
+ computed: {},
created() {
this.caseId = this.$route.query.id;
+ console.log(this.caseId, "this.caseId");
+
if (this.caseId) {
this.getDetail();
} else {
@@ -285,16 +275,16 @@
this.setActiveStage(this.activeStage);
},
methods: {
- getStageComponent() {
+ getStageComponent() {
const componentMap = {
- 'donor_maintenance': 'DonorMaintenanceStage',
- 'medical_assessment': 'MedicalAssessmentStage',
- 'death_judgment': 'DeathJudgmentStage',
- 'donation_confirm': 'DonationConfirmStage',
- 'ethical_review': 'EthicalReviewStage',
- 'organ_allocation': 'OrganAllocationStage',
- 'organ_procurement': 'OrganProcurementStage',
- 'organ_utilization': 'OrganUtilizationStage'
+ donor_maintenance: "DonorMaintenanceStage",
+ death_judgment: "DeathJudgmentStage",
+ medical_assessment: "MedicalAssessmentStage",
+ donation_confirm: "DonationConfirmStage",
+ ethical_review: "EthicalReviewStage",
+ organ_allocation: "OrganAllocationStage",
+ organ_procurement: "OrganProcurementStage",
+ organ_utilization: "OrganUtilizationStage"
};
return componentMap[this.activeStage];
},
@@ -309,8 +299,8 @@
this.setActiveStage(response.data.currentStage);
}
} catch (error) {
- console.error('鑾峰彇鎹愮尞杩涚▼璇︽儏澶辫触:', error);
- this.$message.error('鑾峰彇璇︽儏澶辫触');
+ console.error("鑾峰彇鎹愮尞杩涚▼璇︽儏澶辫触:", error);
+ this.$message.error("鑾峰彇璇︽儏澶辫触");
} finally {
this.loading = false;
}
@@ -318,18 +308,18 @@
// 鐢熸垚妯℃嫙鏁版嵁
generateMockData() {
this.caseInfo = {
- id: '202512001',
- caseNo: 'C202512001',
- hospitalNo: 'D202512001',
- donorName: '寮犱笁',
- gender: '0',
+ id: "202512001",
+ caseNo: "C202512001",
+ hospitalNo: "D202512001",
+ donorName: "寮犱笁",
+ gender: "0",
age: 45,
- bloodType: 'A',
- diagnosis: '鑴戝浼�',
- status: 'in_progress',
- createTime: '2025-12-01 08:00:00',
- registrant: '鏉庡崗璋冨憳',
- currentStage: 'organ_allocation'
+ bloodType: "A",
+ diagnosis: "鑴戝浼�",
+ status: "in_progress",
+ createTime: "2025-12-01 08:00:00",
+ registrant: "鏉庡崗璋冨憳",
+ currentStage: "organ_allocation"
};
},
// 璁剧疆褰撳墠婵�娲婚樁娈�
@@ -339,77 +329,78 @@
if (stage) {
this.activeStageName = stage.name;
this.activeStageData = stage;
+ console.log(this.activeStageData, "this.activeStageData");
}
},
// 澶勭悊闃舵鐐瑰嚮
handleStageClick(stage) {
- if (stage.status !== 'pending') {
+ if (stage.status !== "pending") {
this.setActiveStage(stage.key);
} else {
- this.$message.warning('璇ラ樁娈靛皻鏈紑濮嬶紝鏃犳硶鏌ョ湅璇︽儏');
+ this.$message.warning("璇ラ樁娈靛皻鏈紑濮嬶紝鏃犳硶鏌ョ湅璇︽儏");
}
},
// 鑾峰彇闃舵鐘舵�佹爣绛剧被鍨�
getStageStatusTag(status) {
const map = {
- 'completed': 'success',
- 'in_progress': 'warning',
- 'pending': 'info'
+ completed: "success",
+ in_progress: "warning",
+ pending: "info"
};
- return map[status] || 'info';
+ return map[status] || "info";
},
// 鑾峰彇闃舵鐘舵�佹枃鏈�
getStageStatusText(status) {
const map = {
- 'completed': '宸插畬鎴�',
- 'in_progress': '杩涜涓�',
- 'pending': '鏈紑濮�'
+ completed: "宸插畬鎴�",
+ in_progress: "杩涜涓�",
+ pending: "鏈紑濮�"
};
- return map[status] || '鏈煡';
+ return map[status] || "鏈煡";
},
// 鑾峰彇鏁翠綋鐘舵�佹爣绛剧被鍨�
getOverallStatusTag(status) {
const map = {
- 'completed': 'success',
- 'in_progress': 'warning',
- 'pending': 'info',
- 'terminated': 'danger'
+ completed: "success",
+ in_progress: "warning",
+ pending: "info",
+ terminated: "danger"
};
- return map[status] || 'info';
+ return map[status] || "info";
},
// 鑾峰彇鏁翠綋鐘舵�佹枃鏈�
getStatusText(status) {
const map = {
- 'completed': '宸插畬鎴�',
- 'in_progress': '杩涜涓�',
- 'pending': '鏈紑濮�',
- 'terminated': '宸茬粓姝�'
+ completed: "宸插畬鎴�",
+ in_progress: "杩涜涓�",
+ pending: "鏈紑濮�",
+ terminated: "宸茬粓姝�"
};
- return map[status] || '鏈煡';
+ return map[status] || "鏈煡";
},
// 鏃堕棿鏍煎紡鍖�
formatTime(time) {
- if (!time) return '-';
- return dayjs(time).format('YYYY-MM-DD HH:mm');
+ if (!time) return "-";
+ return dayjs(time).format("YYYY-MM-DD HH:mm");
},
// 鑾峰彇褰撳墠闃舵鍚嶇О
getCurrentStageName() {
const currentStage = this.processStages.find(
- stage => stage.status === 'in_progress'
+ stage => stage.status === "in_progress"
);
- return currentStage ? currentStage.name : '宸插畬鎴�';
+ return currentStage ? currentStage.name : "宸插畬鎴�";
},
// 缂栬緫鍩烘湰淇℃伅
handleEditBasicInfo() {
- this.$message.info('缂栬緫鍩烘湰淇℃伅鍔熻兘');
+ this.$message.info("缂栬緫鍩烘湰淇℃伅鍔熻兘");
},
// 瀹屾垚闃舵
handleCompleteStage() {
- this.$confirm(`纭畾瑕佸畬鎴愩��${this.activeStageName}銆戦樁娈靛悧锛焋, '鎻愮ず', {
- confirmButtonText: '纭畾',
- cancelButtonText: '鍙栨秷',
- type: 'warning'
+ this.$confirm(`纭畾瑕佸畬鎴愩��${this.activeStageName}銆戦樁娈靛悧锛焋, "鎻愮ず", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning"
}).then(() => {
// 鏇存柊褰撳墠闃舵鐘舵��
const currentIndex = this.processStages.findIndex(
@@ -417,32 +408,34 @@
);
if (currentIndex !== -1) {
- this.processStages[currentIndex].status = 'completed';
- this.processStages[currentIndex].completeTime = new Date().toISOString();
+ this.processStages[currentIndex].status = "completed";
+ this.processStages[
+ currentIndex
+ ].completeTime = new Date().toISOString();
// 婵�娲讳笅涓�涓樁娈�
if (currentIndex < this.processStages.length - 1) {
- this.processStages[currentIndex + 1].status = 'in_progress';
+ this.processStages[currentIndex + 1].status = "in_progress";
this.setActiveStage(this.processStages[currentIndex + 1].key);
} else {
- this.caseInfo.status = 'completed';
+ this.caseInfo.status = "completed";
}
- this.$message.success('闃舵宸插畬鎴�');
+ this.$message.success("闃舵宸插畬鎴�");
}
});
},
// 鏌ョ湅璇︽儏
handleViewDetail() {
const routeMap = {
- 'donor_maintenance': '/case/donorMaintenance/detail',
- 'medical_assessment': '/case/medicalAssessment/detail',
- 'death_judgment': '/case/deathJudgment/detail',
- 'donation_confirm': '/case/donationConfirm/detail',
- 'ethical_review': '/case/ethicalReview/detail',
- 'organ_allocation': '/case/organAllocation/detail',
- 'organ_procurement': '/case/organProcurement/detail',
- 'organ_utilization': '/case/organUtilization/detail'
+ donor_maintenance: "/case/donorMaintenance/detail",
+ death_judgment: "/case/deathJudgment/detail",
+ medical_assessment: "/case/medicalAssessment/detail",
+ donation_confirm: "/case/donationConfirm/detail",
+ ethical_review: "/case/ethicalReview/detail",
+ organ_allocation: "/case/organAllocation/detail",
+ organ_procurement: "/case/organProcurement/detail",
+ organ_utilization: "/case/organUtilization/detail"
};
const route = routeMap[this.activeStage];
@@ -466,47 +459,170 @@
padding: 20px;
background-color: #f5f7fa;
min-height: 100vh;
+ box-sizing: border-box;
}
.process-card {
border-radius: 8px;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+ margin-bottom: 20px;
}
.process-container {
display: flex;
- min-height: 800px;
+ min-height: 600px; /* 璁剧疆涓�涓渶灏忛珮搴� */
gap: 20px;
+ align-items: flex-start; /* 椤堕儴瀵归綈 */
}
-/* 宸︿晶鏃堕棿绾挎牱寮� */
+/* 宸︿晶鏃堕棿绾挎牱寮� - 鍥哄畾楂樺害锛屽唴閮ㄦ粴鍔� */
.timeline-section {
- flex: 0 0 300px;
+ flex: 0 0 320px; /* 鍥哄畾瀹藉害 */
+ display: flex;
+ flex-direction: column;
background: white;
border-radius: 6px;
padding: 20px;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
+ height: calc(120vh - 120px); /* 鏍规嵁瑙嗗彛楂樺害鑷�傚簲 */
+ max-height: 1200px; /* 璁剧疆鏈�澶ч珮搴� */
+ position: sticky; /* 浣跨敤 sticky 瀹氫綅 */
+ top: 20px; /* 璺濈椤堕儴 20px */
}
-.section-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: 20px;
- padding-bottom: 15px;
- border-bottom: 1px solid #e4e7ed;
+.timeline-scroll-container {
+ flex: 1;
+ overflow-y: auto; /* 鍐呴儴鍙粴鍔� */
+ margin-top: 20px;
+ padding-right: 8px; /* 涓烘粴鍔ㄦ潯鐣欏嚭绌洪棿 */
}
-.section-header h3 {
- margin: 0;
- color: #303133;
- font-size: 16px;
+.timeline-scroll-container::-webkit-scrollbar {
+ width: 6px;
+}
+
+.timeline-scroll-container::-webkit-scrollbar-track {
+ background: #f1f1f1;
+ border-radius: 3px;
+}
+
+.timeline-scroll-container::-webkit-scrollbar-thumb {
+ background: #c1c1c1;
+ border-radius: 3px;
+}
+
+.timeline-scroll-container::-webkit-scrollbar-thumb:hover {
+ background: #a8a8a8;
}
.timeline-container {
display: flex;
flex-direction: column;
gap: 15px;
+ padding-bottom: 10px;
+}
+
+/* 鍙充晶鍐呭鍖哄煙鏍峰紡 - 鑷�傚簲楂樺害 */
+.content-section {
+ flex: 1;
+ display: flex;
+ flex-direction: column;
+ gap: 20px;
+ min-height: 0; /* 閲嶈锛氬厑璁竑lex瀛愰」鍘嬬缉 */
+}
+
+.basic-info-section {
+ background: white;
+ border-radius: 6px;
+ padding: 20px;
+ box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
+ display: flex;
+ flex-direction: column;
+ min-height: 0; /* 閲嶈 */
+}
+
+.basic-info-content {
+ flex: 1;
+ max-height: 300px; /* 鍩烘湰淇℃伅鍖哄煙鏈�澶ч珮搴� */
+ overflow-y: auto; /* 鍩烘湰淇℃伅鍐呴儴鍙粴鍔� */
+ margin-top: 20px;
+ padding-right: 8px;
+}
+
+.basic-info-content::-webkit-scrollbar {
+ width: 6px;
+}
+
+.basic-info-content::-webkit-scrollbar-track {
+ background: #f1f1f1;
+ border-radius: 3px;
+}
+
+.basic-info-content::-webkit-scrollbar-thumb {
+ background: #c1c1c1;
+ border-radius: 3px;
+}
+
+.basic-info-content::-webkit-scrollbar-thumb:hover {
+ background: #a8a8a8;
+}
+
+.basic-info-content .el-descriptions {
+ width: 100%;
+}
+
+.stage-detail-section {
+ flex: 1; /* 鍗犳嵁鍓╀綑绌洪棿 */
+ background: white;
+ border-radius: 6px;
+ padding: 20px;
+ box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
+ display: flex;
+ flex-direction: column;
+ min-height: 400px; /* 鏈�灏忛珮搴� */
+ max-height: 800px; /* 鏈�澶ч珮搴︼紝鍙牴鎹渶瑕佽皟鏁� */
+ overflow: hidden; /* 闅愯棌澶栧眰婧㈠嚭 */
+}
+
+.stage-content-wrapper {
+ flex: 1;
+ overflow-y: auto; /* 闃舵璇︽儏鍐呴儴鍙粴鍔� */
+ margin-top: 20px;
+ padding-right: 8px;
+ min-height: 0; /* 閲嶈 */
+}
+
+.stage-content-wrapper::-webkit-scrollbar {
+ width: 6px;
+}
+
+.stage-content-wrapper::-webkit-scrollbar-track {
+ background: #f1f1f1;
+ border-radius: 3px;
+}
+
+.stage-content-wrapper::-webkit-scrollbar-thumb {
+ background: #c1c1c1;
+ border-radius: 3px;
+}
+
+.stage-content-wrapper::-webkit-scrollbar-thumb:hover {
+ background: #a8a8a8;
+}
+
+/* 鍘熸湁鏍峰紡淇濇寔涓嶅彉 */
+.section-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ flex-shrink: 0; /* 闃叉琚帇缂� */
+}
+
+.section-header h3 {
+ margin: 0;
+ color: #303133;
+ font-size: 16px;
+ white-space: nowrap;
}
.timeline-item {
@@ -517,6 +633,7 @@
cursor: pointer;
transition: all 0.3s ease;
border: 1px solid #e4e7ed;
+ flex-shrink: 0; /* 闃叉琚帇缂� */
}
.timeline-item:hover {
@@ -525,17 +642,17 @@
}
.timeline-item.active {
- border-color: #409EFF;
+ border-color: #409eff;
background-color: #f0f9ff;
}
.timeline-item.completed {
- border-color: #67C23A;
+ border-color: #67c23a;
background-color: #f0f9e8;
}
.timeline-item.in-progress {
- border-color: #E6A23C;
+ border-color: #e6a23c;
background-color: #fdf6ec;
}
@@ -557,11 +674,11 @@
}
.timeline-item.completed .timeline-marker {
- background-color: #67C23A;
+ background-color: #67c23a;
}
.timeline-item.in-progress .timeline-marker {
- background-color: #E6A23C;
+ background-color: #e6a23c;
}
.timeline-item.pending .timeline-marker {
@@ -583,6 +700,10 @@
font-weight: 600;
color: #303133;
font-size: 14px;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ max-width: 150px;
}
.stage-info {
@@ -590,33 +711,18 @@
color: #606266;
}
-.time-info, .operator-info {
+.time-info,
+.operator-info {
margin-bottom: 4px;
-}
-
-/* 鍙充晶鍐呭鍖哄煙鏍峰紡 */
-.content-section {
- flex: 1;
- display: flex;
- flex-direction: column;
- gap: 20px;
-}
-
-.basic-info-section,
-.stage-detail-section {
- background: white;
- border-radius: 6px;
- padding: 20px;
- box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
}
.stage-actions {
display: flex;
gap: 10px;
-}
-
-.stage-content {
- margin-top: 20px;
+ flex-wrap: wrap;
}
/* 鍝嶅簲寮忚璁� */
@@ -627,7 +733,18 @@
.timeline-section {
flex: none;
- margin-bottom: 20px;
+ width: 100%;
+ height: auto;
+ max-height: 300px;
+ position: static; /* 灏忓睆骞曞彇娑� sticky */
+ }
+
+ .timeline-scroll-container {
+ max-height: 250px;
+ }
+
+ .stage-detail-section {
+ max-height: 500px;
}
}
@@ -652,26 +769,17 @@
gap: 10px;
}
- .stage-actions {
- flex-wrap: wrap;
+ .stage-name {
+ max-width: 120px;
}
-}
-/* 鍔ㄧ敾鏁堟灉 */
-.timeline-item {
- transition: all 0.3s ease;
-}
+ .basic-info-content {
+ max-height: 250px;
+ }
-.timeline-item:hover {
- transform: translateY(-2px);
-}
-
-/* 杩涘害鏉℃牱寮忎紭鍖� */
-:deep(.el-progress-bar) {
- padding-right: 0;
-}
-
-:deep(.el-progress__text) {
- font-size: 12px;
+ .stage-detail-section {
+ min-height: 300px;
+ max-height: 400px;
+ }
}
</style>
diff --git a/src/views/business/maintain/maintainInfo.vue b/src/views/business/maintain/maintainInfo.vue
index 8083e63..c530732 100644
--- a/src/views/business/maintain/maintainInfo.vue
+++ b/src/views/business/maintain/maintainInfo.vue
@@ -566,9 +566,9 @@
import Pagination from "@/components/Pagination";
import UploadAttachment from "@/components/UploadAttachment";
import FilePreviewDialog from "@/components/FilePreviewDialog";
-import LiverKidneyPanel from "./components/LiverKidneyPanel.vue";
-import BloodRoutinePanel from "./components/BloodRoutinePanel.vue";
-import UrineRoutinePanel from "./components/UrineRoutinePanel.vue";
+import LiverKidneyPanel from "@/components/MaintainComponents/LiverKidneyPanel.vue";
+import BloodRoutinePanel from "@/components/MaintainComponents/BloodRoutinePanel.vue";
+import UrineRoutinePanel from "@/components/MaintainComponents/UrineRoutinePanel.vue";
import dayjs from "dayjs";
export default {
diff --git a/src/views/project/components/orgselect/index.vue b/src/views/project/components/orgselect/index.vue
index be20106..6ae9a76 100644
--- a/src/views/project/components/orgselect/index.vue
+++ b/src/views/project/components/orgselect/index.vue
@@ -115,6 +115,7 @@
console.error("'lazy-load'蹇呴』鍜�'filterable'鍚屾椂浣跨敤锛�");
return false;
}
+ console.log(456789);
if (this.lazyLoad) {
this.focusEvents.func = () => {
@@ -153,6 +154,8 @@
};
this.dataList.unshift(all);
}
+ console.log(this.dataList,'this.dataList');
+
this.tempList = this.dataList.map(item => item);
this.focusEvents.loaded = true;
this.isLoading = false;
diff --git a/vue.config.js b/vue.config.js
index d2914fb..40c759e 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -33,8 +33,8 @@
proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {
- // target:`http://localhost:8080`,
- target:`http://192.168.100.10:8080`,
+ target:`http://localhost:8080`,
+ // target:`http://192.168.100.10:8080`,
// target:`http://192.168.100.137:8080`,
// target: `https://slb.hospitalstar.com:9093`,
changeOrigin: true,
--
Gitblit v1.9.3