update 权限申请流程
This commit is contained in:
+6
-16
@@ -370,25 +370,15 @@ export default {
|
||||
*/
|
||||
handleSubmit () {
|
||||
if (this.loading) return
|
||||
this.loading = true
|
||||
let fn
|
||||
let pass
|
||||
switch (this.currentNode) {
|
||||
case EsInspectionProcess.initiate.value:
|
||||
fn = startInspectProcess
|
||||
break
|
||||
default:
|
||||
fn = approvalInspectProcess
|
||||
pass = true
|
||||
break
|
||||
// 发起流程并且没有被驳回,调发起接口,否则调审批接口
|
||||
if (this.currentNode === EsInspectionProcess.initiate.value && this.$route.query.taskId) {
|
||||
this.handleAgree()
|
||||
return
|
||||
}
|
||||
this.loading = true
|
||||
this.getPageParams().then(res => {
|
||||
console.log(res)
|
||||
// 如果是审批,就默认pass为true
|
||||
if (pass && res.map) {
|
||||
res.map.pass = pass
|
||||
}
|
||||
return fn && fn(res)
|
||||
return startInspectProcess(res)
|
||||
}).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
|
||||
Reference in New Issue
Block a user