yangys
2025-09-06 ee5102cc92b919623139e88819a945e02e611182
解锁增加解锁原因和展示
已修改2个文件
102 ■■■■ 文件已修改
src/views/flow/components/TodolistLeft.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/wel/shemi.vue 100 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/flow/components/TodolistLeft.vue
@@ -13,6 +13,8 @@
        </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" :row-style="{height:'20px'}" :cell-style="{padding:'0px'}" max-height="240" highlight-current-row>
            <!-- <el-table-column prop="machineCode" label="加工机床">
src/views/wel/shemi.vue
@@ -39,20 +39,10 @@
            </el-col>
          </el-row>
        </template>
        <!-- <template #menu-left>
        <el-button :size="size" type="primary" @click="showAdd()">新增根节点</el-button>
      </template> -->
        <template #name="{ row }">
          <span>{{ row.name }}</span>
          <!-- <el-button :size="size" text v-if="row.nodeType != 70" icon="el-icon-setting" type="primary" placeholder="修改" @click="showEdit(row)" title="修改"></el-button>
        <el-button :size="size" text v-if="row.nodeType != 10" icon="el-icon-delete" type="primary" @click="showDel(row)" placeholder="删除" title="删除"></el-button>
        <el-button :size="size" text v-if="row.nodeType != 60 && row.nodeType != 70" icon="el-icon-document-add" type="primary" @click="showAdd(row)" placeholder="新增子级" title="新增子级"></el-button>
        <el-button :size="size" text v-if="row.nodeType == 60 || row.nodeType == 50" icon="el-icon-upload" type="primary" @click="showUpload(row)" placeholder="文件上传" title="文件上传"></el-button> -->
          <!-- 涉密网才有 -->
          <!-- <el-button :size="size" text v-if="row.nodeType == 70" icon="el-icon-pie-chart" type="primary" @click="upgrade(row)" placeholder="升版" title="升版"></el-button> -->
          <!-- 工控网才有 -->
          <!-- <el-button :size="size" text v-if="row.nodeType == 70" icon="el-icon-position" type="primary" @click="downsend(row)" placeholder="下发" title="下发"></el-button> -->
          <!-- 替换  v-if="permission.auto_dispatch"-->
          <el-button :size="size" text v-if="row.nodeType == 60 && row.parentIds.indexOf('0,1,') > -1"
            icon="el-icon-switch" type="primary" @click="replacement(row)" placeholder="替换" title="替换"></el-button>
@@ -472,12 +462,18 @@
            disabled:true,
            labelWidth: "120",
          },
          {
            label: '锁定原因',
            prop: 'remark',
            type: "textarea",
            disabled:true,
            labelWidth: "120",
            span: 24,
          },
          {
            label: '解锁原因',
            prop: 'unlockReason',
            type: "textarea",
            labelWidth: "120",
            span: 24,
          }
@@ -817,6 +813,7 @@
      this.unlockForm.id = row.id;
      this.unlockForm.name = row.name
      this.unlockForm.remark = row.remark;
      this.unlockForm.unlockReason='';
      this.unlockForm.parentId = row.parentId;
      this.unlockBox = true;
    },
@@ -833,7 +830,7 @@
          if (res.data.code == 200) {
            this.$message({ type: 'success', message: '操作成功!' });
            this.addLocalTreeNode(this.lockForm.parentId);
            this.unlockBox = false;
          } else {
            this.$message({ type: 'error', message: res.data.msg });
          }
@@ -856,13 +853,13 @@
        axios({
          url: '/blade-mdm/flow/lock/start-unlock',
          method: 'post',
          params: {nodeId: row.id }
          params: {nodeId: row.id,unlockReason:row.unlockReason }
        }).then(res => {
          if (res.data.code == 200) {
            this.$message({ type: 'success', message: '解锁流程已启动!' });
            this.addLocalTreeNode(row.parentId);
          } else {
            this.$message({ type: 'success', message: res.data.msg });
            this.$message({ type: 'error', message: res.data.msg });
          }
        });
        done();
@@ -897,31 +894,7 @@
        window.console.log('haha', error);
        done();
      });
      // if(this.row.taskDefinitionKey === 'programmingTask') {
      //     // if(this.applist.length !== 1) {
      //     //     done();
      //     //     return this.$message.success('请选择1个程序');
      //     // }
      // }
      // approve({
      //     ...this.formApprove,
      //     taskId: this.row.taskId,
      //     processInstanceId: this.row.processInstanceId,
      //     // programIds: this.row.taskDefinitionKey === 'programmingTask' ? this.applist.map(v => v.id).join(',') : '',
      // }).then(res => {
      //     if(res.data.code !== 200) {
      //         this.$message.error(res.data.msg);
      //         done();
      //         return;
      //     }
      //     this.$message.success('审批成功');
      //     this.approveBox = false;
      //     this.onLoad(this.page, this.query);
      //     done();
      // }).catch(err => {
      //     done();
      //     console.error(err);
      // });
    },
    todoSelectionChange(applist) {
      this.applist = applist;
@@ -1277,50 +1250,7 @@
      this.modalBox = true;
      this.modalForm = row;
    },
    showDel(row) {
      this.$confirm('将会删除该节点及其子节点,是否确认删除?', {
        confirmButtonText: '是',
        cancelButtonText: '否',
        type: 'warning',
      }).then(() => {
        //调用接口
        this.loading = true;
        axios({
          url: '/blade-mdm/program/node/remove',
          method: 'post',
          params: { id: row.id },
        }).then(
          res => {
            this.loading = false;
            this.addLocalTreeNode(row.parentId);
          }
        );
      })
    },
    showAdd(row) {  //新增子节点
      if (!row) {
        this.modalTitle = "新增根节点";
        this.modalForm.nodeType = this.nodeTypeList[0].dictKey;
        this.modalForm.parentId = 0;
      } else {
        if (row.nodeType == 60) { //程序包
          return;
        }
        var defalutNodeType = "";  //下一级节点类型
        for (var i = 0; i < this.nodeTypeList.length; i++) {
          if (row.nodeType == this.nodeTypeList[i].dictKey) {
            defalutNodeType = this.nodeTypeList[i + 1].dictKey;
          }
        }
        this.modalTitle = "新增子节点";
        this.selectedColumn.nodeType = defalutNodeType;
        this.selectedColumn.parentId = row.id;
        this.selectedColumn.name = "";
        this.selectedColumn.id = "";
        this.modalForm = this.selectedColumn;
      }
      this.modalBox = true;
    },
    modalSubmit(row, done) {  //新增子节点保存/修改
      if (this.modalTitle == "修改") {
        var url = "/blade-mdm/program/node/update";