Commit 90cdf3a2 authored by jiaxu.yan's avatar jiaxu.yan

feat: 检测报告上传文件限制为pdf

parent 877dc5c1
...@@ -27,11 +27,12 @@ ...@@ -27,11 +27,12 @@
</div> </div>
<el-upload <el-upload
class="upload-demo" class="upload-demo"
ref="fileUpload" ref="fileUpload"
:action="uploadImgUrl" :action="uploadImgUrl"
:on-preview="handlePreview" :on-preview="handlePreview"
v-model="model.file" v-model="model.file"
:on-remove="handleRemove" :on-remove="handleRemove"
accept=".pdf"
:before-remove="beforeRemove" :before-remove="beforeRemove"
:show-file-list="false" :show-file-list="false"
:limit="1" :limit="1"
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
:limit="1" :limit="1"
ref="fileUpload" ref="fileUpload"
:on-success="handleSuccess" :on-success="handleSuccess"
accept=".pdf"
:on-exceed="handleExceed" :on-exceed="handleExceed"
:headers="headers" :headers="headers"
> >
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
:before-remove="beforeRemove" :before-remove="beforeRemove"
:show-file-list="false" :show-file-list="false"
:limit="1" :limit="1"
accept=".pdf"
:on-success="handleSuccess" :on-success="handleSuccess"
:on-exceed="handleExceed" :on-exceed="handleExceed"
:headers="headers" :headers="headers"
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
</el-radio-group> </el-radio-group>
<el-upload <el-upload
class="upload-demo" class="upload-demo"
ref="fileUpload" ref="fileUpload"
:action="uploadImgUrl" :action="uploadImgUrl"
:on-preview="handlePreview" :on-preview="handlePreview"
v-model="model.file" v-model="model.file"
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
:before-remove="beforeRemove" :before-remove="beforeRemove"
:show-file-list="false" :show-file-list="false"
:limit="1" :limit="1"
accept=".pdf"
:on-success="handleSuccess" :on-success="handleSuccess"
:on-exceed="handleExceed" :on-exceed="handleExceed"
:headers="headers" :headers="headers"
...@@ -22,7 +23,7 @@ ...@@ -22,7 +23,7 @@
<el-button size="small" :disabled="status" type="primary" <el-button size="small" :disabled="status" type="primary"
>上传文件</el-button >上传文件</el-button
> >
<div slot="tip" class="el-upload__tip"> <div slot="tip" class="el-upload__tip">
<div v-if="model.path"> <div v-if="model.path">
<el-link :href="model.path">{{ model.name }}</el-link> <el-link :href="model.path">{{ model.name }}</el-link>
</div> </div>
...@@ -98,7 +99,7 @@ export default { ...@@ -98,7 +99,7 @@ export default {
value: '', value: '',
file: '', file: '',
path: '', path: '',
name:'' name: ''
} }
}, },
setDefaultValue(val) { setDefaultValue(val) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment