Browse Source

消除bug

wangqin
hui 10 months ago
parent
commit
07be434075
  1. 2
      ruoyi-ui/src/main.js
  2. 2
      ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardInfoEditor.vue
  3. 34
      ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardPreview.vue
  4. 4
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/InfoBoard/index.vue
  5. 97
      ruoyi-ui/src/views/JiHeExpressway/pages/service/board/index.vue

2
ruoyi-ui/src/main.js

@ -78,7 +78,7 @@ Vue.filter('dateformat', function (dataStr, pattern = 'YYY-MM-DD HH:mm:ss') {
window.IS_TESTING = false;
if (process.env.NODE_ENV == 'development'){
window.IS_TESTING = true;
window.IS_TESTING = false;
}
// 全局方法挂载

2
ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardInfoEditor.vue

@ -323,7 +323,7 @@ export default {
fontColor: this.colorList[0].dictValue,
fontSize: this.fontSizeList[0].dictValue,
fontType: this.fontTypeList[0].dictValue,
stopTime: 5,
stopTime: 50,
inScreenMode: this.inScreenModeList[0].dictValue,
screenSize: this.screenSize
}

34
ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardPreview.vue

@ -26,39 +26,6 @@ export default {
default: "300*200"
},
tpl: {
// {
// "backgroundColor": "00000000",
// "displayAreaHeight": "120",
// "displayAreaWidth": "768",
// "flashingFrequency": "5", //
// "flickerSpeed": "0", //
// "font": "",
// "fontSize": "14",
// "fontSpacing": "4",
// "fontStyle": "0",
// "foregroundColor": "ffff00",
// "horizontalAlignment": "2",
// "intonation": "0",
// "lineSpacing": "0",
// "playSpecialEffects": "0",
// "playbackCount": "1",
// "playbackDuration": "50",
// "residenceTime": "18", //
// "screenEntryMethod": "1", //
// "screenEntrySpeed": "1", //
// "screenOutputMethod": "1", //
// "setUpTheSpeaker": "0",
// "specialEffectsSpeed": "1",
// "speechSpeed": "0",
// "textContent": "100km/h",
// "verticalAlignment": "2",
// "volume": "0",
// "whetherToPlayText": "0",
// "whetherToSynchronizePlayback": "0",
// "xCoordinate": "0",
// "yCoordinate": "0"
// }
type: Object,
default: {}
},
@ -108,7 +75,6 @@ export default {
} else {
fontSize = this.tpl.fontSize;
}
fontSize = fontSize * scale;
this.boardTxtStyle = {
"color": "#" + this.tpl.foregroundColor,
"font-size": `${fontSize*scale}px`,

4
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/InfoBoard/index.vue

@ -412,7 +412,7 @@ export default {
____onDeleteBoardItem(index) {
if (index > -1) {
this.selectedBdMsg.splice(index, 1)
this.$message.success('删除成功,发布后才能生效。')
this.$message.success('删除成功,发布后才效。')
}
},
@ -619,7 +619,7 @@ export default {
COLOR: item.foregroundColor,
FONT: item.font,
FONT_SIZE: item.fontSize,
CONTENT: item.textContent.replaceAll('\\', '').replaceAll(',', '\\,').replaceAll('=', '\\=').replaceAll('\n', '\\\\n'),
CONTENT: item.textContent.replaceAll(',', '\\,').replaceAll('=', '\\=').replaceAll('\n', '\\\\n'),
width: item.displayAreaWidth,
height: item.displayAreaHeight,
formatStyle: item.verticalAlignment

97
ruoyi-ui/src/views/JiHeExpressway/pages/service/board/index.vue

@ -22,13 +22,13 @@
<div v-if="item.list.length > 0">
<!-- <el-checkbox style="width: 100%" :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange">全选
</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">
<div>{{ itm.deviceName }}</div>
<!-- <el-tooltip :content="itm.ip" placement="top">
</el-tooltip> -->
<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>
</el-tooltip>
</el-checkbox>
@ -230,7 +230,7 @@ export default {
mechanismList: [], //
devicessizeList: [], //
deviceList: [], //
checkedDevices: [], //
checkedDeviceIds: [], //
templateAvailable: [],
form: {
selectedDirection: "",
@ -388,12 +388,12 @@ export default {
if (!this.selectedSize) {
this.selectedSize = item.otherConfig.screenSize;
}
if (!this.selectedDevice.deviceName) {
this.selectedDevice = item;
}
// if (!this.selectedDevice.deviceName) {
// this.selectedDevice = item;
// }
})
this.____onChangeSize();
this.____getDeviceInfo();
// this.____getDeviceInfo();
}else{
getBoardList(param).then((res) => {
@ -405,13 +405,11 @@ export default {
if (!this.selectedSize) {
this.selectedSize = item.otherConfig.screenSize;
}
if (!this.selectedDevice.deviceName) {
this.selectedDevice = item;
}
// if (!this.selectedDevice.deviceName) {
// this.selectedDevice = item;
// }
})
this.____onChangeSize();
this.____getDeviceInfo();
// this.$forceUpdate();
// 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() {
this.editDialog = {
@ -468,12 +487,18 @@ export default {
}
},
____onAddDeviceItem() {
let arr = this.selectedSize.split("*");
this.editDialog = {
visible: true,
mode: "add",
type: "device",
tpl: {
"textContent": ""
"textContent": "",
origin: {
displayAreaWidth: +arr[0],
displayAreaHeight: +arr[1]
}
}
}
},
@ -507,7 +532,7 @@ export default {
//
____onAddToDevice(item) {
// if(this.checkedDevices.length<=0){
// if(this.checkedDeviceIds.length<=0){
// this.$message.warning('!');
// return;
// }
@ -634,12 +659,16 @@ export default {
____onDeleteBoardItem(index) {
if (index > -1) {
this.selectedBdMsg.splice(index, 1)
this.$message.success('删除成功,发布后才能生效。')
this.$message.success('删除成功,发布后生效。')
}
},
//
____publishInfo() {
if(!this.selectedDevice.iotDeviceId){
this.$message.warning("请选择设备!");
return
}
this.$confirm('是否确定发布情报板?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
@ -656,7 +685,6 @@ export default {
let content = [];
this.selectedBdMsg.forEach(item=>{
console.log(item.font)
content.push({
STAY :item.playbackDuration,
@ -665,7 +693,7 @@ export default {
COLOR :item.foregroundColor,
FONT : item.font,
FONT_SIZE : item.fontSize,
CONTENT :item.textContent.replaceAll('\\', '').replaceAll(',', '\\,').replaceAll('=', '\\=').replaceAll('\n', '\\\\n'),
CONTENT :item.textContent.replaceAll(',', '\\,').replaceAll('=', '\\=').replaceAll('\n', '\\\\n'),
width : item.displayAreaWidth,
height : item.displayAreaHeight,
formatStyle : item.verticalAlignment
@ -709,20 +737,29 @@ export default {
//
handleCheckAllChange(val) {
this.checkedDevices = val ? this.deviceList : []
this.checkedDeviceIds = val ? this.deviceList : []
},
//
____onSelctDevices(arr){
console.log(arr , "<<< 已选设备");
____onSelectDevices(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 = item;
// this.selectedDevice = item;
// this.selectedDevice = this.deviceList
this.____getDeviceInfo();
// this.____forkDeviceInfo();
// this.checkedDevices = value
// this.checkedDeviceIds = value
// let val = JSON.parse(JSON.stringify(value))
// for (let itm of this.deviceList) {
// if (val.indexOf(itm) > -1) {
@ -733,17 +770,17 @@ export default {
// }
// }
// this.$forceUpdate()
},
// },
//
____onChangeSize(val) {
this.____setAvailableTemplate();
this.checkedDevices = [];
this.selectedDevice = [];
this.checkedDeviceIds = [];
this.selectedDevice = {};
this.selectedBdMsg = [];
// this.contentList = []
// this.deviceList = []
// this.disabledButton = true
// this.checkedDevices = []
// this.checkedDeviceIds = []
// this.checkAll = false
// this.allVmsTemplate()
// for (let item of this.boardSizeDic) {
@ -756,6 +793,10 @@ export default {
// }
},
____setAvailableTemplate() {
if(!this.selectedSize){
this.templateAvailable = [];
return;
}
this.templateAvailable = [];
this.tplCategory.forEach((item, index) => {
let arr = this.templateAll['' + index];

Loading…
Cancel
Save