소스 검색

优化策略显示

flyzto 2 주 전
부모
커밋
892200cff4
1개의 변경된 파일12개의 추가작업 그리고 2개의 파일을 삭제
  1. 12 2
      web/apps/web-antd/src/views/match/solutions/index.vue

+ 12 - 2
web/apps/web-antd/src/views/match/solutions/index.vue

@@ -1,6 +1,6 @@
 <script setup>
 import { requestClient } from '#/api/request';
-import { Button, message, Form, InputNumber, RadioGroup, Radio, Drawer, Input } from 'ant-design-vue';
+import { Button, message, Form, InputNumber, RadioGroup, Radio, Drawer, Input, Switch } from 'ant-design-vue';
 import { ref, reactive, computed, watch, onMounted, onUnmounted } from 'vue';
 import dayjs from 'dayjs';
 
@@ -20,7 +20,7 @@ const updateTimer = ref(null);
 const minProfitRate = ref(2);
 const marketType = ref(-1);
 const dataType = ref(0);
-const showLower = ref(true);
+const showLower = ref(false);
 const searchValue = ref('');
 const updateLoaderHide = ref(null);
 
@@ -186,6 +186,9 @@ watch(dataType, (newVal) => {
 });
 
 watch(showLower, (newVal) => {
+  if (!updateLoaderHide.value) {
+    updateLoaderHide.value = message.loading('数据更新中...', 0);
+  }
   clearTimeout(updateTimer.value);
   updateTimer.value = setTimeout(() => {
     setLocalStorage('showLower', newVal);
@@ -198,6 +201,7 @@ onMounted(() => {
   const min_win_rate = getLocalStorage('minProfitRate');
   const mk = getLocalStorage('marketType');
   const tp = getLocalStorage('dataType');
+  const show_lower = getLocalStorage('showLower');
   if (min_win_rate !== null) {
     minProfitRate.value = min_win_rate;
   }
@@ -207,6 +211,9 @@ onMounted(() => {
   if (tp !== null) {
     dataType.value = tp;
   }
+  if (show_lower !== null) {
+    showLower.value = show_lower;
+  }
   setTimeout(() => {
     updateSolutions(true);
   }, 100);
@@ -243,6 +250,9 @@ onUnmounted(() => {
           <Form.Item label="最小利润率(%)" class="sol-opt-item input-item" :class="{ 'disabled': !!searchValue.trim() }">
             <InputNumber class="number-input" size="small" max="100" min="-100" step="0.1" placeholder="最小利润率(%)" v-model:value="minProfitRate"/>
           </Form.Item>
+          <Form.Item label="显示低赔盘" class="sol-opt-item">
+            <Switch v-model:checked="showLower" />
+          </Form.Item>
           <Form.Item class="sol-opt-item input-item">
             <Input class="search-input" placeholder="搜索联赛/球队" :allowClear="true" v-model:value="searchValue"/>
           </Form.Item>