Commit 2d2e3acc by zhangquan

添加loading

1 parent e1f09b97
...@@ -143,11 +143,19 @@ ...@@ -143,11 +143,19 @@
}else{ }else{
params.targetIds = this.changeContractObj.ids params.targetIds = this.changeContractObj.ids
} }
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.3)'
})
this.$apis.contractManager[API](params).then(res=>{ this.$apis.contractManager[API](params).then(res=>{
if(res) { if(res) {
this.$message.success('变更模板成功') this.$message.success('变更模板成功')
this.handleClose() this.handleClose()
} }
}).finally(end => {
loading.close()
}) })
}, },
handleClose(){ handleClose(){
......
...@@ -225,11 +225,19 @@ ...@@ -225,11 +225,19 @@
const params = { const params = {
templateIds: this.tipObj.ids templateIds: this.tipObj.ids
} }
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.3)'
})
this.$apis.contractManager.babchInitTemplateApi(params).then(res=>{ this.$apis.contractManager.babchInitTemplateApi(params).then(res=>{
if(res) { if(res) {
this.$message.success('初始化模板成功') this.$message.success('初始化模板成功')
this.closeTipDialog() this.closeTipDialog()
} }
}).finally(end => {
loading.close()
}) })
}, },
closeTipDialog(){ closeTipDialog(){
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!