| | |
| | | timer: null, |
| | | tables: [ |
| | | { |
| | | prop: "volume", //volume_open持仓总张数,volume表示剩余 |
| | | prop: "shuliang", //volume_open持仓总张数,volume表示剩余 |
| | | label: "message.home.shuliang", |
| | | }, |
| | | { |
| | |
| | | }, |
| | | directionFormatter(row, column, val) { |
| | | return val === "buy" |
| | | ? this.$t("message.home.kaiduo") |
| | | : this.$t("message.home.kaikong"); |
| | | ? 'Long' |
| | | : 'Shot'; |
| | | }, |
| | | formatterData(row) { |
| | | const ratio = this.ratioFormatter(row); |
| | |
| | | }; |
| | | Axios.contractOrderList(data).then((res) => { |
| | | this.tableData = res.data; |
| | | this.tableData.forEach(item => { |
| | | let shuliang = item.deposit*item.lever_rate/item.trade_avg_price |
| | | item.shuliang = shuliang.toFixed(4) |
| | | }) |
| | | console.log(this.tableData,'this.tableData'); |
| | | this.$emit("getPositionNum", res.data.length); |
| | | // 未实现盈亏 |
| | | const profitLoss = res.data.reduce( |