测试优化
This commit is contained in:
@ -61,3 +61,16 @@ export const delMaterialReceive = (id: string | number | Array<string | number>)
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
/**
|
||||
* 获取合同列表数据
|
||||
* @param id
|
||||
*/
|
||||
export const getContractNameList = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/materials/materialReceive/ctrList',
|
||||
params: {
|
||||
projectId: id
|
||||
},
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
63
src/api/message/notice/index.ts
Normal file
63
src/api/message/notice/index.ts
Normal file
@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { NoticeVO, NoticeForm, NoticeQuery } from '@/api/message/notice/types';
|
||||
|
||||
/**
|
||||
* 查询消息列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listNotice = (query?: NoticeQuery): AxiosPromise<NoticeVO[]> => {
|
||||
return request({
|
||||
url: '/message/notice/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询消息详细
|
||||
* @param id
|
||||
*/
|
||||
export const getNotice = (id: string | number): AxiosPromise<NoticeVO> => {
|
||||
return request({
|
||||
url: '/message/notice/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增消息
|
||||
* @param data
|
||||
*/
|
||||
export const addNotice = (data: NoticeForm) => {
|
||||
return request({
|
||||
url: '/message/notice',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改消息
|
||||
* @param data
|
||||
*/
|
||||
export const updateNotice = (data: NoticeForm) => {
|
||||
return request({
|
||||
url: '/message/notice',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除消息
|
||||
* @param id
|
||||
*/
|
||||
export const delNotice = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/message/notice/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
156
src/api/message/notice/types.ts
Normal file
156
src/api/message/notice/types.ts
Normal file
@ -0,0 +1,156 @@
|
||||
export interface NoticeVO {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
projectId: string | number;
|
||||
|
||||
/**
|
||||
* 接收通知的用户ID
|
||||
*/
|
||||
recipientId: string | number;
|
||||
|
||||
/**
|
||||
* 发送通知的用户ID(系统通知 0)
|
||||
*/
|
||||
senderId: string | number;
|
||||
|
||||
/**
|
||||
* 配置id
|
||||
*/
|
||||
configId: string | number;
|
||||
|
||||
/**
|
||||
* 详情id
|
||||
*/
|
||||
detailId: string | number;
|
||||
|
||||
/**
|
||||
* 通知内容
|
||||
*/
|
||||
content: string;
|
||||
|
||||
/**
|
||||
* 查看状态(0未读 1已读)
|
||||
*/
|
||||
viewStatus: string;
|
||||
|
||||
/**
|
||||
* 查看时间
|
||||
*/
|
||||
viewTime: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark: string;
|
||||
|
||||
}
|
||||
|
||||
export interface NoticeForm extends BaseEntity {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 接收通知的用户ID
|
||||
*/
|
||||
recipientId?: string | number;
|
||||
|
||||
/**
|
||||
* 发送通知的用户ID(系统通知 0)
|
||||
*/
|
||||
senderId?: string | number;
|
||||
|
||||
/**
|
||||
* 配置id
|
||||
*/
|
||||
configId?: string | number;
|
||||
|
||||
/**
|
||||
* 详情id
|
||||
*/
|
||||
detailId?: string | number;
|
||||
|
||||
/**
|
||||
* 通知内容
|
||||
*/
|
||||
content?: string;
|
||||
|
||||
/**
|
||||
* 查看状态(0未读 1已读)
|
||||
*/
|
||||
viewStatus?: string;
|
||||
|
||||
/**
|
||||
* 查看时间
|
||||
*/
|
||||
viewTime?: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
|
||||
}
|
||||
|
||||
export interface NoticeQuery extends PageQuery {
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 接收通知的用户ID
|
||||
*/
|
||||
recipientId?: string | number;
|
||||
|
||||
/**
|
||||
* 发送通知的用户ID(系统通知 0)
|
||||
*/
|
||||
senderId?: string | number;
|
||||
|
||||
/**
|
||||
* 配置id
|
||||
*/
|
||||
configId?: string | number;
|
||||
|
||||
/**
|
||||
* 详情id
|
||||
*/
|
||||
detailId?: string | number;
|
||||
|
||||
/**
|
||||
* 通知内容
|
||||
*/
|
||||
content?: string;
|
||||
|
||||
/**
|
||||
* 查看状态(0未读 1已读)
|
||||
*/
|
||||
viewStatus?: string;
|
||||
|
||||
/**
|
||||
* 查看时间
|
||||
*/
|
||||
viewTime?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
|
||||
|
||||
|
@ -69,3 +69,13 @@ export const delLandTransferLedger = (id: string | number | Array<string | numbe
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
/**
|
||||
* 获取详情
|
||||
* @param id
|
||||
*/
|
||||
export const landTransferLedgerCount = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/land/landTransferLedger/count/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
Reference in New Issue
Block a user