From 498570227a97c4726c95e9bc4f99f5193682f62e Mon Sep 17 00:00:00 2001 From: "wu.jian2" Date: Sat, 14 Oct 2023 15:03:25 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=AE=BE=E8=AE=A1=E5=99=A8=E3=80=81?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E5=BA=93=E4=BF=9D=E5=AD=98=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E5=A6=82=E6=9E=9C=E4=BF=9D=E5=AD=98=E5=B0=81?= =?UTF-8?q?=E9=9D=A2=E5=A4=B1=E8=B4=A5=EF=BC=8C=E5=88=99=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E4=B8=8A=E6=AC=A1=E7=9A=84=E5=B0=81=E9=9D=A2=EF=BC=8C=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E4=BE=9D=E6=97=A7=E5=8F=AF=E4=BB=A5=E4=BF=9D=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data-room-ui/packages/BigScreenDesign/PageDesignTop.vue | 5 ++++- data-room-ui/packages/BizComponent/index.vue | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/data-room-ui/packages/BigScreenDesign/PageDesignTop.vue b/data-room-ui/packages/BigScreenDesign/PageDesignTop.vue index 4f9a5932..b6e45349 100644 --- a/data-room-ui/packages/BigScreenDesign/PageDesignTop.vue +++ b/data-room-ui/packages/BigScreenDesign/PageDesignTop.vue @@ -191,6 +191,7 @@ export default { value: 'verticalAround' } ], + initialCoverPicture: '', appInfo: '', saveLoading: false, createdImgLoading: false, @@ -222,6 +223,7 @@ export default { } }, mounted () { + this.initialCoverPicture = this.pageInfo.coverPicture || '' this.$refs.zoomInput.$el.addEventListener('mousewheel', this.handleMouseWheel) }, beforeDestroy () { @@ -460,7 +462,8 @@ export default { pageInfo.coverPicture = dataUrl } } else { - pageInfo.coverPicture = '' + this.$message.warning('保存封面失败,将使用上次保存的封面') + pageInfo.coverPicture = this.initialCoverPicture } const res = await saveScreen(pageInfo) this.$message.success('保存成功') diff --git a/data-room-ui/packages/BizComponent/index.vue b/data-room-ui/packages/BizComponent/index.vue index 2fae58e5..c01c6036 100644 --- a/data-room-ui/packages/BizComponent/index.vue +++ b/data-room-ui/packages/BizComponent/index.vue @@ -172,6 +172,7 @@ export default { props: {}, data () { return { + initialCoverPicture: '', form: { name: '', coverPicture: '', @@ -237,6 +238,7 @@ export default { const type = this.$route.query.type if (code) { getBizComponentInfo(code).then(data => { + this.initialCoverPicture = data.coverPicture || '' if (type && type === 'g2plot') { this.form = { ...data, @@ -370,7 +372,8 @@ export default { this.form.coverPicture = dataUrl } } else { - this.form.coverPicture = '' + this.$message.warning('保存封面失败,将使用上次保存的封面') + this.form.coverPicture = this.initialCoverPicture } updateBizComponent(this.form).then(() => { this.$message({