Browse Source

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

wangqin
hui 1 year ago
parent
commit
a7c106e17b
  1. 18
      ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/index.vue
  2. 15
      ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/utils/defaultValue.js
  3. 3
      ruoyi-ui/src/views/JiHeExpressway/components/Pagination.vue
  4. 4
      ruoyi-ui/src/views/JiHeExpressway/components/Table.vue
  5. 11
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/ConditionStatistics/index.vue
  6. 24
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/PerceiveEvent/index.vue
  7. 1
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/TrafficIncidents/index.vue
  8. 4
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Thumbnail/index.vue
  9. 6
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DisposalPlan/index.vue
  10. 180
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/PresetFormItems.js
  11. 264
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/data.js
  12. 31
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/index.vue
  13. 23
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/index.vue
  14. 26
      ruoyi-ui/src/views/JiHeExpressway/utils/enum.js

18
ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/index.vue

@ -1,7 +1,7 @@
<template>
<ElForm :style="getStyle()" :label-width="labelWidth" class="FormConfig" size="mini">
<template v-for="(item, index) in formList">
<ElFormItem class="formItem" :rules="getRules(item)" v-if="formItemVisible(item)" :key="item.key"
<ElFormItem class="formItem" :rules="getRules(item)" v-if="formItemVisible(item)" :key="`${item.key}|${index}`"
:label="item.label" :style="gridStyle(item, index)">
<slot :name="item.key" :data="item" :formData="modelFormData">
<ProxyCom :value="getValue(item)" :item="item" @update:value="data => updateValue(item, data)" />
@ -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() {
@ -107,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];

15
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 [];
},
@ -30,11 +30,14 @@ export function getDefaultValue(item, data) {
return typeof getValue === "function" ? getValue(item) : null;
}
export function reduceDefaultValue(formList, data) {
export function reduceDefaultValue(formList, data, total = {}) {
if (!Array.isArray(formList)) return null;
return formList.reduce((prev, cur) => {
if (cur.key)
if (cur?.type === "MultipleLabelItem")
Array.isArray(cur.options?.options) &&
reduceDefaultValue(cur.options.options, data, prev);
else if (cur?.key)
pathSet(
prev,
cur.key,
@ -43,5 +46,5 @@ export function reduceDefaultValue(formList, data) {
// prev[cur.key] = getDefaultValue(cur, pathGet(data || {}, cur.key));
return prev;
}, {});
}, total);
}

3
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 = "跳至";
}
}
</script>

4
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,

11
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;
}

24
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,
},
},
{

1
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'
},
{

4
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);

6
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DisposalPlan/index.vue

@ -26,12 +26,12 @@ function getDefaultBlockOption() {
function getDefaultLegendOption() {
return {
width: 9,
height: 9,
width: 11,
height: 11,
y: 0,
text: {
font: "PingFang SC",
fontSize: 9,
fontSize: 11,
align: 'left',
color: "#FFFFFF"
},

180
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,36 +170,48 @@ 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",
type: "CheckboxGroup",
key: "dcEventAccident.laneOccupancy",
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 vehicleCondition = {
export const eventSources = {
label: "事件源:",
key: "key999999999",
type: "input",
};
export const eventType = {
label: "事件类型:",
key: "事件类型",
type: "input",
};
export const vehicleCondition = (keyPrefix = 'dcEventAccident') => ({
label: "车辆情况:",
key: "key25",
isAlone: true,
@ -214,6 +226,7 @@ export const vehicleCondition = {
text: "辆",
},
type: "inputNumber",
key: `${keyPrefix}.smallCar`,
},
{
prefix: {
@ -223,6 +236,7 @@ export const vehicleCondition = {
text: "辆",
},
type: "inputNumber",
key: `${keyPrefix}.trucks`,
},
{
prefix: {
@ -232,6 +246,7 @@ export const vehicleCondition = {
text: "辆",
},
type: "inputNumber",
key: `${keyPrefix}.buses`,
},
{
prefix: {
@ -241,12 +256,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 +277,7 @@ export const casualties = {
suffix: {
text: "人",
},
key: `${keyPrefix}.minorInjuries`,
},
{
prefix: {
@ -269,6 +286,7 @@ export const casualties = {
suffix: {
text: "人",
},
key: `${keyPrefix}.seriousInjuries`,
},
{
prefix: {
@ -277,21 +295,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 +324,7 @@ export const eventDesc = {
export const remark = {
label: "备注:",
key: "key2811",
key: "remark",
isAlone: true,
options: {
type: "textarea",
@ -319,7 +338,7 @@ export const remark = {
export const isInTunnel = {
label: "是否处在隧道:",
key: "key6240",
key: "inTunnel",
// isAlone: true,
required: true,
type: "RadioGroup",
@ -327,11 +346,11 @@ export const isInTunnel = {
activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: [
{
key: "",
key: "1",
label: "是",
},
{
key: "",
key: "0",
label: "否",
},
],
@ -347,7 +366,7 @@ export const freeway = {
export const weatherConditions = {
label: "天气情况:",
key: "isCongestionAhead",
key: "dcEventAccident.weatherCondition",
type: "RadioGroup",
isAlone: true,
required: true,
@ -428,7 +447,7 @@ export const weatherConditions = {
export const additionalNotes = {
label: "补充说明:",
key: "key00036",
key: "eventSourceTips",
isAlone: true,
options: {
type: "textarea",
@ -441,7 +460,7 @@ export const additionalNotes = {
export const callPolicePersonName = {
label: "报警人姓名:",
key: "reporterName",
key: "dcEventAccident.reporterName",
options: {
placeholder: "请输入报警人姓名",
},
@ -450,7 +469,7 @@ export const callPolicePersonName = {
export const callPolicePersonPhone = {
label: "报警人电话:",
key: "reporterPhoneNumber",
key: "dcEventAccident.reporterPhoneNumber",
options: {
placeholder: "请输入报警人电话(区号+号码)",
},
@ -459,34 +478,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 +524,7 @@ export const trafficAccidentType = {
export const locationMode = {
label: "地点方式:",
key: "locationType",
key: "dcEventAccident.locationType",
required: true,
type: "select",
options: {
@ -509,32 +539,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 +583,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 +602,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 +621,7 @@ export const isCurveRoad = {
export const effect = {
label: "影响:",
key: "impactLevel",
key: "dcEventAccident.impactLevel",
type: "select",
options: {
options: [
@ -606,7 +636,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 +655,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 +674,7 @@ export const isMaintenanceAccident = {
export const trafficPolicePhone = {
label: "交警电话:",
key: "policeContact",
key: "dcEventAccident.policeContact",
};
export const wreckerCalls = {
@ -652,12 +682,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 +700,7 @@ export const spillName = {
export const ownerPhone = {
label: "车主电话:",
key: "key23",
key: "dcEventAccident.vehicleOwnerPhone",
isAlone: true,
};
@ -679,18 +709,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",

264
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: "其他",
},
],

31
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/index.vue

@ -6,11 +6,11 @@
</ElTabs>
<Transition name="fade">
<Form class="form" :formList="formConfig.list" v-bind="getFormOptions" labelWidth="120px" />
<Form class="form" ref="FormConfigRef" :formList="formConfig.list" v-bind="getFormOptions" labelWidth="120px" />
</Transition>
<div class="footer">
<Button style="padding:0 24px;">保存</Button>
<Button style="padding:0 24px;" @click.native="handleSubmit" >保存</Button>
<Button style="background: #C9C9C9;padding:0 24px;">取消</Button>
</div>
</div>
@ -42,7 +42,8 @@ export default {
return {
activeName: "TrafficAccident",
formConfig: {},
tabConfigList
tabConfigList,
index: 1
}
},
created() {
@ -66,7 +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', {
eventType: this.index,
...formData
})
return
request({
url: `/dc/system/event`,
method: "post",
data: {
eventType: this.index,
...formData
}
})
.then(() => {
Message.success("提交成功");
})
.catch(() => {
Message.error("提交失败");
})
}
}
}

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

@ -36,7 +36,14 @@
<!-- 分页 -->
<div class="footer">
<Pagination :total="90" />
<Pagination
@current-change="getData"
width="'100%'"
:page-size="searchData.pageSize"
:current-page.sync="searchData.pageNum"
layout="total, sizes, prev, pager, next"
:total="total">
</Pagination>
</div>
<!-- "详情"弹出框 -->
@ -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() {

26
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,
};
});

Loading…
Cancel
Save