From 475a352a4bfd7ac3a81e8c7c92d3bb64e2e01037 Mon Sep 17 00:00:00 2001
From: WXL <wl_5969728@163.com>
Date: 星期五, 27 二月 2026 15:48:37 +0800
Subject: [PATCH] 青岛维护提交
---
src/views/project/DonationProcess/index.vue | 259 ++++++++++++++++++++++++++++-----------------------
1 files changed, 144 insertions(+), 115 deletions(-)
diff --git a/src/views/project/DonationProcess/index.vue b/src/views/project/DonationProcess/index.vue
index 9eb57f6..451ca73 100644
--- a/src/views/project/DonationProcess/index.vue
+++ b/src/views/project/DonationProcess/index.vue
@@ -40,6 +40,41 @@
<el-option label="宸茬粓姝�" value="99" />
</el-select>
</el-form-item>
+
+ <!-- 鏂板鎼滅储瀛楁 -->
+ <el-form-item label="涓婃姤鏃堕棿" prop="reportTimeRange">
+ <el-date-picker
+ v-model="queryParams.reportTimeRange"
+ type="daterange"
+ range-separator="鑷�"
+ start-placeholder="寮�濮嬫棩鏈�"
+ end-placeholder="缁撴潫鏃ユ湡"
+ value-format="yyyy-MM-dd"
+ size="small"
+ style="width: 240px;"
+ />
+ </el-form-item>
+
+ <el-form-item label="棣栬瘖鍖婚櫌" prop="treatmenthospitalname">
+ <el-input
+ v-model="queryParams.treatmenthospitalname"
+ placeholder="璇疯緭鍏ラ璇婂尰闄�"
+ clearable
+ size="small"
+ @keyup.enter.native="handleQuery"
+ />
+ </el-form-item>
+
+ <el-form-item label="浣忛櫌鍙�" prop="hospitalNo">
+ <el-input
+ v-model="queryParams.hospitalNo"
+ placeholder="璇疯緭鍏ヤ綇闄㈠彿"
+ clearable
+ size="small"
+ @keyup.enter.native="handleQuery"
+ />
+ </el-form-item>
+
<el-form-item>
<el-button
type="primary"
@@ -147,15 +182,23 @@
<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
+ :options="dict.type.sys_BloodType"
+ :value="scope.row.bloodtype"
+ />
+ </template>
+ </el-table-column>
<el-table-column
- label="璇佷欢鍙风爜"
+ label="浼犳煋鐥�"
align="center"
- prop="idcardno"
+ prop="infectious"
width="180"
/>
<el-table-column
- label="娌荤枟鍖婚櫌"
+ label="棣栬瘖鍖婚櫌"
align="center"
prop="treatmenthospitalname"
width="150"
@@ -169,75 +212,46 @@
/>
<el-table-column
- label="妗堜緥缂栧彿"
+ label="浣忛櫌鍙�"
align="center"
- prop="caseNo"
+ prop="hospitalNo"
width="120"
/>
<!-- 绗竴娆″尰瀛﹁瘎浼� -->
<el-table-column
- label="绗竴娆¤瘎浼扮粨璁�"
+ label="璇勪及鐘舵��"
align="center"
- prop="firstAssessState"
+ prop="assessState"
width="120"
>
<template slot-scope="scope">
<dict-tag
:options="dict.type.sys_BaseAssessConclusion"
- :value="scope.row.firstAssessState"
+ :value="scope.row.assessState"
/>
</template>
</el-table-column>
<el-table-column
- label="绗竴娆¤瘎浼版椂闂�"
+ label="璇勪及鏃堕棿"
align="center"
- prop="assessFirstTime"
+ prop="assessTime"
width="110"
>
- <template slot-scope="scope">
- <span>{{ parseTime(scope.row.assessFirstTime, "{y}-{m}-{d}") }}</span>
- </template>
+ <!-- <template slot-scope="scope">
+ <span>{{ parseTime(scope.row.assessTime, "{y}-{m}-{d}") }}</span>
+ </template> -->
</el-table-column>
-
- <!-- 绗簩娆″尰瀛﹁瘎浼� -->
- <el-table-column
- label="绗簩娆¤瘎浼扮粨璁�"
- align="center"
- prop="secondAssessState"
- width="120"
- >
- <template slot-scope="scope">
- <dict-tag
- :options="dict.type.sys_BaseAssessConclusion"
- :value="scope.row.secondAssessState"
- />
- </template>
- </el-table-column>
-
- <el-table-column
- label="绗簩娆¤瘎浼版椂闂�"
- align="center"
- prop="assessSecondTime"
- width="110"
- >
- <template slot-scope="scope">
- <span>{{
- parseTime(scope.row.assessSecondTime, "{y}-{m}-{d}")
- }}</span>
- </template>
- </el-table-column>
-
<el-table-column
label="浜插睘纭鏃堕棿"
align="center"
prop="signDate"
width="110"
>
- <template slot-scope="scope">
+ <!-- <template slot-scope="scope">
<span>{{ parseTime(scope.row.signDate, "{y}-{m}-{d}") }}</span>
- </template>
+ </template> -->
</el-table-column>
<el-table-column
@@ -317,7 +331,7 @@
</el-table-column>
<!-- 鎿嶄綔鍒楋細鍙繚鐣欑粓姝㈠拰鏌ョ湅璇︽儏 -->
- <el-table-column label="鎿嶄綔" align="center" width="150" fixed="right">
+ <el-table-column label="鎿嶄綔" align="center" width="200" fixed="right">
<template slot-scope="scope">
<el-button size="mini" type="text" @click="handleDetail(scope.row)"
>鏌ョ湅璇︽儏</el-button
@@ -331,6 +345,14 @@
scope.row.terminationCase === 0 && scope.row.recordstate !== '99'
"
>缁堟</el-button
+ >
+ <el-button
+ size="mini"
+ type="text"
+ style="color: #67c23a;"
+ @click="handleRestore(scope.row)"
+ v-if="scope.row.terminationCase === 1"
+ >鎭㈠</el-button
>
</template>
</el-table-column>
@@ -354,39 +376,29 @@
<donor-detail :donorData="currentRecord" @close="detailVisible = false" />
</el-dialog>
- <!-- 缁堟纭寮规 -->
- <el-dialog
- title="缁堟纭"
- :visible.sync="terminateVisible"
- width="400px"
- append-to-body
- >
- <div style="margin-bottom: 20px;">
- <p>
- 纭畾瑕佺粓姝㈡崘鐚��
- <strong>{{ currentRecord.name }}</strong> 鐨勬崘鐚繘绋嬪悧锛�
- </p>
- <p style="color: #f56c6c; font-size: 12px;">
- 姝ゆ搷浣滀笉鍙�嗭紝璇疯皑鎱庢搷浣滐紒
- </p>
- </div>
- <div slot="footer">
- <el-button @click="terminateVisible = false">鍙栨秷</el-button>
- <el-button type="danger" @click="submitTerminate">纭缁堟</el-button>
- </div>
- </el-dialog>
+ <!-- 缁堟/鎭㈠寮规缁勪欢 -->
+ <terminate-restore-modal
+ :current-record="currentRecord"
+ :visible="modalVisible"
+ :titles="modalTitles"
+ @update:visible="handleModalVisibleChange"
+ @operation-success="handleOperationSuccess"
+ />
</div>
</template>
<script>
import { courselist, terminateDonor } from "@/api/businessApi";
+import TerminateRestoreModal from "@/components/TerminateRestoreModal";
export default {
name: "Donatebaseinfo",
- dicts: ["sys_donornode", "sys_EthicalReview", "sys_BaseAssessConclusion"],
+ components: {
+ TerminateRestoreModal
+ },
+ dicts: ["sys_donornode",'sys_BloodType', "sys_EthicalReview", "sys_BaseAssessConclusion"],
data() {
return {
- // 閬僵灞�
loading: false,
// 鏄剧ず鎼滅储鏉′欢
showSearch: true,
@@ -396,8 +408,6 @@
donatebaseinfoList: [],
// 璇︽儏寮规鏄剧ず
detailVisible: false,
- // 缁堟纭寮规鏄剧ず
- terminateVisible: false,
// 褰撳墠鎿嶄綔璁板綍
currentRecord: {},
// 缁熻鏁版嵁
@@ -413,7 +423,21 @@
pageSize: 10,
name: undefined,
idcardno: undefined,
- recordstate: undefined
+ recordstate: undefined,
+ // 鏂板鐨勬悳绱㈠瓧娈�
+ reportTimeRange: [],
+ treatmenthospitalname: undefined,
+ hospitalNo: undefined
+ },
+ // 寮规鏄剧ず鐘舵��
+ modalVisible: {
+ terminate: false,
+ restore: false
+ },
+ // 寮规鏍囬
+ modalTitles: {
+ terminate: "缁堟鎹愮尞杩涚▼",
+ restore: "鎭㈠鎹愮尞杩涚▼"
}
};
},
@@ -422,26 +446,24 @@
},
methods: {
/** 鏌ヨ鎹愮尞鍩虹鍒楄〃 */
+ /** 鏌ヨ鎹愮尞鍩虹鍒楄〃 */
async getList() {
this.loading = true;
try {
const response = await courselist(this.queryParams);
- // 鏍规嵁瀹為檯鎺ュ彛杩斿洖缁撴瀯璋冩暣
let realData = [];
realData = response.data.donatebaseinfoProgressDTOS;
this.total = response.total;
this.stats.pendingCount = response.data.terminationCase[0];
this.stats.approvedCount = response.data.terminationCase[1];
this.stats.terminatedCount = response.data.terminationCase[2];
- this.stats.totalCount = response.total;
- // 瀛樺偍鎵�鏈夋暟鎹敤浜庡墠绔瓫閫夊拰鍒嗛〉
- this.allTableData = realData;
+ this.stats.totalCount =
+ response.total - response.data.terminationCase[2];
- // 搴旂敤鍓嶇绛涢�夋潯浠讹紙濡傛灉鎺ュ彛涓嶆敮鎸佸悗绔瓫閫夛級
+ this.allTableData = realData;
let filteredData = this.applyFrontendFilter(realData);
- // 鍓嶇鍒嗛〉澶勭悊锛堝鏋滄帴鍙d笉鏀寔鍚庣鍒嗛〉锛�
if (!response.total && !response.data) {
const startIndex =
(this.queryParams.pageNum - 1) * this.queryParams.pageSize;
@@ -449,18 +471,13 @@
this.donatebaseinfoList = filteredData.slice(startIndex, endIndex);
this.total = filteredData.length;
} else {
- // 鎺ュ彛宸插垎椤碉紝鐩存帴浣跨敤杩斿洖鏁版嵁
this.donatebaseinfoList = filteredData;
}
-
- // 鏇存柊缁熻鏁版嵁
- // this.updateStats(realData);
} catch (error) {
console.error("鑾峰彇鏁版嵁澶辫触:", error);
this.$message.error("鏁版嵁鍔犺浇澶辫触");
this.donatebaseinfoList = [];
this.total = 0;
- // this.updateStats([]);
} finally {
this.loading = false;
}
@@ -489,21 +506,37 @@
);
}
- return filteredData;
- },
+ if (this.queryParams.treatmenthospitalname) {
+ filteredData = filteredData.filter(
+ item =>
+ item.treatmenthospitalname &&
+ item.treatmenthospitalname.includes(
+ this.queryParams.treatmenthospitalname
+ )
+ );
+ }
- /** 鏇存柊缁熻鏁版嵁 */
- updateStats(data) {
- this.stats.totalCount = data.length;
- this.stats.pendingCount = data.filter(
- item => item.recordstate === "0" || item.recordstate === 0
- ).length;
- this.stats.approvedCount = data.filter(
- item => item.recordstate === "1" || item.recordstate === 1
- ).length;
- this.stats.terminatedCount = data.filter(
- item => item.recordstate === "99" || item.recordstate === 99
- ).length;
+ if (this.queryParams.hospitalNo) {
+ filteredData = filteredData.filter(
+ item =>
+ item.hospitalNo &&
+ item.hospitalNo.includes(this.queryParams.hospitalNo)
+ );
+ }
+
+ if (
+ this.queryParams.reportTimeRange &&
+ this.queryParams.reportTimeRange.length === 2
+ ) {
+ const [startTime, endTime] = this.queryParams.reportTimeRange;
+ filteredData = filteredData.filter(item => {
+ if (!item.reporttime) return false;
+ const reportDate = this.parseTime(item.reporttime, "{y}-{m}-{d}");
+ return reportDate >= startTime && reportDate <= endTime;
+ });
+ }
+
+ return filteredData;
},
/** 鑾峰彇鐘舵�佹爣绛炬牱寮� */
@@ -529,8 +562,6 @@
/** 鏃堕棿鏍煎紡鍖� */
parseTime(time, format) {
if (!time) return "-";
-
- // 澶勭悊鏃堕棿鎴冲拰鏃ユ湡瀛楃涓�
const date = new Date(time);
if (isNaN(date.getTime())) return time;
@@ -569,26 +600,24 @@
/** 缁堟鎿嶄綔 */
handleTerminate(row) {
this.currentRecord = { ...row };
- this.terminateVisible = true;
+ this.modalVisible = { ...this.modalVisible, terminate: true };
},
- /** 鎻愪氦缁堟 */
- async submitTerminate() {
- try {
- // 璋冪敤缁堟鎺ュ彛
- await terminateDonor({
- id: this.currentRecord.id,
- caseNo: this.currentRecord.caseNo,
- terminationReason: "绠$悊鍛樻墜鍔ㄧ粓姝�"
- });
+ /** 鎭㈠鎿嶄綔 */
+ handleRestore(row) {
+ this.currentRecord = { ...row };
+ this.modalVisible = { ...this.modalVisible, restore: true };
+ },
- this.$message.success("缁堟鎴愬姛");
- this.terminateVisible = false;
- this.getList(); // 閲嶆柊鍔犺浇鏇存柊鏁版嵁
- } catch (error) {
- this.$message.error("缁堟澶辫触");
- console.error("缁堟閿欒:", error);
- }
+ /** 澶勭悊寮规鏄剧ず鐘舵�佸彉鍖� */
+ handleModalVisibleChange(newVisible) {
+ this.modalVisible = { ...newVisible };
+ },
+
+ /** 澶勭悊鎿嶄綔鎴愬姛 */
+ handleOperationSuccess({ type, record }) {
+ console.log(`${type}鎿嶄綔鎴愬姛:`, record);
+ this.getList(); // 閲嶆柊鍔犺浇鏁版嵁
}
}
};
--
Gitblit v1.9.3