dcc
2024-07-26 f8b0599a04ac4310ecbb36ca842b9d4edeec3744
src/components/constract/DeliveryContract/position.vue
@@ -54,7 +54,7 @@
                    <div>{{ $t("message.home.jiaogeshijian") }}</div>
                    <div>{{ $t("message.home.goumaijia") }}</div>
                    <div>{{ $t("message.home.jiesuanjia") }}</div>
                    <div>{{ $t("message.home.yingkui") }}</div>
                    <div v-if="type == 'hisorders'">{{ $t("message.home.yingkui") }}</div>
                    <div class="flex-2">
                      {{ $t("message.home.daoqishijian") }}
                    </div>
@@ -80,7 +80,7 @@
                    >
                      <div>{{ item.name }}</div>
                      <div class="flex-2">
                        {{ getFormatTime(item.open_time) }}
                        {{ item.open_time}}
                      </div>
                      <div v-if="item.direction == 'buy'" class="green">
                        {{ $t("message.jiaoyi.zuoduomairu") }}
@@ -94,10 +94,10 @@
                      <div>{{ item.time_num }} {{ item.time_unit }}</div>
                      <div>{{ item.open_price }}</div>
                      <div>{{ item.close_price }}</div>
                      <div v-if="item.profit < 0" class="red">
                      <div v-if="type == 'hisorders' && item.profit < 0" class="red">
                        {{ item.profit }}
                      </div>
                      <div v-else class="green">
                      <div v-if="type == 'hisorders' && item.profit >= 0" class="green">
                        {{ item.profit }}
                      </div>
@@ -106,7 +106,7 @@
                            <div v-if="item.state=='created'">已完成</div> -->
                      <!--                    <div>{{ item.settlement_time }}</div>-->
                      <div class="flex-2">
                        {{ getFormatTime(item.settlement_time) }}
                        {{ item.settlement_time}}
                      </div>
                      <div
                        v-if="type == 'orders'"
@@ -234,6 +234,7 @@
      :typeValue="2"
      :dialogVisible="dialogVisible"
      @closeDialog="handleCloseDetailDialog"
      :showDetail="showDetail"
    ></delivery-detail-dialog>
  </div>
</template>
@@ -248,6 +249,7 @@
import { useUserStore } from "@/store/user";
import AxiosCurrency from "@/api/currency.js";
import { handleSymbolImg } from "@/utils";
import {initDate} from '@/utils/utils'
export default {
  name: "deliveryDelegateList",
@@ -291,6 +293,7 @@
      orderNumber: 0,
      isNext: false,
      isTop: false,
      showDetail: {}
    };
  },
  mounted() {
@@ -365,6 +368,11 @@
            if (this.type == "orders") {
              this.orderNumber = res?.total || res.data.length;
            }
            let result = res.data.sort(this.sortData)
            // result.forEach(m => {//
            //   m.open_time = m.open_time.split(' ')[0] + ' ' + initDate(m.open_time.split(' ')[1])
            //   m.settlement_time = m.settlement_time.split('  ')[0] + ' ' + initDate(m.settlement_time.split('  ')[1])
            // });
            this.currencyData = res.data.sort(this.sortData);
            this.currencyDataLength = res.data.length;
            if (this.currencyDataLength == 0 || this.currencyDataLength < 10) {
@@ -391,7 +399,8 @@
        order_no: item.order_no,
        symbol: item.symbol,
      };
      bus.emit("showDetail", obj);
      // bus.emit("showDetail", obj);
      this.showDetail = obj
      this.dialogVisible = true;
    },
    //分页