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