"use strict";(self["webpackChunkaida"]=self["webpackChunkaida"]||[]).push([[907],{30907:function(e,a,t){t.r(a),t.d(a,{default:function(){return T}});var i=t(66252);const s={class:"recentActiveChart admin_page"},l={class:"admin_table_search"},r={class:"admin_state"},n={class:"admin_state_item"},o=(0,i._)("span",null,"Start Time:",-1),c=(0,i._)("span",{class:"icon iconfont range_picker_icon icon-rili"},null,-1),d={class:"admin_state_item"},u=(0,i._)("span",null,"User:",-1),m={class:"admin_search"},p={class:"admin_state_list"},_={class:"admin_table_content",ref:"pageChartDom"};function h(e,a,t,h,v,g){const L=(0,i.up)("a-range-picker"),f=(0,i.up)("a-select");return(0,i.wg)(),(0,i.iD)("div",s,[(0,i._)("div",l,[(0,i._)("div",r,[(0,i._)("div",n,[o,(0,i.Wm)(L,{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)((()=>[c])),_:1},8,["value","placeholder"])]),(0,i._)("div",d,[u,(0,i.Wm)(f,{value:e.userIdList,"onUpdate:value":a[1]||(a[1]=a=>e.userIdList=a),mode:"multiple",style:{width:"280px"},"filter-option":e.filterOption,placeholder:"Select Item...","max-tag-count":"responsive",options:e.dataList},null,8,["value","filter-option","options"])])]),(0,i._)("div",m,[(0,i._)("div",{class:"admin_search_item",onClick:a[2]||(a[2]=(...a)=>e.searchHistoryList&&e.searchHistoryList(...a))},"Search")]),(0,i._)("div",p,[(0,i._)("div",{class:"admin_state_list_item",onClick:a[3]||(a[3]=a=>e.lastGeTrialList("year"))},"Nearly a year"),(0,i._)("div",{class:"admin_state_list_item",onClick:a[4]||(a[4]=a=>e.lastGeTrialList("month"))},"Last month"),(0,i._)("div",{class:"admin_state_list_item",onClick:a[5]||(a[5]=a=>e.lastGeTrialList("week"))},"Last week")])]),(0,i._)("div",_,null,512)])}var v=t(2262),g=t(74961),L=t(47332),f=t(35183),k=t(72935),w=t(78537),y=t(84636),b=t(167),D=t(84602),C=t(33907),Y=t(6228),P=(0,i.aZ)({components:{},setup(){const e=(0,C.oR)();let a,t=(0,v.qj)({dataList:(0,i.Fl)((()=>e.state.adminPage.allUserList))}),s=(0,v.qj)({rangePickerValue:[],userIdList:[]}),l=()=>{r()},r=async()=>{t.tableLoading=!0;let e=s.rangePickerValue?.[0]?s.rangePickerValue[0]+" 00:00:00":"",a=s.rangePickerValue?.[1]?s.rangePickerValue[1]+" 23:59:59":"",i={endTime:a,startTime:e,userIdList:s.userIdList.join(",")};g.V.axiosGet(g.V.httpUrls.getActiveUserFunc,{params:i}).then((e=>{if(e){let a=[];e.names.forEach(((t,i)=>{let s={name:t,value:e.values[i]};a.push(s)})),n(a)}}))},n=e=>{if(a)a.setOption({series:[{data:e}]});else{f.D([w.N,y.N,b.N,Y.N,D.T]);var t,i=c.value;a=k.S1(i),t={tooltip:{trigger:"item"},legend:{top:"5%",left:"center"},series:[{type:"pie",radius:["40%","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:e}]},t&&a.setOption(t)}},o=e=>{let a,t=new Date,i=Math.floor(t.getTime()/1e3);"year"==e?a=i-31104e3:"month"==e?a=i-2592e3:"week"==e&&(a=i-604800),s.rangePickerValue=[(0,L.mr)(a,"YYYY-MM-DD"),(0,L.mr)(i,"YYYY-MM-DD")],r()},c=(0,v.iH)(),d=(e,a)=>a.label.toLowerCase().indexOf(e.toLowerCase())>=0;return(0,i.bv)((()=>{o("month")})),{...(0,v.BK)(t),...(0,v.BK)(s),searchHistoryList:l,gettrialList:r,pageChartDom:c,lastGeTrialList:o,filterOption:d}},data(){return{}},methods:{}}),V=t(83744);const S=(0,V.Z)(P,[["render",h]]);var T=S}}]);