| | |
| | | <!-- |
| | | * @Date: 2025-07-01 20:45:15 |
| | | * @LastEditors: gaoshp |
| | | * @LastEditTime: 2025-08-20 21:03:19 |
| | | * @LastEditTime: 2025-08-27 20:48:41 |
| | | * @FilePath: /mdmweb/src/views/flow/components/TodolistLeft.vue |
| | | --> |
| | | <template> |
| | | <basic-container> |
| | | <!--'cureProgramTask', 固化编制不能添加文件--> |
| | | <div class="tool" v-show="['programmingTask', 'repalceProgrammingTask'].includes(row.taskDefinitionKey)"> |
| | | <div class="tool" v-show="['programmingTask', 'repalceProgrammingTask','appendProgrammingTask'].includes(row.taskDefinitionKey)"> |
| | | <el-button type="primary" plain @click="addApp">添加文件 |
| | | </el-button> |
| | | </div> |
| | | <el-text type="danger" v-if="row.variables.curedLocked === 'Y'">固化程序已锁定,请谨慎使用。锁定原因:{{ remark }}</el-text> |
| | | <el-text type="danger" v-if="row.processDefinitionKey === 'program-unlock'">程序已锁定,锁定原因:{{ remark }}</el-text> |
| | | <el-text type="danger" v-if="row.variables.hasCuredProgram==='Y' && row.variables.isProcessEditionSame=='N' && row.variables.cureProgramUseable==undefined">已固化程序工序版次不一致,派工版次:{{row.variables.processEdition}},已固化版次:{{row.variables.curedProcessEdition}}</el-text> |
| | | <el-table :data="tableData" border @row-click="showContent" max-height="200" highlight-current-row> |
| | | <!-- <el-table-column prop="machineCode" label="加工机床"> |
| | | </el-table-column> --> |
| | | |
| | | <el-table-column type="index" label="#" width="40" align="center" /> |
| | | <el-table-column prop="name" label="程序名称"> |
| | | <template #default="{ row }"> |
| | |
| | | <template #default="scope"> |
| | | <!--'cureProgramTask', 固化编制,不能删除和上传--> |
| | | <a style="color: blue;margin-right: 4px;cursor: pointer;font-size: 12px;" |
| | | v-show="['programmingTask', 'repalceProgrammingTask'].includes(row.taskDefinitionKey)" |
| | | v-show="['programmingTask', 'repalceProgrammingTask','appendProgrammingTask'].includes(row.taskDefinitionKey)" |
| | | type="text" size="small" @click.stop="del(scope.$index, scope.row)">删除</a> |
| | | <a style="color: blue;cursor: pointer;font-size: 12px;margin-right: 4px;" type="text" size="small" |
| | | @click.stop="downloadFile(scope.$index, scope.row)">下载</a> |
| | |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <!-- |
| | | <el-collapse> |
| | | <el-collapse-item :title="`固化旧版本: 零组件号: ${row.variables.drawingNo} 工序号: ${row.variables.processNo } 工序版次: ${ row.variables.processEdition }`" name="1"> |
| | | <el-table :data="fileData" border @row-click="showContent" max-height="200" highlight-current-row> |
| | | <el-table-column type="index" label="#" width="40" align="center" /> |
| | | <el-table-column prop="name" label="文件名"> |
| | | <template #default="{ row }"> |
| | | <div style="display: flex;align-items: center;"> |
| | | <span>{{ row.name }}</span> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" label="操作" width="150" align="center"> |
| | | <template #default="scope"> |
| | | <a style="color: blue;cursor: pointer;font-size: 12px;margin-right: 4px;" type="text" size="small" |
| | | @click.stop="downloadFile(scope.$index, scope.row)">下载</a> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-collapse-item> |
| | | </el-collapse> |
| | | --> |
| | | <h4>程序内容</h4> |
| | | <div v-html="appContent" class="app-content"> |
| | | </div> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getAppList, getSelectedAppList, getContent, removeAtt } from '@/api/flow/todolist'; |
| | | import { getAppList,getFileData, getSelectedAppList, getContent, removeAtt,queryLockRemark } from '@/api/flow/todolist'; |
| | | import { exportBlob } from '@/api/common'; |
| | | import { getToken } from '@/utils/auth'; |
| | | import NProgress from 'nprogress'; |
| | |
| | | }, |
| | | appData: [], |
| | | selectionList: [], |
| | | fileData: [],//已选文件 |
| | | optionApp: { |
| | | menu: false, |
| | | gridBtn: false, |
| | |
| | | // }, |
| | | ], |
| | | }, |
| | | |
| | | remark:'',//锁定原因 |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.getAttList(); |
| | | this.getFileData(); |
| | | this.getLockRemark();//获取锁定原因 |
| | | this.onLoad(this.page); |
| | | |
| | | }, |
| | | methods: { |
| | | getFileData () { |
| | | getFileData(this.row.processInstanceId).then(res => { |
| | | if (res.data.code !== 200) { |
| | | this.$message.error(res.data.msg || '获取文件失败'); |
| | | return; |
| | | } else { |
| | | this.fileData = res.data.data || []; |
| | | } |
| | | }) |
| | | }, |
| | | getLockRemark () { |
| | | //获取锁定原因 |
| | | let nodeId = this.row.variables.nodeId; |
| | | if(!nodeId){ |
| | | nodeId = this.row.variables.curedNodeId; |
| | | } |
| | | queryLockRemark(nodeId).then(res => { |
| | | if (res.data.code == 200) { |
| | | this.remark = res.data.data || ''; |
| | | } else { |
| | | this.remark = ''; |
| | | } |
| | | }) |
| | | }, |
| | | diffFile(index, row) { |
| | | console.log(row) |
| | | axios({ |