mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
feat: 新增api代码生成模板
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
import { ref, useAttrs } from 'vue';
|
||||
import { useLoading } from '@sa/hooks';
|
||||
import type { SelectOption, SelectProps } from 'naive-ui';
|
||||
import { fetchGetDictTypeOption } from '@/service/api';
|
||||
import { fetchGetDictTypeOption } from '@/service/api/system';
|
||||
|
||||
defineOptions({ name: 'DictSelect' });
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
import { ref, useAttrs } from 'vue';
|
||||
import { useLoading } from '@sa/hooks';
|
||||
import type { TreeOption, TreeSelectProps } from 'naive-ui';
|
||||
import { fetchGetMenuList } from '@/service/api';
|
||||
import { fetchGetMenuList } from '@/service/api/system';
|
||||
import SvgIcon from '@/components/custom/svg-icon.vue';
|
||||
import { handleMenuTree } from '@/utils/ruoyi';
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { ref } from 'vue';
|
||||
import { fetchGetDictDataByType } from '@/service/api';
|
||||
import { fetchGetDictDataByType } from '@/service/api/system';
|
||||
import { useDictStore } from '@/store/modules/dict';
|
||||
|
||||
export function useDict(dictType: string, immediate: boolean = true) {
|
||||
|
@ -1,4 +1,2 @@
|
||||
export * from './auth';
|
||||
export * from './route';
|
||||
export * from './system';
|
||||
export * from './tool';
|
||||
|
@ -3,7 +3,7 @@ import { ref } from 'vue';
|
||||
import { useBoolean, useLoading } from '@sa/hooks';
|
||||
import type { DataTableColumns, TreeInst, TreeOption } from 'naive-ui';
|
||||
import { NButton, NIcon, NInput, NPopconfirm, NTooltip } from 'naive-ui';
|
||||
import { fetchDeleteMenu, fetchGetMenuList } from '@/service/api';
|
||||
import { fetchDeleteMenu, fetchGetMenuList } from '@/service/api/system';
|
||||
import SvgIcon from '@/components/custom/svg-icon.vue';
|
||||
import { useAppStore } from '@/store/modules/app';
|
||||
import { menuIsFrameRecord, menuTypeRecord } from '@/constants/business';
|
||||
|
@ -4,7 +4,7 @@ import type { SelectOption } from 'naive-ui';
|
||||
import { NTooltip } from 'naive-ui';
|
||||
import { useFormRules, useNaiveForm } from '@/hooks/common/form';
|
||||
import { $t } from '@/locales';
|
||||
import { fetchCreateMenu, fetchUpdateMenu } from '@/service/api';
|
||||
import { fetchCreateMenu, fetchUpdateMenu } from '@/service/api/system';
|
||||
import { menuIconTypeOptions, menuIsFrameOptions, menuTypeOptions } from '@/constants/business';
|
||||
import SvgIcon from '@/components/custom/svg-icon.vue';
|
||||
import { getLocalMenuIcons } from '@/utils/icon';
|
||||
|
@ -9,7 +9,7 @@ import {
|
||||
fetchGetGenDataNames,
|
||||
fetchGetGenTableList,
|
||||
fetchSynchGenDbList
|
||||
} from '@/service/api';
|
||||
} from '@/service/api/tool';
|
||||
import { $t } from '@/locales';
|
||||
import { useAppStore } from '@/store/modules/app';
|
||||
import { useTable, useTableOperate } from '@/hooks/common/table';
|
||||
|
@ -1,6 +1,6 @@
|
||||
<script setup lang="tsx">
|
||||
import { watch } from 'vue';
|
||||
import { fetchGetGenDbList, fetchImportGenTable } from '@/service/api';
|
||||
import { fetchGetGenDbList, fetchImportGenTable } from '@/service/api/tool';
|
||||
import { $t } from '@/locales';
|
||||
import { useAppStore } from '@/store/modules/app';
|
||||
import { useTable, useTableOperate } from '@/hooks/common/table';
|
||||
|
@ -4,7 +4,8 @@ import type { FormInst, SelectOption } from 'naive-ui';
|
||||
import { NCheckbox, NInput, NSelect, NTabs } from 'naive-ui';
|
||||
import { useLoading } from '@sa/hooks';
|
||||
import { jsonClone } from '@sa/utils';
|
||||
import { fetchGetDictTypeOption, fetchGetGenTableInfo, fetchUpdateGenTable } from '@/service/api';
|
||||
import { fetchGetDictTypeOption } from '@/service/api/system';
|
||||
import { fetchGetGenTableInfo, fetchUpdateGenTable } from '@/service/api/tool';
|
||||
import { $t } from '@/locales';
|
||||
import { useAppStore } from '@/store/modules/app';
|
||||
import {
|
||||
@ -155,8 +156,8 @@ const columns: NaiveUI.TableColumn<Api.Tool.GenTableColumn>[] = [
|
||||
{
|
||||
key: 'sort',
|
||||
title: $t('common.index'),
|
||||
align: 'left',
|
||||
width: 64
|
||||
align: 'center',
|
||||
width: 80
|
||||
},
|
||||
{
|
||||
key: 'columnName',
|
||||
@ -314,7 +315,7 @@ const columns: NaiveUI.TableColumn<Api.Tool.GenTableColumn>[] = [
|
||||
:data="genTableInfo?.rows"
|
||||
size="small"
|
||||
:flex-height="!appStore.isMobile"
|
||||
:scroll-x="750"
|
||||
:scroll-x="1800"
|
||||
remote
|
||||
class="flex-1"
|
||||
/>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { useLoading } from '@sa/hooks';
|
||||
import { ref, watch } from 'vue';
|
||||
import { fetchGetGenPreview } from '@/service/api';
|
||||
import { fetchGetGenPreview } from '@/service/api/tool';
|
||||
import MonacoEditor from '@/components/common/monaco-editor.vue';
|
||||
|
||||
defineOptions({
|
||||
@ -68,7 +68,7 @@ const genMap: Api.Tool.GenTablePreview = {
|
||||
'vm/java/controller.java.vm': 'controller.java',
|
||||
'vm/xml/mapper.xml.vm': 'mapper.xml',
|
||||
'vm/sql/sql.vm': 'sql',
|
||||
'vm/soybean/soy.api.ts.vm': 'api.ts',
|
||||
'vm/soybean/api/soy.api.ts.vm': 'api.ts',
|
||||
'vm/soybean/typings/soy.api.d.ts.vm': 'type.d.ts',
|
||||
'vm/soybean/soy.index.vue.vm': 'index.vue'
|
||||
};
|
||||
|
Reference in New Issue
Block a user