WXL (wul)
5 天以前 70e4d2c33cc2e3af590d1816c0c703da341538cf
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"
@@ -1761,20 +1761,23 @@
          });
        }
      });
      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;
@@ -1966,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("删除成功");
      }
    },
    /** 导入按钮操作 */