|
|
@ -14,11 +14,11 @@ provide(IsMapInj, ref(true)) |
|
|
|
provide(ReadonlyInj, !isUIAllowed('xcDatatableEditable')) |
|
|
|
provide(ReadonlyInj, !isUIAllowed('xcDatatableEditable')) |
|
|
|
const reloadViewDataHook = inject(ReloadViewDataHookInj) |
|
|
|
const reloadViewDataHook = inject(ReloadViewDataHookInj) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// const meta = inject(MetaInj, ref()) |
|
|
|
const meta = inject(MetaInj, ref()) |
|
|
|
|
|
|
|
const view = inject(ActiveViewInj, ref()) |
|
|
|
const view = inject(ActiveViewInj, ref()) |
|
|
|
|
|
|
|
|
|
|
|
const { loadData, formattedData: data } = useViewData(meta, view) |
|
|
|
// const { loadData, formattedData: data } = useViewData(meta, view) |
|
|
|
|
|
|
|
const { formattedData, loadMapData } = useMapViewStoreOrThrow() |
|
|
|
|
|
|
|
|
|
|
|
watch(view, async (nextView) => { |
|
|
|
watch(view, async (nextView) => { |
|
|
|
if (nextView?.type === ViewTypes.MAP) { |
|
|
|
if (nextView?.type === ViewTypes.MAP) { |
|
|
@ -31,7 +31,7 @@ watch(view, async (nextView) => { |
|
|
|
// const { isUIAllowed } = useUIPermission() |
|
|
|
// const { isUIAllowed } = useUIPermission() |
|
|
|
|
|
|
|
|
|
|
|
onMounted(async () => { |
|
|
|
onMounted(async () => { |
|
|
|
await loadData() |
|
|
|
await loadMapData() |
|
|
|
// const geodata = data.value[0].row.geo.split(';') |
|
|
|
// const geodata = data.value[0].row.geo.split(';') |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
@ -41,10 +41,8 @@ const myMapRef = ref() |
|
|
|
// const longitude = ref() |
|
|
|
// const longitude = ref() |
|
|
|
const markersRef = ref() |
|
|
|
const markersRef = ref() |
|
|
|
|
|
|
|
|
|
|
|
const { staticData } = useMapViewStoreOrThrow() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
reloadViewDataHook?.on(async () => { |
|
|
|
reloadViewDataHook?.on(async () => { |
|
|
|
alert('reloadViewDataHook for Map') |
|
|
|
loadMapData() |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
// function addMarker() { |
|
|
|
// function addMarker() { |
|
|
@ -76,7 +74,7 @@ onMounted(async () => { |
|
|
|
|
|
|
|
|
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<div class="flex flex-col h-full w-full"> |
|
|
|
<div class="flex flex-col h-full w-full"> |
|
|
|
{{ JSON.stringify(staticData) }} |
|
|
|
{{ JSON.stringify(formattedData) }} |
|
|
|
<!-- <div class="flex m-4 gap-4"> |
|
|
|
<!-- <div class="flex m-4 gap-4"> |
|
|
|
<label :for="latitude">latitude</label> |
|
|
|
<label :for="latitude">latitude</label> |
|
|
|
<input v-model="latitude" /> |
|
|
|
<input v-model="latitude" /> |
|
|
|