yangys
2025-08-16 f1b4ff31d9cb91fcda228a9781ddb8b3c792f8ba
src/views/flow/todolist.vue
@@ -198,8 +198,16 @@
                    },
                    {
                        label: '流程名称',
                        prop: 'processDefinitionName',
                        prop: '',
                        width: 100,
                  render: ({ row }) => {
                            return h('p',
                                {
                                    attrs: {},
                                    class: {},
                                    style: {},
                                }, row?.variables?.myProcessName)
                        }
                    },/*
                    {
                        label: '流程类型',
@@ -402,35 +410,55 @@
            }
        },
        setAssignee (row, approve) {
            if (approve === 'Y') {
                if (["check", 'cureCheckTask '].includes(row.taskDefinitionKey)) {// 校对
            if (approve === 'Y') {//审批通过的情况
                this.optionApprove.column[1].disabled = false;
                if (["check", 'cureCheckTask','repalceCheckTask'].includes(row.taskDefinitionKey)) {// 校对节点
                    this.formApprove.assignee = row.variables.senior;
                } else if (["programmingTask",'cureProgramTask'].includes(row.taskDefinitionKey)) {// 编制,校对
                } else if (["programmingTask",'cureProgramTask','repalceProgrammingTask'].includes(row.taskDefinitionKey)) {// 编制节点
                    this.formApprove.assignee = row.variables.checker;
                } else if (row.taskDefinitionKey == "teamLeaderTask") {// 任务派工
                } else if (row.taskDefinitionKey == "teamLeaderTask") {// 任务派工(组长)
                    this.optionApprove.column[1].disabled = false;
                    this.formApprove.assignee = row.variables.programmer
                } else if (row.taskDefinitionKey == "confirmIsUseableTask") {
                } else if (row.taskDefinitionKey == "confirmIsUseableTask") {//判断程序是否可用节点,都是发送给校对
                    this.formApprove.assignee = row.variables.checker
                } else if (["approveTask", 'seniorApproveTask','replaceApprove'].includes(row.taskDefinitionKey)) {// 高师审核
                    this.optionApprove.column[1].disabled = true;
                    this.formApprove.assignee = ''; // 如果是通过,则默认指派给自己
                    this.optionApprove.column[1].disabled = true;//最后一个节点"发送给" 禁用
                    this.formApprove.assignee = ''; // 如果是通过流程直接结束
                }
            } else if(approve === 'N'){
                this.formApprove.assignee = ''
                if(row.taskDefinitionKey == "teamLeaderTask") {
                    this.optionApprove.column[1].display = false;
                //不通过的情况
                //根据在线文档34行,驳回'发送给'是禁用,但有默认选项
                this.optionApprove.column[1].disabled = true;
                //this.formApprove.assignee = ''
                //if (["approveTask", 'seniorApproveTask','replaceApprove'].includes(row.taskDefinitionKey)) {
                    //数控程序审核(高师),是最后一个节点,不通过 都是禁用'发送给',直接给 校对人员
                    //this.optionApprove.column[1].disabled = true;
                //}
                if(["cureProgramTask"].includes(row.taskDefinitionKey)) {
                    //固化编制节点,不通过就结束了,assignee设置=''
                    this.formApprove.assignee = '';
                }
                if (["approveTask", 'seniorApproveTask','replaceApprove'].includes(row.taskDefinitionKey)) {// 高师审核
                    this.optionApprove.column[1].disabled = true;
                    getPrevius({processInstanceId: row.processInstanceId}).then(res => {
                        console.log(res)
                        if(res.data.code === 200) {
                            this.formApprove.assignee = res.data.data // 如果是通过,则默认指派给自己
                        }
                    })
                if(["teamLeaderTask" ,'repalceProgrammingTask'].includes(row.taskDefinitionKey)) {
                    //组长,替换流程的程序编制,禁用'发送给'
                    //this.optionApprove.column[1].disabled = true;
                }else {
                    //除了组长,替换流程的编制,其他节点的不通过,都是给上一个步骤的处理人
                    if(!["cureProgramTask"].includes(row.taskDefinitionKey)) {
                        //非固化编制节点,需要初始化默认处理人
                        getPrevius({processInstanceId: row.processInstanceId}).then(res => {
                            console.log(res)
                            if(res.data.code === 200) {
                                this.formApprove.assignee = res.data.data // 如果是通过,则默认指派给自己
                            }
                        });
                    }
                    
                }
            }
            
        },