瀏覽代碼

优化 历史图表 是否有仓单判断条件

huangbin 3 年之前
父節點
當前提交
896503f074
共有 1 個文件被更改,包括 3 次插入4 次删除
  1. 3 4
      src/views/market/market-spot/components/history-chart/index.vue

+ 3 - 4
src/views/market/market-spot/components/history-chart/index.vue

@@ -29,10 +29,10 @@ import { queryWrAverageTradePrice } from '@/services/go/wrtrade';
 import { TempWrOrderQuoteDetail } from '../post_buying/interface';
 import { EnumRouterName } from '@/common/constants/enumRouterName';
 import { WrAverageTradePriceQsq } from '@/services/go/wrtrade/interface';
-import { handleIs } from '../buy-sell-market/setup';
-import { BuyOrSell } from '@/common/constants/enumCommon';
 import { _closeModal } from '@/common/setup/modal/modal';
 import Drawer from '@/common/components/drawer/index.vue';
+import { getAuctionwrType, getListingMode } from '@/views/market/market-spot/setup'
+import { BuyOrSell, ListingMode, AuctionwrType } from '@/common/constants/enumCommon';
 
 // 通过 ComposeOption 来组合出一个只有必须组件和图表的 Option 类型
 type ECOption = echarts.ComposeOption<BarSeriesOption | LineSeriesOption | TitleComponentOption | GridComponentOption>;
@@ -71,12 +71,11 @@ export default defineComponent({
                 },
             ],
         };
-        const { isWR } = handleIs(props.enumName, BuyOrSell.buy);
         const chartRef = ref();
         const chartInstance = ref<echarts.ECharts>();
         function queryHistoryData() {
             const param: WrAverageTradePriceQsq = {
-                haswr: isWR(),
+                haswr: getAuctionwrType(AuctionwrType.hasWr) ? 1 : 0,
                 wrfactortypeid: props.selectedRow.wrfactortypeid,
             };
             queryWrAverageTradePrice(param).then((res) => {