From 3a70a79f5287d46a52ed4a0a0a887f3656c30500 Mon Sep 17 00:00:00 2001 From: hui <770260999@qq.com> Date: Sat, 20 Jan 2024 16:49:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=83=85=E6=8A=A5=E6=9D=BF=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + ruoyi-ui/src/api/board/board.js | 2 +- ruoyi-ui/src/common/infoBoardTestData.js | 139 ++++++++-------- ruoyi-ui/src/main.js | 3 + .../components/infoBoard/BoardPreview.vue | 23 ++- .../components/infoBoard/BoardTplPreview.vue | 22 ++- .../pages/Home/components/InfoBoard/index.vue | 116 ++++++------- .../Home/components/RoadAndEvents/index.vue | 28 +++- .../pages/service/board/index.vue | 153 ++++++++++-------- .../JiHeExpressway/testData/deviceList.js | 119 ++++++++++++++ .../JiHeExpressway/testData/infoBoard.js | 75 +++++++++ .../views/JiHeExpressway/utils/infoBoard.js | 3 +- ruoyi-ui/vue.config.js | 5 +- 13 files changed, 480 insertions(+), 209 deletions(-) create mode 100644 ruoyi-ui/src/views/JiHeExpressway/testData/deviceList.js create mode 100644 ruoyi-ui/src/views/JiHeExpressway/testData/infoBoard.js diff --git a/.gitignore b/.gitignore index 6b5acaba..955b7572 100644 --- a/.gitignore +++ b/.gitignore @@ -48,3 +48,4 @@ nbdist/ /data node_modules package-lock.json +dist.zip \ No newline at end of file diff --git a/ruoyi-ui/src/api/board/board.js b/ruoyi-ui/src/api/board/board.js index b68f011f..1de3a6d6 100644 --- a/ruoyi-ui/src/api/board/board.js +++ b/ruoyi-ui/src/api/board/board.js @@ -23,7 +23,7 @@ export function getBoardDeviceInfo(deviceId) { // export function publishToBoard(data) { return request({ - url: '/dev-api/business/board/publish', + url: '/business/board/publish', method: 'post', data: data }) diff --git a/ruoyi-ui/src/common/infoBoardTestData.js b/ruoyi-ui/src/common/infoBoardTestData.js index 9bd79762..ffd0882c 100644 --- a/ruoyi-ui/src/common/infoBoardTestData.js +++ b/ruoyi-ui/src/common/infoBoardTestData.js @@ -29,69 +29,78 @@ // volume 音量 // speechSpeed 语速 // intonation 语调 -export default [ - { - "backgroundColor": "00000000", - "displayAreaHeight": "120", - "displayAreaWidth": "768", - "flashingFrequency": "5", - "flickerSpeed": "0", - "font": "微软雅黑", - "fontSize": "40", - "fontSpacing": "4", - "fontStyle": "0", - "foregroundColor": "ffff00", - "horizontalAlignment": "2", - "intonation": "0", - "lineSpacing": "0", - "playSpecialEffects": "0", - "playbackCount": "1", - "playbackDuration": "50", - "residenceTime": "18", - "screenEntryMethod": "1", - "screenEntrySpeed": "1", - "screenOutputMethod": "1", - "setUpTheSpeaker": "0", - "specialEffectsSpeed": "1", - "speechSpeed": "0", - "textContent": "因改扩建施工最高限速100km/h", - "verticalAlignment": "2", - "volume": "0", - "whetherToPlayText": "0", - "whetherToSynchronizePlayback": "0", - "xCoordinate": "0", - "yCoordinate": "0" - }, - { - "backgroundColor": "00000000", - "displayAreaHeight": "120", - "displayAreaWidth": "768", - "flashingFrequency": "5", - "flickerSpeed": "0", - "font": "微软雅黑", - "fontSize": "30", - "fontSpacing": "20", - "fontStyle": "0", - "foregroundColor": "ff0000", - "horizontalAlignment": "1", - "intonation": "0", - "lineSpacing": "10", - "playSpecialEffects": "0", - "playbackCount": "1", - "playbackDuration": "50", - "residenceTime": "50", - "screenEntryMethod": "1", - "screenEntrySpeed": "1", - "screenOutputMethod": "1", - "setUpTheSpeaker": "0", - "specialEffectsSpeed": "1", - "speechSpeed": "0", - "textContent": "因改扩建施工最高限速100km/h", - "verticalAlignment": "2", - "volume": "0", - "whetherToPlayText": "0", - "whetherToSynchronizePlayback": "0", - "xCoordinate": "0", - "yCoordinate": "0" +export default { + "msg": "操作成功", + "code": 200, + "data": { + "3A": { + "programId": 59, + "content": [ + { + "residenceTime": "100", + "intonation": "0", + "fontSpacing": "1", + "screenEntryMethod": "1", + "screenOutputMethod": "1", + "lineSpacing": "0", + "yCoordinate": "0", + "whetherToSynchronizePlayback": "0", + "whetherToPlayText": "0", + "playbackCount": "1", + "flashingFrequency": "5", + "backgroundColor": "8", + "foregroundColor": "FFFF00", + "textContent": "济南方向\\\\n禁止通行", + "fontStyle": "0", + "displayAreaWidth": "160", + "playbackDuration": "100", + "displayAreaHeight": "80", + "volume": "0", + "xCoordinate": "0", + "screenEntrySpeed": "1", + "horizontalAlignment": "2", + "playSpecialEffects": "0", + "setUpTheSpeaker": "0", + "flickerSpeed": "0", + "specialEffectsSpeed": "1", + "fontSize": "32", + "verticalAlignment": "2", + "speechSpeed": "0", + "font": "3" + }, + { + "residenceTime": "100", + "intonation": "0", + "fontSpacing": "1", + "screenEntryMethod": "1", + "screenOutputMethod": "1", + "lineSpacing": "0", + "yCoordinate": "0", + "whetherToSynchronizePlayback": "0", + "whetherToPlayText": "0", + "playbackCount": "1", + "flashingFrequency": "5", + "backgroundColor": "8", + "foregroundColor": "FF0000", + "textContent": "菏泽方向\\\\n可以通行", + "fontStyle": "0", + "displayAreaWidth": "160", + "playbackDuration": "100", + "displayAreaHeight": "80", + "volume": "0", + "xCoordinate": "0", + "screenEntrySpeed": "1", + "horizontalAlignment": "2", + "playSpecialEffects": "0", + "setUpTheSpeaker": "0", + "flickerSpeed": "0", + "specialEffectsSpeed": "1", + "fontSize": "32", + "verticalAlignment": "2", + "speechSpeed": "0", + "font": "3" + } + ] + } } -] +} \ No newline at end of file diff --git a/ruoyi-ui/src/main.js b/ruoyi-ui/src/main.js index 23857822..303cb19a 100644 --- a/ruoyi-ui/src/main.js +++ b/ruoyi-ui/src/main.js @@ -76,6 +76,9 @@ Vue.filter('dateformat', function (dataStr, pattern = 'YYY-MM-DD HH:mm:ss') { //(函数里面的参数 第一个是传递的数据,第二个是需要转换的时间格式) }) +if (process.env.NODE_ENV == 'development'){ + window.IS_TESTING = true; +} // 全局方法挂载 Vue.prototype.dayjs = dayjs; diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardPreview.vue b/ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardPreview.vue index aff7e51d..adf44ed4 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardPreview.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardPreview.vue @@ -1,7 +1,7 @@