videoList-2bc3c604.js 6.6 KB

1
  1. /* empty css *//* empty css */import{_ as e}from"./index.vue_vue_type_script_setup_true_lang-a81ac626.js";/* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{_ as a}from"./search.vue_vue_type_script_setup_true_lang-13aa2a03.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{d as l}from"./index-b8a1ff49.js";import{d as t,q as s,n as o,z as r,o as i,c as n,e as p,f as u,l as d,w as m,F as c,p as v,a as f,A as _,a9 as b,Z as y,b as h,t as g,aw as w,a5 as j,a6 as x,B as V,D as k,x as U,aa as C,G as S,aC as T,X as z,K as I,ak as O,ab as $,a2 as q,S as G,U as R,a7 as A,_ as B}from"./index-7807a4ee.js";import{u as F}from"./useGetList-a4163f12.js";import{v as K}from"./index-1011d0c1.js";/* empty css */import"./index-22e17be0.js";import"./http-5104ead5.js";/* empty css */const L=e=>(G("data-v-ab6cdba4"),e=e(),R(),e),M={class:"flex flex-wrap ml-6"},N={class:"table-default"},X={class:"flex flex-col items-start justify-center wrapper"},D={class:"wrapper"},E={class:"text-lg font-bold text-blue-400 cursor-pointer content"},H={class:"wrapper"},J=L((()=>p("span",{class:"label"},"上架时间:",-1))),P={class:"content"},Z={class:"flex wrapper"},Q={key:0},W={class:"content"},Y=L((()=>p("span",null,"/",-1))),ee={class:"content"},ae={class:"flex items-center"},le=L((()=>p("span",null,"定价",-1))),te=L((()=>p("br",null,null,-1))),se={class:"flex justify-end"},oe=B(t({__name:"videoList",props:{primary:Object},emits:["confirm"],setup(t,{emit:G}){const R=t,B=s(),L=s([]),{data:oe,query:re,search:ie,reset:ne,loading:pe}=F("videoStock/video/list"),ue=s([]),de=s([{label:"连载中",value:"1"},{label:"完结",value:"2"}]),me=s([]),ce=s([]),ve=s(!1),fe=e=>{if(e){const a=e[e.length-1];re.value.categoryId=a}else delete re.value.categoryId},_e=()=>{re.value=Object.assign({page:re.value.page,limit:re.value.limit,shelfType:2}),ie(),ue.value=[]},be=o((()=>{var e;return null==(e=oe.value)?void 0:e.data})),ye=e=>{ve.value||(L.value=e)},he=()=>{const e=L.value.map(((e,a)=>(L.value[a].sort=ce.value[a],{id:e.id,sort:ce.value[a],name:e.name})));ce.value,(()=>{const e=new Set,a=new Set;for(const l of L.value){if(null===l.sort||void 0===l.sort)return A.error(`${l.name}的排序不能为空`),!1;if(e.has(l.sort))return A.error(`${l.name}的排序重复`),!1;if(e.add(l.sort),a.has(l.name))return A.error(`${l.name}的排序重复`),!1;a.add(l.name)}return!0})()&&G("confirm",e)};R.primary&&(L.value=R.primary||[],L.value.length>0&&(ce.value=L.value.map((e=>e.sort)),ce.value));return r((()=>{re.value=Object.assign({page:re.value.page,limit:re.value.limit,shelfType:2}),ve.value=!0,Object.keys(L.value).forEach((e=>{L.value[e]&&B.value.toggleRowSelection(L.value[e],!0)})),ve.value=!1,K().then((e=>{me.value=e.data})),ie()})),(t,s)=>{const o=j,r=x,G=V,R=k,A=U,F=a,K=C,oe=S,ne=T,ve=z,ge=I,we=O,je=$,xe=e,Ve=q;return i(),n("div",null,[p("div",M,[u(L).length>0?(i(),d(r,{key:0,label:"所选短剧:",class:"font-bold"},{default:m((()=>[(i(!0),n(c,null,v(u(L),((e,a)=>(i(),n("div",{key:e.id,class:"mb-3 mr-3"},[f(o,{type:"number",disabled:!1,min:"1",modelValue:u(ce)[a],"onUpdate:modelValue":e=>u(ce)[a]=e,modelModifiers:{number:!0},placeholder:"排序",size:"default",clearable:"",style:{width:"115px"}},null,8,["modelValue","onUpdate:modelValue"]),f(o,{modelValue:e.name,"onUpdate:modelValue":a=>e.name=a,disabled:!0,placeholder:"短剧名称",style:{width:"300px"},class:"input-with-select"},null,8,["modelValue","onUpdate:modelValue"])])))),128))])),_:1})):_("",!0)]),f(F,{search:u(ie),reset:_e},{body:m((()=>[f(r,{label:"短剧",prop:"name"},{default:m((()=>[f(o,{modelValue:u(re).videoName,"onUpdate:modelValue":s[0]||(s[0]=e=>u(re).videoName=e),placeholder:"请输入短剧名称",clearable:""},null,8,["modelValue"])])),_:1}),f(r,{label:"状态",prop:"updateType"},{default:m((()=>[f(R,{modelValue:u(re).updateType,"onUpdate:modelValue":s[1]||(s[1]=e=>u(re).updateType=e),filterable:"",clearable:"",remote:"",placeholder:"请选择状态"},{default:m((()=>[(i(!0),n(c,null,v(u(de),(e=>(i(),d(G,{key:e.value,label:e.label,value:e.value},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])])),_:1}),f(r,{label:"频道",prop:"categoryId"},{default:m((()=>[f(A,{modelValue:u(ue),"onUpdate:modelValue":s[2]||(s[2]=e=>b(ue)?ue.value=e:null),options:u(me),filterable:"",clearable:"","change-on-select":!0,onChange:fe},null,8,["modelValue","options"])])),_:1})])),_:1},8,["search"]),p("div",N,[y((i(),d(je,{data:u(be),ref_key:"multipleTableRef",ref:B,class:"mt-3","row-key":"id",onSelectionChange:ye},{default:m((()=>[f(K,{type:"selection","reserve-selection":""}),f(K,{prop:"id",label:"剧号"}),f(K,{label:"封面","show-overflow-tooltip":""},{default:m((e=>[p("div",X,[f(ne,{placement:"top",width:200,trigger:"click"},{reference:m((()=>[f(oe,{src:e.row.cover_image,class:"cursor-pointer",style:{width:"48px",height:"48px"},fit:"contain",lazy:!0},null,8,["src"])])),default:m((()=>[f(oe,{src:e.row.cover_image,style:{width:"100%"},fit:"contain"},null,8,["src"])])),_:2},1024),f(ve,{type:"primary",link:"",size:"default",onClick:a=>{return t=e.row,void l(t.cover_image,t.name);var t}},{default:m((()=>[h("下载")])),_:2},1032,["onClick"])])])),_:1}),f(K,{label:"短剧名称","show-overflow-tooltip":"","min-width":"250"},{default:m((e=>[p("div",D,[p("span",E,g(e.row.name),1),p("span",null," 【 "+g(e.row.update_type_str)+" 】 ",1)]),p("div",H,[J,p("span",P,g(e.row.shelf_at),1)])])),_:1}),f(K,{prop:"total_episode_num",label:"集数"},{default:m((e=>[p("div",Z,[1==e.row.update_type?(i(),n("div",Q,[p("span",W,g(e.row.updated_episode_num),1),Y])):_("",!0),p("div",null,[p("span",ee,g(e.row.total_episode_num),1)])])])),_:1}),f(K,{prop:"category_str",label:"频道"}),f(K,{prop:"shelf_type_str",label:"上架状态"}),f(K,{prop:"charge_sequence",label:"起始集"}),f(K,{prop:"charge_coin",label:"定价"},{header:m((()=>[p("div",ae,[le,f(we,{placement:"top"},{content:m((()=>[h(" 定价为所需看剧币"),te,h("1元等于100币 ")])),default:m((()=>[f(ge,null,{default:m((()=>[f(u(w))])),_:1})])),_:1})])])),default:m((e=>[p("span",null,g(e.row.charge_coin),1)])),_:1})])),_:1},8,["data"])),[[Ve,u(pe)]]),f(xe)]),p("div",se,[f(ve,{type:"primary",onClick:he},{default:m((()=>[h(g(t.$t("system.confirm")),1)])),_:1})])])}}}),[["__scopeId","data-v-ab6cdba4"]]);export{oe as default};