按钮loading-标准调研流程

This commit is contained in:
zyn
2023-11-06 11:20:32 +08:00
parent dda0b8c60c
commit ebda3b0bea
9 changed files with 74 additions and 8 deletions
@@ -542,6 +542,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)
@@ -556,8 +557,9 @@ export default {
this.saveLoading = false
this.$message.success('保存成功')
this.bpnId = res.result
}).catch(e => {
}).finally(() => {
this.saveLoading = false
this.isSubmit = false
})
},
handleSubmit() {
@@ -566,6 +568,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,
@@ -597,9 +600,11 @@ export default {
this.$router.push('/processCenter')
}
this.isSubmit = false
this.saveLoading = false
})
} else {
this.isSubmit = false
this.saveLoading = false
this.$message.warning('流程启动失败')
}
})
@@ -256,6 +256,8 @@
this.drawerModal = true
},
checkedRole (data) {
this.saveLoading = true
this.isSubmit = true
changeAssigneeNew({
taskId: this.$route.query.taskIds, // 任务id
userId:this.$store.getters.userInfo.userId, // 委托人
@@ -270,6 +272,9 @@
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.saveLoading = false
this.isSubmit = false
})
},
// 请求转换流程图
@@ -324,6 +329,7 @@
},
handleSave() {
this.saveLoading = true
this.isSubmit = true
let _formData = new FormData()
_formData.append('taskIds', this.taskIds)
_formData.append('json', JSON.stringify({
@@ -331,16 +337,17 @@
commentText2: this.commentText2,
}))
saveTaskForPub(_formData).then(res => {
this.saveLoading = false
this.$message.success('保存成功')
}).catch(e => {
}).finally(() => {
this.saveLoading = false
this.isSubmit = false
})
},
handleSubmit() {
this.$refs['qbkwForm'].validate((valid) => {
if (valid) {
this.isSubmit = true
this.saveLoading = true
var json = this.json
json.commentText = this.commentText2
json.responUserList = this.form.responUserList
@@ -355,6 +362,7 @@
this.$router.push('/processCenter')
}
this.isSubmit = false
this.saveLoading = false
})
} else {
return this.$message.warning('请完善基础信息')
@@ -328,6 +328,8 @@
this.drawerModal = true
},
checkedRole (data) {
this.saveLoading = true
this.isSubmit = true
changeAssigneeNew({
taskId: this.$route.query.taskIds, // 任务id
userId:this.$store.getters.userInfo.userId, // 委托人
@@ -342,6 +344,9 @@
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.saveLoading = false
this.isSubmit = false
})
},
// 请求转换流程图
@@ -429,6 +434,7 @@
},
handleSave() {
this.saveLoading = true
this.isSubmit = true
let _formData = new FormData()
_formData.append('taskIds', this.taskIds)
_formData.append('json', JSON.stringify({
@@ -437,15 +443,16 @@
commentText3: this.commentText3,
}))
saveTaskForPub(_formData).then(res => {
this.saveLoading = false
this.$message.success('保存成功')
}).catch(e => {
}).finally(() => {
this.saveLoading = false
this.isSubmit = false
})
},
// 接受按钮
handleAccept(){
this.isSubmit = true
this.saveLoading = true
execTask({
todoId: this.todoId // 当前节点ID
}).then(res => {
@@ -453,6 +460,8 @@
this.$message.success('接收成功')
this.$router.push('/processCenter')
}
}).finally(() => {
this.saveLoading = false
this.isSubmit = false
})
},
@@ -461,6 +470,7 @@
if (valid) {
this.json.dyhz = this.form.dyhz
this.isSubmit = true
this.saveLoading = true
var json = this.json
json.commentText = this.commentText3
json.fileId = this.form.fileId
@@ -476,6 +486,7 @@
this.$router.push('/processCenter')
}
this.isSubmit = false
this.saveLoading = false
})
} else {
return this.$message.warning('请完善基础信息')
@@ -210,6 +210,7 @@
show-submit
:submitLoading="isSubmit"
:saveLoading="saveLoading"
:isSubmitBack="isSubmit"
@submit="handleSubmit"
show-back
@back="handleSubmitNo"
@@ -304,6 +305,8 @@
this.drawerModal = true
},
checkedRole (data) {
this.isSubmit = true
this.saveLoading = true
changeAssigneeNew({
taskId: this.$route.query.taskIds, // 任务id
userId:this.$store.getters.userInfo.userId, // 委托人
@@ -318,6 +321,9 @@
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.isSubmit = false
this.saveLoading = false
})
},
// 请求转换流程图
@@ -355,6 +361,7 @@
},
handleSubmit() { // 同意
this.isSubmit = true
this.saveLoading = true
var json = this.json
json.actionFlag = 0
json.commentText = this.commentText4
@@ -368,11 +375,13 @@
this.$router.push('/processCenter')
}
this.isSubmit = false
this.saveLoading = false
})
},
handleSubmitNo() {
if (this.commentText4) {
this.isSubmit = true
this.saveLoading = true
var json = this.json
json.actionFlag = 1
json.commentText = this.commentText4
@@ -386,6 +395,7 @@
this.$router.push('/processCenter')
}
this.isSubmit = false
this.saveLoading = false
})
} else {
this.$message.warning('请输入审批意见')
@@ -299,6 +299,8 @@
this.drawerModal = true
},
checkedRole (data) {
this.saveLoading = true
this.isSubmit = true
changeAssigneeNew({
taskId: this.$route.query.taskIds, // 任务id
userId:this.$store.getters.userInfo.userId, // 委托人
@@ -313,6 +315,9 @@
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.saveLoading = false
this.isSubmit = false
})
},
// 请求转换流程图
@@ -387,6 +392,7 @@
},
handleSave() {
this.saveLoading = true
this.isSubmit = true
let json = this.form
json.responUserList = this.tableData
this.form.docUser = this.newDocUser
@@ -399,14 +405,16 @@
saveTaskForPub(_formData).then(res => {
this.saveLoading = false
this.$message.success('保存成功')
}).catch(e => {
}).finally(() => {
this.saveLoading = false
this.isSubmit = false
})
},
handleSubmit() {
this.$refs['qbkwForm'].validate((valid) => {
if (valid) {
this.isSubmit = true
this.saveLoading = true
let json = this.jsonData
json.commentText = this.commentText5
json.hzfileId = this.form.hzfileId
@@ -423,6 +431,7 @@
this.$router.push('/processCenter')
}
this.isSubmit = false
this.saveLoading = false
})
}
})
@@ -202,6 +202,7 @@
@back="handleSubmitNo"
:submitLoading="isSubmit"
:saveLoading="saveLoading"
:isSubmitBack="isSubmit"
show-transfer
@transfer="handleTransfer"
@submit="handleSubmit"
@@ -294,6 +295,8 @@
this.drawerModal = true
},
checkedRole (data) {
this.saveLoading = true
this.isSubmit = true
changeAssigneeNew({
taskId: this.$route.query.taskIds, // 任务id
userId:this.$store.getters.userInfo.userId, // 委托人
@@ -308,6 +311,9 @@
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.saveLoading = false
this.isSubmit = false
})
},
// 请求转换流程图
@@ -382,6 +388,7 @@
},
handleSubmit() {
this.isSubmit = true
this.saveLoading = true
var json = this.json
json.actionFlag = 0
json.commentText = this.commentText6
@@ -395,11 +402,13 @@
this.$router.push('/processCenter')
}
this.isSubmit = false
this.saveLoading = false
})
},
handleSubmitNo() {
if (this.commentText6) {
this.isSubmit = true
this.saveLoading = true
var json = this.json
json.actionFlag = 1
json.commentText = this.commentText6
@@ -413,6 +422,7 @@
this.$router.push('/processCenter')
}
this.isSubmit = false
this.saveLoading = false
})
} else {
this.$message.warning('请输入审批意见')
@@ -201,6 +201,8 @@
approval
@back="handleSubmitNo"
:submitLoading="isSubmit"
:isSubmitBack="isSubmit"
:saveLoading="isSubmit"
show-transfer
@transfer="handleTransfer"
@submit="handleSubmit"
@@ -293,6 +295,7 @@
this.drawerModal = true
},
checkedRole (data) {
this.isSubmit = true
changeAssigneeNew({
taskId: this.$route.query.taskIds, // 任务id
userId:this.$store.getters.userInfo.userId, // 委托人
@@ -307,6 +310,8 @@
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.isSubmit = false
})
},
// 请求转换流程图
@@ -199,7 +199,8 @@
show-submit
approval
:submitLoading="isSubmit"
:saveLoading="saveLoading"
:saveLoading="isSubmit"
:isSubmitBack="isSubmit"
@submit="handleSubmit"
show-back
show-transfer
@@ -294,6 +295,7 @@
this.drawerModal = true
},
checkedRole (data) {
this.isSubmit = true
changeAssigneeNew({
taskId: this.$route.query.taskIds, // 任务id
userId:this.$store.getters.userInfo.userId, // 委托人
@@ -308,6 +310,8 @@
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.isSubmit = false
})
},
// 请求转换流程图
@@ -233,7 +233,8 @@
approval
@back="handleSubmitNo"
:submitLoading="isSubmit"
:saveLoading="saveLoading"
:saveLoading="isSubmit"
:isSubmitBack="isSubmit"
show-transfer
@transfer="handleTransfer"
@submit="handleSubmit"
@@ -337,6 +338,7 @@
this.drawerModal = true
},
checkedRole (data) {
this.isSubmit = true
changeAssigneeNew({
taskId: this.$route.query.taskIds, // 任务id
userId:this.$store.getters.userInfo.userId, // 委托人
@@ -351,6 +353,8 @@
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.isSubmit = false
})
},
// 请求转换流程图