yuanhao
2025-06-05 0f064cb5e6e0bc6d979c292b0b94b7905f27d66a
pages/aiQuestions/aiQuestions.vue
@@ -63,7 +63,7 @@
                  </view>
                  <view style="font-size: 26rpx;"  v-html="markdown.render(item.aiLog)"></view>
                  <view class="file-list" v-if="item.docInfo.length&&item.isEnd">
                     <view class="one-file" v-for="(file,findex) in item.docInfo" :key='findex'>
                     <view class="one-file" @click="uploadFile(file)" v-for="(file,findex) in item.docInfo" :key='findex'>
                        <image :src="getImg(file.docFormat)" mode=""></image>
                        <text>{{file.docName}}</text>
                     </view>
@@ -409,6 +409,10 @@
         document.removeEventListener('contextmenu', this.noContextmenu)
      },
      methods: {
         uploadFile(file) {
            console.log(file.docPath);
            window.open(this.baseUrl + file.docPath)
         },
         chooseThisLLM(e) {
            this.chooseLlm = e;
         },
@@ -832,8 +836,9 @@
            }
            // 解码数据数组的前半部分,并提取文档ID
            const idStr = textDecoder.decode(dataArr.slice(0, idx)).trim()
            const idArr = idStr.substring(idStr.indexOf(":") + 1).match(/\d+/g)
            const docIds = idArr.join(',')
            // const idArr = idStr.substring(idStr.indexOf(":") + 1).match(/\d+/g)
            const idArr = idStr.substring(idStr.indexOf(":") + 1)
            const docIds = idArr.split(',')
            // 如果文档ID有效且不为'0',则查询文档
            if (docIds && docIds !== '0' && !this.suspend) {
               // 根据文档ID列表获取文档信息
@@ -855,7 +860,7 @@
                     // lastMsgBot.scrollIntoView(false)
                  })
               })
               return idArr.join(',')
               return idArr.split(',')
            }
            return docIds
         },