gaoshp
2025-08-06 7acbfc9ec91fc7cc6f0f57541331900165311bf5
update
已修改2个文件
51 ■■■■■ 文件已修改
src/views/flow/components/TodolistLeft.vue 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/flow/todolist.vue 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/flow/components/TodolistLeft.vue
@@ -1,12 +1,12 @@
<!--
 * @Date: 2025-07-01 20:45:15
 * @LastEditors: gaoshp
 * @LastEditTime: 2025-08-02 14:22:15
 * @LastEditTime: 2025-08-06 20:16:01
 * @FilePath: /mdmweb/src/views/flow/components/TodolistLeft.vue
-->
<template>
    <basic-container>
        <div class="tool" v-show="row.taskDefinitionKey === 'programmingTask'">
        <div class="tool" v-show="['programmingTask','cureProgramTask'].includes(row.taskDefinitionKey)">
            <avue-form :option="attOption"
             v-model="attForm"
             :upload-after="uploadAfter" class="att-box"></avue-form>
@@ -17,8 +17,8 @@
            <el-table-column prop="name" label="程序名称">
            </el-table-column>
            <el-table-column fixed="right" label="操作" width="60" align="center">
            <template #default="scope" v-show="row.taskDefinitionKey === 'programmingTask'">
                <el-button type="text" size="small" @click.stop="del(scope.$index,scope.row)">删除</el-button>
            <template #default="scope" >
                <el-button v-show="['programmingTask','cureProgramTask'].includes(row.taskDefinitionKey)" type="text" size="small" @click.stop="del(scope.$index,scope.row)">删除</el-button>
            </template>
            </el-table-column>
        </el-table>
@@ -50,6 +50,7 @@
    },
    data() {
        return {
            showContentId: '',
            attForm: {
                att: '',
            }, //程序上传表单
@@ -173,6 +174,8 @@
            this.$emit('selection-change',this.tableData)
        },
        showContent (row, column, event) {
            if(!row?.id) return this.appContent = '';
            this.showContentId = row.id
            getContent(row.id).then(res => {
                if(res.data.code === 200) {
                    this.appContent = res.data.data
@@ -182,6 +185,10 @@
            })
        },
        del (index,row) {
            if(row.id === this.showContentId) {
                this.showContentId = '';
                this.showContent(null, null, null);
            }
            removeAtt(row.id).then(res => {
                if(res.data.code === 200) {
                    this.$message.success('删除成功');
src/views/flow/todolist.vue
@@ -50,7 +50,8 @@
            approveBox: false,
            formApprove: {
                comment: '',
                approve: '', // 默认同意
                approve: 'Y', // 默认同意
                assignee: ''
            },
            optionApprove: {
                labelWidth: 100,
@@ -77,6 +78,7 @@
                            label: 'name',
                            value: 'id',
                        },
                        filterable: true,
                        span: 24,
                        disabled: false,
                        dicData: [
@@ -280,11 +282,14 @@
        //     });
        // },
        '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;
            }
        },
    },
@@ -346,24 +351,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) {