From 49fcdb7178dffc69769e2fb8cb6a03e204cb1e68 Mon Sep 17 00:00:00 2001 From: WXL <1785969728@qq.com> Date: 星期五, 31 五月 2024 18:26:42 +0800 Subject: [PATCH] 测试完成 --- src/views/knowledge/education/compilequer/index.vue | 41 +++++++++++++++++------------------------ 1 files changed, 17 insertions(+), 24 deletions(-) diff --git a/src/views/knowledge/education/compilequer/index.vue b/src/views/knowledge/education/compilequer/index.vue index ad86eaf..ce20fcf 100644 --- a/src/views/knowledge/education/compilequer/index.vue +++ b/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); // 鑾峰彇瀵屾枃鏈粍浠跺疄渚� -- Gitblit v1.9.3