Commit a70b5861 by zhangquan

添加loading

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