Files
yusheng-admin/dist/static/js/hook-rCjAVbXe.js
2025-10-23 11:07:17 +08:00

2 lines
3.9 KiB
JavaScript

var q=Object.defineProperty,K=Object.defineProperties;var N=Object.getOwnPropertyDescriptors;var L=Object.getOwnPropertySymbols;var T=Object.prototype.hasOwnProperty,V=Object.prototype.propertyIsEnumerable;var z=(t,e,o)=>e in t?q(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,f=(t,e)=>{for(var o in e||(e={}))T.call(e,o)&&z(t,o,e[o]);if(L)for(var o of L(e))V.call(e,o)&&z(t,o,e[o]);return t},g=(t,e)=>K(t,N(e));var _=(t,e,o)=>new Promise((p,b)=>{var r=l=>{try{n(o.next(l))}catch(u){b(u)}},c=l=>{try{n(o.throw(l))}catch(u){b(u)}},n=l=>l.done?p(l.value):Promise.resolve(l.value).then(r,c);n((o=o.apply(t,e)).next())});import{_ as G}from"./detail.vue_vue_type_script_setup_true_lang-DwYwyiLJ.js";import{n as i,b as H,r as J,aA as w,aK as M,ag as P}from"./index-CRmU-Qpi.js";import{d as E,e as Q}from"./room-3H8Bx0CI.js";import{u as y,w as U}from"./xlsx-DaVhO591.js";import{_ as W}from"./index.vue_vue_type_script_setup_true_lang-Vno3adgp.js";import"./demo-DDf_ewnH.js";function le(){const t=i(!0),e=i([]),o=i(!1),p=i({search_room_number:"",search_onwer_number:"",room_status:"",start_time:"",end_time:""}),b=i([{label:"房间号",prop:"search_room_number",type:"input"},{label:"房主",prop:"search_onwer_number",type:"input"},{label:"房间状态",prop:"room_status",type:"select",optionList:[{label:"正常",value:1},{label:"封禁",value:2},{label:"关闭",value:3}]},{label:"开始时间",prop:"start_time",type:"date"},{label:"结束时间",prop:"end_time",type:"date"}]),r=i({total:0,pageSize:10,pageSizes:[10,20,50,100],currentPage:1,background:!0}),c=i([{label:"频道号",prop:"id"},{label:"房间号",prop:"room_number"},{label:"房主昵称",prop:"user_nickname"},{label:"观众ID",prop:"cp_user_id"},{label:"观众昵称",prop:"cp_nickname"},{label:"房间名称",prop:"room_name"},{label:"房间封面",prop:"room_cover",cellRenderer:({row:a})=>H(J("el-image"),{fit:"cover","preview-teleported":!0,src:a.room_cover,"preview-src-list":Array.of(a.room_cover),class:"w-[100px] h-[50px] align-middle"},null)},{label:"房主所属公会",prop:"user_guild"},{label:"在线状态",prop:"is_on_line_str"},{label:"状态",prop:"room_status_str"},{label:"房间总流水",prop:"liushui"},{label:"创建时间",prop:"createtime"},{label:"操作",fixed:"right",width:210,slot:"operation"}]),n=a=>_(this,null,function*(){t.value=!0,p.value=f({},a);const{data:s,code:v}=yield E(g(f({},a),{page:r.value.currentPage,page_limit:r.value.pageSize}));v&&(e.value=s.lists,r.value.total=s.count,r.value.currentPage=+s.page),t.value=!1}),l=a=>{r.value.pageSize=a,n(p.value)},u=a=>{r.value.currentPage=a,n(p.value)},F=a=>_(this,null,function*(){const{code:s}=yield Q({room_id:a.id});s&&(w(`您封禁了房间名称为【${a.room_name}】的这条数据`,{type:"success"}),n(p.value))}),I=a=>_(this,null,function*(){M({title:"加入频道",props:{rowData:a},width:"60%",closeOnClickModal:!1,contentRenderer:()=>P(G),beforeSure:s=>{s()}})}),x=i(null);return{searchForm:p,searchLabel:b,onSearch:n,isShow:o,tableList:e,tableLabel:c,pagination:r,handleSizeChange:l,handleCurrentChange:u,loading:t,joinMovieRoom:I,handleBan:F,exportExcel:()=>{let a=[];M({title:"导出数据",props:{formInline:{time:""}},width:"40%",closeOnClickModal:!1,contentRenderer:()=>P(W,{ref:x,formInline:null}),beforeSure:(s,{options:v})=>{const $=x.value.getRef(),d=v.props.formInline,A=m=>_(this,null,function*(){const{data:B,code:D}=yield E(g(f({},m),{page:1,page_limit:2e5}));if(D){a=B.lists;const S=a.map(h=>{const C=[];return c.value.forEach(j=>{C.push(h[j.prop])}),C}),k=[];c.value.forEach(h=>{k.push(h.label)}),S.unshift(k);const O=y.aoa_to_sheet(S),R=y.book_new();y.book_append_sheet(R,O,"数据报表"),U(R,`CP电影房统计${m.start_time} - ${m.end_time}.xlsx`),w("导出成功",{type:"success"}),s()}else w("获取数据失败,请重试!",{type:"error"})});$.validate(m=>{m&&d.time&&d.time.length&&A({start_time:d.time[0]||"",end_time:d.time[1]||""})})}})}}}export{le as useData};