From cfe0d0b30faa89cb8a8cbd6e6562e282ceb2abbc Mon Sep 17 00:00:00 2001 From: shidongli Date: Fri, 2 Dec 2022 15:28:46 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=80=E4=BB=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Editor/index.vue | 3 +++ src/views/system/OperateGoodsInfo/index.vue | 1 + src/views/system/OperateGoodsInfo/indexjs.js | 9 +++++++++ src/views/system/station/index.vue | 1 + src/views/system/station/stationjs.js | 8 ++++++++ src/views/system/stationItem/index.vue | 2 +- src/views/system/stationItem/stationItemjs.js | 9 +++++++++ 7 files changed, 32 insertions(+), 1 deletion(-) diff --git a/src/components/Editor/index.vue b/src/components/Editor/index.vue index c4ddef8..f79f0d5 100644 --- a/src/components/Editor/index.vue +++ b/src/components/Editor/index.vue @@ -177,6 +177,9 @@ export default { let length = quill.getSelection().index; // 插入图片 res.url为服务器返回的图片地址 quill.insertEmbed(length, "image", process.env.VUE_APP_BASE_API + res.fileName); + + this.$emit("imgs", res.fileName); + // 调整光标到最后 quill.setSelection(length + 1); } else { diff --git a/src/views/system/OperateGoodsInfo/index.vue b/src/views/system/OperateGoodsInfo/index.vue index 5b691f6..d6f7b1f 100644 --- a/src/views/system/OperateGoodsInfo/index.vue +++ b/src/views/system/OperateGoodsInfo/index.vue @@ -356,6 +356,7 @@ style="margin-top: 20px" > 0) { + updatePicture(this.imgsurl).then((res) => {}); + } + this.imgsurl={pictureUrlList:[]}; this.open = false; this.reset(); this.StationName = "请选择所属护理站"; diff --git a/src/views/system/station/index.vue b/src/views/system/station/index.vue index ee48763..68ed092 100644 --- a/src/views/system/station/index.vue +++ b/src/views/system/station/index.vue @@ -298,6 +298,7 @@ 0) { updatePicture(obj).then((res) => {}); } + if (this.imgsurl.pictureUrlList.length > 0) { + updatePicture(this.imgsurl).then((res) => {}); + } + this.imgsurl={pictureUrlList:[]}; this.open = false; this.reset(); }, diff --git a/src/views/system/stationItem/index.vue b/src/views/system/stationItem/index.vue index d436d16..07d7041 100644 --- a/src/views/system/stationItem/index.vue +++ b/src/views/system/stationItem/index.vue @@ -288,7 +288,6 @@ :type="'itemPictureUrl'" /> - --> 0) { updatePicture(obj).then((res) => { }); } + if (this.imgsurl.pictureUrlList.length > 0) { + updatePicture(this.imgsurl).then((res) => {}); + } + this.imgsurl={pictureUrlList:[]}; this.open = false; this.reset();