yangys
2025-09-07 5bdb2202cfeccf25f947689f07c80431000ad615
src/views/flow/components/TodolistLeft.vue
@@ -7,14 +7,21 @@
<template>
    <basic-container>
        <!--'cureProgramTask', 固化编制不能添加文件-->
        <div class="tool" v-show="['programmingTask', 'repalceProgrammingTask','appendProgrammingTask'].includes(row.taskDefinitionKey)">
            <el-button type="primary" plain @click="addApp">添加文件
        <div class="tool" v-show="['programmingTask', 'replaceProgrammingTask','appendProgrammingTask'].includes(row.taskDefinitionKey)">
            <!--无固化的情况才显示该开关-->
            <el-switch v-if="row.variables.hasCuredProgram!=='Y'" v-model="programOnMachine" active-text="现场编制" inactive-text="工艺员编制" />
            &nbsp;
            <el-button type="primary" :disabled="programOnMachine" 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="primary" v-if="row.processDefinitionKey === 'program-unlock'"><br/>解锁原因:</el-text>
         <el-text type="warning">{{row.variables.unlockReason}}</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-text type="danger" v-if="row.variables.programOnMachine=='Y'">现场编制</el-text>
        <el-table :data="tableData" border @row-click="showContent" :row-style="{height:'20px'}" :cell-style="{padding:'0px'}" max-height="240" highlight-current-row>
            <!-- <el-table-column prop="machineCode" label="加工机床">
            </el-table-column> -->
           
@@ -34,7 +41,7 @@
                <template #default="scope">
                    <!--'cureProgramTask', 固化编制,不能删除和上传-->
                    <a style="color: blue;margin-right: 4px;cursor: pointer;font-size: 12px;"
                        v-show="['programmingTask', 'repalceProgrammingTask','appendProgrammingTask'].includes(row.taskDefinitionKey)"
                        v-show="['programmingTask', 'replaceProgrammingTask','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>
@@ -109,8 +116,9 @@
            content1: '',
            content2: '',
            codeDiffFileName1: '回传版本',
            codeDiffFileName2: '试切版本',
            codeDiffFileName2: '下发版本',
            showContentId: '',
            programOnMachine:false,//是否现场编制
            attForm: {
                att: '',
                fileType: 'program'
@@ -217,13 +225,15 @@
            if(!nodeId){
                nodeId = this.row.variables.curedNodeId;
            }
            queryLockRemark(nodeId).then(res => {
                if (res.data.code == 200) {
                    this.remark = res.data.data || '';
                } else {
                    this.remark = '';
                }
            })
            if(nodeId){
                queryLockRemark(nodeId).then(res => {
                    if (res.data.code == 200) {
                        this.remark = res.data.data || '';
                    } else {
                        this.remark = '';
                    }
                });
            }
        },
        diffFile(index, row) {
            console.log(row)