From 3453ba7e5243022ad4388da1515dc75ad8d81f94 Mon Sep 17 00:00:00 2001
From: WXL <wl_5969728@163.com>
Date: 星期日, 17 五月 2026 15:00:23 +0800
Subject: [PATCH] 近期调试
---
src/views/business/OrganUtilization/OrganUtilizationInfo.vue | 309 ++++++++++++++++-----------------------------------
1 files changed, 96 insertions(+), 213 deletions(-)
diff --git a/src/views/business/OrganUtilization/OrganUtilizationInfo.vue b/src/views/business/OrganUtilization/OrganUtilizationInfo.vue
index 416b83c..6106b5f 100644
--- a/src/views/business/OrganUtilization/OrganUtilizationInfo.vue
+++ b/src/views/business/OrganUtilization/OrganUtilizationInfo.vue
@@ -1,50 +1,28 @@
<template>
<div class="organ-utilization-detail">
<case-basic-info :case-id="caseId" :show-attachment="true" />
-
- <!-- 鍩烘湰淇℃伅 -->
- <el-card class="detail-card">
- <div slot="header" class="clearfix">
- <span class="detail-title">鍣ㄥ畼鍒╃敤鍩烘湰淇℃伅</span>
- <div style="float: right;">
- <el-button type="primary" @click="handleSave" :loading="saveLoading">
- 淇濆瓨
- </el-button>
- <el-button
- type="success"
- @click="handleComplete"
- :disabled="form.recordstate === 'completed'"
- :loading="confirmLoading"
- >
- 瀹屾垚鍒╃敤
- </el-button>
+ <el-form :model="form" ref="form" :rules="rules" label-width="120px">
+ <!-- 鍩烘湰淇℃伅 -->
+ <el-card class="detail-card">
+ <div slot="header" class="clearfix">
+ <span class="detail-title">鍣ㄥ畼鍒╃敤鍩烘湰淇℃伅</span>
+ <div style="float: right;">
+ <el-button
+ type="primary"
+ @click="handleSave"
+ :loading="saveLoading"
+ >
+ 淇濆瓨
+ </el-button>
+ <el-button
+ type="success"
+ @click="handleComplete"
+ :loading="confirmLoading"
+ >
+ 瀹屾垚鍒╃敤
+ </el-button>
+ </div>
</div>
- </div>
-
- <el-form :model="form" ref="form" :rules="rules" label-width="120px">
- <el-row :gutter="20">
- <el-col :span="6">
- <el-form-item align="left" label="閬椾綋鎹愮尞" prop="isbodydonation">
- <el-radio-group v-model="form.isbodydonation">
- <el-radio
- v-for="dict in dict.type.sys_0_1 || []"
- :key="dict.value"
- :label="dict.value"
- >{{ dict.label }}</el-radio
- >
- </el-radio-group>
- </el-form-item>
- </el-col>
- <el-col :span="18">
- <el-form-item align="left" label="鎺ユ敹鍗曚綅" prop="receivingunit">
- <el-input
- v-model="form.receivingunit"
- placeholder="璇疯緭鍏ユ帴鏀跺崟浣�"
- :disabled="form.isbodydonation !== '1'"
- />
- </el-form-item>
- </el-col>
- </el-row>
<el-row :gutter="20">
<el-col :span="6">
@@ -78,7 +56,6 @@
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
style="width: 100%"
- :disabled="form.recordstate === 'completed'"
/>
</el-form-item>
</el-col>
@@ -87,7 +64,7 @@
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="鐧昏浜�" prop="createBy">
- <el-input v-model="form.createBy" readonly />
+ <el-input v-model="form.createBy" />
</el-form-item>
</el-col>
<el-col :span="12">
@@ -97,22 +74,60 @@
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
style="width: 100%"
- readonly
/>
</el-form-item>
</el-col>
</el-row>
- </el-form>
- </el-card>
-
+ </el-card>
+ <el-card class="detail-card">
+ <div slot="header" class="clearfix">
+ <span class="detail-title">閬椾綋鎹愮尞淇℃伅</span>
+ </div>
+ <el-row :gutter="20">
+ <el-col :span="6">
+ <el-form-item align="left" label="閬椾綋鎹愮尞" prop="isbodydonation">
+ <el-radio-group v-model="form.isbodydonation">
+ <el-radio
+ v-for="dict in dict.type.sys_0_1 || []"
+ :key="dict.value"
+ :label="dict.value"
+ >{{ dict.label }}</el-radio
+ >
+ </el-radio-group>
+ </el-form-item>
+ </el-col>
+ <el-col :span="18" v-if="form.isbodydonation == 1">
+ <el-form-item
+ align="left"
+ label="鎺ユ敹鍗曚綅"
+ prop="receivingunitname"
+ >
+ <el-input
+ v-model="form.receivingunitname"
+ placeholder="璇疯緭鍏ユ帴鏀跺崟浣�"
+ />
+ </el-form-item>
+ </el-col>
+ <el-col :span="8" v-else>
+ <el-form-item align="left" label="鎺ユ敹瀹跺睘" prop="relationname">
+ <el-input
+ v-model="form.relationname"
+ placeholder="璇疯緭鍏ユ帴鏀跺灞�"
+ />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ </el-card>
+ </el-form>
<!-- 鍣ㄥ畼鍒╃敤璁板綍閮ㄥ垎 - 鏁村悎鍙楄�呰鎯� -->
<el-card class="utilization-card">
<div slot="header" class="clearfix">
<span class="detail-title">鍣ㄥ畼鍒╃敤璁板綍</span>
<div style="float: right;">
- <el-tag :type="getStatusTagType(form.recordstate)">
- {{ getStatusText(form.recordstate) }}
- </el-tag>
+ <dict-tag
+ :options="dict.type.utilize_statue"
+ :value="form.completeState"
+ />
</div>
</div>
@@ -133,7 +148,6 @@
v-for="dict in dict.type.sys_Organ || []"
:key="dict.value"
:label="dict.value"
- :disabled="form.recordstate === 'completed'"
>
{{ dict.label }}
</el-checkbox>
@@ -194,7 +208,6 @@
<el-input
v-model="scope.row.name"
placeholder="璇疯緭鍏ュ彈鑰呭鍚�"
- :disabled="form.recordstate === 'completed'"
/>
</el-form-item>
</el-col>
@@ -206,7 +219,6 @@
value-format="yyyy-MM-dd"
placeholder="閫夋嫨鍑虹敓鏃ユ湡"
style="width: 100%"
- :disabled="form.recordstate === 'completed'"
/>
</el-form-item>
</el-col>
@@ -216,10 +228,9 @@
v-model="scope.row.sex"
placeholder="璇烽�夋嫨鎬у埆"
style="width: 100%"
- :disabled="form.recordstate === 'completed'"
>
- <el-option label="鐢�" value="0" />
- <el-option label="濂�" value="1" />
+ <el-option label="鐢�" :value="0" />
+ <el-option label="濂�" :value="1" />
</el-select>
</el-form-item>
</el-col>
@@ -231,7 +242,6 @@
<el-input
v-model="scope.row.age"
placeholder="骞撮緞"
- :disabled="form.recordstate === 'completed'"
/>
</el-form-item>
</el-col>
@@ -241,12 +251,11 @@
v-model="scope.row.idcardtype"
placeholder="璇烽�夋嫨璇佷欢绫诲瀷"
style="width: 100%"
- :disabled="form.recordstate === 'completed'"
>
- <el-option label="韬唤璇�" value="1" />
- <el-option label="鎶ょ収" value="2" />
- <el-option label="鍐涘畼璇�" value="3" />
- <el-option label="鍏朵粬" value="4" />
+ <el-option label="韬唤璇�" :value="1" />
+ <el-option label="鎶ょ収" :value="2" />
+ <el-option label="鍐涘畼璇�" :value="3" />
+ <el-option label="鍏朵粬" :value="4" />
</el-select>
</el-form-item>
</el-col>
@@ -255,7 +264,6 @@
<el-input
v-model="scope.row.idcardno"
placeholder="璇佷欢鍙风爜"
- :disabled="form.recordstate === 'completed'"
/>
</el-form-item>
</el-col>
@@ -271,7 +279,6 @@
<el-input
v-model="scope.row.hospitalname"
placeholder="璇疯緭鍏ョЩ妞嶄腑蹇冨悕绉�"
- :disabled="form.recordstate === 'completed'"
/>
</el-form-item>
</el-col>
@@ -280,7 +287,6 @@
<el-input
v-model="scope.row.phone"
placeholder="鑱旂郴鐢佃瘽"
- :disabled="form.recordstate === 'completed'"
/>
</el-form-item>
</el-col>
@@ -294,7 +300,6 @@
:rows="2"
v-model="scope.row.residenceaddress"
placeholder="璇疯緭鍏ヨ缁嗗湴鍧�"
- :disabled="form.recordstate === 'completed'"
/>
</el-form-item>
</el-col>
@@ -313,10 +318,9 @@
<el-date-picker
v-model="scope.row.transplanttime"
type="datetime"
- value-format="YYYY-MM-DD HH:mm:ss"
+ value-format="yyyy-MM-dd HH:mm:ss"
placeholder="閫夋嫨绉绘鏃ユ湡"
style="width: 100%"
- :disabled="form.recordstate === 'completed'"
/>
</el-form-item>
</el-col>
@@ -325,7 +329,6 @@
<el-input
v-model="scope.row.transplantdoct"
placeholder="璇疯緭鍏ョЩ妞嶅尰鐢�"
- :disabled="form.recordstate === 'completed'"
/>
</el-form-item>
</el-col>
@@ -346,7 +349,6 @@
:rows="3"
v-model="scope.row.abandonreason"
placeholder="璇疯緭鍏ユ湭绉绘鍘熷洜"
- :disabled="form.recordstate === 'completed'"
/>
</el-form-item>
</el-col>
@@ -438,7 +440,7 @@
style="width: 100%"
v-model="scope.row.transplanttime"
type="datetime"
- value-format="YYYY-MM-DD HH:mm:ss"
+ value-format="yyyy-MM-dd HH:mm:ss"
placeholder="閫夋嫨绉绘鏃堕棿"
/>
</template>
@@ -459,39 +461,7 @@
<el-table-column label="鍙楄�呭鍚�" align="center" prop="name">
<template slot-scope="scope">
- <el-input
- v-model="scope.row.name"
- placeholder="鍙楄�呭鍚�"
- :disabled="form.recordstate === 'completed'"
- />
- </template>
- </el-table-column>
-
- <el-table-column
- label="鎿嶄綔"
- align="center"
- class-name="small-padding fixed-width"
- v-if="form.recordstate !== 'completed'"
- >
- <template slot-scope="scope">
- <el-button
- size="mini"
- type="text"
- icon="el-icon-edit"
- @click="handleEditUtilization(scope.row)"
- >
- 缂栬緫
- </el-button>
- <el-button
- size="mini"
- type="text"
- icon="el-icon-delete"
- style="color: #F56C6C;"
- @click="handleRemoveOrgan(scope.$index)"
- v-if="!scope.row.id"
- >
- 鍒犻櫎
- </el-button>
+ <el-input v-model="scope.row.name" placeholder="鍙楄�呭鍚�" />
</template>
</el-table-column>
</el-table>
@@ -599,76 +569,6 @@
</div>
</el-card>
- <!-- 缂栬緫鍒╃敤璁板綍瀵硅瘽妗� -->
- <el-dialog
- title="缂栬緫鍣ㄥ畼鍒╃敤璁板綍"
- :visible.sync="editDialogVisible"
- width="600px"
- >
- <el-form :model="currentRecord" label-width="120px">
- <el-row :gutter="20">
- <el-col :span="12">
- <el-form-item label="鍣ㄥ畼鍚嶇О">
- <el-input v-model="currentRecord.organname" readonly />
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="绉绘鐘舵��">
- <el-select
- v-model="currentRecord.transplantstate"
- style="width: 100%"
- >
- <el-option
- v-for="dict in transplantStatusList"
- :key="dict.value"
- :label="dict.label"
- :value="dict.value"
- />
- </el-select>
- </el-form-item>
- </el-col>
- </el-row>
- <el-form-item
- label="鏈Щ妞嶅師鍥�"
- v-if="currentRecord.transplantstate === '0'"
- >
- <el-input
- type="textarea"
- :rows="3"
- v-model="currentRecord.abandonreason"
- placeholder="璇疯緭鍏ユ湭绉绘鍘熷洜"
- />
- </el-form-item>
- <el-form-item
- label="绉绘鍖婚櫌"
- v-if="currentRecord.transplantstate === '1'"
- >
- <el-select
- v-model="currentRecord.hospitalno"
- placeholder="璇烽�夋嫨绉绘鍖婚櫌"
- style="width: 100%"
- >
- <el-option
- v-for="hospital in hospitalList"
- :key="hospital.hospitalNo"
- :label="hospital.hospitalName"
- :value="hospital.hospitalNo"
- />
- </el-select>
- </el-form-item>
- <el-form-item
- label="鍙楄�呭鍚�"
- v-if="currentRecord.transplantstate === '1'"
- >
- <el-input v-model="currentRecord.name" placeholder="璇疯緭鍏ュ彈鑰呭鍚�" />
- </el-form-item>
- </el-form>
- <div slot="footer">
- <el-button @click="editDialogVisible = false">鍙栨秷</el-button>
- <el-button type="primary" @click="handleEditConfirm">纭</el-button>
- </div>
- </el-dialog>
-
<!-- 鏂囦欢棰勮瀵硅瘽妗� -->
<FilePreviewDialog
:visible="filePreviewVisible"
@@ -697,7 +597,7 @@
FilePreviewDialog,
CaseBasicInfo
},
- dicts: ["sys_BloodType", "sys_Organ", "sys_0_1"],
+ dicts: ["sys_BloodType", "sys_Organ", "sys_0_1", "utilize_statue"],
data() {
return {
caseId: null,
@@ -707,7 +607,7 @@
id: undefined,
infoid: undefined,
inpatientno: "",
- recordstate: "pending",
+ completeState: "2",
caseNo: "",
donorno: "",
treatmenthospitalname: "",
@@ -728,7 +628,7 @@
assessannex: "",
donateorgan: "",
isbodydonation: "0",
- receivingunit: "",
+ receivingunitname: "",
createBy: "",
createTime: "",
updateBy: "",
@@ -880,6 +780,9 @@
response.data.length > 0
) {
const data = response.data[0];
+ if (!data.completeState || data.completeState == 1) {
+ data.completeState = "2";
+ }
// 濉厖琛ㄥ崟鏁版嵁
Object.assign(this.form, data);
@@ -898,12 +801,14 @@
)
? data.serviceDonatecomporganList.map(record => ({
...record,
+ transplanttime: record.transplanttime || "",
transplantstate: record.transplantstate
? record.transplantstate.toString()
: "1"
}))
: [];
}
+ console.log(this.utilizationData.serviceDonatecomporganList);
// 鍒濆鍖栭檮浠�
if (this.form.assessannex) {
@@ -1105,31 +1010,6 @@
this.expandedRows = expandedRows.map(item => item.organno);
},
- // 缂栬緫鍒╃敤璁板綍
- handleEditUtilization(row) {
- const index = this.utilizationData.serviceDonatecomporganList.findIndex(
- item => item.organno === row.organno
- );
- if (index !== -1) {
- this.currentRecord = { ...row };
- this.currentEditIndex = index;
- this.editDialogVisible = true;
- }
- },
-
- // 纭缂栬緫
- handleEditConfirm() {
- if (this.currentEditIndex !== -1) {
- this.utilizationData.serviceDonatecomporganList[
- this.currentEditIndex
- ] = {
- ...this.currentRecord
- };
- this.$message.success("鍒╃敤璁板綍鏇存柊鎴愬姛");
- this.editDialogVisible = false;
- }
- },
-
// 鍒犻櫎鍣ㄥ畼璁板綍
handleRemoveOrgan(index) {
this.$confirm("纭鍒犻櫎杩欐潯鍣ㄥ畼璁板綍鍚楋紵", "鎻愮ず", {
@@ -1170,9 +1050,9 @@
// 鑾峰彇鐘舵�佹爣绛剧被鍨�
getStatusTagType(status) {
const typeMap = {
- completed: "success",
- processing: "warning",
- pending: "info"
+ 3: "success",
+ 2: "warning",
+ 1: "info"
};
return typeMap[status] || "info";
},
@@ -1180,9 +1060,9 @@
// 鑾峰彇鐘舵�佹枃鏈�
getStatusText(status) {
const textMap = {
- completed: "宸插畬鎴�",
- processing: "杩涜涓�",
- pending: "寰呭鐞�"
+ 3: "宸插畬鎴�",
+ 2: "杩涜涓�",
+ 1: "寰呭鐞�"
};
return textMap[status] || "鏈煡";
},
@@ -1301,6 +1181,7 @@
}
);
+
if (incompleteRecords.length > 0) {
this.$message.warning("璇峰厛瀹屽杽鎵�鏈夊埄鐢ㄨ褰曠殑淇℃伅");
return;
@@ -1313,7 +1194,7 @@
})
.then(async () => {
this.confirmLoading = true;
- this.form.recordstate = "completed";
+ this.form.completeState = "3";
this.form.completetime =
this.form.completetime ||
new Date()
@@ -1338,13 +1219,13 @@
this.$message.error(
"纭鍒╃敤澶辫触锛�" + (response.msg || "鏈煡閿欒")
);
- this.form.recordstate = "pending";
+ this.form.completeState = "2";
this.form.completetime = "";
}
} catch (error) {
console.error("纭鍒╃敤澶辫触:", error);
this.$message.error("纭鍒╃敤澶辫触");
- this.form.recordstate = "pending";
+ this.form.completeState = "2";
this.form.completetime = "";
} finally {
this.confirmLoading = false;
@@ -1864,6 +1745,7 @@
.recipient-form {
padding: 15px;
}
+
.attachment-header {
flex-wrap: wrap;
}
@@ -1873,6 +1755,7 @@
margin-top: 8px;
margin-left: 0;
}
+
.form-section {
margin-bottom: 20px;
padding-bottom: 15px;
--
Gitblit v1.9.3