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({