yangys
2025-08-09 8b666c73d249fcb81b666b03ec638a8bb7357c45
src/views/flow/todolist.vue
@@ -42,6 +42,8 @@
        TodolistRightTop
    },
    data() {
       let rejectText = '驳回';//+this.row.categoryName;
        console.log(this,'ttt');
        return {
            
            applist: [],
@@ -51,6 +53,7 @@
            formApprove: {
                comment: '',
                approve: '', // 默认同意
                assignee: ''
            },
            optionApprove: {
                labelWidth: 100,
@@ -63,7 +66,7 @@
                        span: 24,
                        dicData: [
                            { label: '通过', value: 'Y' },
                            { label: '驳回', value: 'N' },
                            { label: rejectText, value: 'N' },
                        ],
                        rules: [{ required: true, message: '请选择审批结果', trigger: 'blur' }],
                    },
@@ -77,11 +80,21 @@
                            label: 'name',
                            value: 'id',
                        },
                        filterable: true,
                        span: 24,
                        disabled: false,
                        dicData: [
                        ],
                        // rules: [{ required: true, message: '请选择下一审批用户', trigger: 'blur' }],
                    },
                    {
                        label: '工序版次',
                        prop: 'processEdition',
                        type: 'input',
                        span: 24,
                        // disabled: true,
                        display: false,// 隐藏显示
                        // rules: [{ required: true, message: '请选择下一审批用户', trigger: 'blur' }],
                    },
                    {
@@ -151,16 +164,29 @@
                            },
                        ],
                    },
               {
                        label: '标题',
                        prop: '',
                        width: 100,
                  render: ({ row }) => {
                            return h('p',
                                {
                                    attrs: {},
                                    class: {},
                                    style: {},
                                }, row?.variables?.title)
                        }
                    },
                    {
                        label: '任务名称',
                        label: '流程名称',
                        prop: 'processDefinitionName',
                        width: 100,
                    },
                    },/*
                    {
                        label: '流程类型',
                        width: 100,
                        prop: 'categoryName',
                    },
                    },*/
                    {
                        label: '机床',
@@ -267,12 +293,21 @@
        //     });
        // },
        '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;
            }
            if(val === 'Y' && ['confirmIsUseableTask'].includes(this.row.taskDefinitionKey) && this.row.variables.isProcessEditionSame=='N') {
                this.optionApprove.column[2].display = true; // 显示工序版次
            } else {
                this.optionApprove.column[2].display = false; // 隐藏工序版次
            }
        },
    },
    computed: {
@@ -333,24 +368,27 @@
            });
            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) {