import { options } from "runjs"; export const source = { label: "来源:", key: "eventSource", type: "RadioGroup", isAlone: true, required: true, 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 releaseChannel = { label: "发布渠道:", key: "channel", type: "CheckboxGroup", isAlone: true, default: [], options: { options: [ { key: "1", label: "微博" }, { key: "3", label: "微信小程序" }, { key: "4", label: "服务网站" }, { key: "5", label: "情报板" }, { key: "6", label: "手机短信" }, { key: "7", label: "微信公众号" }, ], }, }; export const illegalTriggeringType = { label: "类型:", key: "eventSubclass", type: "RadioGroup", isAlone: true, required: true, 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: false, type: "MultipleLabelItem", options: { options: [ { prefix: { text: "K", style: { color: "#3DE8FF", }, }, key: "stakeMark[0]", }, { prefix: { text: "+", style: { color: "#3DE8FF", }, }, key: "stakeMark[1]", }, ], } }; export const startStation = { label: "起始桩号:", key: "startStakeMark", required: false, type: "MultipleLabelItem", options: { options: [ { prefix: { text: "K", style: { color: "#3DE8FF", }, }, key: "startStakeMark[0]", rules: [ { message: "请补全桩号", callback(value, data) { if (!value?.trim() && data.startStakeMark[1]?.trim()) return false else return true } } ] }, { prefix: { text: "+", style: { color: "#3DE8FF", }, }, key: "startStakeMark[1]" }, ], } }; export const endStation = { label: "结束桩号:", key: "endStakeMark", required: false, type: "MultipleLabelItem", options: { options: [ { prefix: { text: "K", style: { color: "#3DE8FF", }, }, key: "endStakeMark[0]", rules: [ { message: "请补全桩号", callback(value, data) { if (!value?.trim() && data.endStakeMark[1]?.trim()) return false else return true } } ] }, { prefix: { text: "+", style: { color: "#3DE8FF", }, }, key: "endStakeMark[1]", }, ], } }; 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: "济南方向", label: "济南方向" }, // // { key: "菏泽方向", label: "菏泽方向" }, // ], // }, // }; export const direction = { label: "路段方向:", key: "direction", type: "CheckboxGroup", isAlone: true, default: [], options: { options: [ { key: "1", label: "济南方向" }, { key: "3", label: "菏泽方向" }, { key: "2", 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", 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: "eventSources", type: "select", options: { 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 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", key: `${keyPrefix}.smallCar`, }, { prefix: { text: "货车", }, suffix: { text: "辆", }, type: "inputNumber", key: `${keyPrefix}.trucks`, }, { prefix: { text: "客车", }, suffix: { text: "辆", }, type: "inputNumber", key: `${keyPrefix}.buses`, }, { prefix: { text: "罐车", }, suffix: { text: "辆", }, type: "inputNumber", 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 isInTunnel = { label: "是否处在隧道:", key: "inTunnel", // isAlone: true, required: true, 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", 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: "暴雨", }, { key: "2-1", label: "小雪", }, { key: "2-2", label: "中雪", }, { key: "2-3", label: "大雪", }, { key: "2-4", label: "暴雪", }, { key: "2-5", label: "大暴雪", }, { key: "2-6", label: "特大暴雪", }, { key: "3-1", label: "轻雾", }, { key: "3-2", label: "大雾", }, { key: "3-3", label: "浓雾", }, { key: "3-4", label: "强浓雾", }, { key: "3-5", label: "团雾", }, ], }, }; 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", label: "追尾", }, { value: "2", label: "侧翻", }, { value: "3", label: "撞护栏", }, { value: "4", label: "自然", }, { value: "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", default: "1", options: { options: [ { key: "1", label: "高速主线" }, { key: "2", label: "服务区" }, { key: "3", label: "立交桥" }, { key: "4", label: "收费站" }, ], }, }; export const route = { label: "路线:", key: "dcEventAccident.route", required: true, type: "select", }; export const eventHappenTime = { label: "事件发生时间:", key: "occurrenceTime", required: true, type: "datePicker", 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, 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, 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, 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 == "xxyy"); 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]); }, }, };