This commit is contained in:
2026-07-20 11:50:47 +08:00
parent 95d43746f6
commit 019ed28d37
401 changed files with 61622 additions and 23869 deletions
+106
View File
@@ -0,0 +1,106 @@
import request from '@/utils/request';
import type { ApiResult, PageResult } from '@/api';
import type { ReviewFlowConfig, ReviewFlowConfigParam } from './model';
import { MODULES_API_URL } from '@/config/setting';
/**
* 分页查询
*/
export async function pageReviewFlowConfig(params: ReviewFlowConfigParam) {
const res = await request.get<ApiResult<PageResult<ReviewFlowConfig>>>(
MODULES_API_URL + '/gxmu/review-flow-config/page',
{
params
}
);
if (res.data.code === 0) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 查询列表
*/
export async function listReviewFlowConfig(params?: ReviewFlowConfigParam) {
const res = await request.get<ApiResult<ReviewFlowConfig[]>>(
MODULES_API_URL + '/gxmu/review-flow-config',
{
params
}
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 添加
*/
export async function addReviewFlowConfig(data: ReviewFlowConfig) {
const res = await request.post<ApiResult<unknown>>(
MODULES_API_URL + '/gxmu/review-flow-config',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 修改
*/
export async function updateReviewFlowConfig(data: ReviewFlowConfig) {
const res = await request.put<ApiResult<unknown>>(
MODULES_API_URL + '/gxmu/review-flow-config',
data
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 删除
*/
export async function removeReviewFlowConfig(id?: number) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/gxmu/review-flow-config/' + id
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 批量删除
*/
export async function removeBatchReviewFlowConfig(data: (number | undefined)[]) {
const res = await request.delete<ApiResult<unknown>>(
MODULES_API_URL + '/gxmu/review-flow-config/batch',
{
data
}
);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
/**
* 根据id查询
*/
export async function getReviewFlowConfig(id: number) {
const res = await request.get<ApiResult<ReviewFlowConfig>>(
MODULES_API_URL + '/gxmu/review-flow-config/' + id
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}
@@ -0,0 +1,37 @@
import type { PageParam } from '@/api';
/**
*
*/
export interface ReviewFlowConfig {
//
id?: number;
//
title?: string;
// 所属部门(机构)
organizationId?: number;
// 所属部门名称(后端可能返回)
organizationName?: string;
// 流id
flowId?: number;
// 模块
module?: string;
// 是否删除, 0否, 1是
deleted?: number;
// 租户id
tenantId?: number;
// 创建时间
createTime?: string;
// 修改时间
updateTime?: string;
//
userId?: number;
}
/**
* 搜索条件
*/
export interface ReviewFlowConfigParam extends PageParam {
id?: number;
keywords?: string;
}