mirror of
https://gitee.com/dapppp/ruoyi-plus-vben5.git
synced 2026-03-12 01:00:09 +08:00
feat: 修改流程变量
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import type { TaskInfo } from '../task/model';
|
||||
import type { FlowInfoResponse } from './model';
|
||||
import type { FlowInfoResponse, FlowInstanceVariableResp } from './model';
|
||||
|
||||
import type { ID, IDS, PageQuery, PageResult } from '#/api/common';
|
||||
|
||||
@@ -104,8 +104,8 @@ export function flowInfo(businessId: string) {
|
||||
* @returns Map<string,any>
|
||||
*/
|
||||
export function instanceVariable(instanceId: string) {
|
||||
return requestClient.get<Record<string, any>>(
|
||||
`/workflow/instance/variable/${instanceId}`,
|
||||
return requestClient.get<FlowInstanceVariableResp>(
|
||||
`/workflow/instance/instanceVariable/${instanceId}`,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -118,3 +118,22 @@ export function workflowInstanceInvalid(data: {
|
||||
}) {
|
||||
return requestClient.postWithMsg<void>('/workflow/instance/invalid', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改流程参数
|
||||
* @param data 参数
|
||||
* @param data.instanceId 实例ID
|
||||
* @param data.key 参数key
|
||||
* @param data.value 值
|
||||
* @returns void
|
||||
*/
|
||||
export function updateFlowVariable(data: {
|
||||
instanceId: string;
|
||||
key: string;
|
||||
value: any;
|
||||
}) {
|
||||
return requestClient.putWithMsg<void>(
|
||||
'/workflow/instance/updateVariable',
|
||||
data,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
export {};
|
||||
|
||||
export interface Flow {
|
||||
id: string;
|
||||
createTime: string;
|
||||
@@ -39,3 +41,14 @@ export interface FlowInfoResponse {
|
||||
instanceId: string;
|
||||
list: Flow[];
|
||||
}
|
||||
|
||||
export interface FlowInstanceVariableResp {
|
||||
/**
|
||||
* json字符串 流程变量
|
||||
*/
|
||||
variable: string;
|
||||
variableList: {
|
||||
key: string;
|
||||
value: any;
|
||||
}[];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user