按钮loading-技术标准流程

This commit is contained in:
zyn
2023-11-02 15:42:59 +08:00
parent cd0dfbb513
commit 3ee543f92b
16 changed files with 103 additions and 63 deletions
@@ -3251,6 +3251,7 @@
// }
this.saveLoading = true
this.isSubmit = true
if (this.form.reviseStatus == '3' && this.standardCheckedList.length > 0) {
this.form.standCode = this.standardCheckedList[0].standCode
this.form.id = this.standardCheckedList[0].id
@@ -3269,11 +3270,11 @@
commentText: this.commentText
}))
saveTaskFirst(_formData).then(res => {
this.saveLoading = false
this.$message.success('保存成功')
this.bpnId = res.result
}).catch(e => {
}).finally(() => {
this.saveLoading = false
this.isSubmit = false
})
},
fileInfoHandle() {
@@ -1219,8 +1219,6 @@
assignee: data[0].id, // 被委托人
pId: this.$route.query.prcId, // 流程实例
}).then(res => {
this.isSubmit = false
this.saveLoading = false
if (res.success) {
this.drawerModal = false
this.$message.success('调整成功')
@@ -1229,6 +1227,9 @@
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.isSubmit = false
this.saveLoading = false
})
},
checkedRole (data) {
@@ -2089,6 +2090,7 @@
// }
this.saveLoading = true
this.isSubmit = true
let _formData = new FormData()
_formData.append('id', this.bpnId || '')
_formData.append('createUser', this.$store.getters.userInfo.userId)
@@ -2108,11 +2110,11 @@
commentText: this.commentText
}))
saveTaskFirst(_formData).then(res => {
this.saveLoading = false
this.$message.success('保存成功')
this.bpnId = res.result
}).catch(e => {
}).finally(() => {
this.saveLoading = false
this.isSubmit = false
})
},
fileInfoHandle(){
@@ -2234,6 +2236,7 @@
this.$refs['formTongGuo'].validate((valid) => {
if (valid) {
this.isSubmit = true
this.saveLoading = true
this.form.commentText = this.formTongGuo.commentText
this.form.approvalOpinion = this.formTongGuo.approvalOpinion
const json = JSON.stringify(this.form);
@@ -2251,12 +2254,13 @@
this.$message.success(res.message)
// this.processCreateLaws(json)
}
this.isSubmit = false
// 流程提交之后,应该流转至待办任务页面
this.$router.push({path:'/processCenter?tabsName=ProcessCenter'})
}else {
this.$message.success(res.message)
}
this.isSubmit = false
this.saveLoading = false
})
}})
},
@@ -1218,8 +1218,6 @@
assignee: data[0].id, // 被委托人
pId: this.$route.query.prcId, // 流程实例
}).then(res => {
this.isSubmit = false
this.saveLoading = false
if (res.success) {
this.drawerModal = false
this.$message.success('调整成功')
@@ -1228,6 +1226,9 @@
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.isSubmit = false
this.saveLoading = false
})
},
checkedRole (data) {
@@ -2233,6 +2234,7 @@
this.$refs['formTongGuo'].validate((valid) => {
if (valid) {
this.isSubmit = true
this.saveLoading = true
this.form.commentText = this.formTongGuo.commentText
this.form.approvalOpinion = this.formTongGuo.approvalOpinion
const json = JSON.stringify(this.form);
@@ -2250,12 +2252,13 @@
this.$message.success(res.message)
// this.processCreateLaws(json)
}
this.isSubmit = false
// 流程提交之后,应该流转至待办任务页面
this.$router.push({path:'/processCenter?tabsName=ProcessCenter'})
}else {
this.$message.success(res.message)
}
this.isSubmit = false
this.saveLoading = false
})
}})
},
@@ -1155,6 +1155,9 @@
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.isSubmit = false
this.saveLoading = false
})
},
drawerCheckZRBM(data) {
@@ -2540,14 +2540,12 @@
}))
saveTaskForPub(_formData).then(res => {
if (res.success) {
this.isSubmit = false
this.saveLoading = false
this.$message.success(res.message)
this.bpnId = res.result
}else{
this.$message.warning(res.message)
}
}).catch(e => {
}).finally(() => {
this.isSubmit = false
this.saveLoading = false
})
@@ -1475,8 +1475,6 @@
assignee: data[0].id, // 被委托人
pId: this.$route.query.prcId, // 流程实例
}).then(res => {
this.isSubmit = false
this.saveLoading = false
if (res.success) {
this.drawerModal = false
this.$message.success('调整成功')
@@ -1485,6 +1483,9 @@
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.isSubmit = false
this.saveLoading = false
})
},
checkedRole (data) {
@@ -2583,8 +2584,6 @@
if (res.success) {
this.$message.success(res.message)
// 流程提交之后,应该流转至待办任务页面
this.isSubmit = false
this.saveLoading = false
this.$router.push({path:'/processCenter?tabsName=ProcessCenter'})
// if(this.formTongGuo.approvalOpinion === '1'){
// this.$message.warning("驳回成功")
@@ -2597,6 +2596,8 @@
}else {
this.$message.success(res.message)
}
this.isSubmit = false
this.saveLoading = false
})
}else {
this.$message.warning('请先上传文件,再提交流程')
@@ -1189,6 +1189,9 @@
} else {
this.$message.warning(res.message)
}
}).finally(()=>{
this.isSubmit = false
this.saveLoading = false
})
},
processNum (row) {
@@ -2461,6 +2464,7 @@
// }
this.fileInfoHandle()
this.saveLoading = true
this.isSubmit = true
let _formData = new FormData()
_formData.append('id', this.bpnId || '')
_formData.append('createUser', this.$store.getters.userInfo.userId)
@@ -2476,11 +2480,11 @@
commentText: this.formTongGuo.commentText
}))
saveTaskForPub(_formData).then(res => {
this.saveLoading = false
this.$message.success('保存成功')
this.bpnId = res.result
}).catch(e => {
}).finally(() => {
this.saveLoading = false
this.isSubmit = false
})
},
fileInfoHandle(){
@@ -2608,8 +2612,6 @@
if (res.success) {
this.$message.success(res.message)
// 流程提交之后,应该流转至待办任务页面
this.isSubmit = false
this.saveLoading = false
this.$router.push({path:'/processCenter?tabsName=ProcessCenter'})
// if(this.formTongGuo.approvalOpinion === '1'){
// this.$message.warning("驳回成功")
@@ -2622,6 +2624,8 @@
}else {
this.$message.success(res.message)
}
this.isSubmit = false
this.saveLoading = false
})
// this.processModelHisOneCount(this.pId)
// .then(res => {
@@ -1240,6 +1240,9 @@
} else {
this.$message.warning(res.message)
}
}).finally(()=>{
this.isSubmit = false
this.saveLoading = false
})
},
checkedRole (data) {
@@ -2245,6 +2248,7 @@
this.$refs['formTongGuo'].validate((valid) => {
if (valid) {
this.isSubmit = true
this.saveLoading = true
this.form.commentText = this.formTongGuo.commentText
this.form.approvalOpinion = this.formTongGuo.approvalOpinion
const json = JSON.stringify(this.form);
@@ -2263,12 +2267,13 @@
this.$message.success(res.message)
// this.processCreateLaws(json)
}
this.isSubmit = false
// 流程提交之后,应该流转至待办任务页面
this.$router.push({path:'/processCenter?tabsName=ProcessCenter'})
}else {
this.$message.success(res.message)
}
this.isSubmit = false
this.saveLoading = false
})
}else{
this.$message.warning("请输入意见")
@@ -1881,8 +1881,6 @@
assignee: data[0].id, //
pId: this.$route.query.prcId, //
}).then(res => {
this.isSubmit = false
this.saveLoading = false
if (res.success) {
this.drawerModal = false
this.$message.success('调整成功')
@@ -1891,6 +1889,9 @@
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.isSubmit = false
this.saveLoading = false
})
},
checkedRole (data) {
@@ -2791,6 +2792,7 @@
this.summary=this.summaryList.map(item => item.id).join(",")
this.summaryName=this.summaryList.map(item => item.name).join(",")
this.saveLoading = true
this.isSubmit = true
let _formData = new FormData()
_formData.append('id', this.bpnId || '')
_formData.append('createUser', this.$store.getters.userInfo.userId)
@@ -2808,11 +2810,11 @@
commentText: this.formTongGuo.commentText
}))
saveTaskForPub(_formData).then(res => {
this.saveLoading = false
this.$message.success('保存成功')
this.bpnId = res.result
}).catch(e => {
}).finally(e => {
this.saveLoading = false
this.isSubmit = false
})
},
fileInfoHandle(){
@@ -3001,12 +3003,12 @@
if (res.success) {
this.$message.success(res.message)
//
this.isSubmit = false
this.saveLoading = false
this.$router.push({path:'/processCenter?tabsName=ProcessCenter'})
}else {
this.$message.success(res.message)
}
this.isSubmit = false
this.saveLoading = false
})
},
busVsFunc(){
@@ -1525,8 +1525,6 @@
assignee: data[0].id, //
pId: this.$route.query.prcId, //
}).then(res => {
this.isSubmit = false
this.saveLoading = false
if (res.success) {
this.drawerModal = false
this.$message.success('调整成功')
@@ -1535,6 +1533,9 @@
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.isSubmit = false
this.saveLoading = false
})
},
drawerCheckZRBM(data) {
@@ -2807,6 +2808,7 @@
// }
this.fileInfoHandle()
this.saveLoading = true
this.isSubmit = true
let _formData = new FormData()
_formData.append('id', this.bpnId || '')
_formData.append('createUser', this.$store.getters.userInfo.userId)
@@ -2822,11 +2824,11 @@
commentText: this.formTongGuo.commentText
}))
saveTaskForPub(_formData).then(res => {
this.saveLoading = false
this.$message.success('保存成功')
this.bpnId = res.result
}).catch(e => {
}).finally(() => {
this.saveLoading = false
this.isSubmit = false
})
},
fileInfoHandle(){
@@ -2957,8 +2959,6 @@
if (res.success) {
this.$message.success(res.message)
//
this.isSubmit = false
this.saveLoading = false
this.$router.push({path:'/processCenter?tabsName=ProcessCenter'})
// if(this.formTongGuo.approvalOpinion === '1'){
// this.$message.warning("")
@@ -2971,6 +2971,8 @@
}else {
this.$message.success(res.message)
}
this.isSubmit = false
this.saveLoading = false
})
// this.processModelHisOneCount(this.pId)
// .then(res => {
@@ -1455,8 +1455,6 @@
assignee: data[0].id, //
pId: this.$route.query.prcId, //
}).then(res => {
this.isSubmit = false
this.saveLoading = false
if (res.success) {
this.drawerModal = false
this.$message.success('调整成功')
@@ -1465,6 +1463,9 @@
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.isSubmit = false
this.saveLoading = false
})
},
//
@@ -2374,6 +2375,7 @@
// }
this.saveLoading = true
this.isSubmit = true
let _formData = new FormData()
_formData.append('id', this.bpnId || '')
_formData.append('createUser', this.$store.getters.userInfo.userId)
@@ -2389,11 +2391,11 @@
commentText: this.formTongGuo.commentText
}))
saveTaskForPub(_formData).then(res => {
this.saveLoading = false
this.$message.success('保存成功')
this.bpnId = res.result
}).catch(e => {
this.saveLoading = false
}).finally(() => {
this.saveLoading = false
this.isSubmit = false
})
},
fileInfoHandle() {
@@ -2518,8 +2520,6 @@
if (res.success) {
this.$message.success(res.message)
//
this.isSubmit = false
this.saveLoading = false
this.$router.push({path: '/processCenter?tabsName=ProcessCenter'})
// if(this.formTongGuo.approvalOpinion === '1'){
// this.$message.warning("")
@@ -2532,6 +2532,8 @@
} else {
this.$message.success(res.message)
}
this.isSubmit = false
this.saveLoading = false
})
} else {
this.$message.warning('请确认审批意见是否填写完整')
@@ -1247,8 +1247,6 @@
assignee: data[0].id, //
pId: this.$route.query.prcId, //
}).then(res => {
this.isSubmit = false
this.saveLoading = false
if (res.success) {
this.drawerModal = false
this.$message.success('调整成功')
@@ -1257,6 +1255,9 @@
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.isSubmit = false
this.saveLoading = false
})
},
checkedRole (data) {
@@ -2288,13 +2289,13 @@
this.$message.success(res.message)
// this.processCreateLaws(json)
}
this.isSubmit = false
this.saveLoading = false
//
this.$router.push({path:'/processCenter?tabsName=ProcessCenter'})
}else {
this.$message.success(res.message)
}
this.isSubmit = false
this.saveLoading = false
})
}})
},
@@ -1468,8 +1468,6 @@
assignee: data[0].id, //
pId: this.$route.query.prcId, //
}).then(res => {
this.isSubmit = false
this.saveLoading = false
if (res.success) {
this.drawerModal = false
this.$message.success('调整成功')
@@ -1478,6 +1476,9 @@
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.isSubmit = false
this.saveLoading = false
})
},
checkedRole (data) {
@@ -2341,6 +2342,7 @@
// }
this.saveLoading = true
this.isSubmit = true
let _formData = new FormData()
_formData.append('id', this.bpnId || '')
_formData.append('createUser', this.$store.getters.userInfo.userId)
@@ -2356,11 +2358,11 @@
commentText: this.formTongGuo.commentText
}))
saveTaskForPub(_formData).then(res => {
this.saveLoading = false
this.$message.success('保存成功')
this.bpnId = res.result
}).catch(e => {
}).finally(() => {
this.saveLoading = false
this.isSubmit = false
})
},
fileInfoHandle(){
@@ -2520,13 +2522,13 @@
this.$message.success(res.message)
// this.processCreateLaws(json)
}
this.isSubmit = false
this.saveLoading = false
//
this.$router.push({path:'/processCenter?tabsName=ProcessCenter'})
}else {
this.$message.success(res.message)
}
this.isSubmit = false
this.saveLoading = false
})
}})
},
@@ -1405,6 +1405,9 @@
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.isSubmit = false
this.saveLoading = false
})
},
drawerCheckZRBM(data) {
@@ -2616,6 +2619,7 @@
// }
this.fileInfoHandle()
this.saveLoading = true
this.isSubmit = true
let _formData = new FormData()
_formData.append('id', this.bpnId || '')
_formData.append('createUser', this.$store.getters.userInfo.userId)
@@ -2632,11 +2636,11 @@
commentText: this.formTongGuo.commentText
}))
saveTaskForPub(_formData).then(res => {
this.saveLoading = false
this.$message.success('保存成功')
this.bpnId = res.result
}).catch(e => {
}).finally(() => {
this.saveLoading = false
this.isSubmit = false
})
},
fileInfoHandle(){
@@ -2793,6 +2797,8 @@
} else {
this.$message.warning(res.data)
}
this.isSubmit = false
this.saveLoading = false
})
}else {
this.$message.success(res.message)
@@ -1177,8 +1177,6 @@
assignee: data[0].id, //
pId: this.$route.query.prcId, //
}).then(res => {
this.isSubmit = false
this.saveLoading = false
if (res.success) {
this.drawerModal = false
this.$message.success('调整成功')
@@ -1187,6 +1185,9 @@
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.isSubmit = false
this.saveLoading = false
})
},
drawerCheckZRBM(data) {
@@ -2437,6 +2438,7 @@
// }
this.fileInfoHandle()
this.saveLoading = true
this.isSubmit = true
let _formData = new FormData()
_formData.append('id', this.bpnId || '')
_formData.append('createUser', this.$store.getters.userInfo.userId)
@@ -2452,11 +2454,11 @@
commentText: this.formTongGuo.commentText
}))
saveTaskForPub(_formData).then(res => {
this.saveLoading = false
this.$message.success('保存成功')
this.bpnId = res.result
}).catch(e => {
}).finally(() => {
this.saveLoading = false
this.isSubmit = false
})
},
fileInfoHandle(){
@@ -2584,8 +2586,6 @@
if (res.success) {
this.$message.success(res.message)
//
this.isSubmit = false
this.saveLoading = false
this.$router.push({path:'/processCenter?tabsName=ProcessCenter'})
// if(this.formTongGuo.approvalOpinion === '1'){
// this.$message.warning("")
@@ -2598,6 +2598,8 @@
}else {
this.$message.success(res.message)
}
this.isSubmit = false
this.saveLoading = false
})
// this.processModelHisOneCount(this.pId)
// .then(res => {
@@ -1534,6 +1534,9 @@
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.isSubmit = false
this.saveLoading = false
})
},
drawerCheckZRBM(data) {
@@ -2798,6 +2801,7 @@
// }
this.fileInfoHandle()
this.saveLoading = true
this.isSubmit = true
let _formData = new FormData()
_formData.append('id', this.bpnId || '')
_formData.append('createUser', this.$store.getters.userInfo.userId)
@@ -2813,11 +2817,11 @@
commentText: this.formTongGuo.commentText
}))
saveTaskForPub(_formData).then(res => {
this.saveLoading = false
this.$message.success('保存成功')
this.bpnId = res.result
}).catch(e => {
}).finally(() => {
this.saveLoading = false
this.isSubmit = false
})
},
formatList (list) {
@@ -2967,8 +2971,6 @@
if (res.success) {
this.$message.success(res.message)
//
this.isSubmit = false
this.saveLoading = false
this.$router.push({path:'/processCenter?tabsName=ProcessCenter'})
// if(this.formTongGuo.approvalOpinion === '1'){
// this.$message.warning("")
@@ -2981,6 +2983,8 @@
}else {
this.$message.success(res.message)
}
this.isSubmit = false
this.saveLoading = false
})
// this.processModelHisOneCount(this.pId)
// .then(res => {