luohairen
2024-11-26 100186edb96c3fa913779b64471dae6ea1b7aca7
src/views/projectProcess/index.vue
@@ -226,29 +226,31 @@
      <!-- 操作列 -->
      <el-table-column label="操作" width="140" align="center" >
        <template slot-scope="scope">
          <el-button
            size="medium"
            type="text"
            icon="el-icon-view"
            @click="handleDetail(scope.row)"
          >
          </el-button>
          <el-button
            v-if="isReserve"
            size="medium"
            type="text"
            icon="el-icon-edit"
            @click="handleUpdate(scope.row)"
          >
          </el-button>
          <el-button
            v-if="isReserve"
            size="medium"
            type="text"
            icon="el-icon-delete"
            @click="handleDelete(scope.row)"
          >
          </el-button>
          <!--          <el-button-->
          <!--            size="medium"-->
          <!--            type="text"-->
          <!--            icon="el-icon-view"-->
          <!--            @click="lookProcessDetail(scope.row)"-->
          <!--          >-->
          <!--          </el-button>-->
          <!--          <el-button-->
          <!--            v-if="isReserve"-->
          <!--            size="medium"-->
          <!--            type="text"-->
          <!--            icon="el-icon-edit"-->
          <!--            @click="handleUpdate(scope.row)"-->
          <!--          >-->
          <!--          </el-button>-->
          <el-tooltip content="流程" placement="top" effect="light" :enterable="false">
            <el-button
              v-if="isReserve"
              size="medium"
              type="text"
              icon="el-icon-s-operation"
              @click="openOpProcess(scope.row)"
            >
            </el-button>
          </el-tooltip>
        </template>
      </el-table-column>
    </el-table>
@@ -267,13 +269,18 @@
      @fileDialogCancel="fileDialogCancel"
      :currentColumns="columns"
    />
    <RunProcess :show="showRunProcess" :now-process-id="nowProcessId" :now-process-name="nowProcessName" :process-list="processList" @close="closeRunProcess"></RunProcess>
  </div>
</template>
<script>
import { listDefinition } from "@/api/flowable/definition";
import {listInfo, getInfo, delInfo, addInfo, updateInfo} from "@/api/projectInfo";
import { getProjectProcesss } from "@/api/projectProcess/projectProcess"
import {current, currentRest} from '@/views/projectEngineering/projectLibrary/list';
import FileDialog from '@/views/projectEngineering/projectLibrary/component/FileDialog';
import RunProcess from "@/views/projectProcess/components/RunProcess";
export default {
  dicts: ['sys_administrative_divisions', 'sys_investment_type', 'sys_project_phases',
@@ -281,10 +288,15 @@
    'sys_project_tags', 'sys_key_categories', 'sys_project_type'],
  name: "projectInfo",
  components: {
    FileDialog
    FileDialog, RunProcess
  },
  data() {
    return {
      processList: [],
      showRunProcess: false,
      projectId: null,
      nowProcessId: '',
      nowProcessName: '',
      isImportOrExport: false,
      fileDialogVisible: false,
      //是否需要新增按钮(储蓄项目需要)
@@ -367,6 +379,20 @@
    this.getList();
  },
  methods: {
    closeRunProcess() {
      this.showRunProcess = false
    },
    // 打开流程页面
    openOpProcess(row) {
      this.projectId = row.id;
      this.nowProcessId = row.flowableProcessId;
      this.nowProcessName = row.flowableProcessName;
      // 拿到流程列表
      listDefinition(this.queryParams).then(response => {
        this.processList = response.data.records;
        this.showRunProcess = true;
      });
    },
    // 重置排序的方法
    handleResetSort() {
      this.defaultColumns = currentRest.map((item, index) => {
@@ -422,7 +448,7 @@
    /** 查询项目管理基础信息列表 */
    getList() {
      this.loading = true;
      listInfo(this.queryParams).then(response => {
      getProjectProcesss(this.queryParams).then(response => {
        this.projectInfoList = response.data;
        this.total = response.total;
      });