Browse Source

首页情报板

wangqin
hui 11 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. 35
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/InfoBoard/index.vue
  4. 4
      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", "setUpTheSpeaker": "0",
"flickerSpeed": "0", "flickerSpeed": "0",
"specialEffectsSpeed": "1", "specialEffectsSpeed": "1",
"fontSize": "64", "fontSize": "20",
"verticalAlignment": "2", "verticalAlignment": "2",
"speechSpeed": "0", "speechSpeed": "0",
"font": "3" "font": "3"
@ -322,9 +322,9 @@ export default {
} }
} }
else{ 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{ }else{
this.dataForm = infoBoardUtils.dialogSourceFormat(this.tpl, this.type, this.mode, this.tplDefault); 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:{ tpl:{
handler(newV){ 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(); this.setStyle();
}, },
deep:true, deep:true,

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

@ -34,17 +34,29 @@
<el-tabs v-model="activeTab" @tab-click="tabClickFn"> <el-tabs v-model="activeTab" @tab-click="tabClickFn">
<el-tab-pane label="详情信息" name="first"> <el-tab-pane label="详情信息" name="first">
<div class="show_bottom_tab_box"> <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_l">{{ item.tit }}: </div>
<div class="show_bottom_tab_item_r" :style="{ 'color': item.col }"> {{ item.txt }}</div> <div class="show_bottom_tab_item_r" :style="{ 'color': item.col }"> {{ item.txt }}</div>
</div> </div> -->
</div> </div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="设备参数" name="second">设备参数</el-tab-pane> <el-tab-pane label="设备参数" name="second">设备参数</el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
<div class="dialogContent_bottom_btn"> <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 class="show_bottom_btn_del" @click="InformationReleaseFn">信息发布</div>
</div> </div>
<div class="sideSwitch" @click="showSidePanel"> <div class="sideSwitch" @click="showSidePanel">
@ -405,16 +417,32 @@ export default {
// //
____onAddToDevice(item) { ____onAddToDevice(item) {
let arr = this.selectedSize.split("*"); let arr = this.selectedSize.split("*");
item.origin = {
displayAreaWidth: +arr[0],
displayAreaHeight: +arr[1]
}
this.editDialog = { this.editDialog = {
visible: true, visible: true,
mode: "toDevice", mode: "toDevice",
type: "template", type: "template",
tpl: item, tpl: item,
}
},
____onAddDeviceItem() {
let arr = this.selectedSize.split("*");
this.editDialog = {
visible: true,
mode: "add",
type: "device",
tpl: {
"textContent": "",
origin : { origin : {
displayAreaWidth: +arr[0], displayAreaWidth: +arr[0],
displayAreaHeight: +arr[1] displayAreaHeight: +arr[1]
} }
} }
}
}, },
@ -551,6 +579,7 @@ export default {
type: 'warning' type: 'warning'
}) })
.then(() => { .then(() => {
return ;
let loading = this.$loading({ let loading = this.$loading({
lock: true, lock: true,
text: 'Loading', text: 'Loading',

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

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

Loading…
Cancel
Save