From ae4c0a594b0afda1e83c7ed7da36df64fd657524 Mon Sep 17 00:00:00 2001 From: hui <770260999@qq.com> Date: Thu, 18 Jan 2024 21:33:56 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E6=83=85=E6=8A=A5=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/infoBoard/BoardInfoEditor.vue | 6 +-- .../components/infoBoard/BoardPreview.vue | 2 +- .../pages/Home/components/InfoBoard/index.vue | 43 ++++++++++++++++--- .../views/JiHeExpressway/utils/infoBoard.js | 6 ++- 4 files changed, 44 insertions(+), 13 deletions(-) diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardInfoEditor.vue b/ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardInfoEditor.vue index 7870aad5..13e1efa4 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardInfoEditor.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardInfoEditor.vue @@ -219,7 +219,7 @@ export default { "setUpTheSpeaker": "0", "flickerSpeed": "0", "specialEffectsSpeed": "1", - "fontSize": "64", + "fontSize": "20", "verticalAlignment": "2", "speechSpeed": "0", "font": "3" @@ -322,9 +322,9 @@ export default { } } else{ - tempTpl = this.tplDefault; + tempTpl = _.merge(this.tplDefault, this.tpl.origin); //首页弹窗,新增设备项时,需要传设备尺寸过来 } - this.dataForm = infoBoardUtils.dialogSourceFormat(tplDefault, this.type); + this.dataForm = infoBoardUtils.dialogSourceFormat(tempTpl, this.type, this.mode); }else{ this.dataForm = infoBoardUtils.dialogSourceFormat(this.tpl, this.type, this.mode, this.tplDefault); } diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardPreview.vue b/ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardPreview.vue index 50285753..828478b6 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardPreview.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardPreview.vue @@ -71,7 +71,7 @@ export default { }, tpl:{ handler(newV){ - this.contentArr = this.tpl.textContent.replace(/\n|\r\n/g, '&&&&&').replace(/ /g, ' ').split('&&&&&'); + this.contentArr = this.tpl.textContent.replace(/\+n|\+r\n/g, '&&&&&').replace(/ /g, ' ').split('&&&&&'); this.setStyle(); }, deep:true, diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/InfoBoard/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/InfoBoard/index.vue index a1f9358a..c2fd36ea 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/InfoBoard/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/InfoBoard/index.vue @@ -34,17 +34,29 @@
-
+
+
设备名称
+
{{ device.deviceName }}
+
+
+
设备桩号
+
{{ device.stakeMarkId }}
+
+
+
屏幕像素
+
{{ JSON.parse(device.otherConfig).screenSize }}
+
+
设备参数
-
添加信息
+
添加信息
信息发布
@@ -405,18 +417,34 @@ export default { // 新增待下发 ____onAddToDevice(item) { let arr = this.selectedSize.split("*"); + item.origin = { + displayAreaWidth: +arr[0], + displayAreaHeight: +arr[1] + } this.editDialog = { visible: true, mode: "toDevice", type: "template", tpl: item, - origin: { - displayAreaWidth: +arr[0], - displayAreaHeight: +arr[1] - } } }, + ____onAddDeviceItem() { + let arr = this.selectedSize.split("*"); + this.editDialog = { + visible: true, + mode: "add", + type: "device", + tpl: { + "textContent": "", + origin : { + displayAreaWidth: +arr[0], + displayAreaHeight: +arr[1] + } + } + } + }, + @@ -551,6 +579,7 @@ export default { type: 'warning' }) .then(() => { + return ; let loading = this.$loading({ lock: true, text: 'Loading', diff --git a/ruoyi-ui/src/views/JiHeExpressway/utils/infoBoard.js b/ruoyi-ui/src/views/JiHeExpressway/utils/infoBoard.js index 5f3c5573..11e19eab 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/utils/infoBoard.js +++ b/ruoyi-ui/src/views/JiHeExpressway/utils/infoBoard.js @@ -31,10 +31,12 @@ export default { data1 = _.cloneDeep(data); data1.stopTime = data1.stopTime*0.1 if(mode=="toDevice"){ - data.origin = tplDefault; + // data.origin = tplDefault; + data.origin = _.merge(tplDefault, data.origin); } } else{ + console.log(data.origin , "fdsgfhgjdfss") data1 = { formatStyle: data.horizontalAlignment, content: data.textContent, @@ -44,7 +46,7 @@ export default { fontFamily: data.font, stopTime: data.residenceTime, inScreenMode: data.screenEntryMethod, - origin: data + origin: data } } return data1