Commit 8170d1563f3d71b57469ec09151f534170b95061

Authored by YunaiV
1 parent 8193e980

reactor:【infra 基础设施】调整 vben 字典重构结果

yudao-module-infra/src/main/resources/codegen/vue3_vben5_antd/schema/views/data.ts.vm
... ... @@ -3,12 +3,15 @@ import type { VbenFormSchema } from '#/adapter/form';
3 3 import type { VxeTableGridOptions } from '#/adapter/vxe-table';
4 4 import type { ${apiName} } from '#/api/${table.moduleName}/${table.businessName}';
5 5  
6   -import { DICT_TYPE, getDictOptions, getRangePickerDefaultProps } from '#/utils';
  6 +import { DICT_TYPE } from '@vben/constants';
  7 +import { getDictOptions } from '@vben/hooks';
7 8 #if(${table.templateType} == 2)## 树表需要导入这些
8 9 import { get${simpleClassName}List } from '#/api/${table.moduleName}/${table.businessName}';
9 10 import { handleTree } from '@vben/utils';
10 11 #end
11 12  
  13 +import { getRangePickerDefaultProps } from '#/utils';
  14 +
12 15 /** 新增/修改的表单 */
13 16 export function useFormSchema(): VbenFormSchema[] {
14 17 return [
... ...
yudao-module-infra/src/main/resources/codegen/vue3_vben5_antd/schema/views/form.vue.vm
... ... @@ -11,8 +11,6 @@ import { message#if ($table.templateType == 11), Tabs#end } from 'ant-design-vue
11 11 import { useVbenForm } from '#/adapter/form';
12 12 import { create${simpleClassName}, get${simpleClassName}, update${simpleClassName} } from '#/api/${table.moduleName}/${table.businessName}';
13 13 import { $t } from '#/locales';
14   -
15   -import { useFormSchema } from '../data';
16 14 ## 特殊:主子表专属逻辑
17 15 #if ( $table.templateType == 10 || $table.templateType == 12 )
18 16 #foreach ($subSimpleClassName in $subSimpleClassNames)
... ... @@ -22,6 +20,8 @@ import { useFormSchema } from '../data';
22 20 #end
23 21 #end
24 22  
  23 +import { useFormSchema } from '../data';
  24 +
25 25 const emit = defineEmits(['success']);
26 26 const formData = ref<${apiName}.${simpleClassName}>();
27 27 const getTitle = computed(() => {
... ...
yudao-module-infra/src/main/resources/codegen/vue3_vben5_antd/schema/views/index.vue.vm
... ... @@ -206,7 +206,6 @@ const [Grid, gridApi] = useVbenVxeGrid({
206 206 <template>
207 207 <Page auto-content-height>
208 208 <FormModal @success="onRefresh" />
209   -
210 209 #if ($table.templateType == 11) ## erp情况
211 210 <div>
212 211 #end
... ...
yudao-module-infra/src/main/resources/codegen/vue3_vben5_ele/schema/views/data.ts.vm
... ... @@ -3,12 +3,15 @@ import type { VbenFormSchema } from &#39;#/adapter/form&#39;;
3 3 import type { VxeTableGridOptions } from '#/adapter/vxe-table';
4 4 import type { ${apiName} } from '#/api/${table.moduleName}/${table.businessName}';
5 5  
6   -import { DICT_TYPE, getDictOptions, getRangePickerDefaultProps } from '#/utils';
  6 +import { DICT_TYPE } from '@vben/constants';
  7 +import { getDictOptions } from '@vben/hooks';
7 8 #if(${table.templateType} == 2)## 树表需要导入这些
8 9 import { get${simpleClassName}List } from '#/api/${table.moduleName}/${table.businessName}';
9 10 import { handleTree } from '@vben/utils';
10 11 #end
11 12  
  13 +import { getRangePickerDefaultProps } from '#/utils';
  14 +
12 15 /** 新增/修改的表单 */
13 16 export function useFormSchema(): VbenFormSchema[] {
14 17 return [
... ...
yudao-module-infra/src/main/resources/codegen/vue3_vben5_ele/schema/views/index.vue.vm
... ... @@ -213,17 +213,17 @@ const [Grid, gridApi] = useVbenVxeGrid({
213 213 #if ($table.templateType == 12) ## 内嵌情况
214 214 <template #expand_content="{ row }">
215 215 <!-- 子表的表单 -->
216   - <el-tabs v-model="subTabsName" class="mx-8">
  216 + <ElTabs v-model="subTabsName" class="mx-8">
217 217 #foreach ($subTable in $subTables)
218 218 #set ($index = $foreach.count - 1)
219 219 #set ($subClassNameVar = $subClassNameVars.get($index))
220 220 #set ($subSimpleClassName = $subSimpleClassNames.get($index))
221 221 #set ($subJoinColumn_strikeCase = $subJoinColumn_strikeCases.get($index))
222   - <el-tab-pane name="$subClassNameVar" label="${subTable.classComment}">
  222 + <ElTabPane name="$subClassNameVar" label="${subTable.classComment}">
223 223 <${subSimpleClassName}List :${subJoinColumn_strikeCase}="row?.id" />
224   - </el-tab-pane>
  224 + </ElTabPane>
225 225 #end
226   - </el-tabs>
  226 + </ElTabs>
227 227 </template>
228 228 #end
229 229 <template #toolbar-tools>
... ...