5.10航天ui交易所pc端,代码jiem-pc
lxf
2025-06-11 b13d4a4289ca95318f10db5eba75310cae0db3d6
src/components/constract/PerpetualContract/positionCom/currentPosition.vue
@@ -7,7 +7,7 @@
      :empty-text="$t('message.home.noData')"
    >
      <!-- 合约会显示buy和杠杆 -->
      <el-table-column :label="$t('message.jiaoyi.heyue')" width="180">
      <el-table-column :label="$t('message.jiaoyi.heyue')" width="140">
        <template #default="scope">
          <div class="first-column">
            <span
@@ -29,6 +29,7 @@
        :prop="item.prop"
        :label="$t(item.label)"
        :formatter="item.formatter"
        :width="item.width"
      />
      <el-table-column :label="$t('message.home.caozuo')" min-width="100">
        <template #default="scope">
@@ -84,6 +85,7 @@
          prop: "profit",
          label: "message.user.weishixianyingkui(shouyilv)",
          formatter: this.formatterData,
          width: 260,
        },
        {
          prop: "volume", //volume_open持仓总张数,volume表示剩余
@@ -93,6 +95,10 @@
        {
          prop: "trade_avg_price",
          label: "message.user.kaicangjiage",
          formatter: (row) => {
            const { trade_avg_price } = row;
            return bigDecimal.round(trade_avg_price, 6);
          },
        },
        {
@@ -104,11 +110,11 @@
          prop: "lever_rate",
          label: "message.home.gangganbeishu",
        },
        {
          prop: "change_ratio",
          label: "message.home.baozhengjinbilv",
          // formatter: this.ratioFormatter,
        },
        // {
        //   prop: "change_ratio",
        //   label: "message.home.baozhengjinbilv",
        //   // formatter: this.ratioFormatter,
        // },
        {
          prop: "deposit",
          label: "message.home.baozhengjin",
@@ -153,8 +159,8 @@
    },
    formatterData(row) {
      const ratio = this.ratioFormatter(row);
      const profit = Number(row.profit).toFixed(4);
      return `${profit}/(${ratio})`;
      const profit = Number(row.profit).toFixed(6);
      return `${profit}(${ratio})`;
    },
    //设置单个单元格样式   行下标:rowIndex    列下标:columnIndex
    cellStyle({ row, column, rowIndex, columnIndex }) {
@@ -195,7 +201,7 @@
          (accumulator, cur) => Number(accumulator) + Number(cur.profit),
          0
        );
        const dataloss = bigDecimal.round(profitLoss, 2);
        const dataloss = bigDecimal.round(profitLoss, 6);
        // 保证金率
        const marginRate = res.data.reduce(
          (accumulator, cur) =>