dcc
2024-07-19 06c4bb090a7b24442bf106f6614f70310dfab040
src/components/constract/PerpetualContract/positionCom/currentPosition.vue
@@ -112,7 +112,7 @@
      timer: null,
      tables: [
        {
          prop: "volume", //volume_open持仓总张数,volume表示剩余
          prop: "shuliang", //volume_open持仓总张数,volume表示剩余
          label: "message.home.shuliang",
        },
        {
@@ -190,8 +190,8 @@
    },
    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);
@@ -228,6 +228,11 @@
      };
      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(