按钮loading-项目清单确认流程

This commit is contained in:
zyn
2023-11-06 15:34:13 +08:00
parent 5bfda5feca
commit 7cbd4aa728
5 changed files with 64 additions and 28 deletions
@@ -876,7 +876,7 @@ export default {
managementHostName: "", //管理主体 managementHostName: "", //管理主体
developmentHostName: "", //开发主体 developmentHostName: "", //开发主体
categoryName: "", //项目细分类 categoryName: "", //项目细分类
carType: "" carType: ""
}, },
qdform: { qdform: {
projectId:"", projectId:"",
@@ -1381,6 +1381,7 @@ export default {
this.$refs["Form"].validate((valid) => { this.$refs["Form"].validate((valid) => {
if (valid) { if (valid) {
this.isSubmit = true; this.isSubmit = true;
this.saveLoading = true
this.$http.post("lawss/activiti/startProcessRollBack", { this.$http.post("lawss/activiti/startProcessRollBack", {
createUser: this.$store.getters.userInfo.userId, createUser: this.$store.getters.userInfo.userId,
createUserName: this.$store.getters.userInfo.userName, createUserName: this.$store.getters.userInfo.userName,
@@ -1415,7 +1416,11 @@ export default {
this.$router.push("/processCenter"); this.$router.push("/processCenter");
} }
this.isSubmit = false; this.isSubmit = false;
this.saveLoading = false
}); });
} else {
this.saveLoading = false
this.isSubmit = false
} }
}); });
} else { } else {
@@ -1430,6 +1435,7 @@ export default {
//保存事件 //保存事件
handleSave() { handleSave() {
this.saveLoading = true; this.saveLoading = true;
this.isSubmit = true;
let _formData = new FormData(); let _formData = new FormData();
this.qdform.dataList = this.dataList this.qdform.dataList = this.dataList
_formData.append("id", this.bpnId || ""); _formData.append("id", this.bpnId || "");
@@ -1443,11 +1449,11 @@ export default {
commentText: this.commentText commentText: this.commentText
})); }));
saveTaskFirst(_formData).then(res => { saveTaskFirst(_formData).then(res => {
this.saveLoading = false;
this.$message.success("保存成功"); this.$message.success("保存成功");
this.bpnId = res.result; this.bpnId = res.result;
}).catch(e => { }).finally(() => {
this.saveLoading = false; this.saveLoading = false;
this.isSubmit = false;
}); });
}, },
// 将文本状态的id与name对应 // 将文本状态的id与name对应
@@ -635,7 +635,6 @@
show-transfer show-transfer
show-affirm show-affirm
:submitLoading="isSubmit" :submitLoading="isSubmit"
:transfer-loading="isTransfer"
:saveLoading="saveLoading" :saveLoading="saveLoading"
@submit="handleSubmit" @submit="handleSubmit"
@transfer="handleTransfer" @transfer="handleTransfer"
@@ -781,14 +780,14 @@ export default {
}, },
//确认转办 //确认转办
checkedTransferRole (data) { checkedTransferRole (data) {
this.assigneeNewLoading = true this.saveLoading = true
this.isSubmit = true
changeAssigneeNew({ changeAssigneeNew({
taskId: this.$route.query.taskIds, // 任务id taskId: this.$route.query.taskIds, // 任务id
assignee: data[0].id, // 被委托人 assignee: data[0].id, // 被委托人
userId: this.$store.getters.userInfo.userId, // 委托人 userId: this.$store.getters.userInfo.userId, // 委托人
pId: this.$route.query.prcId // 流程实例 pId: this.$route.query.prcId // 流程实例
}).then(res => { }).then(res => {
this.isTransfer = false
if (res.success) { if (res.success) {
this.drawerModal = false this.drawerModal = false
this.$message.success('调整成功') this.$message.success('调整成功')
@@ -797,6 +796,9 @@ export default {
} else { } else {
this.$message.warning(res.message) this.$message.warning(res.message)
} }
}).finally(() => {
this.saveLoading = false
this.isSubmit = false
}) })
}, },
// 请求转换流程图 // 请求转换流程图
@@ -914,6 +916,7 @@ export default {
// 接受按钮 // 接受按钮
handleAccept(){ handleAccept(){
this.isSubmit = true this.isSubmit = true
this.saveLoading = true
execTask({ execTask({
todoId: this.todoId // 当前节点ID todoId: this.todoId // 当前节点ID
}).then(res => { }).then(res => {
@@ -921,12 +924,15 @@ export default {
this.$message.success('接收成功') this.$message.success('接收成功')
this.$router.push('/processCenter') this.$router.push('/processCenter')
} }
this.isSubmit = false }).finally(() => {
}) this.isSubmit = false;
this.saveLoading = false;
});
}, },
//保存事件 //保存事件
handleSave() { handleSave() {
this.saveLoading = true; this.saveLoading = true;
this.isSubmit = true;
let _formData = new FormData(); let _formData = new FormData();
this.qdform.dataList = this.dataList this.qdform.dataList = this.dataList
_formData.append("id", this.bpnId || ""); _formData.append("id", this.bpnId || "");
@@ -940,7 +946,8 @@ export default {
this.saveLoading = false; this.saveLoading = false;
this.$message.success("保存成功"); this.$message.success("保存成功");
this.bpnId = res.result; this.bpnId = res.result;
}).catch(e => { }).finally(() => {
this.isSubmit = false;
this.saveLoading = false; this.saveLoading = false;
}); });
}, },
@@ -952,6 +959,7 @@ export default {
} }
}) })
this.isSubmit = true; this.isSubmit = true;
this.saveLoading = true;
this.qdform.commentText = this.commentText; this.qdform.commentText = this.commentText;
this.qdform.dataList = this.dataList this.qdform.dataList = this.dataList
const json = JSON.stringify(this.qdform); const json = JSON.stringify(this.qdform);
@@ -967,6 +975,7 @@ export default {
this.$router.push("/processCenter"); this.$router.push("/processCenter");
} }
this.isSubmit = false; this.isSubmit = false;
this.saveLoading = false;
}, e => { }, e => {
}); });
}, },
@@ -635,7 +635,6 @@
show-transfer show-transfer
show-affirm show-affirm
:submitLoading="isSubmit" :submitLoading="isSubmit"
:transfer-loading="isTransfer"
:saveLoading="saveLoading" :saveLoading="saveLoading"
@submit="handleSubmit" @submit="handleSubmit"
@transfer="handleTransfer" @transfer="handleTransfer"
@@ -781,14 +780,14 @@ export default {
}, },
//确认转办 //确认转办
checkedTransferRole (data) { checkedTransferRole (data) {
this.assigneeNewLoading = true this.isSubmit = true
this.saveLoading = true
changeAssigneeNew({ changeAssigneeNew({
taskId: this.$route.query.taskIds, // 任务id taskId: this.$route.query.taskIds, // 任务id
assignee: data[0].id, // 被委托人 assignee: data[0].id, // 被委托人
userId: this.$store.getters.userInfo.userId, // 委托人 userId: this.$store.getters.userInfo.userId, // 委托人
pId: this.$route.query.prcId // 流程实例 pId: this.$route.query.prcId // 流程实例
}).then(res => { }).then(res => {
this.isTransfer = false
if (res.success) { if (res.success) {
this.drawerModal = false this.drawerModal = false
this.$message.success('调整成功') this.$message.success('调整成功')
@@ -797,7 +796,10 @@ export default {
} else { } else {
this.$message.warning(res.message) this.$message.warning(res.message)
} }
}) }).finally(() => {
this.isSubmit = false;
this.saveLoading = false;
});
}, },
// 请求转换流程图 // 请求转换流程图
processNum (row) { processNum (row) {
@@ -913,6 +915,7 @@ export default {
// 接受按钮 // 接受按钮
handleAccept(){ handleAccept(){
this.isSubmit = true this.isSubmit = true
this.saveLoading = true
execTask({ execTask({
todoId: this.todoId // 当前节点ID todoId: this.todoId // 当前节点ID
}).then(res => { }).then(res => {
@@ -920,12 +923,15 @@ export default {
this.$message.success('接收成功') this.$message.success('接收成功')
this.$router.push('/processCenter') this.$router.push('/processCenter')
} }
this.isSubmit = false }).finally(() => {
}) this.isSubmit = false;
this.saveLoading = false;
});
}, },
//保存事件 //保存事件
handleSave() { handleSave() {
this.saveLoading = true; this.saveLoading = true;
this.isSubmit = true;
let _formData = new FormData(); let _formData = new FormData();
this.qdform.dataList = this.dataList this.qdform.dataList = this.dataList
_formData.append("id", this.bpnId || ""); _formData.append("id", this.bpnId || "");
@@ -936,11 +942,11 @@ export default {
commentText: this.commentText commentText: this.commentText
})); }));
saveTaskForPub(_formData).then(res => { saveTaskForPub(_formData).then(res => {
this.saveLoading = false;
this.$message.success("保存成功"); this.$message.success("保存成功");
this.bpnId = res.result; this.bpnId = res.result;
}).catch(e => { }).finally(() => {
this.saveLoading = false; this.saveLoading = false;
this.isSubmit = false;
}); });
}, },
//提交事件 //提交事件
@@ -951,6 +957,7 @@ export default {
} }
}) })
this.isSubmit = true; this.isSubmit = true;
this.saveLoading = true;
this.qdform.commentText = this.commentText; this.qdform.commentText = this.commentText;
this.qdform.dataList = this.dataList this.qdform.dataList = this.dataList
const json = JSON.stringify(this.qdform); const json = JSON.stringify(this.qdform);
@@ -966,6 +973,7 @@ export default {
this.$router.push("/processCenter"); this.$router.push("/processCenter");
} }
this.isSubmit = false; this.isSubmit = false;
this.saveLoading = false;
}, e => { }, e => {
}); });
}, },
@@ -627,7 +627,6 @@
show-transfer show-transfer
show-affirm show-affirm
:submitLoading="isSubmit" :submitLoading="isSubmit"
:transfer-loading="isTransfer"
:saveLoading="saveLoading" :saveLoading="saveLoading"
@submit="handleSubmit" @submit="handleSubmit"
@transfer="handleTransfer" @transfer="handleTransfer"
@@ -774,14 +773,14 @@ export default {
}, },
//确认转办 //确认转办
checkedTransferRole (data) { checkedTransferRole (data) {
this.assigneeNewLoading = true this.isSubmit = true
this.saveLoading = true
changeAssigneeNew({ changeAssigneeNew({
taskId: this.$route.query.taskIds, // 任务id taskId: this.$route.query.taskIds, // 任务id
assignee: data[0].id, // 被委托人 assignee: data[0].id, // 被委托人
userId: this.$store.getters.userInfo.userId, // 委托人 userId: this.$store.getters.userInfo.userId, // 委托人
pId: this.$route.query.prcId // 流程实例 pId: this.$route.query.prcId // 流程实例
}).then(res => { }).then(res => {
this.isTransfer = false
if (res.success) { if (res.success) {
this.drawerModal = false this.drawerModal = false
this.$message.success('调整成功') this.$message.success('调整成功')
@@ -790,7 +789,10 @@ export default {
} else { } else {
this.$message.warning(res.message) this.$message.warning(res.message)
} }
}) }).finally(() => {
this.isSubmit = false;
this.saveLoading = false;
});
}, },
// 请求转换流程图 // 请求转换流程图
processNum (row) { processNum (row) {
@@ -907,6 +909,7 @@ export default {
// 接受按钮 // 接受按钮
handleAccept(){ handleAccept(){
this.isSubmit = true this.isSubmit = true
this.saveLoading = true
execTask({ execTask({
todoId: this.todoId // 当前节点ID todoId: this.todoId // 当前节点ID
}).then(res => { }).then(res => {
@@ -914,7 +917,8 @@ export default {
this.$message.success('接收成功') this.$message.success('接收成功')
this.$router.push('/processCenter') this.$router.push('/processCenter')
} }
this.isSubmit = false this.isSubmit = false;
this.saveLoading = false;
}) })
}, },
//提交事件 //提交事件
@@ -928,6 +932,8 @@ export default {
this.qdform.commentText = this.commentText; this.qdform.commentText = this.commentText;
this.qdform.dataList = this.dataList this.qdform.dataList = this.dataList
const json = JSON.stringify(this.qdform); const json = JSON.stringify(this.qdform);
this.isSubmit = true
this.saveLoading = true
this.$http.post("lawss/activiti/completeTask", { this.$http.post("lawss/activiti/completeTask", {
taskIds: this.taskIds, taskIds: this.taskIds,
userId: this.userId, userId: this.userId,
@@ -940,6 +946,7 @@ export default {
this.$router.push("/processCenter"); this.$router.push("/processCenter");
} }
this.isSubmit = false; this.isSubmit = false;
this.saveLoading = false;
}, e => { }, e => {
}); });
}, },
@@ -627,7 +627,6 @@
show-transfer show-transfer
show-affirm show-affirm
:submitLoading="isSubmit" :submitLoading="isSubmit"
:transfer-loading="isTransfer"
:saveLoading="saveLoading" :saveLoading="saveLoading"
@submit="handleSubmit" @submit="handleSubmit"
@transfer="handleTransfer" @transfer="handleTransfer"
@@ -772,14 +771,14 @@ export default {
}, },
//确认转办 //确认转办
checkedTransferRole (data) { checkedTransferRole (data) {
this.assigneeNewLoading = true this.isSubmit = true
this.saveLoading = true
changeAssigneeNew({ changeAssigneeNew({
taskId: this.$route.query.taskIds, // 任务id taskId: this.$route.query.taskIds, // 任务id
assignee: data[0].id, // 被委托人 assignee: data[0].id, // 被委托人
userId: this.$store.getters.userInfo.userId, // 委托人 userId: this.$store.getters.userInfo.userId, // 委托人
pId: this.$route.query.prcId // 流程实例 pId: this.$route.query.prcId // 流程实例
}).then(res => { }).then(res => {
this.isTransfer = false
if (res.success) { if (res.success) {
this.drawerModal = false this.drawerModal = false
this.$message.success('调整成功') this.$message.success('调整成功')
@@ -788,7 +787,10 @@ export default {
} else { } else {
this.$message.warning(res.message) this.$message.warning(res.message)
} }
}) }).finally(() => {
this.isSubmit = false;
this.saveLoading = false;
});
}, },
// 请求转换流程图 // 请求转换流程图
processNum (row) { processNum (row) {
@@ -904,6 +906,7 @@ export default {
// 接受按钮 // 接受按钮
handleAccept(){ handleAccept(){
this.isSubmit = true this.isSubmit = true
this.saveLoading = true
execTask({ execTask({
todoId: this.todoId // 当前节点ID todoId: this.todoId // 当前节点ID
}).then(res => { }).then(res => {
@@ -911,7 +914,8 @@ export default {
this.$message.success('接收成功') this.$message.success('接收成功')
this.$router.push('/processCenter') this.$router.push('/processCenter')
} }
this.isSubmit = false this.isSubmit = false;
this.saveLoading = false;
}) })
}, },
//提交事件 //提交事件
@@ -921,7 +925,8 @@ export default {
this.$set(item, 'standId', item.id) this.$set(item, 'standId', item.id)
} }
}) })
this.isSubmit = true; this.isSubmit = true
this.saveLoading = true
this.qdform.commentText = this.commentText; this.qdform.commentText = this.commentText;
this.qdform.dataList = this.dataList this.qdform.dataList = this.dataList
const json = JSON.stringify(this.qdform); const json = JSON.stringify(this.qdform);
@@ -937,6 +942,7 @@ export default {
this.$router.push("/processCenter"); this.$router.push("/processCenter");
} }
this.isSubmit = false; this.isSubmit = false;
this.saveLoading = false;
}, e => { }, e => {
}); });
}, },