diff --git a/ruoyi-ui/src/views/information/board/addinfo.vue b/ruoyi-ui/src/views/information/board/addinfo.vue index 0b9eb1d0..2d061cb4 100644 --- a/ruoyi-ui/src/views/information/board/addinfo.vue +++ b/ruoyi-ui/src/views/information/board/addinfo.vue @@ -12,7 +12,7 @@ height: boardHeight + 'px', position: 'relative', - + textAlign: getTextAlign(dataForm.formatStyle) }" class="blackBoard2"> @@ -470,6 +470,9 @@ export default { }, { device_pixel: '768*64' + }, + { + device_pixel: '160*80' } ] @@ -545,6 +548,9 @@ export default { } else if (!this.dataForm.category && this.infoType == 2) { return this.$modal.msgError('情报板所属类别不能为空') } + if (this.dataForm.CONTENT.indexOf('\\')>0) { + return this.$modal.msgError("内容不能含有特殊字符'\\'") + } //走接口检验内容是否包含敏感字段 /*checkIotBoardContent(this.dataForm.CONTENT).then(response => { if (response.data == 0) { diff --git a/ruoyi-ui/src/views/information/board/editInfo.vue b/ruoyi-ui/src/views/information/board/editInfo.vue index c4ae5258..6fc1be4c 100644 --- a/ruoyi-ui/src/views/information/board/editInfo.vue +++ b/ruoyi-ui/src/views/information/board/editInfo.vue @@ -372,7 +372,8 @@ export default { required: true, message: '请输入详细内容', trigger: 'blur' - } + }, + {pattern: /^^((?!\\\\).)*/gi,message: "禁止输入特殊字符!",trigger: "blur"} ], fontColor: [ { @@ -592,6 +593,10 @@ export default { if (!this.dataForm.CONTENT.trim()) { return this.$modal.msgError('当前输入内容为空') } + + if (this.dataForm.CONTENT.indexOf('\\')>0) { + return this.$modal.msgError("内容不能含有特殊字符'\\'") + } this.loading = true console.log(this.dataForm, '点击修改 表单') diff --git a/ruoyi-ui/src/views/information/board/index.vue b/ruoyi-ui/src/views/information/board/index.vue index 311f1e0a..c6df92a6 100644 --- a/ruoyi-ui/src/views/information/board/index.vue +++ b/ruoyi-ui/src/views/information/board/index.vue @@ -506,6 +506,67 @@ export default { lAlarmHandleStr: null, eqDirection: null, iotDeviceType: null + },{ + searchValue: null, + createBy: null, + createTime: null, + updateBy: null, + updateTime: null, + remark: null, + params: {}, + deviceId: 600, + deviceName: '门架式可变信息标志K71+600', + brandId: 4, + iotBoardBrandName: { + brandId: 4, + brandName: '光电比特' + }, + routeId: 17, + routeDirection: '济南方向', + deviceMarkingName: null, + deviceTypeId: 202010001, + deviceTypeNumber: 202010004, + deviceModelId: null, + factoryLibrary: null, + userUnitId: 555503, + operatorId: null, + longitude: '117.9554825', + latitude: '36.84254887', + firmId: 18, + purchaseDate: '2022-12-14T16:06:03.000+08:00', + warrantyYears: null, + unitPrice: null, + runStatus: 1, + tunnelId: 'JQ-JiNan-WenZuBei-MJY', + deviceStatus: '1', + installDate: '2022-12-14T16:06:03.000+08:00', + maintainId: 2, + collarAgencyId: 555503, + pileNumber: 'K71+600', + manageAgencyId: 'YG11002', + producteDate: null, + repairDate: null, + operateDate: null, + serviceLife: null, + storageDate: null, + isMonitor: 1, + isConfig: 1, + localInfo: 36, + routeNumber: null, + routeName: null, + deviceIp: '10.0.81.66', + devicePort: null, + devicePixel: '768*64', + userName: null, + passWord: null, + protocolName: null, + deviceTypeIds: null, + lUserID: null, + lAlarmHandle: null, + lUserIDStr: null, + lAlarmHandleStr: null, + eqDirection: null, + iotDeviceType: null } ] }, @@ -644,6 +705,74 @@ export default { iotDeviceType: null } ] + }, + { + devicePixel: '160*80', + label: ' 站前160*80', + list: [ + { + searchValue: null, + createBy: null, + createTime: null, + updateBy: null, + updateTime: null, + remark: null, + params: {}, + deviceId: 221, + deviceName: '大学城路口站前', + brandId: 4, + iotBoardBrandName: { + brandId: 4, + brandName: '光电比特' + }, + routeId: 17, + routeDirection: '菏泽方向', + deviceMarkingName: null, + deviceTypeId: 202010001, + deviceTypeNumber: 202010004, + deviceModelId: null, + factoryLibrary: null, + userUnitId: 555503, + operatorId: null, + longitude: null, + latitude: null, + firmId: 18, + purchaseDate: '2022-12-14T16:06:03.000+08:00', + warrantyYears: null, + unitPrice: null, + runStatus: 1, + tunnelId: 'JQ-JiNan-WenZuBei-MJY', + deviceStatus: '1', + installDate: '2022-12-14T16:06:03.000+08:00', + maintainId: 2, + collarAgencyId: 555503, + pileNumber: '大学城路口站前', + manageAgencyId: 'YG11002', + producteDate: null, + repairDate: null, + operateDate: null, + serviceLife: null, + storageDate: null, + isMonitor: 1, + isConfig: 1, + localInfo: 16, + routeNumber: null, + routeName: null, + deviceIp: '10.0.81.221', + devicePort: null, + devicePixel: '160*80', + userName: null, + passWord: null, + protocolName: null, + deviceTypeIds: null, + lUserID: null, + lAlarmHandle: null, + lUserIDStr: null, + lAlarmHandleStr: null, + eqDirection: null, + iotDeviceType: null + } + ] } ] this.iotBoardList = testData @@ -898,15 +1027,15 @@ export default { obj.ACTION = item.ACTION obj.SPEED = item.SPEED obj.COORDINATE = item.COORDINATE.replace('-', '0') - obj.COLOR = that.getColorValue(item.COLOR) + obj.COLOR = item.COLOR obj.FONT = that.getFontValue(item.FONT) obj.FONT_SIZE = item.FONT_SIZE.substring(0, 2) // obj.CONTENT = item.CONTENT.replace(/\\/g, '\\\\') // + // obj.CONTENT = item.CONTENT.replace(/\,/g , "other string or space") // obj.CONTENT = item.CONTENT - obj.CONTENT = item.CONTENT.replaceAll('\\','\\\\') - obj.CONTENT = obj.CONTENT.replaceAll(',','\\,') + obj.CONTENT = item.CONTENT.replaceAll(',','\\,') obj.CONTENT = obj.CONTENT.replaceAll('=','\\=') // obj.CONTENT = obj.CONTENT.replaceAll('=','\=') @@ -922,17 +1051,17 @@ export default { console.log(newArr, 'newArr') - invokedFunction(595,11,{size : '65535',fileName:'play010.lst'}).then(res =>{ + invokedFunction(objAll.deviceIds,11,{size : '65535',fileName:'play010.lst'}).then(res =>{ debugger console.log('发布消息,校验文件名-------------------------------------') console.log(res) if (res.data.result == '01'){ - invokedFunction(595,13,{parameters:newArr}).then(res =>{ + invokedFunction(objAll.deviceIds,13,{parameters:newArr}).then(res =>{ debugger console.log('发布消息,发送文件内容-----------------------------') console.log(res) if (res.data.result == '01'){ - invokedFunction(595,'1B',{fileId:'10'}).then(res =>{ + invokedFunction(objAll.deviceIds,'1B',{fileId:'10'}).then(res =>{ debugger console.log('发布消息,播放文件-----------------------------') console.log(res) @@ -1081,7 +1210,7 @@ export default { this.loading = false this.submitButton = false })*/ - await getDeviceRealtimeProperty('595','3A',{ async: false}) + await getDeviceRealtimeProperty(deviceId,'3A',{ async: false}) .then(res => { if ("3A" in res.data){ console.log('回读消息------------------------') @@ -1095,7 +1224,10 @@ export default { item.FONT = item.font item.COORDINATE = this.covering(item.xCoordinate) + this.covering(item.yCoordinate) item.screenSize = item.displayAreaWidth + '*' + item.displayAreaHeight - item.CONTENT = item.textContent + item.CONTENT = item.textContent.replaceAll('\\,',',') + item.CONTENT = item.CONTENT.replaceAll('\\=','=') + + item.formatStyle = item.verticalAlignment this.contentList.push(item) }