Browse Source

Merge branch 'develop' of http://39.106.31.193:9211/mengff/jihe-hs into develop

* 'develop' of http://39.106.31.193:9211/mengff/jihe-hs:
  更新
wangqin
Joe 1 year ago
parent
commit
291d79f9c2
  1. BIN
      .DS_Store
  2. 86
      ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardInfoEditor.vue
  3. 0
      ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardPreview.vue
  4. 0
      ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardTplPreview.vue
  5. 302
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/InfoBoard/index.vue
  6. 26
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/index.vue
  7. 124
      ruoyi-ui/src/views/JiHeExpressway/pages/service/board/index.vue
  8. 9
      ruoyi-ui/src/views/JiHeExpressway/utils/infoBoard.js

BIN
.DS_Store

Binary file not shown.

86
ruoyi-ui/src/views/JiHeExpressway/pages/service/board/BoardInfoEditor.vue → ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardInfoEditor.vue

@ -99,8 +99,8 @@
import { getTemplateList, addTemplate, addTemplateContent, editTemplateContent, editTemplate, deleteTemplate, getTemplateContent, getGalleryList, getFontSizeByDevicePixel, uploadBoardEditInfo } from '@/api/board/template' import { getTemplateList, addTemplate, addTemplateContent, editTemplateContent, editTemplate, deleteTemplate, getTemplateContent, getGalleryList, getFontSizeByDevicePixel, uploadBoardEditInfo } from '@/api/board/template'
import { devicessize } from '@/api/information/api.js' import { devicessize } from '@/api/information/api.js'
import { checkIotBoardContent } from '@/api/board/vocabulary' import { checkIotBoardContent } from '@/api/board/vocabulary'
import BoardPreview from "./BoardPreview.vue" import BoardPreview from "@screen/components/infoBoard/BoardPreview.vue"
import BoardTplPreview from "./BoardTplPreview.vue" import BoardTplPreview from "@screen/components/infoBoard/BoardTplPreview.vue"
import infoBoardUtils from "@screen/utils/infoBoard.js" import infoBoardUtils from "@screen/utils/infoBoard.js"
export default { export default {
data() { data() {
@ -191,7 +191,39 @@ export default {
templateCategoryList: [], templateCategoryList: [],
infoType: '', infoType: '',
devicePixelBoolean: false, devicePixelBoolean: false,
categoryRules: false categoryRules: false,
tplDefault: {
"residenceTime": "50",
"intonation": "0",
"fontSpacing": "1",
"screenEntryMethod": "1",
"screenOutputMethod": "1",
"lineSpacing": "0",
"yCoordinate": "0",
"whetherToSynchronizePlayback": "0",
"whetherToPlayText": "0",
"playbackCount": "1",
"flashingFrequency": "5",
"backgroundColor": "8",
"foregroundColor": "FFFF00",
"textContent": "",
"fontStyle": "0",
"displayAreaWidth": "768",
"playbackDuration": "50",
"displayAreaHeight": "64",
"volume": "0",
"xCoordinate": "0",
"screenEntrySpeed": "1",
"horizontalAlignment": "2",
"playSpecialEffects": "0",
"setUpTheSpeaker": "0",
"flickerSpeed": "0",
"specialEffectsSpeed": "1",
"fontSize": "64",
"verticalAlignment": "2",
"speechSpeed": "0",
"font": "3"
}
} }
}, },
props:{ props:{
@ -275,9 +307,9 @@ export default {
// console.log(res.data , "++++++++==========="); // console.log(res.data , "++++++++===========");
// }) // })
if(this.mode=="add"){ if(this.mode=="add"){
let tplDefault= null; let tempTpl= null;
if(this.type=="template"){ if(this.type=="template"){
tplDefault = { tempTpl = {
category: this.templateCategoryList[0].dictValue, category: this.templateCategoryList[0].dictValue,
formatStyle: 0, formatStyle: 0,
content: "", content: "",
@ -290,42 +322,11 @@ export default {
} }
} }
else{ else{
tplDefault = { tempTpl = this.tplDefault;
"residenceTime": "50",
"intonation": "0",
"fontSpacing": "1",
"screenEntryMethod": "1",
"screenOutputMethod": "1",
"lineSpacing": "0",
"yCoordinate": "0",
"whetherToSynchronizePlayback": "0",
"whetherToPlayText": "0",
"playbackCount": "1",
"flashingFrequency": "5",
"backgroundColor": "8",
"foregroundColor": "FFFF00",
"textContent": "",
"fontStyle": "0",
"displayAreaWidth": "768",
"playbackDuration": "50",
"displayAreaHeight": "64",
"volume": "0",
"xCoordinate": "0",
"screenEntrySpeed": "1",
"horizontalAlignment": "2",
"playSpecialEffects": "0",
"setUpTheSpeaker": "0",
"flickerSpeed": "0",
"specialEffectsSpeed": "1",
"fontSize": "64",
"verticalAlignment": "2",
"speechSpeed": "0",
"font": "3"
}
} }
this.dataForm = infoBoardUtils.dialogSourceFormat(tplDefault, this.type); this.dataForm = infoBoardUtils.dialogSourceFormat(tplDefault, this.type);
}else{ }else{
this.dataForm = infoBoardUtils.dialogSourceFormat(this.tpl, this.type); this.dataForm = infoBoardUtils.dialogSourceFormat(this.tpl, this.type, this.mode, this.tplDefault);
} }
}, },
onClose(){ onClose(){
@ -424,7 +425,7 @@ export default {
} }
})*/ })*/
let data = infoBoardUtils.dialogSaveFormat(this.dataForm, this.type); let data = infoBoardUtils.dialogSaveFormat(this.dataForm, this.type, this.mode);
this.loading = true this.loading = true
// let templateId = ""; // let templateId = "";
@ -434,11 +435,16 @@ export default {
editTemplate(data).then(res=>{ editTemplate(data).then(res=>{
afterSave("修改"); afterSave("修改");
}); });
}else{ }else if (this.mode == "toDevice") {
this.loading = false
this.$emit("afterSubmit", { type: this.type, mode: this.mode, data: data });
} else {
addTemplate(data).then(res => { addTemplate(data).then(res => {
afterSave("新增"); afterSave("新增");
}); });
} }
}else{ }else{
this.loading = false this.loading = false
// this.dialogVisible = false // this.dialogVisible = false

0
ruoyi-ui/src/views/JiHeExpressway/pages/service/board/BoardPreview.vue → ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardPreview.vue

0
ruoyi-ui/src/views/JiHeExpressway/pages/service/board/BoardTplPreview.vue → ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardTplPreview.vue

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

@ -9,23 +9,23 @@
<img class="deco" src="@/assets/jihe/images/dialog/ibHeadDeco.png" alt=""> <img class="deco" src="@/assets/jihe/images/dialog/ibHeadDeco.png" alt="">
</div> </div>
<div class="dialogContent"> <div class="dialogContent">
<div v-if="dialogInfoList.length > 0" class="dialogContent_box" style="height: 100%;"> <div v-if="selectedBdMsg.length > 0" class="dialogContent_box" style="height: 100%;">
<div class="dialogContent_box_item" v-for="(item, i) in dialogInfoList" :key="i"> <vuescroll :ops="scrollOptions" class="templateBox">
<div class="dialogContent_l"> <div v-for="(itm, indx) in selectedBdMsg" :key="indx" class="tplItem">
<div class="dialogContent_l_xsq" <!-- 模板内容 -->
:style="boardBoxStyle(item)"> <BoardPreview class="boardPreview" :boardWH="selectedSize" :tpl="itm"></BoardPreview>
<div <!-- 操作按钮 -->
:style="boardConStyle(item)" <div class="infoBtnBox">
v-html="item.tcontents[0].content.replace(/\n|\r\n/g, '<br>').replace( <el-tooltip content="编辑" placement="top">
/ /g, <p @click="____onEditBoardItem(itm, indx)" class="btn btnEdit"></p>
'&nbsp')"></div> </el-tooltip>
</div> <el-tooltip content="删除" placement="top">
</div> <p @click="____onDeleteBoardItem(indx)" class="btn btnDelete"></p>
<div class="dialogContent_r"> </el-tooltip>
<div @click="editOutline(i)" class="show_r_btn dialogContent_r_btn1"></div>
<div @click="delMoFn(i)" class="show_r_btn dialogContent_r_btn2"></div>
</div> </div>
</div> </div>
</vuescroll>
</div> </div>
<div v-else class="dialogContent_box" style="height: 100%;"> <div v-else class="dialogContent_box" style="height: 100%;">
<div class="dialogContent_box_empty">暂无数据</div> <div class="dialogContent_box_empty">暂无数据</div>
@ -64,28 +64,27 @@
<!-- 信息模板 --> <!-- 信息模板 -->
<div v-if="isShowTemplate" class="dialog_info_right"> <div v-if="isShowTemplate" class="dialog_info_right">
<el-collapse v-model="activeNames" @change="panelChangeFn"> <vuescroll :ops="scrollOptions" class="templateBox">
<el-collapse-item v-for="item in templateList" :key="item.dictCode" :title="item.dictLabel" <div v-for="(item, index) in templateAvailable" :key="item.dictValue">
:name="item.dictCode"> <!-- 原来是<el-collapse v-model="activeNames"> -->
<div class="dialog_info_right_show"> <h3>{{ item.dictLabel }}</h3>
<div class="dialogContent_box" style="overflow-y: visible;"> <div v-for="(itm, indx) in item.list" :key="indx" class="tplItem">
<div class="dialogContent_box_item" v-for="item1 in item.mbList" :key="item1.id"> <!-- 模板内容 -->
<div class="dialogContent_l" style="width:16vw;"> <BoardTplPreview class="boardPreview" :boardWH="selectedSize" :tpl="itm"></BoardTplPreview>
<div class="dialogContent_l_xsq" <!-- <div class="infoPreview">
:style="boardBoxStyle(item1)"> <div class="infoBox" :style="____boardBgStyle">
<div <span class="infoTxt" :style="____boardTxtStyle(itm)" v-html="itm.content.replace(/\n|\r\n/g, '<br>').replace(/ /g, '&nbsp')"></span>
:style="boardConStyle(item1)"
v-html="item1.tcontents[0].content.replace(/\n|\r\n/g, '<br>').replace(/ /g, '&nbsp')"></div>
</div> </div>
</div> </div> -->
<div class="dialogContent_r" style="width: 3.5vw;"> <!-- 操作按钮 -->
<div @click="putLeftFn(item1)" class="show_r_btn dialogContent_r_btn3"></div> <div class="infoBtnBox">
</div> <el-tooltip content="加入待下发信息" placement="top">
<p @click="____onAddToDevice(itm)" class="btn btnApply"></p>
</el-tooltip>
</div> </div>
</div> </div>
</div> </div>
</el-collapse-item> </vuescroll>
</el-collapse>
</div> </div>
@ -140,6 +139,10 @@
</div> </div>
</transition> </transition>
<BoardInfoEditor @afterSubmit="____onEditSubmit" :mode="editDialog.mode" :type="editDialog.type"
:visible.sync="editDialog.visible" :screenSize="selectedSize" :tpl="editDialog.tpl"></BoardInfoEditor>
<!-- 情报板弹框中的弹框 --> <!-- 情报板弹框中的弹框 -->
<addBoard ref="addinfo" @addInfo="addInfo" /> <addBoard ref="addinfo" @addInfo="addInfo" />
<editBoard v-if="showEmit" :boardEmitItem="boardEmitItem" @receiveForm="receiveForm" @dialogClose="dialogClose" /> <editBoard v-if="showEmit" :boardEmitItem="boardEmitItem" @receiveForm="receiveForm" @dialogClose="dialogClose" />
@ -151,6 +154,17 @@ import addBoard from './addinfo.vue'
import editBoard from './editInfo.vue' import editBoard from './editInfo.vue'
import { listDevice, invokedFunction, getDeviceRealtimeProperty } from '@/api/device/device.js' import { listDevice, invokedFunction, getDeviceRealtimeProperty } from '@/api/device/device.js'
import infoBoardTestData from "@/common/infoBoardTestData.js" import infoBoardTestData from "@/common/infoBoardTestData.js"
import { getBoardDeviceInfo } from '@/api/board/board'
import BoardPreview from "@screen/components/infoBoard/BoardPreview.vue"
import BoardTplPreview from "@screen/components/infoBoard/BoardTplPreview.vue"
import BoardInfoEditor from '@screen/components/infoBoard/BoardInfoEditor'
import vuescroll from 'vuescroll'
import scrollOptions from '@/common/scrollbar.js'
import { getTemplateList } from '@/api/board/template'
export default { export default {
name: 'InfoBoard', name: 'InfoBoard',
data(){ data(){
@ -246,17 +260,45 @@ export default {
{ id: 5001, txt: '变倍', numL: 11, numR: 12 }, { id: 5001, txt: '变倍', numL: 11, numR: 12 },
{ id: 5002, txt: '光圈', numL: 16, numR: 15 }, { id: 5002, txt: '光圈', numL: 16, numR: 15 },
{ id: 5003, txt: '聚焦', numL: 14, numR: 13 } { id: 5003, txt: '聚焦', numL: 14, numR: 13 }
] ],
showEmit:false,
selectedBdMsg:[],
selectedSize:"",
editDialog: {
mode: "",
type: "",
visible: false,
tpl: {}
},
scrollOptions,
templateAvailable:null,
tplCategory: [], //
templateAll:[]
} }
}, },
props:{ props:{
visible:{ visible:{
type:Boolean, type:Boolean,
default:false default:false
},
device: {
type:Object,
default:null
} }
}, },
components: { addBoard, editBoard }, watch:{
device: {
handler(newV) {
this.____getDeviceInfo();
},
immediate: false
}
},
components: { addBoard, editBoard, BoardPreview, BoardTplPreview, BoardInfoEditor, vuescroll},
created() { created() {
this.____getTemplateCategory();
this.____getAllTemplate();
// this.getTemplateSeries(); // this.getTemplateSeries();
}, },
computed:{ computed:{
@ -276,6 +318,108 @@ export default {
] ]
}, },
methods: { methods: {
//
____getTemplateCategory() {
return this.getDicts('iot_template_category').then(res => {
this.tplCategory = res.data;
})
},
____getAllTemplate() {
return getTemplateList().then((res) => {
this.templateAll = res.data;
});
},
____getDeviceInfo(){
this.selectedSize = JSON.parse(this.device.otherConfig).screenSize;
this.____setAvailableTemplate();
getBoardDeviceInfo(this.device.iotDeviceId).then(res => {
this.selectedBdMsg = res.data["3A"].content;
}).catch(err => {
})
},
____setAvailableTemplate() {
this.templateAvailable = [];
this.tplCategory.forEach((item, index) => {
let arr = this.templateAll['' + index];
if (arr.length > 0) {
let temp = [];
arr.forEach(tpl => {
if (tpl.screenSize == this.selectedSize) {
temp.push(tpl);
}
})
if (temp.length > 0) {
this.templateAvailable.push({
...item,
list: temp
});
}
}
})
},
____onEditBoardItem(tpl, index) {
// type : board template
// mode : edit add toDevice toTemplate
this.boardItemEdtingIndex = index;
this.editDialog = {
visible: true,
mode: "edit",
type: "device",
tpl
}
},
____onDeleteBoardItem(index) {
if (index > -1) {
this.selectedBdMsg.splice(index, 1)
this.$message.success('删除成功,发布后才能生效。')
}
},
____onEditSubmit(para) {
this.editDialog.tpl = {};
this.editDialog.visible = false;
if (para.type == "device") {
if (para.mode == "edit") {
this.selectedBdMsg[this.boardItemEdtingIndex] = para.data;
} else {
this.selectedBdMsg.push(para.data);
}
} else if (para.mode == "toDevice") {
this.selectedBdMsg.push(para.data);
} else {
this.____refreshPageData(para);
}
},
____refreshPageData(para){},
//
____onAddToDevice(item) {
let arr = this.selectedSize.split("*");
this.editDialog = {
visible: true,
mode: "toDevice",
type: "template",
tpl: item,
origin: {
displayAreaWidth: +arr[0],
displayAreaHeight: +arr[1]
}
}
},
boardBoxStyle(node) { boardBoxStyle(node) {
let arr = node.screenSize.split("*"); let arr = node.screenSize.split("*");
let scale = this.getScrollSz(+arr[0]); let scale = this.getScrollSz(+arr[0]);
@ -728,6 +872,94 @@ export default {
</script> </script>
<style lang='scss' scoped> <style lang='scss' scoped>
.templateBox {
width: 100%;
height: 100%;
.tplItem {
margin-right: 14px;
display: flex;
align-items: stretch;
padding-bottom: 10px;
.boardPreview {
border: 2px solid #004c64;
// width: 560px;
// height:80px;
flex: 1;
}
.infoBtnBox {
width: 160px;
height: 80px;
display: flex;
margin-left: 10px;
/* // border: solid 1px #05afe3; */
border: 2px solid #004c64;
display: flex;
justify-content: space-around;
align-items: center;
.btn {
background-repeat: no-repeat;
background-size: 100% 100%;
width: 40px;
height: 40px;
&.btnApply {
background-image: url(~@/assets/jihe/images/button/toLeft.png);
}
&.btnEdit {
background-image: url(~@/assets/jihe/images/button/edit.png);
}
&.btnDelete {
background-image: url(~@/assets/jihe/images/button/delete.png);
}
}
i {
font-size: 24px;
color: #666;
padding-left: 4px;
cursor: pointer;
caret-color: rgba(0, 0, 0, 0);
user-select: none;
}
i:hover {
color: #05afe3;
}
.disabledClass {
pointer-events: none;
cursor: auto !important;
color: #ccc;
}
}
}
.controlBox {
margin-top: 10px;
margin-bottom: 10px;
display: flex;
justify-content: center;
}
.el-collapse {
max-height: 100% !important;
overflow: auto;
border-bottom: none;
border-top: none;
padding: 0 0.5vw;
}
}
.map_dialog { .map_dialog {
width: 510px; width: 510px;
height: 550px; height: 550px;

26
ruoyi-ui/src/views/JiHeExpressway/pages/Home/index.vue

@ -15,7 +15,7 @@
<ConditionStatistics class="content-r card-menu" /> <ConditionStatistics class="content-r card-menu" />
</section> </section>
<InfoBoard :visible.sync="isShowInfoBoard"></InfoBoard> <InfoBoard :visible.sync="isShowInfoBoard" :device="selectedDevice"></InfoBoard>
<footer class="footer card-menu"> <footer class="footer card-menu">
<div class="footer-title"> <div class="footer-title">
@ -51,7 +51,8 @@ export default {
}, },
data() { data() {
return { return {
isShowInfoBoard: false isShowInfoBoard: false,
selectedDevice:null
} }
}, },
provide() { provide() {
@ -78,6 +79,27 @@ export default {
onClickItem(item) { onClickItem(item) {
if (item.title.includes("情报板")) { if (item.title.includes("情报板")) {
this.isShowInfoBoard = true; this.isShowInfoBoard = true;
this.selectedDevice = {
"id": 904,
"iotDeviceId": "81221-65535",
"groupId": null,
"productId": 0,
"stakeMarkId": "k71+600",
"direction": "1",
"deviceName": "大学城入口站前板",
"deviceType": 2,
"installationDate": null,
"productionDate": null,
"durableYears": null,
"installationSite": null,
"useState": null,
"otherConfig": "{\"screenSize\":\"160*80\"}",
"remark": null,
"createTime": "2024-01-17T22:50:56.000+08:00",
"updateTime": null,
"longitude": null,
"latitude": null
}
} }
} }
} }

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

@ -10,8 +10,7 @@
</div> </div>
<el-form ref="form" :model="form" class="partCon"> <el-form ref="form" :model="form" class="partCon">
<el-form-item style="margin-bottom: 12px;"> <el-form-item style="margin-bottom: 12px;">
<el-select v-model="form.selectedDirection" size="medium" placeholder="请选择方向" <el-select v-model="form.selectedDirection" size="medium" placeholder="请选择方向" class="direction">
style="overflow: hidden;width: 100%;">
<el-option v-for="item in boardDirectionList" :key="item.dictValue" :label="item.dictLabel" <el-option v-for="item in boardDirectionList" :key="item.dictValue" :label="item.dictLabel"
:value="item.dictValue" @click.native="____changeDirection(item.dictValue)" /> :value="item.dictValue" @click.native="____changeDirection(item.dictValue)" />
</el-select> </el-select>
@ -23,13 +22,13 @@
<div v-if="item.list.length > 0"> <div v-if="item.list.length > 0">
<!-- <el-checkbox style="width: 100%" :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange">全选 <!-- <el-checkbox style="width: 100%" :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange">全选
</el-checkbox> --> </el-checkbox> -->
<el-checkbox-group class="checkbox" v-model="checkedCities" @change="onSelectDevice" :max="1"> <el-checkbox-group class="checkbox" v-model="checkedDevices" @change="____onSelctDevices">
<el-checkbox v-for="(itm, index) in item.list" :label="itm.iotDeviceId" :key="index"> <el-checkbox v-for="(itm, index) in item.list" :label="itm.iotDeviceId" :key="index">
<el-tooltip :content="itm.ip" placement="top"> <div>{{ itm.deviceName }}</div>
<div>{{ itm.deviceName }}</div> <!-- <el-tooltip :content="itm.ip" placement="top">
</el-tooltip> </el-tooltip> -->
<el-tooltip content="回读当前信息" placement="top"> <el-tooltip content="回读当前信息" placement="right">
<el-button class="el-icon-tickets huiduButton" @click.stop.prevent="onSubmit(itm.id)" <el-button class="el-icon-tickets huiduButton" @click.stop.prevent="____onCheckDeviceInfo(itm)"
:disabled="submitButton"></el-button> :disabled="submitButton"></el-button>
</el-tooltip> </el-tooltip>
</el-checkbox> </el-checkbox>
@ -110,7 +109,7 @@
<!-- 操作按钮 --> <!-- 操作按钮 -->
<div class="infoBtnBox"> <div class="infoBtnBox">
<el-tooltip content="加入待下发信息" placement="top"> <el-tooltip content="加入待下发信息" placement="top">
<p @click="arrowLeft(itm)" :class="disabledButton && !selectedSize ? 'disabledClass' : ''" <p @click="____onAddToDevice(itm)" :class="disabledButton && !selectedSize ? 'disabledClass' : ''"
class="btn btnApply"></p> class="btn btnApply"></p>
</el-tooltip> </el-tooltip>
<el-tooltip content="编辑" placement="top"> <el-tooltip content="编辑" placement="top">
@ -148,7 +147,6 @@
</template> </template>
<script> <script>
import Sortable from 'sortablejs' import Sortable from 'sortablejs'
import BoardInfoEditor from './BoardInfoEditor'
import editInfo from './editInfo' import editInfo from './editInfo'
import boardData from './boardData' import boardData from './boardData'
import { getUserDeptId } from '@/api/system/user' import { getUserDeptId } from '@/api/system/user'
@ -157,8 +155,9 @@ import { uploadBoardEditInfo, getAllVmsTemplate, addTemplate, addTemplateContent
import { invokedFunction, getDeviceRealtimeProperty } from '@/api/device/device' import { invokedFunction, getDeviceRealtimeProperty } from '@/api/device/device'
import { getBoardList, getBoardDeviceInfo } from '@/api/board/board' import { getBoardList, getBoardDeviceInfo } from '@/api/board/board'
import { getTemplateList } from '@/api/board/template' import { getTemplateList } from '@/api/board/template'
import BoardPreview from './BoardPreview' import BoardPreview from "@screen/components/infoBoard/BoardPreview.vue"
import BoardTplPreview from './BoardTplPreview' import BoardTplPreview from "@screen/components/infoBoard/BoardTplPreview.vue"
import BoardInfoEditor from '@screen/components/infoBoard/BoardInfoEditor'
import vuescroll from 'vuescroll' import vuescroll from 'vuescroll'
import scrollOptions from '@/common/scrollbar.js' import scrollOptions from '@/common/scrollbar.js'
@ -228,7 +227,7 @@ export default {
mechanismList: [], // mechanismList: [], //
devicessizeList: [], // devicessizeList: [], //
deviceList: [], // deviceList: [], //
checkedCities: [], // checkedDevices: [], //
templateAvailable: [], templateAvailable: [],
form: { form: {
selectedDirection: "", selectedDirection: "",
@ -384,15 +383,14 @@ export default {
this.boardSizeDic[item.otherConfig.screenSize].list.push(item); this.boardSizeDic[item.otherConfig.screenSize].list.push(item);
if (!this.selectedSize) { if (!this.selectedSize) {
this.selectedSize = item.otherConfig.screenSize; this.selectedSize = item.otherConfig.screenSize;
this.____onChangeSize();
} }
if (!this.selectedDevice.deviceName) { if (!this.selectedDevice.deviceName) {
this.selectedDevice = item; this.selectedDevice = item;
this.selectedDeviceId = item.iotDeviceId;
this.____getBoardMessage();
} }
}) })
this.$forceUpdate(); this.____onChangeSize();
this.____getBoardMessage();
// this.$forceUpdate();
// this.____onChangeSize(this.boardSizeDic[0].selectedPixel); // this.____onChangeSize(this.boardSizeDic[0].selectedPixel);
}); });
}, },
@ -404,12 +402,11 @@ export default {
// this.selectedBdMsg = res.default.data["3A"].content; // this.selectedBdMsg = res.default.data["3A"].content;
// }) // })
} }
if (!this.selectedDeviceId) { if (!this.selectedDevice.iotDeviceId) {
return; return;
} }
getBoardDeviceInfo(this.selectedDeviceId).then(res => { getBoardDeviceInfo(this.selectedDevice.iotDeviceId).then(res => {
this.selectedBdMsg = res.data["3A"].content; this.selectedBdMsg = res.data["3A"].content;
console.log(this.selectedBdMsg);
}).catch(err => { }).catch(err => {
}) })
@ -435,7 +432,7 @@ export default {
}, },
____onEditBoardItem(tpl, index) { ____onEditBoardItem(tpl, index) {
// type : board template // type : board template
// mode : edit add // mode : edit add toDevice toTemplate
this.boardItemEdtingIndex = index; this.boardItemEdtingIndex = index;
this.editDialog = { this.editDialog = {
visible: true, visible: true,
@ -457,14 +454,18 @@ export default {
____onEditSubmit(para) { ____onEditSubmit(para) {
this.editDialog.tpl = {}; this.editDialog.tpl = {};
this.editDialog.visible = false; this.editDialog.visible = false;
if (para.type == "device") { if (para.type == "device") {
if (para.mode == "edit") { if (para.mode == "edit") {
this.selectedBdMsg[this.boardItemEdtingIndex] = para.data; this.selectedBdMsg[this.boardItemEdtingIndex] = para.data;
} else { } else {
this.selectedBdMsg.push(para.data); this.selectedBdMsg.push(para.data);
} }
}else if(para.mode == "toDevice"){
this.selectedBdMsg.push(para.data);
}else{
this.____refreshPageData(para);
} }
this.____refreshPageData(para);
}, },
____refreshPageData(para) { ____refreshPageData(para) {
if (para.type == 'template') { if (para.type == 'template') {
@ -474,26 +475,18 @@ export default {
} }
}, },
// //
arrowLeft(item) { ____onAddToDevice(item) {
var list = { if(this.checkedDevices.length<=0){
FONT_SIZE: item.tcontents[0].fontSize + 'px', this.$message.warning('未选择设备!');
COLOR: item.tcontents[0].fontColor, return;
CONTENT: item.tcontents[0].content, }
COORDINATE: item.tcontents[0].coordinate, this.editDialog = {
FONT: this.getFont(item.tcontents[0].fontType), visible: true,
SPEED: item.tcontents[0].fontSpacing, // mode: "toDevice",
ACTION: item.inScreenMode, // type: "template",
STAY: item.stopTime, // tpl: item
category: item.category, //
ID: this.contentList.length,
format: item.tcontents[0].contentList,
formatStyle: item.tcontents[0].formatStyle
} }
this.contentList.push(list)
this.toggleIndex++
console.log(this.contentList, 'this.contentList')
console.log(this.toggleIndex, 'toggleIndex')
}, },
// //
@ -623,7 +616,7 @@ export default {
background: 'rgba(0, 0, 0, 0.7)' background: 'rgba(0, 0, 0, 0.7)'
}) })
const objAll = {} const objAll = {}
objAll.deviceIds = this.checkedCities.toString() objAll.deviceIds = this.checkedDevices.toString()
let that = this let that = this
let selectedPixel = this.form.selectedPixel.split('*') let selectedPixel = this.form.selectedPixel.split('*')
@ -707,35 +700,41 @@ export default {
// //
handleCheckAllChange(val) { handleCheckAllChange(val) {
this.checkedCities = val ? this.deviceList : [] this.checkedDevices = val ? this.deviceList : []
}, },
// //
onSelectDevice(value) { ____onSelctDevices(arr){
this.selectedDeviceId = value[0]; console.log(arr , "<<< 已选设备");
this.selctedDevice = _.find(this.boardSizeDic[this.selectedSize].list, { iotDeviceId: value[0] }); },
____onCheckDeviceInfo(item) {
// this.selectedDevice = _.find(this.boardSizeDic[this.selectedSize].list, { iotDeviceId: value[0] });
this.selectedDevice = item;
// this.selectedDevice = this.deviceList // this.selectedDevice = this.deviceList
this.____getBoardMessage(); this.____getBoardMessage();
this.checkedCities = value // this.checkedDevices = value
let val = JSON.parse(JSON.stringify(value)) // let val = JSON.parse(JSON.stringify(value))
for (let itm of this.deviceList) { // for (let itm of this.deviceList) {
if (val.indexOf(itm) > -1) { // if (val.indexOf(itm) > -1) {
this.checkAll = true // this.checkAll = true
} else { // } else {
this.checkAll = false // this.checkAll = false
return // return
} // }
} // }
this.$forceUpdate() // this.$forceUpdate()
}, },
// //
____onChangeSize(val) { ____onChangeSize(val) {
this.____setAvailableTemplate(); this.____setAvailableTemplate();
this.checkedDevices = [];
this.selectedDevice = [];
this.selectedBdMsg = [];
// this.contentList = [] // this.contentList = []
// this.deviceList = [] // this.deviceList = []
// this.disabledButton = true // this.disabledButton = true
// this.checkedCities = [] // this.checkedDevices = []
// this.checkAll = false // this.checkAll = false
// this.allVmsTemplate() // this.allVmsTemplate()
// for (let item of this.boardSizeDic) { // for (let item of this.boardSizeDic) {
@ -1035,6 +1034,15 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.direction{
::v-deep .el-input{
.el-input__inner{
font-size: 16px !important;
padding: 8px 5px;
}
}
}
.infoBoardBox { .infoBoardBox {
.infoBoardCon { .infoBoardCon {
width: 100%; width: 100%;

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

@ -25,11 +25,14 @@ export default {
}); });
return "黑体" return "黑体"
}, },
dialogSourceFormat(data, type){ dialogSourceFormat(data, type, mode, tplDefault){
let data1 let data1
if(type=='template'){ if(type=='template'){
data1 = _.cloneDeep(data); data1 = _.cloneDeep(data);
data1.stopTime = data1.stopTime*0.1 data1.stopTime = data1.stopTime*0.1
if(mode=="toDevice"){
data.origin = tplDefault;
}
} }
else{ else{
data1 = { data1 = {
@ -46,9 +49,9 @@ export default {
} }
return data1 return data1
}, },
dialogSaveFormat(data, type) { dialogSaveFormat(data, type, mode) {
let data1; let data1;
if (type == 'template') { if (type == 'template' && mode!=='toDevice') {
data1 = _.cloneDeep(data); data1 = _.cloneDeep(data);
data1.stopTime = data1.stopTime * 10 + ""; data1.stopTime = data1.stopTime * 10 + "";
} else { } else {

Loading…
Cancel
Save