Commit a70b5861 by zhangquan

添加loading

1 parent a8097465
......@@ -224,12 +224,21 @@
const fileName = file.name.split('.')
//fileUrl: 文件名 + @ + base64拼接
const fileUrl = fileName.pop() + '@' + arrBase64[1]
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.3)'
})
this.$apis.addCode.uploadCodeFile({ file: fileUrl }).then(res => {
loading.close()
if(res?.batchNo) {
res.fileName = file?.name
this.errorFileInfo = res
}
this.$refs.file.value = ''
}).catch(err =>{
loading.close()
})
}
},
......@@ -258,10 +267,24 @@
onOk(){
if(this.addType==1){
this.formatContractNo()
if(this?.contractNoList?.length>20){
return this.$message({
message:'最多输入20个合同号',
type: 'error',
customClass: 'msgHierarchy'
})
}
const params = {
contractNoList: this.contractNoList.map(item => item.val)
}
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.3)'
})
this.$apis.addCode.createCode(params).then(res => {
loading.close()
if(res?.batchNo){
if(res?.invalidList?.length){
this.$message({
......@@ -282,6 +305,8 @@
this.$message.success('操作成功')
}
}
}).catch(err =>{
loading.close()
})
}else{
if(this.errorFileInfo.effectiveSize<=0){
......@@ -343,8 +368,10 @@
}
.manual {
margin-top: 10px;
padding-left: 154px;
.contract_input {
margin-left: 154px;
width: 432px;
/deep/ .el-textarea__inner {
width: 432px;
height: 79px;
......@@ -354,6 +381,7 @@
}
}
.textarea_tip{
margin-left: 154px;
font-weight: 400;
font-size: 12px;
color: red;
......@@ -361,12 +389,14 @@
}
.contract_area{
margin-top: 10px;
width: 432px;
width: 600px;
max-height: 340px;
overflow-y: auto;
margin-left: 60px;
.contract_item{
height: 26px;
min-width: 280px;
width: 280px;
white-space: nowrap;
display: inline-flex;
justify-content: space-between;
align-items: center;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!