video-DXWJScZn.js 3.9 KB

1
  1. import{j as D}from"./index-C50gxrxn.js";import{am as X,_ as Z}from"./entry/index-DHk75Dkc.js";import{aJ as Q,Y as ee,W as G,B as F,b2 as te,x as ae,X as P,b5 as le,a5 as oe,C as se,b3 as ne,b4 as ue,R as V,aY as ie,b7 as de,M as k,$ as re,a0 as pe,E as ce}from"./antd-B5uHptHh.js";import{d as ve,f as n,Z as u,_ as x,k as t,a8 as s,u as e,G as f,a7 as g,F as C,aa as $,a0 as me,$ as i,ab as fe,a2 as ge,a3 as ye}from"./vue-ByATgq5d.js";const U=d=>(ge("data-v-e689c270"),d=d(),ye(),d),_e={class:"image-list upload-list",id:"items2"},he={style:{margin:"20px 0 0 0","text-align":"center",clear:"both"}},ke={class:"ant-upload-drag-icon"},xe=U(()=>i("p",{class:"ant-upload-text"},"Click or drag file to this area to upload",-1)),Ce=U(()=>i("p",{class:"ant-upload-hint"}," Support for a single or bulk upload. Strictly prohibit from uploading company data or other band files ",-1)),Ue=U(()=>i("div",{class:"cropperBox"},null,-1)),be=ve({__name:"video",props:{type:{type:String,default:"none"}},emits:["change"],setup(d,{emit:K}){const N=Q.Dragger,E=K,p=d,T=n("/admin/upload/img"),j={Authorization:X()},b=n({type:p.type,group_id:0}),r=n("http://www.xingyousoft.com/"),w=n([0]),c=n(!1),I=n(!1),L=n(!1),B=n(1),z=()=>{},y=n([]),v=n({}),_=n(void 0),S=n([]),M=n(0),O=n([]),R=()=>{c.value=!0},Y=o=>{r.value.lastIndexOf("/")==-1?o.fullUrl=r.value+o.path:o.fullUrl=r.value.substring(0,r.value.length-1)+o.path,E("change",o)},q=o=>{o.key!=-1&&(v.value=y.value[o.key],_.value=v.value.id,b.value.group_id=_.value),m()},A=o=>{},H=o=>{},m=()=>{D("media_list",{type:p.type,group_id:_.value}).then(o=>{S.value=o.list,M.value=o.total}),c.value=!1};(()=>{D("media_group",{type:p.type}).then(o=>{y.value=o.list,m()})})();const J=o=>{},W=o=>{};return(o,l)=>(u(),x(C,null,[t(e(V),null,{default:s(()=>[t(e(ee),{gutter:[16,16]},{default:s(()=>[t(e(G),{span:"4"},{default:s(()=>[t(e(F),{type:"primary",size:"large",onClick:R},{default:s(()=>[t(e(te)),f("上传图片")]),_:1}),t(e(ae),{selectedKeys:w.value,"onUpdate:selectedKeys":l[0]||(l[0]=a=>w.value=a),style:{width:"256px"},mode:"vertical",onClick:q},{default:s(()=>[(u(),g(e(P),{key:-1},{default:s(()=>[f("全部")]),_:1})),(u(!0),x(C,null,$(y.value,(a,h)=>(u(),g(e(P),{key:h},{default:s(()=>[f(me(a.name),1)]),_:2},1024))),128))]),_:1},8,["selectedKeys"]),t(e(F),{type:"primary",onClick:J},{default:s(()=>[f("添加分组")]),_:1})]),_:1}),t(e(G),{span:"19"},{default:s(()=>[i("div",_e,[t(e(le),null,{default:s(()=>[(u(!0),x(C,null,$(S.value,(a,h)=>(u(),g(e(V),{key:h,hoverable:"",style:{width:"105px",margin:"10px",display:"inline-block"}},{cover:s(()=>[t(e(oe),{src:r.value+a.path},null,8,["src"])]),actions:s(()=>[p.type!="none"?(u(),g(e(se),{key:0,onClick:Ie=>Y(a)},null,8,["onClick"])):fe("",!0),t(e(ne)),t(e(ue))]),_:2},1024))),128))]),_:1})]),i("div",he,[t(e(ie),{current:B.value,"onUpdate:current":l[1]||(l[1]=a=>B.value=a),"show-quick-jumper":"",total:M.value,onChange:z},null,8,["current","total"])])]),_:1})]),_:1})]),_:1}),t(e(k),{open:c.value,"onUpdate:open":l[3]||(l[3]=a=>c.value=a),title:"图片上传",onOk:l[4]||(l[4]=a=>m()),onCancel:l[5]||(l[5]=a=>m())},{default:s(()=>[t(e(N),{fileList:O.value,"onUpdate:fileList":l[2]||(l[2]=a=>O.value=a),name:"file",multiple:!0,"max-count":5,"list-type":"picture",action:T.value,data:b.value,headers:j,onChange:A,onDrop:H},{default:s(()=>[i("p",ke,[t(e(de))]),xe,Ce]),_:1},8,["fileList","action","data"])]),_:1},8,["open"]),t(e(k),{open:I.value,"onUpdate:open":l[7]||(l[7]=a=>I.value=a),title:"分组管理",onOk:W},{default:s(()=>[t(e(re),{style:{margin:"20px"}},{default:s(()=>[t(e(pe),{label:"分组名称"},{default:s(()=>[t(e(ce),{value:v.value.name,"onUpdate:value":l[6]||(l[6]=a=>v.value.name=a)},null,8,["value"])]),_:1})]),_:1})]),_:1},8,["open"]),t(e(k),{open:L.value,"onUpdate:open":l[8]||(l[8]=a=>L.value=a),width:"800",title:"图片编辑"},{default:s(()=>[Ue]),_:1},8,["open"])],64))}}),Oe=Z(be,[["__scopeId","data-v-e689c270"]]);export{Oe as default};