import{aM as f,I as y,aL as x}from"./index.17037962789732.js";import"./index.1703796278973304.js";import"./index.170379627897314.js";import"./index.170379627897315.js";import{c as g}from"./channel.1703796278973.js";import{d as I}from"./device.17037962789735.js";import{d as T,k as p,w as D,r as S,o as w,x as C,z as m,b as s,a as A,u as i}from"./vue.1703796278973.js";import{_ as L}from"./_plugin-vue_export-helper.1703796278973.js";import"./index.17037962789733.js";import"./dayjs.min.1703796278973.js";import"./isArray.1703796278973.js";import"./editor.api.1703796278973.js";import"./preload-helper.1703796278973.js";import"./monaco.contribution.1703796278973.js";import"./system.1703796278973.js";import"./comm.1703796278973.js";import"./index.170379627897332.js";import"./index.170379627897333.js";import"./index.170379627897334.js";import"./default.1703796278973.js";import"./permission.1703796278973.js";import"./consts.1703796278973.js";import"./404.1703796278973.js";const k={class:"channel-tree"},q={class:"channel-tree-query"},B={class:"channel-tree-content"},E=T({__name:"index",props:{deviceId:null,onSelect:null,onTreeLoad:null},setup(d){const t=d,o=p([]),a=p([]),l=async(e,n)=>{const{result:r}=await g.queryTree(e,n);o.value[0].children=r||[],t.onTreeLoad(o.value[0].children.length>10),o.value=o.value},_=async e=>{const n=await I.detail(e);n.status===200&&(o.value=[{id:e,name:n.result.name,children:[]}],a.value=[e],l(t.deviceId,{}))},u=f.debounce(e=>{l(t.deviceId,{terms:[{column:"name",termType:"like",value:`%${e.target.value}%`}]})},300);return D(()=>{_(t.deviceId)}),(e,n)=>{const r=S("AIcon"),v=y,h=x;return w(),C("div",k,[m("div",q,[s(v,{onChange:i(u),placeholder:"请输入目录名称"},{suffix:A(()=>[s(r,{type:"SearchOutlined"})]),_:1},8,["onChange"])]),m("div",B,[s(h,{height:500,selectedKeys:i(a),treeData:i(o),onSelect:c=>{c.length&&(a.value=c,t.onSelect&&t.onSelect(c[0]))},fieldNames:{key:"id",title:"name"}},null,8,["selectedKeys","treeData","onSelect"])])])}}});const oe=L(E,[["__scopeId","data-v-162f70a0"]]);export{oe as default};