拆分条款详情修改

This commit is contained in:
caoyang
2022-04-08 22:49:48 +08:00
parent cfd47d4233
commit 7d9dc44461
9 changed files with 110 additions and 98 deletions
+30 -5
View File
@@ -21,6 +21,15 @@
<!-- <a-button type="primary" ghost class="ant-upload-text" style="font-size: 14px;line-height: 30px">{{$t('clickUpload')}}</a-button>-->
</a-upload>
<!-- </a-modal>-->
<a-modal
:title="''"
class="split-error"
:visible="preErrVisible"
@cancel="handleErrCancel"
:footer="false"
>
<span class="err-value">{{errValue}}</span>
</a-modal>
</div>
</template>
@@ -44,7 +53,9 @@
accept:'application/zip',
uploadData:{
},
cut:''
cut:'',
preErrVisible:false,
errValue:''
}
},
computed:{
@@ -76,13 +87,16 @@
// console.log(this.thisFileType,this.thisFileSize,this.thisFileUploadUrl);
},
methods:{
handleErrCancel(){
this.preErrVisible=false
},
beforeUpload(file,fileList) {
if(this.myfileList&&this.myfileList.length>=1){
this.$message.warning('只能上传一个文件')
return false
}else{
// let thisFileType = this.thisFileType.replace(/\s+/g, "");
console.log('typeee',file.type)
// console.log('typeee',file.type)
if(file.type==this.accept){
this.fileTypeSatus = true;
this.$message.destroy()
@@ -104,7 +118,14 @@
if(val.response.success){
this.$message.success(val.response.message);
}else{
this.$message.error(val.response.message);
if(val.response.code==1){
this.$message.error(val.response.message);
}else{
this.preErrVisible=true
this.errValue=val.response.message
}
}
info.fileList.splice(index,1)
@@ -167,7 +188,7 @@
})
if(this.myfileList.length > 0){
console.log('file1111',this.fileList)
// console.log('file1111',this.fileList)
this.$emit('uploadSuccess', this.fileList,'success')
this.$message.destroy()
this.$message.success(`${info.file.name} 文件上传成功`);
@@ -197,5 +218,9 @@
z-index: 1002;
}
}
.split-error{
.err-value{
margin-top: 10px;
}
}
</style>