From 0829704d064b5d843014897a84b42f3625571d97 Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期日, 09 三月 2025 23:29:42 +0800
Subject: [PATCH] 容缺补办实现
---
src/views/flowable/task/myProcess/send/index.vue | 38 +++++++++++++++++++++++++++-----------
src/api/flowable/todo.js | 4 ++--
src/views/flowable/task/myProcess/detail/index.vue | 6 +++---
src/api/flowable/process.js | 9 +++++++++
4 files changed, 41 insertions(+), 16 deletions(-)
diff --git a/src/api/flowable/process.js b/src/api/flowable/process.js
index d756ebf..65b7c7b 100644
--- a/src/api/flowable/process.js
+++ b/src/api/flowable/process.js
@@ -44,6 +44,15 @@
})
}
+// 瀹圭己琛ヤ氦
+export function waitCompleteSubmitFormTask(taskId, data) {
+ return request({
+ url: '/flowable/task/wait/complete/form/' + taskId,
+ method: 'post',
+ data: data
+ })
+}
+
// 鍙栨秷鐢宠
export function stopProcess(data) {
return request({
diff --git a/src/api/flowable/todo.js b/src/api/flowable/todo.js
index 6354aeb..436efa4 100644
--- a/src/api/flowable/todo.js
+++ b/src/api/flowable/todo.js
@@ -132,9 +132,9 @@
})
}
// 娴佺▼鑺傜偣鏌ョ湅璇︽儏琛ㄥ崟
-export function flowTaskFormDetail(taskId) {
+export function flowTaskFormDetail(processInsId, taskId) {
return request({
- url: '/flowable/task/detail/' + taskId,
+ url: '/flowable/task/detail/' + processInsId + '/' + taskId,
method: 'get',
})
}
diff --git a/src/views/flowable/task/myProcess/detail/index.vue b/src/views/flowable/task/myProcess/detail/index.vue
index 765ff17..b8e9952 100644
--- a/src/views/flowable/task/myProcess/detail/index.vue
+++ b/src/views/flowable/task/myProcess/detail/index.vue
@@ -166,7 +166,7 @@
this.projectName = this.$route.query && this.$route.query.projectName;
this.flowName = this.$route.query && this.$route.query.flowName;
// 娴佺▼浠诲姟閲嶈幏鍙栧彉閲忚〃鍗�
- this.processVariables( this.taskForm.taskId)
+ this.processVariables( this.taskForm.taskId, this.taskForm.procInsId)
this.getFlowRecordList(this.taskForm.procInsId);
},
methods: {
@@ -204,11 +204,11 @@
})
},
/** 鑾峰彇娴佺▼鍙橀噺鍐呭 */
- processVariables(taskId) {
+ processVariables(taskId, processInsId) {
if (taskId) {
this.formLoading = true
// 鎻愪氦娴佺▼鐢宠鏃跺~鍐欑殑琛ㄥ崟瀛樺叆浜嗘祦绋嬪彉閲忎腑鍚庣画浠诲姟澶勭悊鏃堕渶瑕佸睍绀�
- flowTaskFormDetail(taskId).then(res => {
+ flowTaskFormDetail(processInsId, taskId).then(res => {
this.formDataList = res.data
if (this.formDataList && this.formDataList.length > 0) {
this.$nextTick(() => {
diff --git a/src/views/flowable/task/myProcess/send/index.vue b/src/views/flowable/task/myProcess/send/index.vue
index 74d9240..706f2c2 100644
--- a/src/views/flowable/task/myProcess/send/index.vue
+++ b/src/views/flowable/task/myProcess/send/index.vue
@@ -185,7 +185,7 @@
import SingleUser from '@/components/flow/User/SingleUser'
import MultUser from '@/components/flow/User/MultUser'
import MyRole from '@/components/flow/Role/MyRole'
-import {completeSubmitFormTask} from "@/api/flowable/process";
+import {completeSubmitFormTask, waitCompleteSubmitFormTask} from "@/api/flowable/process";
import { flowTaskForm } from "@/api/flowable/todo";
import {getNextFlowNodeByStart} from "@/api/flowable/todo";
import LogView from "@/views/projectProcess/components/LogView";
@@ -289,7 +289,7 @@
this.procDefId = this.$route.query && this.$route.query.procDefId;
this.procInsId = this.$route.query && this.$route.query.procInsId;
this.goBackParams = this.$route.query && this.$route.query.goBackParams;
- this.isWait = this.$route.query && this.$route.query.isWait;
+ this.isWait = this.$route.query && this.$route.query.isWait === 'true' ? true : false;
// this.getNextFlowNodeByStart(this.deployId);
this.getFlowFormData(this.taskId);
},
@@ -675,19 +675,35 @@
// 澶嶅埗瀵硅薄鐨勫睘鎬у�肩粰鏂扮殑瀵硅薄
Object.assign(param, formData);
// 瀹屾垚浠诲姟
- completeSubmitFormTask(this.taskId, param).then(res => {
+ if (this.isWait) {
+ waitCompleteSubmitFormTask(this.taskId, param).then(res => {
+ this.$modal.msgSuccess(res.msg);
+ this.submitLoading = false
+ this.goBack();
+ })
+ } else {
+ completeSubmitFormTask(this.taskId, param).then(res => {
+ this.$modal.msgSuccess(res.msg);
+ this.submitLoading = false
+ this.goBack();
+ })
+ }
+ })
+ } else {
+ // 娌″叧鑱旇〃鍗曠洿鎺ヤ紶绌�
+ if (this.isWait) {
+ waitCompleteSubmitFormTask(this.taskId, {}).then(res => {
this.$modal.msgSuccess(res.msg);
this.submitLoading = false
this.goBack();
})
- })
- } else {
- // 娌″叧鑱旇〃鍗曠洿鎺ヤ紶绌�
- completeSubmitFormTask(this.taskId, {}).then(res => {
- this.$modal.msgSuccess(res.msg);
- this.submitLoading = false
- this.goBack();
- })
+ } else {
+ completeSubmitFormTask(this.taskId, {}).then(res => {
+ this.$modal.msgSuccess(res.msg);
+ this.submitLoading = false
+ this.goBack();
+ })
+ }
}
}).catch((err) => {
console.log(err)
--
Gitblit v1.8.0