From cc293536e2f9879f092a63dae790473aca9ac9d5 Mon Sep 17 00:00:00 2001
From: gssong <1742057357@qq.com>
Date: Thu, 7 Mar 2024 21:54:47 +0800
Subject: [PATCH] =?UTF-8?q?add=20=E6=B7=BB=E5=8A=A0=E5=AE=A1=E6=89=B9?=
=?UTF-8?q?=E5=8A=A0=E7=AD=BE=20=E5=87=8F=E7=AD=BE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/workflow/task/index.ts | 6 +-
src/components/Process/multiInstanceUser.vue | 2 +-
src/components/Process/submitVerify.vue | 71 ++++++++++++++++----
3 files changed, 63 insertions(+), 16 deletions(-)
diff --git a/src/api/workflow/task/index.ts b/src/api/workflow/task/index.ts
index fbeca0e..2c5e539 100644
--- a/src/api/workflow/task/index.ts
+++ b/src/api/workflow/task/index.ts
@@ -130,13 +130,13 @@ export const backProcess = (data: object) => {
};
/**
- * 获取流程状态
+ * 获取当前任务
* @param taskId
* @returns
*/
-export const getBusinessStatus = (taskId: string) => {
+export const getTaskById = (taskId: string) => {
return request({
- url: '/workflow/task/getBusinessStatus/' + taskId,
+ url: '/workflow/task/getTaskById/' + taskId,
method: 'get'
});
};
diff --git a/src/components/Process/multiInstanceUser.vue b/src/components/Process/multiInstanceUser.vue
index d79bac9..3cda3fd 100644
--- a/src/components/Process/multiInstanceUser.vue
+++ b/src/components/Process/multiInstanceUser.vue
@@ -75,7 +75,7 @@
diff --git a/src/components/Process/submitVerify.vue b/src/components/Process/submitVerify.vue
index da30ed7..9e2a7be 100644
--- a/src/components/Process/submitVerify.vue
+++ b/src/components/Process/submitVerify.vue
@@ -1,5 +1,5 @@
-
+
@@ -8,7 +8,7 @@
短信
-
+
@@ -17,18 +17,22 @@
{{ user.userName }}
-
+
+
+
@@ -36,11 +40,15 @@
import { ref } from 'vue';
import { ComponentInternalInstance } from 'vue';
import { ElForm } from 'element-plus';
-import { completeTask, backProcess, getBusinessStatus } from '@/api/workflow/task';
+import { completeTask, backProcess, getTaskById } from '@/api/workflow/task';
import UserSelect from '@/components/UserSelect';
+import MultiInstanceUser from '@/components/Process/multiInstanceUser.vue';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
import { UserVO } from '@/api/system/user/types';
+import { TaskVO } from '@/api/workflow/task/types';
const userSelectCopyRef = ref>();
+ //加签组件
+const multiInstanceUserRef = ref>();
const props = defineProps({
taskVariables: {
@@ -52,16 +60,41 @@ const props = defineProps({
const loading = ref(true);
//按钮
const buttonLoading = ref(true);
-//流程状态
-const businessStatus = ref('');
//任务id
const taskId = ref('');
//抄送人
const selectCopyUserList = ref([]);
//抄送人id
const selectCopyUserIds = ref(undefined);
-
-
+//任务
+const task = ref({
+ id: undefined,
+ name: undefined,
+ description: undefined,
+ priority: undefined,
+ owner: undefined,
+ assignee: undefined,
+ assigneeName: undefined,
+ processInstanceId: undefined,
+ executionId: undefined,
+ taskDefinitionId: undefined,
+ processDefinitionId: undefined,
+ endTime: undefined,
+ taskDefinitionKey: undefined,
+ dueDate: undefined,
+ category: undefined,
+ parentTaskId: undefined,
+ tenantId: undefined,
+ claimTime: undefined,
+ businessStatus: undefined,
+ businessStatusName: undefined,
+ processDefinitionName: undefined,
+ processDefinitionKey: undefined,
+ participantVo: undefined,
+ multiInstance: undefined
+});
+//加签 减签标题
+const title = ref('');
const dialog = reactive({
visible: false,
title: '提示'
@@ -85,8 +118,8 @@ const openDialog = (id?: string) => {
loading.value = true;
buttonLoading.value = true;
nextTick(() => {
- getBusinessStatus(taskId.value).then((response) => {
- businessStatus.value = response.data;
+ getTaskById(taskId.value).then((response) => {
+ task.value = response.data;
loading.value = false;
buttonLoading.value = false;
});
@@ -156,6 +189,20 @@ const handleCopyCloseTag = (user: UserVO) => {
selectCopyUserList.value.splice(index, 1);
selectCopyUserIds.value = selectCopyUserList.value.map((item) => item.userId).join(',');
};
+//加签
+const addMultiInstanceUser = () => {
+ if (multiInstanceUserRef.value) {
+ title.value = '加签人员';
+ multiInstanceUserRef.value.getAddMultiInstanceList(taskId.value, []);
+ }
+};
+//减签
+const deleteMultiInstanceUser = () => {
+ if (multiInstanceUserRef.value) {
+ title.value = '减签人员';
+ multiInstanceUserRef.value.getDeleteMultiInstanceList(taskId.value);
+ }
+};
/**
* 对外暴露子组件方法
*/