"use strict";(self["webpackChunkaida"]=self["webpackChunkaida"]||[]).push([[5194],{35194:function(e,t,a){a.r(t),a.d(t,{default:function(){return w}});var i=a(66252);const r={class:"recentActiveChart admin_page"},n={class:"admin_table_search"},l={class:"admin_state"},s={class:"admin_state_item"},d=(0,i._)("span",null,"Start Time:",-1),o=(0,i._)("span",{class:"icon iconfont range_picker_icon icon-rili"},null,-1),c={class:"admin_search"},u={class:"admin_state_list"},g={class:"admin_table_content",ref:"historyTable"};function m(e,t,a,m,h,y){const _=(0,i.up)("a-range-picker"),p=(0,i.up)("a-table");return(0,i.wg)(),(0,i.iD)("div",r,[(0,i._)("div",n,[(0,i._)("div",l,[(0,i._)("div",s,[d,(0,i.Wm)(_,{style:{width:"280px"},class:"range_picker",value:e.rangePickerValue,"onUpdate:value":t[0]||(t[0]=t=>e.rangePickerValue=t),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",c,[(0,i._)("div",{class:"admin_search_item",onClick:t[1]||(t[1]=(...t)=>e.searchHistoryList&&e.searchHistoryList(...t))},"Search")]),(0,i._)("div",u,[(0,i._)("div",{class:"admin_state_list_item",onClick:t[2]||(t[2]=t=>e.lastGeTrialList("year"))},"Last year"),(0,i._)("div",{class:"admin_state_list_item",onClick:t[3]||(t[3]=t=>e.lastGeTrialList("month"))},"Last month"),(0,i._)("div",{class:"admin_state_list_item",onClick:t[4]||(t[4]=t=>e.lastGeTrialList("week"))},"Last week")])]),(0,i._)("div",g,[(0,i.Wm)(p,{onResizeColumn:e.handleResizeColumn,loading:e.tableLoading,columns:e.columns,"data-source":e.dataList,scroll:{y:e.historyTableHeight},showSorterTooltip:!1,onChange:e.changePage,pagination:{showSizeChanger:!0,current:e.currentPage,pageSize:e.pageSize,total:e.total,showQuickJumper:!0,bordered:!1}},null,8,["onResizeColumn","loading","columns","data-source","scroll","onChange","pagination"])],512)])}var h=a(2262),y=a(47332),_=a(74961),p=(0,i.aZ)({components:{},setup(){let e=(0,h.qj)({dataList:[],tableLoading:!1}),t=(0,h.qj)({rangePickerValue:[],currentPage:1,pageSize:10,total:0,order:"",orderBy:""}),a=(0,h.iH)({});const r=(0,i.Fl)((()=>[{title:"User Id",align:"center",dataIndex:"id",key:"id",width:100,fixed:"left",sorter:!0},{title:"Email",align:"center",dataIndex:"userEmail",key:"userEmail",width:200,ellipsis:!0},{title:"User Name",align:"center",dataIndex:"userName",key:"userName",width:150,ellipsis:!0},{title:"language",align:"center",dataIndex:"language",key:"language",width:100,ellipsis:!0},{title:"Valid Start Time",align:"center",dataIndex:"validStartTime",key:"validstartTime",width:200,ellipsis:!0,customRender:e=>{let t="";return e.text&&(t=(0,y.mr)(e.text/1e3,"YYYY-MM-DD hh:mm:ss")),t}},{title:"Valid End Time",align:"center",dataIndex:"validEndTime",key:"validendTime",width:200,ellipsis:!0,customRender:e=>{let t="";return e.text&&(t=(0,y.mr)(e.text/1e3,"YYYY-MM-DD hh:mm:ss")),t}},{title:"Country",align:"center",dataIndex:"country",key:"country",width:100},{title:"Create Date",align:"center",dataIndex:"createDate",key:"createDate",width:200,sorter:!0},{title:"Is Beginner",align:"center",dataIndex:"isBeginner",key:"isBeginner",width:80,ellipsis:!0,customRender:e=>{let t;return t=1==e.value?"Yes":"No",t}},{title:"Machine Room Ip",align:"center",dataIndex:"browserIdentifiers",key:"browserIdentifiers",width:200},{title:"Credits",align:"center",dataIndex:"credits",key:"credits",width:100,sorter:!0},{title:"User Type",align:"center",dataIndex:"systemUser",key:"systemUser",width:100,customRender:e=>{let t;return 0==e.value?t="visitor":1==e.value?t="yearly":2==e.value?t="monthly":3==e.value?t="trial":4==e.value&&(t="userInEvent"),t}}]));let n=(e,a,i)=>{t.currentPage=e.current,t.pageSize=e.pageSize,i.order&&("id"==i.columnKey?t.orderBy="id":"createDate"==i.columnKey?t.orderBy="time":"credits"==i.columnKey&&(t.orderBy="credits")),t.order="descend"==i.order?"Descending":"Ascending",s()},l=()=>{t.currentPage=1,s()},s=()=>{e.tableLoading=!0;let a=t.rangePickerValue?.[0]?t.rangePickerValue[0]+" 00:00:00":"",i=t.rangePickerValue?.[1]?t.rangePickerValue[1]+" 00:00:00":"",r={endTime:i,startTime:a,size:t.pageSize,page:t.currentPage,order:t.order,orderBy:t.orderBy};_.V.axiosPost(_.V.httpUrls.recentActiveUser,r).then((a=>{a&&(e.dataList=a.records,console.log(a),t.total=a.total,e.tableLoading=!1)}))},d=e=>{let a,i=new Date,r=Math.floor(i.getTime()/1e3);"year"==e?a=r-31104e3:"month"==e?a=r-2592e3:"week"==e&&(a=r-604800),t.rangePickerValue=[(0,y.mr)(a,"YYYY-MM-DD"),(0,y.mr)(r,"YYYY-MM-DD")],s()};return(0,i.bv)((()=>{d("month")})),{...(0,h.BK)(e),...(0,h.BK)(t),columns:r,renameData:a,changePage:n,searchHistoryList:l,lastGeTrialList:d,gettrialList:s}},data(){return{historyTableHeight:0,handleResizeColumn:(e,t)=>{t.width=e}}},mounted(){let e=this.$refs.historyTable;this.historyTableHeight=e.clientHeight-200},methods:{}}),k=a(83744);const v=(0,k.Z)(p,[["render",m]]);var w=v}}]);