Browse Source

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

wangqin
hui 10 months ago
parent
commit
36299c577b
  1. 13
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/DrivingGuidance/components/DeviceControlDialog.vue
  2. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/DrivingGuidance/index.vue
  3. 415
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/InfoBoard/index.vue
  4. 7
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/index.vue
  5. 112
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/buttonEvent.js
  6. 4
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/httpList.js
  7. 56
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/index.vue

13
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/DrivingGuidance/components/DeviceControlDialog.vue

@ -143,10 +143,7 @@ export default {
handler(bool) {
if (!bool) return;
request({
url: `business/device/functions/${this.deviceId}/${51}`,
method: "post",
})
request.post(`business/device/functions/${this.deviceId}/${52}`, {})
.then(async (result) => {
if (result.code != 200) return;
@ -154,7 +151,7 @@ export default {
const formData = this.$refs.FormConfigRef?.formData;
const data = result.data;
const data = result.data[0];
switch (data.mode) {
case "00":
@ -204,11 +201,7 @@ export default {
*
* https://www.showdoc.com.cn/2450725213006196/10877717880262686
*/
request({
url: `business/device/functions/${this.deviceId}/${functionId}`,
method: "post",
params: result,
})
request.post(`business/device/functions/${this.deviceId}/${functionId}`, result)
.then((result) => {
if (result.code != 200) return Message.error(`设备操作失败!`);

2
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/DrivingGuidance/index.vue

@ -15,7 +15,7 @@
</div>
</div>
<DeviceControlDialog v-model="deviceControlVisible" :deviceId="dialogData.iotDeviceId" />
<DeviceControlDialog v-model="deviceControlVisible" :deviceId="dialogData.iotDeviceId || '8697-1'" />
</Dialog>
</template>

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

@ -1,5 +1,5 @@
<template>
<div>
<div class="mask">
<transition>
<div v-if="visible" class="dialog_info">
<div class="dialog_info_left">
@ -11,21 +11,21 @@
<div class="dialogContent">
<div v-if="selectedBdMsg.length > 0" class="dialogContent_box" style="height: 100%;">
<vuescroll :ops="scrollOptions" class="templateBox">
<div v-for="(itm, indx) in selectedBdMsg" :key="indx" class="tplItem">
<!-- 模板内容 -->
<BoardPreview class="boardPreview" :boardWH="selectedSize" :tpl="itm"></BoardPreview>
<!-- 操作按钮 -->
<div class="infoBtnBox">
<el-tooltip content="编辑" placement="top">
<p @click="____onEditBoardItem(itm, indx)" class="btn btnEdit"></p>
</el-tooltip>
<el-tooltip content="删除" placement="top">
<p @click="____onDeleteBoardItem(indx)" class="btn btnDelete"></p>
</el-tooltip>
<div v-for="(itm, indx) in selectedBdMsg" :key="indx" class="tplItem">
<!-- 模板内容 -->
<BoardPreview class="boardPreview" :boardWH="selectedSize" :tpl="itm"></BoardPreview>
<!-- 操作按钮 -->
<div class="infoBtnBox">
<el-tooltip content="编辑" placement="top">
<p @click="____onEditBoardItem(itm, indx)" class="btn btnEdit"></p>
</el-tooltip>
<el-tooltip content="删除" placement="top">
<p @click="____onDeleteBoardItem(indx)" class="btn btnDelete"></p>
</el-tooltip>
</div>
</div>
</div>
</vuescroll>
</vuescroll>
</div>
<div v-else class="dialogContent_box" style="height: 100%;">
<div class="dialogContent_box_empty">暂无数据</div>
@ -64,7 +64,7 @@
:style="{ 'transform': isShowTemplate ? 'rotate(0deg)' : 'rotate(180deg)' }">
<div class="txt">信息模板</div>
</div>
<!-- 原型图上没有附近相机代码里暂时关闭
<div class="sideSwitch" style="top:36%;" @click="showCameraInfoFn">
<img class="img" src="@/assets/screen/xtb/leftd.png" alt=""
@ -73,30 +73,30 @@
</div> -->
</div>
</div>
<!-- 信息模板 -->
<div v-if="isShowTemplate" class="dialog_info_right">
<vuescroll :ops="scrollOptions" class="templateBox">
<div v-for="(item, index) in templateAvailable" :key="item.dictValue">
<!-- 原来是<el-collapse v-model="activeNames"> -->
<h3>{{ item.dictLabel }}</h3>
<div v-for="(itm, indx) in item.list" :key="indx" class="tplItem">
<!-- 模板内容 -->
<BoardTplPreview class="boardPreview" :boardWH="selectedSize" :tpl="itm"></BoardTplPreview>
<!-- <div class="infoPreview">
<div v-for="(item, index) in templateAvailable" :key="item.dictValue">
<!-- 原来是<el-collapse v-model="activeNames"> -->
<h3>{{ item.dictLabel }}</h3>
<div v-for="(itm, indx) in item.list" :key="indx" class="tplItem">
<!-- 模板内容 -->
<BoardTplPreview class="boardPreview" :boardWH="selectedSize" :tpl="itm"></BoardTplPreview>
<!-- <div class="infoPreview">
<div class="infoBox" :style="____boardBgStyle">
<span class="infoTxt" :style="____boardTxtStyle(itm)" v-html="itm.content.replace(/\n|\r\n/g, '<br>').replace(/ /g, '&nbsp')"></span>
</div>
</div> -->
<!-- 操作按钮 -->
<div class="infoBtnBox">
<el-tooltip content="加入待下发信息" placement="top">
<p @click="____onAddToDevice(itm)" class="btn btnApply"></p>
</el-tooltip>
</div>
<!-- 操作按钮 -->
<div class="infoBtnBox">
<el-tooltip content="加入待下发信息" placement="top">
<p @click="____onAddToDevice(itm)" class="btn btnApply"></p>
</el-tooltip>
</div>
</div>
</vuescroll>
</div>
</vuescroll>
</div>
@ -153,7 +153,7 @@
</transition>
<BoardInfoEditor @afterSubmit="____onEditSubmit" :mode="editDialog.mode" :type="editDialog.type"
:visible.sync="editDialog.visible" :screenSize="selectedSize" :tpl="editDialog.tpl"></BoardInfoEditor>
:visible.sync="editDialog.visible" :screenSize="selectedSize" :tpl="editDialog.tpl"></BoardInfoEditor>
<!-- 情报板弹框中的弹框 -->
<addBoard ref="addinfo" @addInfo="addInfo" />
@ -179,7 +179,7 @@ import { getTemplateList } from '@/api/board/template'
export default {
name: 'InfoBoard',
data(){
data() {
return {
dialogTit: '门架式可变信息标志YK16+270',
isShowTemplate: false,
@ -204,26 +204,26 @@ export default {
{ id: 1005, bt: '突发事件', mbList: [{ id: 309, txt: '救援 拨打96659', w: 768, h: 160, col: '#FFFF00', fz: 60, pdl: 0, pdt: 0, fm: '黑体' }] },
{ id: 1006, bt: '警情播报', mbList: [{ id: 309, txt: '救援 拨打96659', w: 768, h: 160, col: '#FFFF00', fz: 60, pdl: 0, pdt: 0, fm: '黑体' }] }
],
activeNames:[1001 , 1002],
activeTab:"first",
activeNames: [1001, 1002],
activeTab: "first",
moBanDataList: [{
dictCode: 1001,
dictLabel: "日常通用",
mbList: [
{
id: 3001,
screenSize: "200*80",
tcontents: [
{
content: "谨慎驾驶 注意安全",
formatStyle: 0,
fontSize:"24",
fontType:"微软雅黑",
fontColor:"0000FF"
}
]
}
]
id: 3001,
screenSize: "200*80",
tcontents: [
{
content: "谨慎驾驶 注意安全",
formatStyle: 0,
fontSize: "24",
fontType: "微软雅黑",
fontColor: "0000FF"
}
]
}
]
}, {
dictCode: 1002,
dictLabel: "施工管理",
@ -273,10 +273,10 @@ export default {
{ id: 5002, txt: '光圈', numL: 16, numR: 15 },
{ id: 5003, txt: '聚焦', numL: 14, numR: 13 }
],
showEmit:false,
showEmit: false,
selectedBdMsg:[],
selectedSize:"",
selectedBdMsg: [],
selectedSize: "",
editDialog: {
mode: "",
type: "",
@ -284,22 +284,22 @@ export default {
tpl: {}
},
scrollOptions,
templateAvailable:null,
templateAvailable: null,
tplCategory: [], //
templateAll:[]
templateAll: []
}
},
props:{
visible:{
type:Boolean,
default:false
props: {
visible: {
type: Boolean,
default: false
},
device: {
type:Object,
default:null
type: Object,
default: null
}
},
watch:{
watch: {
device: {
handler(newV) {
this.____getDeviceInfo();
@ -307,13 +307,13 @@ export default {
immediate: false
}
},
components: { addBoard, editBoard, BoardPreview, BoardTplPreview, BoardInfoEditor, vuescroll},
created() {
this.____getTemplateCategory();
this.____getAllTemplate();
components: { addBoard, editBoard, BoardPreview, BoardTplPreview, BoardInfoEditor, vuescroll },
created() {
this.____getTemplateCategory();
this.____getAllTemplate();
// this.getTemplateSeries();
},
computed:{
computed: {
},
mounted() {
//
@ -330,7 +330,7 @@ export default {
]
},
methods: {
//
//
____getTemplateCategory() {
return this.getDicts('iot_template_category').then(res => {
this.tplCategory = res.data;
@ -343,7 +343,7 @@ export default {
});
},
____getDeviceInfo(){
____getDeviceInfo() {
this.selectedSize = JSON.parse(this.device.otherConfig).screenSize;
this.____setAvailableTemplate();
@ -411,7 +411,7 @@ export default {
}
},
____refreshPageData(para){},
____refreshPageData(para) { },
//
@ -452,8 +452,8 @@ export default {
let arr = node.screenSize.split("*");
let scale = this.getScrollSz(+arr[0]);
let obj = {
'width':`${+arr[0] / scale}px`,
'height':`${+arr[1] / scale}px`,
'width': `${+arr[0] / scale}px`,
'height': `${+arr[1] / scale}px`,
'justify-content': this.getTextAlign(node.tcontents[0].formatStyle)
}
return obj;
@ -461,35 +461,35 @@ export default {
boardConStyle(node) {
let fSize = +node.tcontents[0].fontSize;
let scale = this.getScrollSz(fSize);
let obj = {
'font-size': `${fSize/scale}px`,
let obj = {
'font-size': `${fSize / scale}px`,
'color': '#' + node.tcontents[0].fontColor,
'font-family': node.tcontents[0].fontType
}
return obj;
},
//
boardDataConvert(origin){
boardDataConvert(origin) {
let rst = origin.map(item => {
return {
...item,
STAY: item.playbackDuration,
inScreenMode: item.screenEntryMethod,
screenSize: item.displayAreaWidth + '*' + item.displayAreaHeight,
tcontents: [
{
...item,
fontSpacing: item.fontSpacing,
fontSize: parseInt(item.fontSize.replace(/\D/g, '')),
fontType: item.font,
fontColor: item.foregroundColor.toUpperCase(),
formatStyle: item.horizontalAlignment,
STAY: item.playbackDuration / 10,
content: item.textContent.replaceAll('\\,', ',').replaceAll('\\=', '=').replaceAll('\\\\n', '\n')
}
]
}
});
return {
...item,
STAY: item.playbackDuration,
inScreenMode: item.screenEntryMethod,
screenSize: item.displayAreaWidth + '*' + item.displayAreaHeight,
tcontents: [
{
...item,
fontSpacing: item.fontSpacing,
fontSize: parseInt(item.fontSize.replace(/\D/g, '')),
fontType: item.font,
fontColor: item.foregroundColor.toUpperCase(),
formatStyle: item.horizontalAlignment,
STAY: item.playbackDuration / 10,
content: item.textContent.replaceAll('\\,', ',').replaceAll('\\=', '=').replaceAll('\\\\n', '\n')
}
]
}
});
return rst;
},
//
@ -901,93 +901,99 @@ export default {
</script>
<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);
}
width: 100%;
height: 100%;
&.btnDelete {
background-image: url(~@/assets/jihe/images/button/delete.png);
}
}
.tplItem {
margin-right: 14px;
display: flex;
align-items: stretch;
padding-bottom: 10px;
i {
font-size: 24px;
color: #666;
padding-left: 4px;
cursor: pointer;
caret-color: rgba(0, 0, 0, 0);
user-select: none;
}
.boardPreview {
border: 2px solid #004c64;
// width: 560px;
// height:80px;
flex: 1;
}
i:hover {
color: #05afe3;
}
.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;
.disabledClass {
pointer-events: none;
cursor: auto !important;
color: #ccc;
}
}
.btn {
background-repeat: no-repeat;
background-size: 100% 100%;
width: 40px;
height: 40px;
&.btnApply {
background-image: url(~@/assets/jihe/images/button/toLeft.png);
}
.controlBox {
margin-top: 10px;
margin-bottom: 10px;
display: flex;
justify-content: center;
&.btnEdit {
background-image: url(~@/assets/jihe/images/button/edit.png);
}
.el-collapse {
max-height: 100% !important;
overflow: auto;
border-bottom: none;
border-top: none;
padding: 0 0.5vw;
&.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;
}
}
.mask {
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
z-index: 999999999;
}
.map_dialog {
width: 510px;
@ -998,6 +1004,7 @@ export default {
top: 0px;
transform: translate(-110%, -110%);
}
.dialog_info {
width: 950px;
height: 600px;
@ -1009,11 +1016,13 @@ export default {
justify-content: space-around;
align-items: flex-end;
}
.dialog_info_left {
width: 510px;
height: 100%;
background-color: #114c66;
}
.dialog_info_right {
width: 430px;
height: 556px;
@ -1023,6 +1032,7 @@ export default {
overflow-y: scroll;
position: relative;
}
.dialog_head {
width: 100%;
height: 48px;
@ -1035,15 +1045,18 @@ export default {
display: flex;
justify-content: space-between;
align-items: center;
.tit {
color: #3de8ff;
font-size: 18px;
}
.btnCls {
width: 13px;
height: 13px;
cursor: pointer;
}
.deco {
width: 55%;
height: 5px;
@ -1052,17 +1065,20 @@ export default {
top: 0;
}
}
.dialogContent {
width: 100%;
height: 300px;
padding: 10px 40px 10px 10px;
position: relative;
}
.dialogContent_box {
width: 100%;
// height: 100%;
overflow-y: scroll;
}
.dialogContent_l {
width: 355px;
// height: 4.91vh;
@ -1072,6 +1088,7 @@ export default {
justify-content: center;
align-items: center;
}
.dialogContent_r {
width: 96px;
// height: 4.91vh;
@ -1080,6 +1097,7 @@ export default {
justify-content: space-around;
align-items: center;
}
.dialogContent_l_xsq {
width: 256px;
height: 100%;
@ -1098,33 +1116,39 @@ export default {
height: 2.96vh;
cursor: pointer;
}
.dialogContent_r_btn1 {
background-image: url('~@/assets/screen/xtb/gg.png');
background-size: 100% 100%;
background-repeat: no-repeat;
background-position: center;
}
.dialogContent_r_btn2 {
background-image: url('~@/assets/screen/xtb/xx.png');
background-size: 100% 100%;
background-repeat: no-repeat;
background-position: center;
}
.dialogContent_r_btn3 {
background-image: url('~@/assets/screen/xtb/zz.png');
background-size: 100% 100%;
background-repeat: no-repeat;
background-position: center;
}
.dialogContent_box_item {
margin-bottom: 0.5vh;
display: flex;
justify-content: space-between;
}
.dialogContent_bottom {
width: 105%;
height: 16.52vh;
}
.show_bottom_tab_item {
width: 50%;
padding: 0.5vh 0;
@ -1132,21 +1156,25 @@ export default {
// flex-wrap: wrap;
// align-items: center;
}
.show_bottom_tab_box {
width: 100%;
display: flex;
flex-wrap: wrap;
align-items: center;
}
.show_bottom_tab_item_l {
color: #3de8ff;
font-size: 14px;
}
.show_bottom_tab_item_r {
color: #fff;
font-size: 14px;
margin-left: 0.5vw;
}
.sideSwitch {
position: absolute;
right: 0%;
@ -1159,31 +1187,38 @@ export default {
opacity: 1;
text-align: center;
cursor: pointer;
.img {
width: 15px;
height: 10px;
border: none;
transition: transform 0.3s ease; /* 过渡效果 */
transition: transform 0.3s ease;
/* 过渡效果 */
}
.txt {
color: #fff;
font-size: 13px;
}
}
.dialogContent_box_empty {
font-size: 14px;
text-align: center;
color: #fff;
}
.dialog_info_right_tit {
color: #fff;
font-size: 14px;
margin-bottom: 0.5vh;
}
.dialog_info_right_show {
width: 100%;
// height: 28vh;
}
.dialogContent_bottom_btn {
width: 100%;
height: 5vh;
@ -1192,6 +1227,7 @@ export default {
align-items: center;
text-align: center;
}
.show_bottom_btn_add {
width: 90px;
height: 23px;
@ -1204,6 +1240,7 @@ export default {
margin-right: 0.5vw;
cursor: pointer;
}
.show_bottom_btn_del {
width: 90px;
height: 23px;
@ -1215,31 +1252,37 @@ export default {
opacity: 1;
cursor: pointer;
}
.info_right_camera {
width: 100%;
height: calc(100% - 4vh);
padding: 1vh 0.5vw;
}
.info_right_camera_top {
width: 100%;
height: 20vh;
}
.info_right_camera_bom {
width: 100%;
padding: 1vh 0;
height: calc(100% - 20vh);
display: flex;
}
.camera_bom_left {
width: 50%;
height: 100%;
padding: 2vh 0;
border-right: 1px dashed #285a71;
}
.camera_bom_right {
width: 50%;
height: 100%;
}
.camera_bom_left_item {
width: 100%;
color: #fff;
@ -1247,24 +1290,29 @@ export default {
font-size: 14px;
padding-bottom: 1.5vh;
}
.camera_bom_left_item_txt {
width: 31%;
color: #3de8ff;
}
.camera_bom_left_item_val {
color: #fff;
font-size: 13px;
}
.camera_bom_right_t {
width: 100%;
height: 60%;
position: relative;
}
.camera_bom_right_b {
width: 100%;
height: 40%;
// background-color: deeppink;
}
.camera_bom_right_t_box {
width: 2vw;
height: 4vh;
@ -1276,6 +1324,7 @@ export default {
border-radius: 50%;
border: 1px solid #2191b1;
}
.camera_bom_right_t_h_po {
width: 1vw;
height: 5vh;
@ -1288,12 +1337,14 @@ export default {
background-repeat: no-repeat;
background-position: center;
}
.camera_bom_right_b_btn {
width: 100%;
padding: 0vh 2vw 1vh 2vw;
display: flex;
justify-content: space-between;
}
.camera_bom_right_b_btn_l {
width: 1.2vw;
height: 2.4vh;
@ -1304,9 +1355,11 @@ export default {
background-position: center;
cursor: pointer;
}
.camera_bom_right_b_btn_c {
color: #fff;
}
.camera_bom_right_b_btn_r {
width: 1.2vw;
height: 2.4vh;
@ -1317,6 +1370,7 @@ export default {
background-position: center;
cursor: pointer;
}
// background-color: #104b65;
// background-image: url('~@/assets/screen/xtb/qbbtit.png');
// background-size: 100% 100%;
@ -1325,18 +1379,24 @@ export default {
/* 通用滚动条样式 */
::-webkit-scrollbar {
width: 3px; /* 设置滚动条宽度 */
height: 3px; /* 设置滚动条高度 */
width: 3px;
/* 设置滚动条宽度 */
height: 3px;
/* 设置滚动条高度 */
}
::-webkit-scrollbar-track {
background-color: #114c66; /* 设置滚动条轨道颜色 */
background-color: #114c66;
/* 设置滚动条轨道颜色 */
}
::-webkit-scrollbar-thumb {
background-color: #9abce0; /* 设置滚动条滑块颜色 */
border-radius: 4px; /* 设置滚动条滑块圆角 */
background-color: #9abce0;
/* 设置滚动条滑块颜色 */
border-radius: 4px;
/* 设置滚动条滑块圆角 */
}
::v-deep .el-tabs__nav-wrap::after {
background-color: #316076;
}
@ -1344,12 +1404,15 @@ export default {
::v-deep .el-tabs__item.is-active {
color: #3de8ff !important;
}
::v-deep .el-tabs__item {
color: #fff !important;
}
::v-deep .el-tabs__active-bar {
background-color: #3de8ff !important;
}
::v-deep .el-collapse-item__header {
color: #fff;
height: 28px;
@ -1357,10 +1420,12 @@ export default {
border: none;
padding-left: 0.5vw;
}
::v-deep .el-collapse {
color: #fff;
border: none;
}
::v-deep .el-collapse-item__wrap {
color: #fff;
will-change: height;
@ -1371,17 +1436,21 @@ export default {
margin-top: 0.5vh;
border: none;
}
::v-deep .el-collapse-item__content {
margin-bottom: 0;
padding: 0.5vh 0.5vw;
}
::v-deep .el-collapse-item {
margin-bottom: 1vh;
}
::v-deep .el-input--mini .el-input__icon {
line-height: 20px;
color: #fff;
}
::v-deep .el-input--mini .el-input__inner {
height: 20px;
line-height: 20px;

7
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/index.vue

@ -28,7 +28,8 @@
<!-- <ControlCamera :data="dialogConfig.data" :visible="dialogConfig.visibleType === 0" /> -->
<!-- 摄像机 G35 K094+079 下行可控 枪机 可打开-->
<!-- <Camera :data="dialogConfig.data" :visible="dialogConfig.visibleType === 1" /> -->
<component :dialogData="dialogConfig.data" :is="dialogConfig.component" @change="handleCameraChange" />
<component :dialogData="dialogConfig.data" visible :device="dialogConfig.data" :is="dialogConfig.component"
@change="handleCameraChange" />
</Bg1>
</template>
@ -41,6 +42,7 @@ import Bg1 from "@screen/components/Decorations/bg-1.vue"
import ControlCamera from "./../Dialogs/ControlCamera/index.vue"
import DrivingGuidance from "./../Dialogs/DrivingGuidance/index.vue"
import Camera from "./../Dialogs/Camera/index.vue";
import InfoBoard from "./../InfoBoard"
export default {
name: 'RoadAndEvents',
@ -48,6 +50,7 @@ export default {
ControlCamera,
Camera,
DrivingGuidance,
InfoBoard,
Bg1
},
data() {
@ -61,7 +64,7 @@ export default {
// 0 ControlCamera | 1 Camera
component: void 0,
data: void 0,
// component: DrivingGuidance,
// component: ControlCamera,
// data: {
// camId: "57937",
// }

112
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/buttonEvent.js

@ -33,11 +33,64 @@ export const eventMap = {
// status: "0",
// };
const data = await getDeviceList(1);
// const data = await getDeviceList(1);
const data = [
{
longitude: 116.268564,
latitude: 35.73115,
otherConfig: '{"ptzCtrl":0}',
},
{
longitude: 116.258178,
latitude: 35.720996,
},
{
longitude: 116.255542,
latitude: 35.717335,
},
{
longitude: 116.252883,
latitude: 35.713114,
},
{
longitude: 116.249416,
latitude: 35.707627,
},
];
if (!data) return;
cacheRemoveFunc.DriveTestEquipment_Camera_Remove?.();
cacheRemoveFunc.DriveTestEquipment_Camera_Remove = await setMarkToMap.call(
this,
item,
data,
(extData) => {
try {
this.dialogConfig = {
// 0 有(球机) 1 ⽆(枪机)
component: cameraCtrlMap[JSON.parse(extData.otherConfig)?.ptzCtrl],
data: extData,
};
} catch (error) {}
}
);
},
async "路测设备/摄像机_close"() {
cacheRemoveFunc.DriveTestEquipment_Camera_Remove?.();
},
async "路测设备/行车诱导_close"() {
cacheRemoveFunc.Driving_Guidance_Remove?.();
},
async "路测设备/行车诱导"(item) {
const data = await getDeviceList(12);
// const data = [
// {
// longitude: 116.268564,
// latitude: 35.73115,
// otherConfig: '{"ptzCtrl":0}',
// },
// {
// longitude: 116.258178,
@ -54,49 +107,66 @@ export const eventMap = {
// {
// longitude: 116.249416,
// latitude: 35.707627,
// ptzCtrl: 0,
// },
// ];
if (!data) return;
cacheRemoveFunc.DriveTestEquipment_Camera_Remove?.();
cacheRemoveFunc.Driving_Guidance_Remove?.();
cacheRemoveFunc.DriveTestEquipment_Camera_Remove = await setMarkToMap.call(
cacheRemoveFunc.Driving_Guidance_Remove = await setMarkToMap.call(
this,
item,
data,
(extData) => {
try {
this.dialogConfig = {
// 0 有(球机) 1 ⽆(枪机)
component: cameraCtrlMap[JSON.parse(extData.otherConfig)?.ptzCtrl],
data: extData,
};
} catch (error) {}
this.dialogConfig = {
component: "DrivingGuidance",
data: extData,
};
}
);
},
async "路测设备/摄像机_close"() {
cacheRemoveFunc.DriveTestEquipment_Camera_Remove?.();
},
async "路测设备/行车诱导_close"() {
cacheRemoveFunc.Driving_Guidance_Remove?.();
async "路测设备/情报板_close"() {
cacheRemoveFunc.Info_Board_Remove?.();
},
async "路测设备/行车诱导"(item) {
const data = await getDeviceList(12);
async "路测设备/情报板"(item) {
const data = await getDeviceList(2);
// const data = [
// {
// longitude: 116.268564,
// latitude: 35.73115,
// otherConfig: '{"ptzCtrl":0}',
// },
// {
// longitude: 116.258178,
// latitude: 35.720996,
// },
// {
// longitude: 116.255542,
// latitude: 35.717335,
// },
// {
// longitude: 116.252883,
// latitude: 35.713114,
// },
// {
// longitude: 116.249416,
// latitude: 35.707627,
// },
// ];
if (!data) return;
cacheRemoveFunc.Driving_Guidance_Remove?.();
cacheRemoveFunc.Info_Board_Remove?.();
cacheRemoveFunc.Driving_Guidance_Remove = await setMarkToMap.call(
cacheRemoveFunc.Info_Board_Remove = await setMarkToMap.call(
this,
item,
data,
(extData) => {
this.dialogConfig = {
component: "DrivingGuidance",
component: "InfoBoard",
data: extData,
};
}

4
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/httpList.js

@ -74,7 +74,7 @@ export function controlCamera(camId, cmdType) {
export async function getRoadInfoByStakeMark(stakeMarkId) {
const stakeMarkInfo = await request({
// url: `/business/stakeMark/${stakeMarkId}`,
url: `/business/stakeMark`,
url: `/business/stakeMark/query`,
method: "get",
params: {
id: stakeMarkId,
@ -82,7 +82,7 @@ export async function getRoadInfoByStakeMark(stakeMarkId) {
},
});
if (!stakeMarkInfo.data?.sectionId) return {};
if (!stakeMarkInfo.data[0]?.sectionId) return {};
const roadSectionInfo = await request({
url: `/business/roadSection/${stakeMarkInfo.data.sectionId}`,

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

@ -15,7 +15,7 @@
<ConditionStatistics class="content-r card-menu" />
</section>
<InfoBoard :visible.sync="isShowInfoBoard" :device="selectedDevice"></InfoBoard>
<!-- <InfoBoard :visible.sync="isShowInfoBoard" :device="selectedDevice"></InfoBoard> -->
<footer class="footer card-menu">
<div class="footer-title">
@ -37,7 +37,7 @@ import ConditionStatistics from "./components/ConditionStatistics/index.vue";
import RoadAndEvents from "./components/RoadAndEvents/index.vue";
import AMapContainer from "./components/AMapContainer/index.vue";
import InfoBoard from "./components/InfoBoard"
// import InfoBoard from "./components/InfoBoard"
export default {
name: 'Home',
@ -47,12 +47,12 @@ export default {
Thumbnail,
RoadAndEvents,
AMapContainer,
InfoBoard
// InfoBoard
},
data() {
return {
isShowInfoBoard: false,
selectedDevice:null
selectedDevice: null
}
},
provide() {
@ -77,30 +77,30 @@ export default {
}
},
onClickItem(item) {
if (item.title.includes("情报板")) {
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
}
}
// if (item.title.includes("")) {
// 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
// }
// }
}
}
}

Loading…
Cancel
Save