浏览代码

掉期市场 买卖大厅 过滤掉自己的挂单

huangbin 3 年之前
父节点
当前提交
897cf68b79

+ 42 - 35
src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_swap/components/buy/index.vue

@@ -1,38 +1,44 @@
 <template>
-  <!--  现货贸易 - 买卖大厅 - 卖报价牌 -->
-  <a-table :columns="columns"
-           :class="['buyHallTable', isBottom ? '' : 'buyHallTableHigh', tableList.length ? '' : 'noDataTable']"
-           :scroll="{ x: '100%', y: isBottom ? 'calc(100vh- 378px)' : 'calc(100vh - 135px)' }"
-           :pagination="false"
-           :loading="loading"
-           :expandedRowKeys="expandedRowKeys"
-           :customRow="Rowclick"
-           :expandIcon="expandIcon"
-           :expandIconAsCell="false"
-           rowKey="key"
-           :data-source="tableList">
-    <!-- ,  -->
-    <!-- 额外的展开行 -->
-    <template #expandedRowRender="{ record }">
-      <BtnList :btnList="btnList"
-               :record="record"
-               class="btn-list-sticky"
-               @click="openComponent" />
-    </template>
-    <template #username="{text, record }">
-      <span>{{record.userid + " "}}{{text}}</span>
-    </template>
-    <template #orderprice="{ record }">
-      <span>{{getBuyOrSellMarketPrice(record, parantSelectedRow)}}</span>
-    </template>
-  </a-table>
-  <component :is="componentId"
-             v-if="componentId"
-             :selectedRow="selectedRow"
-             :buyOrSell="BuyOrSell.buy"
-             :enumName="enumName"
-             :parantSelectedRow="parantSelectedRow"
-             @cancel="closeComponent"></component>
+    <!--  现货贸易 - 买卖大厅 - 卖报价牌 -->
+    <a-table
+        :columns="columns"
+        :class="['buyHallTable', isBottom ? '' : 'buyHallTableHigh', tableList.length ? '' : 'noDataTable']"
+        :scroll="{ x: '100%', y: isBottom ? 'calc(100vh- 378px)' : 'calc(100vh - 135px)' }"
+        :pagination="false"
+        :loading="loading"
+        :expandedRowKeys="expandedRowKeys"
+        :customRow="Rowclick"
+        :expandIcon="expandIcon"
+        :expandIconAsCell="false"
+        rowKey="key"
+        :data-source="tableList"
+    >
+        <!-- ,  -->
+        <!-- 额外的展开行 -->
+        <template #expandedRowRender="{ record }">
+            <BtnList
+                :btnList="btnList"
+                :record="record"
+                class="btn-list-sticky"
+                @click="openComponent"
+            />
+        </template>
+        <template #username="{ text, record }">
+            <span>{{ record.userid + " " }}{{ text }}</span>
+        </template>
+        <template #orderprice="{ record }">
+            <span>{{ getBuyOrSellMarketPrice(record, parantSelectedRow) }}</span>
+        </template>
+    </a-table>
+    <component
+        :is="componentId"
+        v-if="componentId"
+        :selectedRow="selectedRow"
+        :buyOrSell="BuyOrSell.buy"
+        :enumName="enumName"
+        :parantSelectedRow="parantSelectedRow"
+        @cancel="closeComponent"
+    ></component>
 </template>
 
 <script lang="ts">
@@ -127,8 +133,9 @@ export default defineComponent({
                 // 先置空 要不然数据变更了,视图不更新
                 const fn = () => {
                     tableList.value = [];
-                    tableList.value = sortPirce(res, props.parantSelectedRow, false);
+                    tableList.value = sortPirce(res, props.parantSelectedRow, false).filter(el => el.userid !== getUserId());
                 };
+                fn()
                 if (hasFloat(res)) {
                     // 有浮动价, 则每三秒更新一次数据
                     TimerUtils.setInterval(fn, 3 * 1000, 'buyMarket');

+ 36 - 33
src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_swap/components/sell/index.vue

@@ -1,36 +1,38 @@
 <template>
-  <!-- 现货贸易 - 买卖大厅 - 买报价牌 -->
-  <a-table :columns="handleColumn(columns)"
-           :class="['sellHallTable', isBottom ? '' : 'sellHallTableHigh', tableList.length ? '' : 'noDataTable']"
-           :scroll="{ x: '100%', y: isBottom ? 'calc(100vh- 378px)' : 'calc(100vh - 135px)' }"
-           :pagination="false"
-           :loading="loading"
-           :expandedRowKeys="expandedRowKeys"
-           :customRow="Rowclick"
-           :expandIcon="expandIcon"
-           :expandIconAsCell="false"
-           rowKey="key"
-           :data-source="tableList">
-    <!-- 额外的展开行 -->
-    <template #expandedRowRender="{ record }">
-      <BtnList :btnList="btnList"
-               :record="record"
-               @click="openComponent" />
-    </template>
-    <template #orderprice="{ record }">
-      <span>{{getBuyOrSellMarketPrice(record, parantSelectedRow)}}</span>
-    </template>
-    <template #username="{text, record }">
-      <span>{{record.userid + " " }}{{text}}</span>
-    </template>
-  </a-table>
-  <component :is="componentId"
-             v-if="componentId"
-             :selectedRow="selectedRow"
-             :enumName="enumName"
-             :buyOrSell="BuyOrSell.sell"
-             :parantSelectedRow="parantSelectedRow"
-             @cancel="closeComponent"></component>
+    <!-- 现货贸易 - 买卖大厅 - 买报价牌 -->
+    <a-table
+        :columns="handleColumn(columns)"
+        :class="['sellHallTable', isBottom ? '' : 'sellHallTableHigh', tableList.length ? '' : 'noDataTable']"
+        :scroll="{ x: '100%', y: isBottom ? 'calc(100vh- 378px)' : 'calc(100vh - 135px)' }"
+        :pagination="false"
+        :loading="loading"
+        :expandedRowKeys="expandedRowKeys"
+        :customRow="Rowclick"
+        :expandIcon="expandIcon"
+        :expandIconAsCell="false"
+        rowKey="key"
+        :data-source="tableList"
+    >
+        <!-- 额外的展开行 -->
+        <template #expandedRowRender="{ record }">
+            <BtnList :btnList="btnList" :record="record" @click="openComponent" />
+        </template>
+        <template #orderprice="{ record }">
+            <span>{{ getBuyOrSellMarketPrice(record, parantSelectedRow) }}</span>
+        </template>
+        <template #username="{ text, record }">
+            <span>{{ record.userid + " " }}{{ text }}</span>
+        </template>
+    </a-table>
+    <component
+        :is="componentId"
+        v-if="componentId"
+        :selectedRow="selectedRow"
+        :enumName="enumName"
+        :buyOrSell="BuyOrSell.sell"
+        :parantSelectedRow="parantSelectedRow"
+        @cancel="closeComponent"
+    ></component>
 </template>
 
 <script lang="ts">
@@ -132,8 +134,9 @@ export default defineComponent({
                 // 先置空 要不然数据变更了,视图不更新
                 const fn = () => {
                     tableList.value = [];
-                    tableList.value = sortPirce(res, props.parantSelectedRow);
+                    tableList.value = sortPirce(res, props.parantSelectedRow).filter(el => el.userid !== getUserId());
                 };
+                fn()
                 if (hasFloat(res)) {
                     // 有浮动价, 则每三秒更新一次数据
                     TimerUtils.setInterval(fn, 3 * 1000, 'sellMarket');

+ 0 - 1
src/views/order/funding_information/components/funding_information_funding_summary/setup.ts

@@ -264,7 +264,6 @@ export const useHazardRates = () => {
             }
         }
         const decimalplace = getDecimalplace()
-        console.log('result.toFixed(decimalplace)', result.toFixed(decimalplace))
         return result.toFixed(decimalplace)
     }