huangbin 4 tahun lalu
induk
melakukan
dc7f288d3a

+ 6 - 7
src/views/market/spot_trade/components/buy-sell-market/index.vue

@@ -189,11 +189,11 @@ export default defineComponent({
             TimerUtils.clearInterval('buyAndSellMartet');
             TimerUtils.clearTimeout('debounce');
         });
-        const { childRef: buyRef, loadChildComponentData: loadBuyData } = handleChildComponentMethod();
-        const { childRef: sellRef, loadChildComponentData: loadSellData } = handleChildComponentMethod();
+        const buyRef = ref<null | { queryTableAction: Function }>(null);
+        const sellRef = ref<null | { queryTableAction: Function }>(null);
         const queryFn = () => {
-            loadBuyData();
-            loadSellData();
+            buyRef.value?.queryTableAction();
+            sellRef.value?.queryTableAction();
         };
         const { componentId, closeComponent, openComponent } = handleModalComponent(queryFn, ref({}));
         const { hasFinacing } = handleFinacing(loading, props.selectedRow.wrfactortypeid);
@@ -215,14 +215,13 @@ export default defineComponent({
         }
         TimerUtils.setInterval(
             () => {
-                loadBuyData();
-                loadSellData();
+                queryFn();
             },
             10 * 1000,
             'buyAndSellMartet'
         );
         // 单据挂牌成功 通知买大厅刷新数据
-        Bus.$on('spotTrade', loadSellData);
+        Bus.$on('spotTrade', queryFn);
 
         return {
             time,

+ 1 - 0
src/views/market/spot_trade/components/buy-sell-market/setup.ts

@@ -104,6 +104,7 @@ export function handleChildComponentMethod() {
 const rules = ref<WrMarketTradeConfig[]>([])
 export function handlePriceRule(loading: Ref<boolean>, marketid: number) {
     queryResultLoadingAndInfo(queryWrMarketTradeConfig, loading, { marketid }).then(res => {
+
         rules.value = res;
         console.log('rules', res)
     })