"use strict";(self["webpackChunkaida"]=self["webpackChunkaida"]||[]).push([[2884],{42884:function(e,a,t){t.r(a),t.d(a,{default:function(){return C}});var i=t(66252);const s={class:"recentNewUserChart admin_page"},r={class:"admin_table_search"},l={class:"admin_state"},n={class:"admin_state_item"},c=(0,i._)("span",null,"Select 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,p,h){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:"250px"},class:"range_picker",value:e.rangePickerValue,"onUpdate:value":a[0]||(a[0]=a=>e.rangePickerValue=a),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 p=t(2262),h=t(74961),v=t(47332),f=t(35183),g=t(72935),k=t(78537),b=t(84636),L=t(167),w=t(84602),y=t(6228),D=(0,i.aZ)({components:{},setup(){let e,a=(0,p.qj)({dataList:{}}),t=(0,p.qj)({rangePickerValue:[]}),s=()=>{l()},r=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")],l()},l=async()=>{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};h.V.axiosGet(h.V.httpUrls.conversionRate,{params:s}).then((e=>{if(e){let t=Object.entries(e),i=[];for(let[e,a]of t){let t;if("conversionRate"!=e){t="trialToOfficialCount"==e?"Trial To Official":"Trial User";let s={name:t,value:a};i.push(s)}}a.dataList=i,n(i)}}))},n=a=>{if(e)e.setOption({series:[{data:a}]});else{f.D([k.N,b.N,L.N,y.N,w.T]);var t,i=c.value;e=g.S1(i),t={tooltip:{trigger:"item",formatter:"{a} <br/>{b} : {c} ({d}%)"},legend:{top:"10%",left:"center"},series:[{name:"Rate",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},data:a}]},t&&e.setOption(t)}},c=(0,p.iH)();return(0,i.bv)((()=>{l()})),{...(0,p.BK)(a),...(0,p.BK)(t),lastGeTrialList:r,searchHistoryList:s,gettrialList:l,pageChartDom:c}},data(){return{}},methods:{}}),T=t(83744);const Y=(0,T.Z)(D,[["render",u]]);var C=Y}}]);