From 2c9999d20ae7e98cb1ac31ff5b4594ce4c49a9d6 Mon Sep 17 00:00:00 2001 From: luohairen <3399054449@qq.com> Date: 星期四, 12 十二月 2024 17:24:24 +0800 Subject: [PATCH] 调整 --- src/views/projectProcess/index.vue | 77 +++++++++++++++++++++++++++----------- 1 files changed, 55 insertions(+), 22 deletions(-) diff --git a/src/views/projectProcess/index.vue b/src/views/projectProcess/index.vue index cdb3acc..969ae34 100644 --- a/src/views/projectProcess/index.vue +++ b/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,17 +271,24 @@ :currentColumns="columns" /> - <RunProcess :show="showRunProcess" :now-process-id="nowProcessId" :now-process-name="nowProcessName" :process-list="processList" @close="closeRunProcess"></RunProcess> + <RunProcess ref="runProcess" :show="showRunProcess" + :now-process-def-id="nowProcessDefId" + :now-process-ins-id="nowProcessInsId" + :project-info="projectRunFrom" + :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 {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'; import RunProcess from "@/views/projectProcess/components/RunProcess"; +import {getProcessConfigInfoList} from "@/api/projectProcess/processConfigInfo"; export default { dicts: ['sys_administrative_divisions', 'sys_investment_type', 'sys_project_phases', @@ -292,11 +300,14 @@ }, data() { return { + projectRunFrom: { + projectId: null, + projectName: '' + }, processList: [], showRunProcess: false, - projectId: null, - nowProcessId: '', - nowProcessName: '', + nowProcessDefId: '', + nowProcessInsId: '', isImportOrExport: false, fileDialogVisible: false, //鏄惁闇�瑕佹柊澧炴寜閽�(鍌ㄨ搫椤圭洰闇�瑕�) @@ -379,17 +390,39 @@ 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() }, // 鎵撳紑娴佺▼椤甸潰 openOpProcess(row) { - this.projectId = row.id; - this.nowProcessId = row.flowableProcessId; - this.nowProcessName = row.flowableProcessName; - // 鎷垮埌娴佺▼鍒楄〃 - listDefinition(this.queryParams).then(response => { - this.processList = response.data.records; + // 鎷垮埌娴佺▼鍒楄〃 TODO 鏍规嵁椤圭洰绫诲瀷鍋氱瓫閫� + getProcessConfigInfoList().then(response => { + this.processList = response.data; + this.nowProcessDefId = row.processDefId ? row.processDefId : ''; + this.nowProcessInsId = row.processInsId ? row.processInsId : ''; + // // 闃叉锛歩d娌″彉涓嶈Е鍙戠洃鍚� + // this.$refs.runProcess.setSelect(row.flowableProcessId); + this.projectRunFrom.projectId = row.id; + this.projectRunFrom.projectName = row.projectName; + this.showRunProcess = true; }); }, @@ -448,11 +481,11 @@ /** 鏌ヨ椤圭洰绠$悊鍩虹淇℃伅鍒楄〃 */ getList() { this.loading = true; - getProjectProcesss(this.queryParams).then(response => { + getProjectProcess(this.queryParams).then(response => { this.projectInfoList = response.data; this.total = response.total; + this.loading = false; }); - this.loading = false; }, // 鍙栨秷鎸夐挳 cancel() { -- Gitblit v1.8.0