From 70e4d2c33cc2e3af590d1816c0c703da341538cf Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期五, 04 九月 2026 14:13:32 +0800
Subject: [PATCH] 测试完成

---
 src/views/patient/propaganda/particty.vue |   78 ++++++++++++++++++++++++---------------
 1 files changed, 48 insertions(+), 30 deletions(-)

diff --git a/src/views/patient/propaganda/particty.vue b/src/views/patient/propaganda/particty.vue
index 46d0f82..e189c1c 100644
--- a/src/views/patient/propaganda/particty.vue
+++ b/src/views/patient/propaganda/particty.vue
@@ -228,7 +228,9 @@
                       <el-option
                         v-for="item in medicalOptions"
                         :key="item.id"
-                        :label="item.itemName + ' (' + item.manufacturerName + ')'"
+                        :label="
+                          item.itemName + ' (' + item.manufacturerName + ')'
+                        "
                         :value="item.itemCode"
                       />
                     </el-select>
@@ -377,7 +379,7 @@
                       <el-tag
                         v-for="tag in diagglist"
                         :key="tag.icdcode"
-                        @close="removediagg(tag.icd10code)"
+                        @close="removediagg(tag)"
                         type="warning"
                         closable
                         :disable-transitions="false"
@@ -710,7 +712,7 @@
                         </div>
                         <el-tag
                           v-for="tag in diagglist"
-                          @close="removediagg(tag.icd10code)"
+                          @close="removediagg(tag)"
                           type="warning"
                           closable
                           :disable-transitions="false"
@@ -1764,6 +1766,7 @@
         this.form.serviceType == 9 ||
         this.form.serviceType == 11 ||
         this.form.serviceType == 12 ||
+        this.form.serviceType == 20 ||
         this.form.serviceType == 10
       ) {
         this.checkboxlist = [
@@ -2159,7 +2162,7 @@
                 item.icdname = item.icd10name;
                 this.diagglist.push(item);
               } else {
-               this.diagglist.push(item);
+                this.diagglist.push(item);
               }
               this.illnesscodes.push(item.icd10code);
             });
@@ -2181,7 +2184,7 @@
             });
           }
         });
-        taskdiaggetlist(this.queryParamsdept).then((res) => {
+         taskdiaggetlist(this.queryParamsdept).then((res) => {
           if (res.code == 200) {
             let arr = res.rows;
             arr.forEach((item) => {
@@ -2189,7 +2192,8 @@
                 item.icdname = item.icd10name;
                 this.diagglist.push(item);
               } else {
-                getillnesslist({ icdname: item.icd10name }).then((res) => {
+
+                getillnesslist({ icdcode: item.icd10code }).then((res) => {
                   item.icdname = res.rows[0].icdname;
                   this.diagglist.push(item);
                 });
@@ -2209,7 +2213,7 @@
                 ...item,
                 itemCode: code,
                 itemName: item.itemName || item.medicalName,
-                manufacturerName: item.manufacturerName || item.medicalCompany
+                manufacturerName: item.manufacturerName || item.medicalCompany,
               });
             });
           }
@@ -2255,43 +2259,51 @@
         });
       }
     },
-    removediagg(row) {
+    removediagg(tag) {
       // 浠诲姟缁勶細鏈湴鍒犻櫎鍗冲彲锛屽悗绔繚瀛樻椂缁熶竴鏇存柊
       if (this.form.appltype == 5) {
-        this.diagglist = this.diagglist.filter((item) => item.icd10code != row);
+        this.diagglist = this.diagglist.filter((item) => item != tag);
         return;
       }
-      // 鏅�氱柧鐥呭叧鑱旓細璋冨悗绔帴鍙i�愭潯鍒犻櫎
-      let result = this.diagglist
-        .filter((item) => item.icd10code == row)
-        .map((item) => item.id);
-      if (result.length) {
-        taskdiaghospgetsondel(result).then((res) => {
+
+      // 鏅�氱柧鐥呭叧鑱旓細鍒ゆ柇鏄惁鏈� id锛堝凡淇濆瓨鐨勮褰曟墠鏈� id锛�
+      if (tag.id) {
+        // id 瀛樺湪锛岃皟鍚庣鎺ュ彛鍒犻櫎
+        taskdiaghospgetsondel([tag.id]).then((res) => {
           if (res.code) {
-            this.diagglist = this.diagglist.filter(
-              (item) => item.icd10code != row
-            );
+            this.diagglist = this.diagglist.filter((item) => item != tag);
             this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
           }
         });
+      } else {
+        // id 涓嶅瓨鍦紙鏈繚瀛樼殑鏂拌褰曪級锛岀洿鎺ユ湰鍦板垹闄�
+        this.diagglist = this.diagglist.filter((item) => item != tag);
+        this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
       }
     },
     remoteopcode(name) {
       // 鍗犱綅
     },
     remoteSearchMedical(query) {
-      if (!query) { this.medicalOptions = []; return; }
-      listMedication({ itemName: query, pageNum: 1, pageSize: 20 }).then((res) => {
-        this.medicalOptions = res.rows || [];
-      });
+      if (!query) {
+        this.medicalOptions = [];
+        return;
+      }
+      listMedication({ itemName: query, pageNum: 1, pageSize: 20 }).then(
+        (res) => {
+          this.medicalOptions = res.rows || [];
+        }
+      );
     },
     removeMedical(code) {
-      taskmedicaldel({ itemCode: code, taskid: this.form.taskid }).then((res) => {
-        if (res.code == 200) {
-          this.medicalCodes = this.medicalCodes.filter((c) => c !== code);
-          this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+      taskmedicaldel({ itemCode: code, taskid: this.form.taskid }).then(
+        (res) => {
+          if (res.code == 200) {
+            this.medicalCodes = this.medicalCodes.filter((c) => c !== code);
+            this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+          }
         }
-      });
+      );
     },
 
     // ---------- 鎮h�呴�夋嫨 ----------
@@ -2821,7 +2833,7 @@
           // 灏嗕富瀵硅薄鏀惧叆 form 鎻愪氦
         }
         if (this.form.appltype == 5) {
-          console.log(this.form,'杩涘叆浠诲姟缁勯厤缃�');
+          console.log(this.form, "杩涘叆浠诲姟缁勯厤缃�");
 
           this.form.serviceTaskScheduleVO.icd10codes = this.form.icd10code;
           this.form.serviceTaskScheduleVO.wardCodes =
@@ -2858,7 +2870,9 @@
           );
           this.form.medicalCode = this.medicalCodes.join(",");
           this.form.medicalName = selectedMeds.map((m) => m.itemName).join(",");
-          this.form.medicalCompany = selectedMeds.map((m) => m.manufacturerName).join(",");
+          this.form.medicalCompany = selectedMeds
+            .map((m) => m.manufacturerName)
+            .join(",");
         }
 
         this.form.serviceType = this.serviceType;
@@ -2871,7 +2885,11 @@
           .map((item) => item.icdname)
           .join(",");
         // 鐤剧梾/鎵嬫湳/鑽搧鍏宠仈鐨勭瀹�/鐥呭尯鏍¢獙
-        if (this.form.appltype == 3 || this.form.appltype == 4 || this.form.appltype == 6) {
+        if (
+          this.form.appltype == 3 ||
+          this.form.appltype == 4 ||
+          this.form.appltype == 6
+        ) {
           const hasDept = this.diseaseDept?.deptCode;
           const hasWard = this.diseaseWard?.districtCode;
           if (!hasDept && !hasWard) {

--
Gitblit v1.9.3