Browse Source

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

wangqin
zhangzhang 11 months ago
parent
commit
cb4d52606e
  1. 12
      ruoyi-ui/src/common/menuData.js
  2. 2
      ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardPreview.vue
  3. 111
      ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardRecordPreview.vue
  4. 5
      ruoyi-ui/src/views/JiHeExpressway/images/layer/路测设备/太阳能板.svg
  5. 3
      ruoyi-ui/src/views/JiHeExpressway/images/layer/路测设备/太阳能板_active.svg
  6. 3
      ruoyi-ui/src/views/JiHeExpressway/images/layer/路测设备/太阳能板_fault.svg
  7. 55
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SolarEnergy/components/DeviceControlDialog.vue
  8. 167
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SolarEnergy/components/DeviceParams.vue
  9. 44
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SolarEnergy/data.js
  10. 197
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SolarEnergy/index.vue
  11. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/index.vue
  12. 4
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/buttonEvent.js
  13. 10
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js
  14. 123
      ruoyi-ui/src/views/JiHeExpressway/pages/service/boardRecord/index.vue
  15. 6
      ruoyi-ui/vue.config.js

12
ruoyi-ui/src/common/menuData.js

@ -177,12 +177,12 @@ export default [
path: "/service/board",
component: "service/board/index.vue",
},
// {
// title: "情报板记录",
// name: "boardRecord",
// path: "/service/boardRecord",
// component: "service/boardRecord/index.vue",
// },
{
title: "情报板记录",
name: "boardRecord",
path: "/service/boardRecord",
component: "service/boardRecord/index.vue",
},
{
title: "情报板敏感词",
name: "sensitive",

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

@ -74,7 +74,7 @@ export default {
this.boardStyle = {
width: `${arr[0] * scale}px`,
height: `${arr[1] * scale}px`,
"background-color":`${this.tpl.backgroundColor}px`,
"background-color":`${this.tpl.backgroundColor}`,
"align-items" : ['flex-start', 'flex-end', 'center'][this.tpl.verticalAlignment] //formatStyle
}
let fontSize = 0;

111
ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardRecordPreview.vue

@ -0,0 +1,111 @@
<template>
<div class="boardPreview" ref="compBox">
<div class="boardBox" :style="boardStyle" v-if="isReady">
<p class="boardTxt" v-for="item,index in contentArr" :key="index" :style="boardTxtStyle" v-html="item" v-if="(index + 1) <= lineTotal">
</p>
</div>
</div>
</template>
<script>
export default {
name:"BoardPreview",
data(){
return {
isReady: false,
boardStyle:null,
boardTxtStyle:null,
contentArr:{
type:Array,
default:()=>[]
},
lineTotal: 0
}
},
props:{
tpl: {
type: Object,
default: ()=>{}
},
},
watch:{
tpl:{
handler(newV){
this.contentArr = this.tpl.CONTENT.replaceAll(/\\\\n/g, '\n').replaceAll(/\\=/g, '=').replaceAll(/\\,/g, ',').replaceAll(/ /g, '&nbsp').split('\n');
this.setStyle();
},
deep:true,
immediate:true
}
},
computed:{
},
mounted(){
},
methods:{
setStyle() {
this.$nextTick(() => {
let boxW = this.$refs["compBox"].clientWidth;
let boxH = this.$refs["compBox"].clientHeight;
let boardW = this.tpl.width;
let boardH = this.tpl.height;
let scale = 1;
if (boxH > 20) { //>020
if (boardW / boardH > boxW / boxH) {
scale = boxW / boardW;
} else {
scale = boxH / boardH;
}
} else {
if (boardW > boxW) {
scale = boxW / boardW;
}
}
this.boardStyle = {
width: `${boardW * scale}px`,
height: `${boardH * scale}px`,
"align-items" : ['flex-start', 'flex-end', 'center'][this.tpl.formatStyle] //formatStyle
}
let fontSize = 0;
if (_.isString(this.tpl.FONT_SIZE)) {
fontSize = this.tpl.FONT_SIZE.replace('px', '') * 1;
} else {
fontSize = this.tpl.fontSize;
}
this.boardTxtStyle = {
"color": "#" + this.tpl.COLOR, //fontColor
"font-size": `${fontSize*scale}px`,
"font-family": this.fontTypeDic[this.tpl.FONT || '3'], //fontType
"min-height": `${fontSize * scale}px`
}
this.lineTotal = Math.floor(boardH / fontSize);
this.isReady = true;
})
}
}
}
</script>
<style lang="scss" scoped>
.boardPreview{
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
.boardBox {
background-color: #000;
display: flex;
overflow: hidden;
flex-direction: column;
justify-content: center;
.boardTxt{
color: #f00;
line-height: 1;
margin-bottom: 0;
word-break: keep-all;
white-space: nowrap;
}
}
}
</style>

5
ruoyi-ui/src/views/JiHeExpressway/images/layer/路测设备/太阳能板.svg

@ -0,0 +1,5 @@
<svg width="20" height="17" viewBox="0 0 20 17" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="Group 1142815835">
<path id="Vector" d="M10.7401 12.0997V14.218H14.3689V16.1134H5.29693V14.218H8.92573V12.0997H10.7401ZM3.66073 9.01901L3.03433 11.7838H1.22803C0.939128 11.7838 0.666428 11.6488 0.490928 11.4166C0.315428 11.1844 0.261428 10.8847 0.339728 10.6066L0.796028 9.01901H3.66073ZM9.37933 9.01901V11.7838H3.96583L4.59223 9.01901H9.37933ZM15.6622 9.01901L16.2886 11.7838H10.2865V9.01901H15.6622ZM19.1695 9.01901L19.6258 10.6093C19.7041 10.8874 19.6501 11.1871 19.4746 11.4166C19.3018 11.6488 19.0291 11.7838 18.7375 11.7838H17.2174L16.591 9.01901H19.1695ZM4.28713 6.25421L3.86863 8.09831H1.06333L1.59253 6.25421H4.28713ZM9.37933 6.25421V8.09831H4.80013L5.21863 6.25421H9.37933ZM15.0358 6.25421L15.4543 8.09831H10.2865V6.25421H15.0358ZM18.3757 6.25421L18.9049 8.09831H16.3831L15.9673 6.25421H18.3757ZM4.91353 3.48941L4.49503 5.33351H1.85713L2.38633 3.48941H4.91353ZM9.37933 3.48941V5.33351H5.42653L5.84503 3.48941H9.37933ZM14.4094 3.48941L14.8279 5.33351H10.2865V3.48941H14.4094ZM17.5819 3.48941L18.1111 5.33351H15.7567L15.3382 3.48941H17.5819ZM5.53993 0.724609L5.12143 2.56871H2.65093L2.98843 1.39421C3.10183 1.00001 3.46363 0.727309 3.87403 0.727309H5.53993V0.724609ZM9.37933 0.724609V2.56871H6.05293L6.47143 0.724609H9.37933ZM13.783 0.724609L14.2015 2.56871H10.2865V0.724609H13.783ZM16.0942 0.724609C16.5046 0.724609 16.8664 0.997309 16.9798 1.39151L17.3173 2.56871H15.1303L14.7118 0.724609H16.0942Z" fill="#0FD4FF"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

3
ruoyi-ui/src/views/JiHeExpressway/images/layer/路测设备/太阳能板_active.svg

@ -0,0 +1,3 @@
<svg width="20" height="16" viewBox="0 0 20 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path id="Vector" d="M10.4354 11.3751V13.4934H14.0642V15.3888H4.99224V13.4934H8.62104V11.3751H10.4354ZM3.35604 8.2944L2.72964 11.0592H0.923341C0.634441 11.0592 0.361741 10.9242 0.186241 10.692C0.0107407 10.4598 -0.0432593 10.1601 0.0350407 9.882L0.491341 8.2944H3.35604ZM9.07464 8.2944V11.0592H3.66114L4.28754 8.2944H9.07464ZM15.3575 8.2944L15.9839 11.0592H9.98184V8.2944H15.3575ZM18.8648 8.2944L19.3211 9.8847C19.3994 10.1628 19.3454 10.4625 19.1699 10.692C18.9971 10.9242 18.7244 11.0592 18.4328 11.0592H16.9127L16.2863 8.2944H18.8648ZM3.98244 5.5296L3.56394 7.3737H0.758641L1.28784 5.5296H3.98244ZM9.07464 5.5296V7.3737H4.49544L4.91394 5.5296H9.07464ZM14.7311 5.5296L15.1496 7.3737H9.98184V5.5296H14.7311ZM18.071 5.5296L18.6002 7.3737H16.0784L15.6626 5.5296H18.071ZM4.60884 2.7648L4.19034 4.6089H1.55244L2.08164 2.7648H4.60884ZM9.07464 2.7648V4.6089H5.12184L5.54034 2.7648H9.07464ZM14.1047 2.7648L14.5232 4.6089H9.98184V2.7648H14.1047ZM17.2772 2.7648L17.8064 4.6089H15.452L15.0335 2.7648H17.2772ZM5.23524 0L4.81674 1.8441H2.34624L2.68374 0.6696C2.79714 0.2754 3.15894 0.00269997 3.56934 0.00269997H5.23524V0ZM9.07464 0V1.8441H5.74824L6.16674 0H9.07464ZM13.4783 0L13.8968 1.8441H9.98184V0H13.4783ZM15.7895 0C16.1999 0 16.5617 0.2727 16.6751 0.6669L17.0126 1.8441H14.8256L14.4071 0H15.7895Z" fill="#FFDB82"/>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

3
ruoyi-ui/src/views/JiHeExpressway/images/layer/路测设备/太阳能板_fault.svg

@ -0,0 +1,3 @@
<svg width="20" height="16" viewBox="0 0 20 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path id="Vector" d="M10.4354 11.3751V13.4934H14.0642V15.3888H4.99224V13.4934H8.62104V11.3751H10.4354ZM3.35604 8.2944L2.72964 11.0592H0.923341C0.634441 11.0592 0.361741 10.9242 0.186241 10.692C0.0107407 10.4598 -0.0432593 10.1601 0.0350407 9.882L0.491341 8.2944H3.35604ZM9.07464 8.2944V11.0592H3.66114L4.28754 8.2944H9.07464ZM15.3575 8.2944L15.9839 11.0592H9.98184V8.2944H15.3575ZM18.8648 8.2944L19.3211 9.8847C19.3994 10.1628 19.3454 10.4625 19.1699 10.692C18.9971 10.9242 18.7244 11.0592 18.4328 11.0592H16.9127L16.2863 8.2944H18.8648ZM3.98244 5.5296L3.56394 7.3737H0.758641L1.28784 5.5296H3.98244ZM9.07464 5.5296V7.3737H4.49544L4.91394 5.5296H9.07464ZM14.7311 5.5296L15.1496 7.3737H9.98184V5.5296H14.7311ZM18.071 5.5296L18.6002 7.3737H16.0784L15.6626 5.5296H18.071ZM4.60884 2.7648L4.19034 4.6089H1.55244L2.08164 2.7648H4.60884ZM9.07464 2.7648V4.6089H5.12184L5.54034 2.7648H9.07464ZM14.1047 2.7648L14.5232 4.6089H9.98184V2.7648H14.1047ZM17.2772 2.7648L17.8064 4.6089H15.452L15.0335 2.7648H17.2772ZM5.23524 0L4.81674 1.8441H2.34624L2.68374 0.6696C2.79714 0.2754 3.15894 0.00269997 3.56934 0.00269997H5.23524V0ZM9.07464 0V1.8441H5.74824L6.16674 0H9.07464ZM13.4783 0L13.8968 1.8441H9.98184V0H13.4783ZM15.7895 0C16.1999 0 16.5617 0.2727 16.6751 0.6669L17.0126 1.8441H14.8256L14.4071 0H15.7895Z" fill="#FF5F5F"/>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

55
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SolarEnergy/components/DeviceControlDialog.vue

@ -0,0 +1,55 @@
<template>
<Dialog v-model="modelVisible" title="设备操作" width="550px">
<div class="DeviceControlDialog">
<DeviceParams :dialogData="dialogData" />
</div>
</Dialog>
</template>
<script>
import Dialog from "@screen/components/Dialog/index.vue";
import DeviceParams from "./DeviceParams.vue";
export default {
name: "DeviceControlDialog",
components: {
Dialog,
DeviceParams,
},
model: {
prop: "visible",
event: "update:value",
},
props: {
visible: Boolean,
dialogData: {
type: Object,
default: () => ({}),
},
},
computed: {
modelVisible: {
get() {
return this.visible;
},
set(val) {
this.$emit("update:value", val);
},
},
},
};
</script>
<style lang="scss" scoped>
.DeviceControlDialog {
width: 510px;
display: flex;
flex-direction: column;
gap: 15px;
min-height: 360px;
.tips {
font-size: 12px;
}
}
</style>

167
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SolarEnergy/components/DeviceParams.vue

@ -0,0 +1,167 @@
<template>
<div class='DeviceParams'>
<div class="no-data" v-if="!devicesList.length" v-loading="secondLoading">暂无设备参数</div>
<Descriptions :list="devicesList" :data="devicesData" style="gap: 18px;" column="6">
<template v-for="item in devicesList.slice(0, -1)" #[`content-${getSlotKey(item.key)}`]="{ data }">
<span>{{ data.text }}</span>
<Switcher v-if="!disabled" class="switcher" :activeOption="activeOption" :value="data.state"
@change="(value) => handleSwitcherChange(value, data)" />
<ElTag style="margin-left: 20px;" v-else effect="dark" :type="data.state ? '' : 'info'">{{ data.state ? '开' :
'关' }}
</ElTag>
</template>
</Descriptions>
</div>
</template>
<script>
import Descriptions from '@screen/components/Descriptions.vue';
import Switcher from '@screen/pages/service/PublishingChannelManagement/components/Switcher.vue';
import request from "@/utils/request";
import { Message } from 'element-ui';
import { confirm } from "@screen/utils/common";
import { devicesFormList } from '../data.js';
export default {
name: 'DeviceParams',
components: {
Descriptions,
Switcher
},
props: {
dialogData: {
type: Object,
default: () => ({})
},
disabled: Boolean
},
data() {
return {
secondLoading: true,
devicesList: [],
devicesData: {},
activeOption: {
active: {
text: "开"
},
unActive: {
text: "关"
}
}
}
},
created() {
// this.devicesList = devicesFormList;
this.devicesList = [];
let devs = [];
// Promise.all([this.getAc('A1'), this.getAc('A2'), this.getAc('A3'), this.getAc('A4'), this.getAc('A5'), this.getAc('A6')]).then(res => {
Promise.all([this.getAc()]).then(res => {
console.log('res', res)
request({
url: `/business/device/properties/latest/${this.dialogData.iotDeviceId}`,
method: "get",
}).then(result => {
if (result.code != 200) return Message.error("操作失败");
result.data.forEach(item => {
devs.push({
label: item.propertyName,
key: item.property,
gridColumn: 3,
});
this.devicesData[item.property] = item.formatValue;
});
this.devicesList = devs;
})
})
},
methods: {
getAc() {
return request({
url: `/business/device/batchFunctions`,
method: "post",
data: {
devices: [{
iotDeviceId: this.dialogData.iotDeviceId,
id: this.dialogData.id,
deviceType: 15
}],
functions: [
{
functionId: "A1",
params: {}
}, {
functionId: "A2",
params: {}
}, {
functionId: "A3",
params: {}
}, {
functionId: "A4",
params: {}
}, {
functionId: "A5",
params: {}
}, {
functionId: "A6",
params: {}
}
],
// parameter: {}
}
})
},
async handleSwitcherChange(value, data) {
let str = data.state ? "关闭" : "开启";
let deviceName = "";
if (data.key.includes("fan")) {
str += "风扇?";
deviceName = "fan_out_en";
} else {
str += "该支路?"
deviceName = data.key.match(/^[a-z]+_out|[0-9]+/g).join("_") + "_en"; //dc_out_2_en ac_out_2_en;
}
data.state = value;
const isContinue = await confirm({ message: `${str}` })
.catch(() => {
console.log(data.state, value, 333)
data.state = !value;
});
if (!isContinue) return;
// https://www.yuque.com/dayuanzhong-ovjwn/gkht0m/ww776d5kzs72ilzh?singleDoc=
request({
url: `/business/device/functions/${this.dialogData.iotDeviceId}/${102}`,
method: "POST",
data: {
deviceName,
// 1=0=
value: value ? 1 : 0
}
})
.then(result => {
if (result.code != 200) {
Message.error("操作失败");
data.state = !value;
return;
};
Message.success("操作成功");
})
.catch(() => {
data.state = !value;
Message.error("操作失败");
})
},
getSlotKey(key) {
return key.includes('electricity') || key.includes('fan') ? key : ''
}
}
}
</script>
<style lang='scss' scoped>
.DeviceParams {
height: 100%;
}
</style>

44
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SolarEnergy/data.js

@ -0,0 +1,44 @@
export const devicesFormList = [
{
label: "设备内温度过高",
key: `theInternalTemperatureOfTheDeviceOverheats`,
// text: "-",
gridColumn: 2,
},
{
label: "阵列电压",
key: `arrayVoltage`,
// text: "-",
gridColumn: 2,
},
{
label: "阵列电流",
key: `arrayCurrent`,
// text: "-",
gridColumn: 2,
},
{
label: "发电功率L",
key: `generatingPowerL`,
text: "-",
gridColumn: 2,
},
{
label: "发电功率H",
key: `generatingPowerH`,
text: "-",
gridColumn: 2,
},
{
label: "负载电压",
key: `loadVoltage`,
text: "-",
gridColumn: 2,
},
{
label: "负载电流",
key: `loadCurrent`,
text: "-",
gridColumn: 2,
},
];

197
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SolarEnergy/index.vue

@ -0,0 +1,197 @@
<template>
<Dialog v-model="obverseVisible" title="太阳能板" width="550px">
<Video class="video-stream" :pileNum="dialogData.stakeMark" />
<div class="SolarEnergy">
<ElTabs v-model="activeName" class="tabs">
<ElTabPane label="基本信息" name="first">
<!-- {{ dialogData }} -->
<Descriptions :list="list" :data="data" style="gap: 18px" />
</ElTabPane>
<ElTabPane label="设备参数" name="second">
<DeviceParams disabled :dialogData="dialogData" />
</ElTabPane>
<ElTabPane label="在线率统计" name="third">
<LineChart v-if="activeName === 'third'" :productId="dialogData.id" style="height: 180px" />
</ElTabPane>
</ElTabs>
</div>
<!-- <template #footer>
<Button v-if="activeName != 'first' && data.deviceState == '1'" @click.native="deviceControlVisible = true">
设备操作
</Button>
<Button v-else-if="activeName != 'first'" style="background-color: #bbb">
设备离线
</Button>
</template> -->
<DeviceControlDialog v-model="deviceControlVisible" :dialogData="dialogData" />
</Dialog>
</template>
<script>
import Dialog from "@screen/components/Dialog/index.vue";
import Button from "@screen/components/Buttons/Button.vue";
import Descriptions from "@screen/components/Descriptions.vue";
import Video from "@screen/components/Video";
import LineChart from "../../LineChart/index.vue";
import DeviceParams from "./components/DeviceParams.vue";
import DeviceControlDialog from "./components/DeviceControlDialog.vue";
import request from "@/utils/request";
import {
getRoadInfoByStakeMark,
getProduct,
} from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js";
import { dialogDelayVisible } from "./../mixin";
import { resolve } from "@antv/x6/lib/registry/node-anchor/util";
//
export default {
name: "SolarEnergy",
mixins: [dialogDelayVisible],
components: {
Dialog,
Descriptions,
LineChart,
Video,
Button,
DeviceParams,
DeviceControlDialog,
},
data() {
return {
activeName: "first",
releaseVisible: false,
deviceControlVisible: false,
data: {
deviceName: "LH24",
roadName: "G35济泽高速",
stakeMark: "k094+079",
direction: "1",
organizationName: "山东高速济南发展公司",
brand: "XXX厂家",
deviceState: "0",
},
list: [
{
label: "设备名称",
key: "deviceName",
},
{
label: "设备桩号",
key: "stakeMark",
},
{
label: "道路名称",
key: "roadName",
},
{
label: "设备方向",
key: "direction",
enum: "CameraDirectionEnum",
},
{
label: "设备状态",
key: "deviceState",
enum: "DeviceTypeEnum",
// visible: false,
},
// {
// label: "",
// key: "deviceStateLiteral",
// },
{
label: "设备厂商",
key: "manufacturer",
},
],
};
},
async created() {
// if (!this.dialogData.iotDeviceId) this.dialogData.iotDeviceId = '10.0.36.146-1883';
// let deviceInfo = await this.getDeviceInfo();
this.data = {
...this.dialogData,
roadName: null,
// deviceStateLiteral: deviceInfo.data.formatValue.deviceState,
};
// console.log(
// "%c [ dialogData ]-103-index.vue",
// "font-size:15px; background:#36347c; color:#7a78c0;",
// this.dialogData,
// "+++========"
// );
//
getProduct(this.dialogData.productId).then((data) => {
this.dialogData.brand = data.brand;
});
const roadInfo = await getRoadInfoByStakeMark(this.dialogData.stakeMark);
if (roadInfo) this.data.roadName = roadInfo.roadName;
},
methods: {
async getDeviceInfo() {
return request({
url: `/business/device/properties/latest/${this.dialogData.iotDeviceId || "10.0.36.143-1883"
}/3`,
method: "get",
params: {},
});
},
},
};
</script>
<style lang="scss">
div.switcher {
font-size: 12px;
padding: 2px;
}
</style>
<style lang="scss" scoped>
.SolarEnergy {
width: 510px;
// height: 240px;
color: #fff;
display: flex;
flex-direction: column;
.camera-video {
flex: 1.5;
}
.tabs {
flex: 1;
display: flex;
flex-direction: column;
::v-deep {
.el-tabs__content {
flex: 1;
.el-tab-pane {
height: 100%;
}
}
}
}
.bottom {
margin-top: 12px;
display: flex;
gap: 9px;
align-items: center;
justify-content: end;
>div {
font-size: 16px;
padding: 6px 12px;
}
}
}
</style>

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

@ -46,6 +46,7 @@ import Broadcast from "./../Dialogs/Broadcast/index.vue";
import TrafficIncidents from "./../Dialogs/TrafficIncidents/index.vue";
import PerceiveEvent from "./../Dialogs/PerceiveEvent/index.vue";
import SmartDevice from "./../Dialogs/SmartDevice/index.vue";
import SolarEnergy from "./../Dialogs/SolarEnergy/index.vue";
import Intermodulation from "./../Dialogs/Intermodulation/index.vue";
import GuardrailCollision from "./../Dialogs/GuardrailCollision/index.vue";
@ -65,6 +66,7 @@ export default {
TrafficIncidents,
PerceiveEvent,
SmartDevice,
SolarEnergy,
Intermodulation,
GuardrailCollision,
FatigueWakesUp

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

@ -74,6 +74,10 @@ export const DeviceForMap = {
deviceType: "10",
dialog: "FatigueWakesUp",
},
太阳能板: {
deviceType: "15",
dialog: "SolarEnergy",
},
};
export const lngLatMap = {}; //优化 缩略图 + 地图 复用lngLatmap

10
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js

@ -238,19 +238,19 @@ export class MarkerCluster {
const reset = () => {
if (!window.openInfoWindow) {
// console.log(window.openInfoWindow, "rest");
// console.log("窗口movestart中", new Date());
this.infoWindow?.close?.();
}
};
map.on("zoomstart", reset);
map.on("mapmove", reset);
map.on("zoomend", reset);
map.on("movestart", reset);
map.on("moveend", async () => {
if (window.openInfoWindow) {
console.log("窗口位移结束");
// console.log("窗口位移结束", new Date());
window.openInfoWindow = false;
await new Promise((resolve) => setTimeout(resolve, 840));
window.infoWindow?.open?.();
// window.infoWindow?.open?.();
}
});

123
ruoyi-ui/src/views/JiHeExpressway/pages/service/boardRecord/index.vue

@ -1,6 +1,5 @@
<template>
<div class='board_record'>
<!-- 搜索栏 -->
<div class="filter">
<div>
@ -22,22 +21,38 @@
<!-- 内容 -->
<div class="body">
<Table :data="tableData">
<ElTableColumn label="序号" width="60" />
<ElTableColumn label="发布设备" width="60" />
<ElTableColumn label="屏幕尺寸" width="60" />
<ElTableColumn label="设备方向" width="60" />
<ElTableColumn label="设备桩号" width="60" />
<ElTableColumn prop="eventName" label="发布内容" width="240" />
<ElTableColumn prop="eventName" label="发布事件" width="240" />
<ElTableColumn prop="eventName" label="发布状态" width="240" />
<ElTableColumn prop="eventName" label="发布用户" width="240" />
<Table :data="tableData" height="100%">
<el-table-column label="序号" type="index" :index="indexMethod" width="60"/>
<ElTableColumn label="发布时间" prop="releaseTime" width="180"/>
<ElTableColumn label="设备ID" prop="deviceId" width="120"/>
<ElTableColumn label="设备名称" prop="deviceName" />
<ElTableColumn label="桩号" prop="stakeMark" width="100" />
<el-table-column
prop="direction"
label="方向"
width="120"
:formatter="formatterDirection" />
<ElTableColumn label="内容" prop="releaseContent" width="500" header-align="center">
<template slot-scope="scope">
<el-carousel direction="horizontal" :autoplay="false" indicator-position="inside" height="80px" arrow="never" class="board_shower">
<el-carousel-item v-for="item,index in JSON.parse(scope.row.releaseContent)" :key="index">
<BoardRecordPreview :tpl="item" style="height: 100%;"/>
</el-carousel-item>
</el-carousel>
</template>
</ElTableColumn>
<ElTableColumn label="状态" prop="releaseStatus" width="120" :formatter="formatterStatus"/>
<ElTableColumn label="用户名" prop="releaseUserName" width="180" />
<ElTableColumn label="用户ID" prop="releaseUserId" width="180" />
<ElTableColumn label="用户IP" prop="releaseIp" width="200" />
<!--
<ElTableColumn label="操作" width="210">
<template slot-scope="scope">
<ElButton type="text" style="color: #00D1FF;" @click="showDisposal(scope.row.eventType)">流程配置</ElButton>
<ElButton type="text" style="color: #00EBC1;" @click="showPhrases(scope.row)">常用语</ElButton>
</template>
</ElTableColumn>
-->
</Table>
</div>
@ -56,16 +71,20 @@ import ButtonGradient from '@screen/components/Buttons/ButtonGradient.vue';
import Pagination from '@screen/components/Pagination.vue';
import Table from '@screen/components/Table.vue';
import request from "@/utils/request";
import BoardRecordPreview from '@screen/components/infoBoard/BoardRecordPreview.vue'
import {DirectionTypes} from '@screen/utils/enum.js';
export default {
name: 'boardRecord',
components: {
ButtonGradient,
Pagination,
Table
Table,
BoardRecordPreview
},
data() {
return {
testData : {"STAY":"30","ACTION":"1","SPEED":"0","COLOR":"ffff00","FONT":"3","FONT_SIZE":"32","CONTENT":"因改扩建施工 平阴南、梁山收费站出入口封闭","width":"768","height":"64","formatStyle":"2"},
tableData: [],
isShowPhrases: false,
isShowDisposal: false,
@ -83,9 +102,18 @@ export default {
this.initData();
},
methods: {
indexMethod(index) {
return this.searchData.pageSize*(this.searchData.pageNum-1) + index + 1;
},
formatterDirection(row, column) {
return DirectionTypes[row.direction];
},
formatterStatus(row, column) {
return ["","成功"][row.releaseStatus];
},
initData() {
request({
url: `/business/dcEventType/list`,
url: `/business/boardReleaseLog/list`,
method: "get",
params: this.searchData,
}).then((result) => {
@ -96,44 +124,14 @@ export default {
},
onRefresh() {
this.tableData = [];
setTimeout(() => {
this.initData();
}, 100);
this.searchData.pageNum = 1;
this.initData();
},
onSizeChange(pageSize) {
this.tableData = [];
this.searchData.pageSize = pageSize;
this.getData();
},
showPhrases(data) {
if (data?.processConfigList.length <= 0) {
Message.warning('请先配置流程!');
return;
}
let process = []
data.processConfigList.forEach(it => {
process.push({
id: it.id,
commonPhrases: it.commonPhrases,
label: it.processNode,
isActive: false,
})
})
this.process = process;
this.isShowPhrases = true;
this.eventType = data.eventType;
},
showDisposal(eventType) {
this.isShowDisposal = true;
this.eventType = eventType;
},
onClosePhrases() {
this.isShowPhrases = false
},
onCloseDisposal() {
this.isShowDisposal = false;
},
onUpdatePhrasesData(phrasesData) {
this.phrasesData = phrasesData;
this.searchData.pageNum = 1;
this.initData();
}
}
}
@ -141,14 +139,11 @@ export default {
<style lang='scss' scoped>
.board_record {
padding: 21px;
padding: 0 14px 14px;
width:100%;
height: 100%;
display: flex;
flex-direction: column;
z-index: 6;
width: 100%;
height: 100%;
.filter {
height: 60px;
@ -164,15 +159,6 @@ export default {
.body {
flex: 1;
position: relative;
overflow: hidden;
.content {
position: absolute;
width: 100%;
height: 100%;
overflow: auto;
}
}
.footer {
@ -182,5 +168,18 @@ export default {
align-items: center;
justify-content: center;
}
.board_shower{
margin: 4px;
}
::v-deep .el-carousel__indicators--horizontal{
line-height: 0; height: 16px;
.el-carousel__indicator--horizontal{
padding: 7px 4px;
}
}
::v-deep .el-table__cell div {
padding: 0 10px !important;
}
}
</style>

6
ruoyi-ui/vue.config.js

@ -31,7 +31,7 @@ module.exports = {
devServer: {
host: "0.0.0.0",
port: port,
https: true,
// https: true,
open: true,
proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy
@ -52,8 +52,8 @@ module.exports = {
// target: `http://10.0.81.204:8087`, //现场后台 刘文阁
// target: `http://10.168.69.255:8087`, //正晨后台 连现场物联 刘文阁
// target: `http://10.168.78.135:8087`, //王钦
// target: `http://10.168.66.196:8087`, //正晨后台 连现场物联 刘文阁2
target: `http://10.168.68.42:8087`, //王思祥
target: `http://10.168.66.196:8087`, //正晨后台 连现场物联 刘文阁2
// target: `http://10.168.68.42:8087`, //王思祥
// target: `http://10.168.65.194:8087`, //赵祥龙
// target: `http://10.168.65.156:8097`, //孟
// target: `http://10.168.56.165:8087`, //王家宝

Loading…
Cancel
Save