1
PC-20250623MANY\Administrator
2025-08-25 c1c7ff011929d0b4821c9947eea32b670f138fa9
1
4 files modified
111 ■■■■ changed files
src/assets/style/reset.scss 4 ●●●● patch | view | raw | blame | history
src/assets/style/variables.scss 8 ●●●●● patch | view | raw | blame | history
src/views/account/account.vue 14 ●●●●● patch | view | raw | blame | history
src/views/account/components/Position.vue 85 ●●●●● patch | view | raw | blame | history
src/assets/style/reset.scss
@@ -26,13 +26,13 @@
  list-style: none;
}
a {
  color: #fff;
  color: #aaa;
  text-decoration: none;
}
body,
html {
  font: 14px "微软雅黑", Arial;
  color: #fff;
  color: #aaa;
  background-color: #13161e;
}
input {
src/assets/style/variables.scss
@@ -8,7 +8,7 @@
// 全局elment-ui样式修改
.el-tabs__item {
  color: #eee;
  color: #bbb;
}
.el-drawer,
.el-drawer__header > :first-child,
@@ -16,12 +16,14 @@
.el-table tr,
.el-dialog,
.el-dialog__title,
.el-input__inner,
.el-upload--picture-card,
.el-table--enable-row-hover .el-table__body tr:hover > td,
.el-table th.el-table__cell {
  background-color: #333 !important;
  color: #fff !important;
  color: #aaa !important;
}
.el-form-item__label {
  color: #fff !important;
  color: #aaa !important;
}
src/views/account/account.vue
@@ -22,11 +22,7 @@
              {{ $t("劃轉") }}
            </div>
          </el-button> -->
          <el-button
            type="primary"
            class="deposit-btn"
            @click="depositTip"
          >
          <el-button type="primary" class="deposit-btn" @click="depositTip">
            <div class="flex-center">
              <img src="@/assets/images/account_rec.png" alt="Deposit" />
              {{ $t("dep") }}
@@ -239,6 +235,8 @@
      :dialogVisible.sync="positionVisible"
      v-if="positionVisible"
      :type="positionType"
      :moneyData="moneyData"
      @pc="pc"
    ></Position>
    <!-- 交易记录弹窗(包括us和mx的) -->
@@ -354,6 +352,11 @@
        message: this.$t("充值提示"),
        type: "warning",
      });
    },
    // 持仓列表关闭,打开平仓列表
    pc() {
      this.positionVisible = false;
      this.tradelogVisible = true;
    },
  },
};
@@ -519,7 +522,6 @@
.market-section {
  flex: 1;
  background-color: #fff;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #777;
src/views/account/components/Position.vue
@@ -7,10 +7,58 @@
    size="980px"
  >
    <div class="drawer-content">
      <div class="card sb_b">
        <div class="card_1 flex-center">
          <div>{{ $t("浮動盈虧") }}</div>
          <div
            style="font-size: 24px"
            :style="`color:${
              thisMoneyData.profitAndLoss > 0
                ? 'red'
                : thisMoneyData.profitAndLoss < 0
                ? 'green'
                : ''
            }`"
          >
            {{ thisMoneyData.symbol }} {{ thisMoneyData.profitAndLoss }}
          </div>
        </div>
        <div class="card_2 flex-between">
          <div class="card_2_item flex-center" style="align-items: start">
            <div>{{ $t("總資產") }}</div>
            <div>{{ thisMoneyData.symbol }}{{ thisMoneyData.totalMoney }}</div>
          </div>
          <div class="card_2_item flex-center">
            <div>{{ $t("hj48") }}</div>
            <div>
              {{ thisMoneyData.symbol }}{{ thisMoneyData.availableBalance }}
            </div>
          </div>
          <div class="card_2_item flex-center" style="align-items: end">
            <div>{{ $t("账户盈亏") }}</div>
            <div>
              {{ thisMoneyData.symbol
              }}{{ thisMoneyData.cumulativeProfitAndLoss }}
            </div>
          </div>
        </div>
        <div class="card_2 flex-between" style="border-top: #aaa solid 1px">
          <el-button type="primary" size="medium" @click="$router.push('/home')">
            {{ $t("buy") }}
          </el-button>
          <el-button type="primary" size="medium" @click="$router.push('/home')">
            {{ $t("hj78") }}
          </el-button>
          <el-button type="primary" size="medium" @click="pc">
            {{ $t("hj121") }}
          </el-button>
        </div>
      </div>
      <el-table
        :data="tableData"
        style="width: 100%; flex: 1"
        height="250"
        height="100%"
        empty-text="No Data"
      >
        <el-table-column prop="stockSpell" :label="$t('hj313')">
@@ -130,6 +178,15 @@
      type: String,
      default: "",
    },
    moneyData: {
      type: Array,
      default: () => [],
    },
  },
  computed: {
    thisMoneyData() {
      return this.moneyData.find((item) => item.accectType == this.type) || {};
    },
  },
  watch: {},
  async created() {
@@ -144,6 +201,10 @@
      this.$emit("update:dialogVisible", false);
      this.$emit("onClose"); // 关闭弹窗时,通知父组件
    },
    // 打开平仓弹窗
    pc() {
      this.$emit("pc");
    },
  },
};
</script>
@@ -155,6 +216,28 @@
  display: flex;
  flex-direction: column;
  .card {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #777;
    .card_1 {
      padding: 20px;
      font-size: 18px;
      flex-direction: column;
    }
    .card_2 {
      width: 100%;
      padding: 10px 30px 10px;
      .card_2_item {
        width: 33%;
        flex-direction: column;
        & > div {
          padding: 3px 0;
        }
      }
    }
  }
  .pagination {
    margin-top: 20px;
    text-align: center;