lau572 11 months ago
parent
commit
0890ae31ed
  1. 5
      ruoyi-ui/src/views/information/board/editInfo.vue
  2. 69
      ruoyi-ui/src/views/information/board/index.vue

5
ruoyi-ui/src/views/information/board/editInfo.vue

@ -6,7 +6,7 @@
<div class="dialogLine"></div> <div class="dialogLine"></div>
<div class="dialogCloseButton"></div> <div class="dialogCloseButton"></div>
</div> </div>
<el-card class="box-card" > <el-card class="box-card" style="display: flex;justify-content: center;">
<div class="blackBoard1" v-on:ondragenter="ondragenter" v-on:drop="faceDrop" v-on:dragover="allowDrop" :style="{ <div class="blackBoard1" v-on:ondragenter="ondragenter" v-on:drop="faceDrop" v-on:dragover="allowDrop" :style="{
width: getDevicePixel(boardWidth, 0), width: getDevicePixel(boardWidth, 0),
height: getDevicePixel(boardHeight, 1), height: getDevicePixel(boardHeight, 1),
@ -374,7 +374,7 @@ export default {
message: '请输入详细内容', message: '请输入详细内容',
trigger: 'blur' trigger: 'blur'
}, },
{pattern: /^^((?!\\\\).)*/gi,message: "禁止输入特殊字符!",trigger: "blur"} { pattern: /^^((?!\\\\).)*/gi, message: '禁止输入特殊字符!', trigger: 'blur' }
], ],
fontColor: [ fontColor: [
{ {
@ -484,6 +484,7 @@ export default {
this.dataForm = JSON.parse(JSON.stringify(this.boardEmitItem)) this.dataForm = JSON.parse(JSON.stringify(this.boardEmitItem))
this.dataForm.COLOR = this.getColorValue(this.boardEmitItem.COLOR) this.dataForm.COLOR = this.getColorValue(this.boardEmitItem.COLOR)
console.log(this.dataForm, 'this.dataForm') console.log(this.dataForm, 'this.dataForm')
// console.log('111111111', this.boardEmitItem)
// this.dataForm.FONT = this.getFont(this.boardEmitItem.FONT) // this.dataForm.FONT = this.getFont(this.boardEmitItem.FONT)
this.dataForm.CONTENT = JSON.parse(JSON.stringify(this.boardEmitItem.CONTENT.replace('<br>', '\n').replace(/ /g, ' ').replace('<r><n>', '\n'))) this.dataForm.CONTENT = JSON.parse(JSON.stringify(this.boardEmitItem.CONTENT.replace('<br>', '\n').replace(/ /g, ' ').replace('<r><n>', '\n')))
this.dataForm.STAY = JSON.parse(JSON.stringify(Number(this.boardEmitItem.STAY) / 10)) this.dataForm.STAY = JSON.parse(JSON.stringify(Number(this.boardEmitItem.STAY) / 10))

69
ruoyi-ui/src/views/information/board/index.vue

@ -80,8 +80,10 @@
fontFamily: scope.row.FONT, fontFamily: scope.row.FONT,
width: getScreenSize(form.devicePixel, 'width') + 'px', width: getScreenSize(form.devicePixel, 'width') + 'px',
height: getScreenSize(form.devicePixel, 'height') + 'px', height: getScreenSize(form.devicePixel, 'height') + 'px',
lineHeight:getScreenSize(form.devicePixel, 'height') + 'px', 'lineHeight':'1',
textAlign: getTextAlign(scope.row.formatStyle), 'display': 'flex',
'align-items': 'center',
'justify-content': getTextAlign(scope.row.formatStyle),
}"> }">
<span :style="{ <span :style="{
/*left: getCoordinate( /*left: getCoordinate(
@ -155,8 +157,9 @@
<div :style="{ <div :style="{
width: getScreenSize(itm.screenSize, 'width') + 'px', width: getScreenSize(itm.screenSize, 'width') + 'px',
height: getScreenSize(itm.screenSize, 'height') + 'px', height: getScreenSize(itm.screenSize, 'height') + 'px',
lineHeight:getScreenSize(itm.screenSize, 'height') + 'px', 'display': 'flex',
textAlign: getTextAlign(itm.tcontents[0].formatStyle), 'align-items': 'center',
'justify-content': getTextAlign(itm.tcontents[0].formatStyle),
position: 'relative', position: 'relative',
}" style="background: black; position: relative;overflow: hidden;"> }" style="background: black; position: relative;overflow: hidden;">
@ -383,7 +386,6 @@ export default {
devicePixel: '768*64', devicePixel: '768*64',
label: '门架板768*64', label: '门架板768*64',
list: [ list: [
{ {
searchValue: null, searchValue: null,
createBy: null, createBy: null,
@ -445,7 +447,8 @@ export default {
lAlarmHandleStr: null, lAlarmHandleStr: null,
eqDirection: null, eqDirection: null,
iotDeviceType: null iotDeviceType: null
},{ },
{
searchValue: null, searchValue: null,
createBy: null, createBy: null,
createTime: null, createTime: null,
@ -506,7 +509,8 @@ export default {
lAlarmHandleStr: null, lAlarmHandleStr: null,
eqDirection: null, eqDirection: null,
iotDeviceType: null iotDeviceType: null
},{ },
{
searchValue: null, searchValue: null,
createBy: null, createBy: null,
createTime: null, createTime: null,
@ -567,7 +571,8 @@ export default {
lAlarmHandleStr: null, lAlarmHandleStr: null,
eqDirection: null, eqDirection: null,
iotDeviceType: null iotDeviceType: null
},{ },
{
searchValue: null, searchValue: null,
createBy: null, createBy: null,
createTime: null, createTime: null,
@ -628,7 +633,8 @@ export default {
lAlarmHandleStr: null, lAlarmHandleStr: null,
eqDirection: null, eqDirection: null,
iotDeviceType: null iotDeviceType: null
},{ },
{
searchValue: null, searchValue: null,
createBy: null, createBy: null,
createTime: null, createTime: null,
@ -689,7 +695,7 @@ export default {
lAlarmHandleStr: null, lAlarmHandleStr: null,
eqDirection: null, eqDirection: null,
iotDeviceType: null iotDeviceType: null
}, }
] ]
}, },
{ {
@ -974,7 +980,7 @@ export default {
category: item.category, // category: item.category, //
ID: this.contentList.length, ID: this.contentList.length,
format: item.tcontents[0].contentList, format: item.tcontents[0].contentList,
formatStyle : item.tcontents[0].formatStyle, formatStyle: item.tcontents[0].formatStyle
} }
this.contentList.push(list) this.contentList.push(list)
this.toggleIndex++ this.toggleIndex++
@ -1130,7 +1136,8 @@ export default {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { })
.then(() => {
let loading = this.$loading({ let loading = this.$loading({
lock: true, lock: true,
text: 'Loading', text: 'Loading',
@ -1161,7 +1168,6 @@ export default {
obj.CONTENT = obj.CONTENT.replaceAll('=', '\\=') obj.CONTENT = obj.CONTENT.replaceAll('=', '\\=')
obj.CONTENT = obj.CONTENT.replaceAll('\n', '\\\\n') obj.CONTENT = obj.CONTENT.replaceAll('\n', '\\\\n')
// obj.CONTENT = obj.CONTENT.replaceAll('=','\=') // obj.CONTENT = obj.CONTENT.replaceAll('=','\=')
obj.width = devicePixel[0] obj.width = devicePixel[0]
obj.height = devicePixel[1] obj.height = devicePixel[1]
@ -1174,35 +1180,40 @@ export default {
} }
console.log(newArr, 'newArr') console.log(newArr, 'newArr')
invokedFunction(objAll.deviceIds, 11, { size: '65535', fileName: 'play010.lst' })
invokedFunction(objAll.deviceIds,11,{size : '65535',fileName:'play010.lst'}).then(res =>{ .then(res => {
debugger debugger
console.log('发布消息,校验文件名-------------------------------------') console.log('发布消息,校验文件名-------------------------------------')
console.log(res) console.log(res)
if (res.data.result == '01') { if (res.data.result == '01') {
invokedFunction(objAll.deviceIds,13,{parameters:newArr}).then(res =>{ invokedFunction(objAll.deviceIds, 13, { parameters: newArr })
.then(res => {
debugger debugger
console.log('发布消息,发送文件内容-----------------------------') console.log('发布消息,发送文件内容-----------------------------')
console.log(res) console.log(res)
if (res.data.result == '01') { if (res.data.result == '01') {
invokedFunction(objAll.deviceIds,'1B',{fileId:'10'}).then(res =>{ invokedFunction(objAll.deviceIds, '1B', { fileId: '10' })
.then(res => {
debugger debugger
console.log('发布消息,播放文件-----------------------------') console.log('发布消息,播放文件-----------------------------')
console.log(res) console.log(res)
}).catch(()=>{
this.$modal.msgWarning("发布失败,请重试");
}) })
.catch(() => {
this.$modal.msgWarning('发布失败,请重试')
})
} }
}).catch(()=>{ })
this.$modal.msgWarning("发布失败,请重试"); .catch(() => {
this.$modal.msgWarning('发布失败,请重试')
}) })
} }
}).catch(()=>{ })
this.$modal.msgWarning("发布失败,请重试"); .catch(() => {
this.$modal.msgWarning('发布失败,请重试')
}) })
loading.close() loading.close()
}).catch(() => { })
.catch(() => {
this.$message({ this.$message({
type: 'info', type: 'info',
message: '已取消发布情报板' message: '已取消发布情报板'
@ -1336,7 +1347,7 @@ export default {
})*/ })*/
await getDeviceRealtimeProperty(deviceId, '3A', { async: false }) await getDeviceRealtimeProperty(deviceId, '3A', { async: false })
.then(res => { .then(res => {
if ("3A" in res.data){ if ('3A' in res.data) {
console.log('回读消息------------------------') console.log('回读消息------------------------')
console.log(res.data) console.log(res.data)
debugger debugger
@ -1348,13 +1359,13 @@ export default {
item.ID = i item.ID = i
item.FONT = item.font item.FONT = item.font
item.STAY = item.playbackDuration item.STAY = item.playbackDuration
item.ACTION = item.screenEntryMethod
item.COORDINATE = this.covering(item.xCoordinate) + this.covering(item.yCoordinate) item.COORDINATE = this.covering(item.xCoordinate) + this.covering(item.yCoordinate)
item.screenSize = item.displayAreaWidth + '*' + item.displayAreaHeight item.screenSize = item.displayAreaWidth + '*' + item.displayAreaHeight
item.CONTENT = item.textContent.replaceAll('\\,', ',') item.CONTENT = item.textContent.replaceAll('\\,', ',')
item.CONTENT = item.CONTENT.replaceAll('\\=', '=') item.CONTENT = item.CONTENT.replaceAll('\\=', '=')
item.CONTENT = item.CONTENT.replaceAll('\\\\n', '\n') item.CONTENT = item.CONTENT.replaceAll('\\\\n', '\n')
item.formatStyle = item.verticalAlignment item.formatStyle = item.verticalAlignment
this.contentList.push(item) this.contentList.push(item)
@ -1367,13 +1378,12 @@ export default {
this.submitButton = false this.submitButton = false
}) })
.catch(e => { .catch(e => {
this.$modal.msgWarning("回读失败,请重试"); this.$modal.msgWarning('回读失败,请重试')
this.loading = false this.loading = false
this.submitButton = false this.submitButton = false
}) })
this.deviceId = deviceId this.deviceId = deviceId
// id // id
/*getBoardInfo(deviceId).then(res => { /*getBoardInfo(deviceId).then(res => {
console.log(res, 'getBoardInfo') console.log(res, 'getBoardInfo')
@ -1387,7 +1397,6 @@ export default {
}, },
covering(value) { covering(value) {
if (value.length < 3) { if (value.length < 3) {
value = '0' + value value = '0' + value
return this.covering(value) return this.covering(value)

Loading…
Cancel
Save