qx
5 天以前 b50269f0806d3a4a1c863b503da0ac75ef51af49
src/views/doctor/check/index.vue
@@ -682,7 +682,7 @@
        </el-tab-pane>
      </el-tabs>
      <span slot="footer" class="dialog-footer">
        <el-button @click="taocan = false">取 消</el-button>
        <el-button @click="quzxiao">取 消</el-button>
        <el-button type="primary" @click="queding">确 定</el-button>
      </span>
    </el-dialog>
@@ -1331,20 +1331,41 @@
    bzxz() {
      this.taocan = true;
      var deptAdviceList1 =[]
      let data = { proId: this.proId, tjNum: this.tableAll.tjNumber };
      getAdviceByTjNumAndPro(data).then((res) => {
        if (res.data) {
          this.deptAdviceList3 = res.data;
      // 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.deptAdviceList3.forEach((items) => {
                this.deptAdviceList.forEach((items) => {
              if (item == items.id) {
                deptAdviceList1.push(items)
              }
            });
          })
           this.deptAdviceList1 = [
              return this.deptAdviceList1 = [
            ...new Set(deptAdviceList1),
          ];
            }
          } else if (this.proParentList.xiaoJieIds == null) {
            this.deptAdviceList1 = []
          }
          // this.deptAdviceList1 = [
          //   ...new Set(this.deptAdviceList2.concat(this.deptAdviceList3)),
          // ];
@@ -1352,8 +1373,8 @@
          //   this.idss.push(items.id);
          //   this.remakes += items.advice + ",";
          // });
        }
      });
      //   }
      // });
    },
    result() {
@@ -1421,7 +1442,10 @@
      // }
    },
    quzxiao() {
      this.taocan = false;
      this.deptAdviceList1 = []
    },
    queding() {
      if (this.proParentList.xiaoJie.length != 0) {
        this.remakes = "";