Files
yusheng-admin/dist/static/js/statistics-gtweHPF5.js

2 lines
4.4 KiB
JavaScript
Raw Normal View History

2025-10-23 11:07:17 +08:00
var N=Object.defineProperty,q=Object.defineProperties;var F=Object.getOwnPropertyDescriptors;var P=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable;var k=(o,a,e)=>a in o?N(o,a,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[a]=e,_=(o,a)=>{for(var e in a||(a={}))R.call(a,e)&&k(o,e,a[e]);if(P)for(var e of P(a))j.call(a,e)&&k(o,e,a[e]);return o},w=(o,a)=>q(o,F(a));var v=(o,a,e)=>new Promise((p,l)=>{var s=n=>{try{c(e.next(n))}catch(d){l(d)}},g=n=>{try{c(e.throw(n))}catch(d){l(d)}},c=n=>n.done?p(n.value):Promise.resolve(n.value).then(s,g);c((e=e.apply(o,a)).next())});import{_ as A}from"./index.vue_vue_type_script_setup_true_lang-B9ljupwd.js";import{d as E,n as r,x as H,r as y,o as x,c as C,b as m,e as L,P as M,Q as O,h as B,f as Q,U,W,aA as $,_ as G}from"./index-CRmU-Qpi.js";import{b as J,r as K}from"./blindBox-BqHhL4EW.js";import{m as X}from"./room-3H8Bx0CI.js";import"./hooks-ItYVRz1P.js";const Y={key:0,class:"viewPage"},Z={class:"content-flex"},ee={class:"box"},te={style:{display:"inline-flex","justify-content":"flex-end",width:"100%"}},ae=E({__name:"statistics",props:["roomId"],setup(o){const a=r([{label:"盲盒礼包",prop:"gift_bag_id",type:"select",optionList:[]},{label:"礼物ID",prop:"gift_id",type:"input"},{label:"礼物名称",prop:"gift_name",type:"input"}]),e=o,p=r([]),l=r({gift_bag_id:"",gift_id:"",gift_name:""}),s=r({total:0,pageSize:10,currentPage:1,background:!0}),g=r({}),c=r([]),n=r([{label:"当前期数",prop:"blind_box_turntable_periods"},{label:"每期总次数",prop:"total_count"},{label:"每期总礼物价值(收入)",prop:"total_price"},{label:"每期总抽奖花费(支出)",prop:"total_cost"},{label:"每期统计(收入/支出)",prop:"profit_loss_ratio",tip:"%"},{label:"今日抽奖人数",prop:"today_count_user"},{label:"今日抽奖次数",prop:"today_total_count"},{label:"今日抽奖收入",prop:"today_total_price"}]),d=r([{label:"ID",prop:"id"},{label:"礼物ID",prop:"gift_id"},{label:"礼物名称",prop:"gift_name"},{label:"价格",prop:"gift_price"},{label:"多少次后参与抽奖",prop:"weight"},{label:"设定数量",prop:"quantity"},{label:"未开数量",prop:"remaining_number"},{label:"公屏播报",prop:"is_public_screen"},{label:"全服播报",prop:"is_public_server"},{label:"参与榜单显示",prop:"is_world_show"},{label:"本期开始时间",prop:"createtime"}]),I=()=>v(this,null,function*(){const{code:i,data:t}=yield J({activities_id:5});p.value=i?t.map(u=>({label:u.name,value:u.id})):[],i&&(a.value[0].optionList=p.value,l.value.gift_bag_id=t[0].id,W(()=>{b(l.value)}))}),b=i=>v(this,null,function*(){l.value=_({},i);const{data:t,code:u}=yield X(w(_({},i),{page:s.value.currentPage,page_limit:s.value.pageSize,room_id:e.roomId}));u&&(c.value=t.lists.map(f=>w(_(_({},f),t.total_data),{remaining_number:f.remaining_number,is_public_screen:t.is_public_screen===1?"显示":"隐藏",is_public_server:t.is_public_server===1?"显示":"隐藏",is_world_show:t.is_world_show===1?"显示":"隐藏"})),g.value=t.total_data,s.value.total=t.count,s.value.currentPage=t.page)}),S=i=>{s.value.pageSize=i,b(l.value)},D=i=>{s.value.currentPage=i,b(l.value)},T=()=>v(this,null,function*(){const{data:i,code:t}=yield K({gift_bag_id:l.value.gift_bag_id,room_id:e.roomId});t&&($("重置成功",{type:"success"}),b(l.value))});return H(()=>{I()}),(i,t)=>{const u=y("el-statistic"),f=y("el-button"),z=y("el-popconfirm"),V=y("pure-table");return p.value&&p.value.length?(x(),C("div",Y,[m(A,{class:"pb-2 pt-2",LabelList:a.value,formData:l.value,onHandleSearch:b},null,8,["LabelList","formData"]),L("div",Z,[(x(!0),C(M,null,O(n.value,(h,oe)=>(x(),C("div",ee,[m(u,{precision:2,"decimal-separator":".",value:g.value[h.prop]||0,suffix:h.tip||"",title:h.label},null,8,["value","suffix","title"]),t[0]||(t[0]=L("span",null,null,-1))]))),256))]),L("div",te,[m(z,{title:"是否重置当前转盘数量吗?",onConfirm:T},{reference:B(()=>[m(f,{type:"primary"},{default:B(()=>t[1]||(t[1]=[Q(" 重置数量 ")])),_:1})]),_:1})]),m(V,{class:"mt-5",ref:"tableRef","align-who