联系单模板
This commit is contained in:
63
src/api/cory/contactformtemplate/index.ts
Normal file
63
src/api/cory/contactformtemplate/index.ts
Normal file
@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { ContactformtemplateVO, ContactformtemplateForm, ContactformtemplateQuery } from '@/api/cory/contactformtemplate/types';
|
||||
|
||||
/**
|
||||
* 查询联系单模板列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listContactformtemplate = (query?: ContactformtemplateQuery): AxiosPromise<ContactformtemplateVO[]> => {
|
||||
return request({
|
||||
url: '/cory/contactformtemplate/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询联系单模板详细
|
||||
* @param id
|
||||
*/
|
||||
export const getContactformtemplate = (id: string | number): AxiosPromise<ContactformtemplateVO> => {
|
||||
return request({
|
||||
url: '/cory/contactformtemplate/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增联系单模板
|
||||
* @param data
|
||||
*/
|
||||
export const addContactformtemplate = (data: ContactformtemplateForm) => {
|
||||
return request({
|
||||
url: '/cory/contactformtemplate',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改联系单模板
|
||||
* @param data
|
||||
*/
|
||||
export const updateContactformtemplate = (data: ContactformtemplateForm) => {
|
||||
return request({
|
||||
url: '/cory/contactformtemplate',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除联系单模板
|
||||
* @param id
|
||||
*/
|
||||
export const delContactformtemplate = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/cory/contactformtemplate/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
79
src/api/cory/contactformtemplate/types.ts
Normal file
79
src/api/cory/contactformtemplate/types.ts
Normal file
@ -0,0 +1,79 @@
|
||||
export interface ContactformtemplateVO {
|
||||
/**
|
||||
* 自增ID
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 模板名称
|
||||
*/
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* 模板路径
|
||||
*/
|
||||
path: string;
|
||||
|
||||
/**
|
||||
* 缩略图
|
||||
*/
|
||||
thumbnail: string;
|
||||
|
||||
/**
|
||||
* 缩略图Url
|
||||
*/
|
||||
thumbnailUrl: string;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark: string;
|
||||
}
|
||||
|
||||
export interface ContactformtemplateForm extends BaseEntity {
|
||||
/**
|
||||
* 自增ID
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 模板名称
|
||||
*/
|
||||
name?: string;
|
||||
|
||||
/**
|
||||
* 模板路径
|
||||
*/
|
||||
file?: string;
|
||||
|
||||
/**
|
||||
* 缩略图
|
||||
*/
|
||||
thumbnail?: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
}
|
||||
|
||||
export interface ContactformtemplateQuery extends PageQuery {
|
||||
/**
|
||||
* 模板名称
|
||||
*/
|
||||
name?: string;
|
||||
|
||||
/**
|
||||
* 模板路径
|
||||
*/
|
||||
path?: string;
|
||||
|
||||
/**
|
||||
* 缩略图
|
||||
*/
|
||||
thumbnail?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
Reference in New Issue
Block a user