规则展示,bug修复
This commit is contained in:
44
modeler/src/views/decision/rule-config/api.ts
Normal file
44
modeler/src/views/decision/rule-config/api.ts
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* This file is part of the kernelstudio package.
|
||||
*
|
||||
* (c) 2014-2026 zlin <admin@kernelstudio.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE file
|
||||
* that was distributed with this source code.
|
||||
*/
|
||||
|
||||
import { HttpRequestClient } from '@/utils/request';
|
||||
import type { ApiDataResponse, BasicResponse } from '@/types';
|
||||
import type { RuleConfig, RuleConfigPageableResponse, RuleConfigRequest, RuleDictItem, RuleParamMeta } from './types';
|
||||
|
||||
const req = HttpRequestClient.create<BasicResponse>({
|
||||
baseURL: '/api',
|
||||
});
|
||||
|
||||
export const findRuleConfigByQuery = (query: Partial<RuleConfigRequest> = {}): Promise<RuleConfigPageableResponse> => {
|
||||
return req.get('/system/rule/config/list', query);
|
||||
};
|
||||
|
||||
export const findRuleConfigByCode = (ruleCode: string): Promise<ApiDataResponse<RuleConfig>> => {
|
||||
return req.get(`/system/rule/config/${ruleCode}`);
|
||||
};
|
||||
|
||||
export const createRuleConfig = (ruleConfig: RuleConfig): Promise<BasicResponse> => {
|
||||
return req.postJson('/system/rule/config', ruleConfig);
|
||||
};
|
||||
|
||||
export const updateRuleConfig = (ruleConfig: RuleConfig): Promise<BasicResponse> => {
|
||||
return req.putJson('/system/rule/config', ruleConfig);
|
||||
};
|
||||
|
||||
export const deleteRuleConfig = (ruleCode: string): Promise<BasicResponse> => {
|
||||
return req.delete(`/system/rule/config/${ruleCode}`);
|
||||
};
|
||||
|
||||
export const findRuleDictByType = (dictType: string): Promise<ApiDataResponse<RuleDictItem[]>> => {
|
||||
return req.get(`/system/rule/config/dict/${dictType}`);
|
||||
};
|
||||
|
||||
export const findRuleParamMeta = (): Promise<ApiDataResponse<RuleParamMeta[]>> => {
|
||||
return req.get('/system/rule/config/param-meta');
|
||||
};
|
||||
Reference in New Issue
Block a user