WokerTask/public/admin/assets/index.12a52234.js

2 lines
17 KiB
JavaScript
Raw Normal View History

2024-01-12 13:48:06 +08:00
import{k as je,b as Me,V as Ne,M as We,p as Ge,q as Ye,r as qe,W as Ke,E as Qe,P as Ze,X as Xe,Q as Je,R as Oe,w as He,O as et,C as tt,a as lt,G as nt,N as at}from"./element-plus.ff90c99c.js";import{_ as ot}from"./index.vue_vue_type_script_setup_true_lang.44dbc460.js";import{_ as st}from"./index.881aa789.js";import{r as P,f as Fe,d as Ae,b as xe,i as it}from"./index.000b0758.js";import{P as ut}from"./index.37ed0e1b.js";import{U as dt}from"./index.2d717933.js";import{_ as ct}from"./index.vue_vue_type_script_setup_true_lang.ec118b31.js";import{s as Z,r as D,$ as Se,d as X,o as s,c,a as o,P as V,T as _,W as n,J as rt,L as Ve,M as ft,u as e,b as De,w as K,R as Q,X as ue,Q as a,j as T,n as we,a0 as mt,E as pt,i as _t,U as p,a4 as Y,F as $,a9 as q,aa as vt,K as be,V as se,bg as ht,bf as gt}from"./@vue.f8dfc830.js";import{u as yt}from"./usePaging.bd7a7dec.js";import{g as Ct}from"./vue3-video-play.5592bdaa.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 P.post({url:"/file/addCate",params:l})}function wt(l){return P.post({url:"/file/editCate",params:l})}function bt(l){return P.post({url:"/file/delCate",params:l})}function Ft(l){return P.get({url:"/file/listCate",params:l})}function At(l){return P.get({url:"/file/lists",params:l})}function xt(l){return P.post({url:"/file/delete",params:l})}function St(l){return P.post({url:"/file/move",params:l})}function Vt(l){return P.post({url:"/file/rename",params:l})}function Dt(l){const F=Z(),k=D([]),r=D(""),v=async()=>{const m=await Ft({page_type:0,type:l}),y=[{name:"\u5168\u90E8",id:""},{name:"\u672A\u5206\u7EC4",id:0}];k.value=m.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 m=>{await Et({type:l,name:m,pid:0}),v()},handleEditCate:async(m,y)=>{await wt({id:y,name:m}),v()},handleDeleteCate:async m=>{await Fe.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await bt({id:m}),r.value="",v()},getCateLists:v,handleCatSelect:m=>{r.value=m.id}}}function Bt(l,F,k,r){const v=Z(),x=D("normal"),E=D(0),i=D([]),h=D(!1),m=D(!1),y=Se({name:"",type:F,cid:l}),{pager:f,getLists:L,resetPage:O}=yt({fetchFun:At,params:y,firstLoading:!0,size:r}),U=()=>{L()},H=()=>{O()},ee=u=>!!i.value.find(g=>g.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 g=u||i.value.map(R=>R.id);await xt({ids:g}),U(),C()},z=async()=>{const u=i.value.map(g=>g.id);await St({ids:u,cid:E.value}),E.value=0,U(),C()},I=u=>{const g=i.value.findIndex(R=>R.id==u.id);if(g!=-1){i.value.splice(g,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:h,isIndeterminate:m,getFileList:U,refresh:H,batchFileDelete:te,batchFileMove:z,selectFile:I,isSelect:ee,clearSelect:C,cancelSelete:u=>{i.value=i.value.filter(g=>g.id!=u)},selectAll:u=>{var g;if(m.value=!1,(g=v.value)==null||g.toggleAllSelection(),u){i.value=[...f.lists];return}C()