import{f as M}from"./folder.ea536bf2.js";import{_ as O}from"./file.2b66c011.js";import{_ as U}from"./add-or-update.vue_vue_type_script_setup_true_lang.bc99adba.js";import{_ as H}from"./index.vue_vue_type_script_setup_true_name_Data-integrateFileIndex_lang.ff8bb419.js";import{l as B,d as S}from"./fileCategory.cc511701.js";import{d as A,h as u,L as q,r as o,aj as z,o as a,c,b as t,w as n,a as s,l as g,t as F,H as d,a7 as y,f as G,F as J,a9 as K,E as Q}from"./index.e3896b23.js";import"./add-or-update.vue_vue_type_script_setup_true_lang.a947df21.js";import"./constant.71632d98.js";const W=g("\u6DFB\u52A0\u6839\u8282\u70B9"),X=s("br",null,null,-1),Y=s("br",null,null,-1),Z={class:"dataFileDiv"},ee={class:"dataFile-tree-node"},te={key:0},ne=s("img",{src:M},null,-1),oe={key:1},le=s("img",{src:O},null,-1),ae=["onClick"],se=["onClick"],ie=["onClick"],ce=A({name:"Data-integrateFile-categoryIndex"}),ge=A({...ce,setup(re){const p=u([]);q(()=>{B().then(e=>{p.value=e.data})});const v=()=>{B().then(e=>{p.value=e.data})},x=u(),f=u(!1),b=e=>{e.type==0?f.value=!1:(f.value=!0,setTimeout(()=>{x.value.init(e.id,e.path,e.projectId)},100))},_=u(),E=()=>{_.value.init(null,0,"",null)},I=e=>{console.log(e),_.value.init(null,e.id,e.path,e.projectId)},w=(e,l)=>{_.value.init(l.id,l.parentId,l.parentPath,l.projectId)},R=(e,l)=>{K.confirm("\u786E\u5B9A\u8FDB\u884C\u5220\u9664\u64CD\u4F5C?","\u63D0\u793A",{confirmButtonText:"\u786E\u5B9A",cancelButtonText:"\u53D6\u6D88",type:"warning"}).then(()=>{S(l.id).then(()=>{Q.success("\u5220\u9664\u6210\u529F"),v()})})};return(e,l)=>{const $=o("el-button"),N=o("CirclePlus"),m=o("el-icon"),T=o("Edit"),V=o("Delete"),j=o("el-tree"),C=o("el-card"),P=o("el-aside"),L=o("el-header"),k=o("el-container"),h=z("auth");return a(),c(J,null,[t(k,null,{default:n(()=>[t(P,{width:"22%"},{default:n(()=>[t(C,{"body-style":"height: calc(100vh - 170px )"},{default:n(()=>[t($,{type:"primary",onClick:l[0]||(l[0]=r=>E())},{default:n(()=>[W]),_:1}),X,Y,s("div",Z,[t(j,{data:p.value,"node-key":"id","expand-on-click-node":!1,"default-expand-all":"",onNodeClick:b},{default:n(({node:r,data:i})=>[s("span",ee,[i.type==0?(a(),c("span",te,[ne,g("\xA0\xA0"+F(r.label),1)])):d("",!0),i.type==1?(a(),c("span",oe,[le,g("\xA0\xA0"+F(r.label),1)])):d("",!0),s("span",null,[i.type==0?y((a(),c("a",{key:0,style:{"margin-left":"8px"},onClick:D=>I(i)},[t(m,null,{default:n(()=>[t(N)]),_:1})],8,ae)),[[h,"data-integrate:fileCategory:save"]]):d("",!0),y((a(),c("a",{style:{"margin-left":"8px"},onClick:D=>w(r,i)},[t(m,null,{default:n(()=>[t(T)]),_:1})],8,se)),[[h,"data-integrate:fileCategory:update"]]),y((a(),c("a",{style:{"margin-left":"8px"},onClick:D=>R(r,i)},[t(m,null,{default:n(()=>[t(V)]),_:1})],8,ie)),[[h,"data-integrate:fileCategory:delete"]])])])]),_:1},8,["data"])])]),_:1})]),_:1}),t(k,null,{default:n(()=>[t(L,null,{default:n(()=>[t(C,{"body-style":"height: calc(100vh - 170px )"},{default:n(()=>[f.value?(a(),G(H,{key:0,ref_key:"fileIndexRef",ref:x},null,512)):d("",!0)]),_:1})]),_:1})]),_:1})]),_:1}),t(U,{ref_key:"addOrUpdateRef",ref:_,onRefreshDataList:v},null,512)],64)}}});export{ge as default};
