2024-01-03 14:05:40 +08:00
|
|
|
import{k as je,b as Me,S as Ne,J as Ge,T as We,E as Ye,U as qe,p as Ke,q as Qe,r as Ze,w as Je,R as Oe,B as Xe,a as He,F as et,L as tt,M as lt,N as nt,Q as at}from"./element-plus.5df6f736.js";import{_ as ot}from"./index.vue_vue_type_script_setup_true_lang.1938e45e.js";import{_ as st}from"./index.48fcbc2c.js";import{r as T,f as Fe,d as Ae,b as xe,i as it}from"./index.dab55926.js";import{P as ut}from"./index.3156c470.js";import{U as dt}from"./index.f5ea6f5f.js";import{_ as ct}from"./index.vue_vue_type_script_setup_true_lang.dc1b37d1.js";import{s as Z,r as D,_ as Se,d as J,o as s,c,a as o,J as V,Q as m,T as n,G as rt,Z as Ve,H as ft,u as e,b as De,w as K,L as Q,M as ue,K as a,j as U,n as we,a2 as _t,B as mt,i as pt,Y,U as $,a6 as q,a8 as vt,O as be,R as p,S as se,b7 as ht,b6 as gt}from"./@vue.108c970a.js";import{u as yt}from"./usePaging.2a59f422.js";import{g as Ct}from"./vue3-video-play.5aacf00d.js";const kt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAgCAYAAABgrToAAAACJElEQVRYR+2YMWsUURSFz3m7s+nskjUIQSutbMRi7WzUVjSadMHCbVLkByjmLygaCVYWRqMEUhkFS9Gg0cJfYCPZjYUQFbPs+I7c2R1Q2ZjZfRNYYS4MAzPv3vnmvDvL3kMA2Hl5/CjLI9ckf4ZwY3Zt15C+gfwIao3So0rt3XsJtPUk9M/cAW6y9ap2DIyfAjgCwANwGeoYiEFtk/5e5CvXeer1D2neATcGgiTZM4+t9RNLEKcBtAFEGeBsiRWzl7EoSXo+8rV9gWc/fDc1B1VSEoEnDpj0KTB33tS26DGaEezvZQZpRxmODyoT5+vwBwS3zeTcT4yjTdZNJEiPSykk1bjZX6HeD/WQJ1zUApgq2w+etcsniBuAVlH9vELOx6Yo1VywgkmTB4X1kEGGhyAtg/Ecq3NNqnknDwVTrNBaactEts88OHs5b8Bw/Tof4M+kr4WrwwhoL9n5uRPWhxWwsxPEl+EGNMacP5I8evCPGgVgqKSFgoWCoQqE5hc9WCgYqkBoftGDeSiYz1/+UJLe+foftvh2A2B1fwQIrapkaFoDcK4PVyH0qVnyU4fjGdW4NQ2WlgDE5hLkMoJmQdh9zW9Dk59K5lhtLjyE01TX/jDILP5MGEbvbFPOJroIXvc5PjvTBbx7GM4vAjjd9WdSc2g/IPaqaTv5Aq58haP1TSb2Au20GGErvgTxIqiTAA7tVSnn+2Z9vAXdCsa4bD6Nsf0C/gYA5PMzcW0AAAAASUVORK5CYII=";function Et(l){return T.post({url:"/file/addCate",params:l})}function wt(l){return T.post({url:"/file/editCate",params:l})}function bt(l){return T.post({url:"/file/delCate",params:l})}function Ft(l){return T.get({url:"/file/listCate",params:l})}function At(l){return T.get({url:"/file/lists",params:l})}function xt(l){return T.post({url:"/file/delete",params:l})}function St(l){return T.post({url:"/file/move",params:l})}function Vt(l){return T.post({url:"/file/rename",params:l})}function Dt(l){const F=Z(),k=D([]),r=D(""),v=async()=>{const _=await Ft({page_type:0,type:l}),y=[{name:"\u5168\u90E8",id:""},{name:"\u672A\u5206\u7EC4",id:0}];k.value=_.lists,k.value.unshift(...y),setTimeout(()=>{var f;(f=F.value)==null||f.setCurrentKey(r.value)},0)};return{treeRef:F,cateId:r,cateLists:k,handleAddCate:async _=>{await Et({type:l,name:_,pid:0}),v()},handleEditCate:async(_,y)=>{await wt({id:y,name:_}),v()},handleDeleteCate:async _=>{await Fe.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await bt({id:_}),r.value="",v()},getCateLists:v,handleCatSelect:_=>{r.value=_.id}}}function Bt(l,F,k,r){const v=Z(),x=D("normal"),E=D(0),i=D([]),g=D(!1),_=D(!1),y=Se({name:"",type:F,cid:l}),{pager:f,getLists:P,resetPage:X}=yt({fetchFun:At,params:y,firstLoading:!0,size:r}),L=()=>{P()},H=()=>{X()},ee=u=>!!i.value.find(h=>h.id==u),te=async u=>{await Fe.confirm("\u786E\u8BA4\u5220\u9664\u540E\uFF0C\u672C\u5730\u6216\u4E91\u5B58\u50A8\u6587\u4EF6\u4E5F\u5C06\u540C\u6B65\u5220\u9664\uFF0C\u5982\u6587\u4EF6\u5DF2\u88AB\u4F7F\u7528\uFF0C\u8BF7\u8C28\u614E\u64CD\u4F5C\uFF01");const h=u||i.value.map(R=>R.id);await xt({ids:h}),L(),C()},z=async()=>{const u=i.value.map(h=>h.id);await St({ids:u,cid:E.value}),E.value=0,L(),C()},I=u=>{const h=i.value.findIndex(R=>R.id==u.id);if(h!=-1){i.value.splice(h,1);return}if(i.value.length==k.value){if(k.value==1){i.value=[],i.value.push(u);return}je.warning("\u5DF2\u8FBE\u5230\u9009\u62E9\u4E0A\u9650");return}i.value.push(u)},C=()=>{i.value=[]};return{listShowType:x,tableRef:v,moveId:E,pager:f,fileParams:y,select:i,isCheckAll:g,isIndeterminate:_,getFileList:L,refresh:H,batchFileDelete:te,batchFileMove:z,selectFile:I,isSelect:ee,clearSelect:C,cancelSelete:u=>{i.value=i.value.filter(h=>h.id!=u)},selectAll:u=>{var h;if(_.value=!1,(h=v.value)==null||h.toggleAllSelection(),u){i.value=[...f.lists];return}C()},hand
|