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/Missioncreation.vue |   87 ++++++++++++++++++++++++++++++-------------
 1 files changed, 60 insertions(+), 27 deletions(-)

diff --git a/src/views/patient/propaganda/Missioncreation.vue b/src/views/patient/propaganda/Missioncreation.vue
index cfd57e0..db38b79 100644
--- a/src/views/patient/propaganda/Missioncreation.vue
+++ b/src/views/patient/propaganda/Missioncreation.vue
@@ -297,7 +297,7 @@
                       </div>
                       <el-tag
                         v-for="tag in diagglist"
-                        @close="removediagg(tag.icd10code)"
+                        @close="removediagg(tag)"
                         type="warning"
                         closable
                         :disable-transitions="false"
@@ -870,6 +870,8 @@
       questionList: [],
       uploadingData: [],
       deptcodesWards: [], //绉戝鏁版嵁
+      deptlist: [],
+      hosplist: [],
       leavehospitaldistrictcodes: [], //鐥呭尯鏁版嵁
       operationcodes: [], //鎵嬫湳鏁版嵁
       illnesscodes: [], //鐤剧梾鏁版嵁
@@ -1041,6 +1043,10 @@
           "鐨勫尰鎶や汉鍛橈紝涓轰簡鏇村ソ鍦颁簡瑙f偍鐨勫悍澶嶆儏鍐碉紝璇锋偍鎶戒竴鐐瑰疂璐垫椂闂达紝瑙傜湅杩欎唤瀹f暀璧勮銆�",
         jsy: "鐢熸椿涓婅鍔抽�哥粨鍚堬紝娉ㄦ剰浼戞伅鍜岃惀鍏伙紝閫傚綋閿荤偧锛屾垝鐑熼檺閰掞紝淇濇寔蹇冩儏鑸掔晠锛屽畾鏈熷璇娿�傞偅鏈瀹f暀鍐呭灏卞埌杩欓噷锛岀鎮ㄨ韩浣撳仴搴凤紒",
       },
+      queryParamsdept: {
+        tempid: "",
+        type: 2,
+      },
       taskoptions: [
         {
           value: "4",
@@ -1147,7 +1153,7 @@
       this.currenttype = this.$route.query.type;
       this.title = "瀹f暀鍐呭鍒楄〃";
       this.tableLabel = this.tableLabelxj;
-      if (this.form.serviceType == 4) {
+      if (this.form.serviceType == 4 || this.form.serviceType == 17) {
         this.checkboxlist = [
           {
             value: "2",
@@ -1362,10 +1368,21 @@
       });
     },
     addStyleToImages(html) {
-      return html.replace(
+      if (!html) return html;
+
+      // 1. 鍏堜慨澶嶈矾寰�
+      let processedHtml = html.replace(
+        /\/aifollowup\/aifollowup\//g,
+        "/aifollowup/"
+      );
+
+      // 2. 鍐嶄慨澶嶆牱寮�
+      processedHtml = processedHtml.replace(
         /<img([^>]*)style=(['"])(?:(?!\2).)*\2([^>]*)>/g,
         '<img$1style="width:100%;height:auto;"$3>'
       );
+
+      return processedHtml;
     },
 
     // 瀛愪换鍔′簩绾у脊妗�
@@ -1635,6 +1652,9 @@
                 this.time1 = this.form.showTimeMorn.split(",");
               }
             }
+            if (this.form.taskid) {
+              this.listDept();
+            }
             if (this.form.showTimeNoon)
               this.time2 = this.form.showTimeNoon.split(",");
             if (this.form.showTimeNight)
@@ -1721,34 +1741,43 @@
       this.leavehospitaldistrictcodes = [];
       this.deptcodesWards = [];
       this.queryParamsdept.taskId = this.form.taskid;
+      console.log(1, this.queryParamsdept);
+
       taskdepthospgetsonlist(this.queryParamsdept).then((res) => {
         if (res.code == 200) {
           let arr = res.rows;
           arr.forEach((item) => {
             if (item.deptType == 1) {
+              console.log(1);
+
               this.deptlist.push(item);
               this.deptcodesWards.push(item.deptCode);
             } else if (item.deptType == 2) {
+              console.log(2, this.hosplist);
+
               this.hosplist.push(item);
               this.leavehospitaldistrictcodes.push(item.deptCode);
             }
           });
         }
       });
-      taskdiaggetlist(this.queryParamsdept).then((res) => {
-        if (res.code == 200) {
-          let arr = res.rows;
-          arr.forEach((item) => {
-            getillnesslist({
-              icdcode: item.icd10code,
-            }).then((res) => {
-              item.icdname = res.rows[0].icdname;
-              this.diagglist.push(item);
+     taskdiaggetlist(this.queryParamsdept).then((res) => {
+          if (res.code == 200) {
+            let arr = res.rows;
+            arr.forEach((item) => {
+              if (localStorage.getItem("orgname") == "鍗楀崕澶у闄勫睘绗竴鍖婚櫌") {
+                item.icdname = item.icd10name;
+                this.diagglist.push(item);
+              } else {
+                getillnesslist({ icdcode: item.icd10code }).then((res) => {
+                  item.icdname = res.rows[0].icdname;
+                  this.diagglist.push(item);
+                });
+              }
+              this.illnesscodes.push(item.icd10code);
             });
-            this.illnesscodes.push(item.icd10code);
-          });
-        }
-      });
+          }
+        });
       taskopergetlist(this.queryParamsdept).then((res) => {
         if (res.code == 200) {
           let arr = res.rows;
@@ -1940,22 +1969,26 @@
       }
     },
     // 鐤剧梾鍒犻櫎瑙﹀彂
-    removediagg(row) {
-      console.log(row, "row");
-      console.log(this.diagglist, "this.diagglist");
+    removediagg(tag) {
+      // 浠诲姟缁勶細鏈湴鍒犻櫎鍗冲彲锛屽悗绔繚瀛樻椂缁熶竴鏇存柊
+      if (this.form.appltype == 5) {
+        this.diagglist = this.diagglist.filter((item) => item != tag);
+        return;
+      }
 
-      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("鍒犻櫎鎴愬姛");
       }
     },
     /** 瀵煎叆鎸夐挳鎿嶄綔 */

--
Gitblit v1.9.3