| | |
| | | <!-- |
| | | * @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> |
| | |
| | | <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> |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | showContentId: '', |
| | | attForm: { |
| | | att: '', |
| | | }, //程序上传表单 |
| | |
| | | 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 |
| | |
| | | }) |
| | | }, |
| | | 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('删除成功'); |
| | |
| | | approveBox: false, |
| | | formApprove: { |
| | | comment: '', |
| | | approve: '', // 默认同意 |
| | | approve: 'Y', // 默认同意 |
| | | assignee: '' |
| | | }, |
| | | optionApprove: { |
| | | labelWidth: 100, |
| | |
| | | label: 'name', |
| | | value: 'id', |
| | | }, |
| | | filterable: true, |
| | | span: 24, |
| | | disabled: false, |
| | | dicData: [ |
| | |
| | | // }); |
| | | // }, |
| | | '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; |
| | | } |
| | | }, |
| | | }, |
| | |
| | | }); |
| | | 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) { |