1import{_ as x,t as d,v as c,x as u,r as l,J as $,o as z,aY as C,K as E,M as r,aZ as g,y as v,ae as m,z as b}from"./CDBFNSID.js";import{_ as I}from"./DPwDV5qa.js";const A={name:"TianDiTuMap",props:{markerList:{type:Array,required:!0,default:()=>[]},center:{type:Object,default:()=>({lng:106.794825,lat:26.650825})},zoom:{type:Number,default:5},labelOffset:{type:Number,default:20}},data(){return{map:null,markers:[],labels:[],defaultIcon:null}},watch:{markerList:{deep:!0,handler(){this.clearAllMarkers(),this.addMarkers()}},center:{deep:!0,handler(e){this.map&&this.map.setCenter(new window.T.LngLat(e.lng,e.lat))}}},mounted(){this.initDefaultIcon();const e=()=>{window.T?(this.initMap(),this.addMarkers()):setTimeout(e,100)};e()},beforeUnmount(){this.map&&(this.clearAllMarkers(),this.map=null)},methods:{initDefaultIcon(){this.defaultIcon=new window.T.Icon({iconUrl:"https://cdngw.11yzh.com/uploadfile/20250821/817080186184056832.png",iconSize:new window.T.Point(30,30),iconAnchor:new window.T.Point(15,30)})},initMap(){this.map=new window.T.Map("map"),this.map.centerAndZoom(new window.T.LngLat(this.center.lng,this.center.lat),this.zoom),this.map.enableScrollWheelZoom(!1)},addMarkers(){!this.map||!this.markerList.length||this.markerList.forEach(e=>{this.addMarker(e),this.addLabel(e)})},addMarker(e){const n=new window.T.LngLat(e.lng,e.lat);let s=this.defaultIcon;e.iconUrl&&(s=new window.T.Icon({iconUrl:e.iconUrl,iconSize:new window.T.Point(25,34),iconAnchor:new window.T.Point(12.5,34)}));const t=new window.T.Marker(n,{icon:s});this.map.addOverLay(t),this.markers.push(t),t.addEventListener("click",()=>{this.handleMarkerClick(e)})},addLabel(e){const n=new window.T.LngLat(e.lng,e.lat),s=` 2 <div class="marker-label" data-id="${e.id||e.name}"> 3 ${e.name||"æªç¥å°ç¹"} 4 </div> 5 `,t=new window.T.Label({text:s,position:n,offset:new window.T.Point(-50,this.labelOffset)});this.map.addOverLay(t),this.labels.push(t),setTimeout(()=>{const o=document.querySelector(`.marker-label[data-id="${e.id||e.name}"]`);o&&o.addEventListener("click",()=>{this.handleMarkerClick(e)})},0)},handleMarkerClick(e){if(this.$emit("marker-click",e),e.url){const n=e.url.startsWith("http://")||e.url.startsWith("https://");window.open(n?e.url:`http://${e.url}`,"_blank")}},clearAllMarkers(){this.markers.forEach(e=>{this.map.removeOverLay(e)}),this.markers=[],this.labels.forEach(e=>{this.map.removeOverLay(e)}),this.labels=[],document.querySelectorAll(".marker-label").forEach(e=>{e.remove()})}}},O={class:"map-container"};function S(e,n,s,t,o,h){return d(),c("div",O,n[0]||(n[0]=[u("div",{id:"map",class:"map"},null,-1)]))}const D=x(A,[["render",S],["__scopeId","data-v-04d9d757"]]),U={class:"pt-20 bg-white"},N=["src"],P={id:"industryTrends",class:"select-none mx-auto pb-10 lg:px-10"},q={key:0,class:"text-4xl text-center"},B={key:1,class:"text-2xl text-justify leading-10 indent-8 tracking-wide"},W={key:0,class:"w-full h-[800px]"},V={__name:"[id]",setup(e){const n=l(""),s=l(""),t=l("2"),o=l(""),h=l([]),p=l(!1),L=l({total:5,page:1}),T=$(),w=l({id:0,page:1,pageSize:500}),y=l([]),f=l([]);z(()=>{w.value.id=T.params.id,C(()=>{window.scrollTo(0,0),M(w.value)})});const M=_=>{E(_).then(i=>{console.log(i),h.value=[],n.value=i.data.name,s.value=i.data.describe,t.value=i.data.is_show_title,o.value=i.data.cover,L.value.total=i.data.pageInfo.total,y.value=[i.data.partner[0].longitude,i.data.partner[0].latitude],i.data.partner.map((a,k)=>{f.value.push({id:a.id,lng:a.longitude,lat:a.latitude,name:a.name,url:a.url}),h.value.push({id:a.id,year:a.created_at.slice(0,4),date:a.created_at.slice(5,10),name:a.name,content:a.description,img:a.thumbnail,url:a.url})}),setTimeout(()=>{p.value=!0},500)})};return l(-1),(_,i)=>{const a=D,k=I;return d(),c("div",U,[u("img",{src:r(o),class:"w-full aspect-[9/2]"},null,8,N),u("div",P,[u("div",{class:g([[r(t)!=2||r(s)?"pt-20 pb-20":"mb-10"],"flex flex-col w-full"])},[r(t)!=2?(d(),c("h1",q,v(r(n)),1)):m("",!0),u("div",{class:g([r(t)!=2&r(s)?"py-5":""])},null,2),r(s)?(d(),c("h1",B,v(r(s)),1)):m("",!0)],2),r(p)?(d(),c("div",W,[b(a,{markerList:r(f),zoom:"5"},null,8,["markerList"])])):m("",!0)]),b(k)])}}};export{V as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.