mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
feat: 新增代码生成页面
This commit is contained in:
@ -2,8 +2,16 @@ import { request } from '@/service/request';
|
||||
|
||||
/** 根据字典类型查询字典数据信息 */
|
||||
export function fetchGetDictDataByType(dictType: string) {
|
||||
return request<Array<Api.System.DictData>>({
|
||||
return request<Api.System.DictData[]>({
|
||||
url: `/system/dict/data/type/${dictType}`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
/** 获取字典选择框列表 */
|
||||
export function fetchGetDictTypeOption() {
|
||||
return request<Api.System.DictType[]>({
|
||||
url: '/system/dict/type/optionselect',
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
@ -15,16 +15,16 @@ export function fetchGetGenTableList(params?: Api.Tool.GenTableSearchParams) {
|
||||
* @param tables 表名称
|
||||
* @param dataName 数据源名称
|
||||
*/
|
||||
export function fetchImportGenTable(tables: Array<string>, dataName: string) {
|
||||
export function fetchImportGenTable(tables: string[], dataName: string) {
|
||||
return request<boolean>({
|
||||
url: '/tool/gen/importTable',
|
||||
method: 'post',
|
||||
data: { tables, dataName }
|
||||
params: { tables: tables.join(','), dataName }
|
||||
});
|
||||
}
|
||||
|
||||
/** 修改代码生成 */
|
||||
export function fetchUpdateGenTable(data: Api.System.MenuOperateParams) {
|
||||
export function fetchUpdateGenTable(data: Api.Tool.GenTable) {
|
||||
return request<boolean>({
|
||||
url: '/tool/gen',
|
||||
method: 'put',
|
||||
@ -32,11 +32,36 @@ export function fetchUpdateGenTable(data: Api.System.MenuOperateParams) {
|
||||
});
|
||||
}
|
||||
|
||||
/** 获取代码生成信息 */
|
||||
export function fetchGetGenTableInfo(tableId: CommonType.IdType) {
|
||||
return request<Api.Tool.GenTableInfo>({
|
||||
url: `/tool/gen/${tableId}`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
/** 批量删除代码生成 */
|
||||
export function fetchBatchDeleteGenTable(tableIds: Array<CommonType.IdType>) {
|
||||
export function fetchBatchDeleteGenTable(tableIds: CommonType.IdType[]) {
|
||||
const ids = tableIds.join(',');
|
||||
return request<boolean>({
|
||||
url: `/system/menu/${ids}`,
|
||||
url: `/tool/gen/${ids}`,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询数据源名称列表 */
|
||||
export function fetchGetGenDataNames() {
|
||||
return request<string[]>({
|
||||
url: '/tool/gen/getDataNames',
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询数据库列表 */
|
||||
export function fetchGetGenDbList(params?: Api.Tool.GenTableDbSearchParams) {
|
||||
return request<Api.Tool.GenTableDbList>({
|
||||
url: '/tool/gen/db/list',
|
||||
method: 'get',
|
||||
params
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user