Files
machartaa_admin_dist/dist/assets/index-98310d72.js
T

2 lines
6.4 KiB
JavaScript
Raw Normal View History

2026-08-23 14:52:55 +03:30
import{d as S,i as l,x as V,o as A,c as D,e as o,w as p,b as r,f as L,K as j,l as k,E as _,_ as J}from"./index-a28be152.js";import{_ as W}from"./BasicModal.vue_vue_type_style_index_0_lang-c3017354.js";import{_ as X}from"./BasicMainCard-774c1aa2.js";import{_ as K,u as q}from"./useBaseTable-6d1e031d.js";import{_ as z}from"./button.vue_vue_type_style_index_0_lang-29638cb6.js";import{e as G,f as H,h as Q}from"./competition-5f8922f8.js";import{t as Y,a as Z}from"./useDataTime-4239bab9.js";import{I as C}from"./Icon-c8a211f1.js";import{_ as ee}from"./TextPreview.vue_vue_type_script_setup_true_lang-8e9148a1.js";import{a as te}from"./index-2849b35f.js";import"./index-dd708aca.js";import"./isSymbol-25ca88cb.js";import"./_plugin-vue_export-helper-f8ecc290.js";import"./vnode-4742fc96.js";import"./index-8cc4eae2.js";import"./DialogWrap-617bda84.js";import"./shallowequal-4c00a664.js";import"./omit-8084e33b.js";import"./pickAttrs-38902005.js";import"./index-3bdda65d.js";import"./styleChecker-8c6ff79a.js";import"./FormItemContext-e50ee5a3.js";import"./Grid-442881e7.js";import"./index-96443f0e.js";import"./index-4a3fe357.js";import"./index-5222fc6e.js";import"./useState-277534ff.js";import"./useRefs-e22a3bf7.js";import"./_flatRest-08328244.js";import"./isMobile-e2e89480.js";import"./index-51b737a4.js";import"./Col-86738adb.js";import"./isPlainObject-450bf3c7.js";import"./updateLocale-619fe8a7.js";import"./useMemo-832cfde0.js";import"./lodash-5d3e4f7d.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-1d4fd99b.js";import"./index-f317ca53.js";import"./SearchOutlined-4a5562a8.js";import"./index-61ef5439.js";import"./Badge-7dd6b925.js";import"./isNumeric-3f69e2aa.js";import"./index-dbebb139.js";import"./index-1e365e2e.js";import"./index-12d303fc.js";import"./css-aae66f86.js";import"./toArray-bdec6b87.js";import"./index-f3f71242.js";import"./textUtils-c37780ad.js";const oe=[{title:"ردیف",dataIndex:"id",key:"id",filterable:!1,width:70,align:"center",customRender:m=>m.record.index+1},{title:"نام مسابقه",dataIndex:"match_title",key:"match_title"},{title:"شرح مسابقه",dataIndex:"match_description",key:"match_description",slot:"match_description"},{title:"نام کاربر",dataIndex:"user_name",key:"user_name"},{title:"شماره همراه",dataIndex:"user_mobile",key:"user_mobile"},{title:"امتیاز کسب شده",dataIndex:"score",key:"score",align:"center",customRender:m=>m.record.score||0},{title:"زمان",dataIndex:"created_at",key:"created_at",customRender:m=>Y(m.record.created_at)}],ae={class:"flex justify-between items-center mb-4"},le=r("h2",null,"امتیازات و برندگان مسابقات",-1),ie={class:"flex gap-2"},re={class:"space-y-4"},ne=r("div",{class:"mb-1 text-sm text-gray-600"},"انتخاب مسابقه",-1),se={class:"space-y-4"},ce=r("div",{class:"mb-1 text-sm text-gray-600"},"انتخاب مسابقه",-1),rt=S({__name:"index",setup(m){const w=te,E=l(null),[B,de]=q(),f=l(!1),g=l(!1),n=l(void 0),s=l(void 0),d=l([]),h=l(!1),b=l(!1),$=l(!1),T=l({columns:oe,api:G,defaultPageLimit:20});async function y(){try{h.value=!0;const t=await H();d.value=(t||[]).map(e=>({label:e.title||`مسابقه ${e.id}`,value:e.id}))}catch(t){console.error("Error loading matchs:",t),_.error("خطا در بارگذاری لیست مسابقات")}finally{h.value=!1}}function R(){n.value=void 0,f.value=!0,d.value.length===0&&y()}function I(){f.value=!1,n.value=void 0}function F(){s.value=void 0,g.value=!0,d.value.length===0&&y()}function M(){g.value=!1,s.value=void 0}function N(){if(!s.value){_.warning("لطفاً مسابقه را انتخاب کنید");return}const t=d.value.find(v=>v.value===s.value),e=encodeURIComponent((t==null?void 0:t.label)||`مسابقه_${s.value}`),i=`/lottery?matchId=${s.value}&title=${e}`;window.open(i,"_blank","width=1200,height=800"),M()}async function P(){if(!n.value){_.warning("لطفاً مسابقه را انتخاب کنید");return}try{b.value=!0;const t=await Q(n.value);if(t.length===0){_.warning("برای این مسابقه برنده‌ای یافت نشد");return}c