生成账号 Loading加载添加

main
wanglei 2 months ago
parent 180a71d2ed
commit 024064ec1f

@ -1566,6 +1566,11 @@ export default {
// //
scpfzhSubmit(){ scpfzhSubmit(){
this.scpfzhLoading = true; this.scpfzhLoading = true;
const loading1 = this.$loading({
lock: true,
text: '生成中,请等待...',
spinner: 'el-icon-loading',
});
this.$refs["scpfzhForm"].validate(valid => { this.$refs["scpfzhForm"].validate(valid => {
if (valid) { if (valid) {
this.scpfzhForm.voteIds = this.scpfzhForm.votes.map(item => item.id).join(","); this.scpfzhForm.voteIds = this.scpfzhForm.votes.map(item => item.id).join(",");
@ -1579,10 +1584,12 @@ export default {
itemNames: itemNames, itemNames: itemNames,
}).then(response => { }).then(response => {
this.scpfzhLoading = false; this.scpfzhLoading = false;
loading1.close()
this.scpfzhOpen = false; this.scpfzhOpen = false;
this.$modal.msgSuccess("生成成功") this.$modal.msgSuccess("生成成功")
}).catch(()=>{ }).catch(()=>{
this.scpfzhLoading = false; this.scpfzhLoading = false;
loading1.close()
}) })
} }
}) })
@ -1683,6 +1690,13 @@ export default {
// //
drwScpfzhSubmit(){ drwScpfzhSubmit(){
this.drwScpfzhLoading = true this.drwScpfzhLoading = true
const loading1 = this.$loading({
lock: true,
text: '生成中,请等待...',
spinner: 'el-icon-loading',
});
this.$refs["drwScpfzhForm"].validate(valid => { this.$refs["drwScpfzhForm"].validate(valid => {
if (valid) { if (valid) {
let VoteIds=[]; let VoteIds=[];
@ -1700,10 +1714,12 @@ export default {
voteIds: VoteIds.join(','), voteIds: VoteIds.join(','),
}).then(response => { }).then(response => {
this.drwScpfzhLoading = false; this.drwScpfzhLoading = false;
loading1.close();
this.drwScpfzhOpen = false; this.drwScpfzhOpen = false;
this.$modal.msgSuccess("生成成功"); this.$modal.msgSuccess("生成成功");
}).catch(()=>{ }).catch(()=>{
this.drwScpfzhLoading = false; this.drwScpfzhLoading = false;
loading1.close();
}) })
} }
}) })

Loading…
Cancel
Save