BaseStationMapModal.vue 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <template>
  2. <StationMapModal
  3. :open="open"
  4. :title="title"
  5. :stations="stationPoints"
  6. @update:open="(value) => emit('update:open', value)"
  7. />
  8. </template>
  9. <script lang="ts" setup>
  10. import { computed } from 'vue';
  11. import StationMapModal from '@jeesite/case/views/dm/components/StationMapModal.vue';
  12. import type { CallStatStationDTO } from '@jeesite/person/api/types/dto';
  13. import type { TrackCellTowerDTO } from '@jeesite/track/api/types/dto';
  14. const props = withDefaults(
  15. defineProps<{
  16. open: boolean;
  17. title?: string;
  18. stations: TrackCellTowerDTO[];
  19. }>(),
  20. {
  21. title: '基站地图位置',
  22. stations: () => [],
  23. },
  24. );
  25. const emit = defineEmits<{
  26. (e: 'update:open', value: boolean): void;
  27. }>();
  28. const stationPoints = computed<CallStatStationDTO[]>(() =>
  29. (props.stations || []).map((item) => ({
  30. personRegionId: item.personRegionId,
  31. personCellId: item.personCellId,
  32. personStationName: item.personStationName,
  33. personStationLongitude: item.personStationLongitude,
  34. personStationLatitude: item.personStationLatitude,
  35. })),
  36. );
  37. </script>