|
@ -49,7 +49,8 @@ export default { |
|
|
tabConfigList, |
|
|
tabConfigList, |
|
|
index: 1, |
|
|
index: 1, |
|
|
roads: [], |
|
|
roads: [], |
|
|
direction: [] |
|
|
direction: [], |
|
|
|
|
|
lwss: [] |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
created() { |
|
|
created() { |
|
@ -77,6 +78,7 @@ export default { |
|
|
methods: { |
|
|
methods: { |
|
|
initData() { |
|
|
initData() { |
|
|
return Promise.all([ |
|
|
return Promise.all([ |
|
|
|
|
|
//道路 |
|
|
request({ |
|
|
request({ |
|
|
url: `/business/road/query`, |
|
|
url: `/business/road/query`, |
|
|
method: "get", |
|
|
method: "get", |
|
@ -85,10 +87,10 @@ export default { |
|
|
result.data.forEach(it => { |
|
|
result.data.forEach(it => { |
|
|
this.roads.push({ key: it.id, label: it.roadName }) |
|
|
this.roads.push({ key: it.id, label: it.roadName }) |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}).catch((err) => { |
|
|
.catch((err) => { |
|
|
|
|
|
Message.error("查询失败", err); |
|
|
Message.error("查询失败", err); |
|
|
}), |
|
|
}), |
|
|
|
|
|
//方向字典 |
|
|
request({ |
|
|
request({ |
|
|
url: `/system/dict/data/type/iot_event_direction`, |
|
|
url: `/system/dict/data/type/iot_event_direction`, |
|
|
method: "get", |
|
|
method: "get", |
|
@ -97,40 +99,26 @@ export default { |
|
|
result.data.forEach(it => { |
|
|
result.data.forEach(it => { |
|
|
this.direction.push({ key: it.dictValue, label: it.dictLabel }) |
|
|
this.direction.push({ key: it.dictValue, label: it.dictLabel }) |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}).catch((err) => { |
|
|
.catch((err) => { |
|
|
|
|
|
Message.error("查询失败", err); |
|
|
Message.error("查询失败", err); |
|
|
}) |
|
|
}), |
|
|
]) |
|
|
//路网设施 1 收费站 2 桥梁 3 互通立交 4 枢纽立交 5 隧道 6 服务区 |
|
|
}, |
|
|
|
|
|
handleChange({ index }) { |
|
|
|
|
|
// console.log('index',index) |
|
|
|
|
|
this.index = index; |
|
|
|
|
|
let formConfig = tabConfigList[index].formConfig; |
|
|
|
|
|
|
|
|
|
|
|
if (index == 0 || index == 1 || index == 7) { |
|
|
|
|
|
let fwq = []; |
|
|
|
|
|
|
|
|
|
|
|
request({ |
|
|
request({ |
|
|
url: `/business/facility/query?facilityType=6`, |
|
|
url: `/business/facility/query`, |
|
|
method: "get" |
|
|
method: "get" |
|
|
}).then((result) => { |
|
|
}).then((result) => { |
|
|
if (result.code != 200) return Message.error(result?.msg); |
|
|
if (result.code != 200) return Message.error(result?.msg); |
|
|
result.data.forEach(it => { |
|
|
result.data.forEach(it => this.lwss.push({ key: it.id, label: it.facilityName, type: facilityType })) |
|
|
fwq.push({ key: it.id, label: it.facilityName }) |
|
|
}).catch((err) => { |
|
|
}) |
|
|
|
|
|
}) |
|
|
|
|
|
.catch((err) => { |
|
|
|
|
|
Message.error("查询失败", err); |
|
|
Message.error("查询失败", err); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
formConfig.list.forEach(it => { |
|
|
|
|
|
if (it.key === 'dcEventServiceArea.facilityId' || it.key === 'dcEventAccident.facilityId') { |
|
|
|
|
|
it.options.options = fwq; |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
} |
|
|
]) |
|
|
|
|
|
}, |
|
|
|
|
|
handleChange({ index }) { |
|
|
|
|
|
// console.log('index',index) |
|
|
|
|
|
this.index = index; |
|
|
|
|
|
let formConfig = tabConfigList[index].formConfig; |
|
|
|
|
|
|
|
|
formConfig.list.forEach(it => { |
|
|
formConfig.list.forEach(it => { |
|
|
if (it.key == 'direction') { |
|
|
if (it.key == 'direction') { |
|
@ -139,6 +127,15 @@ export default { |
|
|
if (it.key == 'roadId') { |
|
|
if (it.key == 'roadId') { |
|
|
it.options.options = this.roads; |
|
|
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); |
|
|
|
|
|
// } |
|
|
|
|
|
// } |
|
|
|
|
|
|
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
this.formConfig = formConfig; |
|
|
this.formConfig = formConfig; |
|
|