按钮loading-外部署名推荐审批流程

This commit is contained in:
zyn
2023-11-06 18:13:15 +08:00
parent a0dbd719aa
commit a3065afb5b
5 changed files with 38 additions and 18 deletions
@@ -644,6 +644,7 @@ export default {
// 保存按钮
handleSave() {
this.saveLoading = true
this.isSubmit = true
let _formData = new FormData()
_formData.append('id', this.bpnId || '')
_formData.append('createUser', this.$store.getters.userInfo.userId)
@@ -655,11 +656,11 @@ export default {
commentText: this.commentText
}))
saveTaskFirst(_formData).then(res => {
this.saveLoading = false
this.$message.success('保存成功')
this.bpnId = res.result
}).catch(e => {
}).finally(e => {
this.saveLoading = false
this.isSubmit = false
})
},
// 提交按钮
@@ -681,6 +682,7 @@ export default {
this.$refs["Form"].validate((valid) => {
if (valid) {
this.isSubmit = true
this.saveLoading = true
this.$http.post("lawss/activiti/startProcessRollBack", {
createUser: this.$store.getters.userInfo.userId,
createUserName: this.$store.getters.userInfo.userName,
@@ -714,7 +716,11 @@ export default {
this.$router.push("/processCenter");
}
this.isSubmit = false
this.saveLoading = false
});
} else {
this.saveLoading = false
this.isSubmit = false
}
});
} else {
@@ -739,6 +745,7 @@ export default {
this.$refs["Form"].validate((valid) => {
if (valid) {
this.isSubmit = true
this.saveLoading = true
this.$http.post("lawss/activiti/completeTask", {
taskIds: this.$route.query.taskIds,
userId: this.$store.getters.userInfo.userId,
@@ -751,6 +758,7 @@ export default {
this.$router.push("/processCenter");
}
this.isSubmit = false
this.saveLoading = false
});
} else {
return this.$message.warning("请完善人员信息");
@@ -144,8 +144,8 @@
show-transfer
show-submit
:submitLoading="isSubmit"
:transfer-loading="isTransfer"
:saveLoading="saveLoading"
:isSubmitBack="isSubmit"
:saveLoading="isSubmit"
:approval="true"
@back="beforeBack"
@transfer="handleTransfer"
@@ -256,14 +256,13 @@ export default {
methods: {
//确认转办
checkedTransferRole (data) {
this.assigneeNewLoading = true
this.isSubmit = true
changeAssigneeNew({
taskId: this.$route.query.taskIds, // 任务id
assignee: data[0].id, // 被委托人
userId: this.$store.getters.userInfo.userId, // 委托人
pId: this.$route.query.prcId // 流程实例
}).then(res => {
this.isTransfer = false
if (res.success) {
this.drawerModal = false
this.$message.success('调整成功')
@@ -272,6 +271,8 @@ export default {
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.isSubmit = false
})
},
processTable() {
@@ -397,6 +398,7 @@ export default {
roleForm: this.roleForm
}
var json = JSON.stringify(son)
this.isSubmit = true
this.$http.post("lawss/activiti/completeTask", {
taskIds: this.taskIds,
userId: this.userId,
@@ -408,6 +410,7 @@ export default {
this.$message.success(res.message);
this.$router.push("/processCenter");
}
this.isSubmit = false
}, e => {
});
}
@@ -144,8 +144,8 @@
show-transfer
show-submit
:submitLoading="isSubmit"
:transfer-loading="isTransfer"
:saveLoading="saveLoading"
:isSubmitBack="isSubmit"
:saveLoading="isSubmit"
:approval="true"
@back="beforeBack"
@transfer="handleTransfer"
@@ -256,14 +256,13 @@ export default {
methods: {
//确认转办
checkedTransferRole (data) {
this.assigneeNewLoading = true
this.isSubmit = true
changeAssigneeNew({
taskId: this.$route.query.taskIds, // 任务id
assignee: data[0].id, // 被委托人
userId: this.$store.getters.userInfo.userId, // 委托人
pId: this.$route.query.prcId // 流程实例
}).then(res => {
this.isTransfer = false
if (res.success) {
this.drawerModal = false
this.$message.success('调整成功')
@@ -272,6 +271,8 @@ export default {
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.isSubmit = false
})
},
processTable() {
@@ -397,6 +398,7 @@ export default {
roleForm: this.roleForm
}
var json = JSON.stringify(son)
this.isSubmit = true
this.$http.post("lawss/activiti/completeTask", {
taskIds: this.taskIds,
userId: this.userId,
@@ -408,6 +410,7 @@ export default {
this.$message.success(res.message);
this.$router.push("/processCenter");
}
this.isSubmit = false
}, e => {
});
}
@@ -144,8 +144,8 @@
show-transfer
show-submit
:submitLoading="isSubmit"
:transfer-loading="isTransfer"
:saveLoading="saveLoading"
:isSubmitBack="isSubmit"
:saveLoading="isSubmit"
:approval="true"
@back="beforeBack"
@transfer="handleTransfer"
@@ -256,14 +256,13 @@ export default {
methods: {
//确认转办
checkedTransferRole (data) {
this.assigneeNewLoading = true
this.isSubmit = true
changeAssigneeNew({
taskId: this.$route.query.taskIds, // 任务id
assignee: data[0].id, // 被委托人
userId: this.$store.getters.userInfo.userId, // 委托人
pId: this.$route.query.prcId // 流程实例
}).then(res => {
this.isTransfer = false
if (res.success) {
this.drawerModal = false
this.$message.success('调整成功')
@@ -272,6 +271,8 @@ export default {
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.isSubmit = false
})
},
processTable() {
@@ -397,6 +398,7 @@ export default {
roleForm: this.roleForm
}
var json = JSON.stringify(son)
this.isSubmit = true
this.$http.post("lawss/activiti/completeTask", {
taskIds: this.taskIds,
userId: this.userId,
@@ -408,6 +410,7 @@ export default {
this.$message.success(res.message);
this.$router.push("/processCenter");
}
this.isSubmit = false
}, e => {
});
}
@@ -144,8 +144,8 @@
show-transfer
show-submit
:submitLoading="isSubmit"
:transfer-loading="isTransfer"
:saveLoading="saveLoading"
:isSubmitBack="isSubmit"
:saveLoading="isSubmit"
:approval="true"
@back="beforeBack"
@transfer="handleTransfer"
@@ -256,14 +256,13 @@ export default {
methods: {
//确认转办
checkedTransferRole (data) {
this.assigneeNewLoading = true
this.isSubmit = true
changeAssigneeNew({
taskId: this.$route.query.taskIds, // 任务id
assignee: data[0].id, // 被委托人
userId: this.$store.getters.userInfo.userId, // 委托人
pId: this.$route.query.prcId // 流程实例
}).then(res => {
this.isTransfer = false
if (res.success) {
this.drawerModal = false
this.$message.success('调整成功')
@@ -272,6 +271,8 @@ export default {
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.isSubmit = false
})
},
processTable() {
@@ -397,6 +398,7 @@ export default {
roleForm: this.roleForm
}
var json = JSON.stringify(son)
this.isSubmit = true
this.$http.post("lawss/activiti/completeTask", {
taskIds: this.taskIds,
userId: this.userId,
@@ -408,6 +410,7 @@ export default {
this.$message.success(res.message);
this.$router.push("/processCenter");
}
this.isSubmit = false
}, e => {
});
}