qx
4 天以前 857950aac3233497766024759fdf4eff55d58424
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) => {
      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);
                    deptAdviceList1.push(items)
                }
              });
            });
            this.deptAdviceList1 = [...new Set(deptAdviceList1)];
              })
              return this.deptAdviceList1 = [
                ...new Set(deptAdviceList1),
              ];
            }
          } else if(this.proParentList.xiaoJieIds == null){
            this.deptAdviceList1 = [];
            this.deptAdviceList1 = []
          }
          // this.deptAdviceList1 = [
@@ -1935,8 +1952,8 @@
          //   this.idss.push(items.id);
          //   this.remakes += items.advice + ",";
          // });
        }
      });
      //   }
      // });
    },
    result() {
@@ -2010,6 +2027,7 @@
      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 + ",";
@@ -2194,7 +2212,14 @@
    eventchange(data) {
      this.dataText = data;
      data.forEach((item) => (this.proParentList.remark += item.advice));
      data.forEach((item) => {
        if (item.advice) {
          this.proParentList.remark += item.advice
        } else if (item.jynr) {
          this.proParentList.remark += item.jynr
        }
      })
      //  data.forEach((item) => (this.proParentList.remark += item.jynr));
    },
    proposalChange() {