|
|
@@ -1,6 +1,22 @@
|
|
|
<template>
|
|
|
<!--订单交易 挂牌转让-->
|
|
|
<div class="topTableHeight">
|
|
|
+ <div class="filterTable">
|
|
|
+ <div class="filter-custom-table">
|
|
|
+ <a-select class="conditionSelect"
|
|
|
+ :style="{width: '180px', maxHeight: '400px', overflow: 'auto' }"
|
|
|
+ @change="goodsChange"
|
|
|
+ placeholder="全部标的合约">
|
|
|
+ <a-select-option v-for="item in getRefGoodsList()"
|
|
|
+ :value="item"
|
|
|
+ :key="item">{{item}}
|
|
|
+ </a-select-option>
|
|
|
+ </a-select>
|
|
|
+ <!-- <a-button class="btnDeafault"
|
|
|
+ @click="search(true)"
|
|
|
+ style="width: 80px">筛选</a-button> -->
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<a-table :columns="columns"
|
|
|
:class="['srcollYTable', isBottom ? 'secondTabTable' : 'secondTabTableNoBottom', goodsList.length ? 'noPlaceHolder' : 'hasPlaceHolder']"
|
|
|
:scroll="{ x: '100%', y: isBottom ? 'calc(100vh- 407px)' : 'calc(100vh - 167px)' }"
|
|
|
@@ -73,7 +89,7 @@ import { QueryDeliveryRelationRsp } from '@/services/go/delivery/interface';
|
|
|
import { handleTableEventAndData } from '@/common/setup/table/compose';
|
|
|
import { TableParam } from '@/common/setup/table/interface';
|
|
|
import { BtnListType } from '@/common/components/btnList/interface';
|
|
|
-import { QueryQuoteDayRsp } from '@/services/go/quote/interface';
|
|
|
+import { RefGoodsList } from './interface';
|
|
|
import { getShowBottomValue } from '@/common/config/constrolBottom';
|
|
|
import { ref } from 'vue';
|
|
|
import { useQueryData } from '@/common/setup/request';
|
|
|
@@ -91,9 +107,8 @@ export default defineComponent({
|
|
|
},
|
|
|
setup() {
|
|
|
const isBottom = getShowBottomValue();
|
|
|
- const { loading, goodsList } = useSwapList();
|
|
|
+ const { loading, goodsList, getRefGoodsList, filterGoodsList } = useSwapList();
|
|
|
|
|
|
- // const loading = ref<boolean>(false);
|
|
|
const param: TableParam = {
|
|
|
columnsList,
|
|
|
queryFn: () => {},
|
|
|
@@ -104,20 +119,28 @@ export default defineComponent({
|
|
|
{ lable: '详情', code: 'Detail', className: 'btnDeafault' },
|
|
|
{ lable: '买卖大厅', code: 'BuyAndSell', className: 'btnDeafault' },
|
|
|
];
|
|
|
- // const { deliverGoods, getQuoteList, goodsList, findDeilverGoodsByGoodsCode } = handleDeliveryRelation([1, 3]);
|
|
|
// 行情按需订阅
|
|
|
- handleSubcriteOnDemandQuote<QueryQuoteDayRsp>(goodsList);
|
|
|
-
|
|
|
+ let stopSubcribe = handleSubcriteOnDemandQuote<RefGoodsList>(goodsList);
|
|
|
+ // 过滤标的合约
|
|
|
+ function goodsChange(value: string) {
|
|
|
+ const goodsList = filterGoodsList(value);
|
|
|
+ // 停止上次订阅
|
|
|
+ stopSubcribe();
|
|
|
+ // 重新发起订阅
|
|
|
+ stopSubcribe = handleSubcriteOnDemandQuote<RefGoodsList>(goodsList);
|
|
|
+ }
|
|
|
return {
|
|
|
isBottom,
|
|
|
- ...handleTableEventAndData<QueryQuoteDayRsp>(param),
|
|
|
+ ...handleTableEventAndData<RefGoodsList>(param),
|
|
|
btnList,
|
|
|
handleQuotePriceColor,
|
|
|
quoteChange,
|
|
|
quoteAmplitude,
|
|
|
quoteAmplituOfVibration,
|
|
|
+ getRefGoodsList,
|
|
|
goodsList,
|
|
|
loading,
|
|
|
+ goodsChange,
|
|
|
};
|
|
|
},
|
|
|
});
|