Browse Source

交通管制新增事件

wangqin
zhoule 7 months ago
parent
commit
be6468dea6
  1. 4
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/EventInformation/components/EditEventInformationDialog/data.js
  2. 644
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/TrafficControl/components/AddControlEventInfoDialog/data.js
  3. 178
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/TrafficControl/components/AddControlEventInfoDialog/index.vue
  4. 36
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/TrafficControl/index.vue

4
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/EventInformation/components/EditEventInformationDialog/data.js

@ -945,7 +945,7 @@ export const tabConfigList = [
}, },
{ {
label: "限制类型:", label: "限制类型:",
key: "dcEventAccident.limitedType", key: "dcEventTrafficControl.limitedType",
required: true, required: true,
type: "select", type: "select",
options: { options: {
@ -963,7 +963,7 @@ export const tabConfigList = [
}, },
{ {
label: "车辆类型:", label: "车辆类型:",
key: "dcEventAccident.vehicleType", key: "dcEventTrafficControl.vehicleType",
required: true, required: true,
type: "select", type: "select",
options: { options: {

644
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/TrafficControl/components/AddControlEventInfoDialog/data.js

@ -0,0 +1,644 @@
import * as PresetFormItems from "@screen/pages/control/event/event/FormEvent/PresetFormItems.js";
import request from "@/utils/request";
import { Message } from "element-ui";
export const tabConfigList = [
{
key: "TrafficControl",
label: "交通管制",
formConfig: {
formOptions: {
column: 2,
},
list: [
{
label: "管制设施:",
key: "eventSubclass",
type: "RadioGroup",
isAlone: true,
required: true,
default: "3-1",
options: {
activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: [
{
key: "3-1",
label: "主线",
},
{
key: "3-2",
label: "收费站",
},
{
key: "3-3",
label: "立交",
},
{
key: "3-4",
label: "服务区",
},
{
key: "3-5",
label: "其他",
},
],
},
ons: {
input(value, ...args) {
const { data, formList } = args.slice(-1)[0];
const classify = formList.find(
(it) => it.key == "dcEventTrafficControl.classify"
);
let ss = {
"3-1": "主线",
"3-2": "收费站",
"3-3": "立交",
"3-4": "服务区",
};
let ad = {
1: [
{
key: "1",
label: `${ss[value]}关闭`,
},
],
2: [
{
key: "2",
label: "主线限行",
},
{
key: "3",
label: "主线间隔放行",
},
{
key: "4",
label: "主线并道",
},
{
key: "5",
label: "主线限速",
},
],
};
classify.options.options =
ad[data.dcEventTrafficControl.controlType];
if (data.dcEventTrafficControl) {
data.dcEventTrafficControl.facilityId = null;
}
let facilityType = 1;
if (value == "3-2") {
facilityType = 1;
} else if (value == "3-3") {
facilityType = 3;
} else if (value == "3-4") {
facilityType = 6;
}
if (value && value != "3-1") {
//路网设施 1 收费站 2 桥梁 3 互通立交 4 枢纽立交 5 隧道 6 服务区
request({
url: `/business/facility/query?facilityType=${facilityType}`,
method: "get",
})
.then((result) => {
if (result.code != 200) return Message.error(result?.msg);
let lwss = [];
result.data.forEach((it) =>
lwss.push({ key: it.id, label: it.facilityName })
);
formList.forEach((it) => {
if (it.key == "dcEventTrafficControl.facilityId") {
it.options.options = lwss;
}
});
})
.catch((err) => {
console.log("err", err);
Message.error("查询失败1", err);
});
}
},
},
},
{
label: "管制分类:",
key: "dcEventTrafficControl.controlType",
type: "RadioGroup",
isAlone: true,
required: true,
default: "1",
options: {
activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: [
{
key: 1,
label: "封闭",
},
{
key: 2,
label: "限行",
},
],
},
ons: {
input(value, ...args) {
const { data, formList } = args.slice(-1)[0];
const classify = formList.find(
(it) => it.key == "dcEventTrafficControl.classify"
);
const measure = formList.find(
(it) => it.key == "dcEventTrafficControl.measure"
);
let ss = {
"3-1": "主线",
"3-2": "收费站",
"3-3": "立交",
"3-4": "服务区",
"3-5": "其他",
};
let ad = {
1: [
{
key: "1",
label: `${ss[data.eventSubclass]}关闭`,
},
],
2: [
{
key: "2",
label: "主线限行",
},
{
key: "3",
label: "主线间隔放行",
},
{
key: "4",
label: "主线并道",
},
{
key: "5",
label: "主线限速",
},
],
};
let cs = {
1: [
{
value: "1",
label: "临时关闭",
},
],
2: [
{
value: "2",
label: "限行车辆",
},
{
value: "3",
label: "限行车道",
},
{
value: "4",
label: "限行车道且限行车辆",
},
{
value: "5",
label: "间隔放行",
},
{
value: "6",
label: "并道行驶",
},
{
value: "7",
label: "限速",
},
],
};
measure.options.options = cs[value];
classify.options.options = ad[value];
},
},
},
{
label: "分类:",
key: "dcEventTrafficControl.classify",
type: "RadioGroup",
isAlone: true,
required: true,
default: "1",
options: {
activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: [
{
key: "1",
label: "主线关闭",
},
],
},
},
{
label: "分类原因:",
key: "dcEventTrafficControl.controlCause",
type: "RadioGroup",
isAlone: true,
required: true,
default: "1",
options: {
activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: [
{
key: "1",
label: "车流量大",
},
{
key: "2",
label: "交通事故",
},
{
key: "3",
label: "恶劣天气",
},
{
key: "4",
label: "施工",
},
{
key: "5",
label: "警备任务",
},
{
key: "6",
label: "其他",
},
],
},
ons: {
input(value, ...args) {
const { formList } = args.slice(-1)[0];
const config = formList.find(
(it) => it.key == "dcEventTrafficControl.causeType"
);
let ad = {
3: [
{
value: "3-1",
label: "雨",
},
{
value: "3-2",
label: "雪",
},
{
value: "3-3",
label: "雾",
},
{
value: "3-4",
label: "道路积水",
},
{
value: "3-5",
label: "道路湿滑",
},
{
value: "3-6",
label: "道路结冰",
},
{
value: "3-7",
label: "沙尘暴",
},
],
4: [
{
value: "4-1",
label: "专项工程施工",
},
{
value: "4-2",
label: "改扩建工程施工",
},
{
value: "4-3",
label: "其他施工",
},
],
};
config.options.options = ad[value];
},
},
},
PresetFormItems.isInTunnel,
{
label: "原因类型:",
key: "dcEventTrafficControl.causeType",
type: "select",
options: {
options: [],
},
visible: (data) => {
if (
data?.dcEventTrafficControl.controlCause == "3" ||
data?.dcEventTrafficControl.controlCause == "4"
) {
return true;
}
return false;
},
},
PresetFormItems.freeway,
PresetFormItems.direction,
PresetFormItems.emptyLine,
{
label: "出入口:",
key: "dcEventTrafficControl.exitsInlets",
type: "RadioGroup",
isAlone: true,
required: true,
default: "2",
options: {
activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: [
{
key: "1",
label: "出口",
},
{
key: "2",
label: "入口",
},
],
},
visible: (data) => {
if (data?.eventSubclass == "3-2" || data?.eventSubclass == "3-4") {
return true;
}
return false;
},
},
{
label: "收费站:",
key: "dcEventTrafficControl.facilityId",
type: "select",
isAlone: false,
required: true,
options: {
options: [],
multiple: true,
},
visible: (data) => {
if (data?.eventSubclass == "3-2") {
return true;
}
return false;
},
},
{
label: "立交桥:",
key: "dcEventTrafficControl.facilityId",
type: "select",
isAlone: false,
required: true,
options: {
options: [],
multiple: true,
},
visible: (data) => {
if (data?.eventSubclass == "3-3") {
return true;
}
return false;
},
ons: {
change(value, ...args) {
const { formList } = args.slice(-1)[0];
//匝道
request({
url: `/system/ramp/listAll?facilityId=${value}`,
method: "get",
})
.then((result) => {
if (result.code != 200) return Message.error(result?.msg);
let zd = [];
result.rows.forEach((it) =>
zd.push({ key: it.id, label: it.rampName })
);
// console.log("zd", zd);
formList.forEach((it) => {
if (it.key == "dcEventTrafficControl.rampId") {
console.log("it", it);
it.options.options = zd;
}
});
})
.catch((err) => {
console.log("err", err);
Message.error("查询失败3", err);
});
},
},
},
{
label: "匝道:",
key: "dcEventTrafficControl.rampId",
type: "select",
isAlone: false,
required: true,
options: {
options: [],
},
visible: (data) => {
if (data?.eventSubclass == "3-3") {
return true;
}
return false;
},
},
{
label: "服务区:",
key: "dcEventTrafficControl.facilityId",
type: "select",
isAlone: false,
required: true,
options: {
options: [],
},
visible: (data) => {
if (data?.eventSubclass == "3-4") {
return true;
}
return false;
},
},
{
label: "措施:",
required: true,
key: "dcEventTrafficControl.measure",
type: "select",
options: {
options: [
{
value: "1",
label: "临时关闭",
},
],
},
},
{
label: "限制类型:",
key: "dcEventTrafficControl.limitedType",
required: true,
type: "select",
options: {
options: [
{ key: "1", label: "只允许" },
{ key: "2", label: "禁止" },
],
},
visible: (data) => {
if (data?.dcEventTrafficControl.controlType == "2") {
return true;
}
return false;
},
},
{
label: "车辆类型:",
key: "dcEventTrafficControl.vehicleType",
required: true,
type: "select",
options: {
options: [
{ key: "1", label: "10座以下客车" },
{ key: "2", label: "10座以下客车(间隔放行)" },
{ key: "3", label: "19座以上客车" },
{ key: "4", label: "一型客车(不含面包车)" },
{ key: "5", label: "两客一危" },
{ key: "6", label: "三类以上班线客车" },
{
key: "7",
label: "四轴及四轴以上货车(运送生鲜果蔬、抗疫物资车辆除外)",
},
{ key: "8", label: "三轴及以上(含三轴)货车" },
{ key: "9", label: "3轴以上货车(不含危险品运输车)" },
{ key: "10", label: "3轴以上货车" },
{ key: "11", label: "四轴及以上(含四轴)货车" },
{ key: "12", label: "4轴以上货车(不含危险品运输车)" },
{ key: "13", label: "4轴以上货车" },
{ key: "14", label: "4轴以下货车" },
{ key: "15", label: "57座以上客车" },
{ key: "16", label: "五轴及以上货车" },
{ key: "17", label: "5轴以上货车" },
{ key: "18", label: "5轴以上货车(不含危险品运输车)" },
{ key: "19", label: "5轴以下货车" },
{ key: "20", label: "6座以上客车" },
{ key: "21", label: "6座以上面包车" },
{ key: "22", label: "7座以上客车" },
{ key: "23", label: "7座以下客车" },
{ key: "24", label: "8座以上客车" },
// 25- 8座以下客车
// 26- 8座以下客车(间隔放行)
// 27- 9座以上客车
// 28- 半挂货车
// 29- 车辆(不含10座以下客车)
// 30- 车辆(不含8座以下客车)
// 31- 车辆(不含小轿车)
// 32- 不可解体物品超限运输车
// 33- 不可解体物品运输车
// 34- 超长超宽超高车辆
// 35- 车辆运输车
// 36- 超限运输车
// 37- 大型货车(不含危险品运输车)
// 38- 大型货车
// 39- 大型客车
// 40- 大中型货车
// 41- 已安装ETC的客车
// 42- 已安装ETC的小型客车
// 43- 罐车
// 44- 货车
// 45- 黄牌货车
// 46- 黄牌货车(不含危险品运输车)
// 47- 黄牌货车(运送民生物资车辆除外)
// 48- 核载总质量4.5吨以上货车(运送民生物资车辆除外)
// 49- 客车(包括小轿车)
// 50- 客运车辆
// 51- 蓝牌货车
// 52- 旅游包车
// 53- 面包车
// 54- 皮卡
// 55- 全部车型
// 56- (未安装ETC)车辆
// 57- 外埠号牌车辆
// 58- 危化品运输车
// 59- 危险物品运输车
// 60- 武装押运车辆
// 61- 小轿车
// 62- 厢式货车
// 63- 小型车辆
// 64- (已安装ETC)车辆
// 65- 已安装ETC的货车
// 66- 押款车辆
// 67- 疫情防控物资运输车辆
// 68- 运输剧毒、放射性物品车辆
// 69- 运输枪支弹药、爆炸、剧毒、放射性物品车辆
// 70- 营运客车
// 71- 重型货车
// 72- 核载总质量1.8吨以上货车
// 73- 中型货车
// 74- 小型车辆限速80公里/小时、大型车辆限速70
],
},
visible: (data) => {
if (data?.dcEventTrafficControl.controlType == "2") {
return true;
}
return false;
},
},
{
label: "桩号:",
key: "stakeMark",
required: true,
type: "MultipleLabelItem",
options: {
options: [
{
prefix: {
text: "K",
style: {
color: "#3DE8FF",
},
},
key: "stakeMark[0]",
},
{
prefix: {
text: "+",
style: {
color: "#3DE8FF",
},
},
key: "stakeMark[1]",
},
],
},
visible: (data) => {
if (data?.eventSubclass == "3-1") {
return true;
}
return false;
},
},
PresetFormItems.startTime,
PresetFormItems.expectedEndTime,
PresetFormItems.remark,
PresetFormItems.source,
],
},
},
];

178
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/TrafficControl/components/AddControlEventInfoDialog/index.vue

@ -0,0 +1,178 @@
<template>
<Dialog v-model="modelVisible" title="新增交通管制事件" width="1100px" top="10%">
<div class="AddControlEventInfoDialog">
<Form class="form" ref="FormConfigRef" :formList="formConfigList" v-model="fData" labelWidth="120px" />
<div class="footer">
<Button style="background: #c9c9c9" @click.native="modelVisible = false">关闭</Button>
<Button :loading="submitting" @click.native="onSubmit">保存</Button>
</div>
</div>
</Dialog>
</template>
<script>
import Dialog from "@screen/components/Dialog/index";
import Form from "@screen/components/FormConfig";
import Button from "@screen/components/Buttons/Button.vue";
import request from "@/utils/request";
import { tabConfigList } from "./data.js";
export default {
name: "AddControlEventInfoDialog",
components: {
Dialog,
Form,
Button,
},
model: {
prop: "visible",
event: "close",
},
props: {
visible: Boolean,
eventSubclass: String,
controlType: Number
},
data() {
return {
formConfigList: [],
fData: {},
eventId: '',
submitting: false,
roads: [],
direction: [],
};
},
computed: {
modelVisible: {
get() {
if (this.visible) {
this.initData()
}
return this.visible;
},
set(val) {
this.$emit("close", val);
},
},
},
mounted() {
},
methods: {
async initData() {
this.formConfigList = tabConfigList[0].formConfig.list
await Promise.all([
//
request({
url: `/business/road/query`,
method: "get",
})
.then((result) => {
if (result.code != 200) return Message.error(result?.msg);
this.roads = []
result.data.forEach((it) => {
this.roads.push({ key: it.id, label: it.roadName });
});
})
.catch((err) => {
Message.error("查询失败4", err);
}),
//
request({
url: `/system/dict/data/type/iot_event_direction`,
method: "get",
})
.then((result) => {
if (result.code != 200) return Message.error(result?.msg);
this.direction = []
result.data.forEach((it) => {
this.direction.push({ key: it.dictValue, label: it.dictLabel });
});
})
.catch((err) => {
Message.error("查询失败5", err);
}),
]);
this.formConfigList.forEach((it) => {
if (it.key == "direction") {
it.options.options = this.direction;
}
if (it.key == "roadId") {
it.options.options = this.roads;
}
});
// console.log('eventSubclass',this.eventSubclass,this.controlType)
this.fData.eventSubclass = this.eventSubclass;
this.fData.dcEventTrafficControl.controlType = this.controlType;
},
onSubmit() {
this.$refs.FormConfigRef.validate().then((formData) => {
this.submitting = true;
if (formData.dcEventTrafficControl.facilityId instanceof Array) {
let ids = formData.dcEventTrafficControl.facilityId;
formData.dcEventTrafficControl.facilityIds = ids
formData.dcEventTrafficControl.facilityId = ''
}
let stakeMark = formData.stakeMark;
// console.log('formData', {
// ...formData,
// eventType: 3,
// stakeMark: (stakeMark && stakeMark[0] != null) ? ((stakeMark && stakeMark.length > 0) ? ('K' + stakeMark[0] + '+' + stakeMark[1]) : '') : '',
// })
// this.submitting = false;
// return;
request({
url: `/dc/system/event`,
method: "post",
data: {
...formData,
eventType: 3,
eventState: 0,
stakeMark: stakeMark && stakeMark[0] != null
? stakeMark && stakeMark.length > 0 ? "K" + stakeMark[0] + "+" + stakeMark[1] : "" : "",
},
})
.then((result) => {
if (result.code != 200) return Message.error(result?.msg);
Message.success("提交成功");
this.modelVisible = false;
})
.catch(() => {
Message.error("提交失败");
})
.finally(() => {
this.submitting = false;
});
});
}
}
};
</script>
<style lang="scss" scoped>
.AddControlEventInfoDialog {
gap: 9px;
width: 1050px;
height: 560px;
max-height: 900px;
display: flex;
flex-direction: column;
.form {
flex: 1;
overflow-y: auto;
}
.footer {
display: flex;
justify-content: end;
gap: 15px;
}
}
</style>

36
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/TrafficControl/index.vue

@ -1,17 +1,20 @@
<template> <template>
<Card class='TrafficControl' title="交通管制"> <Card class='TrafficControl' title="交通管制">
<RadioGroup v-model="radioValue" :options="radioList" /> <RadioGroup v-model="eventSubclass" :options="radioList" />
<div class="bottom"> <div class="bottom">
<ButtonGradient class="title-button special-button" <ButtonGradient class="title-button special-button" @click.native="onSubmit(1)"
style="background: linear-gradient(180deg, #E94D4E 0%, #FF195E 100%);"> style="background: linear-gradient(180deg, #E94D4E 0%, #FF195E 100%);">
封闭 封闭
</ButtonGradient> </ButtonGradient>
<ButtonGradient class="title-button special-button" <ButtonGradient class="title-button special-button" @click.native="onSubmit(2)"
style="background: linear-gradient(82deg, #FFCD48 0%, #FE861E 100%);"> style="background: linear-gradient(82deg, #FFCD48 0%, #FE861E 100%);">
限行 限行
</ButtonGradient> </ButtonGradient>
</div> </div>
<AddControlEventInfoDialog v-model="addControlEventInfoDialogVisible" :controlType="controlType"
:eventSubclass="eventSubclass" @close="closeDialog" />
</Card> </Card>
</template> </template>
@ -20,6 +23,7 @@ import Card from "@screen/components/Card2/Card.vue";
import RadioGroup from '@screen/components/FormConfig/components/RadioGroup/index.vue'; import RadioGroup from '@screen/components/FormConfig/components/RadioGroup/index.vue';
import ButtonGradient from '@screen/components/Buttons/ButtonGradient.vue'; import ButtonGradient from '@screen/components/Buttons/ButtonGradient.vue';
import { provideMixin } from "./../../mixin" import { provideMixin } from "./../../mixin"
import AddControlEventInfoDialog from "./components/AddControlEventInfoDialog/index.vue"
export default { export default {
name: 'TrafficControl', name: 'TrafficControl',
@ -27,19 +31,31 @@ export default {
components: { components: {
Card, Card,
RadioGroup, RadioGroup,
ButtonGradient ButtonGradient,
AddControlEventInfoDialog
}, },
data() { data() {
return { return {
radioValue: "mainlineControl", eventSubclass: '3-1',
addControlEventInfoDialogVisible: false,
controlType: 1,
radioList: [ radioList: [
{ key: 'mainlineControl', label: '主线管制' }, { key: '3-1', label: '主线管制' },
{ key: 'tollboothControl', label: '收费站管制' }, { key: '3-2', label: '收费站管制' },
{ key: 'serviceAreaControl', label: '服务区管制' }, { key: '3-3', label: '服务区管制' },
{ key: 'hubInterchangeControl', label: '枢纽立交管制' }, { key: '3-4', label: '枢纽立交管制' },
{ key: 'otherControls', label: '其他管制' }, { key: '3-5', label: '其他管制' },
] ]
} }
},
methods: {
onSubmit(value) {
this.controlType = value
this.addControlEventInfoDialogVisible = true
},
closeDialog() {
this.addControlEventInfoDialogVisible = false
}
} }
} }
</script> </script>

Loading…
Cancel
Save