From 517c205316c2f5007e3c9536189d643ab2cd9f9e Mon Sep 17 00:00:00 2001 From: zhoule Date: Thu, 25 Jan 2024 14:59:49 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=84=9F=E7=9F=A5?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E5=BD=95=E5=85=A5=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../event/event/FormEvent/PresetFormItems.js | 156 ++++++----- .../control/event/event/FormEvent/data.js | 264 ++++++++++-------- .../control/event/event/FormEvent/index.vue | 8 +- .../pages/control/event/event/index.vue | 23 +- 4 files changed, 260 insertions(+), 191 deletions(-) diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/PresetFormItems.js b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/PresetFormItems.js index 5a778466..d1553658 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/PresetFormItems.js +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/PresetFormItems.js @@ -1,6 +1,6 @@ export const source = { label: "来源:", - key: "key29", + key: "eventSource", type: "RadioGroup", isAlone: true, required: true, @@ -8,31 +8,31 @@ export const source = { activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)", options: [ { - key: "96659", + key: "1", label: "96659", }, { - key: "交通转接", + key: "2", label: "交通转接", }, { - key: "道路巡查", + key: "3", label: "道路巡查", }, { - key: "视频巡查", + key: "4", label: "视频巡查", }, { - key: "视频AI", + key: "5", label: "视频AI", }, { - key: "一键救援", + key: "6", label: "一键救援", }, { - key: "其他", + key: "7", label: "其他", }, ], @@ -41,7 +41,7 @@ export const source = { export const illegalTriggeringType = { label: "类型:", - key: "key291", + key: "eventSubclass", type: "RadioGroup", isAlone: true, required: true, @@ -49,19 +49,19 @@ export const illegalTriggeringType = { activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)", options: [ { - key: "行人", + key: "5-1", label: "行人", }, { - key: "非机动车", + key: "5-2", label: "非机动车", }, { - key: "摩托车", + key: "5-3", label: "摩托车", }, { - key: "其他", + key: "5-4", label: "其他", }, ], @@ -70,7 +70,7 @@ export const illegalTriggeringType = { export const station = { label: "桩号:", - key: "key8", + key: "stakeMark", required: true, type: "MultipleLabelItem", options: { @@ -97,7 +97,7 @@ export const station = { export const startEndStation = { label: "起止桩号:", - key: "key8", + key: "stakeMark", required: true, isAlone: true, type: "MultipleLabelItem", @@ -141,14 +141,14 @@ export const startEndStation = { export const direction = { label: "方向:", - key: "key7", + key: "direction", required: true, type: "select", }; export const problemDescription = { label: "问题描述:", - key: "key294", + key: "description", isAlone: true, options: { type: "textarea", @@ -162,7 +162,7 @@ export const problemDescription = { export const startTime = { label: "开始时间:", - key: "key009", + key: "startTime", required: true, isAlone: true, type: "datePicker", @@ -170,21 +170,21 @@ export const startTime = { export const expectedEndTime = { label: "预计结束时间:", - key: "key09", + key: "estimatedEndTime", isAlone: true, type: "datePicker", }; export const eventLevel = { label: "事件等级:", - key: "key024", + key: "eventLevel", required: true, type: "select", }; export const laneOccupancy = { label: "车道占用:", - key: "key027", + key: "dcEventAccident.laneOccupancy", type: "CheckboxGroup", isAlone: true, default: [], @@ -199,7 +199,7 @@ export const laneOccupancy = { }, }; -export const vehicleCondition = { +export const vehicleCondition = (keyPrefix = 'dcEventAccident') => ({ label: "车辆情况:", key: "key25", isAlone: true, @@ -214,6 +214,7 @@ export const vehicleCondition = { text: "辆", }, type: "inputNumber", + key: `${keyPrefix}.smallCar`, }, { prefix: { @@ -223,6 +224,7 @@ export const vehicleCondition = { text: "辆", }, type: "inputNumber", + key: `${keyPrefix}.trucks`, }, { prefix: { @@ -232,6 +234,7 @@ export const vehicleCondition = { text: "辆", }, type: "inputNumber", + key: `${keyPrefix}.buses`, }, { prefix: { @@ -241,12 +244,13 @@ export const vehicleCondition = { text: "辆", }, type: "inputNumber", + key: `${keyPrefix}.tankers`, }, ], }, -}; +}); -export const casualties = { +export const casualties = (keyPrefix = 'dcEventAccident') => ({ label: "伤亡情况:", key: "key0036", isAlone: true, @@ -261,6 +265,7 @@ export const casualties = { suffix: { text: "人", }, + key: `${keyPrefix}.minorInjuries`, }, { prefix: { @@ -269,6 +274,7 @@ export const casualties = { suffix: { text: "人", }, + key: `${keyPrefix}.seriousInjuries`, }, { prefix: { @@ -277,21 +283,22 @@ export const casualties = { suffix: { text: "人", }, + key: `${keyPrefix}.fatalities`, }, ], }, -}; +}); export const eventTitle = { label: "事件标题:", - key: "key27", + key: "eventTitle", isAlone: true, required: true, }; export const eventDesc = { label: "事件描述:", - key: "key28", + key: "description", isAlone: true, options: { type: "textarea", @@ -305,7 +312,7 @@ export const eventDesc = { export const remark = { label: "备注:", - key: "key2811", + key: "remark", isAlone: true, options: { type: "textarea", @@ -319,7 +326,7 @@ export const remark = { export const isInTunnel = { label: "是否处在隧道:", - key: "key6240", + key: "inTunnel", // isAlone: true, required: true, type: "RadioGroup", @@ -327,11 +334,11 @@ export const isInTunnel = { activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)", options: [ { - key: "是", + key: "2", label: "是", }, { - key: "否", + key: "0", label: "否", }, ], @@ -347,7 +354,7 @@ export const freeway = { export const weatherConditions = { label: "天气情况:", - key: "isCongestionAhead", + key: "dcEventAccident.weatherCondition", type: "RadioGroup", isAlone: true, required: true, @@ -428,7 +435,7 @@ export const weatherConditions = { export const additionalNotes = { label: "补充说明:", - key: "key00036", + key: "eventSourceTips", isAlone: true, options: { type: "textarea", @@ -441,7 +448,7 @@ export const additionalNotes = { export const callPolicePersonName = { label: "报警人姓名:", - key: "reporterName", + key: "dcEventAccident.reporterName", options: { placeholder: "请输入报警人姓名", }, @@ -450,7 +457,7 @@ export const callPolicePersonName = { export const callPolicePersonPhone = { label: "报警人电话:", - key: "reporterPhoneNumber", + key: "dcEventAccident.reporterPhoneNumber", options: { placeholder: "请输入报警人电话(区号+号码)", }, @@ -459,34 +466,45 @@ export const callPolicePersonPhone = { export const trafficAccidentType = { label: "交通事故类型:", - key: "accidentType", + key: "eventSubclass", type: "select", required: true, options: { options: [ { - value: "1", - label: "侧翻", + value: "1-1", + label: "追尾", }, { - value: "2", - label: "撞障碍物", + value: "1-2", + label: "侧翻", }, { - value: "3", - label: "货物洒落", + value: "1-3", + label: "撞护栏", }, { - value: "4", - label: "撞护栏", + value: "1-4", + label: "自然", }, { - value: "5", - label: "自燃", + value: "1-5", + label: "其他事故", }, + ], + }, +}; + +export const vehicleMalfunctionType = { + label: "车辆故障类型:", + key: "eventSubclass", + type: "select", + required: true, + options: { + options: [ { - value: "6", - label: "追尾", + value: "2-1", + label: "车辆故障", }, ], }, @@ -494,7 +512,7 @@ export const trafficAccidentType = { export const locationMode = { label: "地点方式:", - key: "locationType", + key: "dcEventAccident.locationType", required: true, type: "select", options: { @@ -509,32 +527,32 @@ export const locationMode = { export const route = { label: "路线:", - key: "key6", + key: "dcEventAccident.route", required: true, type: "select", }; export const eventHappenTime = { label: "事件发生时间:", - key: "key9", + key: "startTime", required: true, type: "datePicker", }; export const aEstimatedReleaseTime = { label: "预计解除时间:", - key: "key10", + key: "estimatedEndTime", type: "datePicker", }; export const pressure = { label: "压车(公里):", - key: "key11", + key: "dcEventAccident.trafficJam", }; export const isCongestionAhead = { label: "前方是否拥堵:", - key: "congestionAhead", + key: "dcEventAccident.congestionAhead", type: "RadioGroup", options: { activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)", @@ -553,7 +571,7 @@ export const isCongestionAhead = { export const isForkRoad = { label: "是否分岔口:", - key: "atIntersection", + key: "dcEventAccident.atIntersection", type: "RadioGroup", options: { activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)", @@ -572,7 +590,7 @@ export const isForkRoad = { export const isCurveRoad = { label: "是否处在弯道:", - key: "minorInjuries", + key: "dcEventAccident.onCurve", type: "RadioGroup", options: { activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)", @@ -591,7 +609,7 @@ export const isCurveRoad = { export const effect = { label: "影响:", - key: "impactLevel", + key: "dcEventAccident.impactLevel", type: "select", options: { options: [ @@ -606,7 +624,7 @@ export const effect = { export const isArrives = { label: "是否到货:", - key: "isReverseCargo", + key: "dcEventAccident.isReverseCargo", type: "RadioGroup", options: { activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)", @@ -625,7 +643,7 @@ export const isArrives = { export const isMaintenanceAccident = { label: "是否养护事故:", - key: "isMaintenance", + key: "dcEventAccident.isMaintenance", type: "RadioGroup", options: { activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)", @@ -644,7 +662,7 @@ export const isMaintenanceAccident = { export const trafficPolicePhone = { label: "交警电话:", - key: "policeContact", + key: "dcEventAccident.policeContact", }; export const wreckerCalls = { @@ -652,12 +670,12 @@ export const wreckerCalls = { options: { placeholder: "请输入清障电话(区号+号码)", }, - key: "key17", + key: "dcEventAccident.towingServiceContact", }; export const spillName = { label: "洒落物名称:", - key: "key22", + key: "dcEventAccident.spillageItem", isAlone: true, options: { type: "textarea", @@ -670,7 +688,7 @@ export const spillName = { export const ownerPhone = { label: "车主电话:", - key: "key23", + key: "dcEventAccident.vehicleOwnerPhone", isAlone: true, }; @@ -679,18 +697,6 @@ export const emptyLine = { type: "empty", }; -export const eventSources = { - label: "事件源:", - key: "key999999999", - type: "input", -}; - -export const eventType = { - label: "事件类型:", - key: "事件类型", - type: "input", -}; - export const constructionMeasurement = { label: "施工措施:", key: "constructionMeasurement", diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/data.js b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/data.js index 0fb7c066..840214e8 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/data.js +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/data.js @@ -6,32 +6,32 @@ export const tabConfigList = [ label: "交通事故", formConfig: { list: [ - PresetFormItems.callPolicePersonName, - PresetFormItems.callPolicePersonPhone, + Object.assign(PresetFormItems.callPolicePersonName, { key: 'dcEventAccident.reporterName' }), + Object.assign(PresetFormItems.callPolicePersonPhone, { key: 'dcEventAccident.reporterPhoneNumber' }), PresetFormItems.trafficAccidentType, PresetFormItems.eventLevel, - PresetFormItems.locationMode, - PresetFormItems.route, + Object.assign(PresetFormItems.locationMode, { key: 'dcEventAccident.locationType' }), + Object.assign(PresetFormItems.route, { key: 'dcEventAccident.route' }), PresetFormItems.direction, PresetFormItems.station, PresetFormItems.eventHappenTime, PresetFormItems.aEstimatedReleaseTime, - PresetFormItems.pressure, - PresetFormItems.weatherConditions, - PresetFormItems.effect, - PresetFormItems.isArrives, - PresetFormItems.isMaintenanceAccident, - PresetFormItems.trafficPolicePhone, - PresetFormItems.wreckerCalls, - PresetFormItems.isCongestionAhead, - PresetFormItems.isForkRoad, - PresetFormItems.isCurveRoad, - PresetFormItems.isInTunnel, - PresetFormItems.spillName, - PresetFormItems.ownerPhone, - PresetFormItems.laneOccupancy, - PresetFormItems.vehicleCondition, - PresetFormItems.casualties, + Object.assign(PresetFormItems.pressure, { key: 'dcEventAccident.trafficJam' }), + Object.assign(PresetFormItems.weatherConditions, { key: 'dcEventAccident.weatherCondition' }), + Object.assign(PresetFormItems.effect, { key: 'dcEventAccident.impactLevel' }), + Object.assign(PresetFormItems.isArrives, { key: 'dcEventAccident.isReverseCargo' }), + Object.assign(PresetFormItems.isMaintenanceAccident, { key: 'dcEventAccident.isMaintenance' }), + Object.assign(PresetFormItems.trafficPolicePhone, { key: 'dcEventAccident.policeContact' }), + Object.assign(PresetFormItems.wreckerCalls, { key: 'dcEventAccident.towingServiceContact' }), + Object.assign(PresetFormItems.isCongestionAhead, { key: 'dcEventAccident.congestionAhead' }), + Object.assign(PresetFormItems.isForkRoad, { key: 'dcEventAccident.atIntersection' }), + Object.assign(PresetFormItems.isCurveRoad, { key: 'dcEventAccident.onCurve' }), + Object.assign(PresetFormItems.isInTunnel, { key: 'dcEventAccident.inTunnel' }), + Object.assign(PresetFormItems.spillName, { key: 'dcEventAccident.spillageItem' }), + Object.assign(PresetFormItems.ownerPhone, { key: 'dcEventAccident.vehicleOwnerPhone' }), + Object.assign(PresetFormItems.laneOccupancy, { key: 'dcEventAccident.laneOccupancy' }), + PresetFormItems.vehicleCondition('dcEventAccident'), + PresetFormItems.casualties('dcEventAccident'), PresetFormItems.eventTitle, PresetFormItems.eventDesc, PresetFormItems.source, @@ -44,25 +44,25 @@ export const tabConfigList = [ formConfig: { formOptions: {}, list: [ - PresetFormItems.callPolicePersonName, - PresetFormItems.callPolicePersonPhone, - PresetFormItems.trafficAccidentType, + Object.assign(PresetFormItems.callPolicePersonName, { key: 'dcEventVehicleAccident.reporterName' }), + Object.assign(PresetFormItems.callPolicePersonPhone, { key: 'dcEventVehicleAccident.reporterPhoneNumber' }), + PresetFormItems.vehicleMalfunctionType, PresetFormItems.eventLevel, - PresetFormItems.locationMode, - PresetFormItems.route, + Object.assign(PresetFormItems.locationMode, { key: 'dcEventVehicleAccident.locationType' }), + Object.assign(PresetFormItems.route, { key: 'dcEventVehicleAccident.route' }), PresetFormItems.direction, PresetFormItems.station, PresetFormItems.eventHappenTime, PresetFormItems.aEstimatedReleaseTime, - PresetFormItems.pressure, - PresetFormItems.weatherConditions, - PresetFormItems.isCongestionAhead, - PresetFormItems.isForkRoad, - PresetFormItems.isCurveRoad, - PresetFormItems.isInTunnel, - PresetFormItems.laneOccupancy, - PresetFormItems.vehicleCondition, - PresetFormItems.casualties, + Object.assign(PresetFormItems.pressure, { key: 'dcEventVehicleAccident.trafficJam' }), + Object.assign(PresetFormItems.weatherConditions, { key: 'dcEventVehicleAccident.weatherCondition' }), + Object.assign(PresetFormItems.isCongestionAhead, { key: 'dcEventVehicleAccident.congestionAhead' }), + Object.assign(PresetFormItems.isForkRoad, { key: 'dcEventVehicleAccident.atIntersection' }), + Object.assign(PresetFormItems.isCurveRoad, { key: 'dcEventVehicleAccident.onCurve' }), + Object.assign(PresetFormItems.isInTunnel, { key: 'dcEventVehicleAccident.inTunnel' }), + Object.assign(PresetFormItems.laneOccupancy, { key: 'dcEventVehicleAccident.laneOccupancy' }), + PresetFormItems.vehicleCondition('dcEventVehicleAccident'), + PresetFormItems.casualties('dcEventVehicleAccident'), PresetFormItems.eventTitle, PresetFormItems.eventDesc, PresetFormItems.source, @@ -77,7 +77,7 @@ export const tabConfigList = [ list: [ { label: "拥堵类型:", - key: "key01203", + key: "eventSubclass", type: "RadioGroup", isAlone: true, required: true, @@ -85,29 +85,29 @@ export const tabConfigList = [ activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)", options: [ { - key: "道路拥堵", + key: "4-1", label: "道路拥堵", }, { - key: "立交拥堵", + key: "4-2", label: "立交拥堵", }, { - key: "收费站拥堵", + key: "4-3", label: "收费站拥堵", }, { - key: "服务区拥堵", + key: "4-4", label: "服务区拥堵", }, ], }, }, - PresetFormItems.congestionCause, + Object.assign(PresetFormItems.congestionCause, { key: 'dcEventTrafficCongestion.congestionCause' }), PresetFormItems.isInTunnel, { label: "拥堵里程:", - key: "key9666", + key: "dcEventTrafficCongestion.congestionMileage", required: true, type: "MultipleLabelItem", options: { @@ -123,7 +123,7 @@ export const tabConfigList = [ }, { label: "最大拥堵里程:", - key: "key96669", + key: "dcEventTrafficCongestion.maxCongestionMileage", required: true, type: "MultipleLabelItem", options: { @@ -154,7 +154,7 @@ export const tabConfigList = [ list: [ { label: "管制设施:", - key: "key012399", + key: "eventSubclass", type: "RadioGroup", isAlone: true, required: true, @@ -162,27 +162,27 @@ export const tabConfigList = [ activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)", options: [ { - key: "主线", + key: "3-1", label: "主线", }, { - key: "收费站", + key: "3-2", label: "收费站", }, { - key: "立交", + key: "3-3", label: "立交", }, { - key: "服务器", - label: "服务器", + key: "3-4", + label: "服务区", }, ], }, }, { label: "管制分类:", - key: "key0126", + key: "dcEventTrafficControl.controlType", type: "RadioGroup", isAlone: true, required: true, @@ -190,11 +190,11 @@ export const tabConfigList = [ activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)", options: [ { - key: "封闭", + key: "1", label: "封闭", }, { - key: "限行", + key: "2", label: "限行", }, ], @@ -202,7 +202,7 @@ export const tabConfigList = [ }, { label: "分类:", - key: "key0135", + key: "dcEventTrafficControl.classify", type: "RadioGroup", isAlone: true, required: true, @@ -210,7 +210,7 @@ export const tabConfigList = [ activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)", options: [ { - key: "主线关闭", + key: "1", label: "主线关闭", }, ], @@ -218,7 +218,7 @@ export const tabConfigList = [ }, { label: "分类原因:", - key: "key0138", + key: "dcEventTrafficControl.controlCause", type: "RadioGroup", isAlone: true, required: true, @@ -226,27 +226,27 @@ export const tabConfigList = [ activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)", options: [ { - key: "车流量大", + key: "1", label: "车流量大", }, { - key: "交通事故", + key: "2", label: "交通事故", }, { - key: "恶劣天气", + key: "3", label: "恶劣天气", }, { - key: "施工", + key: "4", label: "施工", }, { - key: "警备任务", + key: "5", label: "警备任务", }, { - key: "其他", + key: "6", label: "其他", }, ], @@ -255,7 +255,7 @@ export const tabConfigList = [ PresetFormItems.isInTunnel, { label: "原因类型:", - key: "key00036", + key: "dcEventTrafficControl.causeType", type: "select", }, PresetFormItems.freeway, @@ -264,8 +264,40 @@ export const tabConfigList = [ { label: "措施:", required: true, - key: "key2139", + key: "dcEventTrafficControl.measure", type: "select", + options: { + options: [ + { + value: "1", + label: "临时关闭", + }, + { + value: "2", + label: "限行车辆", + }, + { + value: "3", + label: "限行车道", + }, + { + value: "4", + label: "限行车道且限行车辆", + }, + { + value: "5", + label: "间隔放行", + }, + { + value: "6", + label: "并道行驶", + }, + { + value: "7", + label: "限速", + }, + ], + }, }, PresetFormItems.station, PresetFormItems.startTime, @@ -285,7 +317,7 @@ export const tabConfigList = [ list: [ { label: "异常分类:", - key: "key012039", + key: "eventSubclass", type: "RadioGroup", isAlone: true, required: true, @@ -293,15 +325,15 @@ export const tabConfigList = [ activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)", options: [ { - key: "封闭、暂停营业", + key: "8-1", label: "封闭、暂停营业", }, { - key: "重要设施停用", + key: "8-2", label: "重要设施停用", }, { - key: "其他异常", + key: "8-3", label: "其他异常", }, ], @@ -311,7 +343,7 @@ export const tabConfigList = [ PresetFormItems.direction, { label: "服务区:", - key: "key3666", + key: "dcEventServiceArea.facilityId", type: "select", isAlone: true, required: true, @@ -326,7 +358,7 @@ export const tabConfigList = [ }, { label: "出入口:", - key: "key01203", + key: "dcEventServiceArea.exitsInlets", type: "RadioGroup", isAlone: true, required: true, @@ -334,11 +366,11 @@ export const tabConfigList = [ activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)", options: [ { - key: "出口", + key: "1", label: "出口", }, { - key: "入口", + key: "2", label: "入口", }, ], @@ -361,7 +393,7 @@ export const tabConfigList = [ list: [ { label: "事件说明:", - key: "key00036", + key: "eventSourceTips", isAlone: true, options: { type: "textarea", @@ -392,7 +424,7 @@ export const tabConfigList = [ list: [ { label: "类型:", - key: "key0123", + key: "eventSubclass", type: "RadioGroup", isAlone: true, required: true, @@ -400,27 +432,27 @@ export const tabConfigList = [ activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)", options: [ { - key: "摄像机", + key: "9-1", label: "摄像机", }, { - key: "护栏", + key: "9-2", label: "护栏", }, { - key: "隔离栅", + key: "9-3", label: "隔离栅", }, { - key: "情报板", + key: "9-4", label: "情报板", }, { - key: "防眩板", + key: "9-5", label: "防眩板", }, { - key: "其他", + key: "9-6", label: "其他", }, ], @@ -428,7 +460,7 @@ export const tabConfigList = [ }, { label: "设备补充说明:", - key: "key00036", + key: "eventSourceTips", isAlone: true, options: { type: "textarea", @@ -460,7 +492,7 @@ export const tabConfigList = [ list: [ { label: "异常天气:", - key: "key0123", + key: "eventSubclass", type: "RadioGroup", isAlone: true, required: true, @@ -468,54 +500,66 @@ export const tabConfigList = [ activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)", options: [ { - key: "雨", + key: "10-1", label: "雨", }, { - key: "雪", + key: "10-2", label: "雪", }, { - key: "雾", + key: "10-3", label: "雾", }, { - key: "大风", + key: "10-4", label: "大风", }, { - key: "低温寒潮", + key: "10-5", label: "低温寒潮", }, { - key: "路面积雪", + key: "10-6", label: "路面积雪", }, { - key: "路面结冰", + key: "10-7", label: "路面结冰", }, { - key: "路面积水", + key: "10-8", label: "路面积水", }, { - key: "其他", + key: "10-9", label: "其他", }, ], }, }, - PresetFormItems.weatherConditions, + Object.assign(PresetFormItems.weatherConditions, { key: 'dcEventAbnormalWeather.weatherSituation' }), PresetFormItems.additionalNotes, PresetFormItems.freeway, PresetFormItems.direction, PresetFormItems.startEndStation, { label: "紧急级别:", - key: "key207", + key: "dcEventAbnormalWeather.emergencyLevel", required: true, type: "select", + options: { + options: [ + { + value: "1", + label: "一般", + }, + { + value: "2", + label: "紧急", + }, + ] + } }, PresetFormItems.isInTunnel, PresetFormItems.startTime, @@ -555,7 +599,7 @@ export const tabConfigList = [ }, { label: "施工分类:", - key: "key0126", + key: "eventSubclass", type: "RadioGroup", isAlone: true, required: true, @@ -563,23 +607,23 @@ export const tabConfigList = [ activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)", options: [ { - key: "道路养护施工", + key: "7-1", label: "道路养护施工", }, { - key: "收费站养护施工", + key: "7-2", label: "收费站养护施工", }, { - key: "服务区养护施工", + key: "7-3", label: "服务区养护施工", }, { - key: "枢纽立交匝道养护施工", + key: "7-4", label: "枢纽立交匝道养护施工", }, { - key: "地方道路养护施工", + key: "7-5", label: "地方道路养护施工", }, ], @@ -587,7 +631,7 @@ export const tabConfigList = [ }, { label: "管制方式:", - key: "key0135", + key: "dcEventConstruction.controlMode", type: "RadioGroup", isAlone: true, required: true, @@ -595,25 +639,25 @@ export const tabConfigList = [ activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)", options: [ { - key: "封闭", + key: "1", label: "封闭", }, { - key: "不封闭", + key: "2", label: "不封闭", }, ], }, }, PresetFormItems.isInTunnel, - PresetFormItems.locationType, + Object.assign(PresetFormItems.locationType, { key: 'dcEventConstruction.locationType' }), PresetFormItems.freeway, PresetFormItems.direction, PresetFormItems.station, PresetFormItems.emptyLine, { label: "特殊地点描述:", - key: "key00036", + key: "dcEventConstruction.specialPlaceDescription", isAlone: true, options: { type: "textarea", @@ -623,8 +667,8 @@ export const tabConfigList = [ showWordLimit: true, }, }, - PresetFormItems.specialConstruction, - PresetFormItems.constructionMeasurement, + Object.assign(PresetFormItems.specialConstruction, { key: 'dcEventConstruction.specialConstruction' }), + Object.assign(PresetFormItems.constructionMeasurement, { key: 'dcEventConstruction.constructionMeasurement' }), PresetFormItems.startTime, PresetFormItems.expectedEndTime, PresetFormItems.remark, @@ -642,7 +686,7 @@ export const tabConfigList = [ list: [ { label: "障碍物类型:", - key: "key0123", + key: "eventSubclass", type: "RadioGroup", isAlone: true, required: true, @@ -650,23 +694,23 @@ export const tabConfigList = [ activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)", options: [ { - key: "烟雾", + key: "6-1", label: "烟雾", }, { - key: "倒伏树木", + key: "6-2", label: "倒伏树木", }, { - key: "撒落物", + key: "6-3", label: "撒落物", }, { - key: "动物", + key: "6-4", label: "动物", }, { - key: "其他", + key: "6-5", label: "其他", }, ], diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/index.vue index e54e8c84..25c9aa44 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/index.vue @@ -6,11 +6,11 @@ -
+ @@ -67,6 +67,10 @@ export default { methods: { handleChange({ index }) { this.formConfig = tabConfigList[index].formConfig; + }, + handleSubmit(){ + const formData = this.$refs.FormConfigRef?.formData; + console.log('122',formData) } } } diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/index.vue index 36895163..83f7cc98 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/index.vue @@ -36,7 +36,14 @@ @@ -85,6 +92,7 @@ export default { data() { return { data: [], + total: 0, searchFormList, activeName: "-1", panels: [ @@ -108,12 +116,15 @@ export default { eventDetailDialogVisible: false, isShowAddNew: false, searchData: { - pageSize: 15, - pageNo: 1, + pageSize: 10, + pageNum: 1, eventState: null } } }, + created(){ + this.getData(); + }, methods: { handleSelect(activeName) { this.activeName = activeName; @@ -135,7 +146,11 @@ export default { request({ url: `/dc/system/event/list`, method: "get", - // params: this.searchData + params: this.searchData + }).then(result => { + if (result.code != 200) return Message.error(result?.msg); + this.data = result.rows; + this.total = result.total; }) }, onAddNew() { From 256da9480633ba39c5c83a05cf33cd075e67debf Mon Sep 17 00:00:00 2001 From: Joe <1712833832@qq.com> Date: Thu, 25 Jan 2024 15:02:05 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E4=BF=AE=E6=94=B9,=20for?= =?UTF-8?q?mConfig=20=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../JiHeExpressway/components/FormConfig/index.vue | 14 +++++++++++--- .../components/FormConfig/utils/defaultValue.js | 6 +++--- .../src/views/JiHeExpressway/components/Table.vue | 4 ++++ .../Home/components/ConditionStatistics/index.vue | 11 ++++++++++- .../components/Dialogs/PerceiveEvent/index.vue | 10 +++++----- .../pages/Home/components/Thumbnail/index.vue | 4 ++-- 6 files changed, 35 insertions(+), 14 deletions(-) diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/index.vue b/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/index.vue index 972431e0..f389047f 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/index.vue @@ -84,10 +84,18 @@ export default { formData: {} } }, - created() { - this.reset(true); - console.log("%c [ this.formData ]-82-「index.vue」", "font-size:15px; background:#9c7eed; color:#e0c2ff;", this.formData); + watch: { + formList: { + immediate: true, + handler() { + this.reset(true); + } + }, }, + // created() { + // this.reset(true); + // console.log("%c [ this.formData ]-82-「index.vue」", "font-size:15px; background:#9c7eed; color:#e0c2ff;", this.formData); + // }, computed: { modelFormData: { get() { diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/utils/defaultValue.js b/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/utils/defaultValue.js index 1204221e..77a7b801 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/utils/defaultValue.js +++ b/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/utils/defaultValue.js @@ -9,9 +9,9 @@ export const presetDefaultValue = { MultipleLabelItem(item) { return reduceDefaultValue(item.options?.options); }, - RadioGroup() { - return []; - }, + // RadioGroup() { + // return []; + // }, CheckboxGroup() { return []; }, diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/Table.vue b/ruoyi-ui/src/views/JiHeExpressway/components/Table.vue index bbff1b19..6927af95 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/components/Table.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/components/Table.vue @@ -56,6 +56,10 @@ div.Table { th.el-table__cell.is-leaf, td.el-table__cell { border-bottom: 0; + + div { + padding: 0; + } } .el-table__header-wrapper th, diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/ConditionStatistics/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/ConditionStatistics/index.vue index d5f5b647..d7006566 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/ConditionStatistics/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/ConditionStatistics/index.vue @@ -476,9 +476,11 @@ export default { } } } + .abnormalList { padding-bottom: 20px; - .listItem{ + + .listItem { width: 410px; height: 34px; margin: 0 auto; @@ -505,6 +507,7 @@ export default { font-family: Hiragino Sans GB, Hiragino Sans GB; line-height: 40px; text-align: center; + .num { font-size: 14px; } @@ -517,14 +520,20 @@ export default { } } + .listItem.total { .value { color: #2fe2cf; text-shadow: 0px 1px 4px #2fe2cf; } } + .listItem.kilometer { .value { + span { + font-size: 10px; + } + color: #f29600; text-shadow: 0px 1px 4px #f29600; } diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/PerceiveEvent/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/PerceiveEvent/index.vue index 59832f20..de64fd58 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/PerceiveEvent/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/PerceiveEvent/index.vue @@ -111,23 +111,23 @@ export default { activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)", options: [ { - key: 0, + key: "0", label: "应急", }, { - key: 1, + key: "1", label: "行1", }, { - key: 2, + key: "2", label: "行2", }, { - key: 3, + key: "3", label: "行3", }, { - key: 4, + key: "4", label: "行4", }, ], diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Thumbnail/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Thumbnail/index.vue index e14b42cb..d9ff5dad 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Thumbnail/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Thumbnail/index.vue @@ -53,8 +53,8 @@ export default { ctx.font = setFont(12 * zoom, "italic 900", "Arial Black"); ctx.fillStyle = "#ddc85a"; - ctx.fillText("项目起点", 210 * zoom, h / 2 - 50 * zoom); - ctx.fillText("K55+378.7", 210 * zoom, h / 2 - 33 * zoom); + ctx.fillText("项目起点", 270 * zoom, h / 2 - 50 * zoom); + ctx.fillText("K55+378.7", 270 * zoom, h / 2 - 33 * zoom); ctx.fillText("项目终点", w - 210 * zoom, h / 2 - 50 * zoom); ctx.fillText("K208+153.4", w - 210 * zoom, h / 2 - 33 * zoom); From 1f669b82a58255b572919a14b50da6a146793de4 Mon Sep 17 00:00:00 2001 From: Joe <1712833832@qq.com> Date: Thu, 25 Jan 2024 15:03:58 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E5=88=86=E9=A1=B5=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/views/JiHeExpressway/components/Pagination.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/Pagination.vue b/ruoyi-ui/src/views/JiHeExpressway/components/Pagination.vue index 68501ba7..f4070358 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/components/Pagination.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/components/Pagination.vue @@ -20,7 +20,8 @@ export default { const jumpPageDom = this.$refs.ElPaginationRef.$el.querySelector(".el-pagination__jump"); - jumpPageDom.childNodes[0].nodeValue = "跳至"; + if (jumpPageDom?.childNodes?.[0]?.nodeValue) + jumpPageDom.childNodes[0].nodeValue = "跳至"; } } From 7a16112495016f00edace01a8effdb61495b76a7 Mon Sep 17 00:00:00 2001 From: Joe <1712833832@qq.com> Date: Thu, 25 Jan 2024 15:22:23 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=20=E6=8F=90=E4=BA=A4=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Dialogs/PerceiveEvent/index.vue | 24 ++--------------- .../Dialogs/TrafficIncidents/index.vue | 1 + .../src/views/JiHeExpressway/utils/enum.js | 26 +++++++++++++++++++ 3 files changed, 29 insertions(+), 22 deletions(-) diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/PerceiveEvent/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/PerceiveEvent/index.vue index de64fd58..aaabf6de 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/PerceiveEvent/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/PerceiveEvent/index.vue @@ -27,6 +27,7 @@ import { Message } from "element-ui"; import { WarningTypeList, WarningSubclassList } from "@screen/utils/enum.js" // import { getRoadInfoByStakeMark, getProduct } from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js" import { dialogDelayVisible } from "./../mixin" +import { LaneOccupancyList } from "@screen/utils/enum.js" // 感知事件 export default { @@ -109,28 +110,7 @@ export default { type: "RadioGroup", options: { activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)", - options: [ - { - key: "0", - label: "应急", - }, - { - key: "1", - label: "行1", - }, - { - key: "2", - label: "行2", - }, - { - key: "3", - label: "行3", - }, - { - key: "4", - label: "行4", - }, - ], + options: LaneOccupancyList, }, }, { diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/TrafficIncidents/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/TrafficIncidents/index.vue index ea19cb5a..96beb4bc 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/TrafficIncidents/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/TrafficIncidents/index.vue @@ -64,6 +64,7 @@ export default { { label: '车道列表', key: "lang", + enum: "LaneOccupancy", gridColumn: '2' }, { diff --git a/ruoyi-ui/src/views/JiHeExpressway/utils/enum.js b/ruoyi-ui/src/views/JiHeExpressway/utils/enum.js index 050dff77..282c0fa8 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/utils/enum.js +++ b/ruoyi-ui/src/views/JiHeExpressway/utils/enum.js @@ -208,3 +208,29 @@ export const WarningSubclassList = Object.keys(WarningSubclass).reduce( }, {} ); + +export const LaneOccupancy = { + 0: { + text: "应急车道", + }, + 1: { + text: "行1", + }, + 2: { + text: "行2", + }, + 3: { + text: "行3", + }, + 4: { + text: "行4", + }, +}; + +export const LaneOccupancyList = Object.keys(LaneOccupancy).map((key) => { + return { + value: key, + key, + label: LaneOccupancy[key].text, + }; +}); From f041527e28330c392f3bbf843a00188cbc6cb642 Mon Sep 17 00:00:00 2001 From: zhoule Date: Thu, 25 Jan 2024 15:40:44 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/FormConfig/index.vue | 2 +- .../FormConfig/utils/defaultValue.js | 2 +- .../event/event/FormEvent/PresetFormItems.js | 26 ++++++++++++++----- .../control/event/event/FormEvent/index.vue | 25 ++++++++++++++++-- 4 files changed, 44 insertions(+), 11 deletions(-) diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/index.vue b/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/index.vue index f389047f..cdd58ee0 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/index.vue @@ -115,7 +115,7 @@ export default { }, formItemVisible() { return item => { - const result = item.visible ? item.visible(this.modelFormData) : true; + const result = item && item.visible ? item.visible(this.modelFormData) : true; // if (!result) { // delete this.formData[item.key]; diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/utils/defaultValue.js b/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/utils/defaultValue.js index 77a7b801..b055db7f 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/utils/defaultValue.js +++ b/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/utils/defaultValue.js @@ -34,7 +34,7 @@ export function reduceDefaultValue(formList, data) { if (!Array.isArray(formList)) return null; return formList.reduce((prev, cur) => { - if (cur.key) + if (cur?.key) pathSet( prev, cur.key, diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/PresetFormItems.js b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/PresetFormItems.js index d1553658..d174b9aa 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/PresetFormItems.js +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/PresetFormItems.js @@ -185,20 +185,32 @@ export const eventLevel = { export const laneOccupancy = { label: "车道占用:", key: "dcEventAccident.laneOccupancy", - type: "CheckboxGroup", + type: "RadioGroup", isAlone: true, default: [], options: { options: [ - { key: "weChat", label: "行1" }, - { key: "message", label: "行2" }, - { key: "website", label: "行3" }, - { key: "weibo", label: "行4" }, - { key: "weibo2", label: "应急车道" }, + { key: "1", label: "行1" }, + { key: "2", label: "行2" }, + { key: "3", label: "行3" }, + { key: "4", label: "行4" }, + { key: "0", label: "应急车道" }, ], }, }; +export const eventSources = { + label: "事件源:", + key: "key999999999", + type: "input", +}; + +export const eventType = { + label: "事件类型:", + key: "事件类型", + type: "input", +}; + export const vehicleCondition = (keyPrefix = 'dcEventAccident') => ({ label: "车辆情况:", key: "key25", @@ -334,7 +346,7 @@ export const isInTunnel = { activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)", options: [ { - key: "2", + key: "1", label: "是", }, { diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/index.vue index 25c9aa44..b62ce70a 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/index.vue @@ -42,7 +42,8 @@ export default { return { activeName: "TrafficAccident", formConfig: {}, - tabConfigList + tabConfigList, + index: 1 } }, created() { @@ -66,11 +67,31 @@ export default { }, methods: { handleChange({ index }) { + this.index = index; this.formConfig = tabConfigList[index].formConfig; }, handleSubmit(){ const formData = this.$refs.FormConfigRef?.formData; - console.log('122',formData) + console.log('122', { + eventType: this.index, + ...formData + }) + return + request({ + url: `/dc/system/event`, + method: "post", + data: { + eventType: this.index, + ...formData + } + }) + .then(() => { + Message.success("提交成功"); + }) + .catch(() => { + Message.error("提交失败"); + }) + } } } From b144bd2ba4699edfd2e4cd47c24db9ec290ebfdf Mon Sep 17 00:00:00 2001 From: Joe <1712833832@qq.com> Date: Thu, 25 Jan 2024 16:57:48 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E6=A0=B7=E5=BC=8F=20formConfig=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/JiHeExpressway/components/FormConfig/index.vue | 2 +- .../components/FormConfig/utils/defaultValue.js | 9 ++++++--- .../event/commandDispatch/Cards/DisposalPlan/index.vue | 6 +++--- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/index.vue b/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/index.vue index cdd58ee0..86f28211 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/index.vue @@ -1,7 +1,7 @@