1
lzhe
2025-08-16 3e363bb47049cc4f4f14af56e7afd6613096ec8f
src/views/wel/shemi.vue
@@ -22,7 +22,7 @@
          </el-col>
          <el-col :span="6">
            <el-select v-model="search.nodeType" placeholder="请输入节点类型" clearable>
              <el-option v-for="item in nodeTypeList" :key="item.dictValue" :label="item.dictValue" :value="item.dictKey"/>
              <el-option v-for="item in nodeTypeList" :key="item.dictValue" :label="item.dictValue" :value="item.dictKey"/>formApprove.
            </el-select>
          </el-col>
          <el-col :span="6">
@@ -46,7 +46,8 @@
        <!-- <el-button :size="size" text v-if="row.nodeType == 70" icon="el-icon-position" type="primary" @click="downsend(row)" placeholder="下发" title="下发"></el-button> -->
        <!-- 替换 -->
        <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>
        <!-- <el-icon><Switch /></el-icon> -->
        <el-button :size="size" text v-if="row.nodeType == 60 && row.parentIds.indexOf('0,2')>-1" icon="el-icon-lock" type="primary" @click="locked(row)" placeholder="锁定" title="锁定"></el-button>
        <!-- <el-button :size="size" text v-if="row.nodeType == 60 && row.parentIds.indexOf('0,2')>-1" icon="el-icon-unlock" type="primary" @click="locked(row)" placeholder="解锁" title="解锁"></el-button> -->
      </template>
    </avue-crud>
    <!-- 新增节点 -->
@@ -629,6 +630,25 @@
    
  },
  methods: {
    locked(row) {
      this.$confirm('是否锁定吗?', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning',
      }).then(() => {
        axios({
          url: '/blade-mdm/program/node/lock',
          method: 'post',
          params: {id: row.id}
        }).then(res => {
          if(res.data.code == 200) {
            this.$message({type: 'success',message: '操作成功!'});
          }else {
            this.$message({type: 'success',message: res.data.msg});
          }
        });
      });
    },
    handleSubmit(form, done) {
      //发起程序替换流程
      var obj = {
@@ -697,11 +717,26 @@
        this.replaceDataId = resp.data.data.processInstanceId;
        this.processNo = resp.data.data.processNo;
        this.processEdition = resp.data.data.processEdition;
      this.drawingNo = resp.data.data.drawingNo;
          this.drawingNo = resp.data.data.drawingNo;
        this.formApprove.title = resp.data.data.name + "替换";
        this.getHandler(); //获取处理人
        this.todolistModel = true;
      });
    },
    getHandler() {  //获取处理人
      axios({
        url: '/blade-mdm/flow/replace/default-assignees',
        method: 'get',
        params: {drawingNo: this.drawingNo}
      }).then(
      resp => {
        if(resp.data.code == 200) {
          this.formApprove.assignee = resp.data.data.checkerId;
        }else {
          this.$message.success(resp.msg);
        }
      });
    },
    convertToHtml(text) {
        return text.replace(/\n/g, '<br>');
    },