import{H as e,a as t,_ as a}from"./index-20QKAx9H.js";import{d as i,k as s,c as n,a0 as l,a3 as r,f as o,a8 as d,aj as c,v as u,ak as h,a1 as g}from"./vendor-C4fU48ba.js";import{R as m,Q as p,j as v,x as y}from"./antd-DtCbTTX_.js";import"./utils-C2ZVugJN.js";const _=i({components:{},setup(){const e=t();let a=s([]),i=s([]),l=s({});const r=n(()=>e.state.adminPage.allGenerateType),o=n(()=>[{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 d=s("");return{rangePickerValue:a,rangeTimeValue:i,columns:o,dataList:s([]),email:d,renameData:l,status:s(0),allGenerateType:r}},data:()=>({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(){var t,a,i,s;let n=(null==(t=this.rangeTimeValue)?void 0:t[0])?this.rangeTimeValue[0]:"00:00:00",l=(null==(a=this.rangeTimeValue)?void 0:a[1])?this.rangeTimeValue[1]:"23:59:59",r=(null==(i=this.rangePickerValue)?void 0:i[0])?this.rangePickerValue[0]+" "+n:"",o={endTime:(null==(s=this.rangePickerValue)?void 0:s[1])?this.rangePickerValue[1]+" "+l:"",startTime:r,id:null,changeEvent:this.changeEvent,size:this.pageSize,page:this.currentPage,email:this.email.trim()};e.axiosPost(e.httpUrls.getGenerateFrequency,o).then(e=>{e&&(this.dataList=e.content,this.total=e.total)})}}}),x={class:"test_cli admin_page"},k={class:"admin_table_search"},C={class:"admin_state"},P={class:"admin_state_item"},w={class:"admin_state_item"},T={class:"admin_state_item"},L={class:"admin_state_item"},V={class:"admin_search"},f={class:"admin_table_content",ref:"historyTable"};const z=a(_,[["render",function(e,t,a,i,s,n){const _=m,z=p,E=v,H=y;return g(),l("div",x,[r("div",k,[r("div",C,[r("div",P,[t[7]||(t[7]=r("span",null,"Start Date:",-1)),o(_,{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:d(()=>t[6]||(t[6]=[r("span",{class:"icon iconfont range_picker_icon icon-rili"},null,-1)])),_:1},8,["value","placeholder"])]),r("div",w,[t[8]||(t[8]=r("span",null,"Start Time:",-1)),o(z,{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"])]),r("div",T,[t[9]||(t[9]=r("span",null,"Generate Event:",-1)),o(E,{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:c(e.gettrialList,["enter"])},null,8,["value","options","onKeydown"])]),r("div",L,[t[10]||(t[10]=r("span",null,"Email:",-1)),u(r("input",{"onUpdate:modelValue":t[3]||(t[3]=t=>e.email=t),placeholder:"Please enter email",onKeydown:t[4]||(t[4]=c((...t)=>e.gettrialList&&e.gettrialList(...t),["enter"])),type:"text",style:{width:"250px"}},null,544),[[h,e.email]])])]),r("div",V,[r("div",{class:"admin_search_item",onClick:t[5]||(t[5]=(...t)=>e.searchHistoryList&&e.searchHistoryList(...t))},"Search")])]),r("div",f,[o(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)])}],["__scopeId","data-v-56e5399b"]]);export{z as default};
