dcc
2024-07-18 5932f9b2c934f901dcd6876beab081f82eaa0f16
src/components/constract/PerpetualContract/positionCom/historyOrder.vue
@@ -70,7 +70,10 @@
          label: "message.jiaoyi.heyue",
          // formatter: this.nameFormatter,
        },
        {
          prop: "lever_rate",
          label: "message.home.gangganbeishu",
        },
        {
          prop: "direction",
          label: "message.home.fangxiang",
@@ -79,6 +82,10 @@
        {
          prop: "trade_avg_price",
          label: "message.home.chengjiaojunjia",
        },
        {
          prop: "close_avg_price",
          label: "message.home['平仓价']",
        },
        {
@@ -115,7 +122,11 @@
  },
  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) {
@@ -131,7 +142,7 @@
      this.getList();
    },
    cellStyle({ row, column, rowIndex, columnIndex }) {
      if (columnIndex == 2) {
      if (columnIndex == 3) {
        if (row.direction == "sell") {
          return { color: "#E05561" };
        } else {
@@ -139,7 +150,7 @@
        }
      }
      // // 未实现盈亏
      if (columnIndex == 6) {
      if (columnIndex == 8) {
        if (row.profit < 0) {
          return { color: "#E05561" };
        } else {