| | |
| | | label: "message.jiaoyi.heyue", |
| | | // formatter: this.nameFormatter, |
| | | }, |
| | | |
| | | { |
| | | prop: "lever_rate", |
| | | label: "message.home.gangganbeishu", |
| | | }, |
| | | { |
| | | prop: "direction", |
| | | label: "message.home.fangxiang", |
| | |
| | | { |
| | | prop: "trade_avg_price", |
| | | label: "message.home.chengjiaojunjia", |
| | | }, |
| | | { |
| | | prop: "close_avg_price", |
| | | label: "message.home['平仓价']", |
| | | }, |
| | | |
| | | { |
| | |
| | | }, |
| | | methods: { |
| | | profitFormatter(row) { |
| | | return Number(row.profit).toFixed(4); |
| | | if(Number(row.profit) > 0){ |
| | | return '+' + Number(row.profit).toFixed(4); |
| | | }else{ |
| | | return Number(row.profit).toFixed(4); |
| | | } |
| | | }, |
| | | //分页 |
| | | changePageNum(type) { |
| | |
| | | this.getList(); |
| | | }, |
| | | cellStyle({ row, column, rowIndex, columnIndex }) { |
| | | if (columnIndex == 2) { |
| | | if (columnIndex == 3) { |
| | | if (row.direction == "sell") { |
| | | return { color: "#E05561" }; |
| | | } else { |
| | |
| | | } |
| | | } |
| | | // // 未实现盈亏 |
| | | if (columnIndex == 6) { |
| | | if (columnIndex == 8) { |
| | | if (row.profit < 0) { |
| | | return { color: "#E05561" }; |
| | | } else { |
| | |
| | | directionFormatter(row) { |
| | | const { direction } = row; |
| | | return direction == "buy" |
| | | ? this.$t("message.home.pingduo") |
| | | : this.$t("message.home.pingkong"); |
| | | ? 'Long' |
| | | : 'Shot'; |
| | | }, |
| | | //获取列表数据 |
| | | getList(startTime = "", endTime = "", isReset) { |
| | |
| | | |
| | | Axios.contractOrderList(data).then((res) => { |
| | | let result = res.data |
| | | result.forEach((item) => { |
| | | item.create_time = item.create_time.split(' ')[0] + ' ' + initDate(item.create_time.split(' ')[1]) |
| | | item.close_time = item.close_time.split(' ')[0] + ' ' + initDate(item.close_time.split(' ')[1]) |
| | | }) |
| | | // result.forEach((item) => { |
| | | // item.create_time = item.create_time.split(' ')[0] + ' ' + initDate(item.create_time.split(' ')[1]) |
| | | // item.close_time = item.close_time.split(' ')[0] + ' ' + initDate(item.close_time.split(' ')[1]) |
| | | // }) |
| | | this.tableData = res.data; |
| | | console.log(this.tableData,'this.tableData'); |
| | | const noNext = res.data.length == 0 || res.data.length < 10; |