huangbin 4 gadi atpakaļ
vecāks
revīzija
563d67ce5d

+ 9 - 8
src/views/market/spot_trade/components/filter/index.vue

@@ -98,19 +98,20 @@ export default defineComponent({
                 TimerUtils.setTimeout(
                     () => {
                         selectedFT.value = undefined;
+                        wrLsit.value = [];
                     },
                     100,
                     'filterTimer'
                 );
-                return;
-            }
-            queryWrStandardFactoryItem({ wrstandardid: value }).then((res) => {
-                const result: SelectList[] = [];
-                res.forEach((el) => {
-                    result.push({ selected: undefined, ...el });
+            } else {
+                queryWrStandardFactoryItem({ wrstandardid: value }).then((res) => {
+                    const result: SelectList[] = [];
+                    res.forEach((el) => {
+                        result.push({ selected: undefined, ...el });
+                    });
+                    wrLsit.value = result;
                 });
-                wrLsit.value = result;
-            });
+            }
         }
 
         // 全部期货合约

+ 2 - 2
src/views/market/spot_trade/interface.ts

@@ -5,8 +5,8 @@ export interface BuyAndSellMarket {
 }
 
 export interface TreeDataItem {
-    value: number;
-    key: number;
+    value: number | string;
+    key: number | string;
     title?: string;
     slots?: Record<string, string>;
     children?: TreeDataItem[];

+ 2 - 2
src/views/market/spot_trade/setup.ts

@@ -138,8 +138,8 @@ export function handleFtDeliveryGoods() {
                     const { deliverygoodsid, deliverygoodsname, wdlst } = el
                     const item: TreeDataItem = {
                         title: deliverygoodsname,
-                        key: deliverygoodsid,
-                        value: deliverygoodsid,
+                        key: deliverygoodsid + '--',
+                        value: deliverygoodsid + '--',
                         children: []
                     }
                     wdlst.forEach(e => {