2024-06-18 17:27:08 +08:00
|
|
|
import{k as ze,b as Qe,S as Ze,J as Je,p as Oe,q as Xe,r as He,T as et,E as tt,Q as lt,R as nt,B as at,U as st,L as ut,M as ot,N as it,w as dt,C as ct,a as rt}from"./element-plus.61695454.js";import{_ as pt}from"./index.vue_vue_type_script_setup_true_lang.33ea11c1.js";import{_ as ft}from"./index.24ee8d41.js";import{r as z,f as _e,d as $e,b as Ie,h as mt}from"./index.aab340cd.js";import{P as _t}from"./index.81b5eba5.js";import{U as yt}from"./index.8df344e7.js";import{_ as vt}from"./index.vue_vue_type_script_setup_true_lang.09ad5ba8.js";import{s as O,r as B,a0 as Te,d as X,o as s,c as f,a as u,M as w,W as n,S as _,J as ht,$ as Pe,K as gt,u as t,b as Ue,w as Z,P as J,X as ye,O as a,j as P,n as De,aa as Ct,C as kt,i as Et,T as p,_ as Q,V as R,a7 as Y,a8 as Ft,Q as Be,U as fe,bk as wt,bj as bt}from"./@vue.c3e77981.js";import{u as At}from"./usePaging.d25ebf19.js";import{g as xt}from"./vue3-video-play.4813c60b.js";const St="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 Re(l){return z.post({url:"/file/addCate",params:l})}function Vt(l){return z.post({url:"/file/editCate",params:l})}function Dt(l){return z.post({url:"/file/delCate",params:l})}function Bt(l){return z.get({url:"/file/listCate",params:l})}function Rt(l){return z.get({url:"/file/lists",params:l},{ignoreCancelToken:!0,isOpenRetry:!1})}function zt(l){return z.post({url:"/file/delete",params:l})}function $t(l){return z.post({url:"/file/move",params:l})}function It(l){return z.post({url:"/file/rename",params:l})}function Tt(l){const V=O(),k=B([]),y=B(""),v=async()=>{const r=await Bt({page_type:0,type:l}),c=[{name:"\u5168\u90E8",id:""},{name:"\u672A\u5206\u7EC4",id:0}];k.value=r.lists,k.value.unshift(...c),setTimeout(()=>{var F;(F=V.value)==null||F.setCurrentKey(y.value)},0)};return{treeRef:V,cateId:y,cateLists:k,handleAddCate:async r=>{await Re({type:l,name:r,pid:0}),v()},handleAddChildCate:async(r,c)=>{await Re({type:l,name:r,pid:c}),v()},handleEditCate:async(r,c)=>{await Vt({id:c,name:r}),v()},handleDeleteCate:async(r,c)=>{c?await _e.confirm("\u5220\u9664\u6587\u4EF6\u5939\u5C06\u4F1A\u6C38\u4E45\u5220\u9664\u6587\u4EF6\u5939\u53CA\u5176\u6240\u6709\u5185\u5BB9\u3002\u60A8\u786E\u5B9A\u8981\u7EE7\u7EED\u5417\uFF1F"):await _e.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await Dt({id:r}),y.value="",v()},getCateLists:v,handleCatSelect:r=>{y.value=r.id}}}function Pt(l,V,k,y){const v=O(),A=B("normal"),E=B(0),o=B([]),D=B(!1),h=B(!1),r=Te({name:"",type:V,cid:l,source:""}),{pager:c,getLists:F,resetPage:$}=At({fetchFun:Rt,params:r,firstLoading:!0,size:y}),U=()=>{F()},ee=()=>{$()},te=m=>!!o.value.find(d=>d.id==m),le=async m=>{await _e.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 d=m||o.value.map(S=>S.id);await zt({ids:d}),U(),L()},ne=async()=>{const m=o.value.map(d=>d.id);await $t({ids:m,cid:E.value}),E.value=0,U(),L()},ae=m=>{const d=o.value.findIndex(S=>S.id==m.id);if(d!=-1){o.value.splice(d,1);return}if(o.value.length==k.value){if(k.value==1){o.value=[],o.value.push(m);return}ze.warning("\u5DF2\u8FBE\u5230\u9009\u62E9\u4E0A\u9650");return}o.value.push(m)},L=()=>{o.value=[]};return{listShowType:A,tableRef:v,moveId
|