Browse Source

枚举

wangqin
zhoule 11 months ago
parent
commit
c5d2f2c236
  1. 88
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/addAndEditDialog/index.vue
  2. 60
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/formTable/index.vue
  3. 48
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/index.vue
  4. 207
      ruoyi-ui/src/views/JiHeExpressway/utils/enum.js

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 request from '@/utils/request';
import { Message } from "element-ui"; import { Message } from "element-ui";
import { throttle } from "lodash" 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 = { const typeMap = {
1: trafficKV, 1: trafficKV,
2: perceptionKV 2: perceptionKV,
} };
const gzmsMap = {
"SETMD0": "激光关闭",
"SETMD1": "常亮模式",
"SETMD2": "间隔100ms闪烁模式",
"SETMD3": "间隔200ms闪烁模式",
"SETMD4": "间隔500ms闪烁模式",
"SETMD5": "2次闪烁模式",
"SETMD6": "SOS模式",
"SETMD7": "自定义模式1",
"SETMD8": "自定义模式2",
"SETMD9": "自定义模式3",
}
export default { export default {
name: 'addAndEditDialog', name: 'addAndEditDialog',
@ -134,72 +121,29 @@ export default {
qbb: '' qbb: ''
}], }],
deviceData: [], deviceData: [],
eventOptions: [ eventOptions: trafficKV,
{ mechanismOptions: [
value: 1,
label: '交通事故'
},
{
value: 2,
label: '车辆故障'
},
{
value: 3,
label: '交通管制'
},
{
value: 4,
label: '交通拥堵'
},
{
value: 5,
label: '非法上路'
},
{ {
value: 6, value: "1-1",
label: '路障清除' label: "追尾",
}, },
{ {
value: 7, value: "1-2",
label: '施工建设' label: "侧翻",
}, },
{ {
value: 8, value: "1-3",
label: '服务区异常' label: "撞护栏",
}, },
{ {
value: 9, value: "1-4",
label: '设施设备隐患' label: "自然",
}, },
{ {
value: 10, value: "1-5",
label: '异常天气' 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: { rules: {
planName: [ planName: [
{ required: true, message: '请输入预案名称', trigger: 'blur' }, { required: true, message: '请输入预案名称', trigger: 'blur' },
@ -319,7 +263,7 @@ export default {
changeRadio(value = 1) { changeRadio(value = 1) {
this.formData.triggerMechanism = ''; this.formData.triggerMechanism = '';
this.eventOptions = typeMap[value]; this.eventOptions = typeMap[value];
this.changeEventType(); this.changeEventType(1);
}, },
handleChange() { 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 request from "@/utils/request";
import QbbDialog from "../qbbDialog/index.vue"; import QbbDialog from "../qbbDialog/index.vue";
import { Message } from 'element-ui' import { Message } from 'element-ui'
import { planDeviceOptions } from "@screen/utils/enum.js";
export default { export default {
@ -133,64 +134,7 @@ export default {
// } // }
// ], // ],
isShowDialog: false, isShowDialog: false,
deviceOptions: [ deviceOptions: 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: '光线在线监测'
}
],
zyOptions: [ zyOptions: [
{ {
value: 1, 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="strEventType" label="事件类型" width="100" align="center" />
<ElTableColumn prop="planName" label="预案名称" width="140" align="center" /> <ElTableColumn prop="planName" label="预案名称" width="140" align="center" />
<ElTableColumn prop="triggeringCondition" label="检索条件" width="140" /> <ElTableColumn prop="triggeringCondition" label="检索条件" width="140" />
<ElTableColumn prop="deviceType" label="设备类型" /> <ElTableColumn prop="deviceType" label="设备类型" />
<ElTableColumn prop="controllableDeviceName" label="可控设备"/> <ElTableColumn prop="controllableDeviceName" label="可控设备" />
<ElTableColumn prop="controlCommand" label="控制指令" /> <ElTableColumn prop="controlCommand" label="控制指令" />
<ElTableColumn label="操作" width="210" align="center"> <ElTableColumn label="操作" width="210" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
@ -63,49 +63,11 @@ import request from "@/utils/request";
import { confirm } from "@screen/utils/common"; import { confirm } from "@screen/utils/common";
import { Message } from 'element-ui' import { Message } from 'element-ui'
import { searchFormList } from './data'; import { searchFormList } from './data';
import { WarningType, trafficType } from "@screen/utils/enum.js";
const eventTypeMap = { const eventTypeMap = {
0: {}, 1: trafficType,
1: { 2: WarningType,
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: '光线在线监测',
} }
export default { export default {

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

@ -163,6 +163,21 @@ export const WarningType = {
99: "其他事件", 99: "其他事件",
}; };
// 交通事件主类
export const trafficType = {
1: "交通事故",
2: "车辆故障",
3: "交通管制",
4: "交通拥堵",
5: "非法上路",
6: "路障清除",
7: "施工建设",
8: "服务区异常",
9: "设施设备隐患",
10: "异常天气",
11: "其他事件",
};
export const WarningTypeList = Object.keys(WarningType).map((key) => { export const WarningTypeList = Object.keys(WarningType).map((key) => {
return { return {
value: key * 1, value: key * 1,
@ -295,60 +310,54 @@ export const trafficKV = [
]; ];
//========= 感知事件 主类(key vulue)========= //========= 感知事件 主类(key vulue)=========
export const perceptionKV = [ export const perceptionKV = [
[ {
{ value: 1,
value: 1, label: "交通拥堵",
label: "交通拥堵", },
}, {
{ value: 2,
value: 2, label: "行人",
label: "行人", },
}, {
{ value: 3,
value: 3, label: "非机动车",
label: "非机动车", },
}, {
{ value: 4,
value: 4, label: "停车",
label: "停车", },
}, {
{ value: 5,
value: 5, label: "违规驾驶",
label: "违规驾驶", },
}, {
{ value: 6,
value: 6, label: "路障",
label: "路障", },
}, {
{ value: 7,
value: 7, label: "道路施工",
label: "道路施工", },
}, {
{ value: 8,
value: 8, label: "异常天气",
label: "异常天气", },
}, {
, value: 9,
{ label: "护栏碰撞",
value: 9, },
label: "护栏碰撞", {
}, value: 10,
, label: "交通事故",
{ },
value: 10, {
label: "交通事故", value: 11,
}, label: "车辆故障",
, },
{ {
value: 11, value: 99,
label: "车辆故障", label: "其他事件",
}, },
,
{
value: 99,
label: "其他事件",
},
],
]; ];
//交通事件、感知事件 子类(key vulue)预案使用 //交通事件、感知事件 子类(key vulue)预案使用
export const eventSubClassMap = { 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( export const WarningSubclassList = Object.keys(WarningSubclass).reduce(
(prev, key) => { (prev, key) => {
prev[key] = Object.keys(WarningSubclass[key]).map((subKey) => { prev[key] = Object.keys(WarningSubclass[key]).map((subKey) => {

Loading…
Cancel
Save