2023-01-18 16:23:39 +08:00
|
|
|
import { http, jumpExport } from '@/utils/http/axios';
|
|
|
|
|
|
|
|
// 获取@{.tableComment}列表
|
|
|
|
export function List(params) {
|
|
|
|
return http.request({
|
2023-02-23 17:53:04 +08:00
|
|
|
url: '/@{.apiPrefix}/list',
|
2023-01-18 16:23:39 +08:00
|
|
|
method: 'get',
|
|
|
|
params,
|
|
|
|
});
|
|
|
|
}
|
|
|
|
@{ if eq .options.Step.HasDel true }
|
|
|
|
// 删除/批量删除@{.tableComment}
|
|
|
|
export function Delete(params) {
|
|
|
|
return http.request({
|
2023-02-23 17:53:04 +08:00
|
|
|
url: '/@{.apiPrefix}/delete',
|
2023-01-18 16:23:39 +08:00
|
|
|
method: 'POST',
|
|
|
|
params,
|
|
|
|
});
|
|
|
|
}
|
|
|
|
@{end}
|
|
|
|
@{ if eq .options.Step.HasEdit true }
|
2023-01-25 11:49:21 +08:00
|
|
|
// 添加/编辑@{.tableComment}
|
2023-01-18 16:23:39 +08:00
|
|
|
export function Edit(params) {
|
|
|
|
return http.request({
|
2023-02-23 17:53:04 +08:00
|
|
|
url: '/@{.apiPrefix}/edit',
|
2023-01-18 16:23:39 +08:00
|
|
|
method: 'POST',
|
|
|
|
params,
|
|
|
|
});
|
|
|
|
}
|
|
|
|
@{end}
|
|
|
|
@{ if eq .options.Step.HasStatus true }
|
|
|
|
// 修改@{.tableComment}状态
|
|
|
|
export function Status(params) {
|
|
|
|
return http.request({
|
2023-02-23 17:53:04 +08:00
|
|
|
url: '/@{.apiPrefix}/status',
|
2023-01-18 16:23:39 +08:00
|
|
|
method: 'POST',
|
|
|
|
params,
|
|
|
|
});
|
|
|
|
}
|
|
|
|
@{end}
|
|
|
|
@{ if eq .options.Step.HasSwitch true }
|
|
|
|
// 操作@{.tableComment}开关
|
|
|
|
export function Switch(params) {
|
|
|
|
return http.request({
|
2023-02-23 17:53:04 +08:00
|
|
|
url: '/@{.apiPrefix}/switch',
|
2023-01-18 16:23:39 +08:00
|
|
|
method: 'POST',
|
|
|
|
params,
|
|
|
|
});
|
|
|
|
}
|
|
|
|
@{end}
|
2023-05-07 22:57:34 +08:00
|
|
|
@{ if or (eq .options.Step.HasView true) (eq .options.Step.HasEdit true) }
|
2023-01-18 16:23:39 +08:00
|
|
|
// 获取@{.tableComment}指定详情
|
|
|
|
export function View(params) {
|
|
|
|
return http.request({
|
2023-02-23 17:53:04 +08:00
|
|
|
url: '/@{.apiPrefix}/view',
|
2023-01-18 16:23:39 +08:00
|
|
|
method: 'GET',
|
|
|
|
params,
|
|
|
|
});
|
|
|
|
}
|
|
|
|
@{end}
|
|
|
|
@{ if eq .options.Step.HasMaxSort true }
|
|
|
|
// 获取@{.tableComment}最大排序
|
|
|
|
export function MaxSort() {
|
|
|
|
return http.request({
|
2023-02-23 17:53:04 +08:00
|
|
|
url: '/@{.apiPrefix}/maxSort',
|
2023-01-18 16:23:39 +08:00
|
|
|
method: 'GET',
|
|
|
|
});
|
|
|
|
}
|
|
|
|
@{end}
|
|
|
|
@{ if eq .options.Step.HasExport true }
|
|
|
|
// 导出@{.tableComment}
|
|
|
|
export function Export(params) {
|
2023-02-23 17:53:04 +08:00
|
|
|
jumpExport('/@{.apiPrefix}/export', params);
|
2023-01-18 16:23:39 +08:00
|
|
|
}
|
|
|
|
@{end}
|