WXL
2025-02-20 321891f4870d60b637b66755cd24053c029cf91e
src/views/knowledge/questionnaire/compilequer/index.vue
@@ -1396,7 +1396,6 @@
      valuetype: [],
      qremark: [],
      hosplist: [],
      deptlist: [],
      usable: [
        { value: "0", label: "可用" },
        { value: "1", label: "停用" },
@@ -1539,21 +1538,22 @@
      });
      this.tempDetpRelevanceslist = [];
      this.tempbelongWards = [];
      depthospgetsonlist(this.queryParamsdept).then((res) => {
        if (res.code == 200) {
          let arr = res.rows;
          arr.forEach((item) => {
            if (item.deptType == 1) {
              this.deptlist.push(item);
              this.tempDetpRelevanceslist.push(item.deptCode);
            } else if (item.deptType == 2) {
              this.hosplist.push(item);
              this.tempbelongWards.push(item.deptCode);
            }
          });
        }
      });
      if (this.queryParamsdept.tempid) {
        depthospgetsonlist(this.queryParamsdept).then((res) => {
          if (res.code == 200) {
            let arr = res.rows;
            arr.forEach((item) => {
              if (item.deptType == 1) {
                this.deptlist.push(item);
                this.tempDetpRelevanceslist.push(item.deptCode);
              } else if (item.deptType == 2) {
                this.hosplist.push(item);
                this.tempbelongWards.push(item.deptCode);
              }
            });
          }
        });
      }
    },
    // 获取科室树
    getDeptTree() {
@@ -1675,22 +1675,23 @@
      let result = this.deptlist
        .filter((item) => item.deptCode == row)
        .map((item) => item.id);
      console.log(result.length);
      if (result.length) {
        depthospgetsondel(result).then((res) => {
          if (res.code) {
          if (res.code == 200) {
            this.$modal.msgSuccess("删除科室成功");
          }
        });
      }
    },
    // 删除删除触发
    // 删除病区触发
    removehpsp(row) {
      let result = this.hosplist
        .filter((item) => item.deptCode == row)
        .map((item) => item.id);
      if (result.length) {
        depthospgetsondel(result).then((res) => {
          if (res.code) {
          if (res.code == 200) {
            this.$modal.msgSuccess("删除病区成功");
          }
        });
      }