import { Component, Mixins, Vue, Watch } from 'vue-property-decorator' import { State, Getter, Action, Mutation } from "vuex-class"; import HomeParent from "@/views/home/Common/HomeParent"; import CustomPage from "@/components/page.vue"; import { TableColumn } from "view-design" import { Request,ExcelExport } from "@/utils/Request"; import Url from "@/utils/Url"; export interface timeInterface { start:string, end:string } export interface keyWordsInterface { account ?: string, unikey ?: string, time ?: timeInterface[], } @Component({ components : { CustomPage } }) export default class Mint extends HomeParent { name : string = 'mint' public List :any = [] public columns: TableColumn[] = [{ title: "unikey", key: "unikey" },{ title: "account", key: "account" }, { title: "prepare_number", key: "bc_mint_prepare_block_number" }, { title: "success_number", key: "bc_mint_success_block_number" }, { title: "txhash", key: "bc_mint_txhash" }, { title: "tokenid", key: "bc_mint_tokenid" }, { title: "create_time", key: "createtime" }, ] public total: number = 0; public search: { page: number, size: number ,status:number,account?:string,unikey?:string,time?:any} = { page: 1, size: 10 , status:0 } public created() { this._getData() } public cutRadio(){ return [ {id:1,text:'挂起'}, {id:2,text:'完成'}, {id:3,text:'忽略'}, {id:0,text:'全部'} ] } public radioState(){ this._getData() } public searchEvent(){ this._getData() } public exportEvent(){ ExcelExport(Url.EXPORTS,{name:'mint'}).then(res=>{ this.convertRes2Blob(res,'mint') }) } public changeTime(time){ this.search.time = time } @Watch("search.page") private _onPageChange(): void { this._getData() } @Watch("search.size") private _onPageSizeChange(): void { this.search.page = 1; this._getData() } private async _getData(){ const res = await Request('get',Url.MINT,this.search) this.List = res.data.data this.total = res.data.total } }