| | |
| | | activeName: 'approve', |
| | | applist: [], |
| | | assigneeData: [], |
| | | allAssigneeData: [], |
| | | managerAssigneeData: [],//数控管理员角色的审批用户 |
| | | row: {}, |
| | | approveBox: false, |
| | | formApprove: { |
| | |
| | | } |
| | | }, |
| | | setAssignee (row, approve) { |
| | | |
| | | if (["cureProgramTask"].includes(row.taskDefinitionKey)) { |
| | | if(approve === 'N'){ |
| | | this.optionApprove.column[1].dicData = this.managerAssigneeData; |
| | | }else{ |
| | | //this.assigneeData = this.allAssigneeData; |
| | | this.optionApprove.column[1].dicData = this.allAssigneeData; |
| | | } |
| | | } |
| | | if (approve === 'Y') {//审批通过的情况 |
| | | |
| | | this.optionApprove.column[1].disabled = false; |
| | |
| | | //固化编制节点,不通过给数控管理员 |
| | | //TODO 按找角色定位给其中一个数控管理员 |
| | | this.optionApprove.column[1].disabled = false; |
| | | for(var i=0;i<this.assigneeData.length;i++){ |
| | | if(this.assigneeData[i].manager == true){ |
| | | this.formApprove.assignee = this.assigneeData[i].id; |
| | | break; |
| | | } |
| | | } |
| | | //this.formApprove.assignee = ''; |
| | | }else if(["confirmIsUseableTask"].includes(row.taskDefinitionKey)) { |
| | | //判断是否可用节点,不可用,给编制 |
| | |
| | | getAssignee({ |
| | | taskId: row.taskId, |
| | | }).then(res => { |
| | | //if(row.taskDefinitionKey === '') |
| | | this.assigneeData = res.data.data; |
| | | this.allAssigneeData = res.data.data; |
| | | //初始化数控管理员的数组 |
| | | for(var i=0;i<this.allAssigneeData.length;i++){ |
| | | if(this.allAssigneeData[i].manager == true){ |
| | | this.managerAssigneeData[this.managerAssigneeData.length] = this.allAssigneeData[i]; |
| | | } |
| | | } |
| | | this.optionApprove.column[1].dicData = this.assigneeData; |
| | | this.reassignOption.column[1].dicData = this.assigneeData; |
| | | }) |