import{_ as e}from"./index.vue_vue_type_script_setup_true_lang-278fda3c.js";/* empty css             *//* empty css                          *//* empty css                    *//* empty css                  *//* empty css                   *//* empty css                  *//* empty css                 */import{a}from"./index-f69c28c3.js";import{d as l,m as s,x as t,o as i,c as r,a as o,e as u,b as n,t as d,z as c,w as p,l as m,F as v,y as _,U as y,cC as f,W as b,cy as g,a1 as x,cR as h,R as j,S as k,_ as w}from"./index-41bf27b7.js";/* empty css                    */import"./http-e55ef919.js";/* empty css                 *//* empty css                   */const C=e=>(j("data-v-4193e0cd"),e=e(),k(),e),V={class:"wrapper"},z=["src"],S={class:"video-wrapper"},U={class:"flex items-center justify-between h-10"},q={class:"w-full text-base font-medium"},R={class:"ml-2 text-lg font-bold text-dark-600"},I={key:0},N=C((()=>u("div",{class:"flex items-center"},[u("div",{class:"dot-success"}),u("span",null,"同步成功")],-1))),W=C((()=>u("div",{class:"flex items-center"},[u("div",{class:"dot-lose"}),u("span",null,"同步失败")],-1))),F=C((()=>u("div",{class:"flex items-center"},[u("div",{class:"dot-ing"}),u("span",null,"同步中")],-1))),G=w(l({__name:"videoSync",props:{primary:String|Number},setup(l){const j=l,k=s(),w=s([]),C=s({page:1,limit:100}),G=s(!1),H=s([]),Q=s(!1);j.primary;const X=s({}),Z=e=>{switch(e.series_sequence){case 1:return"#f18e00";case 2:return"#28c445";case 3:return"#ed0b0b"}},$=s({}),A=s([]),B=()=>{Q.value=!0},D=()=>{Q.value=!1},E=e=>{a({video_id:j.primary.id,...e}).then((e=>{H.value=e.data,X.value={limit:e.limit,total:e.total}}))},J=e=>{w.value=e?H.value:[]},K=e=>{C.value.page=Number(e.page),E(C.value)},L=e=>{$.value=w.value.find((a=>a.public_video_url==e.public_video_url))??{},A.value=w.value,A.value};return t((()=>{E(C.value)})),(a,l)=>{const s=f,t=b,C=g,A=x,E=h,M=e;return i(),r(v,null,[o(s,{title:"注：如需批量下载，则多选目标集数，点击下载按钮即可",type:"warning","show-icon":"",closable:!1}),u("div",V,[(i(),r("video",{id:"my-player",style:{width:"500px"},key:$.value.public_video_url,class:"video-js",controls:"",autoplay:"",ref_key:"myVideo",ref:k},[u("source",{src:$.value.public_video_url,type:"video/mp4"},null,8,z)])),u("div",S,[u("div",U,[u("div",q,[n("剧名: "),u("span",R,d(j.primary.name),1),n(),$.value.series_name?(i(),r("span",I,"(当前播放"+d($.value.series_name)+")",1)):c("",!0)]),o(t,{type:"primary",size:"default",onClick:D},{default:p((()=>[n("同步视频")])),_:1}),o(C,{placement:"top",width:400,trigger:"click"},{reference:p((()=>[o(t,{style:{"margin-right":"16px"},onClick:B},{default:p((()=>[n("查看状态")])),_:1})])),default:p((()=>[N,W,F])),_:1})]),u("div",null,[o(A,{modelValue:G.value,"onUpdate:modelValue":l[0]||(l[0]=e=>G.value=e),border:"",indeterminate:a.isIndeterminate,onChange:J},{default:p((()=>[n(" 全选 ")])),_:1},8,["modelValue","indeterminate"])]),X.value.total?(i(),m(M,{key:0,meta:X.value,onChange:K},{content:p((()=>[Q.value?(i(),m(E,{key:0,modelValue:w.value,"onUpdate:modelValue":l[1]||(l[1]=e=>w.value=e),size:"large",class:"flex items-center"},{default:p((()=>[(i(!0),r(v,null,_(H.value,((e,a)=>(i(),m(A,{border:"",class:"video-item",onChange:a=>L(e),key:a,label:e,style:y({backgroundColor:Z(e)})},{default:p((()=>[n(d(e.series_sequence),1)])),_:2},1032,["onChange","label","style"])))),128))])),_:1},8,["modelValue"])):(i(),m(E,{key:1,modelValue:w.value,"onUpdate:modelValue":l[2]||(l[2]=e=>w.value=e),size:"large",class:"flex items-center"},{default:p((()=>[(i(!0),r(v,null,_(H.value,((e,a)=>(i(),m(A,{border:"",class:"video-item",onChange:a=>L(e),key:a,label:e},{default:p((()=>[n(d(e.series_sequence),1)])),_:2},1032,["onChange","label"])))),128))])),_:1},8,["modelValue"]))])),_:1},8,["meta"])):c("",!0)])])],64)}}}),[["__scopeId","data-v-4193e0cd"]]);export{G as default};
