diff --git a/ruoyi-ui/src/api/board/board.js b/ruoyi-ui/src/api/board/board.js
index 543ea86b..98024eb7 100644
--- a/ruoyi-ui/src/api/board/board.js
+++ b/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
+ })
+}
diff --git a/ruoyi-ui/src/views/information/board/addinfo.vue b/ruoyi-ui/src/views/information/board/addinfo.vue
index dc968de2..7adc2eef 100644
--- a/ruoyi-ui/src/views/information/board/addinfo.vue
+++ b/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
}
@@ -889,7 +887,7 @@ export default {
justify-content: left;
}
.boardTextStyle {
- /*line-height: 1;*/
+ line-height: 1;
caret-color: rgba(0, 0, 0, 0);
user-select: none;
position: absolute;
diff --git a/ruoyi-ui/src/views/information/board/editInfo.vue b/ruoyi-ui/src/views/information/board/editInfo.vue
index ca98c2a4..9c2f25bc 100644
--- a/ruoyi-ui/src/views/information/board/editInfo.vue
+++ b/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()
}
},
@@ -769,7 +771,7 @@ export default {
})*/
},
getFontStyle(font) {
- if (font == '宋体') {
+ if (font == '宋体' || font == '3') {
return 'Simsun'
} else if (font == '黑体' || font == '1') {
return 'SimHei'
@@ -879,7 +881,7 @@ export default {
padding: 10px 0;
}
.boardTextStyle {
- /*line-height: 1;*/
+ line-height: 1;
caret-color: rgba(0, 0, 0, 0);
user-select: none;
position: absolute;
diff --git a/ruoyi-ui/src/views/information/board/index.vue b/ruoyi-ui/src/views/information/board/index.vue
index c902ad85..af4e24ab 100644
--- a/ruoyi-ui/src/views/information/board/index.vue
+++ b/ruoyi-ui/src/views/information/board/index.vue
@@ -30,7 +30,7 @@
-
+
{{ itm.deviceName }}
@@ -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,33 @@ 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);
+ let param = {
+ direction: this.form.eqDirection,
+ };
+ getBoardList(param).then((res) => {
+ console.log(res, "查询情报板设备列表");
+ this.iotBoardList.forEach(item => {
+ item.list = []
+ if (res.length > 0) {
+ 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();
- });*/
+ })
+
+
+ this.$forceUpdate();
+ });
},
// 板子分辨率换算
@@ -1182,19 +1205,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 +1370,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]
@@ -1859,7 +1878,7 @@ export default {
.boardTextStyle {
position: absolute;
- /*line-height: 1;*/
+ line-height: 1;
caret-color: rgba(0, 0, 0, 0);
user-select: none;
white-space: normal;