init
This commit is contained in:
81
src/api/progress/plan/index.ts
Normal file
81
src/api/progress/plan/index.ts
Normal file
@ -0,0 +1,81 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { ProgressCategoryVO, ProgressCategoryForm, ProgressCategoryQuery } from '@/api/progress/plan/types';
|
||||
|
||||
/**
|
||||
* 查询进度类别列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listProgressCategory = (query?: ProgressCategoryQuery): AxiosPromise<ProgressCategoryVO[]> => {
|
||||
return request({
|
||||
url: '/progress/progressCategory/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询进度类别详细
|
||||
* @param id
|
||||
*/
|
||||
export const getProgressCategory = (id: string | number): AxiosPromise<ProgressCategoryVO> => {
|
||||
return request({
|
||||
url: '/progress/progressCategory/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增进度类别
|
||||
* @param data
|
||||
*/
|
||||
export const addProgressCategory = (data: ProgressCategoryForm) => {
|
||||
return request({
|
||||
url: '/progress/progressCategory',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改进度类别
|
||||
* @param data
|
||||
*/
|
||||
export const updateProgressCategory = (data: ProgressCategoryForm) => {
|
||||
return request({
|
||||
url: '/progress/progressCategory',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除进度类别
|
||||
* @param id
|
||||
*/
|
||||
export const delProgressCategory = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/progress/progressCategory/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询设施-方阵列表
|
||||
* @param data
|
||||
*/
|
||||
export const getProjectSquare = (projectId: string) => {
|
||||
return request({
|
||||
url: '/facility/matrix/list',
|
||||
method: 'get',
|
||||
params: {projectId}
|
||||
});
|
||||
};
|
||||
|
||||
export const lastTime=()=>{}
|
||||
export const workScheduleAddPlan=()=>{}
|
||||
export const workScheduleList=()=>{}
|
||||
export const workScheduleDel=()=>{}
|
||||
export const workScheduleSubmit=()=>{}
|
96
src/api/progress/plan/types.ts
Normal file
96
src/api/progress/plan/types.ts
Normal file
@ -0,0 +1,96 @@
|
||||
export interface ProgressCategoryVO {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 父类别id
|
||||
*/
|
||||
pid: string | number;
|
||||
|
||||
/**
|
||||
* 类别名称
|
||||
*/
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* 计量方式(1数量 2百分比)
|
||||
*/
|
||||
unitType: string;
|
||||
|
||||
/**
|
||||
* 项目id(0表示共用)
|
||||
*/
|
||||
projectId: string | number;
|
||||
|
||||
/**
|
||||
* 子对象
|
||||
*/
|
||||
children: ProgressCategoryVO[];
|
||||
}
|
||||
|
||||
export interface ProgressCategoryForm extends BaseEntity {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 父类别id
|
||||
*/
|
||||
pid?: string | number;
|
||||
|
||||
/**
|
||||
* 类别名称
|
||||
*/
|
||||
name?: string;
|
||||
|
||||
/**
|
||||
* 计量方式(1数量 2百分比)
|
||||
*/
|
||||
unitType?: string;
|
||||
|
||||
/**
|
||||
* 项目id(0表示共用)
|
||||
*/
|
||||
projectId?: string | number;
|
||||
matrixId?: string | number;
|
||||
|
||||
|
||||
}
|
||||
|
||||
export interface ProgressCategoryQuery {
|
||||
|
||||
/**
|
||||
* 父类别id
|
||||
*/
|
||||
pid?: string | number;
|
||||
|
||||
/**
|
||||
* 类别名称
|
||||
*/
|
||||
name?: string;
|
||||
|
||||
/**
|
||||
* 计量方式(1数量 2百分比)
|
||||
*/
|
||||
unitType?: string;
|
||||
|
||||
/**
|
||||
* 项目id(0表示共用)
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
/**
|
||||
* 方阵id
|
||||
*/
|
||||
matrixId?: string | number;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user