forked from b2894lxlx/tuanwei-admin
调整
This commit is contained in:
@@ -0,0 +1,119 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { LawLegalOrgCheckConfigSuggest, LawLegalOrgCheckConfigSuggestParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询法律意见书配置
|
||||
*/
|
||||
export async function pageLawLegalOrgCheckConfigSuggest(params: LawLegalOrgCheckConfigSuggestParam) {
|
||||
const res = await request.get<ApiResult<PageResult<LawLegalOrgCheckConfigSuggest>>>(
|
||||
MODULES_API_URL + '/law/law-legal-org-check-config-suggest/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询法律意见书配置列表
|
||||
*/
|
||||
export async function listLawLegalOrgCheckConfigSuggest(params?: LawLegalOrgCheckConfigSuggestParam) {
|
||||
const res = await request.get<ApiResult<LawLegalOrgCheckConfigSuggest[]>>(
|
||||
MODULES_API_URL + '/law/law-legal-org-check-config-suggest',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
export async function treeLawLegalOrgCheckConfigSuggest(params?: LawLegalOrgCheckConfigSuggestParam) {
|
||||
const res = await request.get<ApiResult<LawLegalOrgCheckConfigSuggest[]>>(
|
||||
MODULES_API_URL + '/law/law-legal-org-check-config-suggest/tree',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加法律意见书配置
|
||||
*/
|
||||
export async function addLawLegalOrgCheckConfigSuggest(data: LawLegalOrgCheckConfigSuggest) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/law/law-legal-org-check-config-suggest',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改法律意见书配置
|
||||
*/
|
||||
export async function updateLawLegalOrgCheckConfigSuggest(data: LawLegalOrgCheckConfigSuggest) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/law/law-legal-org-check-config-suggest',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除法律意见书配置
|
||||
*/
|
||||
export async function removeLawLegalOrgCheckConfigSuggest(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/law/law-legal-org-check-config-suggest/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除法律意见书配置
|
||||
*/
|
||||
export async function removeBatchLawLegalOrgCheckConfigSuggest(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/law/law-legal-org-check-config-suggest/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询法律意见书配置
|
||||
*/
|
||||
export async function getLawLegalOrgCheckConfigSuggest(id: number) {
|
||||
const res = await request.get<ApiResult<LawLegalOrgCheckConfigSuggest>>(
|
||||
MODULES_API_URL + '/law/law-legal-org-check-config-suggest/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
Reference in New Issue
Block a user