cc il y a 1 jour
Parent
commit
b3a2c07751

+ 15 - 14
ai-electron/frontend/src/case/views/data/index.vue

@@ -214,25 +214,16 @@
       </div>
     </Modal>
 
-    <Modal
+    <BasicModal
       v-model:open="cleanTypeModalOpen"
       title="选择数据类型"
-      :centered="true"
       width="520px"
-      :footer="null"
+      :can-fullscreen="false"
+      :show-cancel-btn="false"
+      :show-ok-btn="false"
       wrapClassName="clean-type-modal"
-      @cancel="cleanTypeModalOpen = false"
     >
       <div class="clean-type-options">
-        <button type="button" class="clean-type-option" @click="handleChooseCleanType('eds')">
-          <span class="clean-type-option__icon is-eds">
-            <FileZipOutlined />
-          </span>
-          <span class="clean-type-option__body">
-            <span class="clean-type-option__title">电子数据</span>
-            <span class="clean-type-option__desc">上传 GAB 电子数据包(zip),自动解压并入库</span>
-          </span>
-        </button>
         <button type="button" class="clean-type-option" @click="handleChooseCleanType('table')">
           <span class="clean-type-option__icon">
             <TableOutlined />
@@ -242,8 +233,17 @@
             <span class="clean-type-option__desc">上传 xls / xlsx / csv,走模板匹配与数据清洗</span>
           </span>
         </button>
+        <button type="button" class="clean-type-option" @click="handleChooseCleanType('eds')">
+          <span class="clean-type-option__icon is-eds">
+            <FileZipOutlined />
+          </span>
+          <span class="clean-type-option__body">
+            <span class="clean-type-option__title">电子数据</span>
+            <span class="clean-type-option__desc">上传 GAB 电子数据包(zip),自动解压并入库</span>
+          </span>
+        </button>
       </div>
-    </Modal>
+    </BasicModal>
 
     <GovernProgressModal
       :open="governProgressVisible"
@@ -271,6 +271,7 @@
   import TableSetting from '@/core/components/Table/src/components/settings/index.vue';
   import { createTableContext } from '@/core/components/Table/src/hooks/useTableContext';
   import { BasicTree } from '@/core/components/Tree';
+  import { BasicModal } from '@/core/components/Modal';
   import { useDesign } from '@/core/hooks/web/useDesign';
   import { useGo } from '@/core/hooks/web/usePage';
   import { PageEnum } from '@/core/enums/pageEnum';

+ 0 - 2
ai-electron/frontend/src/core/layouts/default/setting/api.ts

@@ -38,8 +38,6 @@ export interface LlmConfig {
   maxTokens: number;
   /** 单次调用总时长上限(秒) */
   timeoutSeconds: number;
-  /** 是否开启思考模式 */
-  enableThinking: boolean;
 }
 
 /** 读取大模型配置 */

+ 2 - 47
ai-electron/frontend/src/core/layouts/default/setting/components/LlmSettingModal.vue

@@ -11,9 +11,7 @@
     @ok="handleSave"
   >
     <div :class="prefixCls">
-      <p class="llm-setting__tip">
-        配置保存到服务端 <code>qingjian/system/conf/llm.json</code>,AI 清洗模板匹配与文件 AI 识别共用,保存后立即生效。
-      </p>
+      <p class="llm-setting__tip">AI 清洗模板匹配与文件 AI 识别共用此配置,保存后立即生效。</p>
 
       <div v-if="loading" class="llm-setting__loading">
         <Skeleton active :paragraph="{ rows: 6 }" />
@@ -104,16 +102,6 @@
             <div v-if="errors.timeoutSeconds" class="llm-setting__error">{{ errors.timeoutSeconds }}</div>
           </div>
         </div>
-
-        <div class="llm-setting__item llm-setting__switch">
-          <div class="llm-setting__switch-main">
-            <div class="llm-setting__label">思考模式</div>
-            <div class="llm-setting__hint">
-              开启后推理模型会先输出 reasoning;关闭可避免 reasoning 占满输出 Token 导致正文为空。
-            </div>
-          </div>
-          <Switch v-model:checked="form.enableThinking" />
-        </div>
       </template>
     </div>
   </BasicModal>
@@ -121,7 +109,7 @@
 
 <script lang="ts" setup>
   import { reactive, ref, unref, watch } from 'vue';
-  import { Input, InputNumber, Skeleton, Switch, Tooltip } from 'ant-design-vue';
+  import { Input, InputNumber, Skeleton, Tooltip } from 'ant-design-vue';
   import { QuestionCircleOutlined } from '@ant-design/icons-vue';
   import { BasicModal, useModalInner } from '@/core/components/Modal';
   import { useDesign } from '@/core/hooks/web/useDesign';
@@ -143,7 +131,6 @@
     temperature?: number;
     maxTokens?: number;
     timeoutSeconds?: number;
-    enableThinking: boolean;
   }
 
   const form = reactive<LlmConfigForm>({
@@ -153,7 +140,6 @@
     temperature: 0,
     maxTokens: 8192,
     timeoutSeconds: 180,
-    enableThinking: false,
   });
 
   const errors = reactive({
@@ -183,7 +169,6 @@
     form.temperature = config?.temperature ?? 0;
     form.maxTokens = config?.maxTokens ?? 8192;
     form.timeoutSeconds = config?.timeoutSeconds ?? 180;
-    form.enableThinking = !!config?.enableThinking;
   }
 
   async function loadConfig() {
@@ -239,7 +224,6 @@
       temperature: Number(form.temperature ?? 0),
       maxTokens: Number(form.maxTokens ?? 8192),
       timeoutSeconds: Number(form.timeoutSeconds ?? 180),
-      enableThinking: form.enableThinking,
     };
 
     saving.value = true;
@@ -299,12 +283,6 @@
       font-size: 13px;
       line-height: 1.7;
       color: #6b7280;
-
-      code {
-        padding: 0 4px;
-        background: #f3f4f6;
-        border-radius: 4px;
-      }
     }
 
     .llm-setting__row {
@@ -357,29 +335,6 @@
       color: #cf1322;
     }
 
-    .llm-setting__switch {
-      flex-direction: row;
-      gap: 12px;
-      align-items: center;
-      justify-content: space-between;
-      padding: 10px 12px;
-      background: #f8fafc;
-      border: 1px solid #e5e7eb;
-      border-radius: 8px;
-    }
-
-    .llm-setting__switch-main {
-      display: flex;
-      flex-direction: column;
-      gap: 2px;
-    }
-
-    .llm-setting__hint {
-      font-size: 12px;
-      line-height: 1.6;
-      color: #9ca3af;
-    }
-
     @media screen and (max-width: 640px) {
       .llm-setting__row,
       .llm-setting__row--three {