Sfoglia il codice sorgente

Merge branch 'ai-support-word'

hbchen 8 mesi fa
parent
commit
71c0bd40b6
1 ha cambiato i file con 5 aggiunte e 5 eliminazioni
  1. 5 5
      src/views/operation_manage/AIQA/AIQA.vue

+ 5 - 5
src/views/operation_manage/AIQA/AIQA.vue

@@ -63,7 +63,7 @@
                 <div class="upload-row">
                     <el-upload
                     style="display: inline-block; margin-right: 8px"
-                    accept=".pptx,.pdf,.docx,.doc"
+                    accept=".pptx,.pdf,.docx"
                     action=""
                     :http-request="handleUpload"
                     :before-upload="handleBeforeUpload"
@@ -71,7 +71,7 @@
                     :disabled="startUploadAudio">
                         <img src="~@/assets/img/icons/ai-upload.png" />
                     </el-upload>
-                    <span>支持格式:PDF、PPTX、DOC、DOCX;大小不超过50MB</span>
+                    <span>支持格式:PDF、PPTX、DOCX;大小不超过50MB</span>
                 </div>
                 <textarea rows="6" v-model="inputText" placeholder="请输入提问,Shift+Enter换行" @keydown.enter="handleSendMsg"></textarea>
                 <div class="send-btn" @click="handleSendMsg"><img src="~@/assets/img/ai_m/send.png" />发送</div>
@@ -132,7 +132,7 @@ export default {
             aiFileIds:[],
             // 上传窗口的队列
             windowSet:new Set(),
-            fileTypeRule:new RegExp(/\.pdf|\.pptx|\.doc(x)?$/,'i')
+            fileTypeRule:new RegExp(/\.pdf|\.pptx|\.docx$/,'i')
         };
     },
     watch:{
@@ -461,7 +461,7 @@ export default {
                         }
                         this.handleUpload({file})
                     }else{
-                        return this.$message.error("上传文件格式只支持PDF、PPTX、DOC、DOCX");
+                        return this.$message.error("上传文件格式只支持PDF、PPTX、DOCX");
                     }
                 }
             }else{
@@ -472,7 +472,7 @@ export default {
         },
         handleBeforeUpload(e) {
             if(!this.fileTypeRule.test(e.name)){
-                this.$message.error("上传文件格式只支持PDF、PPTX、DOC、DOCX");
+                this.$message.error("上传文件格式只支持PDF、PPTX、DOCX");
                 return false;
             }
             if(!(e.size/1024/1024 < 50.1)){