1 |
- import{j as D}from"./index-BXDuHJBr.js";import{am as Y,_ as J}from"./entry/index-C5x3nItD.js";import{aE as Q,Y as ee,W as G,B as $,aZ as te,x as ae,X as F,b0 as le,a5 as oe,C as se,a_ as ne,a$ as ue,R as P,aT as ie,b2 as de,M as k,$ as re,a0 as pe,E as ce}from"./antd-FjOLgRLC.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 V,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)),we=ve({__name:"video",props:{type:{type:String,default:"none"}},emits:["change"],setup(d,{emit:E}){const K=Q.Dragger,N=E,p=d,T=n("/admin/upload/img"),j={Authorization:Y()},w=n({type:p.type,group_id:0}),r=n("http://www.xingyousoft.com/"),I=n([0]),c=n(!1),b=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},Z=o=>{r.value.lastIndexOf("/")==-1?o.fullUrl=r.value+o.path:o.fullUrl=r.value.substring(0,r.value.length-1)+o.path,N("change",o)},q=o=>{o.key!=-1&&(v.value=y.value[o.key],_.value=v.value.id,w.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 W=o=>{},X=o=>{};return(o,l)=>(u(),x(C,null,[t(e(P),null,{default:s(()=>[t(e(ee),{gutter:[16,16]},{default:s(()=>[t(e(G),{span:"4"},{default:s(()=>[t(e($),{type:"primary",size:"large",onClick:R},{default:s(()=>[t(e(te)),f("上传图片")]),_:1}),t(e(ae),{selectedKeys:I.value,"onUpdate:selectedKeys":l[0]||(l[0]=a=>I.value=a),style:{width:"256px"},mode:"vertical",onClick:q},{default:s(()=>[(u(),g(e(F),{key:-1},{default:s(()=>[f("全部")]),_:1})),(u(!0),x(C,null,V(y.value,(a,h)=>(u(),g(e(F),{key:h},{default:s(()=>[f(me(a.name),1)]),_:2},1024))),128))]),_:1},8,["selectedKeys"]),t(e($),{type:"primary",onClick:W},{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,V(S.value,(a,h)=>(u(),g(e(P),{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:be=>Z(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(K),{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:w.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:b.value,"onUpdate:open":l[7]||(l[7]=a=>b.value=a),title:"分组管理",onOk:X},{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=J(we,[["__scopeId","data-v-e689c270"]]);export{Oe as default};
|