From 03e883d19ea0ec1a32b406e802d1730fb61e24f4 Mon Sep 17 00:00:00 2001
From: lkk <364857242@qq.com>
Date: 星期二, 12 八月 2025 17:40:21 +0800
Subject: [PATCH] 1

---
 src/views/doctor/check/index.vue |   60 +++++++++++++++++++++++++++++++++++++++---------------------
 1 files changed, 39 insertions(+), 21 deletions(-)

diff --git a/src/views/doctor/check/index.vue b/src/views/doctor/check/index.vue
index 42cc11b..f4fee88 100644
--- a/src/views/doctor/check/index.vue
+++ b/src/views/doctor/check/index.vue
@@ -1909,23 +1909,40 @@
     }, */
     bzxz() {
       this.taocan = true;
-      this.titles = "";
-      var deptAdviceList1 = [];
-      let data = { proId: this.proId, tjNum: this.tableAll.tjNumber };
-      getAdviceByTjNumAndPro(data).then((res) => {
-        if (res.data) {
-          this.deptAdviceList3 = res.data;    
-          if (this.proParentList.xiaoJieIds) {
-            this.proParentList.xiaoJieIds.forEach((item) => {
-              this.deptAdviceList3.forEach((items) => {
-                if (item == items.id) {
-                  deptAdviceList1.push(items);
-                }
-              });
-            });
-            this.deptAdviceList1 = [...new Set(deptAdviceList1)];
-          } else if(this.proParentList.xiaoJieIds == null){
-            this.deptAdviceList1 = [];
+      var deptAdviceList1 = []
+      // let data = { proId: this.proId, tjNum: this.tableAll.tjNumber };
+      // getAdviceByTjNumAndPro(data).then((res) => {
+        // if (res.data) {
+        //   this.deptAdviceList3 = res.data;
+          if (this.proParentList.xiaoJieIds.length != 0) {
+            if (this.vaids.length != 0) {
+              const result = this.vaids.reduce((acc, item) => {
+                const matches = this.deptAdviceList.filter(items => {
+                  return item == items.id;  // 鎴� === 鏍规嵁闇�姹�
+                });
+                return acc.concat(matches);
+              }, []);
+              deptAdviceList1 = result;
+
+              return this.deptAdviceList1 = [
+                ...new Set(deptAdviceList1),
+              ];
+            } else {
+              this.proParentList.xiaoJieIds.forEach(item => {
+                this.deptAdviceList.forEach((items) => {
+                  if (item == items.id) {
+                    deptAdviceList1.push(items)
+                  }
+                });
+              })
+              return this.deptAdviceList1 = [
+                ...new Set(deptAdviceList1),
+              ];
+            }
+
+
+          } else if (this.proParentList.xiaoJieIds == null) {
+            this.deptAdviceList1 = []
           }
 
           // this.deptAdviceList1 = [
@@ -1935,8 +1952,8 @@
           //   this.idss.push(items.id);
           //   this.remakes += items.advice + ",";
           // });
-        }
-      });
+      //   }
+      // });
     },
 
     result() {
@@ -2004,12 +2021,13 @@
     },
     quxiao(){
        this.taocan = false;
-        this.deptAdviceList1 = []
+       this.deptAdviceList1 = []
     },
     queding() {
       if (this.proParentList.xiaoJie.length != 0) {
         this.remakes = "";
         this.titles = "";
+        this.vaids = []
         this.deptAdviceList1.forEach((item1) => {
           if (this.proParentList.remark != null) {
             this.titles += item1.title + ",";
@@ -2696,7 +2714,7 @@
           });
         }
       }
-
+      
       if (this.minedis == false) {
         let data = [
           {

--
Gitblit v1.8.0