"use strict";(self["webpackChunkaida"]=self["webpackChunkaida"]||[]).push([[4359],{4359:function(e,t,a){a.r(t),a.d(t,{default:function(){return f}});var i=a(66252),n=a(49963);const s=e=>((0,i.dD)("data-v-1e081afa"),e=e(),(0,i.Cn)(),e),l={class:"test_cli admin_page"},r={class:"admin_table_search"},c={class:"admin_state"},o={class:"admin_state_item"},d=s((()=>(0,i._)("span",null,"Start Date:",-1))),u=s((()=>(0,i._)("span",{class:"icon iconfont range_picker_icon icon-rili"},null,-1))),h={class:"admin_state_item"},g=s((()=>(0,i._)("span",null,"Start Time:",-1))),m={class:"admin_state_item"},p=s((()=>(0,i._)("span",null,"Generate Event:",-1))),_={class:"admin_state_item"},v=s((()=>(0,i._)("span",null,"Email:",-1))),y={class:"admin_search"},k={class:"admin_table_content",ref:"historyTable"};function w(e,t,a,s,w,C){const x=(0,i.up)("a-range-picker"),P=(0,i.up)("a-time-range-picker"),T=(0,i.up)("a-select"),H=(0,i.up)("a-table");return(0,i.wg)(),(0,i.iD)("div",l,[(0,i._)("div",r,[(0,i._)("div",c,[(0,i._)("div",o,[d,(0,i.Wm)(x,{style:{width:"250px"},class:"range_picker",value:e.rangePickerValue,"onUpdate:value":t[0]||(t[0]=t=>e.rangePickerValue=t),placeholder:[e.$t("HistoryPage.StartDate"),e.$t("HistoryPage.EndDate")],valueFormat:"YYYY-MM-DD"},{suffixIcon:(0,i.w5)((()=>[u])),_:1},8,["value","placeholder"])]),(0,i._)("div",h,[g,(0,i.Wm)(P,{style:{width:"250px"},class:"range_picker",valueFormat:"HH:mm:ss",value:e.rangeTimeValue,"onUpdate:value":t[1]||(t[1]=t=>e.rangeTimeValue=t)},null,8,["value"])]),(0,i._)("div",m,[p,(0,i.Wm)(T,{value:e.changeEvent,"onUpdate:value":t[2]||(t[2]=t=>e.changeEvent=t),"show-search":"",allowClear:"",style:{width:"250px"},placeholder:"Please select",options:e.allGenerateType,onKeydown:(0,n.D2)(e.gettrialList,["enter"])},null,8,["value","options","onKeydown"])]),(0,i._)("div",_,[v,(0,i.wy)((0,i._)("input",{"onUpdate:modelValue":t[3]||(t[3]=t=>e.email=t),placeholder:"Please enter email",onKeydown:t[4]||(t[4]=(0,n.D2)(((...t)=>e.gettrialList&&e.gettrialList(...t)),["enter"])),type:"text",style:{width:"250px"}},null,544),[[n.nr,e.email]])])]),(0,i._)("div",y,[(0,i._)("div",{class:"admin_search_item",onClick:t[5]||(t[5]=(...t)=>e.searchHistoryList&&e.searchHistoryList(...t))},"Search")])]),(0,i._)("div",k,[(0,i.Wm)(H,{onResizeColumn:e.handleResizeColumn,columns:e.columns,"data-source":e.dataList,scroll:{y:e.historyTableHeight},onChange:e.changePage,pagination:{showSizeChanger:!0,current:e.currentPage,pageSize:e.pageSize,total:e.total,showQuickJumper:!0,bordered:!1}},null,8,["onResizeColumn","columns","data-source","scroll","onChange","pagination"])],512)])}var C=a(2262),x=a(33907),P=a(74961),T=(0,i.aZ)({components:{},setup(){const e=(0,x.oR)();let t=(0,C.iH)([]),a=(0,C.iH)([]),n=(0,C.iH)({});const s=(0,i.Fl)((()=>e.state.adminPage.allGenerateType)),l=(0,i.Fl)((()=>[{title:"Email",align:"center",dataIndex:"userEmail",key:"userEmail",width:200,fixed:"left"},{title:"User Id",align:"center",ellipsis:!0,dataIndex:"id",key:"id",width:100},{title:"Current Credits",align:"center",ellipsis:!0,dataIndex:"currentCredits",key:"currentCredits",width:150},{title:"Generate Event",align:"center",ellipsis:!0,dataIndex:"generateFunction",key:"generateFunction",width:150,customRender:e=>e.text?e.text:"ALL"},{title:"Usage Count",align:"center",ellipsis:!0,dataIndex:"usageCount",key:"usageCount",width:150,customRender:e=>e.text?e.text:"-"},{title:"Cconsumed Credits",align:"center",ellipsis:!0,dataIndex:"consumedCredits",key:"consumedCredits",width:150,customRender:e=>e.text?e.text:"-"}]));let r=(0,C.iH)(""),c=(0,C.iH)([]),o=(0,C.iH)(0);return{rangePickerValue:t,rangeTimeValue:a,columns:l,dataList:c,email:r,renameData:n,status:o,allGenerateType:s}},data(){return{currentPage:1,pageSize:10,total:0,changeEvent:"",historyTableHeight:0,handleResizeColumn:(e,t)=>{t.width=e}}},mounted(){let e=this.$refs.historyTable;this.historyTableHeight=e.clientHeight-200,this.gettrialList()},methods:{changePage(e){this.currentPage=e.current,this.pageSize=e.pageSize,this.gettrialList()},searchHistoryList(){this.currentPage=1,this.gettrialList()},gettrialList(){let e=this.rangeTimeValue[0]?this.rangeTimeValue[0]:"00:00:00",t=this.rangeTimeValue[1]?this.rangeTimeValue[1]:"23:59:59",a=this.rangePickerValue[0]?this.rangePickerValue[0]+" "+e:"",i=this.rangePickerValue[1]?this.rangePickerValue[1]+" "+t:"",n={endTime:i,startTime:a,id:null,changeEvent:this.changeEvent,size:this.pageSize,page:this.currentPage,email:this.email.trim()};P.V.axiosPost(P.V.httpUrls.getGenerateFrequency,n).then((e=>{e&&(console.log(e),this.dataList=e.content,this.total=e.total)}))}}}),H=a(83744);const V=(0,H.Z)(T,[["render",w],["__scopeId","data-v-1e081afa"]]);var f=V}}]);