Browse Source

情报板完善

wangqin
hui 10 months ago
parent
commit
3a70a79f52
  1. 1
      .gitignore
  2. 2
      ruoyi-ui/src/api/board/board.js
  3. 139
      ruoyi-ui/src/common/infoBoardTestData.js
  4. 3
      ruoyi-ui/src/main.js
  5. 23
      ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardPreview.vue
  6. 22
      ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardTplPreview.vue
  7. 114
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/InfoBoard/index.vue
  8. 28
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/index.vue
  9. 153
      ruoyi-ui/src/views/JiHeExpressway/pages/service/board/index.vue
  10. 119
      ruoyi-ui/src/views/JiHeExpressway/testData/deviceList.js
  11. 75
      ruoyi-ui/src/views/JiHeExpressway/testData/infoBoard.js
  12. 3
      ruoyi-ui/src/views/JiHeExpressway/utils/infoBoard.js
  13. 3
      ruoyi-ui/vue.config.js

1
.gitignore

@ -48,3 +48,4 @@ nbdist/
/data
node_modules
package-lock.json
dist.zip

2
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
})

139
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"
}
]
}
}
]
}

3
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;

23
ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardPreview.vue

@ -1,7 +1,7 @@
<template>
<div class="boardPreview" ref="compBox">
<div class="boardBox" :style="boardStyle">
<p class="boardTxt" v-for="item,index in contentArr" :key="index" :style="boardTxtStyle" v-html="item">
<p class="boardTxt" v-for="item,index in contentArr" :key="index" :style="boardTxtStyle" v-html="item" v-if="(index + 1) <= lineTotal">
</p>
</div>
</div>
@ -16,7 +16,8 @@ export default {
contentArr:{
type:Array,
default:()=>[]
}
},
lineTotal: 0
}
},
props:{
@ -71,7 +72,7 @@ export default {
},
tpl:{
handler(newV){
this.contentArr = this.tpl.textContent.replace(/\\+n|\\+r\n/g, '&&&&&').replace(/ /g, '&nbsp').split('&&&&&');
this.contentArr = this.tpl.textContent.replaceAll(/\\\\n/g, '\n').replaceAll(/ /g, '&nbsp').split('\n');
this.setStyle();
},
deep:true,
@ -85,8 +86,8 @@ export default {
methods:{
setStyle() {
this.$nextTick(() => {
let boxW = this.$refs["compBox"].offsetWidth;
let boxH = this.$refs["compBox"].offsetHeight;
let boxW = this.$refs["compBox"].clientWidth;
let boxH = this.$refs["compBox"].clientHeight;
let conW = this.tpl.displayAreaWidth;
let conH = this.tpl.displayAreaHeight;
let scale = 1;
@ -101,14 +102,20 @@ export default {
"background-color":`${this.tpl.backgroundColor}px`,
"align-items" : ['flex-start', 'flex-end', 'center'][this.tpl.horizontalAlignment]
}
let fontSize = +this.tpl.fontSize.replace("px", "");
let fontSize = 0;
if (_.isString(this.tpl.fontSize)) {
fontSize = this.tpl.fontSize.replace('px', '') * 1;
} else {
fontSize = this.tpl.fontSize;
}
fontSize = fontSize * scale;
this.boardTxtStyle = {
"color": "#" + this.tpl.foregroundColor,
"font-size": `${fontSize}px`,
"font-size": `${fontSize*scale}px`,
"font-family": this.tpl.font,
"min-height": `${this.tpl.fontSize.replace('px', '') * scale}px`
"min-height": `${fontSize * scale}px`
}
this.lineTotal = Math.floor(conH / fontSize);
})
}
}

22
ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardTplPreview.vue

@ -1,7 +1,7 @@
<template>
<div class="boardPreview" ref="compBox">
<div class="boardBox" :style="boardStyle">
<p class="boardTxt" v-for="item,index in contentArr" :key="index" :style="boardTxtStyle" v-html="item">
<p class="boardTxt" v-for="item,index in contentArr" :key="index" :style="boardTxtStyle" v-html="item" v-if="(index+1)<=lineTotal">
</p>
</div>
</div>
@ -16,7 +16,8 @@ export default {
contentArr:{
type:Array,
default:()=>[]
}
},
lineTotal:0,
}
},
props:{
@ -70,27 +71,34 @@ export default {
methods:{
setStyle() {
this.$nextTick(() => {
let boxW = this.$refs["compBox"].offsetWidth;
let boxH = this.$refs["compBox"].offsetHeight;
let boxW = this.$refs["compBox"].clientWidth;
let boxH = this.$refs["compBox"].clientHeight;
let arr = this.boardWH.split("*");
let scale = 1;
console.log(boxW,boxH,arr[0],arr[1]);
if (arr[0] / arr[1] > boxW / boxH) {
scale = boxW / arr[0];
} else {
scale = boxH / arr[1];
}
this.boardStyle = {
width: `${arr[0] * scale}px`,
height: `${arr[1] * scale}px`,
"align-items" : ['flex-start', 'flex-end', 'center'][this.tpl.formatStyle]
}
let fontSize = 0;
if(_.isString(this.tpl.fontSize)){
fontSize = this.tpl.fontSize.replace('px', '')*1;
}else{
fontSize = this.tpl.fontSize;
}
this.boardTxtStyle = {
"color": "#" + this.tpl.fontColor,
"font-size": `${this.tpl.fontSize.replace('px','')*scale}px`,
"font-size": `${fontSize*scale}px`,
"font-family": this.fontTypeDic[this.tpl.fontType],
"min-height": `${this.tpl.fontSize.replace('px', '') * scale}px`
"min-height": `${fontSize * scale}px`,
}
this.lineTotal = Math.floor(arr[1]/ fontSize);
})
}
}

114
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/InfoBoard/index.vue

@ -58,7 +58,7 @@
</div>
<div class="dialogContent_bottom_btn">
<div class="show_bottom_btn_add" @click="____onAddDeviceItem">添加信息</div>
<div class="show_bottom_btn_del" @click="InformationReleaseFn">信息发布</div>
<div class="show_bottom_btn_del" @click="____publishInfo">信息发布</div>
</div>
<div class="sideSwitch" @click="showSidePanel">
<img class="img" src="@/assets/screen/xtb/leftd.png" alt=""
@ -167,7 +167,7 @@
import addBoard from './addinfo.vue'
import editBoard from './editInfo.vue'
import { listDevice, invokedFunction, getDeviceRealtimeProperty } from '@/api/device/device.js'
import infoBoardTestData from "@/common/infoBoardTestData.js"
// import infoBoardTestData from "@/common/infoBoardTestData.js"
import { getBoardDeviceInfo } from '@/api/board/board'
import BoardPreview from "@screen/components/infoBoard/BoardPreview.vue"
@ -181,6 +181,8 @@ import Teleport from '@screen/components/Teleport.vue'
import { publishToBoard } from '@/api/board/board'
import { getTemplateList } from '@/api/board/template'
import testDeviceInfo from "@screen/testData/infoBoard.js"
export default {
name: 'InfoBoard',
data() {
@ -306,7 +308,7 @@ export default {
watch: {
device: {
handler(newV) {
this.____getDeviceInfo();
this.____initData();
},
immediate: true
}
@ -321,7 +323,7 @@ export default {
},
mounted() {
//
this.dialogInfoList = this.boardDataConvert(infoBoardTestData);
// this.dialogInfoList = this.boardDataConvert(infoBoardTestData);
this.templateList = this.moBanDataList;
let deviceState = "online";
this.tabDataInfoList = [
@ -347,7 +349,7 @@ export default {
});
},
____getDeviceInfo() {
____initData() {
this.selectedSize = JSON.parse(this.device.otherConfig).screenSize;
if(this.tplCategory.length && this.templateAll.length){
this.____setAvailableTemplate();
@ -357,11 +359,21 @@ export default {
})
}
getBoardDeviceInfo(this.device.iotDeviceId).then(res => {
this.selectedBdMsg = res.data["3A"].content;
}).catch(err => {
this.____getDeviceInfo();
},
})
____getDeviceInfo(){
if (IS_TESTING) {
this.selectedBdMsg = _.cloneDeep(testDeviceInfo.data["3A"].content);
}else{
getBoardDeviceInfo(this.device.iotDeviceId).then(res => {
this.selectedBdMsg = res.data["3A"].content;
}).catch(err => {
})
}
},
____setAvailableTemplate() {
@ -581,65 +593,61 @@ export default {
}
})
},
//
InformationReleaseFn() {
//
____publishInfo() {
this.$confirm('是否确定发布情报板?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
let loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
let content = [];
this.selectedBdMsg.forEach(item => {
content.push({
STAY: item.playbackDuration,
ACTION: item.screenEntryMethod,
SPEED: item.fontSpacing,
COLOR: item.foregroundColor,
FONT: item.font,
FONT_SIZE: item.fontSize,
CONTENT: item.textContent.replaceAll('\\', '').replaceAll(',', '\\,').replaceAll('=', '\\=').replaceAll('\n', '\\\\n'),
width: item.displayAreaWidth,
height: item.displayAreaHeight,
formatStyle: item.verticalAlignment
})
})
let data = { content: content, deviceId: this.device.iotDeviceId }
console.log(data, "发布内容");
console.log(this.device , "devicedevicedevice")
console.log(this.device.iotDeviceId , "iotDeviceIdiotDeviceIdiotDeviceId")
console.log(this.selectedBdMsg , "selectedBdMsgselectedBdMsgselectedBdMsg")
// let content = this.content;
// let deviceId = this.device;
// publishToBoard({content, deviceId});
if (IS_TESTING) {
console.log("测试模式")
this.____getDeviceInfo();
loading.close()
})
.catch(() => {
}else{
publishToBoard(data).then(res=>{
loading.close()
this.____getDeviceInfo();
});
}
}).catch(() => {
this.$message({
type: 'info',
message: '已取消发布情报板'
message: '取消发布'
})
loading.close()
})
this.updateList()
},
//
updateList(deviceId) {
getDeviceRealtimeProperty(deviceId, '3A', { async: false })
.then(res => {
var contentsA = res.data['3A'].content
console.log('回读消息--1111111111---', contentsA)
this.dialogInfoList = this.boardDataConvert(contentsA);
console.log('hui1111111111111', this.dialogInfoList)
})
.catch(e => {
// this.$modal.msgError(',')
})
// this.deviceId = deviceId
// id
/*getBoardInfo(deviceId).then(res => {
console.log(res, 'getBoardInfo')
this.form.devicePixel = res.data.pixel
if (res.data.deviceId) {
this.disabledButton = false
} else {
this.disabledButton = true
}
})*/
},
//
getTemplateSeries() {

28
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/index.vue

@ -30,6 +30,9 @@
<!-- <Camera :data="dialogConfig.data" :visible="dialogConfig.visibleType === 1" /> -->
<component :dialogData="dialogConfig.data" visible :device="dialogConfig.data" :is="dialogConfig.component"
@change="handleCameraChange" @update:visible="handleCameraChange" />
<!-- <InfoBoard :device="testData.device" :visible.sync="testData.visible"></InfoBoard> -->
</Bg1>
</template>
@ -52,9 +55,31 @@ export default {
DrivingGuidance,
InfoBoard,
Bg1
},
},
data() {
return {
testData:{
visible:true,
device: {
"id": 904,
"iotDeviceId": "81221-65535",
"groupId": null,
"productId": 0,
"stakeMarkId": "k59+289",
"direction": "1",
"deviceName": "大学城入口站前板",
"deviceType": 2,
"installationDate": null,
"productionDate": null,
"durableYears": null,
"installationSite": null,
"useState": null,
"otherConfig": "{\"screenSize\":\"160*80\"}",
"remark": null,
"createTime": "2024-01-10T15:48:59.000+08:00",
"updateTime": null
}
},
layerData: [],
active: "事件专题",
tabContentData: [],
@ -64,7 +89,6 @@ export default {
// 0 ControlCamera | 1 Camera
component: void 0,
data: void 0,
// component: ControlCamera,
// data: {
// camId: "57937",
// }

153
ruoyi-ui/src/views/JiHeExpressway/pages/service/board/index.vue

@ -55,7 +55,7 @@
<div class="controlBox">
<el-button type="primary" @click.native="____onAddDeviceItem()">添加信息</el-button>
<el-button type="primary" @click="publishInfo" :disabled="selectedBdMsg.length == 0">发布信息</el-button>
<el-button type="primary" @click="____publishInfo" :disabled="selectedBdMsg.length == 0">发布信息</el-button>
</div>
</div>
<div class="partCon">
@ -153,7 +153,7 @@ import { getUserDeptId } from '@/api/system/user'
import { listTunnels, devicessize, information, getBoardInfo, getBoardEditInfo, getboardSizeDic, getBoardContentData, deviceControl } from '@/api/information/api.js'
import { uploadBoardEditInfo, getAllVmsTemplate, addTemplate, addTemplateContent, getBoardContent, deleteTemplate, splicingBoard } from '@/api/board/template'
import { invokedFunction, getDeviceRealtimeProperty } from '@/api/device/device'
import { getBoardList, getBoardDeviceInfo } from '@/api/board/board'
import { getBoardList, getBoardDeviceInfo, publishToBoard } from '@/api/board/board'
import { getTemplateList } from '@/api/board/template'
import BoardPreview from "@screen/components/infoBoard/BoardPreview.vue"
import BoardTplPreview from "@screen/components/infoBoard/BoardTplPreview.vue"
@ -164,6 +164,9 @@ import scrollOptions from '@/common/scrollbar.js'
import infoBoardUtils from "@screen/utils/infoBoard.js"
import testDeviceList from "@screen/testData/deviceList.js"
import testDeviceInfo from "@screen/testData/infoBoard.js"
//
export const deepClone = data => {
//
@ -375,42 +378,66 @@ export default {
let param = {
direction: this.form.selectedDirection,
};
getBoardList(param).then((res) => {
res.data.forEach(item => {
if (_.isString(item.otherConfig)) {
item.otherConfig = JSON.parse(item.otherConfig);
}
this.boardSizeDic[item.otherConfig.screenSize].list.push(item);
if (!this.selectedSize) {
this.selectedSize = item.otherConfig.screenSize;
}
if (!this.selectedDevice.deviceName) {
this.selectedDevice = item;
}
})
if(IS_TESTING){
let res = testDeviceList;
res.data.forEach(item => {
if (_.isString(item.otherConfig)) {
item.otherConfig = JSON.parse(item.otherConfig);
}
this.boardSizeDic[item.otherConfig.screenSize].list.push(item);
if (!this.selectedSize) {
this.selectedSize = item.otherConfig.screenSize;
}
if (!this.selectedDevice.deviceName) {
this.selectedDevice = item;
}
})
this.____onChangeSize();
this.____getBoardMessage();
// this.$forceUpdate();
// this.____onChangeSize(this.boardSizeDic[0].selectedPixel);
});
this.____getDeviceInfo();
}else{
getBoardList(param).then((res) => {
res.data.forEach(item => {
if (_.isString(item.otherConfig)) {
item.otherConfig = JSON.parse(item.otherConfig);
}
this.boardSizeDic[item.otherConfig.screenSize].list.push(item);
if (!this.selectedSize) {
this.selectedSize = item.otherConfig.screenSize;
}
if (!this.selectedDevice.deviceName) {
this.selectedDevice = item;
}
})
this.____onChangeSize();
this.____getDeviceInfo();
// this.$forceUpdate();
// this.____onChangeSize(this.boardSizeDic[0].selectedPixel);
});
}
},
____getBoardMessage() {
if (process.env.NODE_ENV == 'development') {
____getDeviceInfo() {
// import("@/common/infoBoardTestData.js").then(res=>{
// this.selectedBdMsg = res.default.data["3A"].content;
// })
}
if (!this.selectedDevice.iotDeviceId) {
return;
}
getBoardDeviceInfo(this.selectedDevice.iotDeviceId).then(res => {
this.selectedBdMsg = res.data["3A"].content;
}).catch(err => {
})
//
if (IS_TESTING) {
this.selectedBdMsg = _.cloneDeep(testDeviceInfo.data["3A"].content);
console.log(this.selectedBdMsg, "gfdgfdd")
} else{
if (!this.selectedDevice.iotDeviceId) {
return;
}
getBoardDeviceInfo(this.selectedDevice.iotDeviceId).then(res => {
this.selectedBdMsg = res.data["3A"].content;
}).catch(err => {
})
}
},
____onAddTemplate() {
@ -478,10 +505,10 @@ export default {
//
____onAddToDevice(item) {
if(this.checkedDevices.length<=0){
this.$message.warning('未选择设备!');
return;
}
// if(this.checkedDevices.length<=0){
// this.$message.warning('!');
// return;
// }
let arr = this.selectedSize.split("*");
item.origin = {
@ -610,7 +637,7 @@ export default {
},
//
publishInfo() {
____publishInfo() {
this.$confirm('是否确定发布情报板?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
@ -624,11 +651,9 @@ export default {
background: 'rgba(0, 0, 0, 0.7)'
})
let content = [];
let deviceId = this.device;
this.selectedBdMsg.forEach(item=>{
console.log(item.textContent , "item.textContentitem.textContentitem.textContent");
content.push({
STAY :item.playbackDuration,
ACTION :item.screenEntryMethod,
@ -639,41 +664,33 @@ export default {
CONTENT :item.textContent.replaceAll('\\', '').replaceAll(',', '\\,').replaceAll('=', '\\=').replaceAll('\n', '\\\\n'),
width : item.displayAreaWidth,
height : item.displayAreaHeight,
formatstyle : item.verticalAlignment,
// backgroundColor : item.backgroundColor,
// flashingFrequency : item.flashingFrequency,
// flickerSpeed : item.flickerSpeed,
// fontStyle : item.fontStyle,
// horizontalAlignment : item.horizontalAlignment,
// intonation : item.intonation,
// lineSpacing : item.lineSpacing,
// playSpecialEffects : item.playSpecialEffects,
// playbackCount : item.playbackCount,
// residenceTime : item.residenceTime,
// screenEntrySpeed : item.screenEntrySpeed,
// screenOutputMethod : item.screenOutputMethod,
// setUpTheSpeaker : item.setUpTheSpeaker,
// specialEffectsSpeed : item.specialEffectsSpeed,
// speechSpeed : item.speechSpeed,
// volume : item.volume,
// whetherToPlayText : item.whetherToPlayText,
// whetherToSynchronizePlayback : item.whetherToSynchronizePlayback,
formatStyle : item.verticalAlignment
})
})
console.log(content, "发布内容");
// publishToBoard({content, deviceId});
let data = { content: content, deviceId: this.selectedDevice.iotDeviceId }
console.log(data , "发布内容");
if (IS_TESTING) {
console.log("测试模式")
this.____getDeviceInfo();
loading.close()
} else {
publishToBoard(data).then(res => {
loading.close()
this.____getDeviceInfo();
});
}
loading.close()
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消发布情报板'
message: '取消发布'
})
loading.close()
})
this.updateList()
},
@ -698,7 +715,7 @@ export default {
// this.selectedDevice = _.find(this.boardSizeDic[this.selectedSize].list, { iotDeviceId: value[0] });
this.selectedDevice = item;
// this.selectedDevice = this.deviceList
this.____getBoardMessage();
this.____getDeviceInfo();
// this.checkedDevices = value
// let val = JSON.parse(JSON.stringify(value))

119
ruoyi-ui/src/views/JiHeExpressway/testData/deviceList.js

@ -0,0 +1,119 @@
export default
{
data:[
{
"id": 894,
"iotDeviceId": "8162-65535",
"groupId": null,
"productId": 0,
"stakeMarkId": "k57+595",
"direction": "1",
"deviceName": "门架式可变信息标志k57+595",
"deviceType": 2,
"installationDate": null,
"productionDate": null,
"durableYears": null,
"installationSite": null,
"useState": null,
"otherConfig": "{\"screenSize\":\"768*64\"}",
"remark": null,
"createTime": "2024-01-10T15:27:34.000+08:00",
"updateTime": null
},
{
"id": 895,
"iotDeviceId": "8166-65535",
"groupId": null,
"productId": 0,
"stakeMarkId": "k71+600",
"direction": "1",
"deviceName": "门架式可变信息标志k71+600",
"deviceType": 2,
"installationDate": null,
"productionDate": null,
"durableYears": null,
"installationSite": null,
"useState": null,
"otherConfig": "{\"screenSize\":\"768*64\"}",
"remark": null,
"createTime": "2024-01-10T15:27:34.000+08:00",
"updateTime": null
},
{
"id": 896,
"iotDeviceId": "2161-65535",
"groupId": null,
"productId": 0,
"stakeMarkId": "k82+285",
"direction": "1",
"deviceName": "门架式可变信息标志k82+285",
"deviceType": 2,
"installationDate": null,
"productionDate": null,
"durableYears": null,
"installationSite": null,
"useState": null,
"otherConfig": "{\"screenSize\":\"768*64\"}",
"remark": null,
"createTime": "2024-01-10T15:27:34.000+08:00",
"updateTime": null
},
{
"id": 902,
"iotDeviceId": "31115-65535",
"groupId": null,
"productId": 0,
"stakeMarkId": "k98+208",
"direction": "1",
"deviceName": "门架式可变信息标志k98+208",
"deviceType": 2,
"installationDate": null,
"productionDate": null,
"durableYears": null,
"installationSite": null,
"useState": null,
"otherConfig": "{\"screenSize\":\"768*64\"}",
"remark": null,
"createTime": "2024-01-10T15:48:59.000+08:00",
"updateTime": null
},
{
"id": 903,
"iotDeviceId": "31111-65535",
"groupId": null,
"productId": 0,
"stakeMarkId": "k103+900",
"direction": "1",
"deviceName": "门架式可变信息标志k103+900",
"deviceType": 2,
"installationDate": null,
"productionDate": null,
"durableYears": null,
"installationSite": null,
"useState": null,
"otherConfig": "{\"screenSize\":\"768*64\"}",
"remark": null,
"createTime": "2024-01-10T15:48:59.000+08:00",
"updateTime": null
},
{
"id": 904,
"iotDeviceId": "81221-65535",
"groupId": null,
"productId": 0,
"stakeMarkId": "k59+289",
"direction": "1",
"deviceName": "大学城入口站前板",
"deviceType": 2,
"installationDate": null,
"productionDate": null,
"durableYears": null,
"installationSite": null,
"useState": null,
"otherConfig": "{\"screenSize\":\"160*80\"}",
"remark": null,
"createTime": "2024-01-10T15:48:59.000+08:00",
"updateTime": null
}
]
}

75
ruoyi-ui/src/views/JiHeExpressway/testData/infoBoard.js

@ -0,0 +1,75 @@
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"
}
]
}
}
}

3
ruoyi-ui/src/views/JiHeExpressway/utils/infoBoard.js

@ -36,11 +36,10 @@ export default {
}
}
else{
console.log(data.origin , "fdsgfhgjdfss")
data1 = {
// formatStyle: data.horizontalAlignment,
formatStyle: data.verticalAlignment,
content: data.textContent.replaceAll(/\\\\n/g , "\n"),
content: data.textContent.replaceAll('\\,', ',').replaceAll('\\=', '=').replaceAll('\\\\n', '\n'),
fontColor: data.foregroundColor.toUpperCase(),
fontSize: data.fontSize.replace("px",""),
// fontFamily: this.deviceFontToEdit(data.font),

3
ruoyi-ui/vue.config.js

@ -44,7 +44,8 @@ module.exports = {
// target: `http://10.168.77.209:8080`, // 刘朋
// target: `http://10.168.66.196:8080`, //刘文阁
// target: `http://10.168.56.206:8087`, //孟
target: `http://10.0.81.202:8087`, //现场后台
target: `http://10.168.65.156:8087`,
// target: `http://10.0.81.202:8087`, //现场后台
// target: `http://10.0.81.204:8087`, //现场后台 刘文阁
changeOrigin: true,
pathRewrite: {

Loading…
Cancel
Save