From 5f61ceae03719d204f213136ecf5a66b945d328e Mon Sep 17 00:00:00 2001 From: xuhuajiao <13476289682@163.com> Date: Thu, 21 Aug 2025 17:27:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/digitalScreen/index.vue | 8 +- .../digitalScreen/module/areaSetting.vue | 108 +++++++++++++++--- .../digitalScreen/module/bookRecommend.vue | 69 +++++------ .../digitalScreen/module/mediaSetting.vue | 2 + 4 files changed, 133 insertions(+), 54 deletions(-) diff --git a/src/views/digitalScreen/index.vue b/src/views/digitalScreen/index.vue index 6f36acc..2adb9f1 100644 --- a/src/views/digitalScreen/index.vue +++ b/src/views/digitalScreen/index.vue @@ -80,7 +80,7 @@ 本地数据 基数计算 - 第三方接口 +
@@ -312,7 +312,7 @@
- + @@ -386,6 +386,7 @@ export default { }, wecharQrCodeUrl: null, mapData: null, + mapSpacing: null, welcomePlay: null, previewUrlParent: null, editStatus: { @@ -571,6 +572,9 @@ export default { if (code === 'map_data') { this.mapData = context } + if (code === 'map_spacing') { + this.mapSpacing = context + } if (code === 'welcome_play') { this.welcomePlay = context diff --git a/src/views/digitalScreen/module/areaSetting.vue b/src/views/digitalScreen/module/areaSetting.vue index 4b17139..6d0a47e 100644 --- a/src/views/digitalScreen/module/areaSetting.vue +++ b/src/views/digitalScreen/module/areaSetting.vue @@ -4,7 +4,7 @@
地图DataV - + +
双击输入框可进行编辑。数据将用于“区域屏”,显示区域地图。
+ + + +
+ + {{ areaForm.map_spacing || '' }} + + + 像素 +
+
+ +
+
双击输入框可进行编辑。由于地图形状各异,如果需要调整地图垂直位置(让显示更居中),可通过次参数微调,保存后在预览页面查看最终效果!
-
双击输入框可进行编辑。数据将用于“区域屏”,显示区域地图。
+
@@ -202,6 +226,10 @@ export default { mapData: { type: String, default: null + }, + mapSpacing: { + type: String, + default: null } }, data() { @@ -210,11 +238,13 @@ export default { btnLoading: false, deleteLoading: false, areaForm: { - map_data: null + map_data: null, + map_spacing: null }, editStatus: { areaForm: { - map_data: false + map_data: false, + map_spacing: false } }, originalValues: { @@ -271,10 +301,17 @@ export default { this.areaForm.map_data = newVal this.originalValues.areaForm.map_data = newVal } + }, + mapSpacing(newVal) { + if (newVal !== this.areaForm.map_spacing) { + this.areaForm.map_spacing = newVal + this.originalValues.areaForm.map_spacing = newVal + } } }, created() { this.areaForm.map_data = this.mapData + this.areaForm.map_spacing = this.mapSpacing }, mounted() { this.$emit('ready') @@ -316,7 +353,7 @@ export default { submitMapData(formName, field) { const value = this[formName][field] if (!value) { - this.$message.warning(`GeoJSON不能为空`) + this.$message.warning(`${this.getFieldLabel(formName, field)}不能为空`) this[formName][field] = this.originalValues[formName][field] return } @@ -329,17 +366,26 @@ export default { FetchEditScreenSetting(param) .then((res) => { if (res.code !== 500) { - this.$message.success('GeoJSON更新成功') + this.$message.success(`${this.getFieldLabel(formName, field)}更新成功`) this.$emit('update:mapData', value) this.$emit('triggerInit') } else { - this.$message.error('GeoJSON更新失败') + this.$message.error(`${this.getFieldLabel(formName, field)}更新失败`) } }) .catch(() => { - this.$message.error('GeoJSON更新失败') + this.$message.error(`${this.getFieldLabel(formName, field)}更新失败`) }) }, + getFieldLabel(formName, field) { + const labels = { + areaForm: { + map_data: 'GeoJSON', + map_spacing: '地图边距微调' + } + } + return labels[formName][field] || field + }, handleCover(value) { if (value) { const imgUrl = this.baseApi + '/api/fileRelevant/getImg?imgType=1&imgId=' + value @@ -509,23 +555,29 @@ export default { diff --git a/src/views/digitalScreen/module/bookRecommend.vue b/src/views/digitalScreen/module/bookRecommend.vue index f5471a1..e171652 100644 --- a/src/views/digitalScreen/module/bookRecommend.vue +++ b/src/views/digitalScreen/module/bookRecommend.vue @@ -1,29 +1,30 @@ diff --git a/src/views/digitalScreen/module/mediaSetting.vue b/src/views/digitalScreen/module/mediaSetting.vue index f4fafbc..210a3ea 100644 --- a/src/views/digitalScreen/module/mediaSetting.vue +++ b/src/views/digitalScreen/module/mediaSetting.vue @@ -341,6 +341,7 @@ export default { } else { this.noticeTitle = '编辑通知' this.form = data + this.form.context = data.context.replace(//g, '\n') } this.noticeDialogVisible = true } else { @@ -375,6 +376,7 @@ export default { this.btnLoading = true if (form === 'form') { this.form.libcode = this.user.fonds.fondsNo + this.form.context = this.form.context.replace(/\n/g, '
') console.log(this.form) FetchEditScreenNotice(this.form).then((res) => { if (res.code !== 500) {