| | |
| | | approveBox: false, |
| | | formApprove: { |
| | | comment: '', |
| | | approve: '', // 默认同意 |
| | | approve: 'Y', // 默认同意 |
| | | assignee: '' |
| | | }, |
| | | optionApprove: { |
| | | labelWidth: 100, |
| | |
| | | label: 'name', |
| | | value: 'id', |
| | | }, |
| | | filterable: true, |
| | | span: 24, |
| | | disabled: false, |
| | | dicData: [ |
| | |
| | | // }); |
| | | // }, |
| | | 'formApprove.approve'(val) { |
| | | if (val === 'Y' && this.row.taskDefinitionKey === 'approveTask') { |
| | | if (val === 'Y' && ["approveTask", 'seniorApproveTask'].includes(this.row.taskDefinitionKey)) {// 高师 |
| | | this.optionApprove.column[1].disabled = true; |
| | | this.formApprove.assignee = ''; // 如果是通过,则默认指派给自己 |
| | | } else { |
| | | this.optionApprove.column[1].disabled = false; |
| | | } else if(val === 'Y'){ |
| | | this.setAssignee(this.row); |
| | | } else if(val === 'N') { |
| | | this.formApprove.assignee = '' |
| | | // this.formApprove.assignee = row.variables.senior; |
| | | } |
| | | }, |
| | | }, |
| | |
| | | }); |
| | | done(); |
| | | }, |
| | | handleAction(row, index) { |
| | | this.formApprove = { |
| | | comment: '', |
| | | approve: '', // 默认同 |
| | | } |
| | | this.approveBox = true; |
| | | this.row = row |
| | | if (row.taskDefinitionKey == "check") { |
| | | setAssignee (row) { |
| | | if (["check", 'cureCheckTask '].includes(row.taskDefinitionKey)) {// 校对 |
| | | this.formApprove.assignee = row.variables.senior; |
| | | } else if (row.taskDefinitionKey == "programmingTask") { |
| | | } else if (["programmingTask",'cureProgramTask'].includes(row.taskDefinitionKey)) {// 编制,校对 |
| | | this.formApprove.assignee = row.variables.checker; |
| | | } else if (row.taskDefinitionKey == "teamLeaderTask") { |
| | | this.formApprove.assignee = row.variables.programmer |
| | | } else if (row.taskDefinitionKey == "confirmIsUseableTask") { |
| | | this.formApprove.assignee = row.variables.checker |
| | | } else if (row.taskDefinitionKey == "approveTask") { |
| | | } else if (["approveTask", 'seniorApproveTask'].includes(row.taskDefinitionKey)) {// 高师审核 |
| | | |
| | | } |
| | | }, |
| | | handleAction(row, index) { |
| | | this.formApprove = { |
| | | comment: '', |
| | | approve: 'Y', // 默认同 |
| | | } |
| | | this.approveBox = true; |
| | | this.row = row |
| | | this.setAssignee(row); |
| | | console.log('handleAction', row, index); |
| | | }, |
| | | handleSubmit(form, done) { |