mirror of
http://git.xinwangdao.com/cnnc-embedded-parts-detect/detect-embeded.git
synced 2025-06-24 13:34:13 +08:00
fixed
This commit is contained in:
parent
673bac2372
commit
5972f6be40
95
src/api/model/constant.ts
Normal file
95
src/api/model/constant.ts
Normal file
@ -0,0 +1,95 @@
|
||||
/**
|
||||
* 项目:中核预埋件检测
|
||||
* @Author: xiongwei
|
||||
* @Date: 2024-09-26 11:50:00
|
||||
*/
|
||||
|
||||
import { BasePageParams, PageResult, ApiResponse } from './baseModel';
|
||||
|
||||
export interface ConstantParams extends BasePageParams {
|
||||
/**
|
||||
* ID系统自动生成
|
||||
*/
|
||||
id?: number;
|
||||
/**
|
||||
* ID系统自动生成 IN值List
|
||||
*/
|
||||
idList?: Array<number>;
|
||||
/**
|
||||
* 编码
|
||||
*/
|
||||
code?: string;
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* create_time
|
||||
*/
|
||||
createTime?: Date;
|
||||
/**
|
||||
* 下限值(大于等于)
|
||||
*/
|
||||
createTimeFrom?: Date;
|
||||
/**
|
||||
* 上限值(小于)
|
||||
*/
|
||||
createTimeTo?: Date;
|
||||
/**
|
||||
* update_time
|
||||
*/
|
||||
updateTime?: Date;
|
||||
/**
|
||||
* 下限值(大于等于)
|
||||
*/
|
||||
updateTimeFrom?: Date;
|
||||
/**
|
||||
* 上限值(小于)
|
||||
*/
|
||||
updateTimeTo?: Date;
|
||||
/**
|
||||
* 其他参数
|
||||
*/
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
export interface Constant {
|
||||
/**
|
||||
* ID系统自动生成
|
||||
*/
|
||||
id?: number;
|
||||
/**
|
||||
* 编码
|
||||
*/
|
||||
code?: string;
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* create_time
|
||||
*/
|
||||
createTime?: Date;
|
||||
/**
|
||||
* update_time
|
||||
*/
|
||||
updateTime?: Date;
|
||||
/**
|
||||
* 其他参数
|
||||
*/
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
export type ConstantPageResult = PageResult<Constant>;
|
||||
|
||||
export type ConstantPageResponse = ApiResponse<ConstantPageResult>;
|
||||
|
||||
export type ConstantResponse = ApiResponse<Constant>;
|
82
src/api/system/constantApi.ts
Normal file
82
src/api/system/constantApi.ts
Normal file
@ -0,0 +1,82 @@
|
||||
/**
|
||||
* 项目:中核预埋件检测
|
||||
* @Author: xiongwei
|
||||
* @Date: 2024-09-26 11:50:00
|
||||
*/
|
||||
|
||||
import { defHttp } from '@/utils/http/axios';
|
||||
import {
|
||||
Constant,
|
||||
ConstantParams,
|
||||
ConstantPageResult,
|
||||
} from '../model/constant';
|
||||
|
||||
const baseApi = '/v1/system/constant';
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
export const add = (entity: Constant) =>
|
||||
defHttp.post<Constant>({ url: `${baseApi}/`, data: entity });
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*/
|
||||
export const update = (entity: Constant, updateAllFields = false) =>
|
||||
defHttp.put<Constant>({ url: `${baseApi}/`, data: entity, params: { updateAllFields } });
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
export const remove = (id: any) =>
|
||||
defHttp.delete<number>({ url: `${baseApi}/${id}` });
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
export const search = (params?: ConstantParams) =>
|
||||
defHttp.get<ConstantPageResult>({ url: `${baseApi}/search`, params });
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*/
|
||||
export const all = (params?: ConstantParams) =>
|
||||
defHttp.get<Constant[]>({ url: `${baseApi}/all`, params });
|
||||
|
||||
/**
|
||||
* 通过主键查询
|
||||
*/
|
||||
export const getById = (id: any) =>
|
||||
defHttp.get<Constant>({ url: `${baseApi}/${id}` });
|
||||
|
||||
/**
|
||||
* 单个查询
|
||||
*/
|
||||
export const getOne = (params?: ConstantParams) =>
|
||||
defHttp.get<Constant>({ url: `${baseApi}/one`, params });
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*/
|
||||
export const batchRemove = (idList: Array<any>) =>
|
||||
defHttp.post<boolean>({ url: `${baseApi}/batch-delete`, data: idList });
|
||||
|
||||
/**
|
||||
* 批量新增
|
||||
*/
|
||||
export const batchAdd = (entityList: Array<Constant>) =>
|
||||
defHttp.post<boolean>({ url: `${baseApi}/batch-save`, data: entityList });
|
||||
|
||||
/**
|
||||
* 批量更新
|
||||
*/
|
||||
export const batchUpdate = (entityList: Array<Constant>) =>
|
||||
defHttp.post<boolean>({ url: `${baseApi}/batch-update`, data: entityList });
|
||||
|
||||
/**
|
||||
* 查询数量
|
||||
*/
|
||||
export const count = (params?: ConstantParams) =>
|
||||
defHttp.get<number>({ url: `${baseApi}/count`, params });
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user