tangning 4 months ago
parent
commit
785cc059ca
2 changed files with 7 additions and 8 deletions
  1. 1 1
      src/view/case/draw/slider.vue
  2. 6 7
      src/view/case/records/index.vue

+ 1 - 1
src/view/case/draw/slider.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="df-slide-content">
-    <h3>{{ route.name == 'drawShareFile'?'平面图':fileDesc[type] }}</h3>
+    <h3>{{ route.name == 'drawShareFile'?'导入':fileDesc[type] }}</h3>
     <div class="def-image-set">
       <el-button type="primary" @click="emit('trackImage')" ghost>
         {{ route.name == 'drawShareFile'?'地图': `设置${fileDesc[type]}` }}

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

@@ -503,8 +503,8 @@
           <el-option
             v-for="item in aiImgData.list"
             :key="item.num"
-            :label="item.num"
-            :value="item.urls[0]"
+            :label="item.title"
+            :value="item.url"
           />
         </el-select>
         <div class="viewImg mt-4 text-center" style="height: 400px; line-height: 400px; border-radius: 0px 0px 0px 0px;
@@ -644,8 +644,8 @@ const handleCopy = () => {
 }
 const handleShowAi = async () => {
   const list = await getFloorList(caseId.value)
-  aiImgData.value.list = list.filter((i) => i.urls && i.urls.length);
-  aiImgData.value.src = list[0]?.urls[0];
+  aiImgData.value.list = list.filter((i) => i.url);
+  aiImgData.value.src = list[0]?.url;
   aiImgShow.value = true;
 }
 //判断是否deepseek
@@ -653,11 +653,10 @@ let isThink = ref(false);
 let testRegex = /deepseek/;
 const handleAI = async () => {
   aiImgData.value.loading = true;
-  let orgin = window.location.origin;
-  let imageUrl = orgin + aiImgData.value.src
+  const item = aiImgData.value.list.find(i => i.url == aiImgData.value.src)
   try {
   // const res = await getAiByImage({imageUrl: imageUrl})
-  chat('', '人为什么要吃饭').then(async stream => {
+  chat('', item.params?.toString() + item.paramContent).then(async stream => {
     for await (const part of stream) {
         // chatHistory.value.at(idx).text += part.message.content;
         let tep_mesg = part.message.content;