-
+
-
@@ -27,7 +27,8 @@ import Button from "@screen/components/Buttons/Button.vue";
import request from "@/utils/request";
import { Message } from "element-ui";
-import { tabConfigList } from "./data.js";
+
+import { formatEvent,configList } from "@screen/utils/enum_event/data.js";
export default {
name: "EventDetailDialog",
@@ -45,10 +46,10 @@ export default {
},
data() {
return {
- activeName: "TrafficAccident",
+ activeName: "交通事故",
submitting: false,
- formConfig: {},
- tabConfigList,
+ formConfig: [],
+ tabConfigList:[],
index: 1,
roads: [],
direction: [],
@@ -56,7 +57,9 @@ export default {
};
},
created() {
- // this.formConfig = tabConfigList[0].formConfig;
+ for(let i in configList){
+ this.tabConfigList.push({label:i});
+ }
this.initData().then(() => {
this.handleChange({ index: 0 });
});
@@ -73,41 +76,13 @@ export default {
getFormOptions() {
return {
column: 3,
- ...this.formConfig.formOptions,
+ // ...this.formConfig.formOptions,
};
},
},
methods: {
initData() {
return Promise.all([
- //道路
- request({
- url: `/business/road/query`,
- method: "get",
- })
- .then((result) => {
- if (result.code != 200) return Message.error(result?.msg);
- result.data.forEach((it) => {
- this.roads.push({ key: it.id, label: it.roadName });
- });
- })
- .catch((err) => {
- Message.error("查询失败4", err);
- }),
- //方向字典
- request({
- url: `/system/dict/data/type/iot_event_direction`,
- method: "get",
- })
- .then((result) => {
- if (result.code != 200) return Message.error(result?.msg);
- result.data.forEach((it) => {
- this.direction.push({ key: it.dictValue, label: it.dictLabel });
- });
- })
- .catch((err) => {
- Message.error("查询失败5", err);
- }),
//路网设施 1 收费站 2 桥梁 3 互通立交 4 枢纽立交 5 隧道 6 服务区
request({
url: `/business/facility/query`,
@@ -125,92 +100,42 @@ export default {
})
.catch((err) => {
console.log("err", err);
- Message.error("查询失败6", err);
+ Message.error("查询失败", err);
}),
]);
},
handleChange({ index }) {
- // console.log('index',index)
this.index = index;
- let formConfig = tabConfigList[index].formConfig;
- console.log("formConfig", formConfig);
- formConfig.list.forEach((it) => {
- if (it.key == "direction") {
- it.options.options = this.direction;
- }
- if (it.key == "roadId") {
- it.options.options = this.roads;
- }
- if (index == 7 && it.key == "dcEventServiceArea.facilityId") {
- it.options.options = this.lwss.filter((ss) => ss.type == 6);
- }
- // if (index == 0 || index == 1 || index == 7) {
- // if (it.key === 'dcEventAccident.facilityId' || it.key === 'dcEventVehicleAccident.facilityId' || it.key === 'dcEventServiceArea.facilityId') {
- // it.options.options = this.lwss.filter(ss => ss.type == 6);
- // }
- // }
- });
-
+ let formConfig = configList[this.tabConfigList[index].label];
+
+ if(this.activeName === '服务器异常'){
+ formConfig.forEach((it) => {
+ if (it.key == "dcEventServiceArea.facilityId") {
+ it.options.options = this.lwss.filter((x) => x.type == 6);
+ }
+ });
+ }
this.formConfig = formConfig;
},
handleSubmit() {
// return
this.$refs.FormConfigRef.validate().then((formData) => {
this.submitting = true;
+ let f = formatEvent(formData)
- if (this.index == 0 || this.index == 1) {
- formData.lang = formData.lang.join(",");
- } else {
- formData.lang = "";
+ if(f.startTime){
+ f.occurrenceTime = f.startTime;
+ delete f.startTime
}
- if (this.index == 2 && formData.dcEventTrafficControl.facilityId instanceof Array) {
- let ids = formData.dcEventTrafficControl.facilityId;
- formData.dcEventTrafficControl.facilityIds = ids
- formData.dcEventTrafficControl.facilityId = ''
- }
- if (formData.endStakeMark && formData.endStakeMark[0] != null) {
- let endStakeMark = formData.endStakeMark;
- let strMark = endStakeMark && endStakeMark.length > 0 ? "K" + endStakeMark[0] + "+" + endStakeMark[1] : "";
- if (this.index == 3) {
- formData.dcEventTrafficCongestion.endStakeMark = strMark;
- }
- if (this.index == 6) {
- formData.dcEventConstruction.endStakeMark = strMark;
- }
- if (this.index == 9) {
- formData.dcEventAbnormalWeather.endStakeMark = strMark;
- }
- formData.endStakeMark = "";
- } else {
- formData.endStakeMark = "";
- }
- let stakeMark = formData.stakeMark;
- // console.log('formData', {
- // ...formData,
- // eventType: Number(this.index) + 1,
- // stakeMark: (stakeMark && stakeMark[0] != null) ? ((stakeMark && stakeMark.length > 0) ? ('K' + stakeMark[0] + '+' + stakeMark[1]) : '') : '',
- // })
- // this.modelVisible = false;
- // this.submitting = false;
- // this.$emit('queryData',true)
- // 匝道数组特殊处理
- if(formData.dcEventTrafficControl && formData.dcEventTrafficControl.rampId){
- formData.dcEventTrafficControl.rampId = formData.dcEventTrafficControl.rampId.join(',')
- }
-
+
request({
url: `/dc/system/event`,
method: "post",
data: {
- ...formData,
+ ...f,
eventType: Number(this.index) + 1,
eventState: 0,
- stakeMark:
- stakeMark && stakeMark[0] != null
- ? stakeMark && stakeMark.length > 0
- ? "K" + stakeMark[0] + "+" + stakeMark[1]
- : ""
- : "",
+ stakeMark: f.stakeMark || ''
},
})
.then((result) => {
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 1e53fa12..2646d5c6 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
@@ -206,7 +206,7 @@ export default {
if (result.code != 200) return Message.error(result?.msg);
result.rows.forEach(it => {
it.stringDirection = gzDirectionMapping[it.direction] || it.direction;
- it.stringEventType = it.stringEventType + (it.eventSubclass ? `(${it.eventSubclass})` : '');
+ it.stringEventType = it.stringEventType + (it.eventSubclass ? `(${it.eventSubclassName})` : '');
if (this.activeName == '0') {
it.startTime = it?.occurrenceTime || '';
@@ -216,11 +216,8 @@ export default {
it.startTime = it?.endTime || '';
}
- // if (it.otherConfig) {
- // let otherConfig = JSON.parse(it.otherConfig);
- // it.pictures = otherConfig.pictures || [];
- // }
})
+ console.log(result.rows)
this.data = result.rows;
this.total = result.total;
});
diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/addAndEditDialog/ScopeTable.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/addAndEditDialog/ScopeTable.vue
index b48f5fb3..6947bc6a 100644
--- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/addAndEditDialog/ScopeTable.vue
+++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/addAndEditDialog/ScopeTable.vue
@@ -56,7 +56,7 @@
-
+
@@ -65,7 +65,7 @@
-
+
时长(分钟)
@@ -120,7 +120,7 @@
-
+
@@ -129,7 +129,7 @@
-
+
时长(分钟)
@@ -152,13 +152,6 @@
:value="item.value">
-
-
@@ -195,6 +188,7 @@ export default {
visible: Boolean,
eventType: Number,
type: Number,
+ index:Number,
tableInfo: {
type: Object,
default: () => ({ ...defaultTableInfo })
@@ -238,43 +232,43 @@ export default {
],
gzmsOptions: [
{
- value: "激光关闭",
+ value: "0",
label: "激光关闭"
},
{
- value: "常亮模式",
+ value: "1",
label: "常亮模式"
},
{
- value: "间隔100ms闪烁模式",
+ value: "2",
label: "间隔100ms闪烁模式"
},
{
- value: "间隔200ms闪烁模式",
+ value: "3",
label: "间隔200ms闪烁模式",
},
{
- value: "间隔500ms闪烁模式",
+ value: "4",
label: "间隔500ms闪烁模式",
},
{
- value: "2次闪烁模式",
+ value: "5",
label: "2次闪烁模式"
},
{
- value: "SOS模式",
+ value: "6",
label: "SOS模式"
},
{
- value: "自定义模式1",
+ value: "7",
label: "自定义模式1",
},
{
- value: "自定义模式2",
+ value: "8",
label: "自定义模式2",
},
{
- value: "自定义模式3",
+ value: "9",
label: "自定义模式3",
}
],
@@ -288,7 +282,6 @@ export default {
'tableInfo.deviceType': {
async handler(newValue) {
let loadData = await this.loadData(newValue);
- // console.log('aa', loadData)
this.sbOptions = [];
loadData.forEach(it => {
this.sbOptions.push({ value: it.iotDeviceId, label: it.deviceName })
@@ -298,40 +291,25 @@ export default {
}
},
async mounted() {
- // if(this.type == )
- // let loadData = await this.loadData(2);
- // // console.log('aa', loadData)
- // this.sbOptions = [];
- // loadData.forEach(it => {
- // this.sbOptions.push({ value: it.iotDeviceId, label: it.deviceName })
- // })
+
},
methods: {
initData() {
},
- async changeDeviceType(value) {
- this.deviceType = value;
- console.log('value', value)
- let loadData = await this.loadData(value);
- this.sbOptions = [];
- loadData.forEach(it => {
- this.sbOptions.push({ value: it.iotDeviceId, label: it.deviceName })
- })
+ gzmsOptions_zx_change(e){
+ this.tableInfo['zx_name']=_.find(this.gzmsOptions,{value:e}).label
},
- onAdd(id) {
- this.tableData.push({
- deviceType: 1,
- searchRule: 1,
- qbb: ''
- })
+ gzmsOptions_hf_change(e){
+ this.tableInfo['hf_name']=_.find(this.gzmsOptions,{value:e}).label
},
- onDel(index) {
- if (this.tableData.length <= 1) {
- return Message.warning('最后一项不可删除!');
- }
- this.tableData.splice(index, 1)
+ async changeDeviceType(value) {
+ this.$emit("onchange",this.index)
+ this.deviceType = value;
+ this.tableInfo.devList = [];
},
+
+ // 情报板弹窗
clickQbb(name) {
this.clickQbbName = name;
// this.qbbData = this.tableData[index].dcInfoBoardTemplate;
diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/addAndEditDialog/index copy.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/addAndEditDialog/index copy.vue
deleted file mode 100644
index 2d60aa9f..00000000
--- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/addAndEditDialog/index copy.vue
+++ /dev/null
@@ -1,472 +0,0 @@
-
-
-
-
-
-
-
diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/addAndEditDialog/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/addAndEditDialog/index.vue
index ba9718d5..e33c119e 100644
--- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/addAndEditDialog/index.vue
+++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/addAndEditDialog/index.vue
@@ -23,7 +23,7 @@
-
+
@@ -56,7 +56,6 @@ import Table from '@screen/components/Table.vue';
import {
inducerModeDic,
inducerWorkTypeDic,
- gzmsMap,
eventSubClassMap,
trafficKV
} from "@screen/utils/enum.js";
@@ -96,7 +95,7 @@ export default {
submitting: false,
formData: {
eventType: 1,
- triggerMechanism: "",
+ triggerMechanism: "1-1",
},
tableData: [],
deviceData: [],
@@ -146,7 +145,7 @@ export default {
this.dialogType = 1;
this.formData = {
eventType: 1,
- triggerMechanism: "",
+ triggerMechanism: "1-1",
};
console.log('defaultTableInfo', { ...defaultTableInfo })
this.tableData = [{ ...defaultTableInfo }]
@@ -183,11 +182,17 @@ export default {
let executeConfig = JSON.parse(it.executeConfig);
let execute = this.mapKeys(executeConfig, 'zx_');
action = { ...action, ...execute };
+ if(it.deviceType === 12 && executeConfig.startTime && executeConfig.endTime){
+ action['zx_time'] = [executeConfig.startTime,executeConfig.endTime]
+ }
}
if (it.recoverConfig) {
let recoverConfig = JSON.parse(it.recoverConfig);
let recover = this.mapKeys(recoverConfig, 'hf_');
action = { ...action, ...recover };
+ if(it.deviceType === 12 && recoverConfig.startTime && recoverConfig.endTime){
+ action['hf_time'] = [recoverConfig.startTime,recoverConfig.endTime]
+ }
}
if (it.deviceList) {
action.devList = it.deviceList
@@ -197,6 +202,7 @@ export default {
dcArr.push(action);
});
+ console.log(dcArr,'---------')
this.tableData = dcArr;
})
// console.log('secondFormData', this.secondFormData)
@@ -247,10 +253,12 @@ export default {
return Message.warning('最后一项不可删除!');
}
this.tableData.splice(index, 1)
+ },
+ onChange(index){
+
},
formatData(it) {
let data = {};
-
if (it.controlModel) {
data = {
controlModel: it.controlModel,
@@ -297,7 +305,7 @@ export default {
hfData[keyName] = item[key];
}
})
- if (item.deviceType == 12) {
+ if (item.deviceType == 12) { // 行车诱导
zxData = this.formatData(zxData);
hfData = this.formatData(hfData);
}
@@ -310,35 +318,73 @@ export default {
let errorNumber = -1;
let errorMessage = '';
for(let i = 0; i < dcArr.length; i++){
+
if(dcArr[i].searchRule === 1 && ( !dcArr[i].deviceList || dcArr[i].deviceList==='')){
errorNumber = i;
errorMessage = '指定设备资源未选择设备'
break;
}
- let zx = JSON.parse(dcArr[i].executeConfig);
- if(!zx.operationType){
- errorNumber = i;
- errorMessage = '未选择执行操作'
- break;
- }
- if(zx.operationType === 1 && !zx.dcInfoBoardTemplate){
- errorNumber = i;
- errorMessage = '执行操作-自定义发布未选择模版'
- break;
- }
- let hf = JSON.parse(dcArr[i].recoverConfig);
- if(!hf.operationType){
- errorNumber = i;
- errorMessage = '未选择恢复操作'
- break;
- }
- if(hf.operationType === 1 && !hf.dcInfoBoardTemplate){
- errorNumber = i;
- errorMessage = '恢复操作-自定义发布未选择模版'
- break;
+ if(dcArr[i].deviceType === 2){
+
+ let zx = JSON.parse(dcArr[i].executeConfig);
+ if(!zx.operationType){
+ errorNumber = i;
+ errorMessage = '未选择执行操作'
+ break;
+ }
+ if(zx.operationType === 1 && !zx.dcInfoBoardTemplate){
+ errorNumber = i;
+ errorMessage = '执行操作-自定义发布未选择模版'
+ break;
+ }
+ let hf = JSON.parse(dcArr[i].recoverConfig);
+ if(!hf.operationType){
+ errorNumber = i;
+ errorMessage = '未选择恢复操作'
+ break;
+ }
+ if(hf.operationType === 1 && !hf.dcInfoBoardTemplate){
+ errorNumber = i;
+ errorMessage = '恢复操作-自定义发布未选择模版'
+ break;
+ }
+ } else if (dcArr[i].deviceType === 5){
+ let zx = JSON.parse(dcArr[i].executeConfig);
+ if(!zx.operationType){
+ errorNumber = i;
+ errorMessage = '未选择执行操作'
+ break;
+ }
+ if(zx.operationType === 1 && !zx.content){
+ errorNumber = i;
+ errorMessage = '执行操作-自定义发布未选择模版'
+ break;
+ }
+ } else if (dcArr[i].deviceType === 10){
+ let zx = JSON.parse(dcArr[i].executeConfig);
+ if(!zx.operationType){
+ errorNumber = i;
+ errorMessage = '未选择执行工作模式'
+ break;
+ }
+ if(!zx.operationDuration){
+ errorNumber = i;
+ errorMessage = '执行操作-时长未选择'
+ break;
+ }
+ let hf = JSON.parse(dcArr[i].recoverConfig);
+ if(!hf.operationType){
+ errorNumber = i;
+ errorMessage = '未选择恢复工作模式'
+ break;
+ }
+ if(!hf.operationDuration){
+ errorNumber = i;
+ errorMessage = '恢复操作-时长未选择'
+ break;
+ }
}
}
- console.log(dcArr)
if(errorNumber !== -1){
this.$message.error(`第${errorNumber+1}条事件异常:${errorMessage}`)
return;
diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/smart/analysis/charts.js b/ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/smart/analysis/charts.js
index 9de037f5..a441e17a 100644
--- a/ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/smart/analysis/charts.js
+++ b/ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/smart/analysis/charts.js
@@ -31,8 +31,8 @@ var options = {
},
grid: {
top: "25%", //上边距
- right: "0%", //右边距
- left: "0%", //左边距
+ right: "1%", //右边距
+ left: "1%", //左边距
bottom: "10%", //下边距
containLabel: true,
},
diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/smart/analysis/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/smart/analysis/index.vue
index d19f84ee..eb651879 100644
--- a/ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/smart/analysis/index.vue
+++ b/ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/smart/analysis/index.vue
@@ -3,7 +3,7 @@
-
+
@@ -22,7 +22,7 @@
-
+
{{ item.deviceName }}
{
diff --git a/ruoyi-ui/src/views/JiHeExpressway/utils/enum_event/PresetFormItems.js b/ruoyi-ui/src/views/JiHeExpressway/utils/enum_event/PresetFormItems.js
new file mode 100644
index 00000000..9a096a1f
--- /dev/null
+++ b/ruoyi-ui/src/views/JiHeExpressway/utils/enum_event/PresetFormItems.js
@@ -0,0 +1,1228 @@
+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;
+ },
+};
diff --git a/ruoyi-ui/src/views/JiHeExpressway/utils/enum_event/data.js b/ruoyi-ui/src/views/JiHeExpressway/utils/enum_event/data.js
new file mode 100644
index 00000000..bf0cac8a
--- /dev/null
+++ b/ruoyi-ui/src/views/JiHeExpressway/utils/enum_event/data.js
@@ -0,0 +1,2411 @@
+import * as PresetFormItems from "./PresetFormItems";
+import request from "@/utils/request";
+import { Message } from "element-ui";
+
+export const configList = {
+
+ 交通事故: [
+ {
+ ...PresetFormItems.callPolicePersonName,
+ key: "dcEventAccident.reporterName",
+ },
+ {
+ ...PresetFormItems.callPolicePersonPhone,
+ key: "dcEventAccident.reporterPhoneNumber",
+ },
+ PresetFormItems.trafficAccidentType,
+ PresetFormItems.eventLevel,
+ {
+ ...PresetFormItems.locationMode,
+ key: "dcEventAccident.locationType",
+ },
+ PresetFormItems.freeway,
+ {
+ label: "服务区:",
+ key: "dcEventAccident.facilityId",
+ type: "select",
+ isAlone: false,
+ required: true,
+ options: {
+ options: [
+ {
+ value: "选项1",
+ label: "黄金糕",
+ },
+ ],
+ },
+ visible: (data) => {
+ if (data?.dcEventAccident?.locationType == 2) {
+ return true;
+ }
+ return false;
+ },
+ },
+ {
+ label: "地点:",
+ key: "dcEventAccident.location",
+ isAlone: false,
+ required: true,
+ options: {
+ placeholder: "服务区地点",
+ },
+ visible: (data) => {
+ if (data?.dcEventAccident?.locationType == 2) {
+ return true;
+ }
+ return false;
+ },
+ },
+ {
+ label: "立交桥:",
+ key: "dcEventAccident.facilityId",
+ type: "select",
+ isAlone: false,
+ required: true,
+ options: {
+ options: [
+ {
+ value: "选项1",
+ label: "黄金糕",
+ },
+ ],
+ },
+ visible: (data) => {
+ if (data?.dcEventAccident?.locationType == 3) {
+ return true;
+ }
+ return false;
+ },
+ ons: {
+ change(value, ...args) {
+ const { formList } = args.slice(-1)[0];
+
+ //匝道
+ request({
+ url: `/system/ramp/listAll?facilityId=${value}`,
+ method: "get",
+ })
+ .then((result) => {
+ if (result.code != 200) return Message.error(result?.msg);
+ let zd = [];
+ result.rows.forEach((it) =>
+ zd.push({ key: it.id, label: it.rampName })
+ );
+ console.log("zd", zd);
+ formList.forEach((it) => {
+ if (it.key == "dcEventAccident.rampId") {
+ console.log("it", it);
+ it.options.options = zd;
+ }
+ });
+ })
+ .catch((err) => {
+ console.log("err", err);
+ Message.error("查询失败3", err);
+ });
+ },
+ },
+ },
+ {
+ label: "匝道:",
+ key: "dcEventAccident.rampId",
+ type: "select",
+ isAlone: false,
+ required: true,
+ options: {
+ options: [],
+ },
+ visible: (data) => {
+ if (data?.dcEventAccident?.locationType == 3) {
+ return true;
+ }
+ return false;
+ },
+ },
+ {
+ label: "收费站:",
+ key: "dcEventAccident.facilityId",
+ type: "select",
+ isAlone: false,
+ required: true,
+ options: {
+ options: [
+ {
+ value: "选项1",
+ label: "黄金糕",
+ },
+ ],
+ },
+ visible: (data) => {
+ if (data?.dcEventAccident?.locationType == 4) {
+ return true;
+ }
+ return false;
+ },
+ },
+ {
+ label: "地点:",
+ key: "dcEventAccident.location",
+ type: "select",
+ isAlone: false,
+ required: true,
+ options: {
+ placeholder: "收费站地点",
+ options: PresetFormItems.locationSelect,
+ },
+ visible: (data) => {
+ if (data?.dcEventAccident?.locationType == 4) {
+ return true;
+ }
+ return false;
+ },
+ },
+ PresetFormItems.direction,
+ PresetFormItems.station,
+ PresetFormItems.eventHappenTime,
+ PresetFormItems.aEstimatedReleaseTime,
+ { ...PresetFormItems.pressure, key: "dcEventAccident.trafficJam" },
+ {
+ ...PresetFormItems.weatherCondition,
+ key: "dcEventAccident.weatherCondition",
+ },
+ { ...PresetFormItems.effect, key: "dcEventAccident.impactLevel" },
+ { ...PresetFormItems.isArrives, key: "dcEventAccident.isReverseCargo" },
+ {
+ ...PresetFormItems.isMaintenanceAccident,
+ key: "dcEventAccident.isMaintenance",
+ },
+ {
+ ...PresetFormItems.trafficPolicePhone,
+ key: "dcEventAccident.policeContact",
+ },
+ {
+ ...PresetFormItems.wreckerCalls,
+ key: "dcEventAccident.towingServiceContact",
+ },
+ {
+ ...PresetFormItems.isCongestionAhead,
+ key: "dcEventAccident.congestionAhead",
+ },
+ {
+ ...PresetFormItems.isForkRoad,
+ key: "dcEventAccident.atIntersection",
+ },
+ { ...PresetFormItems.isCurveRoad, key: "dcEventAccident.onCurve" },
+ { ...PresetFormItems.inTunnel, key: "dcEventAccident.inTunnel" },
+ { ...PresetFormItems.spillName, key: "dcEventAccident.spillageItem" },
+ {
+ ...PresetFormItems.ownerPhone,
+ key: "dcEventAccident.vehicleOwnerPhone",
+ },
+ PresetFormItems.laneOccupancy,
+ PresetFormItems.vehicleCondition("dcEventAccident"),
+ PresetFormItems.casualties("dcEventAccident"),
+ PresetFormItems.eventTitle,
+ PresetFormItems.eventDesc,
+ PresetFormItems.source,
+ ],
+ 车辆故障: [
+ {
+ ...PresetFormItems.callPolicePersonName,
+ key: "dcEventVehicleAccident.reporterName",
+ },
+ {
+ ...PresetFormItems.callPolicePersonPhone,
+ key: "dcEventVehicleAccident.reporterPhoneNumber",
+ },
+ PresetFormItems.vehicleMalfunctionType,
+ PresetFormItems.eventLevel,
+ {
+ ...PresetFormItems.locationMode,
+ key: "dcEventVehicleAccident.locationType",
+ },
+ PresetFormItems.freeway,
+ {
+ label: "服务区:",
+ key: "dcEventVehicleAccident.facilityId",
+ type: "select",
+ isAlone: false,
+ required: true,
+ options: {
+ options: [
+ {
+ value: "选项1",
+ label: "黄金糕",
+ },
+ ],
+ },
+ visible: (data) => {
+ if (data?.dcEventVehicleAccident?.locationType == 2) {
+ return true;
+ }
+ return false;
+ },
+ },
+ {
+ label: "地点:",
+ key: "dcEventVehicleAccident.location",
+ isAlone: false,
+ required: true,
+ options: {
+ placeholder: "服务区地点",
+ },
+ visible: (data) => {
+ if (data?.dcEventVehicleAccident?.locationType == 2) {
+ return true;
+ }
+ return false;
+ },
+ },
+ {
+ label: "立交桥:",
+ key: "dcEventVehicleAccident.facilityId",
+ type: "select",
+ isAlone: false,
+ required: true,
+ options: {
+ options: [
+ {
+ value: "选项1",
+ label: "黄金糕",
+ },
+ ],
+ },
+ visible: (data) => {
+ if (data?.dcEventVehicleAccident?.locationType == 3) {
+ return true;
+ }
+ return false;
+ },
+ ons: {
+ change(value, ...args) {
+ const { formList } = args.slice(-1)[0];
+
+ //匝道
+ request({
+ url: `/system/ramp/listAll?facilityId=${value}`,
+ method: "get",
+ })
+ .then((result) => {
+ if (result.code != 200) return Message.error(result?.msg);
+ let zd = [];
+ result.rows.forEach((it) =>
+ zd.push({ key: it.id, label: it.rampName })
+ );
+ console.log("zd", zd);
+ formList.forEach((it) => {
+ if (it.key == "dcEventVehicleAccident.rampId") {
+ // console.log("it", it);
+ it.options.options = zd;
+ }
+ });
+ })
+ .catch((err) => {
+ console.log("err", err);
+ Message.error("查询失败2", err);
+ });
+ },
+ },
+ },
+ {
+ label: "匝道:",
+ key: "dcEventVehicleAccident.rampId",
+ type: "select",
+ isAlone: false,
+ required: true,
+ options: {
+ options: [],
+ },
+ visible: (data) => {
+ if (data?.dcEventVehicleAccident?.locationType == 3) {
+ return true;
+ }
+ return false;
+ },
+ },
+ {
+ label: "收费站:",
+ key: "dcEventVehicleAccident.facilityId",
+ type: "select",
+ isAlone: false,
+ required: true,
+ options: {
+ options: [
+ {
+ value: "选项1",
+ label: "黄金糕",
+ },
+ ],
+ },
+ visible: (data) => {
+ if (data?.dcEventVehicleAccident?.locationType == 4) {
+ return true;
+ }
+ return false;
+ },
+ },
+ {
+ label: "地点:",
+ key: "dcEventVehicleAccident.location",
+ type: "select",
+ isAlone: false,
+ required: true,
+ options: {
+ placeholder: "收费站地点",
+ options: PresetFormItems.locationSelect,
+ },
+ visible: (data) => {
+ if (data?.dcEventVehicleAccident?.locationType == 4) {
+ return true;
+ }
+ return false;
+ },
+ },
+ PresetFormItems.direction,
+ { ...PresetFormItems.station,
+ visible: (data) => {
+ if (data.dcEventVehicleAccident && data.dcEventVehicleAccident.locationType != 1) {
+ return false;
+ }
+ return true;
+ },
+ },
+ PresetFormItems.eventHappenTime,
+ PresetFormItems.aEstimatedReleaseTime,
+ {
+ ...PresetFormItems.pressure,
+ key: "dcEventVehicleAccident.trafficJam",
+ },
+ {
+ ...PresetFormItems.weatherCondition,
+ key: "dcEventVehicleAccident.weatherCondition",
+ },
+ {
+ ...PresetFormItems.isCongestionAhead,
+ key: "dcEventVehicleAccident.congestionAhead",
+ },
+ {
+ ...PresetFormItems.isForkRoad,
+ key: "dcEventVehicleAccident.atIntersection",
+ },
+ {
+ ...PresetFormItems.isCurveRoad,
+ key: "dcEventVehicleAccident.onCurve",
+ },
+ {
+ ...PresetFormItems.inTunnel,
+ key: "dcEventVehicleAccident.inTunnel",
+ },
+ PresetFormItems.laneOccupancy,
+ PresetFormItems.vehicleCondition("dcEventVehicleAccident"),
+ PresetFormItems.casualties("dcEventVehicleAccident"),
+ PresetFormItems.eventTitle,
+ PresetFormItems.eventDesc,
+ PresetFormItems.source,
+ ],
+ 交通管制: [
+ {
+ label: "管制设施:",
+ key: "eventSubclass",
+ type: "RadioGroup",
+ isAlone: true,
+ required: true,
+ default: "3-1",
+ options: {
+ activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
+ options: [
+ {
+ key: "3-1",
+ label: "主线",
+ },
+ {
+ key: "3-2",
+ label: "收费站",
+ },
+ {
+ key: "3-3",
+ label: "立交",
+ },
+ {
+ key: "3-4",
+ label: "服务区",
+ },
+ ],
+ },
+ ons: {
+ input(value, ...args) {
+ const { data, formList } = args.slice(-1)[0];
+ const classify = formList.find(
+ (it) => it.key == "dcEventTrafficControl.classify"
+ );
+ let ss = {
+ "3-1": "主线",
+ "3-2": "收费站",
+ "3-3": "立交",
+ "3-4": "服务区",
+ };
+ let ad = {
+ 1: [
+ {
+ key: 1,
+ label: `${ss[value]}关闭`,
+ },
+ ],
+ 2: [
+ {
+ key: 2,
+ label: "主线限行",
+ },
+ {
+ key: 3,
+ label: "主线间隔放行",
+ },
+ {
+ key: 4,
+ label: "主线并道",
+ },
+ {
+ key: 5,
+ label: "主线限速",
+ },
+ ],
+ };
+ classify.options.options =
+ ad[data.dcEventTrafficControl.controlType];
+
+ if (data.dcEventTrafficControl) {
+ data.dcEventTrafficControl.facilityId = null;
+ }
+ let facilityType = 1;
+ if (value == "3-2") {
+ facilityType = 1;
+ } else if (value == "3-3") {
+ facilityType = 4;
+ } else if (value == "3-4") {
+ facilityType = 6;
+ }
+ if (value && value != "3-1") {
+ getFacilities(facilityType,formList)
+ }
+ },
+ },
+ },
+ {
+ label: "管制分类:",
+ key: "dcEventTrafficControl.controlType",
+ type: "RadioGroup",
+ isAlone: true,
+ required: true,
+ default: 1,
+ options: {
+ activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
+ options: [
+ {
+ key: 1,
+ label: "封闭",
+ },
+ {
+ key: 2,
+ label: "限行",
+ },
+ ],
+ },
+ ons: {
+ input(value, ...args) {
+ const { data, formList } = args.slice(-1)[0];
+ const classify = formList.find(
+ (it) => it.key == "dcEventTrafficControl.classify"
+ );
+ const measure = formList.find(
+ (it) => it.key == "dcEventTrafficControl.measure"
+ );
+ let ss = {
+ "3-1": "主线",
+ "3-2": "收费站",
+ "3-3": "立交",
+ "3-4": "服务区",
+ };
+ let ad = {
+ 1: [
+ {
+ key: 1,
+ label: `${ss[data.eventSubclass]}关闭`,
+ },
+ ],
+ 2: [
+ {
+ key: 2,
+ label: "主线限行",
+ },
+ {
+ key: 3,
+ label: "主线间隔放行",
+ },
+ {
+ key: 4,
+ label: "主线并道",
+ },
+ {
+ key: 5,
+ label: "主线限速",
+ },
+ ],
+ };
+ let cs = {
+ 1: [
+ {
+ value: "1",
+ label: "临时关闭",
+ },
+ ],
+ 2: [
+ {
+ value: "2",
+ label: "限行车辆",
+ },
+ {
+ value: "3",
+ label: "限行车道",
+ },
+ {
+ value: "4",
+ label: "限行车道且限行车辆",
+ },
+ {
+ value: "5",
+ label: "间隔放行",
+ },
+ {
+ value: "6",
+ label: "并道行驶",
+ },
+ {
+ value: "7",
+ label: "限速",
+ },
+ ],
+ };
+ measure.options.options = cs[value];
+ classify.options.options = ad[value];
+ },
+ },
+ },
+ {
+ label: "分类:",
+ key: "dcEventTrafficControl.classify",
+ type: "RadioGroup",
+ isAlone: true,
+ required: true,
+ default: 1,
+ options: {
+ activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
+ options: [
+ {
+ key: 1,
+ label: "主线关闭",
+ },
+ ],
+ },
+ },
+ {
+ label: "分类原因:",
+ key: "dcEventTrafficControl.controlCause",
+ type: "RadioGroup",
+ isAlone: true,
+ required: true,
+ default: 1,
+ options: {
+ activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
+ options: [
+ {
+ key: 1,
+ label: "车流量大",
+ },
+ {
+ key: 2,
+ label: "交通事故",
+ },
+ {
+ key: 3,
+ label: "恶劣天气",
+ },
+ {
+ key: 4,
+ label: "施工",
+ },
+ {
+ key: 5,
+ label: "警备任务",
+ },
+ {
+ key: 6,
+ label: "其他",
+ },
+ ],
+ },
+ ons: {
+ input(value, ...args) {
+ const { formList } = args.slice(-1)[0];
+ const config = formList.find(
+ (it) => it.key == "dcEventTrafficControl.causeType"
+ );
+ let ad = {
+ 3: [
+ {
+ value: "3-1",
+ label: "雨",
+ },
+ {
+ value: "3-2",
+ label: "雪",
+ },
+ {
+ value: "3-3",
+ label: "雾",
+ },
+ {
+ value: "3-4",
+ label: "道路积水",
+ },
+ {
+ value: "3-5",
+ label: "道路湿滑",
+ },
+ {
+ value: "3-6",
+ label: "道路结冰",
+ },
+ {
+ value: "3-7",
+ label: "沙尘暴",
+ },
+ ],
+ 4: [
+ {
+ value: "4-1",
+ label: "专项工程施工",
+ },
+ {
+ value: "4-2",
+ label: "改扩建工程施工",
+ },
+ {
+ value: "4-3",
+ label: "其他施工",
+ },
+ ],
+ };
+ config.options.options = ad[value];
+ },
+ },
+ },
+ PresetFormItems.inTunnel,
+ {
+ label: "原因类型:",
+ key: "dcEventTrafficControl.causeType",
+ type: "select",
+ options: {
+ options: [],
+ },
+ visible: (data) => {
+ if (
+ data?.dcEventTrafficControl.controlCause == "3" ||
+ data?.dcEventTrafficControl.controlCause == "4"
+ ) {
+ return true;
+ }
+ return false;
+ },
+ },
+ PresetFormItems.freeway,
+ PresetFormItems.direction,
+ // PresetFormItems.emptyLine,
+ {
+ label: "出入口:",
+ key: "dcEventTrafficControl.exitsInlets",
+ type: "RadioGroup",
+ required: true,
+ default: "2",
+ options: {
+ activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
+ options: [
+ {
+ key: 1,
+ label: "出口",
+ },
+ {
+ key: 2,
+ label: "入口",
+ },
+ ],
+ },
+ visible: (data) => {
+ if (data?.eventSubclass == "3-2" || data?.eventSubclass == "3-4") {
+ return true;
+ }
+ return false;
+ },
+ },
+ {
+ label: "收费站:",
+ key: "dcEventTrafficControl.facilityId",
+ type: "select",
+ isAlone: false,
+ required: true,
+ options: {
+ options: [],
+ multiple: true,
+ },
+ visible: (data) => {
+ if (data?.eventSubclass == "3-2") {
+ return true;
+ }
+ return false;
+ },
+ },
+ {
+ label: "立交桥:",
+ key: "dcEventTrafficControl.facilityId",
+ type: "select",
+ isAlone: false,
+ required: true,
+ options: {
+ options: []
+ },
+ visible: (data) => {
+ if (data?.eventSubclass == "3-3") {
+ return true;
+ }
+ return false;
+ },
+ ons: {
+ change(value, ...args) {
+ const { formList } = args.slice(-1)[0];
+
+ //匝道
+ request({
+ url: `/system/ramp/listAll?facilityId=${value}`,
+ method: "get",
+ })
+ .then((result) => {
+ if (result.code != 200) return Message.error(result?.msg);
+ let zd = [];
+ result.rows.forEach((it) =>
+ zd.push({ key: it.id, label: it.rampName })
+ );
+ // console.log("zd", zd);
+ formList.forEach((it) => {
+ if (it.key == "dcEventTrafficControl.rampId") {
+ it.options.options = zd;
+ }
+ });
+ })
+ .catch((err) => {
+ console.log("err", err);
+ Message.error("查询失败3", err);
+ });
+ },
+ },
+ },
+ {
+ label: "匝道:",
+ key: "dcEventTrafficControl.rampId",
+ type: "select",
+ isAlone: false,
+ required: true,
+ options: {
+ options: [],
+ multiple: true,
+
+ },
+ visible: (data) => {
+ if (data?.eventSubclass == "3-3") {
+ return true;
+ }
+ return false;
+ },
+ },
+ {
+ label: "服务区:",
+ key: "dcEventTrafficControl.facilityId",
+ type: "select",
+ isAlone: false,
+ required: true,
+ options: {
+ options: [],
+ },
+ visible: (data) => {
+ if (data?.eventSubclass == "3-4") {
+ return true;
+ }
+ return false;
+ },
+ },
+ {
+ label: "措施:",
+ required: true,
+ key: "dcEventTrafficControl.measure",
+ type: "select",
+ options: {
+ options: [
+ {
+ value: "1",
+ label: "临时关闭",
+ },
+ ],
+ },
+ },
+ {
+ label: "限制类型:",
+ key: "dcEventTrafficControl.limitedType",
+ required: true,
+ type: "select",
+ options: {
+ options: [
+ { key: 1, label: "只允许" },
+ { key: 2, label: "禁止" },
+ ],
+ },
+ visible: (data) => {
+ if (data?.dcEventTrafficControl.controlType == "2") {
+ return true;
+ }
+ return false;
+ },
+ },
+ {
+ label: "车辆类型:",
+ key: "dcEventTrafficControl.vehicleType",
+ required: true,
+ type: "select",
+ options: {
+ options: [
+ { key: 1, label: "10座以下客车" },
+ { key: 2, label: "10座以下客车(间隔放行)" },
+ { key: 3, label: "19座以上客车" },
+ { key: 4, label: "一型客车(不含面包车)" },
+ { key: 5, label: "两客一危" },
+ { key: 6, label: "三类以上班线客车" },
+ {
+ key: 7,
+ label: "四轴及四轴以上货车(运送生鲜果蔬、抗疫物资车辆除外)",
+ },
+ { key: 8, label: "三轴及以上(含三轴)货车" },
+ { key: 9, label: "3轴以上货车(不含危险品运输车)" },
+ { key: 10, label: "3轴以上货车" },
+ { key: 11, label: "四轴及以上(含四轴)货车" },
+ { key: 12, label: "4轴以上货车(不含危险品运输车)" },
+ { key: 13, label: "4轴以上货车" },
+ { key: 14, label: "4轴以下货车" },
+ { key: 15, label: "57座以上客车" },
+ { key: 16, label: "五轴及以上货车" },
+ { key: 17, label: "5轴以上货车" },
+ { key: 18, label: "5轴以上货车(不含危险品运输车)" },
+ { key: 19, label: "5轴以下货车" },
+ { key: 20, label: "6座以上客车" },
+ { key: 21, label: "6座以上面包车" },
+ { key: 22, label: "7座以上客车" },
+ { key: 23, label: "7座以下客车" },
+ { key: 24, label: "8座以上客车" },
+ // 25- 8座以下客车
+ // 26- 8座以下客车(间隔放行)
+ // 27- 9座以上客车
+ // 28- 半挂货车
+ // 29- 车辆(不含10座以下客车)
+ // 30- 车辆(不含8座以下客车)
+ // 31- 车辆(不含小轿车)
+ // 32- 不可解体物品超限运输车
+ // 33- 不可解体物品运输车
+ // 34- 超长超宽超高车辆
+ // 35- 车辆运输车
+ // 36- 超限运输车
+ // 37- 大型货车(不含危险品运输车)
+ // 38- 大型货车
+ // 39- 大型客车
+ // 40- 大中型货车
+ // 41- 已安装ETC的客车
+ // 42- 已安装ETC的小型客车
+ // 43- 罐车
+ // 44- 货车
+ // 45- 黄牌货车
+ // 46- 黄牌货车(不含危险品运输车)
+ // 47- 黄牌货车(运送民生物资车辆除外)
+ // 48- 核载总质量4.5吨以上货车(运送民生物资车辆除外)
+ // 49- 客车(包括小轿车)
+ // 50- 客运车辆
+ // 51- 蓝牌货车
+ // 52- 旅游包车
+ // 53- 面包车
+ // 54- 皮卡
+ // 55- 全部车型
+ // 56- (未安装ETC)车辆
+ // 57- 外埠号牌车辆
+ // 58- 危化品运输车
+ // 59- 危险物品运输车
+ // 60- 武装押运车辆
+ // 61- 小轿车
+ // 62- 厢式货车
+ // 63- 小型车辆
+ // 64- (已安装ETC)车辆
+ // 65- 已安装ETC的货车
+ // 66- 押款车辆
+ // 67- 疫情防控物资运输车辆
+ // 68- 运输剧毒、放射性物品车辆
+ // 69- 运输枪支弹药、爆炸、剧毒、放射性物品车辆
+ // 70- 营运客车
+ // 71- 重型货车
+ // 72- 核载总质量1.8吨以上货车
+ // 73- 中型货车
+ // 74- 小型车辆限速80公里/小时、大型车辆限速70
+ ],
+ },
+ visible: (data) => {
+ if (data?.dcEventTrafficControl.controlType == "2") {
+ return true;
+ }
+ return false;
+ },
+ },
+ {
+ label: "桩号:",
+ key: "stakeMark",
+ required: true,
+ type: "MultipleLabelItem",
+ options: {
+ options: [
+ {
+ prefix: {
+ text: "K",
+ style: {
+ color: "#3DE8FF",
+ },
+ },
+ key: "stakeMark[0]",
+ },
+ {
+ prefix: {
+ text: "+",
+ style: {
+ color: "#3DE8FF",
+ },
+ },
+ key: "stakeMark[1]",
+ },
+ ],
+ },
+ visible: (data) => {
+ if (data?.eventSubclass == "3-1") {
+ return true;
+ }
+ return false;
+ },
+ },
+ {...PresetFormItems.startTime},
+ PresetFormItems.expectedEndTime,
+ PresetFormItems.remark,
+ PresetFormItems.source,
+ ],
+ 交通拥堵: [
+ {
+ label: "拥堵类型:",
+ key: "eventSubclass",
+ type: "RadioGroup",
+ isAlone: true,
+ required: true,
+ default: "4-1",
+ options: {
+ activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
+ options: [
+ {
+ key: "4-1",
+ label: "道路拥堵",
+ },
+ {
+ key: "4-2",
+ label: "立交拥堵",
+ },
+ {
+ key: "4-3",
+ label: "收费站拥堵",
+ },
+ {
+ key: "4-4",
+ label: "服务区拥堵",
+ },
+ ],
+ },
+ ons: {
+ input(value, ...args) {
+ const { data, formList } = args.slice(-1)[0];
+ if (data.dcEventTrafficCongestion) {
+ data.dcEventTrafficCongestion.facilityId = null;
+ }
+ let facilityType = 1;
+ if (value == "4-2") {
+ facilityType = 4;
+ }
+ if (value == "4-3") {
+ facilityType = 1;
+ }
+ if (value == "4-4") {
+ facilityType = 6;
+ }
+ //路网设施 1 收费站 2 桥梁 3 互通立交 4 枢纽立交 5 隧道 6 服务区
+ getFacilities(facilityType,formList,"dcEventTrafficCongestion.facilityId")
+
+ },
+ },
+ },
+ {
+ ...PresetFormItems.congestionCause,
+ key: "dcEventTrafficCongestion.congestionCause",
+ },
+ {
+ label: "详细原因:",
+ key: "detailedReasons",
+ 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: "集团所辖枢纽立交异常导致主线压车",
+ },
+ {
+ key: 7,
+ label: "路侧起火",
+ },
+ {
+ key: 8,
+ label: "备注项添加",
+ },
+ ],
+ },
+ ons: {
+ input(value, ...args) {
+ const { data, formList } = args.slice(-1)[0];
+ if (data.dcEventTrafficCongestion) {
+ data.dcEventTrafficCongestion.facilityId = null;
+ }
+ if (
+ data.dcEventTrafficCongestion.congestionCause == 1 &&
+ value == 2
+ ) {
+ console.log("value2", value);
+ //路网设施 1 收费站 2 桥梁 3 互通立交 4 枢纽立交 5 隧道 6 服务区
+ request({
+ url: `/business/facility/query?facilityType=1`,
+ method: "get",
+ })
+ .then((result) => {
+ if (result.code != 200) return Message.error(result?.msg);
+ let sfz = [];
+ result.data.forEach((it) =>
+ sfz.push({ key: it.id, label: it.facilityName })
+ );
+ formList.forEach((it) => {
+ if (it.key == "dcEventTrafficCongestion.facilityId") {
+ it.options.options = sfz;
+ }
+ });
+ })
+ .catch((err) => {
+ console.log("err", err);
+ Message.error("查询失败1", err);
+ });
+ }
+ },
+ },
+ visible: (data) => {
+ if (
+ data?.eventSubclass == "4-1" &&
+ (data?.dcEventTrafficCongestion?.congestionCause == 1 ||
+ data?.dcEventTrafficCongestion?.congestionCause == 6)
+ ) {
+ return true;
+ }
+ return false;
+ },
+ },
+ { ...PresetFormItems.inTunnel, isAlone: true },
+ { ...PresetFormItems.freeway, label:'高速公路'},
+ {
+ ...PresetFormItems.direction,
+ visible: (data) => {
+ if (data?.eventSubclass == "4-1" || data?.eventSubclass == "4-3") {
+ return true;
+ }
+ return false;
+ },
+ },
+ {
+ label: "拥堵收费站:",
+ key: "dcEventTrafficCongestion.facilityId",
+ type: "select",
+ isAlone: false,
+ required: true,
+ options: {
+ options: [
+ {
+ value: "选项1",
+ label: "黄金糕",
+ },
+ ],
+ },
+ visible: (data) => {
+ if (
+ data?.eventSubclass == "4-3" ||
+ (data?.eventSubclass == "4-1" &&
+ data?.dcEventTrafficCongestion.congestionCause == "1" &&
+ data.detailedReasons == "2")
+ ) {
+ return true;
+ }
+ return false;
+ },
+ },
+ {
+ label: "地点:",
+ key: "dcEventTrafficCongestion.location",
+ type: "select",
+ isAlone: false,
+ required: true,
+ options: {
+ placeholder: "收费站地点",
+ options: PresetFormItems.locationSelect,
+ },
+ visible: (data) => {
+ if (data?.eventSubclass == "4-3") {
+ return true;
+ }
+ return false;
+ },
+ },
+ {
+ label: "拥堵服务区:",
+ key: "dcEventTrafficCongestion.facilityId",
+ type: "select",
+ isAlone: false,
+ required: true,
+ options: {
+ options: [
+ {
+ value: "选项1",
+ label: "黄金糕",
+ },
+ ],
+ },
+ visible: (data) => {
+ if (data?.eventSubclass == "4-4") {
+ return true;
+ }
+ return false;
+ },
+ },
+ {
+ label: "地点:",
+ key: "dcEventTrafficCongestion.location",
+ isAlone: false,
+ required: true,
+ options: {
+ placeholder: "地点描述",
+ },
+ visible: (data) => {
+ if (data?.eventSubclass == "4-4") {
+ return true;
+ }
+ return false;
+ },
+ },
+ {
+ 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: "多点",
+ },
+ ],
+ },
+ visible: (data) => {
+ if (data?.eventSubclass == "4-1") {
+ return true;
+ }
+ return false;
+ },
+ },
+ {
+ label: "桩号:",
+ key: "stakeMark",
+ required: true,
+ type: "MultipleLabelItem",
+ options: {
+ options: [
+ {
+ prefix: {
+ text: "K",
+ style: {
+ color: "#3DE8FF",
+ },
+ },
+ key: "stakeMark[0]",
+ },
+ {
+ prefix: {
+ text: "+",
+ style: {
+ color: "#3DE8FF",
+ },
+ },
+ key: "stakeMark[1]",
+ },
+ ],
+ },
+ visible: (data) => {
+ if (data?.eventSubclass == "4-1" && data?.locationType == 1) {
+ return true;
+ }
+ return false;
+ },
+ },
+ {
+ 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]",
+ },
+ ],
+ },
+ visible: (data) => {
+ if (data?.eventSubclass == "4-1" && data?.locationType == 2) {
+ return true;
+ }
+ return false;
+ },
+ },
+ {
+ label: "立交桥:",
+ key: "dcEventTrafficCongestion.facilityId",
+ type: "select",
+ isAlone: false,
+ required: true,
+ options: {
+ options: [
+ {
+ value: "选项1",
+ label: "黄金糕",
+ },
+ ],
+ },
+ visible: (data) => {
+ if (data?.eventSubclass == "4-2") {
+ return true;
+ }
+ return false;
+ },
+ ons: {
+ change(value, ...args) {
+ const { formList } = args.slice(-1)[0];
+
+ //匝道
+ request({
+ url: `/system/ramp/listAll?facilityId=${value}`,
+ method: "get",
+ })
+ .then((result) => {
+ if (result.code != 200) return Message.error(result?.msg);
+ let zd = [];
+ result.rows.forEach((it) =>
+ zd.push({ key: it.id, label: it.rampName })
+ );
+ console.log("zd", zd);
+ formList.forEach((it) => {
+ if (it.key == "dcEventTrafficCongestion.rampId") {
+ console.log("it", it);
+ it.options.options = zd;
+ }
+ });
+ })
+ .catch((err) => {
+ console.log("err", err);
+ Message.error("查询失败3", err);
+ });
+ },
+ },
+ },
+ {
+ label: "匝道:",
+ key: "dcEventTrafficCongestion.rampId",
+ type: "select",
+ isAlone: false,
+ required: true,
+ options: {
+ options: [],
+ },
+ visible: (data) => {
+ if (data?.eventSubclass == "4-2") {
+ return true;
+ }
+ return false;
+ },
+ },
+ {
+ label: "拥堵里程:",
+ key: "dcEventTrafficCongestion.congestionMileage",
+ required: true,
+ type: "MultipleLabelItem",
+ default:0,
+ options: {
+ options: [
+ {
+ suffix: {
+ text: "千米",
+ },
+ type: "InputNumber",
+ key: "dcEventTrafficCongestion.congestionMileage",
+ },
+ ],
+ },
+ },
+ {
+ label: "最大拥堵里程:",
+ key: "dcEventTrafficCongestion.maxCongestionMileage",
+ required: true,
+ type: "MultipleLabelItem",
+ default:0,
+ options: {
+ options: [
+ {
+ suffix: {
+ text: "千米",
+ },
+ type: "InputNumber",
+ key: "dcEventTrafficCongestion.maxCongestionMileage",
+ },
+ ],
+ },
+ },
+ PresetFormItems.startTime,
+ PresetFormItems.expectedEndTime,
+ PresetFormItems.remark,
+ PresetFormItems.source,
+ ],
+ 非法上路:[
+ PresetFormItems.illegalTriggeringType,
+ PresetFormItems.additionalNotes,
+ PresetFormItems.freeway,
+ PresetFormItems.direction,
+ PresetFormItems.station,
+ PresetFormItems.inTunnel,
+ PresetFormItems.startTime,
+ PresetFormItems.expectedEndTime,
+ PresetFormItems.problemDescription,
+ PresetFormItems.source,
+ ],
+ 路障清除: [
+ {
+ label: "障碍物类型:",
+ key: "eventSubclass",
+ type: "RadioGroup",
+ isAlone: true,
+ required: true,
+ default: "6-1",
+ options: {
+ activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
+ options: [
+ {
+ key: "6-1",
+ label: "烟雾",
+ },
+ {
+ key: "6-2",
+ label: "倒伏树木",
+ },
+ {
+ key: "6-3",
+ label: "撒落物",
+ },
+ {
+ key: "6-4",
+ label: "动物",
+ },
+ {
+ key: "6-5",
+ label: "其他",
+ },
+ ],
+ },
+ },
+ PresetFormItems.additionalNotes,
+ PresetFormItems.freeway,
+ PresetFormItems.direction,
+ PresetFormItems.station,
+ PresetFormItems.inTunnel,
+ PresetFormItems.startTime,
+ PresetFormItems.expectedEndTime,
+ PresetFormItems.problemDescription,
+ PresetFormItems.source,
+ ],
+ 施工建设: [
+ {
+ label: "施工类型:",
+ key: "key0123",
+ type: "RadioGroup",
+ isAlone: true,
+ required: true,
+ default: 1,
+ options: {
+ activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
+ options: [
+ {
+ key: 1,
+ label: "养护施工类施工",
+ },
+ {
+ key: 2,
+ label: "工程建设类施工",
+ },
+ ],
+ },
+ ons: {
+ input(value, ...args) {
+ const { formList } = args.slice(-1)[0];
+ const config = formList.find((it) => it.key == "eventSubclass");
+ const ad = {
+ 1: [
+ {
+ key: "7-1",
+ label: "道路养护施工",
+ },
+ {
+ key: "7-2",
+ label: "收费站养护施工",
+ },
+ {
+ key: "7-3",
+ label: "服务区养护施工",
+ },
+ {
+ key: "7-4",
+ label: "枢纽立交匝道养护施工",
+ },
+ {
+ key: "7-5",
+ label: "地方道路养护施工",
+ },
+ ],
+ 2: [
+ {
+ key: "7-6",
+ label: "道路建设施工",
+ },
+ {
+ key: "7-7",
+ label: "收费站建设施工",
+ },
+ {
+ key: "7-8",
+ label: "服务区建设施工",
+ },
+ {
+ key: "7-9",
+ label: "枢纽立交匝道建设施工",
+ },
+ {
+ key: "7-10",
+ label: "地方道路建设施工",
+ },
+ ],
+ };
+ config.options.options = ad[value] || [];
+ },
+ },
+ },
+ {
+ label: "施工分类:",
+ key: "eventSubclass",
+ type: "RadioGroup",
+ isAlone: true,
+ required: true,
+ default: "7-1",
+ options: {
+ activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
+ options: [
+ {
+ key: "7-1",
+ label: "道路养护施工",
+ },
+ {
+ key: "7-2",
+ label: "收费站养护施工",
+ },
+ {
+ key: "7-3",
+ label: "服务区养护施工",
+ },
+ {
+ key: "7-4",
+ label: "枢纽立交匝道养护施工",
+ },
+ {
+ key: "7-5",
+ label: "地方道路养护施工",
+ },
+ ],
+ },
+ ons: {
+ input(value, ...args) {
+ const { data, formList } = args.slice(-1)[0];
+ if (data.dcEventConstruction) {
+ data.dcEventConstruction.facilityId = null;
+ }
+ let facilityType = 1;
+ if (value == "7-2" || value == "7-7") {
+ facilityType = 1;
+ } else if (value == "7-3" || value == "7-8") {
+ facilityType = 6;
+ } else if (value == "7-4" || value == "7-9") {
+ facilityType = 3;
+ }
+ if (value && (value != "7-1" && value != "7-6")) {
+ //路网设施 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 == "dcEventConstruction.facilityId") {
+ it.options.options = lwss;
+ }
+ });
+ })
+ .catch((err) => {
+ console.log("err", err);
+ Message.error("查询失败1", err);
+ });
+ }
+ },
+ },
+ },
+ {
+ label: "管制方式:",
+ key: "dcEventConstruction.controlMode",
+ type: "RadioGroup",
+ required: true,
+ default:1,
+ options: {
+ activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
+ options: [
+ {
+ key:1,
+ label: "封闭",
+ },
+ {
+ key: 2,
+ label: "不封闭",
+ },
+ ],
+ },
+ },
+ PresetFormItems.inTunnel,
+ {
+ //地点类型
+ ...PresetFormItems.locationType,
+ key: "dcEventConstruction.locationType",
+ visible: (data) => {
+ if (data.eventSubclass == "7-1" || data.eventSubclass == "7-6") {
+ return true;
+ }
+ return false;
+ },
+ },
+ {
+ label: "施工方式:",
+ key: "dcEventConstruction.constructionMethod",
+ type: "RadioGroup",
+ isAlone: false,
+ required: true,
+ default: 1,
+ options: {
+ activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
+ options: [
+ {
+ key: 1,
+ label: "车道",
+ },
+ {
+ key: 2,
+ label: "其他",
+ },
+ ],
+ },
+ visible: (data) => {
+ if (data.eventSubclass == "7-2" || data.eventSubclass == "7-7") {
+ return true;
+ }
+ return false;
+ },
+ },
+ {
+ label: "通行情况:",
+ key: "dcEventConstruction.trafficCondition",
+ 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: "车辆正常通行",
+ },
+ ],
+ },
+ visible: (data) => {
+ if (
+ data.eventSubclass == "7-2" ||
+ data.eventSubclass == "7-7" ||
+ data.eventSubclass == "7-4" ||
+ data.eventSubclass == "7-9"
+ ) {
+ return true;
+ }
+ return false;
+ },
+ },
+ PresetFormItems.freeway,
+ PresetFormItems.direction,
+ {
+ ...PresetFormItems.station,
+ visible: (data) => {
+ if (
+ (data.eventSubclass == "7-1" || data.eventSubclass == "7-6") &&
+ data?.dcEventConstruction.locationType == "1"
+ ) {
+ return true;
+ }
+ return false;
+ },
+ },
+ {
+ ...PresetFormItems.startEndStation,
+ visible: (data) => {
+ if (
+ (data.eventSubclass == "7-1" || data.eventSubclass == "7-6") &&
+ data?.dcEventConstruction.locationType == "2"
+ ) {
+ return true;
+ }
+ return false;
+ },
+ },
+ // PresetFormItems.emptyLine,
+ {
+ ...PresetFormItems.laneOccupancy,
+ required: true,
+ visible: (data) => {
+ if (data?.dcEventConstruction.controlMode == "2") {
+ return true;
+ }
+ return false;
+ },
+ },
+ {
+ label: "收费站:",
+ key: "dcEventConstruction.facilityId",
+ type: "select",
+ isAlone: false,
+ required: true,
+ options: {
+ options: [],
+ },
+ visible: (data) => {
+ if (data.eventSubclass == "7-2" || data.eventSubclass == "7-7") {
+ return true;
+ }
+ return false;
+ },
+ },
+ {
+ label: "出入口:",
+ key: "dcEventConstruction.exitsInlets",
+ type: "RadioGroup",
+ required: true,
+ default: "2",
+ options: {
+ activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
+ options: [
+ {
+ key: 1,
+ label: "出口",
+ },
+ {
+ key: 2,
+ label: "入口",
+ },
+ ],
+ },
+ visible: (data) => {
+ if (data.eventSubclass == "7-2" || data.eventSubclass == "7-7") {
+ return true;
+ }
+ return false;
+ },
+ },
+ {
+ label: "服务区:",
+ key: "dcEventConstruction.facilityId",
+ type: "select",
+ isAlone: false,
+ required: true,
+ options: {
+ options: [],
+ },
+ visible: (data) => {
+ if (data.eventSubclass == "7-3" || data.eventSubclass == "7-8") {
+ return true;
+ }
+ return false;
+ },
+ },
+ {
+ label: "地点:",
+ key: "dcEventConstruction.location",
+ isAlone: false,
+ required: true,
+ options: {
+ placeholder: "服务区地点",
+ },
+ visible: (data) => {
+ if (data.eventSubclass == "7-3" || data.eventSubclass == "7-8") {
+ return true;
+ }
+ return false;
+ },
+ },
+ {
+ label: "立交桥:",
+ key: "dcEventConstruction.facilityId",
+ type: "select",
+ isAlone: false,
+ required: true,
+ options: {
+ options: [],
+ },
+ visible: (data) => {
+ if (data.eventSubclass == "7-4" || data.eventSubclass == "7-9") {
+ return true;
+ }
+ return false;
+ },
+ ons: {
+ change(value, ...args) {
+ const { formList } = args.slice(-1)[0];
+
+ //匝道
+ request({
+ url: `/system/ramp/listAll?facilityId=${value}`,
+ method: "get",
+ })
+ .then((result) => {
+ if (result.code != 200) return Message.error(result?.msg);
+ let zd = [];
+ result.rows.forEach((it) =>
+ zd.push({ key: it.id, label: it.rampName })
+ );
+ // console.log("zd", zd);
+ formList.forEach((it) => {
+ if (it.key == "dcEventConstruction.rampId") {
+ // console.log("it", it);
+ it.options.options = zd;
+ }
+ });
+ })
+ .catch((err) => {
+ console.log("err", err);
+ Message.error("查询失败3", err);
+ });
+ },
+ },
+ },
+ {
+ label: "匝道:",
+ key: "dcEventConstruction.rampId",
+ type: "select",
+ isAlone: false,
+ required: true,
+ options: {
+ options: [],
+ },
+ visible: (data) => {
+ if (data.eventSubclass == "7-4" || data.eventSubclass == "7-9") {
+ return true;
+ }
+ return false;
+ },
+ },
+ {
+ label: "地方道路名称:",
+ key: "dcEventConstruction.localRoadName",
+ isAlone: true,
+ required: true,
+ options: {},
+ visible: (data) => {
+ if (data.eventSubclass == "7-5" || data.eventSubclass == "7-10") {
+ return true;
+ }
+ return false;
+ },
+ },
+ {
+ label: "特殊地点描述:",
+ key: "dcEventConstruction.specialPlaceDescription",
+ isAlone: true,
+ options: {
+ type: "textarea",
+ autosize: true,
+ maxlength: 50,
+ autosize: { minRows: 6, maxRows: 6 },
+ showWordLimit: true,
+ },
+ },
+ {
+ ...PresetFormItems.specialConstruction,
+ key: "dcEventConstruction.specialConstruction",
+ },
+ {
+ label: "专项施工名称:",
+ key: "dcEventConstruction.otherConstructionName",
+ isAlone: true,
+ options: {},
+ visible: (data) => {
+ if (data?.dcEventConstruction.specialConstruction == "4") {
+ return true;
+ }
+ return false;
+ },
+ },
+ {
+ ...PresetFormItems.constructionMeasurement,
+ key: "dcEventConstruction.constructionMeasurement",
+ visible: (data) => {
+ if (data.eventSubclass == "7-1" || data.eventSubclass == "7-6") {
+ return true;
+ }
+ return false;
+ },
+ },
+ PresetFormItems.startTime,
+ PresetFormItems.expectedEndTime,
+ PresetFormItems.remark,
+ PresetFormItems.source,
+ ],
+ 服务区异常: [
+ {
+ label: "异常分类:",
+ key: "eventSubclass",
+ type: "RadioGroup",
+ isAlone: true,
+ required: true,
+ default: "8-1",
+ options: {
+ activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
+ options: [
+ {
+ key: "8-1",
+ label: "封闭、暂停营业",
+ },
+ {
+ key: "8-2",
+ label: "重要设施停用",
+ },
+ {
+ key: "8-3",
+ label: "其他异常",
+ },
+ ],
+ },
+ },
+ PresetFormItems.freeway,
+ PresetFormItems.direction,
+ {
+ label: "服务区:",
+ key: "dcEventServiceArea.facilityId",
+ type: "select",
+ isAlone: false,
+ required: true,
+ options: {
+ options: [
+ {
+ value: "选项1",
+ label: "黄金糕",
+ },
+ ],
+ },
+ },
+ {
+ label: "停用设施:",
+ key: "dcEventServiceArea.disableFacility",
+ type: "select",
+ isAlone: false,
+ required: true,
+ options: {
+ options: [
+ {
+ value: "1",
+ label: "卫生间",
+ },
+ {
+ value: "2",
+ label: "餐厅",
+ },
+ {
+ value: "3",
+ label: "停车场",
+ },
+ {
+ value: "4",
+ label: "加油站",
+ },
+ {
+ value: "5",
+ label: "充电桩",
+ },
+ ],
+ },
+ visible: (data) => {
+ if (data?.eventSubclass == "8-2") {
+ return true;
+ }
+ return false;
+ },
+ },
+ {
+ label: "出入口:",
+ key: "dcEventServiceArea.exitsInlets",
+ type: "RadioGroup",
+ isAlone: true,
+ required: true,
+ default: "2",
+ options: {
+ activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
+ options: [
+ {
+ key: 1,
+ label: "出口",
+ },
+ {
+ key: 2,
+ label: "入口",
+ },
+ ],
+ },
+ },
+ PresetFormItems.startTime,
+ PresetFormItems.expectedEndTime,
+ PresetFormItems.remark,
+ PresetFormItems.source,
+ ],
+ 设施设备隐患: [
+ {
+ label: "类型:",
+ key: "eventSubclass",
+ type: "RadioGroup",
+ isAlone: true,
+ required: true,
+ default: "9-1",
+ options: {
+ activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
+ options: [
+ {
+ key: "9-1",
+ label: "摄像机",
+ },
+ {
+ key: "9-2",
+ label: "护栏",
+ },
+ {
+ key: "9-3",
+ label: "隔离栅",
+ },
+ {
+ key: "9-4",
+ label: "情报板",
+ },
+ {
+ key: "9-5",
+ label: "防眩板",
+ },
+ {
+ key: "9-6",
+ label: "其他",
+ },
+ ],
+ },
+ },
+ {
+ label: "设备补充说明:",
+ key: "eventSourceTips",
+ isAlone: true,
+ options: {
+ type: "textarea",
+ autosize: true,
+ maxlength: 150,
+ autosize: { minRows: 6, maxRows: 6 },
+ showWordLimit: true,
+ },
+ required: true,
+ },
+ PresetFormItems.freeway,
+ PresetFormItems.direction,
+ PresetFormItems.station,
+ PresetFormItems.inTunnel,
+ PresetFormItems.startTime,
+ PresetFormItems.expectedEndTime,
+ PresetFormItems.problemDescription,
+ PresetFormItems.source,
+ ],
+ 异常天气: [
+ {
+ label: "异常天气:",
+ key: "eventSubclass",
+ type: "RadioGroup",
+ isAlone: true,
+ required: true,
+ default: "10-1",
+ options: {
+ activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
+ options: [
+ {
+ key: "10-1",
+ label: "雨",
+ },
+ {
+ key: "10-2",
+ label: "雪",
+ },
+ {
+ key: "10-3",
+ label: "雾",
+ },
+ {
+ key: "10-4",
+ label: "大风",
+ },
+ {
+ key: "10-5",
+ label: "低温寒潮",
+ },
+ {
+ key: "10-6",
+ label: "路面积雪",
+ },
+ {
+ key: "10-7",
+ label: "路面结冰",
+ },
+ {
+ key: "10-8",
+ label: "路面积水",
+ },
+ {
+ key: "10-9",
+ label: "其他",
+ },
+ ],
+ },
+ ons: {
+ input(value, ...args) {
+ const { formList } = args.slice(-1)[0];
+ const config = formList.find(
+ (it) => it.key == "dcEventAbnormalWeather.weatherSituation"
+ );
+ let ad = {
+ "10-1": [
+ {
+ key: "1-1",
+ label: "雨雾",
+ },
+ {
+ key: "1-2",
+ label: "雨雪",
+ },
+ {
+ key: "1-3",
+ label: "中雨",
+ },
+ {
+ key: "1-4",
+ label: "小雨",
+ },
+ {
+ key: "1-5",
+ label: "大雨",
+ },
+ {
+ key: "1-6",
+ label: "暴雨",
+ },
+ ],
+ "10-2": [
+ {
+ key: "2-1",
+ label: "小雪",
+ },
+ {
+ key: "2-2",
+ label: "中雪",
+ },
+ {
+ key: "2-3",
+ label: "大雪",
+ },
+ {
+ key: "2-4",
+ label: "暴雪",
+ },
+ {
+ key: "2-5",
+ label: "大暴雪",
+ },
+ {
+ key: "2-6",
+ label: "特大暴雪",
+ },
+ ],
+ "10-3": [
+ {
+ key: "3-1",
+ label: "轻雾",
+ },
+ {
+ key: "3-2",
+ label: "大雾",
+ },
+ {
+ key: "3-3",
+ label: "浓雾",
+ },
+ {
+ key: "3-4",
+ label: "强浓雾",
+ },
+ {
+ key: "3-5",
+ label: "团雾",
+ },
+ ],
+ };
+ config.options.options = ad[value];
+ },
+ },
+ },
+ {
+ ...PresetFormItems.weatherSituation,
+ key: "dcEventAbnormalWeather.weatherSituation",
+ },
+ PresetFormItems.additionalNotes,
+ PresetFormItems.freeway,
+ PresetFormItems.direction,
+ PresetFormItems.startEndStation,
+ {
+ label: "紧急级别:",
+ key: "dcEventAbnormalWeather.emergencyLevel",
+ required: true,
+ type: "select",
+ options: {
+ options: [
+ {
+ value: "1",
+ label: "一般",
+ },
+ {
+ value: "2",
+ label: "紧急",
+ },
+ ],
+ },
+ },
+ PresetFormItems.inTunnel,
+ PresetFormItems.startTime,
+ PresetFormItems.expectedEndTime,
+ PresetFormItems.problemDescription,
+ PresetFormItems.source,
+ ],
+ 其他事件: [
+ {
+ label: "事件说明:",
+ key: "eventSourceTips",
+ isAlone: true,
+ options: {
+ type: "textarea",
+ autosize: true,
+ maxlength: 150,
+ autosize: { minRows: 6, maxRows: 6 },
+ showWordLimit: true,
+ },
+ },
+ PresetFormItems.freeway,
+ PresetFormItems.direction,
+ PresetFormItems.station,
+ PresetFormItems.inTunnel,
+ PresetFormItems.startTime,
+ PresetFormItems.expectedEndTime,
+ PresetFormItems.problemDescription,
+ PresetFormItems.source,
+ ],
+}
+
+export const formatEvent = (f) => {
+ const formData = _.cloneDeep(f);
+ if (formData.lang && formData.lang instanceof Array) {
+ formData.lang = formData.lang.join(",");
+ }
+ if (formData.dcEventTrafficControl && formData.dcEventTrafficControl.facilityId && formData.dcEventTrafficControl.facilityId instanceof Array) {
+ let ids = formData.dcEventTrafficControl.facilityId;
+ formData.dcEventTrafficControl.facilityIds = ids
+ formData.dcEventTrafficControl.facilityId = ''
+ }
+ if (formData.endStakeMark && formData.endStakeMark[0] != null) {
+ let endStakeMark = formData.endStakeMark;
+ let strMark = endStakeMark && endStakeMark.length > 0 ? "K" + endStakeMark[0].padStart(3,'0') + "+" + endStakeMark[1].padStart(3,'0') : "";
+ if (this.index == 3) {
+ formData.dcEventTrafficCongestion.endStakeMark = strMark;
+ }
+ if (this.index == 6) {
+ formData.dcEventConstruction.endStakeMark = strMark;
+ }
+ if (this.index == 9) {
+ formData.dcEventAbnormalWeather.endStakeMark = strMark;
+ }
+ formData.endStakeMark = "";
+ } else {
+ formData.endStakeMark = "";
+ }
+ if(formData.stakeMark){
+ if(formData.stakeMark.length > 0 && formData.stakeMark[0] != null){
+ formData.stakeMark = ("K" + formData.stakeMark[0].padStart(3,'0') + "+" + formData.stakeMark[1].padStart(3,'0'))
+ }else{
+ delete formData.stakeMark
+ }
+
+ }
+
+ for(let i in formData){
+ if(typeof formData[i] === 'object' && formData[i]){
+ for(let j in formData[i]){
+ if(j === 'rampId'){
+ formData[i][j] = formData[i][j].join(',')
+ }
+ }
+ }
+ }
+
+
+ return formData;
+}
+
+export const getFacilities = async (facilityType, config, key="dcEventTrafficControl.facilityId") => {
+ let result = await request({
+ url: `/business/facility/query?facilityType=${facilityType}`,
+ method: "get",
+ })
+ if (result.code != 200) return Message.error(result?.msg);
+ let lwss = [];
+ console.log(result.data,'---------------')
+ result.data.forEach((it) =>
+ lwss.push({ key: it.id, label: it.facilityName })
+ );
+ config.forEach((it) => {
+ if (it.key == key) {
+ it.options.options = lwss;
+ }
+ });
+}
\ No newline at end of file