| | |
| | | <!-- |
| | | * @Date: 2025-07-01 20:45:15 |
| | | * @LastEditors: gaoshp |
| | | * @LastEditTime: 2025-08-02 13:57:52 |
| | | * @LastEditTime: 2025-08-06 20:40:36 |
| | | * @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"></avue-form> |
| | | :upload-after="uploadAfter" class="att-box"></avue-form> |
| | | </div> |
| | | <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 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> |
| | | <el-table-column fixed="right" label="操作" width="60" align="center"> |
| | | <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> |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | showContentId: '', |
| | | attForm: { |
| | | att: '', |
| | | }, //程序上传表单 |
| | | attOption: { |
| | | submitBtn: false, |
| | | emptyBtn: false, |
| | | menu: false, |
| | | column: [ |
| | | { |
| | | label: '添加程序', |
| | |
| | | this.$emit('selection-change',this.tableData) |
| | | }, |
| | | showContent (row, column, event) { |
| | | if(!row?.id) { |
| | | this.showContentId = '' |
| | | return this.appContent = ''; |
| | | } |
| | | this.showContentId = row.id |
| | | getContent(row.id).then(res => { |
| | | if(res.data.code === 200) { |
| | | this.appContent = res.data.data |
| | |
| | | }) |
| | | }, |
| | | 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('删除成功'); |
| | |
| | | max-height: 400px; |
| | | white-space: pre-wrap; |
| | | } |
| | | |
| | | </style> |
| | | <style lang="scss"> |
| | | .att-box { |
| | | .el-form-item--default { |
| | | margin-bottom: 0; |
| | | } |
| | | .avue-form__menu--center { |
| | | display: none; |
| | | } |
| | | } |
| | | </style> |