2 lines
17 KiB
JavaScript
2 lines
17 KiB
JavaScript
|
import{k as je,b as Me,S as Ne,J as We,T as Ge,E as Ye,U as qe,p as Ke,q as Ze,r as Qe,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.ceab5937.js";import{_ as ot}from"./index.vue_vue_type_script_setup_true_lang.8b138a1d.js";import{_ as st}from"./index.775035f5.js";import{r as $,f as Fe,d as Ae,b as xe,i as it}from"./index.a57a7ecc.js";import{P as ut}from"./index.48a32005.js";import{U as dt}from"./index.d678069f.js";import{_ as ct}from"./index.vue_vue_type_script_setup_true_lang.93eb3b8d.js";import{s as Q,r as D,$ as Se,d as J,o as s,c,a as o,K as V,R as m,U as n,H as rt,_ as Ve,I as ft,u as e,e as De,w as K,M as Z,O as ue,L as a,k as U,n as we,a3 as _t,C as mt,j as pt,Z as Y,V as P,a7 as q,a9 as vt,P as be,S as p,T as se,b7 as ht,b6 as gt}from"./@vue.e8706010.js";import{u as yt}from"./usePaging.160b82b8.js";import{g as Ct}from"./vue3-video-play.4851e3ad.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 $.post({url:"/file/addCate",params:l})}function wt(l){return $.post({url:"/file/editCate",params:l})}function bt(l){return $.post({url:"/file/delCate",params:l})}function Ft(l){return $.get({url:"/file/listCate",params:l})}function At(l){return $.get({url:"/file/lists",params:l})}function xt(l){return $.post({url:"/file/delete",params:l})}function St(l){return $.post({url:"/file/move",params:l})}function Vt(l){return $.post({url:"/file/rename",params:l})}function Dt(l){const F=Q(),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=Q(),x=D("normal"),E=D(0),i=D([]),g=D(!1),_=D(!1),y=Se({name:"",type:F,cid:l}),{pager:f,getLists:T,resetPage:X}=yt({fetchFun:At,params:y,firstLoading:!0,size:r}),L=()=>{T()},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()}
|