import{r,o as v,u as _}from"./framework.e8f655c8.js";import{A as k}from"./AutocompleteInput.62824028.js";import{M as g}from"./MapHeader.473ca88e.js";import{u as y}from"./useInputSearch.257787e5.js";import{d as C}from"./mapVisiual.0e39c3be.js";import{n as x,e as b,Q as I}from"./index.8c202964.js";import{D as P}from"./destroyViews.2f770ba0.js";import"./dom.1d8ecbf3.js";import"./ui.13608dbc.js";const D={__name:"index",setup(p){const a=r(!0),t=r(!0),e=r(!1);function s(){e.value=[a,t].every(n=>!_(n)),e.value&&(a.value=!0)}const{searchVal:c,inputSelectItem:i,querySearch:f}=y({nativePlaceChecked:a,officeLocationChecked:t});function d(n){i.value=n,o()}function o(){if(!c.value)return b("\u8BF7\u5148\u8F93\u5165\u5173\u952E\u8BCD");I.push({path:"/home/geography-figure-analyze-result",query:{searchVal:encodeURI(c.value),nativePlaceChecked:a.value?"checked":"",officeLocationChecked:t.value?"checked":""}})}const l=r([]);function u(){C().then(n=>{l.value=n.data.map(m=>({name:m}))})}function h(n){c.value=n.name,o()}return v(()=>{u()}),{__sfc:!0,nativePlaceChecked:a,officeLocationChecked:t,nativeDisabled:e,setNativeDisabled:s,searchVal:c,inputSelectItem:i,querySearch:f,setInputSelectItem:d,goResult:o,placeNameList:l,getPlaceNameList:u,handlePlaceClick:h,AutocompleteInput:k,MapHeader:g,DestroyViews:P}}};var L=function(){var a=this,t=a._self._c,e=a._self._setupProxy;return t("div",{staticClass:"geography-figure-analyze full-height"},[t(e.MapHeader,{attrs:{label:"\u5730\u7406-\u4EBA\u7269\u5173\u8054\u5206\u6790"}}),t("h1",{staticClass:"text-center"},[a._v("\u5730\u7406-\u4EBA\u7269\u5173\u8054\u5206\u6790")]),t("div",{staticClass:"input-wrap"},[t(e.AutocompleteInput,{attrs:{placeholder:"\u8BF7\u8F93\u5165\u5730\u540D\u5982\uFF1A\u5317\u4EAC\u3001\u4E0A\u6D77 ... \u8FDB\u884C\u76F8\u5173\u68C0\u7D22",inputHeight:88,"fetch-suggestions":e.querySearch,"trigger-on-focus":!0},on:{search:e.goResult,select:e.setInputSelectItem},nativeOn:{keyup:function(s){return!s.type.indexOf("key")&&a._k(s.keyCode,"enter",13,s.key,"Enter")?null:e.goResult.apply(null,arguments)}},model:{value:e.searchVal,callback:function(s){e.searchVal=s},expression:"searchVal"}})],1),t("div",{staticClass:"check-group"},[t("el-checkbox",{staticStyle:{"margin-right":"40px"},attrs:{disabled:e.nativeDisabled},on:{change:e.setNativeDisabled},model:{value:e.nativePlaceChecked,callback:function(s){e.nativePlaceChecked=s},expression:"nativePlaceChecked"}},[a._v("\u7C4D\u8D2F")]),t("el-checkbox",{on:{change:e.setNativeDisabled},model:{value:e.officeLocationChecked,callback:function(s){e.officeLocationChecked=s},expression:"officeLocationChecked"}},[a._v("\u4EFB\u804C")])],1),t("div",{staticClass:"place-wrap flex-center-justify"},a._l(e.placeNameList,function(s){return t("span",{key:s.sourceId,staticClass:"place-item flex-center pointer",on:{click:function(c){return e.handlePlaceClick(s)}}},[t("span",{staticClass:"text-ellipsis"},[a._v(a._s(s.name))])])}),0),t("h3",{staticClass:"text-center"}),t(e.DestroyViews,{attrs:{label:"\u56FE\u8C31",type:"\u5730\u7406-\u4EBA\u7269\u5173\u8054\u5206\u6790","source-id":"","source-type":"","source-name":"",volume:"''",identifier:"",title:""}})],1)},S=[],V=x(D,L,S,!1,null,"987530fd",null,null);const W=V.exports;export{W as default};
