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