feat(app): 初始化项目配置和页面结构
- 添加 .dockerignore 和 .env.example 配置文件 - 添加 .gitignore 忽略规则配置 - 创建服务端代理API路由(_file、_modules、_server) - 集成 Ant Design Vue 组件库并配置SSR样式提取 - 定义API响应类型封装 - 创建基础布局组件(blank、console) - 实现应用中心页面和组件(AppsCenter) - 添加文章列表测试页面 - 配置控制台导航菜单结构 - 实现控制台头部组件 - 创建联系页面表单
This commit is contained in:
126
app/api/credit/creditCaseFiling/index.ts
Normal file
126
app/api/credit/creditCaseFiling/index.ts
Normal file
@@ -0,0 +1,126 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CreditCaseFiling, CreditCaseFilingParam } from './model';
|
||||
|
||||
/**
|
||||
* 分页查询司法大数据
|
||||
*/
|
||||
export async function pageCreditCaseFiling(params: CreditCaseFilingParam) {
|
||||
const res = await request.get<ApiResult<PageResult<CreditCaseFiling>>>(
|
||||
'/credit/credit-case-filing/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询司法大数据列表
|
||||
*/
|
||||
export async function listCreditCaseFiling(params?: CreditCaseFilingParam) {
|
||||
const res = await request.get<ApiResult<CreditCaseFiling[]>>(
|
||||
'/credit/credit-case-filing',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加司法大数据
|
||||
*/
|
||||
export async function addCreditCaseFiling(data: CreditCaseFiling) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-case-filing',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改司法大数据
|
||||
*/
|
||||
export async function updateCreditCaseFiling(data: CreditCaseFiling) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/credit/credit-case-filing',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除司法大数据
|
||||
*/
|
||||
export async function removeCreditCaseFiling(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-case-filing/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除司法大数据
|
||||
*/
|
||||
export async function removeBatchCreditCaseFiling(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-case-filing/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询司法大数据
|
||||
*/
|
||||
export async function getCreditCaseFiling(id: number) {
|
||||
const res = await request.get<ApiResult<CreditCaseFiling>>(
|
||||
'/credit/credit-case-filing/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入司法大数据
|
||||
*/
|
||||
export async function importCreditCaseFiling(file: File) {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-case-filing/import',
|
||||
formData,
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
55
app/api/credit/creditCaseFiling/model/index.ts
Normal file
55
app/api/credit/creditCaseFiling/model/index.ts
Normal file
@@ -0,0 +1,55 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 司法大数据
|
||||
*/
|
||||
export interface CreditCaseFiling {
|
||||
// ID
|
||||
id?: number;
|
||||
// 数据类型
|
||||
dataType?: string;
|
||||
// 原告/上诉人
|
||||
plaintiffAppellant?: string;
|
||||
// 被告/被上诉人
|
||||
appellee?: string;
|
||||
// 其他当事人/第三人
|
||||
otherPartiesThirdParty?: string;
|
||||
// 发生时间
|
||||
occurrenceTime?: string;
|
||||
// 案号
|
||||
caseNumber?: string;
|
||||
// 案由
|
||||
causeOfAction?: string;
|
||||
// 涉案金额
|
||||
involvedAmount?: string;
|
||||
// 法院
|
||||
courtName?: string;
|
||||
// 数据状态
|
||||
dataStatus?: string;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 是否推荐
|
||||
recommend?: number;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 状态, 0正常, 1冻结
|
||||
status?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 司法大数据搜索条件
|
||||
*/
|
||||
export interface CreditCaseFilingParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
Reference in New Issue
Block a user