import{_ as e}from"./index.vue_vue_type_script_setup_true_lang-a13809b7.js";/* empty css             *//* empty css                          *//* empty css                    *//* empty css                  *//* empty css                   *//* empty css                  */import{a}from"./index-403f799c.js";import{d as l,e as s}from"./index-2e4b9a93.js";/* empty css                 *//* empty css                   */import{d as i,m as t,x as u,an as o,o as r,c as d,e as c,b as v,t as n,z as p,W as m,l as _,w as y,a as b,F as f,y as h,R as g,a4 as k,S as x,ai as j,Z as w,bi as V,az as C,aA as z,_ as S}from"./index-2b50ecca.js";/* empty css                    */import"./http-aa208300.js";/* empty css                 *//* empty css                   */const W=e=>(C("data-v-2b9ac889"),e=e(),z(),e),U={class:"wrapper"},q=["src"],F=["src"],N={class:"video-wrapper"},R={class:"flex items-center justify-between h-10"},Z={class:"w-full text-base font-medium"},A={class:"ml-2 text-lg font-bold text-dark-600"},I={key:0},P=W((()=>c("div",{class:"flex items-center"},[c("div",{class:"dot-success"}),c("span",null,"同步成功")],-1))),X=W((()=>c("div",{class:"flex items-center"},[c("div",{class:"dot-lose"}),c("span",null,"同步失败")],-1))),Y=W((()=>c("div",{class:"flex items-center"},[c("div",{class:"dot-ing"}),c("span",null,"同步中")],-1))),B=S(i({__name:"videoSync",props:{primary:String|Number},setup(i){const C=i,z=t(),S=t([]),W=t({page:1,limit:100}),B=t(!1),D=t([]),E=t(!1);C.primary;const G=t({}),H=e=>{switch(e.wechat_check_status){case 1:return"#f18e00";case 3:return"#28c445";case 2:return"#ed0b0b"}},J=t({}),K=t({}),L=()=>{E.value=!E.value,J.value={},K.value={},B.value=!1,S.value=[]},M=()=>{J.value={},K.value={},E.value=!0,B.value=!1,S.value=[]},O=()=>{E.value=!1;const e=S.value.map((e=>e.id));l({series_ids:e}).then((e=>{k.success(e.message)})),S.value},Q=e=>{a({video_id:C.primary.id,need_wechat_status:1,...e}).then((e=>{D.value=e.data,G.value={limit:e.limit,total:e.total}}))},T=e=>{S.value=e?D.value:[]},$=e=>{W.value.page=Number(e.page),Q(W.value)};return u((()=>{Q(W.value)})),(a,l)=>{const i=x,t=j,u=w,k=V,W=e,Q=o("action");return r(),d("div",U,[E.value?(r(),d("video",{id:"my-player",style:{width:"500px"},key:K.value.wxpublic_video_url,class:"video-js",controls:"",autoplay:"",ref_key:"myVideo",ref:z},[c("source",{src:K.value.wxpublic_video_url,type:"video/mp4"},null,8,q)])):(r(),d("video",{id:"my-player",style:{width:"500px"},key:J.value.public_video_url,class:"video-js",controls:"",autoplay:"",ref_key:"myVideo",ref:z},[c("source",{src:J.value.public_video_url,type:"video/mp4"},null,8,F)])),c("div",N,[c("div",R,[c("div",Z,[v("剧名: "),c("span",A,n(C.primary.name),1),v(),J.value.series_name||K.value.series_name?(r(),d("span",I," (当前播放"+n(J.value.series_name||K.value.series_name)+") ",1)):p("",!0)]),m((r(),_(i,{type:E.value?"success":"default",size:"default",onClick:L},{default:y((()=>[v("("+n(E.value?"微信视频":"原始视频")+")切换视频播放源",1)])),_:1},8,["type"])),[[Q,"video.VideoSeriesWechatCheck.medialink"]]),m((r(),_(i,{type:"primary",size:"default",onClick:O},{default:y((()=>[v("同步视频")])),_:1})),[[Q,"video.VideoSeriesWechatCheck.syncWechat"]]),b(t,{placement:"top",width:400,trigger:"click"},{reference:y((()=>[m((r(),_(i,{style:{"margin-right":"16px"},onClick:M},{default:y((()=>[v("查看状态")])),_:1})),[[Q,"video.VideoSeriesWechatCheck.medialink"]])])),default:y((()=>[P,X,Y])),_:1})]),c("div",null,[b(u,{modelValue:B.value,"onUpdate:modelValue":l[0]||(l[0]=e=>B.value=e),border:"",onChange:T},{default:y((()=>[v(" 全选 ")])),_:1},8,["modelValue"])]),G.value.total?(r(),_(W,{key:0,meta:G.value,onChange:$},{content:y((()=>[E.value?(r(),_(k,{key:0,modelValue:S.value,"onUpdate:modelValue":l[1]||(l[1]=e=>S.value=e),size:"large",class:"flex items-center"},{default:y((()=>[(r(!0),d(f,null,h(D.value,((e,a)=>(r(),_(u,{border:"",class:"video-item",onChange:a=>(e=>{K.value=S.value.find((a=>a.public_video_url==e.public_video_url))??{},s({series_id:e.id}).then((a=>{K.value=S.value.find((a=>a.public_video_url==e.public_video_url))??{},K.value.wxpublic_video_url=a.data}))})(e),key:a,label:e,style:g({backgroundColor:H(e)})},{default:y((()=>[v(n(e.series_sequence),1)])),_:2},1032,["onChange","label","style"])))),128))])),_:1},8,["modelValue"])):(r(),_(k,{key:1,modelValue:S.value,"onUpdate:modelValue":l[2]||(l[2]=e=>S.value=e),size:"large",class:"flex items-center"},{default:y((()=>[(r(!0),d(f,null,h(D.value,((e,a)=>(r(),_(u,{border:"",class:"video-item",onChange:a=>(e=>{J.value=S.value.find((a=>a.public_video_url==e.public_video_url))??{}})(e),key:a,label:e},{default:y((()=>[v(n(e.series_sequence),1)])),_:2},1032,["onChange","label"])))),128))])),_:1},8,["modelValue"]))])),_:1},8,["meta"])):p("",!0)])])}}}),[["__scopeId","data-v-2b9ac889"]]);export{B as default};
