WXL
2024-02-01 79925204a4e1588d1031ca0429ae318a608a8928
src/views/knowledge/education/compilequer/index.vue
@@ -386,6 +386,7 @@
  addtargetillness,
  getlibrarylist,
  dellibraryinfo,
  deltargetillness,
  compilelibrary,
  getlibraryinfo,
  getillnesslist,
@@ -430,7 +431,7 @@
      headers: {
        Authorization: "Bearer " + getToken(),
      },
      uploadImgUrl: "/v1/admin/common/upload",
      uploadImgUrl: process.env.VUE_APP_BASE_API + "/common/upload",
      uploadUrlPath: "没有文件上传",
      quillUpdateImg: false,
      fileList: [
@@ -625,17 +626,21 @@
          : "";
      if (this.id) {
        this.ruleForm.isoperation = 2;
        compilelibrary(this.ruleForm).then((response) => {
          this.$modal.msgSuccess("修改成功");
          this.$router.go(-1);
        });
      } else {
        this.ruleForm.isoperation = 1;
        compilelibrary(this.ruleForm).then((response) => {
          this.$modal.msgSuccess("新增成功");
          this.$router.go(-1);
        });
      }
      this.illnesslist.forEach((item, index) => {
        if (!item.id) {
          addtargetillness(item).then((res) => {});
        }
      });
      if (this.illnesslistapi.length) {
        deltargetillness(this.illnesslistapi.join(",")).then((res) => {});
      }
      compilelibrary(this.ruleForm).then((res) => {
        this.$modal.msgSuccess("编辑成功");
        this.$router.go(-1);
      });
    },
    // 下一步
    nextstep() {
@@ -821,7 +826,7 @@
      let tagname = this.inputValue;
      illnesslistget(item).then((res) => {
        opeavalue = res.data;
        opeavalue.outid = this.indexid;
        opeavalue.outid = this.id;
        opeavalue.type = 6;
        opeavalue.icd10id = opeavalue.icdid;
        opeavalue.icd10name = opeavalue.icdname;
@@ -830,22 +835,10 @@
          this.illnesslist.push(opeavalue);
        }
      });
      console.log(this.illnesslist, "加");
      this.illnessVisible = false;
      this.inputValue = "";
    },
    confirmillness() {
      this.illnesslist.forEach((item, index) => {
        if (!item.id) {
          addtargetillness(item).then((res) => {});
        }
      });
      if (this.illnesslistapi.length) {
        deltargetillness(this.illnesslistapi.join(",")).then((res) => {});
      }
      this.illnessVisible = false;
      this.$modal.msgSuccess("编辑成功");
    },
    illnessshowInput() {
      this.illnessVisible = true;
    },
@@ -875,7 +868,7 @@
      // this.$emit('upload',res, file)
      console.log(res, file);
      //拼接出上传的图片在服务器的完整地址
      let imgUrl = res.data.url;
      let imgUrl = res.url;
      let type = imgUrl.substring(imgUrl.lastIndexOf(".") + 1);
      console.log(type);
      // 获取富文本组件实例