1
lzhe
2025-07-08 561224d0c6ea8767766a8114ce15c98e31b6a0d9
src/views/flow/components/TodolistLeft.vue
@@ -1,7 +1,7 @@
<!--
 * @Date: 2025-07-01 20:45:15
 * @LastEditors: gaoshp
 * @LastEditTime: 2025-07-01 23:50:05
 * @LastEditTime: 2025-07-08 20:03:15
 * @FilePath: /mdmweb/src/views/flow/components/TodolistLeft.vue
-->
<template>
@@ -9,12 +9,15 @@
        <div class="tool" v-show="row.taskDefinitionKey === 'programmingTask'">
            <el-button type="primary" @click="addApp">添加程序</el-button>
        </div>
        <el-table :data="tableData" border @row-click="showContent">
            <el-table-column prop="code" label="编号">
        <el-table :data="tableData" border @row-click="showContent" max-height="200">
            <el-table-column prop="machineCode" label="加工机床">
            </el-table-column>
            <el-table-column prop="name" label="程序名称">
            </el-table-column>
            <el-table-column prop="name" label="工序名称">
            <el-table-column fixed="right" label="操作" width="100">
            <template #default="scope" v-show="row.taskDefinitionKey === 'programmingTask'">
                <el-button type="text" size="small" @click.stop="del(scope.$index,scope.row)">删除</el-button>
            </template>
            </el-table-column>
        </el-table>
        <h4>程序内容</h4>
@@ -75,17 +78,17 @@
                dialogClickModal: false,
                column: [
                    {
                        label: 'machineCode',
                        prop: '设备编号',
                        label: '加工机床',
                        prop: 'machineCode',
                    },
                    {
                        label: '程序名称',
                        prop: 'name',
                    },
                    {
                        label: '工序名称',
                        prop: 'processName',
                    },
                    // {
                    //     label: '工序名称',
                    //     prop: 'processName',
                    // },
                ],
            },
        }
@@ -97,7 +100,7 @@
                this.$message.error('获取已选程序失败');
                return;
            } else {
                this.appData = res.data
                this.tableData = res.data.data || [];
            }
            this.$emit('selection-change',this.tableData)
        })
@@ -140,6 +143,10 @@
                    this.appContent = '程序内容加载失败'
                }
            })
        },
        del (index,row) {
            this.tableData = this.tableData.filter(item => item.id !== row.id);
            this.$emit('selection-change',this.tableData)
        }
    },
}
@@ -156,7 +163,9 @@
}
.app-content {
    background-color: #fffee1;
    padding: 10px;
    padding: 10px 30px;
    min-height: 100px;
    overflow: auto;
    max-height: 400px;
}
</style>