"use strict";(self["webpackChunkh5_u2"]=self["webpackChunkh5_u2"]||[]).push([[473],{8859:function(e,t,a){var l=a(4311),r=a(5975);const n={baseURL:location.origin,timeout:5e3},u=l.Z.create(n);u.interceptors.request.use((function(e){return"get"===e.method&&"/api/login"!==e.url&&(localStorage.getItem("os-token")?(e.params||(e.params={}),Object.assign(e.params,{token:localStorage.getItem("os-token")})):((0,r.z8)({message:"请先登录",type:"warning"}),localStorage.clear())),e}),(function(e){return Promise.reject(e)})),u.interceptors.response.use((function(e){return 1===e.data.ret&&(0,r.z8)({message:"请先登录",type:"warning"}),e.data}),(function(e){return Promise.reject(e)})),t["Z"]=u},2648:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{Gh:function(){return transformJSON},WU:function(){return format},XF:function(){return getDiffDate},ax:function(){return transformBeginTime},c$:function(){return getArray},w6:function(){return range}});var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(7658),core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__);function getArray(e=0,t=new Date,a=new Date){t.setDate(t.getDate()-e),a.setDate(a.getDate()+e);var l=[],r=[],n=["日","一","二","三","四","五","六"],u=0;while(a.getTime()-t.getTime()>=0){u++;var o=1==(t.getMonth()+1).toString().length?"0"+(t.getMonth()+1).toString():t.getMonth()+1,i=1==t.getDate().toString().length?"0"+t.getDate():t.getDate(),s=n[t.getDay()];r.push(o+"月"+i+"日(周"+s+")");var c={};c.week=1==u?"今天":"周"+s,c.date=(new Date).getFullYear()+"-"+o+"-"+i,c.date2=o+"-"+i,l.push(c),t.setDate(t.getDate()+1)}return l}function format(e){return e.map((e=>({title:e.date.slice(5),dataKey:e.date,key:e.date,width:60})))}function getDiffDate(e,t){var a=new Array,l=0;while(e<=t){a[l]=e;var r=new Date(e).getTime(),n=r+864e5,u=new Date(n).getFullYear()+"-",o=new Date(n).getMonth()+1<10?"0"+(new Date(n).getMonth()+1)+"-":new Date(n).getMonth()+1+"-",i=new Date(n).getDate()<10?"0"+new Date(n).getDate():new Date(n).getDate();e=u+o+i,l++}return a[0]=a[0].slice(0,10),a}function randomColorAndNotRed(){var e=Math.floor(200*Math.random()),t=Math.floor(206*Math.random()+50),a=Math.floor(206*Math.random()+50);return`rgb(${e},${t},${a})`}function transformBeginTime(e){return getFormatDateTime(e)}function getFormatDateTime(e){var t=new Date;t.setDate(t.getDate()-e);var a=t.getFullYear(),l=t.getMonth()+1,r=t.getDate(),n=t.getHours(),u=t.getMinutes(),o=t.getSeconds();return[a,"-",l<10?`0${l}`:l,"-",r<10?`0${r}`:r," ",n<10?`0${n}`:n,":",u<10?`0${u}`:u,":",o<10?`0${o}`:o].join("")}function transformJSON(e){return new Function("return "+e)()}function transformArray(str){return eval("("+str+")")}function range(e){let[t,a]=e.split("-");t=parseInt(t),a=parseInt(a);let l=a-t+1,r=t-1;return Array.apply(null,{length:l}).map(((e,t)=>(r++,r)))}},4527:function(e,t,a){a.r(t),a.d(t,{default:function(){return p}});a(7658);var l=a(3396),r=a(4870),n=a(7139),u=a(2648),o=a(1977),i=a(5975),s=a(8859);const c={class:"activityTable"};var m={__name:"activityTable",setup(e){const t=(0,r.iH)([]);let a=(0,r.iH)(7);const m=(0,r.iH)([]);let v=(0,r.iH)((0,u.ax)(a.value));const d=(0,r.iH)(null);async function p(e){try{let{data:e=[]}=await s.Z.get("/api/select_activity",{params:{beginTime:v.value}}),t=[];e=e.filter((e=>{const t=Math.abs(Math.floor(((new Date).getTime()-new Date(e.startTime).getTime())/864e5)),l=Math.abs(Math.floor((new Date(e.endTime).getTime()-(new Date).getTime())/864e5));if(t<=a.value||l<=a.value)return!0})),e.forEach(((e,a)=>{t[a]=(0,u.XF)(e.startTime,e.endTime)})),e.forEach(((e,a)=>{g.value.forEach((l=>{t[a].includes(l.key)&&(e[l.key]=`${e.activityName}(${e.activityId})(${e.activityType})`)}))})),await(0,l.Y3)(),k=[],m.value=e}catch(t){(0,i.z8)({message:t,type:"warning"})}}(0,l.bv)((async()=>{await p(),_.value="10",t.value=m.value})),(0,l.YP)(a,(async e=>{v.value=(0,u.ax)(e),await p(),setTimeout((()=>{""==_.value&&(t.value=m.value),"70-80"==_.value?t.value=m.value.filter((e=>e.realmId.toString().startsWith("70")||e.realmId.toString().startsWith("80"))):t.value=m.value.filter((e=>e.realmId.toString().startsWith(_.value))),w.value.includes("-1")||(t.value=t.value.filter((e=>w.value.includes(e.activityType.toString())||w.value.includes("0-1-2")&&["0","1","2"].includes(e.activityType.toString())))),d.value.scrollTo({scrollLeft:0,scrollTop:0})}),0)}));const g=(0,l.Fl)((()=>[...I.value.slice(0,1),...I.value.slice(61-a.value,61+a.value)])),f=[{title:"服务器",key:"realmName",dataKey:"realmName",width:100},...(0,u.WU)((0,u.c$)(60))],_=(0,r.iH)("");(0,l.YP)(_,(e=>{t.value=""==e?m.value:"70-80"==e?m.value.filter((e=>e.realmId.toString().startsWith("70")||e.realmId.toString().startsWith("80"))):m.value.filter((t=>t.realmId.toString().startsWith(e))),w.value.includes("-1")||(t.value=t.value.filter((e=>w.value.includes(e.activityType.toString())||w.value.includes("0-1-2")&&["0","1","2"].includes(e.activityType.toString())))),k=[],d.value.scrollTo({scrollLeft:0,scrollTop:0})}));const w=(0,r.iH)(["-1"]);(0,l.YP)(w,(e=>{""==_.value?t.value=m.value:"70-80"==_.value?t.value=m.value.filter((e=>e.realmId.toString().startsWith("70")||e.realmId.toString().startsWith("80"))):t.value=m.value.filter((e=>e.realmId.toString().startsWith(_.value))),e.includes("-1")||(t.value=t.value.filter((t=>e.includes(t.activityType.toString())||e.includes("0-1-2")&&["0","1","2"].includes(t.activityType.toString())))),k=[],d.value.scrollTo({scrollLeft:0,scrollTop:0})}));const h=e=>{e.some((e=>"-1"!==e))&&"-1"!=e[e.length-1]?w.value=w.value.filter((e=>"-1"!==e)):w.value=["-1"]},y=(0,r.iH)(""),b=()=>{if(y.value){const e=y.value.split("#");let a=[];e.forEach((e=>{a.push((0,u.w6)(e))})),t.value=m.value.filter((e=>a.some((t=>t.includes(e.realmId)))))}else _.value=""},D=({rowData:e,columns:t})=>{const a=Object.keys(e);let l=1;for(let n=1;nr,f[l].align="center",{colSpan:r,colSpanIndex:l}},W=0;f[W].rowSpan=({rowData:e,rowIndex:a})=>{let l=1;const r="realmName";if(a>0&&e[r]===t.value[a-1][r])return 0;for(let n=a+1;n{t.value=t.value.reverse(),T.value=e};let k=[];const I=(0,r.iH)(f),x=({rowData:e,rowIndex:a,cells:r,columns:n})=>{const{colSpanIndex:u,colSpan:o}=D({rowData:e,rowIndex:a,cells:r,columns:n}),i=n[W].rowSpan({rowData:e,rowIndex:a});let s=!1;for(let l=a;l=1&&r[u]&&r[u].props){let e=Number.parseInt(r[u].props.style.width);for(let a=1;a=1){const n=r[W],u={...n.props.style,backgroundColor:"var(--el-color-primary-light-8)",height:30*i+"px",alignSelf:"flex-start",border:"1px solid var(--el-text-color-placeholder)",zIndex:1};for(let l=1;l{const o=(0,l.up)("el-input"),i=(0,l.up)("el-button"),s=(0,l.up)("el-tooltip"),m=(0,l.up)("el-option"),v=(0,l.up)("el-select"),p=(0,l.up)("el-col"),f=(0,l.up)("el-row"),D=(0,l.up)("el-table-v2");return(0,l.wg)(),(0,l.iD)("div",c,[(0,l.Wm)(f,{style:{"margin-bottom":"20px"}},{default:(0,l.w5)((()=>[(0,l.Wm)(p,{span:8},{default:(0,l.w5)((()=>[(0,l.Wm)(v,{modelValue:_.value,"onUpdate:modelValue":u[1]||(u[1]=e=>_.value=e),style:{width:"400px"}},{default:(0,l.w5)((()=>[(0,l.Wm)(m,{disabled:"",value:"#"},{default:(0,l.w5)((()=>[(0,l.Wm)(o,{placeholder:"请输入自定义服务器",modelValue:y.value,"onUpdate:modelValue":u[0]||(u[0]=e=>y.value=e),style:{width:"270px","margin-right":"10px"}},null,8,["modelValue"]),(0,l.Wm)(i,{type:"primary",onClick:b},{default:(0,l.w5)((()=>[(0,l.Uk)("搜索")])),_:1}),(0,l.Wm)(s,{class:"box-item",effect:"dark",content:"请输入自定义服务器如:301001-301020,多条用#号分割",placement:"right"},{default:(0,l.w5)((()=>[(0,l.Uk)(" ❔ ")])),_:1})])),_:1}),(0,l.Wm)(m,{value:"",label:"选择全部"}),(0,l.Wm)(m,{value:"10",label:"美服"},{default:(0,l.w5)((()=>[(0,l.Uk)("美服")])),_:1}),(0,l.Wm)(m,{value:"70-80",label:"亚服"},{default:(0,l.w5)((()=>[(0,l.Uk)("亚服")])),_:1}),(0,l.Wm)(m,{value:"20",label:"欧服"},{default:(0,l.w5)((()=>[(0,l.Uk)("欧服")])),_:1}),(0,l.Wm)(m,{value:"30",label:"东南亚服"},{default:(0,l.w5)((()=>[(0,l.Uk)("东南亚服")])),_:1})])),_:1},8,["modelValue"])])),_:1}),(0,l.Wm)(p,{span:8},{default:(0,l.w5)((()=>[(0,l.Wm)(v,{modelValue:(0,r.SU)(a),"onUpdate:modelValue":u[2]||(u[2]=e=>(0,r.dq)(a)?a.value=e:a=e),style:{width:"400px"}},{default:(0,l.w5)((()=>[(0,l.Wm)(m,{value:7,label:"最近一周"}),(0,l.Wm)(m,{value:15,label:"最近十五天"}),(0,l.Wm)(m,{value:30,label:"最近一个月"}),(0,l.Wm)(m,{value:60,label:"最近两个月"})])),_:1},8,["modelValue"])])),_:1}),(0,l.Wm)(p,{span:8},{default:(0,l.w5)((()=>[(0,l.Wm)(v,{modelValue:w.value,"onUpdate:modelValue":u[3]||(u[3]=e=>w.value=e),style:{width:"400px"},multiple:"","collapse-tags":"",onChange:h},{default:(0,l.w5)((()=>[(0,l.Wm)(m,{value:"-1",label:"选择全部"}),(0,l.Wm)(m,{value:"0-1-2",label:"累充累销开服积分活动"}),(0,l.Wm)(m,{value:"1",label:"开服积分"}),(0,l.Wm)(m,{value:"6",label:"UP池"}),(0,l.Wm)(m,{value:"7",label:"心愿池"}),(0,l.Wm)(m,{value:"12",label:"精英挑战赛"}),(0,l.Wm)(m,{value:"10000",label:"宾果翻牌"}),(0,l.Wm)(m,{value:"120000",label:"燃油提纯"}),(0,l.Wm)(m,{value:"20000",label:"单服双倍币"}),(0,l.Wm)(m,{value:"130000",label:"全服双倍币"}),(0,l.Wm)(m,{value:"30000",label:"星球竞技场胜场"}),(0,l.Wm)(m,{value:"40000",label:"7日连充"}),(0,l.Wm)(m,{value:"140000",label:"7日连充2"}),(0,l.Wm)(m,{value:"50000",label:"英雄成长"}),(0,l.Wm)(m,{value:"80000",label:"新翻牌"}),(0,l.Wm)(m,{value:"100000",label:"量子拟态机"}),(0,l.Wm)(m,{value:"110000",label:"战货系统"})])),_:1},8,["modelValue"])])),_:1})])),_:1}),(0,l.Wm)(f,null,{default:(0,l.w5)((()=>[(0,l.Wm)(D,{ref_key:"tableV2",ref:d,columns:(0,r.SU)(g),data:t.value,"sort-by":T.value,width:1600,height:700,"row-height":30,cache:30,fixed:"","scrollbar-always-on":"",onColumnSort:S},{row:(0,l.w5)((e=>[(0,l.Wm)(x,(0,n.vs)((0,l.F4)(e)),null,16)])),_:1},8,["columns","data","sort-by"])])),_:1})])}}},v=a(89);const d=(0,v.Z)(m,[["__scopeId","data-v-204ddb0a"]]);var p=d}}]); //# sourceMappingURL=activityTable.5355bdfd.js.map