lex-xin 3 年之前
父节点
当前提交
48d21517cc

文件差异内容过多而无法显示
+ 0 - 0
dist/index.html


+ 1 - 1
dist/static/css/chunk-5529decc.f189ebaa.css → dist/static/css/chunk-5117cd7b.a48d89af.css

@@ -1 +1 @@
-.scroll[data-v-526b8a10]{overflow:auto;max-height:400px}.scroll[data-v-526b8a10] .container{padding:0}.dialog-footer[data-v-526b8a10]{display:block;text-align:right;margin-top:20px}.dialog-footer[data-v-d2c96288]{display:block;text-align:right}[data-v-d2c96288] .el-dialog__body{padding:10px 10px 20px}.courseMask .el-dialog__body[data-v-25a4eba5]{padding-bottom:0}
+.scroll[data-v-526b8a10]{overflow:auto;max-height:400px}.scroll[data-v-526b8a10] .container{padding:0}.dialog-footer[data-v-526b8a10]{display:block;text-align:right;margin-top:20px}.dialog-footer[data-v-64c6eac0]{display:block;text-align:right}[data-v-64c6eac0] .el-dialog__body{padding:10px 10px 20px}.courseMask .el-dialog__body[data-v-25a4eba5]{padding-bottom:0}

文件差异内容过多而无法显示
+ 0 - 0
dist/static/js/app.1a4122b8.js


文件差异内容过多而无法显示
+ 0 - 0
dist/static/js/chunk-5117cd7b.f5389f06.js


文件差异内容过多而无法显示
+ 0 - 0
dist/static/js/chunk-5529decc.6c5caa48.js


+ 7 - 3
src/views/tenantSetting/model/addProtocol.vue

@@ -47,9 +47,9 @@
         ]"
       >
         <singe-file-upload
-          tips="仅支持上传 doc/docx 格式文件"
+          tips="仅支持上传 docx 格式文件"
           buttonText="点击上传协议"
-          accept=".doc, .docx"
+          accept=".docx"
           @inputFile="readFileInputEventAsArrayBuffer"
           v-model="form.origanalFileUrl"
         />
@@ -125,15 +125,19 @@ export default {
       this.fileContent = newHTML
     },
     readFileInputEventAsArrayBuffer(file) {
+      console.log(file)
       let reader = new FileReader();
       let that = this
       reader.onload = function(loadEvent) {
         let arrayBuffer = loadEvent.target.result; //arrayBuffer
-        mammoth
+          mammoth
           .convertToHtml({ arrayBuffer: arrayBuffer })
           .then(function(result) {
             console.log(result)
             that.displayResult(result)
+          }).catch(function(e) {
+            that.form.origanalFileUrl = null
+            that.$message.error('上传文件有误,请重新上传')
           })
           .done();
       };

部分文件因为文件数量过多而无法显示