import{_ as E,r as u,a as i,o as p,c as f,b as t,w as s,d as v,e as g,F as q,f as B,E as D,g as N,t as U}from"./index-54b3342f.js";const F={class:"url"},L={style:{display:"flex",width:"100%"}},R={style:{display:"flex"}},T={style:{width:"100%",height:"100%","overflow-y":"auto"}},j={__name:"index",setup(z){const d=u(!1),n=u({name:"https://v.qq.com/x/cover/mzc002007vp35qj.html",start:1}),c=u([]),r=u();function x(){let l=D.service();window.getlist(n.value.name).then(e=>{console.log(e),c.value=e,l.close()})}function h(){r.value.clearSelection();for(let l=n.value.start-1;l<c.value.length;l++)console.log(l),r.value.toggleRowSelection(c.value[l],void 0)}const y=u([]);function b(l,e,o){console.log(o),o?l():y.value.unshift(e)}function V(l){return new Promise(e=>{const o=b.bind(this,e);window.dowload(l,o)})}async function k(){d.value=!0;let l=r.value.getSelectionRows();for(let e of l)await V(e);d.value=!1,N({showClose:!0,message:"下载完成",type:"success",duration:0})}return(l,e)=>{const o=i("el-input"),_=i("el-button"),w=i("el-form-item"),m=i("el-table-column"),C=i("el-table"),S=i("el-dialog");return p(),f("div",F,[t(w,{label:"视频地址"},{default:s(()=>[v("div",L,[t(o,{style:{width:"100%"},modelValue:n.value.name,"onUpdate:modelValue":e[0]||(e[0]=a=>n.value.name=a)},null,8,["modelValue"]),t(_,{style:{"flex-shrink":"0",margin:"0 10px"},onClick:x,type:"primary"},{default:s(()=>[g("获取")]),_:1})])]),_:1}),t(w,{label:"第几集开始"},{default:s(()=>[v("div",R,[t(o,{modelValue:n.value.start,"onUpdate:modelValue":e[1]||(e[1]=a=>n.value.start=a)},null,8,["modelValue"]),t(_,{style:{"flex-shrink":"0",margin:"0 10px"},onClick:h,type:"primary"},{default:s(()=>[g("设置")]),_:1}),t(_,{style:{"flex-shrink":"0",margin:"0 10px"},onClick:k,type:"primary"},{default:s(()=>[g("下载")]),_:1})])]),_:1}),t(C,{ref_key:"table",ref:r,data:c.value,style:{width:"100%"}},{default:s(()=>[t(m,{type:"selection",width:"55"}),t(m,{label:"title",prop:"title"}),t(m,{label:"url",prop:"url"})]),_:1},8,["data"]),t(S,{fullscreen:!0,"close-on-click-modal":!1,"close-on-press-escape":!1,modelValue:d.value,"onUpdate:modelValue":e[2]||(e[2]=a=>d.value=a),"show-close":!1,title:"Tips",width:"30%"},{default:s(()=>[v("div",T,[(p(!0),f(q,null,B(y.value,a=>(p(),f("div",null,U(a),1))),256))])]),_:1},8,["modelValue"])])}}},M=E(j,[["__scopeId","data-v-550c913f"],["__file","D:/xiangmu/ptSend/view/src/page/index.vue"]]);export{M as default};
