|
|
@@ -2,6 +2,7 @@ import { BtnListType } from '@/common/components/btnList/interface';
|
|
|
import { ContextMenuTemp } from "@/common/components/contextMenu/interface";
|
|
|
import { handleContextMenu } from "@/common/components/contextMenu/setup";
|
|
|
import { EnumRouterName } from '@/common/constants/enumRouterName';
|
|
|
+import { ModalEnum } from '@/common/constants/modalNameEnum';
|
|
|
import { getTableColumns, getTableEvent, initData } from "@/common/export/table";
|
|
|
import { findChildList, getClassName } from "@/common/setup/table/button";
|
|
|
import { ComposeTableParam, TableEventCB } from "@/common/setup/table/interface";
|
|
|
@@ -33,15 +34,25 @@ export function handleSpotBtnList(menuType: EnumRouterName) {
|
|
|
const fnMap = (arr: OperationTabMenu[]) => {
|
|
|
return arr.map(e => {
|
|
|
const { code, title } = e;
|
|
|
- return { lable: title, code, className: getClassName(code) }
|
|
|
+ // 处理 多对一
|
|
|
+ let result = code
|
|
|
+ if (code.includes(ModalEnum.spot_trade_warehouse_post_buying)) {
|
|
|
+ // 挂牌求购
|
|
|
+ result = ModalEnum.spot_trade_warehouse_post_buying
|
|
|
+ } else if (code.includes(ModalEnum.spot_trade_warehouse_detail)) {
|
|
|
+ // 详情
|
|
|
+ result = ModalEnum.spot_trade_warehouse_detail
|
|
|
+ }
|
|
|
+
|
|
|
+ return { lable: title, code: result, className: getClassName(code) }
|
|
|
})
|
|
|
}
|
|
|
// 过滤报价大厅按钮列表
|
|
|
const temp = list.children.filter(e => e.type === 2)
|
|
|
firstBtn = fnMap(temp)
|
|
|
|
|
|
- const fn = (code: EnumRouterName) => {
|
|
|
- const findResult = list.children.find(e => e.code === code)
|
|
|
+ const fn = (code: string) => {
|
|
|
+ const findResult = list.children.find(e => e.code.includes(code))
|
|
|
const result: BuyAndSellMarket = { isMarket: false, btnList: [] }
|
|
|
if (findResult) {
|
|
|
result.isMarket = true
|
|
|
@@ -52,9 +63,9 @@ export function handleSpotBtnList(menuType: EnumRouterName) {
|
|
|
}
|
|
|
|
|
|
// 处理买大厅
|
|
|
- Object.assign(buyMarket, fn(EnumRouterName.spot_trade_warehouse_buy_hall))
|
|
|
+ Object.assign(buyMarket, fn('buy'))
|
|
|
// 处理卖大厅
|
|
|
- Object.assign(sellMarket, fn(EnumRouterName.spot_trade_warehouse_sell_hall))
|
|
|
+ Object.assign(sellMarket, fn('sell'))
|
|
|
}
|
|
|
return { firstBtn, buyMarket, sellMarket }
|
|
|
}
|