data_center/public/admin/assets/index.2baf2542.js

2 lines
17 KiB
JavaScript
Raw Normal View History

2023-11-21 14:38:14 +08:00
import{k as Me,b as Ne,U as We,L as Ge,V as Ye,E as qe,W as Ke,p as Qe,q as Ze,r as Oe,w as Je,M as Xe,N as He,B as et,a as tt,F as lt,O as nt,P as at,Q as ot}from"./element-plus.9c2fdfa8.js";import{_ as st}from"./index.vue_vue_type_script_setup_true_lang.261df48b.js";import{_ as it}from"./index.a870c3ad.js";import{r as I,f as Ae,d as xe,b as Se,i as ut}from"./index.5be037e5.js";import{P as dt}from"./index.da6dd366.js";import{U as ct}from"./index.77cf5d3d.js";import{_ as rt}from"./index.vue_vue_type_script_setup_true_lang.aa03e8e3.js";import{s as O,r as B,$ as Ve,d as J,o as s,c as f,a as o,K as D,Q as v,U as n,H as ft,_ as De,I as mt,u as e,e as Be,w as Q,M as Z,V as de,L as a,k as P,n as be,a3 as pt,C as _t,j as vt,R as _,Z as q,T as $,a7 as K,a8 as ht,O as Fe,S as ie,bf as gt,be as yt}from"./@vue.53f8d7c3.js";import{u as Ct}from"./usePaging.c22e2b6f.js";import{g as kt}from"./vue3-video-play.65ddc377.js";const Et="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 wt(l){return I.post({url:"/file/addCate",params:l})}function bt(l){return I.post({url:"/file/editCate",params:l})}function Ft(l){return I.post({url:"/file/delCate",params:l})}function At(l){return I.get({url:"/file/listCate",params:l})}function xt(l){return I.get({url:"/file/lists",params:l})}function St(l){return I.post({url:"/file/delete",params:l})}function Vt(l){return I.post({url:"/file/move",params:l})}function Dt(l){return I.post({url:"/file/rename",params:l})}function Bt(l){const x=O(),g=B([]),p=B(""),h=async()=>{const i=await At({page_type:0,type:l}),w=[{name:"\u5168\u90E8",id:""},{name:"\u672A\u5206\u7EC4",id:0}];g.value=i.lists,g.value.unshift(...w),setTimeout(()=>{var c;(c=x.value)==null||c.setCurrentKey(p.value)},0)};return{treeRef:x,cateId:p,cateLists:g,handleAddCate:async i=>{await wt({type:l,name:i,pid:0}),h()},handleEditCate:async(i,w)=>{await bt({id:w,name:i}),h()},handleDeleteCate:async i=>{await Ae.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await Ft({id:i}),p.value="",h()},getCateLists:h,handleCatSelect:i=>{p.value=i.id}}}function Rt(l,x,g,p){const h=O(),E=B("normal"),y=B(0),u=B([]),F=B(!1),i=B(!1),w=Ve({name:"",type:x,cid:l}),{pager:c,getLists:R,resetPage:U}=Ct({fetchFun:xt,params:w,firstLoading:!0,size:p}),T=()=>{R()},H=()=>{U()},ee=d=>!!u.value.find(m=>m.id==d),te=async d=>{await Ae.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 m=d||u.value.map(L=>L.id);await St({ids:m}),T(),S()},le=async()=>{const d=u.value.map(m=>m.id);await Vt({ids:d,cid:y.value}),y.value=0,T(),S()},z=d=>{const m=u.value.findIndex(L=>L.id==d.id);if(m!=-1){u.value.splice(m,1);return}if(u.value.length==g.value){if(g.value==1){u.value=[],u.value.push(d);return}Me.warning("\u5DF2\u8FBE\u5230\u9009\u62E9\u4E0A\u9650");return}u.value.push(d)},S=()=>{u.value=[]};return{listShowType:E,tableRef:h,moveId:y,pager:c,fileParams:w,select:u,isCheckAll:F,isIndeterminate:i,getFileList:T,refresh:H,batchFileDelete:te,batchFileMove:le,selectFile:z,isSelect:ee,clearSelect:S,cancelSelete:d=>{u.value=u.value.filter(m=>m.id!=d)},selectAll:d=>{var m;if(i.value=!1,(m=h.value)==null||m.toggleAllSelection(),d){u.value=[...c.lists];retu