tangning 3 月之前
父节点
当前提交
1932311577
共有 4 个文件被更改,包括 8 次插入5 次删除
  1. 0 1
      src/store/case.ts
  2. 1 1
      src/util/ollama.js
  3. 0 1
      src/view/case/draw/selectMapImage.vue
  4. 7 2
      src/view/case/records/index.vue

+ 0 - 1
src/store/case.ts

@@ -276,7 +276,6 @@ export const getSceneListHasAi = (caseId: number) =>
 export const getTipsList = (key) =>
   axios.get(getTips, { params: { 
     basic: 'y',
-
     key,
     location: '113.05,22.61',
    } });

+ 1 - 1
src/util/ollama.js

@@ -13,7 +13,7 @@ export function chatWithHistory(model, userMsg, history, systemMsg) {
   });
 }
 
-export function chat(userMsg, systemMsg) {
+export function chat(systemMsg, userMsg) {
   return ollama.chat({
     model: 'deepseek-r1:70b',
     messages: [

+ 0 - 1
src/view/case/draw/selectMapImage.vue

@@ -281,7 +281,6 @@ const getMapInfo = (): MapInfo => {
 };
 const onSearch = (val) => {
   getTipsList(val).then((res) => {
-    console.log("getTipsList", res);
     keywordList.value = res.data;
   });
   console.log("onSearch", val, "keyword.value", keyword.value);

+ 7 - 2
src/view/case/records/index.vue

@@ -498,6 +498,7 @@
         <el-select
           v-model="aiImgData.src"
           placeholder="请选择平面图"
+          :disabled="isOption"
           style="display: block;"
           size="large"
         >
@@ -524,10 +525,10 @@ border: 1px solid #D9D9D9;min-height: 450px">
       <template #footer>
         <div class="dialog-footer text-center flex">
           <div style="width: 50%">
-            <el-button type="primary" :disabled="!aiImgData.src || aiImgData.loading" @click="handleAI"> 识别 </el-button>
+            <el-button type="primary" :disabled="isOption || !aiImgData.src || aiImgData.loading" @click="handleAI"> 识别 </el-button>
           </div>
           <div style="width: 50%">
-            <el-button :disabled="!aiImgData.result" @click="handleCopy"> 复制 </el-button>
+            <el-button :disabled="isOption || !aiImgData.result" @click="handleCopy"> 复制 </el-button>
           </div>
         </div>
       </template>
@@ -559,6 +560,7 @@ const fileId = computed(() => router.currentRoute.value?.params?.fileId);
 const caseId = computed(() => router.currentRoute.value?.params?.caseId);
 const isDisableExport = ref(false);
 const aiImgShow = ref(false)
+const isOption = ref(false);
 const aiImgData = ref({
   src: '',
   result: ``,
@@ -648,6 +650,7 @@ const handleShowAi = async () => {
   aiImgData.value.list = list.filter((i) => i.url);
   aiImgData.value.src = list[0]?.url;
   aiImgShow.value = true;
+  isOption.value = false;
 }
 //判断是否deepseek
 let isThink = ref(false);
@@ -655,6 +658,7 @@ let testRegex = /deepseek/;
 const handleAI = async () => {
   aiImgData.value.loading = true;
   aiImgData.value.result = '';
+  isOption.value = true;
   const item = aiImgData.value.list.find(i => i.url == aiImgData.value.src)
   try {
   // const res = await getAiByImage({imageUrl: imageUrl})
@@ -695,6 +699,7 @@ const handleAI = async () => {
         // }
         // autoScrollSwitch.value && scrollToBottom(true);
       }
+      isOption.value = false;
       console.log("handleAI完成", aiImgData.value.result)
   })
   // console.log("handleAI", res)