Browse Source

首页情报板

wangqin
hui 10 months ago
parent
commit
ae4c0a594b
  1. 6
      ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardInfoEditor.vue
  2. 2
      ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardPreview.vue
  3. 43
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/InfoBoard/index.vue
  4. 6
      ruoyi-ui/src/views/JiHeExpressway/utils/infoBoard.js

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

@ -219,7 +219,7 @@ export default {
"setUpTheSpeaker": "0",
"flickerSpeed": "0",
"specialEffectsSpeed": "1",
"fontSize": "64",
"fontSize": "20",
"verticalAlignment": "2",
"speechSpeed": "0",
"font": "3"
@ -322,9 +322,9 @@ export default {
}
}
else{
tempTpl = this.tplDefault;
tempTpl = _.merge(this.tplDefault, this.tpl.origin); //
}
this.dataForm = infoBoardUtils.dialogSourceFormat(tplDefault, this.type);
this.dataForm = infoBoardUtils.dialogSourceFormat(tempTpl, this.type, this.mode);
}else{
this.dataForm = infoBoardUtils.dialogSourceFormat(this.tpl, this.type, this.mode, this.tplDefault);
}

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

@ -71,7 +71,7 @@ export default {
},
tpl:{
handler(newV){
this.contentArr = this.tpl.textContent.replace(/\n|\r\n/g, '&&&&&').replace(/ /g, '&nbsp').split('&&&&&');
this.contentArr = this.tpl.textContent.replace(/\+n|\+r\n/g, '&&&&&').replace(/ /g, '&nbsp').split('&&&&&');
this.setStyle();
},
deep:true,

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

@ -34,17 +34,29 @@
<el-tabs v-model="activeTab" @tab-click="tabClickFn">
<el-tab-pane label="详情信息" name="first">
<div class="show_bottom_tab_box">
<div class="show_bottom_tab_item" v-for="item in tabDataInfoList" :key="item.id">
<div class="show_bottom_tab_item">
<div class="show_bottom_tab_item_l">设备名称</div>
<div class="show_bottom_tab_item_r">{{ device.deviceName }}</div>
</div>
<div class="show_bottom_tab_item">
<div class="show_bottom_tab_item_l">设备桩号</div>
<div class="show_bottom_tab_item_r">{{ device.stakeMarkId }}</div>
</div>
<div class="show_bottom_tab_item">
<div class="show_bottom_tab_item_l">屏幕像素</div>
<div class="show_bottom_tab_item_r">{{ JSON.parse(device.otherConfig).screenSize }}</div>
</div>
<!-- <div class="show_bottom_tab_item" v-for="item in tabDataInfoList" :key="item.id">
<div class="show_bottom_tab_item_l">{{ item.tit }}: </div>
<div class="show_bottom_tab_item_r" :style="{ 'color': item.col }"> {{ item.txt }}</div>
</div>
</div> -->
</div>
</el-tab-pane>
<el-tab-pane label="设备参数" name="second">设备参数</el-tab-pane>
</el-tabs>
</div>
<div class="dialogContent_bottom_btn">
<div class="show_bottom_btn_add" @click="addMoDataInfoFn(2, 2)">添加信息</div>
<div class="show_bottom_btn_add" @click="____onAddDeviceItem">添加信息</div>
<div class="show_bottom_btn_del" @click="InformationReleaseFn">信息发布</div>
</div>
<div class="sideSwitch" @click="showSidePanel">
@ -405,18 +417,34 @@ export default {
//
____onAddToDevice(item) {
let arr = this.selectedSize.split("*");
item.origin = {
displayAreaWidth: +arr[0],
displayAreaHeight: +arr[1]
}
this.editDialog = {
visible: true,
mode: "toDevice",
type: "template",
tpl: item,
origin: {
displayAreaWidth: +arr[0],
displayAreaHeight: +arr[1]
}
}
},
____onAddDeviceItem() {
let arr = this.selectedSize.split("*");
this.editDialog = {
visible: true,
mode: "add",
type: "device",
tpl: {
"textContent": "",
origin : {
displayAreaWidth: +arr[0],
displayAreaHeight: +arr[1]
}
}
}
},
@ -551,6 +579,7 @@ export default {
type: 'warning'
})
.then(() => {
return ;
let loading = this.$loading({
lock: true,
text: 'Loading',

6
ruoyi-ui/src/views/JiHeExpressway/utils/infoBoard.js

@ -31,10 +31,12 @@ export default {
data1 = _.cloneDeep(data);
data1.stopTime = data1.stopTime*0.1
if(mode=="toDevice"){
data.origin = tplDefault;
// data.origin = tplDefault;
data.origin = _.merge(tplDefault, data.origin);
}
}
else{
console.log(data.origin , "fdsgfhgjdfss")
data1 = {
formatStyle: data.horizontalAlignment,
content: data.textContent,
@ -44,7 +46,7 @@ export default {
fontFamily: data.font,
stopTime: data.residenceTime,
inScreenMode: data.screenEntryMethod,
origin: data
origin: data
}
}
return data1

Loading…
Cancel
Save