From 172eeb163714a776703db5a9155ece0d6de8e882 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=93=E6=B4=81?= <209192278@qq.com> Date: Wed, 15 Feb 2023 17:15:33 +0800 Subject: [PATCH] =?UTF-8?q?dengjie=20:=20=E4=B8=8A=E4=BC=A0=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E7=BB=84=E4=BB=B6=E7=9A=84=E5=9B=BE=E7=89=87=E6=94=BE?= =?UTF-8?q?=E5=A4=A7=E5=92=8C=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/common/Comment.vue | 27 ++++++-- .../common/form/components/ImageUpload.vue | 62 ++++++++++++------- 2 files changed, 62 insertions(+), 27 deletions(-) diff --git a/flowable-engine-web/src/components/common/Comment.vue b/flowable-engine-web/src/components/common/Comment.vue index 6cc77a9..d317bfc 100644 --- a/flowable-engine-web/src/components/common/Comment.vue +++ b/flowable-engine-web/src/components/common/Comment.vue @@ -48,6 +48,12 @@ + + + + + + @@ -55,6 +61,11 @@
添加图片 {{ sizeTip }}
+ +
+ +
+
import {deleteFile} from "@/api/common"; -import {getBaseUrl} from "../../api/request"; +import {getBaseUrl} from "@/api/request"; export default { name: "Comment", @@ -130,6 +141,8 @@ export default { }, context: null, backNode: null, + dialogImageUrl: '', + dialogVisible: false }; }, methods: { @@ -173,15 +186,19 @@ export default { return false; }, handlePictureCardPreview(file) { - console.log(file, this._value); + this.dialogVisible = true; + this.dialogImageUrl = file.url; }, handleDownload(file) { console.log(file); }, - handleRemove(file, imageList) { + handleRemove(file) { deleteFile(file.id).then(res => { - this.$message.success("删除成功"); - }); + if (res.code === 1000) { + this.$message.success("删除成功") + this.fileList.splice( this.fileList.findIndex((item)=>item.id===file.id),1) + } + }) }, selectConfirm() { let fileList = [] diff --git a/flowable-engine-web/src/views/common/form/components/ImageUpload.vue b/flowable-engine-web/src/views/common/form/components/ImageUpload.vue index 19b6c15..fda0fff 100644 --- a/flowable-engine-web/src/views/common/form/components/ImageUpload.vue +++ b/flowable-engine-web/src/views/common/form/components/ImageUpload.vue @@ -21,6 +21,9 @@
+ @@ -35,6 +38,11 @@
{{ placeholder }} {{ sizeTip }}
+ +
+ +
+