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/OrganUtilization/index.vue |  189 +++++++++++++++++++++++++++++-----------------
 1 files changed, 119 insertions(+), 70 deletions(-)

diff --git a/src/views/business/OrganUtilization/index.vue b/src/views/business/OrganUtilization/index.vue
index 6b1941b..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,67 +89,88 @@
         <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="鎿嶄綔"
+          label="璐熻矗浜�"
           align="center"
-          width="150"
+          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
+          label="鎿嶄綔"
+          fixed="right"
+          align="center"
+          width="210"
           class-name="small-padding fixed-width"
         >
           <template slot-scope="scope">
@@ -191,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 {
       // 閬僵灞�
@@ -216,9 +238,11 @@
       queryParams: {
         pageNum: 1,
         pageSize: 10,
-        hospitalNo: undefined,
-        donorName: undefined,
-        utilizationStatus: undefined
+        inpatientno: undefined,
+        name: undefined,
+        recordstate: undefined,
+        caseNo: undefined,
+        donorno: undefined
       }
     };
   },
@@ -227,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";
     },
@@ -258,8 +296,9 @@
     getStatusText(status) {
       const textMap = {
         completed: "宸插畬鎴�",
-        in_progress: "杩涜涓�",
-        pending: "寰呭鐞�"
+        processing: "杩涜涓�",
+        pending: "寰呭鐞�",
+        closed: "宸插叧闂�"
       };
       return textMap[status] || "鏈煡";
     },
@@ -283,7 +322,10 @@
     handleView(row) {
       this.$router.push({
         path: "/case/organUtilizationInfo",
-        query: { id: row.id }
+        query: {
+          id: row.id,
+          infoid: row.infoid
+        }
       });
     },
     // 鏂板鎸夐挳鎿嶄綔
@@ -293,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
+        }
       });
     },
     // 鍒犻櫎鎸夐挳鎿嶄綔
@@ -306,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(() => {});
     },

--
Gitblit v1.9.3