【修改】限制邮箱最多50
This commit is contained in:
@@ -92,7 +92,7 @@
|
||||
|
||||
<el-button class="uploadBtn" @click="dialogFile=true">
|
||||
|
||||
{{fileList.length>0?'查看文件':'选择文件'}}
|
||||
{{fileList.length>0?('上传文件(已上传'+fileList.length+'个文件)'):'上传文件'}}
|
||||
</el-button>
|
||||
|
||||
</el-form-item>
|
||||
@@ -117,9 +117,9 @@
|
||||
}" :workNumFlag="true" :isOrg="true" :maxSelected="1" @confirm="isTreeOk"></orgTable>
|
||||
<el-dialog title="上传文件" :visible.sync="dialogFile" width="10%" :close-on-click-modal="false"
|
||||
:close-on-press-escape="false" modal-append-to-body append-to-body>
|
||||
<el-upload :disabled="formControl" action="#" :http-request="(params) => uploadFile(params)" :show-file-list="true"
|
||||
<el-upload :disabled="formControl" action="/library/api/report/uploadFile" :show-file-list="true"
|
||||
:before-upload="beforeUploadFile" :on-remove="handleRemove"
|
||||
:file-list="fileList" multiple
|
||||
:file-list="fileList" multiple :on-success="onSuccess"
|
||||
drag :class="{'disable':formControl}">
|
||||
<i class="el-icon-upload" ></i>
|
||||
<div class="el-upload__text">点击或拖拽上传文件</div>
|
||||
@@ -478,11 +478,26 @@ export default {
|
||||
})
|
||||
this.$forceUpdate()
|
||||
},
|
||||
onSuccess(res, file,fileList){
|
||||
if(res.ok){
|
||||
// this.fileList.push({url:res.data.fullurl})//以前的错误代码
|
||||
this.fileList=fileList
|
||||
this.form.fileList = this.fileList.map(item=>{
|
||||
return {
|
||||
fileId:item.id,
|
||||
fileName:item.name
|
||||
}
|
||||
})
|
||||
this.$refs.processFormRef.clearValidate(['fileList'])
|
||||
}
|
||||
console.log( res," this.fileList3")
|
||||
},
|
||||
// 上传文件
|
||||
uploadFile(params) {
|
||||
let fd = new FormData();
|
||||
fd.append('file', params.file);
|
||||
this.$api.report.reportUploadFile(fd).then(({data}) => {
|
||||
console.log( this.fileList," this.fileList")
|
||||
this.fileList.push(data)
|
||||
this.form.fileList = this.fileList.map(item=>{
|
||||
return {
|
||||
@@ -492,6 +507,7 @@ export default {
|
||||
})
|
||||
this.$refs.processFormRef.clearValidate(['fileList'])
|
||||
})
|
||||
console.log( this.fileList," this.fileList22222")
|
||||
},
|
||||
// 上传文件前
|
||||
beforeUploadFile(file) {
|
||||
|
||||
Reference in New Issue
Block a user