页面通过id=1通知是否显示已修改的数据
This commit is contained in:
parent
f60c84c9b8
commit
1b08e596a0
@ -28,8 +28,14 @@ import DataFieldIcon4 from '../../assets/images/DataField/icon-4.png'
|
||||
import DataFieldIcon5 from '../../assets/images/DataField/icon-5.png'
|
||||
import DataFieldIcon6 from '../../assets/images/DataField/icon-6.png'
|
||||
|
||||
// const { disasterInfo } = inject('disasterData')
|
||||
const disasterInfo = ref({
|
||||
// 根据URL参数判断使用本地数据还是注入数据
|
||||
const urlParams = new URLSearchParams(window.location.search)
|
||||
const disasterId = urlParams.get('id')
|
||||
|
||||
let disasterInfo
|
||||
if (disasterId === '1') {
|
||||
// id等于1时使用本地数据
|
||||
disasterInfo = ref({
|
||||
type: '边坡垮塌',
|
||||
volume: '1220m³',
|
||||
length: '33',
|
||||
@ -39,7 +45,12 @@ const disasterInfo = ref({
|
||||
widthUnit: '',
|
||||
casualties: '0',
|
||||
vehicles: '0',
|
||||
})
|
||||
})
|
||||
} else {
|
||||
// id不等于1或不存在时使用注入的数据
|
||||
const { disasterInfo: injectedDisasterInfo } = inject('disasterData')
|
||||
disasterInfo = injectedDisasterInfo
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
@ -1,17 +1,17 @@
|
||||
<template>
|
||||
<div class="map-viewer">
|
||||
<!-- Cesium 地图容器 -->
|
||||
<!-- <MapViewport /> -->
|
||||
<MapViewport />
|
||||
|
||||
<!-- 地图控制工具 - 使用 Teleport 传送到更高层级 -->
|
||||
<!-- 延迟渲染确保目标元素已存在 -->
|
||||
<!-- <Teleport to="#sa-controls" v-if="isMounted">
|
||||
<Teleport to="#sa-controls" v-if="isMounted">
|
||||
<MapControls
|
||||
:active-tool-key="activeToolKey"
|
||||
@tool-change="handleToolChange"
|
||||
@device-watch="handleDeviceWatch"
|
||||
/>
|
||||
</Teleport> -->
|
||||
</Teleport>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@ -192,21 +192,17 @@ const props = defineProps({
|
||||
* 可用站点列表(从快速匹配传入)
|
||||
*/
|
||||
const availableStations = computed(() => props.stations)
|
||||
|
||||
// 根据URL参数判断使用本地数据还是注入数据
|
||||
const urlParams = new URLSearchParams(window.location.search)
|
||||
const disasterId = urlParams.get('id')
|
||||
const formData = ref({})
|
||||
/**
|
||||
* 表单数据
|
||||
*/
|
||||
// const formData = reactive({
|
||||
// commander: "陈前",
|
||||
// viceCommander: "樵继川",
|
||||
// trafficControl: "忠县交通巡逻警察大队",
|
||||
// infoRelease: "融媒体中心",
|
||||
// vehicleDispatch: "忠县交通运输综合执法支队",
|
||||
// personnelRescue: "忠县人民医院",
|
||||
// clearanceMethod: "两端对接抢通,必要时开辟工作面",
|
||||
// estimatedTime: "6小时",
|
||||
// });
|
||||
const formData = reactive({
|
||||
|
||||
if (disasterId === '1') {
|
||||
// id等于1时使用本地数据
|
||||
formData.value = {
|
||||
commander: '陈前',
|
||||
viceCommander: '樵继川',
|
||||
trafficControl: '黔江区交通管理支队',
|
||||
@ -215,12 +211,25 @@ const formData = reactive({
|
||||
personnelRescue: '区卫健委',
|
||||
clearanceMethod: '单向抢通,必要时联系酉阳交通部门协助抢通',
|
||||
estimatedTime: '15小时',
|
||||
})
|
||||
}
|
||||
} else {
|
||||
// id不等于1或不存在时使用注入的数据
|
||||
formData.value = {
|
||||
commander: '陈前',
|
||||
viceCommander: '樵继川',
|
||||
trafficControl: '忠县交通巡逻警察大队',
|
||||
infoRelease: '融媒体中心',
|
||||
vehicleDispatch: '忠县交通运输综合执法支队',
|
||||
personnelRescue: '忠县人民医院',
|
||||
clearanceMethod: '两端对接抢通,必要时开辟工作面',
|
||||
estimatedTime: '6小时',
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 公路抢通方案步骤
|
||||
*/
|
||||
const clearanceSteps = reactive([
|
||||
const clearanceSteps = ref([
|
||||
{
|
||||
id: 1,
|
||||
number: '①',
|
||||
@ -244,17 +253,13 @@ const clearanceSteps = reactive([
|
||||
id: 4,
|
||||
number: '④',
|
||||
title: '开辟工作面',
|
||||
content:
|
||||
// "根据抢通和救援要求,利用挖掘机、装载机或无人设备开辟新的工作面,增加作业效率。",
|
||||
'根据抢通的时间要求,增加大型土石方设备,提升作业效率,或增加装备从对向同时清理,',
|
||||
content: '根据抢通和救援要求,利用挖掘机、装载机或无人设备开辟新的工作面,增加作业效率。',
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
number: '⑤',
|
||||
title: '交通疏导',
|
||||
content:
|
||||
// "清理出足够疏散车辆的临时性通道,临时通道边缘用锥桶或沙袋进行警示和防护,在现场指挥下,放行积压车辆。",
|
||||
'清理出足够疏散车辆的临时性通道,临时通道边缘用锥桶或沙袋进行警示和防护,在现场指挥下,放行积压车辆。',
|
||||
content: '清理出足够疏散车辆的临时性通道,临时通道边缘用锥桶或沙袋进行警示和防护,在现场指挥下,放行积压车辆。',
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
@ -264,6 +269,11 @@ const clearanceSteps = reactive([
|
||||
},
|
||||
])
|
||||
|
||||
if (disasterId === '1') {
|
||||
clearanceSteps.value[3].content = '根据抢通的时间要求,增加大型土石方设备,提升作业效率,或增加装备从对向同时清理,'
|
||||
clearanceSteps.value[4].content = '清理出足够疏散车辆的临时性通道,临时通道边缘用锥桶或沙袋进行警示和防护,在现场指挥下,放行积压车辆。'
|
||||
}
|
||||
|
||||
/**
|
||||
* 所需力量数据
|
||||
*/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user