WokerTask/public/admin/assets/index.8276eb7a.js

2 lines
17 KiB
JavaScript
Raw Normal View History

2023-12-27 14:06:33 +08:00
import{k as je,b as Me,U as Ne,L as We,p as Ge,q as Ye,r as qe,V as Ke,E as Qe,O as Ze,W as Oe,P as Je,Q as Xe,w as He,N as et,B as tt,a as lt,F as nt,M as at}from"./element-plus.9816852d.js";import{_ as ot}from"./index.vue_vue_type_script_setup_true_lang.f99137a4.js";import{_ as st}from"./index.c279106f.js";import{r as $,f as Fe,d as Ae,b as xe,i as it}from"./index.fdc772f5.js";import{P as ut}from"./index.ed3dbb0f.js";import{U as dt}from"./index.f93942f9.js";import{_ as ct}from"./index.vue_vue_type_script_setup_true_lang.e9eaddcf.js";import{s as Z,r as D,$ as Se,d as O,o as s,c,a as o,K as V,Q as _,U as n,H as rt,_ as Ve,I as ft,u as e,e as De,w as K,M as Q,V as ue,L as a,k as T,n as we,a3 as mt,C as pt,j as _t,R as p,Z as Y,T as P,a7 as q,a8 as vt,O as be,S as se,bf as ht,be as gt}from"./@vue.51d7f2d8.js";import{u as yt}from"./usePaging.2ad8e1e6.js";import{g as Ct}from"./vue3-video-play.b911321b.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=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:X}=yt({fetchFun:At,params:y,firstLoading:!0,size:r}),U=()=>{L()},H=()=>{X()},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()}