From 4c9fdc87987140e8b2c3f0dfc2f6608cdb6be774 Mon Sep 17 00:00:00 2001
From: WXL <wl_5969728@163.com>
Date: 星期三, 21 十月 2026 17:39:24 +0800
Subject: [PATCH] 青岛维护

---
 src/views/business/ethicalReview/index.vue |  377 +++++++++++++++++++++++++++++------------------------
 1 files changed, 203 insertions(+), 174 deletions(-)

diff --git a/src/views/business/ethicalReview/index.vue b/src/views/business/ethicalReview/index.vue
index 6c6eee7..df8748a 100644
--- a/src/views/business/ethicalReview/index.vue
+++ b/src/views/business/ethicalReview/index.vue
@@ -8,37 +8,47 @@
         :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="ethicsConclusion">
+        <el-form-item label="妗堜緥缂栧彿" prop="caseNo">
+          <el-input
+            v-model="queryParams.caseNo"
+            placeholder="璇疯緭鍏ユ渚嬬紪鍙�"
+            clearable
+            style="width: 200px"
+            @keyup.enter.native="handleQuery"
+          />
+        </el-form-item>
+        <el-form-item label="浼︾悊鐘舵��" prop="status">
           <el-select
-            v-model="queryParams.ethicsConclusion"
-            placeholder="璇烽�夋嫨浼︾悊缁撹"
+            v-model="queryParams.status"
+            placeholder="璇烽�夋嫨浼︾悊鐘舵��"
             clearable
             style="width: 200px"
           >
-            <el-option label="瀹℃煡涓�" value="reviewing" />
-            <el-option label="鍚屾剰" value="approved" />
-            <el-option label="淇敼鍚庡悓鎰�" value="approved_with_modifications" />
-            <el-option label="淇敼鍚庨噸瀹�" value="re-review" />
-            <el-option label="涓嶅悓鎰�" value="disapproved" />
-            <el-option label="缁堟瀹℃煡" value="terminated" />
+            <el-option label="鍏ㄩ儴" value="" />
+            <el-option
+              v-for="dict in dict.type.sys_ethical"
+              :key="dict.value"
+              :label="dict.label"
+              :value="dict.value"
+            />
           </el-select>
         </el-form-item>
         <el-form-item label="瀹℃煡鏃堕棿鑼冨洿" prop="reviewTimeRange">
@@ -65,33 +75,20 @@
     <el-card class="tool-card">
       <el-row :gutter="10">
         <el-col :span="16">
-          <el-button type="primary" icon="el-icon-plus" @click="handleCreate"
+          <!-- <el-button type="primary" icon="el-icon-plus" @click="handleCreate"
             >鏂板缓瀹℃煡</el-button
-          >
-          <el-button
+          > -->
+          <!-- <el-button
             type="success"
             icon="el-icon-edit"
             :disabled="single"
             @click="handleUpdate"
             >淇敼</el-button
-          >
-          <el-button
-            type="danger"
-            icon="el-icon-delete"
-            :disabled="multiple"
-            @click="handleDelete"
-            >鍒犻櫎</el-button
-          >
-          <el-button
-            type="warning"
-            icon="el-icon-download"
-            @click="handleExport"
-            >瀵煎嚭</el-button
-          >
+          > -->
           <el-button
             type="info"
             icon="el-icon-check"
-            :disabled="multiple"
+            :disabled="single"
             @click="handleEndReview"
             >缁撴潫瀹℃煡</el-button
           >
@@ -115,88 +112,101 @@
         <el-table-column
           label="浣忛櫌鍙�"
           align="center"
-          prop="hospitalNo"
+          prop="inpatientno"
           width="120"
         />
-        <el-table-column
-          label="鎹愮尞鑰呭鍚�"
-          align="center"
-          prop="donorName"
-          width="120"
-        />
-        <el-table-column label="鎬у埆" align="center" prop="gender" width="80">
+        <el-table-column label="濮撳悕" align="center" prop="name" width="100" />
+
+        <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="diagnosis"
-          min-width="180"
-          show-overflow-tooltip
-        />
-        <el-table-column
-          label="浼︾悊缁撹"
-          align="center"
-          prop="ethicsConclusion"
-          width="120"
-        >
+
+        <el-table-column label="琛�鍨�" align="center" prop="bloodtype" width="80">
           <template slot-scope="scope">
-            <el-tag :type="conclusionFilter(scope.row.ethicsConclusion)">
-              {{ conclusionTextFilter(scope.row.ethicsConclusion) }}
-            </el-tag>
+            <dict-tag
+              :options="dict.type.sys_BloodType"
+              :value="scope.row.bloodtype"
+            />
           </template>
         </el-table-column>
         <el-table-column
-          label="浼︾悊鎰忚"
+          label="鐤剧梾璇婃柇"
           align="center"
-          prop="ethicsOpinion"
-          min-width="200"
+          prop="diagnosisname"
+          width="200"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          label="鎹愮尞绫诲瀷"
+          align="center"
+          prop="donationcategory"
+          width="180"
+        >
+          <template slot-scope="scope">
+            <dict-tag
+              :options="dict.type.sys_DonationCategory"
+              :value="scope.row.donationcategory"
+            />
+          </template>
+        </el-table-column>
+        <el-table-column
+          label="瀹℃煡鐘舵��"
+          align="center"
+          prop="status"
+          width="100"
+        >
+          <template slot-scope="scope">
+            <dict-tag
+              :options="dict.type.sys_ethical"
+              :value="scope.row.status"
+            />
+          </template>
+        </el-table-column>
+        <!-- <el-table-column
+          label="瀹℃煡缁撹"
+          align="center"
+          prop="expertConclusion"
+          width="120"
+        >
+          <template slot-scope="scope">
+            <dict-tag
+              :options="dict.type.expert_Conclusion"
+              :value="scope.row.expertConclusion"
+            />
+          </template>
+        </el-table-column> -->
+        <el-table-column
+          label="瀹℃煡鎰忚"
+          align="center"
+          prop="expertOpinion"
+          min-width="150"
           show-overflow-tooltip
         />
         <el-table-column
           label="瀹℃煡鏃堕棿"
           align="center"
-          prop="reviewTime"
+          prop="expertTime"
           width="160"
         >
           <template slot-scope="scope">
             <span>{{
-              scope.row.reviewTime
-                ? parseTime(scope.row.reviewTime, "{y}-{m}-{d} {h}:{i}")
+              scope.row.expertTime
+                ? parseTime(scope.row.expertTime, "{y}-{m}-{d} {h}:{i}")
                 : "-"
             }}</span>
           </template>
         </el-table-column>
-        <el-table-column
-          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>
-        <el-table-column
-          label="鐧昏浜�"
-          align="center"
-          prop="registrant"
-          width="100"
-        />
         <el-table-column
           label="鎿嶄綔"
           align="center"
-          width="260"
+          width="220"
+          fixed="right"
           class-name="small-padding fixed-width"
         >
           <template slot-scope="scope">
@@ -204,31 +214,22 @@
               size="mini"
               type="text"
               icon="el-icon-view"
-              @click="handleView(scope.row)"
-              >璇︽儏</el-button
+              @click.stop="handleView(scope.row)"
+              >鏌ョ湅</el-button
             >
             <el-button
               size="mini"
               type="text"
               icon="el-icon-edit"
-              @click="handleUpdate(scope.row)"
-              >淇敼</el-button
+              @click.stop="handleUpdate(scope.row)"
+              >缂栬緫</el-button
             >
             <el-button
               size="mini"
               type="text"
-              icon="el-icon-check"
-              @click="handleEndReview(scope.row)"
-              :disabled="scope.row.ethicsConclusion === 'terminated'"
-              >缁撴潫</el-button
-            >
-            <el-button
-              size="mini"
-              type="text"
-              icon="el-icon-delete"
-              style="color: #F56C6C"
-              @click="handleDelete(scope.row)"
-              >鍒犻櫎</el-button
+              icon="el-icon-printer"
+              @click.stop="handleDownload(scope.row)"
+              >鎵撳嵃</el-button
             >
           </template>
         </el-table-column>
@@ -247,19 +248,33 @@
 </template>
 
 <script>
-import { listEthicsReview, delEthicsReview, exportEthicsReview, endEthicsReview } from "./ethicsReview";
+import {
+  reviewinitiateBaseInfoList,
+  ethicalreviewedit,
+  ethicalReviewDownload
+} from "@/api/businessApi";
 import Pagination from "@/components/Pagination";
+import { getToken } from "@/utils/auth";
 
 export default {
   name: "EthicsReviewList",
   components: { Pagination },
-  dicts: ["sys_user_sex"],
+  dicts: [
+    "sys_user_sex",
+    "ReviewForm_status",
+    "sys_ethical",
+    "expert_Conclusion",
+    "sys_BloodType",
+    "sys_DonationCategory"
+  ],
   data() {
     return {
       // 閬僵灞�
       loading: true,
       // 閫変腑鏁扮粍
       ids: [],
+      // 閫変腑鐨勮鏁版嵁
+      selectedRows: [],
       // 闈炲崟涓鐢�
       single: true,
       // 闈炲涓鐢�
@@ -272,9 +287,10 @@
       queryParams: {
         pageNum: 1,
         pageSize: 10,
-        hospitalNo: undefined,
-        donorName: undefined,
-        ethicsConclusion: undefined,
+        inpatientno: undefined,
+        name: undefined,
+        caseNo: undefined,
+        status: undefined,
         reviewTimeRange: []
       }
     };
@@ -283,39 +299,36 @@
     this.getList();
   },
   methods: {
-    // 浼︾悊缁撹杩囨护鍣�
-    conclusionFilter(conclusion) {
-      const conclusionMap = {
-        "reviewing": "warning", // 瀹℃煡涓�
-        "approved": "success", // 鍚屾剰
-        "approved_with_modifications": "primary", // 淇敼鍚庡悓鎰�
-        "re-review": "info", // 淇敼鍚庨噸瀹�
-        "disapproved": "danger", // 涓嶅悓鎰�
-        "terminated": "info" // 缁堟瀹℃煡
-      };
-      return conclusionMap[conclusion] || "info";
-    },
-    conclusionTextFilter(conclusion) {
-      const conclusionMap = {
-        "reviewing": "瀹℃煡涓�",
-        "approved": "鍚屾剰",
-        "approved_with_modifications": "淇敼鍚庡悓鎰�",
-        "re-review": "淇敼鍚庨噸瀹�",
-        "disapproved": "涓嶅悓鎰�",
-        "terminated": "缁堟瀹℃煡"
-      };
-      return conclusionMap[conclusion] || "鏈煡";
-    },
     // 鏌ヨ浼︾悊瀹℃煡鍒楄〃
     getList() {
       this.loading = true;
-      listEthicsReview(this.queryParams)
+
+      // 澶勭悊鏌ヨ鍙傛暟
+      const params = {
+        ...this.queryParams
+      };
+
+      // 绉婚櫎鍒嗛〉鍙傛暟浠ュ鐨勯澶栧弬鏁�
+      delete params.reviewTimeRange;
+
+      // 濡傛灉鏈夋椂闂磋寖鍥村弬鏁�
+      if (
+        this.queryParams.reviewTimeRange &&
+        this.queryParams.reviewTimeRange.length === 2
+      ) {
+        params.expertTimeStart =
+          this.queryParams.reviewTimeRange[0] + " 00:00:00";
+        params.expertTimeEnd =
+          this.queryParams.reviewTimeRange[1] + " 23:59:59";
+      }
+
+      reviewinitiateBaseInfoList(params)
         .then(response => {
           if (response.code === 200) {
-            this.ethicsReviewList = response.data.rows;
-            this.total = response.data.total;
+            this.ethicsReviewList = response.data || [];
+            this.total = response.total || 0;
           } else {
-            this.$message.error("鑾峰彇鏁版嵁澶辫触");
+            this.$message.error(response.msg || "鑾峰彇鏁版嵁澶辫触");
           }
           this.loading = false;
         })
@@ -337,7 +350,8 @@
     },
     // 澶氶�夋閫変腑鏁版嵁
     handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.id);
+      this.ids = selection.map(item => item.infoid);
+      this.selectedRows = selection;
       this.single = selection.length !== 1;
       this.multiple = !selection.length;
     },
@@ -345,7 +359,7 @@
     handleView(row) {
       this.$router.push({
         path: "/case/ethicalReviewInfo",
-        query: { id: row.id }
+        query: { infoid: row.infoid, id: row.id, mode: "view" }
       });
     },
     // 鏂板鎸夐挳鎿嶄綔
@@ -354,70 +368,85 @@
     },
     // 淇敼鎸夐挳鎿嶄綔
     handleUpdate(row) {
-      const id = row.id || this.ids[0];
+      const infoid = row.infoid;
       this.$router.push({
         path: "/case/ethicalReviewInfo",
-        query: { id: id }
+        query: { infoid: infoid, id: row.id, mode: "edit" }
       });
-    },
-    // 鍒犻櫎鎸夐挳鎿嶄綔
-    handleDelete(row) {
-      const ids = row.id ? [row.id] : this.ids;
-      this.$confirm("鏄惁纭鍒犻櫎閫変腑鐨勬暟鎹」锛�", "璀﹀憡", {
-        confirmButtonText: "纭畾",
-        cancelButtonText: "鍙栨秷",
-        type: "warning"
-      })
-        .then(() => {
-          return delEthicsReview(ids);
-        })
-        .then(response => {
-          if (response.code === 200) {
-            this.$message.success("鍒犻櫎鎴愬姛");
-            this.getList();
-          }
-        })
-        .catch(() => {});
     },
     // 缁撴潫瀹℃煡鎿嶄綔
     handleEndReview(row) {
-      const ids = row.id ? [row.id] : this.ids;
+      const selectedRow =
+        row || (this.selectedRows.length === 1 ? this.selectedRows[0] : null);
+      if (!selectedRow) {
+        this.$message.warning("璇烽�夋嫨涓�鏉¤褰�");
+        return;
+      }
+
       this.$confirm("鏄惁纭缁撴潫閫変腑鐨勫鏌ラ」鐩紵", "鎻愮ず", {
         confirmButtonText: "纭畾",
         cancelButtonText: "鍙栨秷",
         type: "warning"
       })
         .then(() => {
-          return endEthicsReview(ids);
+          // 璋冪敤淇敼鎺ュ彛锛屽皢鐘舵�佹敼涓虹粨鏉燂紙status: '2'锛�
+          const updateData = {
+            infoid: selectedRow.infoid,
+            status: "2",
+            // 鍙互淇濈暀鍘熸湁鏁版嵁
+            expertName: selectedRow.expertName,
+            expertConclusion: selectedRow.expertConclusion,
+            expertOpinion: selectedRow.expertOpinion,
+            expertTime: selectedRow.expertTime
+          };
+
+          return ethicalreviewedit(updateData);
         })
         .then(response => {
           if (response.code === 200) {
             this.$message.success("瀹℃煡宸茬粨鏉�");
             this.getList();
+          } else {
+            this.$message.error(response.msg || "鎿嶄綔澶辫触");
           }
         })
         .catch(() => {});
     },
-    // 瀵煎嚭鎸夐挳鎿嶄綔
-    handleExport() {
-      const queryParams = this.queryParams;
-      this.$confirm("鏄惁纭瀵煎嚭鎵�鏈変鸡鐞嗗鏌ユ暟鎹紵", "璀﹀憡", {
-        confirmButtonText: "纭畾",
-        cancelButtonText: "鍙栨秷",
-        type: "warning"
-      })
-        .then(() => {
-          this.loading = true;
-          return exportEthicsReview(queryParams);
-        })
-        .then(response => {
-          if (response.code === 200) {
-            this.$message.success("瀵煎嚭鎴愬姛");
+    // 涓嬭浇浼︾悊瀹℃煡妗f
+    handleDownload(row) {
+      ethicalReviewDownload({ nitiateId: row.id })
+        .then(res => {
+          if (res.code !== 200 || !res.data || !res.data.downloadUrl) {
+            this.$message.error(res.msg || "涓嬭浇澶辫触");
+            return;
           }
-          this.loading = false;
+          const fileUrl = res.data;
+          // 鎷兼帴涓嬭浇鍦板潃锛歰rigin + /dev-api(寮�鍙戜唬鐞嗗墠缂�) + /profile + downloadUrl锛�
+          // 鍚庣闈欐�佹枃浠跺疄闄呮寕鍦� /profile 涓嬶紝downloadUrl 灏戜簡杩欏眰鍓嶇紑
+          const urlBase = process.env.VUE_APP_BASE_API;
+          const curWWWPath = window.document.location.href;
+          const pos = curWWWPath.indexOf(window.document.location.pathname);
+          const fullUrl =
+            curWWWPath.substring(0, pos) + urlBase + "/profile" + fileUrl.downloadUrl;
+
+          fetch(fullUrl, {
+            headers: { Authorization: "Bearer " + getToken() }
+          })
+            .then(response => response.blob())
+            .then(blob => {
+              const url = window.URL.createObjectURL(new Blob([blob]));
+              const link = document.createElement("a");
+              link.href = url;
+              link.setAttribute("download", fileUrl.downloadName);
+              document.body.appendChild(link);
+              link.click();
+              link.parentNode.removeChild(link);
+              window.URL.revokeObjectURL(url);
+            });
         })
-        .catch(() => {
-          this.loading = false;
+        .catch(error => {
+          console.error("涓嬭浇妗f澶辫触:", error);
+          this.$message.error("涓嬭浇澶辫触");
         });
     },
     // 鏃堕棿鏍煎紡鍖�

--
Gitblit v1.9.3