fix: code review 修改
This commit is contained in:
@@ -3,9 +3,8 @@ import type { PageParam, PageResult } from '@vben/request';
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace BpmCategoryApi {
|
||||
/** 流程分类 VO */
|
||||
// TODO @jason:不用 VO 后缀哈
|
||||
export interface CategoryVO {
|
||||
/** 流程分类 */
|
||||
export interface Category {
|
||||
id: number;
|
||||
name: string;
|
||||
code: string;
|
||||
@@ -17,7 +16,7 @@ export namespace BpmCategoryApi {
|
||||
|
||||
/** 查询流程分类分页 */
|
||||
export async function getCategoryPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<BpmCategoryApi.CategoryVO>>(
|
||||
return requestClient.get<PageResult<BpmCategoryApi.Category>>(
|
||||
'/bpm/category/page',
|
||||
{ params },
|
||||
);
|
||||
@@ -25,18 +24,18 @@ export async function getCategoryPage(params: PageParam) {
|
||||
|
||||
/** 查询流程分类详情 */
|
||||
export async function getCategory(id: number) {
|
||||
return requestClient.get<BpmCategoryApi.CategoryVO>(
|
||||
return requestClient.get<BpmCategoryApi.Category>(
|
||||
`/bpm/category/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增流程分类 */
|
||||
export async function createCategory(data: BpmCategoryApi.CategoryVO) {
|
||||
export async function createCategory(data: BpmCategoryApi.Category) {
|
||||
return requestClient.post<number>('/bpm/category/create', data);
|
||||
}
|
||||
|
||||
/** 修改流程分类 */
|
||||
export async function updateCategory(data: BpmCategoryApi.CategoryVO) {
|
||||
export async function updateCategory(data: BpmCategoryApi.Category) {
|
||||
return requestClient.put<boolean>('/bpm/category/update', data);
|
||||
}
|
||||
|
||||
@@ -47,7 +46,7 @@ export async function deleteCategory(id: number) {
|
||||
|
||||
/** 查询流程分类列表 */
|
||||
export async function getCategorySimpleList() {
|
||||
return requestClient.get<BpmCategoryApi.CategoryVO[]>(
|
||||
return requestClient.get<BpmCategoryApi.Category[]>(
|
||||
`/bpm/category/simple-list`,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace BpmFormApi {
|
||||
/** 流程表单 */
|
||||
// TODO @jason:不用 VO 后缀哈
|
||||
// TODO @ziye:不用 VO 后缀哈
|
||||
export interface FormVO {
|
||||
id?: number | undefined;
|
||||
name: string;
|
||||
|
||||
@@ -11,9 +11,8 @@ export namespace BpmModelApi {
|
||||
deptName?: string;
|
||||
}
|
||||
|
||||
/** 流程定义 VO */
|
||||
// TODO @jason:不用 VO 后缀哈
|
||||
export interface ProcessDefinitionVO {
|
||||
/** 流程定义 */
|
||||
export interface ProcessDefinition {
|
||||
id: string;
|
||||
key?: string;
|
||||
version: number;
|
||||
@@ -23,8 +22,8 @@ export namespace BpmModelApi {
|
||||
formCustomViewPath?: string;
|
||||
}
|
||||
|
||||
/** 流程模型 VO */
|
||||
export interface ModelVO {
|
||||
/** 流程模型 */
|
||||
export interface Model {
|
||||
id: number;
|
||||
key: string;
|
||||
name: string;
|
||||
@@ -36,7 +35,7 @@ export namespace BpmModelApi {
|
||||
formId: number;
|
||||
formCustomCreatePath: string;
|
||||
formCustomViewPath: string;
|
||||
processDefinition: ProcessDefinitionVO;
|
||||
processDefinition: ProcessDefinition;
|
||||
status: number;
|
||||
remark: string;
|
||||
createTime: string;
|
||||
@@ -49,23 +48,23 @@ export namespace BpmModelApi {
|
||||
export interface ModelCategoryInfo {
|
||||
id: number;
|
||||
name: string;
|
||||
modelList: BpmModelApi.ModelVO[];
|
||||
modelList: BpmModelApi.Model[];
|
||||
}
|
||||
|
||||
/** 获取流程模型列表 */
|
||||
export async function getModelList(name: string | undefined) {
|
||||
return requestClient.get<BpmModelApi.ModelVO[]>('/bpm/model/list', {
|
||||
return requestClient.get<BpmModelApi.Model[]>('/bpm/model/list', {
|
||||
params: { name },
|
||||
});
|
||||
}
|
||||
|
||||
/** 获取流程模型详情 */
|
||||
export async function getModel(id: string) {
|
||||
return requestClient.get<BpmModelApi.ModelVO>(`/bpm/model/get?id=${id}`);
|
||||
return requestClient.get<BpmModelApi.Model>(`/bpm/model/get?id=${id}`);
|
||||
}
|
||||
|
||||
/** 更新流程模型 */
|
||||
export async function updateModel(data: BpmModelApi.ModelVO) {
|
||||
export async function updateModel(data: BpmModelApi.Model) {
|
||||
return requestClient.put('/bpm/model/update', data);
|
||||
}
|
||||
|
||||
@@ -78,7 +77,7 @@ export async function updateModelSortBatch(ids: number[]) {
|
||||
}
|
||||
|
||||
/** 更新流程模型的 BPMN XML */
|
||||
export async function updateModelBpmn(data: BpmModelApi.ModelVO) {
|
||||
export async function updateModelBpmn(data: BpmModelApi.Model) {
|
||||
return requestClient.put('/bpm/model/update-bpmn', data);
|
||||
}
|
||||
|
||||
@@ -92,7 +91,7 @@ export async function updateModelState(id: number, state: number) {
|
||||
}
|
||||
|
||||
/** 创建流程模型 */
|
||||
export async function createModel(data: BpmModelApi.ModelVO) {
|
||||
export async function createModel(data: BpmModelApi.Model) {
|
||||
return requestClient.post('/bpm/model/create', data);
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ export namespace BpmProcessInstanceApi {
|
||||
formVariables: Record<string, any>;
|
||||
id: number;
|
||||
name: string;
|
||||
processDefinition?: BpmModelApi.ProcessDefinitionVO;
|
||||
processDefinition?: BpmModelApi.ProcessDefinition;
|
||||
processDefinitionId: string;
|
||||
remark: string;
|
||||
result: number;
|
||||
@@ -67,7 +67,7 @@ export namespace BpmProcessInstanceApi {
|
||||
export type ApprovalDetail = {
|
||||
activityNodes: BpmProcessInstanceApi.ApprovalNodeInfo[];
|
||||
formFieldsPermission: any;
|
||||
processDefinition: BpmModelApi.ProcessDefinitionVO;
|
||||
processDefinition: BpmModelApi.ProcessDefinition;
|
||||
processInstance: BpmProcessInstanceApi.ProcessInstanceVO;
|
||||
status: number;
|
||||
todoTask: BpmTaskApi.TaskVO;
|
||||
|
||||
Reference in New Issue
Block a user