From a432990d4f39e235e4d551556c578426effea2f6 Mon Sep 17 00:00:00 2001 From: xiangpei <xiangpei@timesnew.cn> Date: 星期五, 29 十一月 2024 16:50:50 +0800 Subject: [PATCH] 全部事项、待办事项的完善 --- src/views/projectProcess/components/RunProcess.vue | 22 +++++----- src/api/projectProcess/projectProcess.js | 15 ++++++- src/views/projectProcess/detail/index.vue | 66 ++++++++++++++++++++------------ src/views/projectProcess/index.vue | 9 ++-- 4 files changed, 69 insertions(+), 43 deletions(-) diff --git a/src/api/projectProcess/projectProcess.js b/src/api/projectProcess/projectProcess.js index 9aa64e0..f1242c7 100644 --- a/src/api/projectProcess/projectProcess.js +++ b/src/api/projectProcess/projectProcess.js @@ -27,10 +27,19 @@ }) } -// 鍚姩娴佺▼ -export const startProcess = (projectId, processId) => { +// 鑾峰彇椤圭洰娴佺▼璇︽儏鍒嗛〉鏁版嵁 +export const getProjectProcessDetailTaskList = (params) => { return request({ - url: "/project-process/start/" + projectId + "/" + processId, + url: "/project-process/detail/task/list", + method: "GET", + params: params + }) +} + +// 鍚姩娴佺▼ +export const startProcess = (projectId, processDefId) => { + return request({ + url: "/project-process/start/" + projectId + "/" + processDefId, method: "POST" }) } diff --git a/src/views/projectProcess/components/RunProcess.vue b/src/views/projectProcess/components/RunProcess.vue index ce9d718..7dbee95 100644 --- a/src/views/projectProcess/components/RunProcess.vue +++ b/src/views/projectProcess/components/RunProcess.vue @@ -10,7 +10,7 @@ <div> <div style="display: flex; flex-direction: row; justify-content: center; align-items: center;font-size: 24px"> <div>褰撳墠娴佺▼锛�</div> - <div v-if="nowProcessId">{{selectProcessName}}</div> + <div v-if="nowProcessDefId">{{selectProcessName}}</div> <div v-else>鏈粦瀹氭祦绋�</div> </div> </div> @@ -74,7 +74,7 @@ </el-table> </div> <span slot="footer" class="dialog-footer"> - <el-button type="danger" @click="startProcess" :disable="!this.selectProcessId">鍚姩娴佺▼</el-button> + <el-button type="danger" @click="startProcess" :disable="!this.selectProcessDefId">鍚姩娴佺▼</el-button> <el-button type="primary" @click="changeProcess">鍙樻洿</el-button> </span> </el-dialog> @@ -100,7 +100,7 @@ required: true, type: Array }, - nowProcessId: { // 褰撳墠椤圭洰缁戝畾鐨勬祦绋媔d + nowProcessDefId: { // 褰撳墠椤圭洰缁戝畾鐨勬祦绋媔d required: true, type: String } @@ -110,14 +110,14 @@ projectInfo: { handler(newVal, oldVal) { console.log("浼犲叆鍊硷細", newVal, this.processList) - this.setSelect(this.nowProcessId) + this.setSelect(this.nowProcessDefId) }, deep: true } }, data() { return { - selectProcessId: '', // 缁勪欢鍐呴儴閫変腑鐨勬祦绋媔d + selectProcessDefId: '', // 缁勪欢鍐呴儴閫変腑鐨勬祦绋媔d selectProcessName: '', // 缁勪欢鍐呴儴閫変腑鐨勬祦绋媔d } }, @@ -142,25 +142,25 @@ this.$refs.myTable.toggleRowSelection(val[val.length - 1]); } if(val.length != 0){ - this.selectProcessId = val[val.length - 1].id; - console.log("閫変腑id锛�", this.selectProcessId) + this.selectProcessDefId = val[val.length - 1].id; + console.log("閫変腑id锛�", this.selectProcessDefId) } }, // 鍚姩娴佺▼ startProcess() { - startProcess(this.projectInfo.projectId, this.selectProcessId).then(res => { + startProcess(this.projectInfo.projectId, this.selectProcessDefId).then(res => { this.$message.success(res.msg); }) }, // 鍙樻洿娴佺▼ changeProcess() { - if (!this.selectProcessId) { + if (!this.selectProcessDefId) { this.$message.error("閫夊垯涓�涓祦绋嬪悗鎵嶈兘鍙樻洿") return } const data = { projectId: this.projectInfo.projectId, - flowableProcessId: this.selectProcessId + processDefId: this.selectProcessDefId } projectSetProcess(data).then(res => { this.$message.success("鍙樻洿鎴愬姛") @@ -168,7 +168,7 @@ }) }, handleClose() { - this.selectProcessId = "" + this.selectProcessDefId = "" this.selectProcessName = "" this.$emit("close") } diff --git a/src/views/projectProcess/detail/index.vue b/src/views/projectProcess/detail/index.vue index 1c3a5ac..4103aae 100644 --- a/src/views/projectProcess/detail/index.vue +++ b/src/views/projectProcess/detail/index.vue @@ -46,28 +46,33 @@ > </el-table-column> <el-table-column - prop="procDefName" + prop="processName" label="娴佺▼鍚嶇О" > </el-table-column> <el-table-column - prop="startUserName" + prop="promoterName" label="鍙戣捣浜�" > </el-table-column> <el-table-column - prop="startDeptName" + prop="promoterUnitName" label="鍙戣捣鍗曚綅" > </el-table-column> <el-table-column - prop="assigneeDeptName" + prop="handlerUnitName" label="澶勭悊鍗曚綅" > </el-table-column> <el-table-column - prop="assigneeName" + prop="handlerName" label="瀹為檯澶勭悊浜�" + > + </el-table-column> + <el-table-column + prop="taskStatus" + label="浠诲姟鐘舵��" > </el-table-column> <el-table-column @@ -75,16 +80,16 @@ label="鎿嶄綔" width="100"> <template slot-scope="scope"> - <el-button @click="goToProcessDetail(scope.row)" type="text" size="small">鏌ョ湅</el-button> - <el-button @click="goToDo(scope.row)" type="text" size="small">鍔炵悊</el-button> + <el-button v-if="scope.row.taskStatus !== '鏈紑濮�'" @click="goToProcessDetail(scope.row)" type="text" size="small">鏌ョ湅</el-button> + <el-button v-if="scope.row.taskStatus === '寰呭姙'" @click="goToDo(scope.row)" type="text" size="small">鍔炵悊</el-button> </template> </el-table-column> </el-table> <div> <el-pagination - v-if="total > pageSize" - :page-size="pageSize" - :current-page="pageNum" + v-if="total > queryParams.pageSize" + :page-size="queryParams.pageSize" + :current-page="queryParams.currentPage" :total="total" layout="total, prev, pager, next" @current-change="getList" @@ -95,28 +100,29 @@ </template> <script> -import {getProjectProcessDetail} from "@/api/projectProcess/projectProcess"; +import {getProjectProcessDetail, getProjectProcessDetailTaskList} from "@/api/projectProcess/projectProcess"; export default { name: "index", data() { return { - projectId: null, - processId: null, detailData: {}, - selectTabId: 2, taskList: [], total: 0, - pageSize: 5, - pageNum: 1, + selectTabId: 2, queryParams: { - taskName: '' + taskName: '', + taskType: 'todo', + pageSize: 5, + currentPage: 1, + projectId: null, + processDefId: null, } } }, mounted() { - this.projectId = this.$route.query.projectId - this.processId = this.$route.query.processId + this.queryParams.projectId = this.$route.query.projectId + this.queryParams.processDefId = this.$route.query.processDefId this.getProjectProcessInfo() }, methods: { @@ -127,11 +133,11 @@ this.$router.push({ path: '/flowable/task/todo/detail/index', query: { - taskName: row.procDefName, - startUser: row.startUserName, + taskName: row.taskName, + startUser: row.promoterName, deployId: row.deployId, taskId: row.taskId, - procInsId: row.procInsId, + procInsId: row.processInsId, executionId: row.executionId } }) @@ -140,7 +146,7 @@ path: '/flowable/task/myProcess/send/index', query: { deployId: row.deployId, - procDefId: row.procDefId, + procDefId: row.processDefId, processName: row.taskName, taskId: row.taskId } @@ -150,23 +156,33 @@ goToProcessDetail(row) { this.$router.push({ path: '/flowable/task/myProcess/detail/index', query: { - procInsId: row.procInsId, + procInsId: row.processInsId, deployId: row.deployId, taskId: row.taskId }}) }, getList() { // 鑾峰彇浠诲姟鍒楄〃 + getProjectProcessDetailTaskList(this.queryParams).then(res => { + this.taskList = res.data + this.total = res.total + }) }, // 鏌ヨ璇︽儏 getProjectProcessInfo() { - getProjectProcessDetail(this.projectId, this.processId).then(res => { + getProjectProcessDetail(this.queryParams.projectId, this.queryParams.processDefId).then(res => { this.detailData = res.data this.taskList = res.taskList }) }, changeTab(id, event) { + let beforeId = this.selectTabId this.selectTabId = id + this.queryParams.taskType = event + if (beforeId !== id) { + this.getList() + } + } } } diff --git a/src/views/projectProcess/index.vue b/src/views/projectProcess/index.vue index d83c1cd..e087e8d 100644 --- a/src/views/projectProcess/index.vue +++ b/src/views/projectProcess/index.vue @@ -271,7 +271,7 @@ /> <RunProcess ref="runProcess" :show="showRunProcess" - :now-process-id="nowProcessId" + :now-process-def-id="nowProcessDefId" :project-info="projectRunFrom" :process-list="processList" @close="closeRunProcess"> @@ -304,7 +304,7 @@ }, processList: [], showRunProcess: false, - nowProcessId: '', + nowProcessDefId: '', isImportOrExport: false, fileDialogVisible: false, //鏄惁闇�瑕佹柊澧炴寜閽�(鍌ㄨ搫椤圭洰闇�瑕�) @@ -389,11 +389,12 @@ methods: { // 鏌ョ湅璇︽儏 lookProcessDetail(row) { + console.log(row.processDefId) this.$router.push({ path: '/projectFlow/detail', query: { projectId: row.id, - processId: row.flowableProcessId + processDefId: row.processDefId } }) }, @@ -410,7 +411,7 @@ // 鎷垮埌娴佺▼鍒楄〃 TODO 鏍规嵁椤圭洰绫诲瀷鍋氱瓫閫� getProcessConfigInfoList().then(response => { this.processList = response.data; - this.nowProcessId = row.flowableProcessId; + this.nowProcessDefId = row.processDefId; // // 闃叉锛歩d娌″彉涓嶈Е鍙戠洃鍚� // this.$refs.runProcess.setSelect(row.flowableProcessId); this.projectRunFrom.projectId = row.id; -- Gitblit v1.8.0