通用的评论组件
流程图中可查看当前流程审批人 首页使用配置项中的后端地址 列表字段默认左对齐
This commit is contained in:
110
src/api/system/comment/index.ts
Normal file
110
src/api/system/comment/index.ts
Normal file
@ -0,0 +1,110 @@
|
||||
import { XjrCommentPageModel, XjrCommentPageParams, XjrCommentPageResult } from './model/CommentModel';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { ErrorMessageMode } from '/#/axios';
|
||||
|
||||
enum Api {
|
||||
Page = '/system/comment/page',
|
||||
List = '/system/comment/list',
|
||||
Info = '/system/comment/info',
|
||||
XjrComment = '/system/comment',
|
||||
|
||||
|
||||
Export = '/system/comment/export',
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询XjrComment分页列表
|
||||
*/
|
||||
export async function getXjrCommentPage(params: XjrCommentPageParams, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get<XjrCommentPageResult>(
|
||||
{
|
||||
url: Api.Page,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 获取XjrComment信息
|
||||
*/
|
||||
export async function getXjrComment(id: String, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get<XjrCommentPageModel>(
|
||||
{
|
||||
url: Api.Info,
|
||||
params: { id },
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 新增XjrComment
|
||||
*/
|
||||
export async function addXjrComment(xjrComment: Recordable, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.post<boolean>(
|
||||
{
|
||||
url: Api.XjrComment,
|
||||
params: xjrComment,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 更新XjrComment
|
||||
*/
|
||||
export async function updateXjrComment(xjrComment: Recordable, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.put<boolean>(
|
||||
{
|
||||
url: Api.XjrComment,
|
||||
params: xjrComment,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 删除XjrComment(批量删除)
|
||||
*/
|
||||
export async function deleteXjrComment(ids: string[], mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.delete<boolean>(
|
||||
{
|
||||
url: Api.XjrComment,
|
||||
data: ids,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @description: 导出XjrComment
|
||||
*/
|
||||
export async function exportXjrComment(
|
||||
params?: object,
|
||||
mode: ErrorMessageMode = 'modal'
|
||||
) {
|
||||
return defHttp.download(
|
||||
{
|
||||
url: Api.Export,
|
||||
method: 'GET',
|
||||
params,
|
||||
responseType: 'blob',
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
84
src/api/system/comment/model/CommentModel.ts
Normal file
84
src/api/system/comment/model/CommentModel.ts
Normal file
@ -0,0 +1,84 @@
|
||||
import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
|
||||
|
||||
/**
|
||||
* @description: XjrComment分页参数 模型
|
||||
*/
|
||||
export interface XjrCommentPageParams extends BasicPageParams {
|
||||
businessCode: string;
|
||||
|
||||
businessId: string;
|
||||
|
||||
content: string;
|
||||
|
||||
createUserId: string;
|
||||
|
||||
createDateStart: string;
|
||||
createDateEnd: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: XjrComment分页返回值模型
|
||||
*/
|
||||
export interface XjrCommentPageModel {
|
||||
id: string;
|
||||
|
||||
businessCode: string;
|
||||
|
||||
businessId: string;
|
||||
|
||||
content: string;
|
||||
|
||||
createUserId: string;
|
||||
|
||||
createDate: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: XjrComment表类型
|
||||
*/
|
||||
export interface XjrCommentModel {
|
||||
id: number;
|
||||
|
||||
businessCode: string;
|
||||
|
||||
businessId: number;
|
||||
|
||||
content: string;
|
||||
|
||||
attachs: number;
|
||||
|
||||
status: number;
|
||||
|
||||
createUserId: number;
|
||||
|
||||
createUserName: string;
|
||||
|
||||
createUserAvatar: string;
|
||||
|
||||
createDate: string;
|
||||
|
||||
modifyUserId: number;
|
||||
|
||||
modifyUserName: string;
|
||||
|
||||
modifyUserAvatar: string;
|
||||
|
||||
modifyDate: string;
|
||||
|
||||
deleteMark: number;
|
||||
|
||||
enabledMark: number;
|
||||
|
||||
deptId: number;
|
||||
|
||||
tenantId: number;
|
||||
|
||||
ruleUserId: number;
|
||||
|
||||
range: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: XjrComment分页返回值结构
|
||||
*/
|
||||
export type XjrCommentPageResult = BasicFetchResult<XjrCommentPageModel>;
|
||||
Reference in New Issue
Block a user