|
@ -22,13 +22,13 @@ |
|
|
<div v-if="item.list.length > 0"> |
|
|
<div v-if="item.list.length > 0"> |
|
|
<!-- <el-checkbox style="width: 100%" :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange">全选 |
|
|
<!-- <el-checkbox style="width: 100%" :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange">全选 |
|
|
</el-checkbox> --> |
|
|
</el-checkbox> --> |
|
|
<el-checkbox-group class="checkbox" v-model="checkedDevices" @change="____onSelctDevices"> |
|
|
<el-checkbox-group class="checkbox" v-model="checkedDeviceIds" :max="2" @change="____onSelectDevices"> |
|
|
<el-checkbox v-for="(itm, index) in item.list" :label="itm.iotDeviceId" :key="index"> |
|
|
<el-checkbox v-for="(itm, index) in item.list" :label="itm.iotDeviceId" :key="index"> |
|
|
<div>{{ itm.deviceName }}</div> |
|
|
<div>{{ itm.deviceName }}</div> |
|
|
<!-- <el-tooltip :content="itm.ip" placement="top"> |
|
|
<!-- <el-tooltip :content="itm.ip" placement="top"> |
|
|
</el-tooltip> --> |
|
|
</el-tooltip> --> |
|
|
<el-tooltip content="回读当前信息" placement="right"> |
|
|
<el-tooltip content="回读当前信息" placement="right"> |
|
|
<el-button class="el-icon-tickets huiduButton" @click.stop.prevent="____onCheckDeviceInfo(itm)" |
|
|
<el-button class="el-icon-tickets huiduButton" @click.stop.prevent="____forkDeviceInfo(itm)" |
|
|
:disabled="submitButton"></el-button> |
|
|
:disabled="submitButton"></el-button> |
|
|
</el-tooltip> |
|
|
</el-tooltip> |
|
|
</el-checkbox> |
|
|
</el-checkbox> |
|
@ -230,7 +230,7 @@ export default { |
|
|
mechanismList: [], //管理机构下拉框 |
|
|
mechanismList: [], //管理机构下拉框 |
|
|
devicessizeList: [], //分辨率下拉框 |
|
|
devicessizeList: [], //分辨率下拉框 |
|
|
deviceList: [], //分辨率 |
|
|
deviceList: [], //分辨率 |
|
|
checkedDevices: [], //多选 选中项 |
|
|
checkedDeviceIds: [], //多选 选中项 |
|
|
templateAvailable: [], |
|
|
templateAvailable: [], |
|
|
form: { |
|
|
form: { |
|
|
selectedDirection: "", |
|
|
selectedDirection: "", |
|
@ -388,12 +388,12 @@ export default { |
|
|
if (!this.selectedSize) { |
|
|
if (!this.selectedSize) { |
|
|
this.selectedSize = item.otherConfig.screenSize; |
|
|
this.selectedSize = item.otherConfig.screenSize; |
|
|
} |
|
|
} |
|
|
if (!this.selectedDevice.deviceName) { |
|
|
// if (!this.selectedDevice.deviceName) { |
|
|
this.selectedDevice = item; |
|
|
// this.selectedDevice = item; |
|
|
} |
|
|
// } |
|
|
}) |
|
|
}) |
|
|
this.____onChangeSize(); |
|
|
this.____onChangeSize(); |
|
|
this.____getDeviceInfo(); |
|
|
// this.____getDeviceInfo(); |
|
|
|
|
|
|
|
|
}else{ |
|
|
}else{ |
|
|
getBoardList(param).then((res) => { |
|
|
getBoardList(param).then((res) => { |
|
@ -405,13 +405,11 @@ export default { |
|
|
if (!this.selectedSize) { |
|
|
if (!this.selectedSize) { |
|
|
this.selectedSize = item.otherConfig.screenSize; |
|
|
this.selectedSize = item.otherConfig.screenSize; |
|
|
} |
|
|
} |
|
|
if (!this.selectedDevice.deviceName) { |
|
|
// if (!this.selectedDevice.deviceName) { |
|
|
this.selectedDevice = item; |
|
|
// this.selectedDevice = item; |
|
|
} |
|
|
// } |
|
|
}) |
|
|
}) |
|
|
this.____onChangeSize(); |
|
|
this.____onChangeSize(); |
|
|
this.____getDeviceInfo(); |
|
|
|
|
|
// this.$forceUpdate(); |
|
|
|
|
|
// this.____onChangeSize(this.boardSizeDic[0].selectedPixel); |
|
|
// this.____onChangeSize(this.boardSizeDic[0].selectedPixel); |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
@ -438,6 +436,27 @@ export default { |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
____forkDeviceInfo(deviceFrom) { //从目标设备取得信息 |
|
|
|
|
|
|
|
|
|
|
|
if (IS_TESTING) { |
|
|
|
|
|
|
|
|
|
|
|
this.selectedBdMsg = _.cloneDeep(testDeviceInfo.data["3A"].content); |
|
|
|
|
|
|
|
|
|
|
|
} else{ |
|
|
|
|
|
|
|
|
|
|
|
if (!deviceFrom.iotDeviceId) { |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
getBoardDeviceInfo(deviceFrom.iotDeviceId).then(res => { |
|
|
|
|
|
this.selectedBdMsg = res.data["3A"].content; |
|
|
|
|
|
}).catch(err => { |
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
____onAddTemplate() { |
|
|
____onAddTemplate() { |
|
|
this.editDialog = { |
|
|
this.editDialog = { |
|
@ -468,12 +487,18 @@ export default { |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
____onAddDeviceItem() { |
|
|
____onAddDeviceItem() { |
|
|
|
|
|
|
|
|
|
|
|
let arr = this.selectedSize.split("*"); |
|
|
this.editDialog = { |
|
|
this.editDialog = { |
|
|
visible: true, |
|
|
visible: true, |
|
|
mode: "add", |
|
|
mode: "add", |
|
|
type: "device", |
|
|
type: "device", |
|
|
tpl: { |
|
|
tpl: { |
|
|
"textContent": "" |
|
|
"textContent": "", |
|
|
|
|
|
origin: { |
|
|
|
|
|
displayAreaWidth: +arr[0], |
|
|
|
|
|
displayAreaHeight: +arr[1] |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
@ -507,7 +532,7 @@ export default { |
|
|
// 新增待下发 |
|
|
// 新增待下发 |
|
|
____onAddToDevice(item) { |
|
|
____onAddToDevice(item) { |
|
|
|
|
|
|
|
|
// if(this.checkedDevices.length<=0){ |
|
|
// if(this.checkedDeviceIds.length<=0){ |
|
|
// this.$message.warning('未选择设备!'); |
|
|
// this.$message.warning('未选择设备!'); |
|
|
// return; |
|
|
// return; |
|
|
// } |
|
|
// } |
|
@ -634,12 +659,16 @@ export default { |
|
|
____onDeleteBoardItem(index) { |
|
|
____onDeleteBoardItem(index) { |
|
|
if (index > -1) { |
|
|
if (index > -1) { |
|
|
this.selectedBdMsg.splice(index, 1) |
|
|
this.selectedBdMsg.splice(index, 1) |
|
|
this.$message.success('删除成功,发布后才能生效。') |
|
|
this.$message.success('删除成功,发布后生效。') |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 发布信息 |
|
|
// 发布信息 |
|
|
____publishInfo() { |
|
|
____publishInfo() { |
|
|
|
|
|
if(!this.selectedDevice.iotDeviceId){ |
|
|
|
|
|
this.$message.warning("请选择设备!"); |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
this.$confirm('是否确定发布情报板?', '提示', { |
|
|
this.$confirm('是否确定发布情报板?', '提示', { |
|
|
confirmButtonText: '确定', |
|
|
confirmButtonText: '确定', |
|
|
cancelButtonText: '取消', |
|
|
cancelButtonText: '取消', |
|
@ -656,7 +685,6 @@ export default { |
|
|
let content = []; |
|
|
let content = []; |
|
|
|
|
|
|
|
|
this.selectedBdMsg.forEach(item=>{ |
|
|
this.selectedBdMsg.forEach(item=>{ |
|
|
console.log(item.font) |
|
|
|
|
|
|
|
|
|
|
|
content.push({ |
|
|
content.push({ |
|
|
STAY :item.playbackDuration, |
|
|
STAY :item.playbackDuration, |
|
@ -665,7 +693,7 @@ export default { |
|
|
COLOR :item.foregroundColor, |
|
|
COLOR :item.foregroundColor, |
|
|
FONT : item.font, |
|
|
FONT : item.font, |
|
|
FONT_SIZE : item.fontSize, |
|
|
FONT_SIZE : item.fontSize, |
|
|
CONTENT :item.textContent.replaceAll('\\', '').replaceAll(',', '\\,').replaceAll('=', '\\=').replaceAll('\n', '\\\\n'), |
|
|
CONTENT :item.textContent.replaceAll(',', '\\,').replaceAll('=', '\\=').replaceAll('\n', '\\\\n'), |
|
|
width : item.displayAreaWidth, |
|
|
width : item.displayAreaWidth, |
|
|
height : item.displayAreaHeight, |
|
|
height : item.displayAreaHeight, |
|
|
formatStyle : item.verticalAlignment |
|
|
formatStyle : item.verticalAlignment |
|
@ -709,20 +737,29 @@ export default { |
|
|
|
|
|
|
|
|
// 全选 |
|
|
// 全选 |
|
|
handleCheckAllChange(val) { |
|
|
handleCheckAllChange(val) { |
|
|
this.checkedDevices = val ? this.deviceList : [] |
|
|
this.checkedDeviceIds = val ? this.deviceList : [] |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 多选 |
|
|
// 多选 |
|
|
____onSelctDevices(arr){ |
|
|
____onSelectDevices(arr){ |
|
|
console.log(arr , "<<< 已选设备"); |
|
|
if(arr.length == 0){ |
|
|
|
|
|
this.selectedDevice = {} |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
this.checkedDeviceIds = [arr.pop()]; |
|
|
|
|
|
if(!this.checkedDeviceIds[0]){ |
|
|
|
|
|
this.$message.warning('该设备缺少iotDeviceId参数!'); |
|
|
|
|
|
} |
|
|
|
|
|
this.selectedDevice = _.find(this.boardSizeDic[this.selectedSize].list , {iotDeviceId : this.checkedDeviceIds[0]}); |
|
|
|
|
|
this.____forkDeviceInfo(this.selectedDevice); |
|
|
}, |
|
|
}, |
|
|
____onCheckDeviceInfo(item) { |
|
|
// ____onCheckDeviceInfo(item) { |
|
|
// this.selectedDevice = _.find(this.boardSizeDic[this.selectedSize].list, { iotDeviceId: value[0] }); |
|
|
// this.selectedDevice = _.find(this.boardSizeDic[this.selectedSize].list, { iotDeviceId: value[0] }); |
|
|
this.selectedDevice = item; |
|
|
// this.selectedDevice = item; |
|
|
// this.selectedDevice = this.deviceList |
|
|
// this.selectedDevice = this.deviceList |
|
|
this.____getDeviceInfo(); |
|
|
// this.____forkDeviceInfo(); |
|
|
|
|
|
|
|
|
// this.checkedDevices = value |
|
|
// this.checkedDeviceIds = value |
|
|
// let val = JSON.parse(JSON.stringify(value)) |
|
|
// let val = JSON.parse(JSON.stringify(value)) |
|
|
// for (let itm of this.deviceList) { |
|
|
// for (let itm of this.deviceList) { |
|
|
// if (val.indexOf(itm) > -1) { |
|
|
// if (val.indexOf(itm) > -1) { |
|
@ -733,17 +770,17 @@ export default { |
|
|
// } |
|
|
// } |
|
|
// } |
|
|
// } |
|
|
// this.$forceUpdate() |
|
|
// this.$forceUpdate() |
|
|
}, |
|
|
// }, |
|
|
// 情报板列表手风琴 |
|
|
// 情报板列表手风琴 |
|
|
____onChangeSize(val) { |
|
|
____onChangeSize(val) { |
|
|
this.____setAvailableTemplate(); |
|
|
this.____setAvailableTemplate(); |
|
|
this.checkedDevices = []; |
|
|
this.checkedDeviceIds = []; |
|
|
this.selectedDevice = []; |
|
|
this.selectedDevice = {}; |
|
|
this.selectedBdMsg = []; |
|
|
this.selectedBdMsg = []; |
|
|
// this.contentList = [] |
|
|
// this.contentList = [] |
|
|
// this.deviceList = [] |
|
|
// this.deviceList = [] |
|
|
// this.disabledButton = true |
|
|
// this.disabledButton = true |
|
|
// this.checkedDevices = [] |
|
|
// this.checkedDeviceIds = [] |
|
|
// this.checkAll = false |
|
|
// this.checkAll = false |
|
|
// this.allVmsTemplate() |
|
|
// this.allVmsTemplate() |
|
|
// for (let item of this.boardSizeDic) { |
|
|
// for (let item of this.boardSizeDic) { |
|
@ -756,6 +793,10 @@ export default { |
|
|
// } |
|
|
// } |
|
|
}, |
|
|
}, |
|
|
____setAvailableTemplate() { |
|
|
____setAvailableTemplate() { |
|
|
|
|
|
if(!this.selectedSize){ |
|
|
|
|
|
this.templateAvailable = []; |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
this.templateAvailable = []; |
|
|
this.templateAvailable = []; |
|
|
this.tplCategory.forEach((item, index) => { |
|
|
this.tplCategory.forEach((item, index) => { |
|
|
let arr = this.templateAll['' + index]; |
|
|
let arr = this.templateAll['' + index]; |
|
|