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