Browse Source

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

wangqin
zhangzhang 10 months ago
parent
commit
a7e2154a70
  1. 7
      ruoyi-ui/src/App.vue
  2. 32
      ruoyi-ui/src/store/modules/menu.js
  3. 36
      ruoyi-ui/src/views/JiHeExpressway/components/RecentPages/ContextMenu.vue
  4. 75
      ruoyi-ui/src/views/JiHeExpressway/components/RecentPages/index.vue
  5. 1
      ruoyi-ui/src/views/JiHeExpressway/index.vue
  6. 184
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/MeteorologicalDetection/components/DeviceControlDialog.vue
  7. 114
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/MeteorologicalDetection/components/chart.js
  8. 218
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/MeteorologicalDetection/index.vue
  9. 15
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SolarEnergy/components/DeviceParams.vue
  10. 9
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SolarEnergy/index.vue
  11. 4
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/index.vue
  12. 5
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/buttonEvent.js
  13. 44
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/httpList.js
  14. 4
      ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/TaskItem.vue
  15. 6
      ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/taskEditDialog.vue
  16. 42
      ruoyi-ui/src/views/JiHeExpressway/pages/service/boardRecord/index.vue
  17. 122
      ruoyi-ui/src/views/JiHeExpressway/utils/enum.js
  18. 4
      ruoyi-ui/vue.config.js

7
ruoyi-ui/src/App.vue

@ -21,16 +21,19 @@ export default {
name: "App",
data() {
return {
path: this.$route.path,
// path: this.$route.path,
};
},
mounted(){
this.$store.commit("menu/resetRecent");
},
components: {
websocket,
// websocket_phone
},
watch: {
$route(to, from) {
this.path = this.$route.path;
// this.path = this.$route.path;
},
},
metaInfo() {

32
ruoyi-ui/src/store/modules/menu.js

@ -1,3 +1,4 @@
import Vue from "vue"
const state = {
recentPages: [],
isRecentOpen:"",
@ -5,12 +6,12 @@ const state = {
const mutations = {
saveRecent(state){
sessionStorage.setItem("recentPages", JSON.stringify(state.recentPages));
localStorage.setItem("recentPages", JSON.stringify(state.recentPages));
},
addRecent(state, item) {
if(state.recentPages.length == 0 ){
state.recentPages = JSON.parse(sessionStorage.getItem("recentPages") || "[]");
state.recentPages = JSON.parse(localStorage.getItem("recentPages") || "[]");
}
let temp;
state.recentPages.forEach((unit,index)=>{
@ -29,13 +30,22 @@ const state = {
mutations.saveRecent(state);
},
pinRecent(state, item){
state.recentPages.forEach((unit, index) => {
if (unit.path == item.path) {
// unit.isPinned = !unit.isPinned;
Vue.prototype.$set(unit, "isPinned", !unit.isPinned);
}
});
mutations.saveRecent(state);
},
openRecent(state){
state.isRecentOpen = true;
sessionStorage.setItem("isRecentOpen", true);
localStorage.setItem("isRecentOpen", true);
},
closeRecent(state){
state.isRecentOpen = false;
sessionStorage.setItem("isRecentOpen", false);
localStorage.setItem("isRecentOpen", false);
},
removeRecent(state, item) {
let i = state.recentPages.findIndex(unit => unit.path == item.path);
@ -43,9 +53,15 @@ const state = {
mutations.saveRecent(state);
},
resetRecent(state, para){
state.isRecentOpen = false;
sessionStorage.setItem("isRecentOpen", false);
sessionStorage.removeItem("recentPages")
let temp = JSON.parse(localStorage.getItem("recentPages") || "[]");
state.recentPages = [];
temp.forEach((unit, index) => {
if (unit.isPinned) {
state.recentPages.push(unit);
}
});
localStorage.setItem("recentPages", JSON.stringify(state.recentPages));
state.isRecentOpen = true;
}
}
@ -53,7 +69,7 @@ const state = {
const getters = {
isRecentOpen(state){
if (state.isRecentOpen === ""){
state.isRecentOpen = JSON.parse(sessionStorage.getItem("isRecentOpen")) || false;
state.isRecentOpen = JSON.parse(localStorage.getItem("isRecentOpen")) || false;
}
return state.isRecentOpen;
}

36
ruoyi-ui/src/views/JiHeExpressway/components/RecentPages/ContextMenu.vue

@ -0,0 +1,36 @@
<template>
<div ref="ele" class="comp_box">
<slot></slot>
<ul class="sub_menu">
<li>菜单一</li>
</ul>
</div>
</template>
<script>
export default{
name:"ContextMenu",
data(){
return {
}
},
computed:{
},
watch:{
},
mounted(){
this.$refs["ele"].addEventListener("contextmenu", this.showMenu)
},
methods:{
showMenu(e){
e.preventDefault();
e.stopPropagation();
}
}
}
</script>
<style lang="scss" scoped>
.comp_box{
position: relative; border: 1px solid #f00;
.sub_menu{ position: absolute; z-index: 9999;border: 1px solid #0f0; left: 0; top:0; }
}
</style>

75
ruoyi-ui/src/views/JiHeExpressway/components/RecentPages/index.vue

@ -1,24 +1,39 @@
<template>
<div class="recent_pages">
<h4><i class="iconfont icon-recent"></i>最近访问:</h4>
<div class="history_buttons">
<div class="btn_left" @click="onLeft" :class="{'disabled' : startIndex <= 0 }"><i class="iconfont icon-left"></i></div>
<div class="list_box" ref="box">
<div class="list" :style="btnListStyle" ref="btnlist">
<div class="unit" :class="isActive(item) ? 'active' : ''" v-for="item,index in recentPages" ref="unit">
<p class="btn_main" @click="onClickItem(item)" :key="item.path" :style="{width:item.title.length*14+'px'}">
{{item.title}}
</p>
<i class="btn_close iconfont icon-guanbi" @click="onRemoveItem(item)"></i>
<div class="recent_pages">
<h4><i class="iconfont icon-recent"></i>
<!-- <ContextMenu>最近访问:</ContextMenu> -->
最近访问:
</h4>
<div class="history_buttons">
<div class="btn_left" @click="onLeft" :class="{'disabled' : startIndex <= 0 }"><i
class="iconfont icon-left"></i></div>
<div class="list_box" ref="box">
<div class="list" :style="btnListStyle" ref="btnlist">
<div class="unit" :class="isActive(item) ? 'active' : ''" v-for="item,index in recentPages"
ref="unit">
<p class="btn_main" @click="onClickItem(item)" :key="item.path"
:style="{width:item.title.length*14+'px'}">
{{item.title}}
</p>
<el-tooltip effect="light" content="记住" placement="bottom">
<p class="btn_pin" :class="item.isPinned ? 'active' :'unactive'" @click="onPin(item)">
<i></i>
</p>
</el-tooltip>
<!-- <p class=" btn_pin" :class="{active:item.isPinned}" @click="onPin(item)"><i></i></p> -->
<i class="btn_close iconfont icon-guanbi" @click="onRemoveItem(item)"></i>
</div>
</div>
</div>
<div class="btn_right" @click="onRight"
:class="{ 'disabled': lastIndex == -1 || lastIndex >= widthArr.length - 1 }"><i
class="iconfont icon-right"></i></div>
</div>
<div class="btn_right" @click="onRight" :class="{ 'disabled': lastIndex == -1 || lastIndex >= widthArr.length - 1 }"><i class="iconfont icon-right"></i></div>
</div>
</div>
</template>
<script>
import { mapMutations, mapState } from 'vuex';
import ContextMenu from './ContextMenu.vue';
export default{
data(){
return {
@ -31,6 +46,9 @@ export default{
currentIndex : -1
}
},
components:{
ContextMenu
},
computed:{
...mapState("menu", ["recentPages"]),
btnListStyle(){
@ -86,19 +104,15 @@ export default{
}
},
mounted(){
//
// for (let i = 0; i < 30; i++) {
// this.addRecent({
// title: `${i}`,
// path: "url" + i
// });
// }
},
methods:{
...mapMutations("menu", ["addRecent","removeRecent"]),
...mapMutations("menu", ["addRecent", "removeRecent","pinRecent"]),
onClickItem(item){
this.$route.path != item.path && this.$router.push(item.path);
},
onPin(item){
this.pinRecent(item);
},
onRemoveItem(item){
this.removeRecent(item);
if(this.$route.path == item.path){
@ -189,7 +203,7 @@ export default{
<style lang="scss" scoped>
.recent_pages{
display: flex; flex-direction: row; align-items:stretch; padding: 0 20px;
h4{ width: 110px; height: 32px; line-height: 32px; text-align: center; margin: 0; padding: 0; font-weight: bold; color: #3de8ff;
h4{ width: 110px; height: 32px; line-height: 32px; text-align: center; margin: 0; padding: 0; font-weight: bold; color: #3de8ff; display: flex; align-items: center; justify-content: center;
.iconfont{ margin-right: 3px;}
}
.history_buttons {
@ -225,7 +239,22 @@ export default{
border:1px solid #03a9b1;
}
}
.btn_pin{
position: absolute;
left:0;
bottom:0;
width:16px; height: 10px;
display: flex; align-items: center; justify-content: center;
i{
display: none;
width:6px; height: 6px; border-radius: 3px;
}
&.active i{ display: block; background-color: #FA0; }
}
&:hover .btn_pin.unactive i {
display: block;
background-color: #999;
}
.btn_close {
position: absolute;
right: 6px;

1
ruoyi-ui/src/views/JiHeExpressway/index.vue

@ -57,6 +57,7 @@ export default {
}
},
mounted(){
// this.$store.commit("menu/resetRecent");
getBoardBaseData().then(res => {
this.isShowContent = true;
});

184
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/MeteorologicalDetection/components/DeviceControlDialog.vue

@ -0,0 +1,184 @@
<template>
<Dialog v-model="modelVisible" :title="title" width="910px">
<div class="DeviceControlDialog">
<div class="headSearch">
<p>时间范围:</p>
<el-radio-group v-model="radio1" @input="onChangeRadio">
<el-radio-button label="1"></el-radio-button>
<el-radio-button label="2">月度</el-radio-button>
<el-radio-button label="3">年度</el-radio-button>
</el-radio-group>
<el-date-picker style="width:140px;" v-model="time" :type="pickerType" placeholder="请选择" :format="valueFormat"
value-format="yyyy-MM-dd" :clearable="false" @change="initData">
</el-date-picker>
</div>
<div v-if="chartVisible" class='chart LineChart' ref="LineChartRef" />
</div>
</Dialog>
</template>
<script>
import * as echarts from "echarts";
import { lineChartOption } from "./chart"
import Dialog from "@screen/components/Dialog/index.vue";
import request from "@/utils/request";
import { throttle } from "lodash"
import { Message } from "element-ui";
export default {
name: "DeviceControlDialog",
components: {
Dialog,
},
model: {
prop: "visible",
event: "update:value",
},
props: {
visible: Boolean,
deviceName: String,
btnType: Number,
},
data() {
return {
submitting: false,
chartVisible: true,
title: '气温变化趋势',
pickerType: 'date',
valueFormat: 'yyyy-MM-dd',
radio1: '1',
time: ''
};
},
computed: {
modelVisible: {
get() {
return this.visible;
},
set(val) {
this.$emit("update:value", val);
},
},
},
watch: {
visible: {
immediate: true,
handler(bool) {
if (bool) {
if (this.btnType == 1) {
this.title = '气温变化趋势'
} else {
this.title = '能见度变化趋势'
}
this.initData();
}
},
},
},
mounted() {
this.time = new Date().format('yyyy-MM-dd')
},
methods: {
async initData() {
console.log('ll', this.radio1, this.time)
let lastPath = 'deviceHour'
if (this.pickerType == 'date') {
lastPath = 'deviceHour'
} else if (this.pickerType == 'month') {
lastPath = 'deviceDay'
} else if (this.pickerType == 'year') {
lastPath = 'deviceYears'
}
let qsData = await request({
url: `/dc/system/meteorologicalDetector/${lastPath}?deviceName=${this.deviceName}&specificDate=${this.time}`,
method: "get",
})
if (qsData.code !== 200) {
return Message.error('查询气象变化趋势数据失败');
}
let times = [], datas = [];
qsData.rows.forEach(item => {
if (lastPath == 'deviceHour') {
times.push(item.timeSlot);
} else if (lastPath == 'deviceDay') {
times.push(new Date(item.date).format('dd'));
} else if (lastPath == 'deviceYears') {
times.push(new Date(item.month).format('MM'));
}
datas.push(this.btnType == 1 ? item.avgTemperature : item.avgVisibility)
})
// console.log('datas',datas)
if (lastPath == 'deviceHour') {
lineChartOption.xAxis.name = '时'
} else if (lastPath == 'deviceDay') {
lineChartOption.xAxis.name = '日'
} else if (lastPath == 'deviceYears') {
lineChartOption.xAxis.name = '月'
}
lineChartOption.xAxis.data = times;
lineChartOption.yAxis.name = this.btnType == 1 ? '℃' : '米';
lineChartOption.series[0].name = this.btnType == 1 ? '温度(℃)' : '能见度(米)'
lineChartOption.series[0].data = datas;
const chartIns = echarts.init(this.$refs.LineChartRef);
chartIns.setOption(lineChartOption);
},
async handleSubmit() {
this.$refs.DeviceParam?.handleSubmit();
},
onChangeRadio(value) {
this.time = '';
if (value == '1') {
this.pickerType = 'date'
this.valueFormat = 'yyyy-MM-dd'
} else if (value == '2') {
this.pickerType = 'month'
this.valueFormat = 'yyyy-MM'
} else if (value == '3') {
this.pickerType = 'year'
this.valueFormat = 'yyyy'
}
}
},
};
</script>
<style lang="scss" scoped>
.DeviceControlDialog {
width: 860px;
max-height: 78vh;
height: 410px;
display: flex;
flex-direction: column;
gap: 15px;
.headSearch {
display: flex;
p {
margin-right: 10px;
}
::v-deep {
.el-input__prefix {
top: -5px
}
}
}
.tips {
font-size: 12px;
}
.LineChart {
flex: 1;
height: 100%;
}
}
</style>

114
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/MeteorologicalDetection/components/chart.js

@ -0,0 +1,114 @@
import * as echarts from "echarts";
export const lineChartOption = {
color: ["#2AD9FD"],
xAxis: {
name: "时",
type: "category",
// boundaryGap: ["15%", "15%"],
nameTextStyle: {
color: "#2AD9FD",
align: "right",
fontSize: 15,
padding: [0, -15, 0, 0],
},
boundaryGap: false,
data: ['00:00','02:00','04:00','06:00'],
axisTick: {
show: false,
},
axisLabel: {
color: "#fff",
fontSize: 12,
},
axisLine: {
lineStyle: {
color: "#668598",
},
},
},
yAxis: {
name: "辆",
type: "value",
nameTextStyle: {
color: "#2AD9FD",
// align: "right",
fontSize: 15,
// padding: [0, -15, 0, 0],
},
// nameGap: 24,
splitLine: {
lineStyle: {
type: [6, 9],
color: "rgba(255,255,255, .3)",
// dashOffset: [10, 10],
// cap: 21,
// width: 2
},
},
axisLabel: {
color: "#fff",
fontSize: 12,
formatter: "{value}",
},
},
grid: {
left: 33,
top: 33,
bottom: 24,
right: 36,
},
tooltip: {
trigger: "axis",
backgroundColor: "rgba(0,0,0,0.36)",
borderWidth: 0,
textStyle: {
color: "#fff",
},
formatter: "{b}:{c}",
// formatter: function([axisData]) {
// console.log(axisData)
// let str = axisData.name + ' ' + axisData.data + '辆</br>';
// // params.forEach(item => {
// // if (item.seriesName === '供温' || item.seriesName === '回温') {
// // str += item.marker + item.seriesName + ' : ' + item.data.value + ' ℃' + '</br>';
// // } else if (item.seriesName === '压力值(Mpa)') {
// // // 柱状图渐变时设置marker
// // item.marker = '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:#6C50F3;"></span>';
// // str += item.marker + item.seriesName + ' : ' + item.data.value + ' m';
// // }
// // });
// return str;
// }
},
legend: {
textStyle: {
color: '#2AD9FD'
}
},
series: [
{
data: [1,2,3,4],
type: "line",
showSymbol: false,
smooth: true,
name: '温度(℃)',
lineStyle: {
color: "#2AD9FD",
},
areaStyle: {
opacity: 0.8,
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: "rgb(90, 227, 255, .9)",
},
{
offset: 1,
color: "rgba(42,217,253,0)",
},
]),
},
},
],
};

218
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/MeteorologicalDetection/index.vue

@ -0,0 +1,218 @@
<template>
<Dialog v-model="obverseVisible" title="气象设备" width="470px">
<div class="MeteorologicalDetection">
<Video class="video-stream" :pileNum="dialogData.stakeMark" />
<ElTabs v-model="activeName" @tab-click="handleClickTabs" class="tabs">
<ElTabPane label="基本信息" name="first">
<Descriptions labelWidth="72px" :list="list" :data="data" style="gap: 18px" />
</ElTabPane>
<ElTabPane label="气象情况" name="second">
<Descriptions labelWidth="104px" :list="weatherList" :data="weatherData" style="gap: 14px" />
</ElTabPane>
</ElTabs>
</div>
<template #footer>
<Button @click.native="deviceControlVisible = true; btnType = 1">气温变化趋势</Button>
<Button @click.native="deviceControlVisible = true; btnType = 2">能见度变化趋势</Button>
</template>
<!-- 设备操作弹窗 -->
<DeviceControlDialog v-model="deviceControlVisible" :deviceName="dialogData.deviceName" :btnType="btnType" />
</Dialog>
</template>
<script>
import Dialog from "@screen/components/Dialog/index.vue";
import Descriptions from "@screen/components/Descriptions.vue";
import Button from "@screen/components/Buttons/Button.vue";
import {
getRoadInfoByStakeMark,
getProduct,
getMeteorologicalDetector
} from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js";
import Video from "@screen/components/Video";
import DeviceControlDialog from "./components/DeviceControlDialog.vue";
import request from "@/utils/request";
import { dialogDelayVisible } from "./../mixin";
import LineChart from "../../LineChart/index.vue";
//
export default {
name: "MeteorologicalDetection",
mixins: [dialogDelayVisible],
components: {
Dialog,
Descriptions,
Video,
DeviceControlDialog,
Button,
LineChart,
},
data() {
return {
activeName: "first",
deviceControlVisible: false,
data: {
deviceType: "行车诱导",
deviceStation: "k094+079",
roadName: "G35济泽高速",
direction: "1",
deviceState: "0",
deviceVendors: "XXX厂家",
},
btnType: 1,
weatherData: {},
list: [
{
label: "设备名称",
key: "deviceName",
},
{
label: "设备桩号",
key: "stakeMark",
},
{
label: "道路名称",
key: "roadName",
},
{
label: "设备方向",
key: "direction",
enum: "CameraDirectionEnum",
},
{
label: "设备状态",
key: "deviceState",
enum: "DeviceTypeEnum",
},
{
label: "设备厂商",
key: "manufacturer",
},
],
weatherList: [
{
label: "路面状态",
key: "remoteRoadSurfaceStatus",
enum: "remoteRoadSurfaceStatus",
},
{
label: "路表温度(℃)",
key: "remoteRoadSurfaceTemperature",
},
{
label: "下雨类型",
key: "precipitationType",
enum: "precipitationType",
},
{
label: "雨量(mm)",
key: "rainfall",
},
{
label: "能见度类型",
key: "visibilityType",
enum: "visibilityType",
},
{
label: "能见度(km)",
key: "visibility",
},
{
label: "温度(℃)",
key: "temperature",
},
{
label: "湿度",
key: "humidity",
},
{
label: "风向",
key: "windDirection",
},
{
label: "风速(m/s)",
key: "windSpeed",
},
{
label: "水膜厚度(mm)",
key: "waterFilmlceSnowValue",
},
{
label: "大气压力(hPa)",
key: "atmosphericPressure",
},
{
label: "时间",
key: "createTime",
gridColumn: 2,
},
]
};
},
async created() {
this.data = { ...this.dialogData };
getProduct(this.dialogData.productId).then((data) => {
this.dialogData.brand = data.brand;
});
const roadInfo = await getRoadInfoByStakeMark(this.dialogData.stakeMark);
if (roadInfo) this.$set(this.data, "roadName", roadInfo.roadName);
const weatherInfo = await getMeteorologicalDetector(this.dialogData.deviceName)
this.weatherData = { ...weatherInfo }
},
methods: {
handleClickTabs() { },
},
};
</script>
<style lang="scss" scoped>
.MeteorologicalDetection {
width: 420px;
color: #fff;
display: flex;
flex-direction: column;
gap: 12px;
// padding-bottom: 24px;
.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>

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

@ -63,12 +63,15 @@ export default {
}).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;
if (item.propertyName) {
devs.push({
label: item.propertyName,
key: item.property,
gridColumn: 3,
});
this.devicesData[item.property] = item.formatValue;
}
});
this.devicesList = devs;
})

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

@ -156,11 +156,18 @@ div.switcher {
<style lang="scss" scoped>
.SolarEnergy {
width: 508px;
// height: 240px;
// height: 248px;
color: #fff;
display: flex;
flex-direction: column;
::v-deep {
.el-tabs__content {
overflow-y: auto;
max-height: 220px;
}
}
.camera-video {
flex: 1.5;
}

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

@ -51,6 +51,7 @@ import RemoteMachine from "./../Dialogs/RemoteMachine/index.vue";
import SolarEnergy from "./../Dialogs/SolarEnergy/index.vue";
import Intermodulation from "./../Dialogs/Intermodulation/index.vue";
import GuardrailCollision from "./../Dialogs/GuardrailCollision/index.vue";
import MeteorologicalDetection from "./../Dialogs/MeteorologicalDetection/index.vue";
import FatigueWakesUp from "./../Dialogs/FatigueWakesUp/index.vue";
import { addInGraphHandle, markerClusterIns } from "./utils/map"
@ -73,7 +74,8 @@ export default {
GuardrailCollision,
FatigueWakesUp,
RoadNetworkFacilities,
RemoteMachine
RemoteMachine,
MeteorologicalDetection
},
data() {
return {

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

@ -70,6 +70,7 @@ export const DeviceForMap = {
},
气象检测器: {
deviceType: "3",
dialog: "MeteorologicalDetection",
},
疲劳唤醒: {
deviceType: "10",
@ -111,7 +112,7 @@ function resolveDataOptions(data, config, component, isDefault) {
name: "",
config: {
markerClick: (extData, item) => {
const formData = extData?.otherConfig
const formData = (extData?.otherConfig && typeof extData?.otherConfig !== 'string')
? JSON.parse(extData.otherConfig)
: null;
// formData.pictures = ["https://pic1.zhimg.com/80/v2-c00beaae1f6e3c09a6d77c16c70002fe_1440w.webp?source=1def8aca","https://pic1.zhimg.com/80/v2-c56626621906417a453d262ac11f3385_1440w.webp?source=1def8aca"]
@ -121,7 +122,7 @@ function resolveDataOptions(data, config, component, isDefault) {
data: {
...extData,
formData,
parseOtherConfig: JSON.parse(extData.otherConfig || "{}"),
parseOtherConfig: JSON.parse((extData.otherConfig && typeof extData.otherConfig !== 'string')|| "{}"),
_itemData: item,
},
};

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

@ -205,7 +205,7 @@ const DeviceTypeMap = {
14: "光线在线监测",
*/
export function getDeviceList(deviceType, options) {
console.log(deviceType, options,'------------')
console.log(deviceType, options, "------------");
return new Promise((resolve, reject) => {
if (!deviceType) {
// Message.error(`${DeviceTypeMap[deviceType]}设备加载失败!`);
@ -223,13 +223,13 @@ export function getDeviceList(deviceType, options) {
let data = {
deviceType: deviceType,
endStakeMark: newEndStakeMark,
startStakeMark: newStartStakeMark
}
if(options.childType && options.childType.split('-')[0] === deviceType){
data.childType = options.childType
startStakeMark: newStartStakeMark,
};
if (options.childType && options.childType.split("-")[0] === deviceType) {
data.childType = options.childType;
}
if(options.deviceState && options.deviceState !== ''){
data['deviceState'] = options.deviceState
if (options.deviceState && options.deviceState !== "") {
data["deviceState"] = options.deviceState;
}
request(
Object.keys(options || {}).length
@ -461,3 +461,33 @@ export function getRoadNetworkFacilitiesList(facilityType, options = {}) {
});
});
}
/**
* 气象检测器 获取气象信息
* @param {string} deviceName
*/
export function getMeteorologicalDetector(deviceName, options = {}) {
return new Promise((resolve, reject) => {
if (!deviceName) {
Message.error(`气象信息加载失败!`);
return reject();
}
request({
url: `/dc/system/meteorologicalDetector/device/${deviceName}`,
method: "get",
})
.then(({ code, rows }) => {
if (code != 200) {
reject();
return Message.error(`气象信息加载失败!`);
}
resolve(rows[0] || {});
})
.catch(() => {
Message.error(`气象信息加载失败!`);
reject();
});
});
}

4
ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/TaskItem.vue

@ -107,7 +107,7 @@ export default {
// temp.functions[1].params.CONTENT = temp.functions[1].params.CONTENT.replaceAll(/\\n/g, '\\\\n').replaceAll(/=/g, '\\=').replaceAll(/,/g, '\\,').replaceAll(/&nbsp/g, ' ');
let params = {};
if (temp.deviceType == '2'){
params = temp.functions[1].params
params = temp.functions[1].params.parameters[0]
} else if (temp.deviceType == '5'){
params = temp.functions[0].params
} else if (temp.deviceType == '10') {
@ -202,7 +202,7 @@ export default {
.text{ flex: 1; display: flex; align-items: center; justify-content: center; word-break: break-all;}
.center{ flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center;}
}
.button{ width:140px; margin-left: 10px; display: flex; align-items: center;}
.button{ width:120px; margin-left: 10px; display: flex; align-items: center; justify-content: flex-end;}
}
}
</style>

6
ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/taskEditDialog.vue

@ -6,7 +6,8 @@
<el-radio-button v-for="item in deviceTypeOptions" :key="item.value" :label="item.label" :value="item.value"
v-if="item.timingControl"></el-radio-button>
</el-radio-group> -->
<el-select v-model="searchData.deviceType" placeholder="请选择设备类型" @change="onSelectDeviceType">
<el-select v-model="searchData.deviceType" placeholder="请选择设备类型" @change="onSelectDeviceType"
:disabled="mode=='edit'">
<el-option v-for="item in deviceTypeOptions" :key="item.value" :label="item.label" :value="item.value+''"
v-if="item.timingControl">
</el-option>
@ -196,8 +197,8 @@ export default {
handler(bool) {
if (!bool) return;
this.propData?.id ? this.mode = 'edit' : this.mode = 'add';
this.transformData();
this.initBasicData();
this.transformData();
},
},
},
@ -220,6 +221,7 @@ export default {
this.editData.devices = _.map(this.propData.devices, "id");
// { "STAY": 90, "ACTION": "1", "SPEED": "0", "COLOR": "ffff00", "FONT": "3", "FONT_SIZE": "24", "CONTENT": "\\\\n", "width": "160", "height": "80", "formatStyle": "2" }
if (this.propData.deviceType == "2"){
console.log(this.propData.params , "++========");
this.editData.type2 = BoardUtils.contentToDeviceItem(this.propData.params);
} else if (["5","10","13"].includes(this.propData.deviceType)){
this.editData["type" + this.propData.deviceType] = { ...this.propData.params};

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

@ -22,36 +22,36 @@
<!-- 内容 -->
<div class="body">
<Table :data="tableData" height="100%">
<el-table-column label="序号" type="index" :index="indexMethod" width="60" />
<ElTableColumn label="发布时间" prop="operTime" width="180" />
<ElTableColumn label="设备ID" prop="dcDeviceId" width="120" />
<el-table-column label="序号" type="index" :index="indexMethod" width="100" />
<ElTableColumn label="发布时间" prop="operTime" width="280">
<template slot-scope="scope">
{{ moment(scope.row.operTime).format("yyyy/MM/DD hh:mm") }}
</template>
</ElTableColumn>
<ElTableColumn label="设备ID" prop="dcDeviceId" width="120">
<template slot-scope="scope">
{{ JSON.parse(scope.row.dcDeviceId).join("、") }}
</template>
</ElTableColumn>
<ElTableColumn label="设备名称" prop="dcDeviceName" />
<!-- <ElTableColumn label="桩号" prop="stakeMark" width="100" /> -->
<!-- <el-table-column prop="direction" label="方向" width="110" :formatter="formatterDirection" /> -->
<ElTableColumn label="内容" prop="operParam" width="500" header-align="center">
<ElTableColumn label="内容" prop="operParam" width="400" header-align="center">
<template slot-scope="scope">
{{ scope.row.operParam }}
<!-- {{ scope.row.operParam && scope.row.operParam.functions && scope.row.operParam.functions[1] && scope.row.operParam.functions[1].params }} -->
<!-- <el-carousel direction="horizontal" :autoplay="false" indicator-position="inside" height="80px"
<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.operParam).paremeters" :key="index">
<el-carousel-item v-for="item,index in JSON.parse(scope.row.operParam)[0].functions[1].params.parameters"
:key="index">
<BoardRecordPreview :tpl="item" style="height: 100%;" />
</el-carousel-item>
</el-carousel> -->
</el-carousel>
</template>
</ElTableColumn>
<ElTableColumn label="状态" prop="status" width="80" :formatter="formatterStatus" />
<ElTableColumn label="用户名" prop="operName" width="120" />
<!-- <ElTableColumn label="用户ID" prop="operName" width="120" /> -->
<ElTableColumn label="用户IP" prop="operIp" width="200" />
<!--
<ElTableColumn label="操作" width="210">
<ElTableColumn label="状态" prop="status" width="140" :formatter="formatterStatus" />
<ElTableColumn label="用户名" prop="operName" width="160" />
<ElTableColumn label="用户IP" prop="operIp" width="200">
<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>
{{ ["unknown"].includes(scope.row.operIp) ? "" : scope.row.operIp }}
</template>
</ElTableColumn>
-->
</Table>
</div>
@ -74,6 +74,7 @@ import BoardRecordPreview from '@screen/components/infoBoard/BoardRecordPreview.
import {DirectionTypes} from '@screen/utils/enum.js';
import InputSearch from "@screen/components/InputSearch/index.vue";
import { searchFormList } from "./data";
import moment from "moment";
export default {
name: 'boardRecord',
@ -86,6 +87,7 @@ export default {
},
data() {
return {
moment,
testData : {"STAY":"30","ACTION":"1","SPEED":"0","COLOR":"ffff00","FONT":"3","FONT_SIZE":"32","CONTENT":"因改扩建施工 平阴南、梁山收费站出入口封闭","width":"768","height":"64","formatStyle":"2"},
tableData: [],
searchFormList,

122
ruoyi-ui/src/views/JiHeExpressway/utils/enum.js

@ -126,7 +126,7 @@ export const RoadNFTopics = {
服务区: 6,
停车区: 7,
清障驻点: 8,
边坡: 9
边坡: 9,
};
// 事件类型 eventType
@ -168,21 +168,21 @@ export const InfoWarningSource = {
};
export const warningSourceMapping = {
1: '视频AI',
2: '雷达识别',
3: '锥桶',
4: '护栏碰撞',
5: '扫码报警',
6: '非机预警',
1: "视频AI",
2: "雷达识别",
3: "锥桶",
4: "护栏碰撞",
5: "扫码报警",
6: "非机预警",
// 7: '气象监测器'
}
};
export const warningStateMapping = {
1: '上报',
2: '已完成',
3: '已终止',
4: '自动结束'
}
1: "上报",
2: "已完成",
3: "已终止",
4: "自动结束",
};
// 感知事件主类 warningType
export const WarningType = {
@ -288,16 +288,16 @@ export const trafficType = Object.keys(EventTopics).reduce((prev, now) => {
//激光疲劳唤醒工作模式
export const awakerWorkModeDic = {
"0": "激光关闭",
"1": "常亮模式",
"2": "间隔100ms闪烁模式",
"3": "间隔200ms闪烁模式",
"4": "间隔500ms闪烁模式",
"5": "2次闪烁模式",
"6": "SOS模式",
"7": "自定义模式1",
"8": "自定义模式2",
"9": "自定义模式3",
0: "激光关闭",
1: "常亮模式",
2: "间隔100ms闪烁模式",
3: "间隔200ms闪烁模式",
4: "间隔500ms闪烁模式",
5: "2次闪烁模式",
6: "SOS模式",
7: "自定义模式1",
8: "自定义模式2",
9: "自定义模式3",
};
// 感知事件主类的子类(上方) warningSubclass
@ -1077,14 +1077,14 @@ export const EventSubclass = {
"9-6": "其他",
"10-1": "雨",
"10-2": "雪",
"10-3":"雾",
"10-4":"大风",
"10-5":"低温寒潮",
"10-6":"路面积雪",
"10-7":"路面结冰",
"10-8":"路面积水",
"10-9":"其他",
"11-1":"其他事件"
"10-3": "雾",
"10-4": "大风",
"10-5": "低温寒潮",
"10-6": "路面积雪",
"10-7": "路面结冰",
"10-8": "路面积水",
"10-9": "其他",
"11-1": "其他事件",
};
export const directionOptions = [
{ value: "1", label: "菏泽方向" },
@ -1181,4 +1181,62 @@ export const usageStatus = {
1: {
text: "未使用",
},
}
};
//路面类型
export const remoteRoadSurfaceStatus = {
"00": {
text: "干燥",
},
"01": {
text: "潮湿",
},
"02": {
text: "积水",
},
"03": {
text: "结冰",
},
"04": {
text: "积雪",
},
"05": {
text: "冰水混合物",
},
"06": {
text: "泥泞",
},
};
//下雨类型
export const precipitationType = {
0: {
text: "无降雨",
},
1: {
text: "雨",
},
2: {
text: "雪",
},
3: {
text: "毛毛雨",
},
4: {
text: "雨夹雪",
},
};
//能见度类型
export const visibilityType = {
4: {
text: "良好",
},
3: {
text: "阴霾",
},
2: {
text: "雾",
},
1: {
text: "浓雾",
},
};

4
ruoyi-ui/vue.config.js

@ -52,9 +52,9 @@ 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.66.196:8087`, //正晨后台 连现场物联 刘文阁2
// target: `http://10.168.68.42:8087`, //王思祥
target: `http://10.168.72.174:8087`, //赵祥龙
// target: `http://10.168.72.174:8087`, //赵祥龙
// target: `http://10.168.65.156:8097`, //孟
// target: `http://10.168.56.165:8087`, //王家宝
// target: `http://10.168.77.128:8087`, //王兴琳

Loading…
Cancel
Save