From 6b988bd582bfcd17fee48c476a5a6e5cc172b0d5 Mon Sep 17 00:00:00 2001
From: baoshiwei <baoshiwei@shlanbao.cn>
Date: 星期三, 12 三月 2025 10:08:33 +0800
Subject: [PATCH] dev-2

---
 src/api/workflow/processInstance/index.ts |   49 +++++++++++++++++++++++++++++++------------------
 1 files changed, 31 insertions(+), 18 deletions(-)

diff --git a/src/api/workflow/processInstance/index.ts b/src/api/workflow/processInstance/index.ts
index 869245e..6d5e53b 100644
--- a/src/api/workflow/processInstance/index.ts
+++ b/src/api/workflow/processInstance/index.ts
@@ -29,33 +29,33 @@
 };
 
 /**
- * 閫氳繃娴佺▼瀹炰緥id鑾峰彇鍘嗗彶娴佺▼鍥�
+ * 閫氳繃涓氬姟id鑾峰彇鍘嗗彶娴佺▼鍥�
  */
-export const getHistoryImage = (processInstanceId: string) => {
+export const getHistoryImage = (businessKey: string) => {
   return request({
-    url: `/workflow/processInstance/getHistoryImage/${processInstanceId}` + '?t' + Math.random(),
+    url: `/workflow/processInstance/getHistoryImage/${businessKey}` + '?t' + Math.random(),
     method: 'get'
   });
 };
 
 /**
- * 閫氳繃娴佺▼瀹炰緥id鑾峰彇鍘嗗彶娴佺▼鍥捐繍琛屼腑锛屽巻鍙茬瓑鑺傜偣
+ * 閫氳繃涓氬姟id鑾峰彇鍘嗗彶娴佺▼鍥捐繍琛屼腑锛屽巻鍙茬瓑鑺傜偣
  */
-export const getHistoryList = (processInstanceId: string) => {
+export const getHistoryList = (businessKey: string): AxiosPromise<Record<string, any>> => {
   return request({
-    url: `/workflow/processInstance/getHistoryList/${processInstanceId}` + '?t' + Math.random(),
+    url: `/workflow/processInstance/getHistoryList/${businessKey}` + '?t' + Math.random(),
     method: 'get'
   });
 };
 
 /**
  * 鑾峰彇瀹℃壒璁板綍
- * @param processInstanceId 娴佺▼瀹炰緥id
+ * @param businessKey 涓氬姟id
  * @returns
  */
-export const getHistoryRecord = (processInstanceId: string) => {
+export const getHistoryRecord = (businessKey: string | number) => {
   return request({
-    url: `/workflow/processInstance/getHistoryRecord/${processInstanceId}`,
+    url: `/workflow/processInstance/getHistoryRecord/${businessKey}`,
     method: 'get'
   });
 };
@@ -75,24 +75,24 @@
 
 /**
  * 杩愯涓殑瀹炰緥 鍒犻櫎绋嬪疄渚嬶紝鍒犻櫎鍘嗗彶璁板綍锛屽垹闄や笟鍔′笌娴佺▼鍏宠仈淇℃伅
- * @param processInstanceId 娴佺▼瀹炰緥id
+ * @param businessKey 涓氬姟id
  * @returns
  */
-export const deleteRunAndHisInstance = (processInstanceId: string | string[]) => {
+export const deleteRunAndHisInstance = (businessKey: string | string[]) => {
   return request({
-    url: `/workflow/processInstance/deleteRunAndHisInstance/${processInstanceId}`,
+    url: `/workflow/processInstance/deleteRunAndHisInstance/${businessKey}`,
     method: 'delete'
   });
 };
 
 /**
  * 宸插畬鎴愮殑瀹炰緥 鍒犻櫎绋嬪疄渚嬶紝鍒犻櫎鍘嗗彶璁板綍锛屽垹闄や笟鍔′笌娴佺▼鍏宠仈淇℃伅
- * @param processInstanceId 娴佺▼瀹炰緥id
+ * @param businessKey 涓氬姟id
  * @returns
  */
-export const deleteFinishAndHisInstance = (processInstanceId: string | string[]) => {
+export const deleteFinishAndHisInstance = (businessKey: string | string[]) => {
   return request({
-    url: `/workflow/processInstance/deleteFinishAndHisInstance/${processInstanceId}`,
+    url: `/workflow/processInstance/deleteFinishAndHisInstance/${businessKey}`,
     method: 'delete'
   });
 };
@@ -112,12 +112,25 @@
 
 /**
  * 鎾ら攢娴佺▼
- * @param processInstanceId 娴佺▼瀹炰緥id
+ * @param businessKey 涓氬姟id
  * @returns
  */
-export const cancelProcessApply = (processInstanceId: string) => {
+export const cancelProcessApply = (businessKey: string) => {
   return request({
-    url: `/workflow/processInstance/cancelProcessApply/${processInstanceId}`,
+    url: `/workflow/processInstance/cancelProcessApply/${businessKey}`,
     method: 'post'
   });
 };
+
+export default {
+  getPageByRunning,
+  getPageByFinish,
+  getHistoryImage,
+  getHistoryList,
+  getHistoryRecord,
+  deleteRunInstance,
+  deleteRunAndHisInstance,
+  deleteFinishAndHisInstance,
+  getPageByCurrent,
+  cancelProcessApply
+};

--
Gitblit v1.9.3