li.shaoyi 2 éve
szülő
commit
2e765e19e6

+ 2 - 2
src/business/position/index.ts

@@ -8,11 +8,11 @@ import quoteSocket from '@/services/websocket/quote'
  * @param tradeMode 交易模式
  * @returns 
  */
-export const usePosition = (tradeMode = 0) => {
+export const usePosition = (...tradeMode: number[]) => {
     const store = usePositionStore()
     const subscribe = quoteSocket.createSubscribe()
 
-    const positionList = computed(() => store.positionComputedList.filter((e) => tradeMode ? e.trademode === tradeMode : true))
+    const positionList = computed(() => store.positionComputedList.filter((e) => tradeMode.length ? tradeMode.includes(e.trademode) : true))
 
     // 获取持仓数量
     const getOrderQty = (buyOrSell: BuyOrSell, code?: string | number) => {

+ 1 - 1
src/packages/pc/components/layouts/header/components/setting/index.vue

@@ -12,7 +12,7 @@
                 <el-select placeholder="请选择" v-model="formData.orderPriceType">
                     <el-option label="现价" :value="1" />
                     <el-option label="对手价" :value="2" />
-                    <el-option label="实时价" :value="3" />
+                    <el-option label="实时价" :value="3" />
                 </el-select>
             </el-form-item>
         </el-form>

+ 1 - 1
src/packages/pc/views/footer/goods/detail/index.vue

@@ -20,7 +20,7 @@ import eventBus from '@/services/bus'
 
 const { loading, dataList, run } = useRequest(queryTradeHolderDetail, {
     params: {
-        trademodes: '50'
+        trademodes: '50,16'
     }
 })
 

+ 1 - 1
src/packages/pc/views/footer/goods/order/index.vue

@@ -45,7 +45,7 @@ const selectedRows = ref<Model.TradeOrderDetailRsp[]>([])
 
 const { loading, run, runAsync } = useRequest(queryTradeOrderDetail, {
     params: {
-        tradeMode: '50',
+        tradeMode: '50,16',
         orderStatus: '3,7,12',
     },
     onSuccess: (res) => {

+ 1 - 1
src/packages/pc/views/footer/goods/position/index.vue

@@ -48,7 +48,7 @@ const componentMap = new Map<string, unknown>([
     ['transfer', defineAsyncComponent(() => import('./components/transfer/index.vue'))],
 ])
 
-const { positionList, loading } = usePosition(50)
+const { positionList, loading } = usePosition(50, 16)
 const selectedRow = shallowRef<Model.TradePositionRsp>()
 const { componentRef, componentId, openComponent, closeComponent } = useComponent()
 

+ 1 - 1
src/packages/pc/views/footer/goods/trade/index.vue

@@ -45,7 +45,7 @@ const dataList = ref<Model.TradeDetailRsp[]>([])
 
 const { loading, runAsync } = useRequest(queryTradeDetail, {
     params: {
-        tradeMode: '50'
+        tradeMode: '50,16'
     },
     onSuccess: (res) => {
         dataList.value = res.data