"use strict";(self["webpackChunkaida"]=self["webpackChunkaida"]||[]).push([[9316],{29316:function(e,a,t){t.r(a),t.d(a,{default:function(){return V}});var l=t(66252);const s={class:"recentNewUserChart admin_page"},i={class:"admin_table_search"},r={class:"admin_state"},n={class:"admin_state_item"},o=(0,l._)("span",null,"Start Time:",-1),c=(0,l._)("span",{class:"icon iconfont range_picker_icon icon-rili"},null,-1),u={class:"admin_state_item"},d=(0,l._)("span",null,"Type:",-1),p={class:"admin_search"},m={class:"admin_state_list"},_={class:"admin_table_content",ref:"pageChartDom"};function h(e,a,t,h,v,g){const y=(0,l.up)("a-range-picker"),k=(0,l.up)("a-select");return(0,l.wg)(),(0,l.iD)("div",s,[(0,l._)("div",i,[(0,l._)("div",r,[(0,l._)("div",n,[o,(0,l.Wm)(y,{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,l.w5)((()=>[c])),_:1},8,["value","placeholder"])]),(0,l._)("div",u,[d,(0,l.Wm)(k,{value:e.userType,"onUpdate:value":a[1]||(a[1]=a=>e.userType=a),size:"large",style:{width:"280px"},optionFilterProp:"label",options:e.state,placeholder:"Please select",allowClear:"","show-search":""},null,8,["value","options"])])]),(0,l._)("div",p,[(0,l._)("div",{class:"admin_search_item",onClick:a[2]||(a[2]=(...a)=>e.searchHistoryList&&e.searchHistoryList(...a))},"Search")]),(0,l._)("div",m,[(0,l._)("div",{class:"admin_state_list_item",onClick:a[3]||(a[3]=a=>e.lastGeTrialList("year"))},"Nearly a year"),(0,l._)("div",{class:"admin_state_list_item",onClick:a[4]||(a[4]=a=>e.lastGeTrialList("month"))},"Last month"),(0,l._)("div",{class:"admin_state_list_item",onClick:a[5]||(a[5]=a=>e.lastGeTrialList("week"))},"Last week")])]),(0,l._)("div",_,null,512)])}var v=t(2262),g=t(74961),y=t(47332),k=t(35183),w=t(72935),b=t(78537),f=t(84636),L=t(167),T=t(84602),D=t(6228),C=(0,l.aZ)({components:{},setup(){let e,a=(0,v.qj)({dataList:{}}),t=(0,v.qj)({rangePickerValue:[],userType:""}),s=(0,v.iH)([{label:"all",value:""},{label:"visitor",value:"0"},{label:"yearly",value:"1"},{label:"monthly",value:"2"},{label:"trial",value:"3"}]),i=()=>{r()},r=async()=>{a.tableLoading=!0;let e=t.rangePickerValue?.[0]?t.rangePickerValue[0]+" 00:00:00":"",l=t.rangePickerValue?.[1]?t.rangePickerValue[1]+" 23:59:59":"",s={endTime:l,startTime:e,userType:t.userType};g.V.axiosGet(g.V.httpUrls.recentNewUserChart,{params:s}).then((e=>{if(e){let t=[];e.names.forEach(((a,l)=>{let s={name:a,value:e.values[l]};t.push(s)})),a.dataList=t,n(t)}}))},n=a=>{if(e)e.setOption({series:[{data:a}]});else{k.D([b.N,f.N,L.N,D.N,T.T]);var t,l=c.value;e=w.S1(l),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:a}]},t&&e.setOption(t)}},o=e=>{let a,l=new Date,s=Math.floor(l.getTime()/1e3);"year"==e?a=s-31104e3:"month"==e?a=s-2592e3:"week"==e&&(a=s-604800),t.rangePickerValue=[(0,y.mr)(a,"YYYY-MM-DD"),(0,y.mr)(s,"YYYY-MM-DD")],r()},c=(0,v.iH)();return(0,l.bv)((()=>{o("month")})),{...(0,v.BK)(a),...(0,v.BK)(t),state:s,searchHistoryList:i,gettrialList:r,pageChartDom:c,lastGeTrialList:o}},data(){return{}},methods:{}}),P=t(83744);const Y=(0,P.Z)(C,[["render",h]]);var V=Y}}]);