Browse Source

情报板接口

wangqin
lau572 1 year ago
parent
commit
67a3a2c552
  1. 9
      ruoyi-ui/src/api/board/board.js
  2. 4
      ruoyi-ui/src/views/information/board/addinfo.vue
  3. 4
      ruoyi-ui/src/views/information/board/editInfo.vue
  4. 68
      ruoyi-ui/src/views/information/board/index.vue

9
ruoyi-ui/src/api/board/board.js

@ -1 +1,10 @@
import request from '@/utils/request'
// 查询设备列列表
export function getBoardList(query) {
return request({
url: '/iot/board/list',
method: 'get',
params: query
})
}

4
ruoyi-ui/src/views/information/board/addinfo.vue

@ -149,7 +149,7 @@ import { checkIotBoardContent } from '@/api/board/vocabulary'
export default {
data() {
return {
radio1: '0',
radio1: '2',
alignmentNum: 2,
content: '',
boardWidth: '',
@ -661,7 +661,6 @@ export default {
width: ''
}
const templateContent = []
debugger
templateContent.push({
content: this.dataForm.CONTENT,
coordinate: this.dataForm.COORDINATE,
@ -812,7 +811,6 @@ export default {
var textLeft = this.addZero(textBoard2[0].offsetLeft)
var textTop = this.addZero(textBoard2[0].offsetTop)
this.dataForm.COORDINATE = textLeft + textTop
debugger
if (alignmentNum != undefined) {
this.dataForm.formatStyle = alignmentNum
}

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

@ -267,7 +267,8 @@ export default {
CONTENT: '',
STAY: '',
FONT: '',
COORDINATE: ''
COORDINATE: '',
formatStyle:'',
// id: "",
// screenSize: "400*40", //
@ -471,6 +472,7 @@ export default {
if (this.boardEmitItem) {
this.boardWidth = this.boardEmitItem.screenSize.split('*')[0]
this.boardHeight = this.boardEmitItem.screenSize.split('*')[1]
this.radio1 = this.boardEmitItem.formatStyle
this.init()
}
},

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

@ -234,6 +234,7 @@ import { getUserDeptId } from '@/api/system/user'
import { listTunnels, devicessize, information, getBoardInfo, getBoardEditInfo, getIotBoardList, 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 } from '@/api/board/board'
//
export const deepClone = data => {
@ -332,6 +333,7 @@ export default {
created() {
this.getInfoMode()
this.changeDirection()
this.getBoardPixel()
},
mounted() {
// this.rowDrop();
@ -339,6 +341,19 @@ export default {
},
methods: {
//
getBoardPixel() {
this.iotBoardList = []
this.getDicts('iot_board_pixel').then(res => {
res.data.forEach(item =>{
this.iotBoardList.push({
devicePixel: item.dictValue,
label: item.dictLabel,
list: []
})
})
})
},
//
getInfoMode() {
this.getDicts('iot_template_category').then(res => {
@ -381,7 +396,7 @@ export default {
this.checkAll = false
//TODO
let testData = [
/* let testData = [
{
devicePixel: '768*64',
label: '门架板768*64',
@ -702,7 +717,7 @@ export default {
devicePixel: '480*48',
label: '雨棚480*48',
list: [
/*{
/!*{
searchValue: null,
createBy: null,
createTime: null,
@ -763,14 +778,14 @@ export default {
lAlarmHandleStr: null,
eqDirection: null,
iotDeviceType: null
}*/
}*!/
]
},
{
devicePixel: '192*160',
label: ' 悬臂192*160',
list: [
/*{
/!*{
searchValue: null,
createBy: null,
createTime: null,
@ -831,7 +846,7 @@ export default {
lAlarmHandleStr: null,
eqDirection: null,
iotDeviceType: null
}*/
}*!/
]
},
{
@ -910,25 +925,30 @@ export default {
} else {
this.getInfoMode()
}
this.$forceUpdate()
this.$forceUpdate()*/
// TODO
/*let param = {
eqDirection: this.form.eqDirection,
tunnelId: this.form.tunnel,
manageAgencyId: this.form.deptId,
};
getIotBoardList(param).then((res) => {
console.log(res, "查询情报板设备列表");
this.iotBoardList = res.data;
if (res.data.length > 0) {
this.iotBoardActive = res.data[0].devicePixel;
this.handleChange(res.data[0].devicePixel);
} else {
this.getInfoMode();
}
this.$forceUpdate();
});*/
let param = {
direction: this.form.eqDirection,
};
getBoardList(param).then((res) => {
console.log(res, "查询情报板设备列表");
if (res.length > 0) {
this.iotBoardList.forEach(item => {
item.list = []
res.forEach(board =>{
if (item.devicePixel == board.sceenSize){
item.list.push(board)
}
})
})
this.iotBoardActive = this.iotBoardList[0].devicePixel;
this.handleChange(this.iotBoardList[0].devicePixel);
} else {
this.getInfoMode();
}
this.$forceUpdate();
});
},
//
@ -1182,19 +1202,16 @@ export default {
invokedFunction(objAll.deviceIds, 11, { size: '65535', fileName: 'play010.lst' })
.then(res => {
debugger
console.log('发布消息,校验文件名-------------------------------------')
console.log(res)
if (res.data.result == '01') {
invokedFunction(objAll.deviceIds, 13, { parameters: newArr })
.then(res => {
debugger
console.log('发布消息,发送文件内容-----------------------------')
console.log(res)
if (res.data.result == '01') {
invokedFunction(objAll.deviceIds, '1B', { fileId: '10' })
.then(res => {
debugger
console.log('发布消息,播放文件-----------------------------')
console.log(res)
})
@ -1350,7 +1367,6 @@ export default {
if ('3A' in res.data) {
console.log('回读消息------------------------')
console.log(res.data)
debugger
var contents = res.data['3A'].content
for (let i = 0; i < contents.length; i++) {
let item = contents[i]

Loading…
Cancel
Save