/*!
 *  build: vue-admin-beautiful 
 *  vue-admin-beautiful author: chuzhixin 1204505056@qq.com 
 *  vue-admin-beautiful QQ Group(QQ群): 972435319、1139183756 
 *  time: 2024-10-10 11:14:28
 */
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5548ca58"],{7075:function(e,t,o){"use strict";o.r(t);var l=o("f2bf");const c={class:"search"},n={class:"search-head"},i={style:{height:"26px",display:"flex","align-items":"center","font-size":"14px"}},r={key:0,class:"search-icon"},a={key:1,class:"search-dot"};function s(e,t,o,s,d,p){const h=Object(l["resolveComponent"])("el-input"),u=Object(l["resolveComponent"])("el-tree"),f=Object(l["resolveComponent"])("el-popover");return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",c,[Object(l["createVNode"])(f,{modelValue:d.expand,"onUpdate:modelValue":t[2]||(t[2]=e=>d.expand=e),placement:"bottom",trigger:"click",width:370,offset:5,"show-arrow":!1,onShow:t[3]||(t[3]=e=>p.onToggle(!0)),onHide:t[4]||(t[4]=e=>p.onToggle(!1))},{reference:Object(l["withCtx"])(()=>[Object(l["createElementVNode"])("div",n,[Object(l["withDirectives"])(Object(l["createElementVNode"])("div",{class:"search-all-site",onClick:t[0]||(t[0]=(...e)=>p.onAllSiteClick&&p.onAllSiteClick(...e))},[Object(l["createElementVNode"])("span",null,Object(l["toDisplayString"])(d.filterText),1)],512),[[l["vShow"],!d.expand]]),Object(l["withDirectives"])(Object(l["createVNode"])(h,{ref:"searchInputRef",modelValue:d.filterText,"onUpdate:modelValue":t[1]||(t[1]=e=>d.filterText=e),placeholder:e.$t("dataEnquiry.qsrzdmc"),onInput:p.onSearchInput,onClick:Object(l["withModifiers"])(e=>!1,["stop"])},null,8,["modelValue","placeholder","onInput"]),[[l["vShow"],d.expand]])])]),default:Object(l["withCtx"])(()=>[Object(l["createVNode"])(u,{ref:"treeRef",class:"search-tree",data:o.siteList,props:{value:"id",label:"label",children:"children",class:p.getCustomProps},accordion:"","node-key":"id","highlight-current":"","filter-node-method":p.filterNode,onNodeClick:p.onNodeClick},{default:Object(l["withCtx"])(({node:e,data:t})=>[Object(l["createElementVNode"])("div",i,["folder"===t.iconType?(Object(l["openBlock"])(),Object(l["createElementBlock"])("span",r)):(Object(l["openBlock"])(),Object(l["createElementBlock"])("span",a)),Object(l["createElementVNode"])("div",null,Object(l["toDisplayString"])(e.label),1)])]),_:1},8,["data","props","filter-node-method","onNodeClick"])]),_:1},8,["modelValue"])])}var d=o("2ef0"),p={name:"SiteSearch",props:{siteList:{type:Array,require:!0,default:()=>[]}},data(){return{filterText:"all sites",expand:!1}},mounted(){this.onSearchInput=Object(d["throttle"])(this.onSearchInput,400)},methods:{onAllSiteClick(){this.onToggle(!this.expand),this.$refs.searchInputRef.focus()},onToggle(e){this.expand=e,this.expand||!this.filterText&&(this.filterText="all sites")},onNodeClick(e){"device"===e.type&&(this.filterText=e.label,console.log(1231,e),this.onToggle(!1),setTimeout(()=>{this.$emit("node-click",e)}))},onSearchInput(e){this.$refs.treeRef.filter(e)},filterNode(e,t){return!e||t.label.includes(e)},getCustomProps(e,t){return e.type?"search-item-"+e.type:null}}},h=(o("dd87"),o("d959")),u=o.n(h);const f=u()(p,[["render",s],["__scopeId","data-v-d7735c9e"]]);t["default"]=f},"987a":function(e,t,o){},dd87:function(e,t,o){"use strict";o("987a")}}]);