|
@ -55,7 +55,7 @@ |
|
|
|
|
|
|
|
|
<div class="controlBox"> |
|
|
<div class="controlBox"> |
|
|
<el-button type="primary" @click.native="____onAddDeviceItem()">添加信息</el-button> |
|
|
<el-button type="primary" @click.native="____onAddDeviceItem()">添加信息</el-button> |
|
|
<el-button type="primary" @click="publishInfo" :disabled="contentList.length == 0">发布信息</el-button> |
|
|
<el-button type="primary" @click="publishInfo" :disabled="selectedBdMsg.length == 0">发布信息</el-button> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<div class="partCon"> |
|
|
<div class="partCon"> |
|
@ -477,10 +477,18 @@ export default { |
|
|
|
|
|
|
|
|
// 新增待下发 |
|
|
// 新增待下发 |
|
|
____onAddToDevice(item) { |
|
|
____onAddToDevice(item) { |
|
|
|
|
|
|
|
|
if(this.checkedDevices.length<=0){ |
|
|
if(this.checkedDevices.length<=0){ |
|
|
this.$message.warning('未选择设备!'); |
|
|
this.$message.warning('未选择设备!'); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
let arr = this.selectedSize.split("*"); |
|
|
|
|
|
item.origin = { |
|
|
|
|
|
displayAreaWidth: +arr[0], |
|
|
|
|
|
displayAreaHeight: +arr[1] |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
this.editDialog = { |
|
|
this.editDialog = { |
|
|
visible: true, |
|
|
visible: true, |
|
|
mode: "toDevice", |
|
|
mode: "toDevice", |
|
@ -607,80 +615,57 @@ 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', |
|
|
spinner: 'el-icon-loading', |
|
|
spinner: 'el-icon-loading', |
|
|
background: 'rgba(0, 0, 0, 0.7)' |
|
|
background: 'rgba(0, 0, 0, 0.7)' |
|
|
}) |
|
|
|
|
|
const objAll = {} |
|
|
|
|
|
objAll.deviceIds = this.checkedDevices.toString() |
|
|
|
|
|
let that = this |
|
|
|
|
|
|
|
|
|
|
|
let selectedPixel = this.form.selectedPixel.split('*') |
|
|
|
|
|
let newArr = this.contentList.map(function (item) { |
|
|
|
|
|
let obj = {} |
|
|
|
|
|
|
|
|
|
|
|
obj.STAY = item.STAY |
|
|
|
|
|
obj.ACTION = item.ACTION |
|
|
|
|
|
obj.SPEED = item.SPEED |
|
|
|
|
|
obj.COORDINATE = item.COORDINATE.replace('-', '0') |
|
|
|
|
|
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 = obj.CONTENT.replaceAll('\n', '\\\\n') |
|
|
|
|
|
|
|
|
|
|
|
// obj.CONTENT = obj.CONTENT.replaceAll('=','\=') |
|
|
|
|
|
obj.width = selectedPixel[0] |
|
|
|
|
|
obj.height = selectedPixel[1] |
|
|
|
|
|
obj.formatStyle = item.formatStyle |
|
|
|
|
|
return obj |
|
|
|
|
|
}) |
|
|
|
|
|
objAll.parameters = newArr |
|
|
|
|
|
const param = { |
|
|
|
|
|
objectData: JSON.stringify(objAll) |
|
|
|
|
|
} |
|
|
|
|
|
console.log(newArr, 'newArr') |
|
|
|
|
|
|
|
|
|
|
|
invokedFunction(objAll.deviceIds, 11, { size: '65535', fileName: 'play010.lst' }) |
|
|
|
|
|
.then(res => { |
|
|
|
|
|
console.log('发布消息,校验文件名-------------------------------------') |
|
|
|
|
|
console.log(res) |
|
|
|
|
|
if (res.data.result == '01') { |
|
|
|
|
|
invokedFunction(objAll.deviceIds, 13, { parameters: newArr }) |
|
|
|
|
|
.then(res => { |
|
|
|
|
|
console.log('发布消息,发送文件内容-----------------------------') |
|
|
|
|
|
console.log(res) |
|
|
|
|
|
if (res.data.result == '01') { |
|
|
|
|
|
invokedFunction(objAll.deviceIds, '1B', { fileId: '10' }) |
|
|
|
|
|
.then(res => { |
|
|
|
|
|
console.log('发布消息,播放文件-----------------------------') |
|
|
|
|
|
console.log(res) |
|
|
|
|
|
}) |
|
|
|
|
|
.catch(() => { |
|
|
|
|
|
this.$modal.msgWarning('发布失败,请重试') |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
.catch(() => { |
|
|
|
|
|
this.$modal.msgWarning('发布失败,请重试') |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
.catch(() => { |
|
|
|
|
|
this.$modal.msgWarning('发布失败,请重试') |
|
|
|
|
|
}) |
|
|
|
|
|
loading.close() |
|
|
|
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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, |
|
|
|
|
|
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, |
|
|
|
|
|
|
|
|
|
|
|
// 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, |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
|
|
|
console.log(content, "发布内容"); |
|
|
|
|
|
// publishToBoard({content, deviceId}); |
|
|
|
|
|
|
|
|
|
|
|
loading.close() |
|
|
|
|
|
}) |
|
|
.catch(() => { |
|
|
.catch(() => { |
|
|
this.$message({ |
|
|
this.$message({ |
|
|
type: 'info', |
|
|
type: 'info', |
|
@ -688,6 +673,8 @@ export default { |
|
|
}) |
|
|
}) |
|
|
loading.close() |
|
|
loading.close() |
|
|
}) |
|
|
}) |
|
|
|
|
|
this.updateList() |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 接收子组件form表单 修改 |
|
|
// 接收子组件form表单 修改 |
|
|