修改各模块ts接口规范
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { ConstructionUserVO, ConstructionUserForm, ConstructionUserQuery } from '@/api/project/constructionUser/types';
|
||||
import { ConstructionUserVO, ConstructionUserForm, ConstructionUserQuery, PageConstructionUser } from '@/api/project/constructionUser/types';
|
||||
|
||||
/**
|
||||
* 查询施工人员列表
|
||||
@ -8,7 +8,7 @@ import { ConstructionUserVO, ConstructionUserForm, ConstructionUserQuery } from
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listConstructionUser = (query?: ConstructionUserQuery): AxiosPromise<ConstructionUserVO[]> => {
|
||||
export const listConstructionUser = (query?: ConstructionUserQuery): AxiosPromise<PageConstructionUser> => {
|
||||
return request({
|
||||
url: '/project/constructionUser/list',
|
||||
method: 'get',
|
||||
@ -31,7 +31,7 @@ export const getConstructionUser = (id: string | number): AxiosPromise<Construct
|
||||
* 新增施工人员
|
||||
* @param data
|
||||
*/
|
||||
export const addConstructionUser = (data: ConstructionUserForm) => {
|
||||
export const addConstructionUser = (data: ConstructionUserForm): AxiosPromise<string | number> => {
|
||||
return request({
|
||||
url: '/project/constructionUser',
|
||||
method: 'post',
|
||||
|
@ -430,3 +430,7 @@ export interface ConstructionUserQuery extends PageRequest {
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
|
||||
export interface PageConstructionUser extends PageResponse {
|
||||
records?: ConstructionUserVO[];
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { ContractorVO, ContractorForm, ContractorQuery } from '@/api/project/contractor/types';
|
||||
import { ContractorForm, ContractorQuery, ContractorVO, PageContractor } from '@/api/project/contractor/types';
|
||||
|
||||
/**
|
||||
* 查询分包单位列表
|
||||
@ -8,7 +8,7 @@ import { ContractorVO, ContractorForm, ContractorQuery } from '@/api/project/con
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listContractor = (query?: ContractorQuery): AxiosPromise<ContractorVO[]> => {
|
||||
export const listContractor = (query?: ContractorQuery): AxiosPromise<PageContractor> => {
|
||||
return request({
|
||||
url: '/project/contractor/list',
|
||||
method: 'get',
|
||||
@ -31,7 +31,7 @@ export const getContractor = (id: string | number): AxiosPromise<ContractorVO> =
|
||||
* 新增分包单位
|
||||
* @param data
|
||||
*/
|
||||
export const addContractor = (data: ContractorForm) => {
|
||||
export const addContractor = (data: ContractorForm): AxiosPromise<string | number> => {
|
||||
return request({
|
||||
url: '/project/contractor',
|
||||
method: 'post',
|
||||
|
@ -103,3 +103,7 @@ export interface ContractorQuery extends PageRequest {
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
|
||||
export interface PageContractor extends PageResponse {
|
||||
records?: ContractorVO[];
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { ProjectVO, ProjectForm, ProjectQuery } from '@/api/project/project/types';
|
||||
import { PageProjectVo, ProjectForm, ProjectQuery, ProjectVO } from '@/api/project/project/types';
|
||||
|
||||
/**
|
||||
* 查询项目列表
|
||||
@ -8,7 +8,7 @@ import { ProjectVO, ProjectForm, ProjectQuery } from '@/api/project/project/type
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listProject = (query?: ProjectQuery): AxiosPromise<ProjectVO[]> => {
|
||||
export const listProject = (query?: ProjectQuery): AxiosPromise<PageProjectVo> => {
|
||||
return request({
|
||||
url: '/project/project/list',
|
||||
method: 'get',
|
||||
@ -31,7 +31,7 @@ export const getProject = (id: string | number): AxiosPromise<ProjectVO> => {
|
||||
* 新增项目
|
||||
* @param data
|
||||
*/
|
||||
export const addProject = (data: ProjectForm) => {
|
||||
export const addProject = (data: ProjectForm): AxiosPromise<string | number> => {
|
||||
return request({
|
||||
url: '/project/project',
|
||||
method: 'post',
|
||||
|
@ -328,3 +328,7 @@ export interface ProjectQuery extends PageRequest {
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
|
||||
export interface PageProjectVo extends PageResponse {
|
||||
records?: ProjectVO[];
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { ProjectRelevancyVO, ProjectRelevancyForm, ProjectRelevancyQuery } from '@/api/project/projectRelevancy/types';
|
||||
import { PageProjectRelevancy, ProjectRelevancyForm, ProjectRelevancyQuery, ProjectRelevancyVO } from '@/api/project/projectRelevancy/types';
|
||||
|
||||
/**
|
||||
* 查询系统用户与项目关联列表
|
||||
@ -8,7 +8,7 @@ import { ProjectRelevancyVO, ProjectRelevancyForm, ProjectRelevancyQuery } from
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listProjectRelevancy = (query?: ProjectRelevancyQuery): AxiosPromise<ProjectRelevancyVO[]> => {
|
||||
export const listProjectRelevancy = (query?: ProjectRelevancyQuery): AxiosPromise<PageProjectRelevancy> => {
|
||||
return request({
|
||||
url: '/project/projectRelevancy/login/page',
|
||||
method: 'get',
|
||||
@ -31,7 +31,7 @@ export const getProjectRelevancy = (id: string | number): AxiosPromise<ProjectRe
|
||||
* 新增系统用户与项目关联
|
||||
* @param data
|
||||
*/
|
||||
export const addProjectRelevancy = (data: ProjectRelevancyForm) => {
|
||||
export const addProjectRelevancy = (data: ProjectRelevancyForm): AxiosPromise<string | number> => {
|
||||
return request({
|
||||
url: '/project/projectRelevancy',
|
||||
method: 'post',
|
||||
@ -70,7 +70,7 @@ export const delProjectRelevancy = (id: string | number | Array<string | number>
|
||||
* 获取用户已关联的项目列表
|
||||
* @param params { userId: number }
|
||||
*/
|
||||
export function listUserProjects(params: { userId: number }) {
|
||||
export function listUserProjects(params: { userId: number | string }) {
|
||||
return request({
|
||||
url: '/project/projectRelevancy/list',
|
||||
method: 'get',
|
||||
@ -82,7 +82,7 @@ export function listUserProjects(params: { userId: number }) {
|
||||
* 添加项目关联
|
||||
* @param data { userId: number; projectIds: number[] }
|
||||
*/
|
||||
export function addNewProjectRelevancy(data: { userId: number; projectIds: number[] }) {
|
||||
export function addNewProjectRelevancy(data: { userId: number | string; projectIdList: number[] }) {
|
||||
return request({
|
||||
url: '/project/projectRelevancy/add/project/list',
|
||||
method: 'post',
|
||||
@ -94,7 +94,7 @@ export function addNewProjectRelevancy(data: { userId: number; projectIds: numbe
|
||||
* 移除项目关联
|
||||
* @param data { userId: number; projectIds: number[] }
|
||||
*/
|
||||
export function removeNewProjectRelevancy(data: { userId: number; projectIds: number[] }) {
|
||||
export function removeNewProjectRelevancy(data: { userId: number | string; projectIdList: number[] }) {
|
||||
return request({
|
||||
url: '/project/projectRelevancy/remove/project/list',
|
||||
method: 'delete',
|
||||
|
@ -1,3 +1,5 @@
|
||||
import { ProjectVO } from '@/api/project/project/types';
|
||||
|
||||
export interface ProjectRelevancyVO {
|
||||
/**
|
||||
* 主键ID
|
||||
@ -15,10 +17,9 @@ export interface ProjectRelevancyVO {
|
||||
projectId: string | number;
|
||||
|
||||
/**
|
||||
* 删除时间
|
||||
* 项目详情
|
||||
*/
|
||||
deletedAt: string;
|
||||
|
||||
project: ProjectVO;
|
||||
}
|
||||
|
||||
export interface ProjectRelevancyForm extends BaseEntity {
|
||||
@ -41,11 +42,9 @@ export interface ProjectRelevancyForm extends BaseEntity {
|
||||
* 删除时间
|
||||
*/
|
||||
deletedAt?: string;
|
||||
|
||||
}
|
||||
|
||||
export interface ProjectRelevancyQuery extends PageQuery {
|
||||
|
||||
export interface ProjectRelevancyQuery extends PageRequest {
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@ -61,11 +60,12 @@ export interface ProjectRelevancyQuery extends PageQuery {
|
||||
*/
|
||||
deletedAt?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
|
||||
|
||||
|
||||
export interface PageProjectRelevancy extends PageResponse {
|
||||
records?: ProjectRelevancyVO[];
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { ProjectTeamVO, ProjectTeamForm, ProjectTeamQuery } from '@/api/project/projectTeam/types';
|
||||
import { PageProjectTeam, ProjectTeamForm, ProjectTeamQuery, ProjectTeamVO } from '@/api/project/projectTeam/types';
|
||||
|
||||
/**
|
||||
* 查询项目班组列表
|
||||
@ -8,7 +8,7 @@ import { ProjectTeamVO, ProjectTeamForm, ProjectTeamQuery } from '@/api/project/
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listProjectTeam = (query?: ProjectTeamQuery): AxiosPromise<ProjectTeamVO[]> => {
|
||||
export const listProjectTeam = (query?: ProjectTeamQuery): AxiosPromise<PageProjectTeam> => {
|
||||
return request({
|
||||
url: '/project/projectTeam/list',
|
||||
method: 'get',
|
||||
@ -31,7 +31,7 @@ export const getProjectTeam = (id: string | number): AxiosPromise<ProjectTeamVO>
|
||||
* 新增项目班组
|
||||
* @param data
|
||||
*/
|
||||
export const addProjectTeam = (data: ProjectTeamForm) => {
|
||||
export const addProjectTeam = (data: ProjectTeamForm): AxiosPromise<string | number> => {
|
||||
return request({
|
||||
url: '/project/projectTeam',
|
||||
method: 'post',
|
||||
|
@ -73,3 +73,7 @@ export interface ProjectTeamQuery extends PageRequest {
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
|
||||
export interface PageProjectTeam extends PageResponse {
|
||||
records?: ProjectTeamVO[];
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { ProjectTeamMemberVO, ProjectTeamMemberForm, ProjectTeamMemberQuery } from '@/api/project/projectTeamMember/types';
|
||||
import { PageProjectTeamMember, ProjectTeamMemberForm, ProjectTeamMemberQuery, ProjectTeamMemberVO } from '@/api/project/projectTeamMember/types';
|
||||
|
||||
/**
|
||||
* 查询项目班组下的成员列表
|
||||
@ -8,7 +8,7 @@ import { ProjectTeamMemberVO, ProjectTeamMemberForm, ProjectTeamMemberQuery } fr
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listProjectTeamMember = (query?: ProjectTeamMemberQuery): AxiosPromise<ProjectTeamMemberVO[]> => {
|
||||
export const listProjectTeamMember = (query?: ProjectTeamMemberQuery): AxiosPromise<PageProjectTeamMember> => {
|
||||
return request({
|
||||
url: '/project/projectTeamMember/list',
|
||||
method: 'get',
|
||||
@ -31,7 +31,7 @@ export const getProjectTeamMember = (id: string | number): AxiosPromise<ProjectT
|
||||
* 新增项目班组下的成员
|
||||
* @param data
|
||||
*/
|
||||
export const addProjectTeamMember = (data: ProjectTeamMemberForm) => {
|
||||
export const addProjectTeamMember = (data: ProjectTeamMemberForm): AxiosPromise<string | number> => {
|
||||
return request({
|
||||
url: '/project/projectTeamMember',
|
||||
method: 'post',
|
||||
|
@ -93,3 +93,7 @@ export interface ProjectTeamMemberQuery extends PageRequest {
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
|
||||
export interface PageProjectTeamMember extends PageResponse {
|
||||
records?: ProjectTeamMemberVO[];
|
||||
}
|
||||
|
Reference in New Issue
Block a user