按钮loading-未符合项整改流程

This commit is contained in:
zyn
2023-11-06 16:03:02 +08:00
parent 7cbd4aa728
commit 4ff2696b86
6 changed files with 75 additions and 63 deletions
@@ -608,6 +608,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)
@@ -619,12 +620,12 @@ export default {
commentText: this.commentText
}))
saveTaskFirst(_formData).then(res => {
this.saveLoading = false
this.$message.success('保存成功')
this.bpnId = res.result
}).catch(e => {
this.saveLoading = false
})
}).finally(() => {
this.isSubmit = false;
this.saveLoading = false;
});
},
// 提交按钮
handleSubmit() {
@@ -650,6 +651,7 @@ export default {
this.$refs['roleForm'].validate((valid) => {
if (valid) {
this.isSubmit = true
this.saveLoading = true
let paramsInfo = new FormData()
// paramsInfo.append('id', this.bpnId || '')
paramsInfo.append('createUser', this.$store.getters.userInfo.userId)
@@ -680,7 +682,13 @@ export default {
this.$router.push("/processCenter");
}
this.isSubmit = false
})
}).finally(() => {
this.isSubmit = false;
this.saveLoading = false;
});
}).catch(e => {
this.isSubmit = false;
this.saveLoading = false;
})
}
})
@@ -698,6 +706,8 @@ export default {
commentText: this.commentText
}
};
this.isSubmit = true
this.saveLoading = true
this.$http.post("lawss/activiti/completeTaskNew", {
taskIds: this.$route.query.taskIds,
userId: this.$store.getters.userInfo.userId,
@@ -719,6 +729,7 @@ export default {
this.$router.push("/processCenter");
}
this.isSubmit = false;
this.saveLoading = false;
});
} else {
this.isSubmit = false;
@@ -151,8 +151,8 @@
show-transfer
show-back
:submitLoading="isSubmit"
:saveLoading="saveLoading"
:transferLoading="turnLoading"
:isSubmitBack="isSubmit"
:saveLoading="isSubmit"
@back="beforeBack"
@transfer="handleTurnTo"
@save="handleSave"
@@ -322,7 +322,7 @@ export default {
},
// 保存按钮
handleSave() {
this.saveLoading = true
this.isSubmit = true
let _formData = new FormData()
_formData.append('taskIds', this.taskIds)
_formData.append('json', JSON.stringify({
@@ -331,11 +331,10 @@ export default {
commentInfo: this.commentInfo
}))
saveTaskForPub(_formData).then(res => {
this.saveLoading = false
this.$message.success('保存成功')
this.bpnId = res.result
}).catch(e => {
this.saveLoading = false
}).finally(e => {
this.isSubmit = false
})
},
//驳回按钮
@@ -370,13 +369,13 @@ export default {
params.set('json', JSON.stringify(json))
params.set('userId', this.$store.getters.userInfo.userId)
params.set('taskIds', this.taskIds)
this.isSubmit = true
completeTask(params).then(res => {
if(res.success === true) {
this.$message.success('提交成功')
this.$router.push("/processCenter");
}
this.isSubmit = false
}).catch(e => {
}).finally(() => {
this.isSubmit = false
})
}
@@ -384,7 +383,6 @@ export default {
},
// 提交按钮
handleSubmit() {
this.isSubmit = true
let zqa = new Map();
for (let lastDataListElement of this.dataList) {
let a = zqa.get(lastDataListElement.dutyPeopleInfoId)
@@ -420,20 +418,20 @@ export default {
params.set('json', JSON.stringify(json))
params.set('userId', this.$store.getters.userInfo.userId)
params.set('taskIds', this.taskIds)
this.isSubmit = true
completeTask(params).then(res => {
if(res.success === true) {
this.$message.success('提交成功')
this.$router.push("/processCenter");
}
this.isSubmit = false
}).catch(e => {
}).finally(e => {
this.isSubmit = false
})
},
drawerCheck (data) {
if (this.drawerTitle === '转办处理人') {
this.turnLoading = true
this.isSubmit = true
changeAssigneeNew({
taskId: this.taskIds, // 任务id
assignee: data[0].id, // 被委托人
@@ -447,6 +445,8 @@ export default {
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.isSubmit = false
})
} else {
this.roleRow = data[0]
@@ -154,8 +154,8 @@
show-submit
show-transfer
:submitLoading="isSubmit"
:saveLoading="saveLoading"
:transferLoading="turnLoading"
:saveLoading="isSubmit"
:isSubmitBack="isSubmit"
@transfer="handleTurnTo"
@back="handleSubmitNo"
@save="handleSave"
@@ -366,11 +366,14 @@ export default {
params.set('json', JSON.stringify(json))
params.set('userId', this.$store.getters.userInfo.userId)
params.set('taskIds', this.taskIds)
this.isSubmit = true
completeTask(params).then(res => {
if (res.success) {
this.$message.success('驳回成功')
this.$router.push('/processCenter')
}
}).finally(() => {
this.isSubmit = false
})
} else {
this.$message.warning('请输入反馈意见')
@@ -407,7 +410,7 @@ export default {
for(let item of zqa) {
list.push(item[1])
}
this.saveLoading = true
this.isSubmit = true
let _formData = new FormData()
_formData.append('taskIds', this.taskIds)
_formData.append('json', JSON.stringify({
@@ -416,16 +419,14 @@ export default {
textarea: this.textarea
}))
saveTaskForPub(_formData).then(res => {
this.saveLoading = false
this.$message.success('保存成功')
this.bpnId = res.result
}).catch(e => {
this.saveLoading = false
}).finally(e => {
this.isSubmit = false
})
},
// 提交按钮
handleSubmit() {
this.isSubmit = true
let flag=false
this.dataList.forEach(item => {
if (item.dutyPeople === '') {
@@ -462,20 +463,20 @@ export default {
params.set('json', JSON.stringify(json))
params.set('userId', this.$store.getters.userInfo.userId)
params.set('taskIds', this.taskIds)
this.isSubmit = true
completeTask(params).then(res => {
if (res.success === true) {
this.$message.success('提交成功')
this.$router.push("/processCenter");
}
this.isSubmit = false
}).catch(e => {
}).finally(e => {
this.isSubmit = false
})
},
drawerCheck (data) {
if (this.drawerTitle === '转办处理人') {
this.turnLoading = true
this.isSubmit = true
changeAssigneeNew({
taskId: this.taskIds, // 任务id
assignee: data[0].id, // 被委托人
@@ -483,12 +484,13 @@ export default {
pId: this.pId // 流程实例
}).then(res =>{
if (res.success) {
this.turnLoading = false
this.$message.success('调整成功')
this.$router.push("/processCenter")
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.isSubmit = false
})
} else {
this.roleForm = data[0]
@@ -153,8 +153,8 @@
show-submit
show-transfer
:submitLoading="isSubmit"
:saveLoading="saveLoading"
:transferLoading="turnLoading"
:saveLoading="isSubmit"
:isSubmitBack="isSubmit"
@transfer="handleTurnTo"
@back="handleSubmitNo"
@save="handleSave"
@@ -341,12 +341,15 @@ export default {
params.set('json', JSON.stringify(json))
params.set('userId', this.$store.getters.userInfo.userId)
params.set('taskIds', this.taskIds)
this.isSubmit = true
completeTask(params).then(res => {
if (res.success) {
this.$message.success('驳回成功')
this.$router.push('/processCenter')
}
})
}).finally(() => {
this.isSubmit = false;
});
} else {
this.$message.warning('请输入反馈意见')
}
@@ -382,7 +385,7 @@ export default {
for(let item of zqa) {
list.push(item[1])
}
this.saveLoading = true
this.isSubmit = true
let _formData = new FormData()
_formData.append('taskIds', this.taskIds)
_formData.append('json', JSON.stringify({
@@ -391,16 +394,14 @@ export default {
textarea: this.textarea
}))
saveTaskForPub(_formData).then(res => {
this.saveLoading = false
this.$message.success('保存成功')
this.bpnId = res.result
}).catch(e => {
this.saveLoading = false
}).finally(e => {
this.isSubmit = false
})
},
// 提交按钮
handleSubmit() {
this.isSubmit = true
let flag=false
this.dataList.forEach(item => {
if (item.dutyPeople === '') {
@@ -437,20 +438,20 @@ export default {
params.set('json', JSON.stringify(json))
params.set('userId', this.$store.getters.userInfo.userId)
params.set('taskIds', this.taskIds)
this.isSubmit = true
completeTask(params).then(res => {
if (res.success === true) {
this.$message.success('提交成功')
this.$router.push("/processCenter");
}
this.isSubmit = false
}).catch(e => {
}).finally(e => {
this.isSubmit = false
})
},
drawerCheck (data) {
if (this.drawerTitle === '转办处理人') {
this.turnLoading = true
this.isSubmit = true
changeAssigneeNew({
taskId: this.taskIds, // 任务id
assignee: data[0].id, // 被委托人
@@ -458,12 +459,13 @@ export default {
pId: this.pId // 流程实例
}).then(res =>{
if (res.success) {
this.turnLoading = false
this.$message.success('调整成功')
this.$router.push("/processCenter")
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.isSubmit = false
})
} else {
this.roleForm = data[0]
@@ -155,8 +155,7 @@
:show-submit="submitShow"
:show-confirm="acceptShow"
:submitLoading="isSubmit"
:saveLoading="saveLoading"
:transferLoading="turnLoading"
:saveLoading="isSubmit"
@transfer="handleTurnTo"
@save="handleSave"
@submit="handleSubmit"
@@ -389,21 +388,21 @@ export default {
window.open(routeUrl.href, '_blank')
},
drawerCheck (data) {
this.turnLoading = true
this.isSubmit = true
changeAssigneeNew({
taskId: this.taskIds, // 任务id
assignee: data[0].id, // 被委托人
userId: this.userId, // 委托人
pId: this.pId // 流程实例
}).then(res =>{
this.isSubmit = true
if (res.success) {
this.turnLoading = false
this.$message.success('调整成功')
this.$router.push("/processCenter")
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.isSubmit = false
})
this.modalshowflag = false
},
@@ -429,7 +428,7 @@ export default {
for(let item of zqa) {
list.push(item[1].standardInfoList)
}
this.saveLoading = true
this.isSubmit = true
let _formData = new FormData()
_formData.append('taskIds', this.taskIds)
_formData.append('json', JSON.stringify({
@@ -438,11 +437,10 @@ export default {
commentInput: this.commentInput
}))
saveTaskForPub(_formData).then(res => {
this.saveLoading = false
this.$message.success('保存成功')
this.bpnId = res.result
}).catch(e => {
this.saveLoading = false
}).finally(e => {
this.isSubmit = false
})
},
// 接受按钮
@@ -455,12 +453,12 @@ export default {
this.$message.success('接收成功')
this.$router.push('/processCenter')
}
this.isSubmit = false
})
}).finally(() => {
this.isSubmit = false;
});
},
// 提交按钮
handleSubmit() {
this.isSubmit = true
let flag = false
this.dataList.forEach(item => {
if (item.fileText.length === 0) {
@@ -479,15 +477,15 @@ export default {
params.set('json', JSON.stringify(json))
params.set('userId', this.$store.getters.userInfo.userId)
params.set('taskIds', this.taskIds)
this.isSubmit = true
completeTask(params).then(res => {
if(res.success === true) {
this.$message.success('提交成功')
this.$router.push("/processCenter");
}
this.isSubmit = false
}).catch(e => {
this.isSubmit = false
})
}).finally(() => {
this.isSubmit = false;
});
},
//未整改项抽屉中的查询按钮
@@ -135,8 +135,7 @@
show-transfer
@back="handleSubmitNo"
:submitLoading="isSubmit"
:isSubmitBack="backLoading"
:transferLoading="turnLoading"
:isSubmitBack="isSubmit"
@transfer="handleTurnTo"
@submit="handleSubmit"
submitBTNText="同意"
@@ -312,7 +311,7 @@ export default {
})
},
drawerCheck (data) {
this.turnLoading = true
this.isSubmit = true
changeAssigneeNew({
taskId: this.taskIds, // 任务id
assignee: data[0].id, // 被委托人
@@ -320,12 +319,13 @@ export default {
pId: this.pId // 流程实例
}).then(res =>{
if (res.success) {
this.turnLoading = false
this.$message.success('调整成功')
this.$router.push("/processCenter")
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.isSubmit = false
})
this.modalshowflag = false
},
@@ -335,13 +335,13 @@ export default {
this.drawerTitle = '转办处理人'
},
handleSubmitNo() {
this.backLoading = true
if (this.commentText) {
var json = {
responUserList: this.dataList,
actionFlag: 1,
commentText: this.commentText
}
this.isSubmit = true
this.$http.post('lawss/activiti/completeTask', {
json: JSON.stringify(json),
taskId: this.taskIds,
@@ -350,12 +350,11 @@ export default {
if (res.success) {
this.$message.success('驳回成功')
this.$router.push('/processCenter')
this.backLoading = false
}
this.isSubmit = false
})
} else {
this.$message.warning('请输入反馈意见')
this.backLoading = false
}
},
//未整改项抽屉中的查询按钮