济菏高速业务端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

1276 lines
23 KiB

import request from "@/utils/request";
import { Message } from "element-ui";
import moment from "moment";
export const source = {
label: "来源:",
key: "eventSource",
type: "RadioGroup",
isAlone: true,
required: true,
default: 1,
options: {
activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: [
{
key: 1,
label: "96659",
},
{
key: 2,
label: "交通转接",
},
{
key: 3,
label: "道路巡查",
},
{
key: 4,
label: "视频巡查",
},
{
key: 5,
label: "视频AI",
},
{
key: 6,
label: "一键救援",
},
{
key: 7,
label: "其他",
},
],
},
};
export const illegalTriggeringType = {
label: "类型:",
key: "eventSubclass",
type: "RadioGroup",
isAlone: true,
required: true,
default: "5-1",
options: {
activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: [
{
key: "5-1",
label: "行人",
},
{
key: "5-2",
label: "非机动车",
},
{
key: "5-3",
label: "摩托车",
},
{
key: "5-4",
label: "其他",
},
],
},
};
export const station = {
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.dcEventAccident && data.dcEventAccident.locationType != 1) {
return false;
}
return true;
},
};
export const startEndStation = {
label: "起止桩号:",
key: "stakeMark",
required: true,
isAlone: true,
type: "MultipleLabelItem",
options: {
options: [
{
prefix: {
text: "K",
style: {
color: "#3DE8FF",
},
},
key: "stakeMark[0]",
},
{
prefix: {
text: "+",
style: {
color: "#3DE8FF",
},
},
key: "stakeMark[1]",
},
{
prefix: {
text: "至K",
style: {
color: "#3DE8FF",
},
},
key: "endStakeMark[0]",
},
{
prefix: {
text: "+",
style: {
color: "#3DE8FF",
},
},
key: "endStakeMark[1]",
},
],
},
};
export const direction = {
label: "方向:",
key: "direction",
required: true,
type: "select",
options: {
options: [
{ key: "1", label: "菏泽方向" },
{ key: "3", label: "济南方向" },
],
},
};
export const problemDescription = {
label: "问题描述:",
key: "description",
isAlone: true,
options: {
type: "textarea",
autosize: true,
maxlength: 150,
autosize: { minRows: 6, maxRows: 6 },
showWordLimit: true,
},
required: true,
};
export const startTime = {
label: "开始时间:",
key: "startTime",
required: true,
isAlone: true,
type: "datePicker",
default: moment(new Date()).format("YYYY-MM-DD HH:mm:ss"),
options: {
type: "datetime",
format: "yyyy-MM-dd HH:mm:ss",
valueFormat: "yyyy-MM-dd HH:mm:ss",
},
};
export const expectedEndTime = {
label: "预计结束时间:",
key: "estimatedEndTime",
isAlone: true,
type: "datePicker",
options: {
type: "datetime",
format: "yyyy-MM-dd HH:mm:ss",
valueFormat: "yyyy-MM-dd HH:mm:ss",
},
};
export const eventLevel = {
label: "事件等级:",
key: "eventLevel",
required: true,
type: "select",
default: 5,
options: {
options: [
{
key: 1,
label: "一级",
},
{
key: 2,
label: "二级",
},
{
key: 3,
label: "三级",
},
{
key: 4,
label: "四级",
},
{
key: 5,
label: "五级",
},
],
disabled: true,
},
};
export const laneOccupancy = {
label: "车道占用:",
key: "lang",
type: "CheckboxGroup",
isAlone: true,
default: [],
options: {
options: [
{ key: '1', label: "行1" },
{ key: '2', label: "行2" },
{ key: '3', label: "行3" },
{ key: '4', label: "行4" },
{ key: '0', label: "应急车道" },
],
},
};
export const eventSources = {
label: "事件源:",
key: "eventSource",
type: "select",
options: {
clearable: true,
options: [
{
key: 1,
label: "96659",
},
{
key: 2,
label: "交通转接",
},
{
key: 3,
label: "道路巡查",
},
{
key: 4,
label: "视频巡查",
},
{
key: 5,
label: "视频AI",
},
{
key: 6,
label: "一键救援",
},
{
key: 7,
label: "其他",
},
],
},
};
export const warningType = {
label: "事件源:",
key: "warningType",
type: "select",
options: {
clearable: true,
options: [
{
key: 1,
label: "交通拥堵",
},
{
key: 2,
label: "行人",
},
{
key: 4,
label: "停车",
},
{
key: 5,
label: "违规驾驶",
},
{
key: 6,
label: "路障",
},
{
key: 7,
label: "道路施工",
},
{
key: "99",
label: "其他",
},
],
},
};
export const eventType = {
label: "事件类型:",
key: "eventType",
type: "select",
options: {
options: [
{
key: 1,
label: "交通事故",
},
{
key: 2,
label: "车辆故障",
},
{
key: 3,
label: "交通管制",
},
{
key: 4,
label: "交通拥堵",
},
{
key: 5,
label: "非法上路",
},
{
key: 6,
label: "路障清除",
},
{
key: 7,
label: "施工建设",
},
{
key: 8,
label: "服务区异常",
},
{
key: 9,
label: "设施设备隐患",
},
{
key: 10,
label: "异常天气",
},
{
key: 11,
label: "其他事件",
},
],
},
};
export const vehicleCondition = (keyPrefix = "dcEventAccident") => ({
label: "车辆情况:",
key: "key25",
isAlone: true,
type: "MultipleLabelItem",
options: {
options: [
{
prefix: {
text: "小型车",
},
suffix: {
text: "辆",
},
type: "inputNumber",
options: {
min: 0,
},
key: `${keyPrefix}.smallCar`,
},
{
prefix: {
text: "货车",
},
suffix: {
text: "辆",
},
options: {
min: 0,
},
type: "inputNumber",
key: `${keyPrefix}.trucks`,
},
{
prefix: {
text: "客车",
},
suffix: {
text: "辆",
},
type: "inputNumber",
options: {
min: 0,
},
key: `${keyPrefix}.buses`,
},
{
prefix: {
text: "罐车",
},
suffix: {
text: "辆",
},
type: "inputNumber",
options: {
min: 0,
},
key: `${keyPrefix}.tankers`,
},
],
},
});
export const casualties = (keyPrefix = "dcEventAccident") => ({
label: "伤亡情况:",
key: "key0036",
isAlone: true,
type: "MultipleLabelItem",
options: {
options: [
{
prefix: {
text: "轻伤",
},
suffix: {
text: "人",
},
key: `${keyPrefix}.minorInjuries`,
},
{
prefix: {
text: "重伤",
},
suffix: {
text: "人",
},
key: `${keyPrefix}.seriousInjuries`,
},
{
prefix: {
text: "死亡",
},
suffix: {
text: "人",
},
key: `${keyPrefix}.fatalities`,
},
],
},
});
export const eventTitle = {
label: "事件标题:",
key: "eventTitle",
isAlone: true,
required: true,
};
export const eventDesc = {
label: "事件描述:",
key: "description",
isAlone: true,
options: {
type: "textarea",
autosize: true,
maxlength: 150,
autosize: { minRows: 6, maxRows: 6 },
showWordLimit: true,
},
required: true,
};
export const remark = {
label: "备注:",
key: "remark",
isAlone: true,
options: {
type: "textarea",
autosize: true,
maxlength: 150,
autosize: { minRows: 6, maxRows: 6 },
showWordLimit: true,
},
// required: true,
};
export const inTunnel = {
label: "是否处在隧道:",
key: "inTunnel",
// isAlone: true,
required: true,
default: 0,
type: "RadioGroup",
options: {
activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: [
{
key: 1,
label: "是",
},
{
key: 0,
label: "否",
},
],
},
};
export const freeway = {
label: "路线:",
required: true,
key: "roadId",
type: "select",
default: 1,
options: {
options: [
{
key: 1,
label: "济菏高速",
},
],
},
};
export const weatherCondition = {
label: "天气情况:",
key: "dcEventAccident.weatherCondition",
type: "RadioGroup",
isAlone: true,
required: true,
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: "其他",
},
],
},
};
export const weatherSituation = {
label: "天气情况:",
key: "dcEventAccident.weatherSituation",
type: "RadioGroup",
isAlone: true,
required: true,
options: {
activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: [
{
key: "1-1",
label: "雨雾",
},
{
key: "1-2",
label: "雨雪",
},
{
key: "1-3",
label: "中雨",
},
{
key: "1-4",
label: "小雨",
},
{
key: "1-5",
label: "大雨",
},
{
key: "1-6",
label: "暴雨",
},
],
},
visible: (data) => {
if (
data?.eventSubclass == "10-1" ||
data?.eventSubclass == "10-2" ||
data?.eventSubclass == "10-3"
) {
return true;
}
return false;
},
};
export const additionalNotes = {
label: "补充说明:",
key: "eventSourceTips",
isAlone: true,
options: {
type: "textarea",
autosize: true,
maxlength: 150,
autosize: { minRows: 6, maxRows: 6 },
showWordLimit: true,
},
};
export const callPolicePersonName = {
label: "报警人姓名:",
key: "dcEventAccident.reporterName",
options: {
placeholder: "请输入报警人姓名",
},
required: true,
};
export const callPolicePersonPhone = {
label: "报警人电话:",
key: "dcEventAccident.reporterPhoneNumber",
options: {
placeholder: "请输入报警人电话(区号+号码)",
},
required: true,
};
export const trafficAccidentType = {
label: "交通事故类型:",
key: "eventSubclass",
type: "select",
required: true,
options: {
options: [
{
value: "1-1",
label: "追尾",
},
{
value: "1-2",
label: "侧翻",
},
{
value: "1-3",
label: "撞护栏",
},
{
value: "1-4",
label: "自燃",
},
{
value: "1-5",
label: "其他事故",
},
],
},
};
export const vehicleMalfunctionType = {
label: "车辆故障类型:",
key: "eventSubclass",
type: "select",
required: true,
options: {
options: [
{
value: "2-1",
label: "车辆故障",
},
],
},
};
export const locationMode = {
label: "地点方式:",
key: "dcEventAccident.locationType",
required: true,
type: "select",
options: {
options: [
{ key: 1, label: "高速主线" },
{ key: 2, label: "服务区" },
{ key: 3, label: "立交桥" },
{ key: 4, label: "收费站" },
],
},
ons: {
change(value, ...args) {
const { data, formList } = args.slice(-1)[0];
if (data.dcEventAccident) {
data.dcEventAccident.facilityId = null;
}
if (data.dcEventVehicleAccident) {
data.dcEventVehicleAccident.facilityId = null;
}
let facilityType = 1;
if (value == 2) {
facilityType = 6;
} else if (value == 3) {
facilityType = 3;
} else if (value == 4) {
facilityType = 1;
}
if (value && value != 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 == "dcEventAccident.facilityId" ||
it.key == "dcEventVehicleAccident.facilityId"
) {
it.options.options = lwss;
}
});
})
.catch((err) => {
console.log("err", err);
Message.error("查询失败1", err);
});
}
},
},
};
export const route = {
label: "路线:",
key: "dcEventAccident.route",
required: true,
type: "select",
};
export const eventHappenTime = {
label: "事件发生时间:",
key: "occurrenceTime",
required: true,
type: "datePicker",
default: moment(new Date()).format("YYYY-MM-DD HH:mm:ss"),
options: {
type: "datetime",
format: "yyyy-MM-dd HH:mm:ss",
valueFormat: "yyyy-MM-dd HH:mm:ss",
},
};
export const aEstimatedReleaseTime = {
label: "预计解除时间:",
key: "estimatedEndTime",
type: "datePicker",
options: {
type: "datetime",
format: "yyyy-MM-dd HH:mm:ss",
valueFormat: "yyyy-MM-dd HH:mm:ss",
},
};
export const pressure = {
label: "压车(公里):",
key: "dcEventAccident.trafficJam",
type: "inputNumber",
options: {
min: 0,
},
ons: {
change(value, ...args) {
const { data } = args.slice(-1)[0];
let dj = 5;
if (value < 3) {
dj = 5;
} else if (value >= 3 && value < 6) {
dj = 4;
} else if (value >= 6 && value < 9) {
dj = 3;
} else if (value >= 9 && value < 11) {
dj = 2;
} else if (value > 10) {
dj = 1;
}
data.eventLevel = dj;
},
},
};
export const isCongestionAhead = {
label: "前方是否拥堵:",
key: "dcEventAccident.congestionAhead",
type: "RadioGroup",
options: {
activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: [
{
key: 0,
label: "是",
},
{
key: 1,
label: "否",
},
],
},
};
export const isForkRoad = {
label: "是否分岔口:",
key: "dcEventAccident.atIntersection",
type: "RadioGroup",
options: {
activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: [
{
key: 0,
label: "是",
},
{
key: 1,
label: "否",
},
],
},
};
export const isCurveRoad = {
label: "是否处在弯道:",
key: "dcEventAccident.onCurve",
type: "RadioGroup",
options: {
activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: [
{
key: 1,
label: "是",
},
{
key: 0,
label: "否",
},
],
},
};
export const effect = {
label: "影响:",
key: "dcEventAccident.impactLevel",
type: "select",
options: {
options: [
{ key: 1, label: "无" },
{ key: 2, label: "危化品泄漏" },
{ key: 3, label: "整车自燃" },
{ key: 4, label: "车辆复燃" },
{ key: 5, label: "散装人工倒货" },
],
},
};
export const isArrives = {
label: "是否倒货:",
key: "dcEventAccident.isReverseCargo",
type: "RadioGroup",
options: {
activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: [
{
key: 1,
label: "是",
},
{
key: 0,
label: "否",
},
],
},
};
export const isMaintenanceAccident = {
label: "是否养护事故:",
key: "dcEventAccident.isMaintenance",
type: "RadioGroup",
options: {
activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: [
{
key: 1,
label: "是",
},
{
key: 0,
label: "否",
},
],
},
};
export const trafficPolicePhone = {
label: "交警电话:",
key: "dcEventAccident.policeContact",
};
export const wreckerCalls = {
label: "清障电话:",
options: {
placeholder: "请输入清障电话(区号+号码)",
},
key: "dcEventAccident.towingServiceContact",
};
export const spillName = {
label: "洒落物名称:",
key: "dcEventAccident.spillageItem",
isAlone: true,
options: {
type: "textarea",
autosize: true,
maxlength: 50,
autosize: { minRows: 3, maxRows: 3 },
showWordLimit: true,
},
};
export const ownerPhone = {
label: "车主电话:",
key: "dcEventAccident.vehicleOwnerPhone",
isAlone: true,
options: {
placeholder: "车主电话(多个电话请以逗号分隔,不超过10个)",
},
};
export const emptyLine = {
key: "key222",
type: "empty",
};
export const constructionMeasurement = {
label: "施工措施:",
key: "constructionMeasurement",
type: "RadioGroup",
isAlone: true,
required: true,
default: 0,
options: {
activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: [
{
key: 0,
label: "无",
},
{
key: 1,
label: "并道行驶",
},
{
key: 2,
label: "临时保通",
},
{
key: 3,
label: "借路侧服务区通行",
},
],
},
};
export const locationType = {
label: "地点类型:",
key: "locationType",
type: "RadioGroup",
isAlone: true,
required: true,
default: 1,
options: {
activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: [
{
key: 1,
label: "单点",
},
{
key: 2,
label: "多点",
},
],
},
};
export const specialConstruction = {
label: "专项施工:",
key: "specialConstruction",
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: "其他专项工程施工",
},
],
},
};
export const trafficCondition = {
label: "通行情况:",
key: "trafficCondition",
type: "RadioGroup",
isAlone: true,
required: true,
options: {
activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: [
{
key: 1,
label: "通行正常",
},
{
key: 2,
label: "通行受阻",
},
],
},
};
export const disableFacility = {
label: "停用设施:",
key: "disableFacility",
type: "RadioGroup",
isAlone: true,
required: true,
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: "充电桩",
},
],
},
};
export const congestionCause = {
label: "拥堵原因:",
key: "congestionCause",
type: "RadioGroup",
isAlone: true,
required: true,
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) {
// console.log(value);
const { formList } = args.slice(-1)[0];
const config = formList.find((it) => it.key == "detailedReasons");
let ad = {
1: [
{
key: 1,
label: "收费站广场拥堵导致出口压车",
},
{
key: 2,
label: "收费站设备故障",
},
{
key: 3,
label: "地方道路原因",
},
{
key: 4,
label: "省内非集团所辖高速原因",
},
{
key: 5,
label: "集团所辖道路拥堵",
},
{
key: 6,
label: "集团所辖枢纽立交异常导致主线压车",
},
{
key: 7,
label: "路侧起火",
},
{
key: 8,
label: "备注项添加",
},
],
2: [
{
key: 1,
label: "主线车流量大",
},
{
key: 2,
label: "收费站出口车流量大导致主线压车",
},
],
};
config.options.options = value != 1 ? ad[1] : ad[2];
},
},
visible: (data) => {
if (data?.eventSubclass != "4-1") {
return false;
}
return true;
},
};
export const locationSelect = [
{
value: "1",
label: "入口车道",
},
{
value: "2",
label: "入口匝道",
},
{
value: "3",
label: "入口",
},
{
value: "4",
label: "入口内广场",
},
{
value: "5",
label: "出口车道",
},
{
value: "6",
label: "出口匝道",
},
{
value: "7",
label: "外广场",
},
{
value: "8",
label: "出口",
},
{
value: "9",
label: "(站外)入口匝道",
},
{
value: "10",
label: "(站外)出口匝道",
},
{
value: "11",
label: "出口内广场",
},
];