|
@@ -28,6 +28,10 @@ import { queryTableList, BtnList, contextMenu, defineAsyncComponent, defineCompo
|
|
|
import { QueryOrderQuoteReq, WrOrderQuote } from '@/services/go/wrtrade/interface';
|
|
import { QueryOrderQuoteReq, WrOrderQuote } from '@/services/go/wrtrade/interface';
|
|
|
import { queryOrderQuote } from '@/services/go/wrtrade';
|
|
import { queryOrderQuote } from '@/services/go/wrtrade';
|
|
|
import { handleComposeTable } from '@/views/market/spot_trade/setup';
|
|
import { handleComposeTable } from '@/views/market/spot_trade/setup';
|
|
|
|
|
+import { subscribeInfoType } from '@/services/socket/quota/interface';
|
|
|
|
|
+import { v4 as uuidv4 } from 'uuid';
|
|
|
|
|
+import { addSubscribeQuotation } from '@/services/socket/quota';
|
|
|
|
|
+import { onMounted } from 'vue';
|
|
|
|
|
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
|
name: EnumRouterName.warehouse_receipt_trade_floating_price,
|
|
name: EnumRouterName.warehouse_receipt_trade_floating_price,
|
|
@@ -40,14 +44,23 @@ export default defineComponent({
|
|
|
setup() {
|
|
setup() {
|
|
|
// 表格列表数据
|
|
// 表格列表数据
|
|
|
const { loading, tableList, queryTable } = queryTableList<WrOrderQuote>();
|
|
const { loading, tableList, queryTable } = queryTableList<WrOrderQuote>();
|
|
|
|
|
+ let uuid = uuidv4();
|
|
|
// 获取列表数据
|
|
// 获取列表数据
|
|
|
const queryTableAction = () => {
|
|
const queryTableAction = () => {
|
|
|
const param: QueryOrderQuoteReq = {
|
|
const param: QueryOrderQuoteReq = {
|
|
|
wrpricetype: 2,
|
|
wrpricetype: 2,
|
|
|
haswr: 1,
|
|
haswr: 1,
|
|
|
};
|
|
};
|
|
|
- queryTable(queryOrderQuote, param);
|
|
|
|
|
|
|
+ queryTable(queryOrderQuote, param).then((res) => {
|
|
|
|
|
+ uuid = uuidv4();
|
|
|
|
|
+ // 订阅行情
|
|
|
|
|
+ const list: subscribeInfoType[] = res.map((el) => {
|
|
|
|
|
+ return { exchangeCode: 250, goodsCode: el.goodscode, subState: 0 };
|
|
|
|
|
+ });
|
|
|
|
|
+ addSubscribeQuotation(uuid, list);
|
|
|
|
|
+ });
|
|
|
};
|
|
};
|
|
|
|
|
+ onMounted(() => {});
|
|
|
// 表格通用逻辑
|
|
// 表格通用逻辑
|
|
|
const param: ComposeTableParam = {
|
|
const param: ComposeTableParam = {
|
|
|
queryFn: queryTableAction,
|
|
queryFn: queryTableAction,
|