xiangpei
2024-12-10 614cb0ce301f7dfffb89f771723b4779d8caa8b1
src/views/projectProcess/index.vue
@@ -185,7 +185,7 @@
      v-loading="loading"
      :data="projectInfoList"
      @selection-change="handleSelectionChange"
      height="60vh"
      height="100%"
      sortable="custom"
      :show-overflow-tooltip="true">
      <el-table-column type="selection" width="55" align="center"/>
@@ -226,13 +226,14 @@
      <!-- 操作列 -->
      <el-table-column label="操作" width="140" align="center" >
        <template slot-scope="scope">
          <!--          <el-button-->
          <!--            size="medium"-->
          <!--            type="text"-->
          <!--            icon="el-icon-view"-->
          <!--            @click="lookProcessDetail(scope.row)"-->
          <!--          >-->
          <!--          </el-button>-->
                    <el-button
                      size="medium"
                      type="text"
                      icon="el-icon-view"
                      v-if="scope.row.processInsId"
                      @click="lookProcessDetail(scope.row)"
                    >
                    </el-button>
          <!--          <el-button-->
          <!--            v-if="isReserve"-->
          <!--            size="medium"-->
@@ -270,9 +271,9 @@
      :currentColumns="columns"
    />
    <RunProcess :show="showRunProcess"
                :now-process-id="nowProcessId"
                :now-process-name="nowProcessName"
    <RunProcess ref="runProcess" :show="showRunProcess"
                :now-process-def-id="nowProcessDefId"
                :now-process-ins-id="nowProcessInsId"
                :project-info="projectRunFrom"
                :process-list="processList"
                @close="closeRunProcess">
@@ -282,7 +283,7 @@
<script>
import { listDefinition } from "@/api/flowable/definition";
import {listInfo, getInfo, delInfo, addInfo, updateInfo} from "@/api/projectInfo";
import {listInfo, getInfo, delInfo, addInfo, updateInfo} from "@/api/projectEngineering/projectInfo";
import { getProjectProcess } from "@/api/projectProcess/projectProcess"
import {current, currentRest} from '@/views/projectEngineering/projectLibrary/list';
import FileDialog from '@/views/projectEngineering/projectLibrary/component/FileDialog';
@@ -305,8 +306,8 @@
      },
      processList: [],
      showRunProcess: false,
      nowProcessId: '',
      nowProcessName: '',
      nowProcessDefId: '',
      nowProcessInsId: '',
      isImportOrExport: false,
      fileDialogVisible: false,
      //是否需要新增按钮(储蓄项目需要)
@@ -389,7 +390,24 @@
    this.getList();
  },
  methods: {
    // 查看详情
    lookProcessDetail(row) {
      console.log(row.processDefId)
      this.$router.push({
        path: '/projectFlow/detail',
        query: {
          projectId: row.id,
          processDefId: row.processDefId
        }
      })
    },
    closeRunProcess() {
      this.projectRunFrom = {
        projectId: null,
        projectName: ''
      }
      this.nowProcessDefId = "";
      this.nowProcessInsId = "";
      this.showRunProcess = false
      this.getList()
    },
@@ -398,10 +416,13 @@
      // 拿到流程列表 TODO 根据项目类型做筛选
      getProcessConfigInfoList().then(response => {
        this.processList = response.data;
        this.nowProcessDefId = row.processDefId ? row.processDefId : '';
        this.nowProcessInsId = row.processInsId ? row.processInsId : '';
        // // 防止:id没变不触发监听
        // this.$refs.runProcess.setSelect(row.flowableProcessId);
        this.projectRunFrom.projectId = row.id;
        this.projectRunFrom.projectName = row.projectName;
        this.nowProcessId = row.flowableProcessId;
        this.nowProcessName = row.flowableProcessName;
        this.showRunProcess = true;
      });
    },
@@ -463,8 +484,8 @@
      getProjectProcess(this.queryParams).then(response => {
        this.projectInfoList = response.data;
        this.total = response.total;
        this.loading = false;
      });
      this.loading = false;
    },
    // 取消按钮
    cancel() {