|
@@ -43,7 +43,7 @@
|
|
|
import AMapLoader from "@amap/amap-jsapi-loader";
|
|
|
import { Search } from "@element-plus/icons-vue";
|
|
|
import { wgs84_to_gcj02 } from "./map";
|
|
|
-import { getTipsList, getTipsNames, getCaseInfo } from "@/store/case";
|
|
|
+import { getTipsList, getTipsNames, getCaseInfo, getcaseMap } from "@/store/case";
|
|
|
import { ref, watchEffect, onMounted, computed } from "vue";
|
|
|
import { QuiskExpose } from "@/helper/mount";
|
|
|
import { debounce } from "@/util";
|
|
@@ -76,9 +76,10 @@ var baseLayers = {
|
|
|
'谷歌地图': normalMap,
|
|
|
'高德地图': Gaode,
|
|
|
};
|
|
|
-
|
|
|
+const route = router.currentRoute.value;
|
|
|
let map: any = {};
|
|
|
let clickMarker;
|
|
|
+const mapOptions = ref([]);
|
|
|
const keyword = ref("");
|
|
|
const showSearch = ref(true);
|
|
|
const info = ref<MapInfo>();
|
|
@@ -98,7 +99,19 @@ const caseId = computed(() => {
|
|
|
}
|
|
|
});
|
|
|
onMounted(async () => {
|
|
|
+ let list = await getcaseMap({});
|
|
|
+ mapOptions.value = list.map((ele) => {
|
|
|
+ return { ...ele, label: ele.name, mapUrl: JSON.parse(ele.mapUrl) };
|
|
|
+ });
|
|
|
caseInfoData.value = {};
|
|
|
+ if(route.name == 'drawShareFile'){
|
|
|
+ caseInfoData.value = {
|
|
|
+ mapUrl : mapOptions.value[0].mapUrl[0].tempUrl,
|
|
|
+ mapId : mapOptions.value[0].id
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ caseInfoData.value = await getCaseInfo(caseId.value);
|
|
|
+ }
|
|
|
let center = [22.61, 113.05];
|
|
|
if (caseInfoData.value?.latAndLong) {
|
|
|
center = caseInfoData.value.latAndLong.split(",");
|