Browse Source

geodata: fix record number and layout issue on a map view

pull/4749/head
flisowna 2 years ago
parent
commit
f3e27ff2c5
  1. 5
      packages/nc-gui/components/smartsheet/Map.vue
  2. 2
      packages/nc-gui/composables/useMapViewDataStore.ts

5
packages/nc-gui/components/smartsheet/Map.vue

@ -199,13 +199,14 @@ watch(view, async (nextView) => {
}) })
const count = computed(() => paginationData.value.totalRows) const count = computed(() => paginationData.value.totalRows)
console.log('count', count)
syncCount()
</script> </script>
<template> <template>
<div class="flex flex-col h-full w-full no-underline"> <div class="flex flex-col h-full w-full no-underline">
<div id="mapContainer" ref="mapContainerRef" class="w-full h-screen"> <div id="mapContainer" ref="mapContainerRef" class="w-full h-screen">
<a-tooltip placement="bottom" class="h-2 w-auto max-w-fit-content absolute top-10 right-10 p-10 z-500 cursor-default"> <a-tooltip placement="bottom" class="h-2 w-auto max-w-fit-content absolute top-3 right-3 p-2 z-500 cursor-default">
<template #title> <template #title>
<span v-if="count > 1000"> {{ $t('msg.info.map.overLimit') }} </span> <span v-if="count > 1000"> {{ $t('msg.info.map.overLimit') }} </span>
<span v-else-if="count > 900"> {{ $t('msg.info.map.closeLimit') }} </span> <span v-else-if="count > 900"> {{ $t('msg.info.map.closeLimit') }} </span>

2
packages/nc-gui/composables/useMapViewDataStore.ts

@ -61,7 +61,7 @@ const [useProvideMapViewStore, useMapViewStore] = useInjectionState(
})) }))
async function syncCount() { async function syncCount() {
if (!isPublic) { if (!isPublic.value) {
const { count } = await $api.dbViewRow.count( const { count } = await $api.dbViewRow.count(
NOCO, NOCO,
project?.value?.title as string, project?.value?.title as string,

Loading…
Cancel
Save