import{r as e,j as l,o as a}from"./app-eaa32a4a.js";import{c as t,i as s,E as i}from"./local-bd07797b.js";import{P as c}from"./index-de07cc7b.js";import"./auth-e5508dcf.js";import"./index-58480b55.js";import"./index-4abfb1b1.js";class d extends e.Component{constructor(e){super(e),this.pageChange=e=>{this.setState({pageNum:e}),this.getTableList()},this.openTradeModal=e=>{this.setState({trade_dialog:!0})},this.state={list:[],pageNum:1,pageSize:10,total:0,trade_dialog:!1,strategy_dialog:!1},this.columns=[{colKey:"ddd",title:"用户名",cell:({rowIndex:e,row:a})=>l.jsx("div",{children:a.d9})},{colKey:"d2",title:"交易所"},{colKey:"d3",title:"交易对"},{colKey:"d4",title:"持仓方向",align:"center"},{colKey:"d5",title:"策略",align:"center"},{colKey:"d6",title:"开仓价格",align:"center"},{colKey:"d7",title:"标记价格",align:"center"},{colKey:"d8",title:"未实现盈亏",align:"center"},{colKey:"d9",title:"操作",align:"center"}]}pcTable(){return""}mobileTable(){return l.jsxs("div",{className:"contract-real-table__mobile",children:[this.state.list.map(((e,a)=>l.jsxs("div",{className:"table-row",children:[l.jsxs("div",{className:"table-row-line",children:[l.jsx("div",{className:"table-pairs",children:e.symbol}),l.jsx("div",{className:"table-btns"})]}),l.jsxs("div",{className:"table-row-line",children:[l.jsxs("div",{className:"table-col-left",children:[l.jsxs("div",{className:"table-col__line",children:[l.jsx("div",{className:"table-col-label",children:"用户"}),l.jsx("div",{className:"table-col-value",children:t(e.exchange_users_id)})]}),l.jsxs("div",{className:"table-col__line",children:[l.jsx("div",{className:"table-col-label",children:"BTC估值"}),l.jsx("div",{className:"table-col-value",children:e.btc_valuation})]})]}),l.jsxs("div",{className:"table-col-left",children:[l.jsxs("div",{className:"table-col__line",children:[l.jsx("div",{className:"table-col-label",children:"交易所"}),l.jsx("div",{className:"table-col-value",children:e.exchange})]}),l.jsxs("div",{className:"table-col__line",children:[l.jsx("div",{className:"table-col-label",children:"价值"}),l.jsx("div",{className:"table-col-value",children:e.quantity})]}),l.jsxs("div",{className:"table-col__line",children:[l.jsx("div",{className:"table-col-label",children:"更新"}),l.jsx("div",{className:["table-col-value"].join(" "),style:{fontSize:"12px"},children:e.updated_at})]})]})]})]},a))),l.jsx(c,{onChange:this.pageChange,pageNum:this.state.pageNum,pageSize:this.state.pageSize,total:this.state.total})]})}currentTable(){return l.jsx("div",{style:this.props.style??null,className:"c-table-height",children:s()?this.mobileTable():this.pcTable()})}async getTableList(e){let l=null;try{l=a();let t={page:this.state.pageNum,limit:this.state.pageSize};e&&(t={...t,...e});const s=await i(t);0==s.code&&this.setState({list:s.data.data,total:s.data.total}),l&&l.hide()}catch(t){l&&l.hide()}}render(){return this.props["v-if"]?this.currentTable():l.jsx(l.Fragment,{})}}export{d as default};
