From be6468dea6636ce2e27aa959e69614405551537b Mon Sep 17 00:00:00 2001 From: zhoule Date: Fri, 19 Apr 2024 14:58:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=A4=E9=80=9A=E7=AE=A1=E5=88=B6=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EditEventInformationDialog/data.js | 4 +- .../AddControlEventInfoDialog/data.js | 644 ++++++++++++++++++ .../AddControlEventInfoDialog/index.vue | 178 +++++ .../Cards/TrafficControl/index.vue | 36 +- 4 files changed, 850 insertions(+), 12 deletions(-) create mode 100644 ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/TrafficControl/components/AddControlEventInfoDialog/data.js create mode 100644 ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/TrafficControl/components/AddControlEventInfoDialog/index.vue diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/EventInformation/components/EditEventInformationDialog/data.js b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/EventInformation/components/EditEventInformationDialog/data.js index 58ba5634..b8294fd2 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/EventInformation/components/EditEventInformationDialog/data.js +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/EventInformation/components/EditEventInformationDialog/data.js @@ -945,7 +945,7 @@ export const tabConfigList = [ }, { label: "限制类型:", - key: "dcEventAccident.limitedType", + key: "dcEventTrafficControl.limitedType", required: true, type: "select", options: { @@ -963,7 +963,7 @@ export const tabConfigList = [ }, { label: "车辆类型:", - key: "dcEventAccident.vehicleType", + key: "dcEventTrafficControl.vehicleType", required: true, type: "select", options: { diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/TrafficControl/components/AddControlEventInfoDialog/data.js b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/TrafficControl/components/AddControlEventInfoDialog/data.js new file mode 100644 index 00000000..90c35ee7 --- /dev/null +++ b/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, + ], + }, + }, +]; diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/TrafficControl/components/AddControlEventInfoDialog/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/TrafficControl/components/AddControlEventInfoDialog/index.vue new file mode 100644 index 00000000..b8c33c17 --- /dev/null +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/TrafficControl/components/AddControlEventInfoDialog/index.vue @@ -0,0 +1,178 @@ + + + + + \ No newline at end of file diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/TrafficControl/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/TrafficControl/index.vue index 136f3844..a79e76b6 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/TrafficControl/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/TrafficControl/index.vue @@ -1,17 +1,20 @@ @@ -20,6 +23,7 @@ import Card from "@screen/components/Card2/Card.vue"; import RadioGroup from '@screen/components/FormConfig/components/RadioGroup/index.vue'; import ButtonGradient from '@screen/components/Buttons/ButtonGradient.vue'; import { provideMixin } from "./../../mixin" +import AddControlEventInfoDialog from "./components/AddControlEventInfoDialog/index.vue" export default { name: 'TrafficControl', @@ -27,19 +31,31 @@ export default { components: { Card, RadioGroup, - ButtonGradient + ButtonGradient, + AddControlEventInfoDialog }, data() { return { - radioValue: "mainlineControl", + eventSubclass: '3-1', + addControlEventInfoDialogVisible: false, + controlType: 1, radioList: [ - { key: 'mainlineControl', label: '主线管制' }, - { key: 'tollboothControl', label: '收费站管制' }, - { key: 'serviceAreaControl', label: '服务区管制' }, - { key: 'hubInterchangeControl', label: '枢纽立交管制' }, - { key: 'otherControls', label: '其他管制' }, + { key: '3-1', label: '主线管制' }, + { key: '3-2', label: '收费站管制' }, + { key: '3-3', label: '服务区管制' }, + { key: '3-4', label: '枢纽立交管制' }, + { key: '3-5', label: '其他管制' }, ] } + }, + methods: { + onSubmit(value) { + this.controlType = value + this.addControlEventInfoDialogVisible = true + }, + closeDialog() { + this.addControlEventInfoDialogVisible = false + } } }