"use strict";(self["webpackChunkaida"]=self["webpackChunkaida"]||[]).push([[1228],{31228:function(e,a,t){t.r(a),t.d(a,{default:function(){return P}});var i=t(66252);const s={class:"recentActiveChart admin_page"},r={class:"admin_table_search"},l={class:"admin_state"},n={class:"admin_state_item"},c=(0,i._)("span",null,"Start Time:",-1),o=(0,i._)("span",{class:"icon iconfont range_picker_icon icon-rili"},null,-1),d={class:"admin_search"},m={class:"admin_state_list"},_={class:"admin_table_content",ref:"pageChartDom"};function u(e,a,t,u,h,p){const v=(0,i.up)("a-range-picker");return(0,i.wg)(),(0,i.iD)("div",s,[(0,i._)("div",r,[(0,i._)("div",l,[(0,i._)("div",n,[c,(0,i.Wm)(v,{style:{width:"280px"},class:"range_picker",value:e.rangePickerValue,"onUpdate:value":a[0]||(a[0]=a=>e.rangePickerValue=a),allowClear:!1,placeholder:[e.$t("HistoryPage.StartDate"),e.$t("HistoryPage.EndDate")],valueFormat:"YYYY-MM-DD"},{suffixIcon:(0,i.w5)((()=>[o])),_:1},8,["value","placeholder"])])]),(0,i._)("div",d,[(0,i._)("div",{class:"admin_search_item",onClick:a[1]||(a[1]=(...a)=>e.searchHistoryList&&e.searchHistoryList(...a))},"Search")]),(0,i._)("div",m,[(0,i._)("div",{class:"admin_state_list_item",onClick:a[2]||(a[2]=a=>e.lastGeTrialList("year"))},"Nearly a year"),(0,i._)("div",{class:"admin_state_list_item",onClick:a[3]||(a[3]=a=>e.lastGeTrialList("month"))},"Last month"),(0,i._)("div",{class:"admin_state_list_item",onClick:a[4]||(a[4]=a=>e.lastGeTrialList("week"))},"Last week")])]),(0,i._)("div",_,null,512)])}var h=t(2262),p=t(74961),v=t(47332),g=t(35183),k=t(72935),f=t(78537),L=t(84636),w=t(167),y=t(84602),D=t(6228),b=(0,i.aZ)({components:{},setup(){let e,a=(0,h.qj)({dataList:{}}),t=(0,h.qj)({rangePickerValue:[]}),s=()=>{r()},r=async()=>{a.tableLoading=!0;let e=t.rangePickerValue?.[0]?t.rangePickerValue[0]+" 00:00:00":"",i=t.rangePickerValue?.[1]?t.rangePickerValue[1]+" 23:59:59":"",s={endTime:i,startTime:e};p.V.axiosGet(p.V.httpUrls.recentActiveUserChart,{params:s}).then((e=>{if(e){let t=[];e.names.forEach(((a,i)=>{let s={name:a,value:e.values[i]};t.push(s)})),a.dataList=t,l(t)}}))},l=a=>{if(e)e.setOption({series:[{data:a}]});else{g.D([f.N,L.N,w.N,D.N,y.T]);var t,i=c.value;e=k.S1(i),t={tooltip:{trigger:"item"},legend:{top:"10%",left:"center"},series:[{type:"pie",radius:["30%","70%"],avoidLabelOverlap:!1,itemStyle:{borderRadius:10},label:{show:!1,position:"center"},emphasis:{label:{show:!0,fontSize:30,fontWeight:"bold"}},labelLine:{show:!1},stillShowZeroSum:!0,data:a}]},t&&e.setOption(t)}},n=e=>{let a,i=new Date,s=Math.floor(i.getTime()/1e3);"year"==e?a=s-31104e3:"month"==e?a=s-2592e3:"week"==e&&(a=s-604800),t.rangePickerValue=[(0,v.mr)(a,"YYYY-MM-DD"),(0,v.mr)(s,"YYYY-MM-DD")],r()},c=(0,h.iH)();return(0,i.bv)((()=>{n("month")})),{...(0,h.BK)(a),...(0,h.BK)(t),searchHistoryList:s,gettrialList:r,pageChartDom:c,lastGeTrialList:n}},data(){return{}},methods:{}}),Y=t(83744);const C=(0,Y.Z)(b,[["render",u]]);var P=C}}]);