Browse Source

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

wangqin
zhangzhang 11 months ago
parent
commit
8a34b89ddc
  1. 2
      ruoyi-ui/src/views/JiHeExpressway/components/Descriptions.vue
  2. 40
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/PerceiveEvent/index.vue
  3. 1
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/components/DeviceControlDialog.vue
  4. 24
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/components/DeviceParams.vue
  5. 45
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/index.vue
  6. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/emergencyProcessManagement/commonPhrases/index.vue
  7. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/emergencyProcessManagement/disposalProcess/index.vue
  8. 32
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/index.vue
  9. 88
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/addAndEditDialog/index.vue
  10. 60
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/formTable/index.vue
  11. 48
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/index.vue
  12. 18
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventSource/index.vue
  13. 207
      ruoyi-ui/src/views/JiHeExpressway/utils/enum.js

2
ruoyi-ui/src/views/JiHeExpressway/components/Descriptions.vue

@ -1,7 +1,7 @@
<template>
<div class="Descriptions keep-ratio" origin="left" :style="getStyle()">
<div class="item" v-for="(item, index) in getResolveList" :key="`${item.key || item.label}${index}`"
:style="[gridStyle(item, index), transformStyle(itemStyle)]">
:style="[gridStyle(item, index), transformStyle(itemStyle)]" v-if="item.visible != false">
<div class="text title" :style="{...transformStyle(titleStyle), width: labelWidth }">
<p>
<slot :name="`title-${item.key || item.label}`" :data="item">

40
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/PerceiveEvent/index.vue

@ -3,41 +3,24 @@
<div class="PerceiveEvent">
<!-- <Video class="item-video" /> -->
<div class="video-pic">
<Video
style="height: 100%; flex: 1"
:showHeader="false"
:url="dialogData.formData.videoList[0]"
videoType="mp4"
/>
<Carousel
style="flex: 1; height: 100%"
:pictures="dialogData.formData.pictures"
/>
<Video style="height: 100%; flex: 1" :showHeader="false" :url="dialogData.formData.videoList[0]"
videoType="mp4" />
<Carousel style="flex: 1; height: 100%" :pictures="dialogData.formData.pictures" />
</div>
<LineChart class="chart" />
<Form
class="form"
v-loading="loading"
v-model="data"
ref="FormConfigRef"
:formList="formList"
column="1"
/>
<Form class="form" v-loading="loading" v-model="data" ref="FormConfigRef" :formList="formList" column="1" />
</div>
<template #footer>
<Button>误报</Button>
<Button
style="background-color: rgba(0, 179, 204, 0.3)"
@click.native="obverseVisible = false"
>取消</Button
>
<Button style="background-color: rgba(0, 179, 204, 0.3)" @click.native="obverseVisible = false">取消</Button>
<Button @click.native="updateEvent" :loading="btnLoading">确定</Button>
</template>
</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";
@ -48,10 +31,9 @@ import request from "@/utils/request";
import { Message } from "element-ui";
import moment from "moment";
import Carousel from "@screen/pages/control/event/event/EventDetailDialog/Carousel";
import { WarningTypeList, WarningSubclassList } from "@screen/utils/enum.js";
import { WarningTypeList, WarningSubclassList, LaneOccupancyList, DirectionTypes } from "@screen/utils/enum.js";
// import { getRoadInfoByStakeMark, getProduct } from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js"
import { dialogDelayVisible } from "./../mixin";
import { LaneOccupancyList, DirectionTypes } from "@screen/utils/enum.js";
let vehicleTypeList = [];
@ -138,7 +120,7 @@ export default {
},
ons: {
change: (value, { data }) => {
this.formList[4].options.options =
this.formList[5].options.options =
WarningSubclassList[value] || [];
data.warningSubclass = null;
},
@ -197,7 +179,7 @@ export default {
this.getDetails();
this.getVehicleTypeList();
},
async mounted() {},
async mounted() { },
beforeDestroy() {
clearInterval(this.interval);
},
@ -220,7 +202,7 @@ export default {
})
);
})
.catch((err) => {});
.catch((err) => { });
},
convertSecToHHmmss(sec) {
let currentTime = moment.duration(sec, "seconds");
@ -277,7 +259,7 @@ export default {
lane: data.lane?.split(",") || [],
};
this.formList[4].options.options =
this.formList[5].options.options =
WarningSubclassList[data.warningType] || [];
setTimeout(() => {

1
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/components/DeviceControlDialog.vue

@ -2,7 +2,6 @@
<Dialog v-model="modelVisible" title="设备操作">
<div class='DeviceControlDialog'>
<DeviceParams :dialogData="dialogData" />
</div>
</Dialog>
</template>

24
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/components/DeviceParams.vue

@ -6,7 +6,7 @@
<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="data.state?'dark':''" :type="data.state?'':'info'">{{ data.state?'开':'关' }}</ElTag>
<ElTag style="margin-left: 20px;" v-else effect="dark" :type="data.state?'':'info'">{{ data.state?'开':'关' }}</ElTag>
</template>
</Descriptions>
</div>
@ -51,34 +51,16 @@ export default {
// https://www.yuque.com/dayuanzhong-ovjwn/gkht0m/ww776d5kzs72ilzh?singleDoc=
//
request({
url: `/business/device/properties/latest/${this.dialogData.iotDeviceId || '10.0.36.143-1883'}`,
url: `/business/device/properties/latest/${this.dialogData.iotDeviceId || '10.0.36.143-1883'}/1`,
method: "get",
params: {}
}).then(result => {
if (result.code != 200) return;
const [deviceInfo] = result.data;
const deviceInfo = result.data;
const typeMap = {
ac: '220v',
dc: '12v',
}
// {
// ac_out_electricity_1 :"0.07A"
// ac_out_electricity_2 :"4.69A"
// ac_out_voltage_1 :"217.26V"
// ac_out_voltage_2 :"217.30V"
// dc_out_electricity_1 :"0.00A"
// dc_out_electricity_2 :"0.00A"
// dc_out_voltage_1 :"11.44V"
// dc_out_voltage_2 :"11.45V"
// door_status :"1"
// fan_status :"0"
// humidity :"20.3"
// power_status :"1"
// temperature :"18.4"
// }
for (const key in deviceInfo.formatValue) {
// electricity
// voltage

45
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/index.vue

@ -5,6 +5,7 @@
<div class="SmartDevice">
<ElTabs v-model="activeName" class="tabs">
<ElTabPane label="基本信息" name="first">
<!-- {{ dialogData }} -->
<Descriptions :list="list" :data="data" style="gap: 18px" />
</ElTabPane>
<ElTabPane label="设备参数" name="second">
@ -20,13 +21,8 @@
</ElTabs>
</div>
<template #footer>
<Button
v-if="data.deviceState == '1'"
@click.native="deviceControlVisible = true"
>
设备操作
</Button>
<Button v-else style="background-color: #bbb"> 设备离线 </Button>
<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
@ -45,11 +41,14 @@ 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 {
@ -99,7 +98,13 @@ export default {
{
label: "设备状态",
key: "deviceState",
enum: "DeviceTypeEnum",
// enum: "DeviceTypeEnum",
visible: false
},
{
label: "设备状态",
key: "deviceStateLiteral",
// enum: "DeviceTypeEnum",
},
{
label: "设备厂商",
@ -111,14 +116,15 @@ export default {
async created() {
// if (!this.dialogData.iotDeviceId) this.dialogData.iotDeviceId = '10.0.36.146-1883';
this.data = { ...this.dialogData, roadName: null };
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,
"+++========"
);
// 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;
@ -128,6 +134,15 @@ export default {
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>

2
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/emergencyProcessManagement/commonPhrases/index.vue

@ -4,7 +4,7 @@
<div class="header">
<el-form ref="form" label-width="120px">
<el-form-item label="事件类型">
<el-select v-model="eventType" placeholder="请选择" style="width: 220px">
<el-select v-model="eventType" placeholder="请选择" style="width: 220px" disabled>
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>

2
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/emergencyProcessManagement/disposalProcess/index.vue

@ -3,7 +3,7 @@
<div class="header">
<el-form ref="form" label-width="120px">
<el-form-item label="事件类型">
<el-select v-model="eventType" placeholder="请选择" style="width: 220px">
<el-select v-model="eventType" placeholder="请选择" style="width: 220px" disabled>
<el-option v-for="item in eventTypeOptions" :key="item.value" :label="item.label"
:value="item.value">
</el-option>

32
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/index.vue

@ -171,16 +171,28 @@ export default {
// this.modelVisible = false;
// this.$emit('queryData', true);
// return;
request({
url: `/business/warning/delete`,
method: "post",
data: { id: this.formData.id }
}).then(result => {
if (result.code == 200) Message.success('成功!');
else Message.error(result?.msg);
this.modelVisible = false;
this.$emit('queryData', true);
})
if (this.activeName == '-1') {
request({
url: `/business/warning/delete`,
method: 'post',
data: { id: this.formData.id }
}).then(result => {
if (result.code == 200) Message.success('成功!');
else Message.error(result?.msg);
this.modelVisible = false;
this.$emit('queryData', true);
})
} else {
request({
url: `dc/system/event/${this.formData.eventType}/${this.formData.id}`,
method: 'delete',
}).then(result => {
if (result.code == 200) Message.success('成功!');
else Message.error(result?.msg);
this.modelVisible = false;
this.$emit('queryData', true);
})
}
})
}

88
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/addAndEditDialog/index.vue

@ -68,25 +68,12 @@ import Button from '@screen/components/Buttons/Button.vue';
import request from '@/utils/request';
import { Message } from "element-ui";
import { throttle } from "lodash"
import { controlModelMap, gzztMap, eventSubClassMap, trafficKV, perceptionKV } from "@screen/utils/enum.js";
import { controlModelMap, gzztMap, gzmsMap, eventSubClassMap, trafficKV, perceptionKV } from "@screen/utils/enum.js";
const typeMap = {
1: trafficKV,
2: perceptionKV
}
const gzmsMap = {
"SETMD0": "激光关闭",
"SETMD1": "常亮模式",
"SETMD2": "间隔100ms闪烁模式",
"SETMD3": "间隔200ms闪烁模式",
"SETMD4": "间隔500ms闪烁模式",
"SETMD5": "2次闪烁模式",
"SETMD6": "SOS模式",
"SETMD7": "自定义模式1",
"SETMD8": "自定义模式2",
"SETMD9": "自定义模式3",
}
2: perceptionKV,
};
export default {
name: 'addAndEditDialog',
@ -134,72 +121,29 @@ export default {
qbb: ''
}],
deviceData: [],
eventOptions: [
{
value: 1,
label: '交通事故'
},
{
value: 2,
label: '车辆故障'
},
{
value: 3,
label: '交通管制'
},
{
value: 4,
label: '交通拥堵'
},
{
value: 5,
label: '非法上路'
},
eventOptions: trafficKV,
mechanismOptions: [
{
value: 6,
label: '路障清除'
value: "1-1",
label: "追尾",
},
{
value: 7,
label: '施工建设'
value: "1-2",
label: "侧翻",
},
{
value: 8,
label: '服务区异常'
value: "1-3",
label: "撞护栏",
},
{
value: 9,
label: '设施设备隐患'
value: "1-4",
label: "自然",
},
{
value: 10,
label: '异常天气'
value: "1-5",
label: "其他事故",
},
{
value: 11,
label: '其他事件'
}
],
mechanismOptions: [{
value: "1-1",
label: "追尾",
},
{
value: "1-2",
label: "侧翻",
},
{
value: "1-3",
label: "撞护栏",
},
{
value: "1-4",
label: "自然",
},
{
value: "1-5",
label: "其他事故",
}],
rules: {
planName: [
{ required: true, message: '请输入预案名称', trigger: 'blur' },
@ -319,7 +263,7 @@ export default {
changeRadio(value = 1) {
this.formData.triggerMechanism = '';
this.eventOptions = typeMap[value];
this.changeEventType();
this.changeEventType(1);
},
handleChange() {

60
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/formTable/index.vue

@ -97,6 +97,7 @@ import Button from '@screen/components/Buttons/Button.vue';
import request from "@/utils/request";
import QbbDialog from "../qbbDialog/index.vue";
import { Message } from 'element-ui'
import { planDeviceOptions } from "@screen/utils/enum.js";
export default {
@ -133,64 +134,7 @@ export default {
// }
// ],
isShowDialog: false,
deviceOptions: [
{
value: 1,
label: '摄像机'
},
{
value: 2,
label: '可变信息标志'
},
{
value: 3,
label: '气象监测器'
},
{
value: 4,
label: '出口诱导灯'
},
{
value: 5,
label: '路段语音广播'
},
{
value: 6,
label: '护栏碰撞'
},
{
value: 7,
label: '毫米波雷达'
},
{
value: 8,
label: '合流区预警'
},
{
value: 9,
label: '智慧锥桶'
},
{
value: 10,
label: '激光疲劳唤醒'
},
{
value: 11,
label: '类交通量调查站'
},
{
value: 12,
label: '行车诱导'
},
{
value: 13,
label: '智能设备箱'
},
{
value: 14,
label: '光线在线监测'
}
],
deviceOptions: planDeviceOptions,
zyOptions: [
{
value: 1,

48
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/index.vue

@ -28,8 +28,8 @@
<ElTableColumn prop="strEventType" label="事件类型" width="100" align="center" />
<ElTableColumn prop="planName" label="预案名称" width="140" align="center" />
<ElTableColumn prop="triggeringCondition" label="检索条件" width="140" />
<ElTableColumn prop="deviceType" label="设备类型" />
<ElTableColumn prop="controllableDeviceName" label="可控设备"/>
<ElTableColumn prop="deviceType" label="设备类型" />
<ElTableColumn prop="controllableDeviceName" label="可控设备" />
<ElTableColumn prop="controlCommand" label="控制指令" />
<ElTableColumn label="操作" width="210" align="center">
<template slot-scope="scope">
@ -63,49 +63,11 @@ import request from "@/utils/request";
import { confirm } from "@screen/utils/common";
import { Message } from 'element-ui'
import { searchFormList } from './data';
import { WarningType, trafficType } from "@screen/utils/enum.js";
const eventTypeMap = {
0: {},
1: {
1: '交通事故',
2: '车辆故障',
3: '交通管制',
4: '交通拥堵',
5: '非法上路',
6: '路障清除',
7: '施工建设',
8: '服务区异常',
9: '设施设备隐患',
10: '异常天气',
11: '其他事件',
},
2: {
1: '异常天气',
2: '拥堵',
3: '非机动车',
4: '行人',
5: '烟火',
6: '抛洒物',
7: '逆行',
},
3: {}
}
const deviceMap = {
1: '摄像机',
2: '可变信息标志',
3: '气象监测器',
4: '出口诱导灯',
5: '路段语音广播',
6: '护栏碰撞',
7: '毫米波雷达',
8: '合流区预警',
9: '智慧锥桶',
10: '激光疲劳唤醒',
11: '类交通量调查站',
12: '行车诱导',
13: '智能设备箱',
14: '光线在线监测',
1: trafficType,
2: WarningType,
}
export default {

18
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventSource/index.vue

@ -98,11 +98,11 @@ export default {
name: "非机预警",
percent: 0.1,
},
{
average: 0,
name: "气象监测器",
percent: 0.1,
},
// {
// average: 0,
// name: "",
// percent: 0.1,
// },
];
data.forEach((it) => {
if (it.warningSource == 1) {
@ -123,9 +123,9 @@ export default {
if (it.warningSource == 6) {
chartData[5].average += it.number;
}
if (it.warningSource == 7) {
chartData[6].average += it.number;
}
// if (it.warningSource == 7) {
// chartData[6].average += it.number;
// }
// total ++;
// drawRoundRect(context, 231, 37 + (index * 27), 138, 20, 12, gr);
});
@ -223,7 +223,7 @@ export default {
drawRoundRect(context, 202, 80, 280, 20, 10, gr);
drawRoundRect(context, 202, 104, 280, 20, 10, gr);
drawRoundRect(context, 202, 128, 280, 20, 10, gr);
drawRoundRect(context, 202, 152, 280, 20, 10, gr);
// drawRoundRect(context, 202, 152, 280, 20, 10, gr);
this.myChart = myChart;
});

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

@ -163,6 +163,21 @@ export const WarningType = {
99: "其他事件",
};
// 交通事件主类
export const trafficType = {
1: "交通事故",
2: "车辆故障",
3: "交通管制",
4: "交通拥堵",
5: "非法上路",
6: "路障清除",
7: "施工建设",
8: "服务区异常",
9: "设施设备隐患",
10: "异常天气",
11: "其他事件",
};
export const WarningTypeList = Object.keys(WarningType).map((key) => {
return {
value: key * 1,
@ -295,60 +310,54 @@ export const trafficKV = [
];
//========= 感知事件 主类(key vulue)=========
export const perceptionKV = [
[
{
value: 1,
label: "交通拥堵",
},
{
value: 2,
label: "行人",
},
{
value: 3,
label: "非机动车",
},
{
value: 4,
label: "停车",
},
{
value: 5,
label: "违规驾驶",
},
{
value: 6,
label: "路障",
},
{
value: 7,
label: "道路施工",
},
{
value: 8,
label: "异常天气",
},
,
{
value: 9,
label: "护栏碰撞",
},
,
{
value: 10,
label: "交通事故",
},
,
{
value: 11,
label: "车辆故障",
},
,
{
value: 99,
label: "其他事件",
},
],
{
value: 1,
label: "交通拥堵",
},
{
value: 2,
label: "行人",
},
{
value: 3,
label: "非机动车",
},
{
value: 4,
label: "停车",
},
{
value: 5,
label: "违规驾驶",
},
{
value: 6,
label: "路障",
},
{
value: 7,
label: "道路施工",
},
{
value: 8,
label: "异常天气",
},
{
value: 9,
label: "护栏碰撞",
},
{
value: 10,
label: "交通事故",
},
{
value: 11,
label: "车辆故障",
},
{
value: 99,
label: "其他事件",
},
];
//交通事件、感知事件 子类(key vulue)预案使用
export const eventSubClassMap = {
@ -820,6 +829,96 @@ export const eventSubClassMap = {
},
};
//激光疲劳唤醒 工作模式
export const gzmsMap = {
SETMD0: "激光关闭",
SETMD1: "常亮模式",
SETMD2: "间隔100ms闪烁模式",
SETMD3: "间隔200ms闪烁模式",
SETMD4: "间隔500ms闪烁模式",
SETMD5: "2次闪烁模式",
SETMD6: "SOS模式",
SETMD7: "自定义模式1",
SETMD8: "自定义模式2",
SETMD9: "自定义模式3",
};
//预案设备列表
export const planDeviceMap = {
1: "摄像机",
2: "可变信息标志",
3: "气象监测器",
4: "出口诱导灯",
5: "路段语音广播",
6: "护栏碰撞",
7: "毫米波雷达",
8: "合流区预警",
9: "智慧锥桶",
10: "激光疲劳唤醒",
11: "类交通量调查站",
12: "行车诱导",
13: "智能设备箱",
14: "光线在线监测",
};
//预案设备Options
export const planDeviceOptions = [
{
value: 1,
label: "摄像机",
},
{
value: 2,
label: "可变信息标志",
},
{
value: 3,
label: "气象监测器",
},
{
value: 4,
label: "出口诱导灯",
},
{
value: 5,
label: "路段语音广播",
},
{
value: 6,
label: "护栏碰撞",
},
{
value: 7,
label: "毫米波雷达",
},
{
value: 8,
label: "合流区预警",
},
{
value: 9,
label: "智慧锥桶",
},
{
value: 10,
label: "激光疲劳唤醒",
},
{
value: 11,
label: "类交通量调查站",
},
{
value: 12,
label: "行车诱导",
},
{
value: 13,
label: "智能设备箱",
},
{
value: 14,
label: "光线在线监测",
},
];
export const WarningSubclassList = Object.keys(WarningSubclass).reduce(
(prev, key) => {
prev[key] = Object.keys(WarningSubclass[key]).map((subKey) => {

Loading…
Cancel
Save