From d6df4fd6344569bffcd575f48f04da4a54f51036 Mon Sep 17 00:00:00 2001
From: wwl <xchao828@163.com>
Date: 星期二, 21 一月 2025 18:02:58 +0800
Subject: [PATCH] 1

---
 src/views/doctor/examination/index.vue |  138 +++++++++++++++++++++++++++++----------------
 1 files changed, 88 insertions(+), 50 deletions(-)

diff --git a/src/views/doctor/examination/index.vue b/src/views/doctor/examination/index.vue
index d388efc..3e35e8f 100644
--- a/src/views/doctor/examination/index.vue
+++ b/src/views/doctor/examination/index.vue
@@ -208,7 +208,7 @@
           </el-table-column>
         </el-table>
       </div>
-      <div style="width: 38%">
+      <div style="width: 40%">
         <el-table
           v-loading="loading"
           border
@@ -303,13 +303,20 @@
                 size="mini"
                 type="text"
                 :disabled="scope.row.type === 1"
+                :loading="scope.row.isLoading"
                 @click="qijian(scope.row)"
-                >寮冩</el-button
+                >{{ scope.row.type === 0 ? "寮冩" : "鎭㈠" }}</el-button
               >
+              <!-- <el-button
+                size="mini"
+                type="text"
+                @click="qijian(scope.row)"
+                >鎭㈠</el-button
+              > -->
               <el-button
                 size="mini"
                 type="text"
-                :disabled="scope.row.type === 0"
+                :disabled="scope.row.type === 0 || scope.row.type === 2"
                 @click="queryResultone(scope.row)"
                 >缁撴灉鏌ヨ</el-button
               >
@@ -321,9 +328,7 @@
     </div>
 
     <el-drawer title="鎴戞槸鏍囬" :visible.sync="drawer" :with-header="false">
-      <div
-        style="text-align: center; background-color: #aad8df; margin-top: 10px"
-      >
+      <div style="text-align: center; background-color: #aad8df">
         {{ name || "" }}
       </div>
       <div class="a">
@@ -331,6 +336,7 @@
           <el-table
             :data="jieguoList"
             border
+            :row-style="changRed"
             style="width: 100%"
             :header-cell-style="{ background: '#AAD8DF' }"
           >
@@ -343,38 +349,32 @@
         </div>
 
         <div v-if="jyjc == 1">
-          <div
-            style="
-              text-align: center;
-              background-color: #aad8df;
-            "
-          ></div>
+          <div style="text-align: center; background-color: #aad8df"></div>
           <div class="check-result-container">
             <div class="check-item">
               <div class="check-title">妫�鏌ユ墍瑙侊細</div>
-              <div class="check-description">
+              <div
+                class="check-description"
+                :style="{ color: isRed ? 'red' : '' }"
+              >
                 {{ jieguoList[0].pro_result }}
               </div>
             </div>
 
             <div class="check-item">
               <div class="check-title">妫�鏌ョ粨璁猴細</div>
-              <div class="check-description">
+              <div
+                class="check-description"
+                :style="{ color: isRed ? 'red' : '' }"
+              >
                 {{ jieguoList[0].yxzd || "鏆傛棤缁撹" }}
               </div>
             </div>
           </div>
-          <!-- <div style="padding: 0 10px; margin-bottom: 10px; margin-top: 10px">
-            <div style="font-weight: bold">妫�鏌ユ墍瑙侊細</div>
-            <div>{{ jieguoList[0].pro_result }}</div>
-
-            <div style="font-weight: bold; margin-top: 10px">妫�鏌ョ粨璁猴細</div>
-            <div>{{ jieguoList[0].yxzd || "鏆傛棤缁撹" }}</div>
-          </div> -->
         </div>
       </div>
     </el-drawer>
-    
+
     <div class="pag">
       <div class="pag1">
         <!-- <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :pager-count="5" :current-page.sync="currentPage1" :current-page="page"
@@ -403,6 +403,7 @@
   qijian,
   resultList,
   typeOne,
+  huifu,
 } from "@/api/doctor/examination";
 import { getCompany, queryCompany } from "@/api/team/tuanti";
 import { getNewDateList } from "@/api/hosp/order";
@@ -415,6 +416,7 @@
       jieguoList: [],
       jyjc: null,
       dis: false,
+      isLoading:false,
       createTimeList: "",
       currentRow: null,
       total: 0,
@@ -496,21 +498,28 @@
     });
   },
   methods: {
-    red() {
-      return {
-        color: "red",
-      };
+    changRed({ row }) {
+      if (row.ycbz != "" && row.ycbz != null && row.ycbz === "1") {
+        // 鍙橀鑹茬殑鏉′欢
+        return {
+          color: "red", // 杩欎釜return鐨勫氨鏄牱寮� 鍙互鏄痗olor 涔熷彲浠ユ槸backgroundColor
+        };
+      }
     },
     getdate() {
       getConfigKey("tj_confirm").then((res) => {
         this.xianshi = res.msg;
-        console.log(this.xianshi, 999);
+        // console.log(this.xianshi, 999);
       });
       getNewDateList().then((res) => {
-        this.createTimeList = [
-          moment(res.data).format("YYYY-MM-DD 00:00:00"),
-          moment(res.data).format("YYYY-MM-DD 23:59:00"),
-        ];
+        // console.log(res,222);
+
+        // this.createTimeList = [
+        //   moment(res.data).format("YYYY-MM-DD 00:00:00"),
+        //   moment(res.data).format("YYYY-MM-DD 23:59:00"),
+        // ];
+        // console.log(this.createTimeList,8855);
+
         this.getList();
       });
     },
@@ -552,7 +561,7 @@
     // 閫夋鏁版嵁
     searchSelect(val) {
       this.CheckBox = val;
-      console.log(this.CheckBox, 9999);
+      // console.log(this.CheckBox, 9999);
     },
     getList() {
       this.loading = true;
@@ -569,7 +578,7 @@
       // 鑾峰彇鍗曚綅淇℃伅闆嗗悎
       getCompany(this.queryParam).then((response) => {
         this.CompanyList = response.data;
-        console.log(this.CompanyList, 555);
+        // console.log(this.CompanyList, 555);
 
         this.loading = false;
       });
@@ -732,17 +741,13 @@
       this.currentRow = val;
       let tjNumber = val.tjNumber;
       this.selectedTjNumber = val.tjNumber;
-      console.log(this.currentRow, 4455);
 
       typeOne(tjNumber).then((res) => {
         this.type = res.data;
-        console.log(res, 3322);
       });
 
       cSWebGetPro(tjNumber).then((res) => {
         this.xiangmuList = res.data;
-        console.log(this.xiangmuList, 999);
-
         this.xiangmuList.forEach((item) => {
           // console.log(item);
           // if (item.type == 0) {
@@ -780,22 +785,38 @@
     qijian(row) {
       const tjNUm = this.selectedTjNumber;
       const proId = row.proId;
-
-      qijian(tjNUm, proId).then((res) => {
-        if (res.code == 200) {
-          cSWebGetPro(tjNUm).then((res) => {
-            if (res.code === 200) {
-              // 鏇存柊鍙宠竟琛ㄦ牸鐨勬暟鎹�
-              this.xiangmuList = res.data;
-            }
-          });
-        }
-      });
+      row.isLoading = true;
+      if (row.type == "2") {
+        huifu(tjNUm, proId).then((res) => {
+          if (res.code == 200) {
+            cSWebGetPro(tjNUm).then((res) => {
+              if (res.code === 200) {
+                // 鏇存柊鍙宠竟琛ㄦ牸鐨勬暟鎹�
+                this.xiangmuList = res.data;
+                row.isLoading = false
+              }
+            });
+          }
+        });
+      } else {
+        qijian(tjNUm, proId).then((res) => {
+          if (res.code == 200) {
+            cSWebGetPro(tjNUm).then((res) => {
+              if (res.code === 200) {
+                // 鏇存柊鍙宠竟琛ㄦ牸鐨勬暟鎹�
+                this.xiangmuList = res.data;
+                this.isLoading = false
+              }
+            });
+          }
+        });
+      }
     },
-    chaxun() {},
+
     handleRowClick(row, column, event) {
-      console.log(row, 2323);
+      // console.log(row, 2323);
       this.name = row.proName;
+      // console.log(this.name, 99999);
     },
     queryResultone(row) {
       // 鎵撳紑鎶藉眽
@@ -803,7 +824,21 @@
       const proId = row.proId;
       resultList(tjNum, proId).then((res) => {
         this.jieguoList = res.data;
+        console.log(this.jieguoList, 998877);
+
         this.jyjc = this.jieguoList[0].jyjc;
+        const ycbz = this.jieguoList[0].ycbz;
+        /* if (ycbz === "" || ycbz === null) {
+          return;
+        } */
+
+        // 璁剧疆鏄惁闇�瑕佹敼鍙橀鑹�
+        if (ycbz === "1") {
+          this.isRed = true; // 璁剧疆鏍囪瘑锛屾敼鍙樺瓧浣撻鑹�
+          console.log(this.isRed, 444);
+        } else {
+          this.isRed = false; // 鎭㈠榛樿棰滆壊
+        }
 
         if (res.data.length > 0) {
           this.drawer = true;
@@ -882,6 +917,9 @@
   display: flex;
   justify-content: center;
 }
+.red-text {
+  color: red !important;
+}
 
 .pag1 {
   width: 30%;

--
Gitblit v1.8.0