2024-09-05 22:56:41 +08:00
|
|
|
import{k as ze,b as Qe,T as Ze,K as Oe,p as Je,q as Xe,r as He,U as et,E as tt,R as lt,S as nt,C as at,V as st,M as ut,N as ot,O as it,w as dt,D as ct,a as rt}from"./element-plus.ab0703f2.js";import{_ as pt}from"./index.vue_vue_type_script_setup_true_lang.5fc87b57.js";import{_ as ft}from"./index.5b716f69.js";import{r as z,f as _e,d as $e,b as Ie,h as mt}from"./index.26dce67b.js";import{P as _t}from"./index.b76ec1c2.js";import{U as yt}from"./index.b0dbb4c3.js";import{_ as vt}from"./index.vue_vue_type_script_setup_true_lang.9909e290.js";import{s as J,r as B,$ as Te,d as X,o as s,c as f,a as u,P as w,W as n,T as _,J as ht,L as Pe,M as gt,u as t,b as Ue,w as Z,R as O,X as ye,Q as a,j as P,n as De,a0 as Ct,G as kt,i as Et,U as p,a4 as Q,F as R,a9 as Y,aa as Ft,K as Be,V as fe,bk as wt,bj as bt}from"./@vue.340249d8.js";import{u as At}from"./usePaging.fff444fa.js";import{g as xt}from"./vue3-video-play.fb56db8a.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=J(),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=J(),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
|