diff --git a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/common/form/native/vue3NativeForm.ftl b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/common/form/native/vue3NativeForm.ftl index 77e2fb6e0e..79de5503be 100644 --- a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/common/form/native/vue3NativeForm.ftl +++ b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/common/form/native/vue3NativeForm.ftl @@ -11,12 +11,12 @@ <#if po.classType =='date'> - disabled/> + picker="${po.extendParams.picker}" v-model:value="formData.${po.fieldName}" value-format="YYYY-MM-DD" style="width: 100%" <#if po.readonly=='Y'>disabled allow-clear /> <#elseif po.classType =='datetime'> - disabled/> + disabled allow-clear /> <#elseif po.classType =='time'> <#assign need_time = true> - disabled/> + disabled allow-clear /> <#elseif po.classType =='popup'> <#assign need_popup = true> <#assign sourceFields = po.dictField?default("")?trim?split(",")/> @@ -32,47 +32,46 @@ ]" :multi="${po.extendParams.popupMulti?c}" :setFieldsValue="setFieldsValue" - <#if po.readonly=='Y'>disabled<#rt> - /> + <#if po.readonly=='Y'>disabled<#rt> allow-clear /> <#elseif po.classType =='sel_depart'> <#assign need_dept = true> - disabled /> + disabled allow-clear /> <#elseif po.classType =='switch'> <#assign need_switch = true> :options="${po.dictField}" <#if po.readonly=='Y'>disabled> <#elseif po.classType =='pca'> <#assign need_pca = true> - disabled /> + disabled allow-clear /> <#elseif po.classType =='markdown'> <#assign need_markdown = true> disabled> <#elseif po.classType =='password'> - disabled/> + disabled allow-clear /> <#elseif po.classType =='sel_user'> <#assign need_dept_user = true> <#-- update-begin---author:chenrui ---date:20240102 for:[issue/#5711]修复用户选择组件在生成代码后变成部门用户选择组件---------- --> - disabled/> + disabled allow-clear /> <#-- update-end---author:chenrui ---date:20240102 for:[issue/#5711]修复用户选择组件在生成代码后变成部门用户选择组件---------- --> <#elseif po.classType =='textarea'> disabled/> <#elseif po.classType=='radio'> <#assign need_select_tag = true> - disabled/> + disabled allow-clear /> <#elseif po.classType=='list'> <#assign need_select_tag = true> - disabled/> + disabled allow-clear /> <#elseif po.classType=='list_multi'> <#assign need_multi = true> disabled :triggerChange="false"/> <#elseif po.classType=='checkbox'> <#assign need_checkbox = true> - disabled/> + disabled allow-clear /> <#elseif po.classType=='sel_search'> <#assign need_search = true> - disabled /> + disabled allow-clear /> <#elseif po.classType=='cat_tree'> <#assign need_category = true> - back="${dashedToCamel(po.dictText)}" <#if po.readonly=='Y'>disabled @change="(value) => handleFormChange('${po.fieldName}', value)" /> + back="${dashedToCamel(po.dictText)}" <#if po.readonly=='Y'>disabled @change="(value) => handleFormChange('${po.fieldName}', value)" allow-clear /> <#elseif po.fieldDbType=='int' || po.fieldDbType=='double' || po.fieldDbType=='BigDecimal'> disabled/> <#elseif po.classType=='file'> @@ -80,12 +79,12 @@ disabled <#if po.uploadnum??>:maxCount=${po.uploadnum}> <#elseif po.classType=='image'> <#assign need_image_upload = true> - :fileMax=${po.uploadnum} v-model:value="formData.${po.fieldName}" <#if po.readonly=='Y'>disabled> + :fileMax=${po.uploadnum}<#else>:fileMax="0" v-model:value="formData.${po.fieldName}" <#if po.readonly=='Y'>disabled> <#elseif po.classType=='umeditor'> <#assign need_editor = true> disabled/> <#elseif po.fieldDbType=='Blob'> - disabled> + disabled allow-clear > <#elseif po.classType == 'sel_tree'> <#assign need_select_tree = true> disabled v-model:value="formData.${po.fieldName}" - @change="(value) => handleFormChange('${po.fieldName}', value)"> + @change="(value) => handleFormChange('${po.fieldName}', value)" allow-clear > <#else> - disabled> + disabled allow-clear > diff --git a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/common/form/native/vue3NativeSearch.ftl b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/common/form/native/vue3NativeSearch.ftl index a48f1282e0..c85ef1a64d 100644 --- a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/common/form/native/vue3NativeSearch.ftl +++ b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/common/form/native/vue3NativeSearch.ftl @@ -19,29 +19,29 @@ <#if query_field_no gt 1> <#if query_field_no gt 1> <#if po.classType=='sel_search'> - <#if query_field_no gt 1> + <#if query_field_no gt 1> <#elseif po.classType=='sel_user'> <#-- update-begin---author:chenrui ---date:20240102 for:[issue/#5711]修复用户选择组件在生成代码后变成部门用户选择组件---------- --> - <#if query_field_no gt 1> + <#if query_field_no gt 1> <#-- update-end---author:chenrui ---date:20240102 for:[issue/#5711]修复用户选择组件在生成代码后变成部门用户选择组件---------- --> <#elseif po.classType=='switch'> <#if query_field_no gt 1> :options="${po.dictField}" query /> <#elseif po.classType=='sel_depart'> - <#if query_field_no gt 1> + <#if query_field_no gt 1> <#elseif po.classType=='list_multi'> - <#if query_field_no gt 1> + <#if query_field_no gt 1> <#elseif po.classType=='cat_tree'> - <#if query_field_no gt 1> + <#if query_field_no gt 1> <#elseif po.classType=='date'> - <#if query_field_no gt 1> + <#if query_field_no gt 1> picker="${po.extendParams.picker}" v-model:value="queryParam.${po.fieldName}" allow-clear /> <#elseif po.classType=='datetime'> - <#if query_field_no gt 1> + <#if query_field_no gt 1> <#elseif po.classType=='time'> - <#if query_field_no gt 1> + <#if query_field_no gt 1> <#elseif po.classType=='pca'> - <#if query_field_no gt 1> + <#if query_field_no gt 1> <#elseif po.classType=='sel_tree'> - <#if query_field_no gt 1> <#if po.dictText?split(',')[2]?? && po.dictText?split(',')[0]??>dict="${po.dictTable},${po.dictText?split(',')[2]},${po.dictText?split(',')[0]}" <#elseif po.dictText?split(',')[1]??>pidField:"${po.dictText?split(',')[1]}", <#elseif po.dictText?split(',')[3]??>hasChildField:"${po.dictText?split(',')[3]}" pidValue="${po.dictField}" /> + <#if query_field_no gt 1> <#if po.dictText?split(',')[2]?? && po.dictText?split(',')[0]??>dict="${po.dictTable},${po.dictText?split(',')[2]},${po.dictText?split(',')[0]}" <#elseif po.dictText?split(',')[1]??>pidField:"${po.dictText?split(',')[1]}", <#elseif po.dictText?split(',')[3]??>hasChildField:"${po.dictText?split(',')[3]}" pidValue="${po.dictField}" allow-clear /> <#elseif po.classType=='popup'> <#assign sourceFields = po.dictField?default("")?trim?split(",")/> <#assign targetFields = po.dictText?default("")?trim?split(",")/> @@ -55,18 +55,20 @@ <#if query_field_no gt 1> ]" <#if query_field_no gt 1> :multi="${po.extendParams.popupMulti?c}" - <#if query_field_no gt 1> :setFieldsValue="setFieldsValue" /> + <#if query_field_no gt 1> :setFieldsValue="setFieldsValue" allow-clear /> <#elseif po.classType=='list' || po.classType=='radio' || po.classType=='checkbox'> <#-- ---------------------------下拉或是单选 判断数据字典是表字典还是普通字典------------------------------- --> <#if po.dictTable?default("")?trim?length gt 1> - <#if query_field_no gt 1> + <#if query_field_no gt 1> <#elseif po.dictField?default("")?trim?length gt 1> - <#if query_field_no gt 1> + <#if query_field_no gt 1> <#else> - <#if query_field_no gt 1> - + <#if query_field_no gt 1> + + <#elseif po.fieldDbType=='int' || po.fieldDbType=='double' || po.fieldDbType=='BigDecimal'> + <#if query_field_no gt 1> <#else> - <#if query_field_no gt 1> + <#if query_field_no gt 1> <#if query_field_no gt 1> <#if query_field_no gt 1> @@ -77,41 +79,41 @@ <#if po.classType=='date'> <#if query_field_no gt 1>
<#if query_field_no gt 1> - <#if query_field_no gt 1> + <#if query_field_no gt 1> picker="${po.extendParams.picker}" v-model:value="queryParam.${po.fieldName}_begin" class="query-group-cust" allow-clear /> <#if query_field_no gt 1> <#if query_field_no gt 1> ~ <#if query_field_no gt 1> - <#if query_field_no gt 1> + <#if query_field_no gt 1> picker="${po.extendParams.picker}" v-model:value="queryParam.${po.fieldName}_end" class="query-group-cust" allow-clear /> <#if query_field_no gt 1> <#if query_field_no gt 1>
<#elseif po.classType=='time'> <#if query_field_no gt 1>
<#if query_field_no gt 1> - <#if query_field_no gt 1> + <#if query_field_no gt 1> <#if query_field_no gt 1> <#if query_field_no gt 1> ~ <#if query_field_no gt 1> - <#if query_field_no gt 1> + <#if query_field_no gt 1> <#if query_field_no gt 1> <#if query_field_no gt 1>
<#elseif po.classType=='datetime'> <#if query_field_no gt 1>
<#if query_field_no gt 1> - <#if query_field_no gt 1> + <#if query_field_no gt 1> <#if query_field_no gt 1> <#if query_field_no gt 1> ~ <#if query_field_no gt 1> - <#if query_field_no gt 1> + <#if query_field_no gt 1> <#if query_field_no gt 1> <#if query_field_no gt 1>
<#else> <#if query_field_no gt 1>
<#if query_field_no gt 1> - <#if query_field_no gt 1> + <#if query_field_no gt 1> <#if query_field_no gt 1> <#if query_field_no gt 1> ~ <#if query_field_no gt 1> - <#if query_field_no gt 1> + <#if query_field_no gt 1> <#if query_field_no gt 1> <#if query_field_no gt 1>
diff --git a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/common/form/native/vueNativeSearchStyle.ftl b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/common/form/native/vueNativeSearchStyle.ftl index e3b7fd4f47..73940762b2 100644 --- a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/common/form/native/vueNativeSearchStyle.ftl +++ b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/common/form/native/vueNativeSearchStyle.ftl @@ -18,5 +18,8 @@ margin-bottom: 16px; height: 32px; } + :deep(.ant-picker),:deep(.ant-input-number){ + width: 100%; + } } \ No newline at end of file diff --git a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/common/form/vue3SearchStyle.ftl b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/common/form/vue3SearchStyle.ftl new file mode 100644 index 0000000000..324fc4ebf7 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/common/form/vue3SearchStyle.ftl @@ -0,0 +1,5 @@ + <#-- 非原生查询区域样式 --> + :deep(.ant-picker),:deep(.ant-input-number){ + width: 100%; + } + \ No newline at end of file diff --git a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/default/one/java/${bussiPackage}/${entityPackage}/vue3/${entityName}List.vuei b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/default/one/java/${bussiPackage}/${entityPackage}/vue3/${entityName}List.vuei index 86b7ab5681..c582356256 100644 --- a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/default/one/java/${bussiPackage}/${entityPackage}/vue3/${entityName}List.vuei +++ b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/default/one/java/${bussiPackage}/${entityPackage}/vue3/${entityName}List.vuei @@ -319,5 +319,5 @@ \ No newline at end of file diff --git a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/default/one/java/${bussiPackage}/${entityPackage}/vue3/${entityName}__data.tsi b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/default/one/java/${bussiPackage}/${entityPackage}/vue3/${entityName}__data.tsi index 1376d209c4..d53deb09cc 100644 --- a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/default/one/java/${bussiPackage}/${entityPackage}/vue3/${entityName}__data.tsi +++ b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/default/one/java/${bussiPackage}/${entityPackage}/vue3/${entityName}__data.tsi @@ -3,6 +3,7 @@ import {BasicColumn} from '/@/components/Table'; import {FormSchema} from '/@/components/Table'; import { rules} from '/@/utils/helper/validator'; import { render } from '/@/utils/common/renderUtils'; +import { getWeekMonthQuarterYear } from '/@/utils'; //列表数据 export const columns: BasicColumn[] = [ <#list columns as po> @@ -18,7 +19,16 @@ export const columns: BasicColumn[] = [ <#if po.classType=='date'> dataIndex: '${po.fieldName}', customRender:({text}) =>{ - return !text?"":(text.length>10?text.substr(0,10):text) + text = !text ? "" : (text.length > 10 ? text.substr(0,10) : text); + <#if po.extendParams?exists && po.extendParams.picker?exists> + if(text) { + return getWeekMonthQuarterYear(text)['${po.extendParams.picker}']; + } else { + return text; + } + <#else> + return text; + }, <#elseif po.fieldDbType=='Blob'> dataIndex: '${po.fieldName}String' @@ -123,6 +133,9 @@ export const searchFormSchema: FormSchema[] = [ <#elseif po.classType=='date'> component: 'DatePicker', componentProps: { + <#if po.extendParams?exists && po.extendParams.picker?exists> + picker: '${po.extendParams.picker}', + valueFormat: 'YYYY-MM-DD' }, <#elseif po.classType=='datetime'> @@ -153,6 +166,22 @@ export const searchFormSchema: FormSchema[] = [ dictCode:"${po.dictField}" }, +<#elseif po.classType == 'sel_tree'> + component: 'JTreeSelect', + componentProps:{ + <#if po.dictText??> + <#if po.dictText?split(',')[2]?? && po.dictText?split(',')[0]??> + dict:"${po.dictTable},${po.dictText?split(',')[2]},${po.dictText?split(',')[0]}", + <#elseif po.dictText?split(',')[1]??> + pidField:"${po.dictText?split(',')[1]}", + <#elseif po.dictText?split(',')[3]??> + hasChildField:"${po.dictText?split(',')[3]}", + + + pidValue:"${po.dictField}", + }, +<#elseif po.fieldDbType=='int' || po.fieldDbType=='double' || po.fieldDbType=='BigDecimal'> + component: 'InputNumber', <#else> component: 'Input', @@ -165,7 +194,10 @@ export const searchFormSchema: FormSchema[] = [ <#if po.classType=='date'> component: 'RangePicker', componentProps: { - valueType: 'Date', + <#if po.extendParams?exists && po.extendParams.picker?exists> + picker: '${po.extendParams.picker}', + + valueType: 'Date', }, <#elseif po.classType=='datetime'> component: 'RangePicker', @@ -226,6 +258,9 @@ export const formSchema: FormSchema[] = [ <#if po.classType =='date'> component: 'DatePicker', componentProps: { + <#if po.extendParams?exists && po.extendParams.picker?exists> + picker: '${po.extendParams.picker}', + valueFormat: 'YYYY-MM-DD' }, <#elseif po.classType =='datetime'> @@ -319,7 +354,9 @@ export const formSchema: FormSchema[] = [ componentProps:{ <#if po.uploadnum??> fileMax:${po.uploadnum} - + <#else> + fileMax: 0 + }, <#elseif po.classType=='umeditor'> component: 'JEditor', diff --git a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/default/one/java/${bussiPackage}/${entityPackage}/vue3Native/${entityName}__data.tsi b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/default/one/java/${bussiPackage}/${entityPackage}/vue3Native/${entityName}__data.tsi index e7390cff99..45ed477d3d 100644 --- a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/default/one/java/${bussiPackage}/${entityPackage}/vue3Native/${entityName}__data.tsi +++ b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/default/one/java/${bussiPackage}/${entityPackage}/vue3Native/${entityName}__data.tsi @@ -3,6 +3,7 @@ import {BasicColumn} from '/@/components/Table'; import {FormSchema} from '/@/components/Table'; import { rules} from '/@/utils/helper/validator'; import { render } from '/@/utils/common/renderUtils'; +import { getWeekMonthQuarterYear } from '/@/utils'; //列表数据 export const columns: BasicColumn[] = [ <#list columns as po> @@ -18,7 +19,16 @@ export const columns: BasicColumn[] = [ <#if po.classType=='date'> dataIndex: '${po.fieldName}', customRender:({text}) =>{ - return !text?"":(text.length>10?text.substr(0,10):text); + text = !text ? "" : (text.length > 10 ? text.substr(0,10) : text); + <#if po.extendParams?exists && po.extendParams.picker?exists> + if(text) { + return getWeekMonthQuarterYear(text)['${po.extendParams.picker}']; + } else { + return text; + } + <#else> + return text; + }, <#elseif po.fieldDbType=='Blob'> dataIndex: '${po.fieldName}String' diff --git a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/default/tree/java/${bussiPackage}/${entityPackage}/vue3/${entityName}List.vuei b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/default/tree/java/${bussiPackage}/${entityPackage}/vue3/${entityName}List.vuei index ac7ef23226..42fc9a0b00 100644 --- a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/default/tree/java/${bussiPackage}/${entityPackage}/vue3/${entityName}List.vuei +++ b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/default/tree/java/${bussiPackage}/${entityPackage}/vue3/${entityName}List.vuei @@ -443,5 +443,5 @@ diff --git a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/default/tree/java/${bussiPackage}/${entityPackage}/vue3/${entityName}__data.tsi b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/default/tree/java/${bussiPackage}/${entityPackage}/vue3/${entityName}__data.tsi index c48f567899..f2412e9468 100644 --- a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/default/tree/java/${bussiPackage}/${entityPackage}/vue3/${entityName}__data.tsi +++ b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/default/tree/java/${bussiPackage}/${entityPackage}/vue3/${entityName}__data.tsi @@ -3,6 +3,7 @@ import {BasicColumn} from '/@/components/Table'; import {FormSchema} from '/@/components/Table'; import { rules} from '/@/utils/helper/validator'; import { render } from '/@/utils/common/renderUtils'; +import { getWeekMonthQuarterYear } from '/@/utils'; //列表数据 export const columns: BasicColumn[] = [ <#list columns as po> @@ -22,7 +23,16 @@ export const columns: BasicColumn[] = [ <#if po.classType=='date'> dataIndex: '${po.fieldName}', customRender:({text}) =>{ - return !text?"":(text.length>10?text.substr(0,10):text) + text = !text ? "" : (text.length > 10 ? text.substr(0,10) : text); + <#if po.extendParams?exists && po.extendParams.picker?exists> + if(text) { + return getWeekMonthQuarterYear(text)['${po.extendParams.picker}']; + } else { + return text; + } + <#else> + return text; + }, <#elseif po.fieldDbType=='Blob'> dataIndex: '${po.fieldName}String' @@ -126,6 +136,9 @@ export const searchFormSchema: FormSchema[] = [ <#elseif po.classType=='date'> component: 'DatePicker', componentProps: { + <#if po.extendParams?exists && po.extendParams.picker?exists> + picker: '${po.extendParams.picker}', + valueFormat: 'YYYY-MM-DD' }, <#elseif po.classType=='datetime'> @@ -172,6 +185,8 @@ export const searchFormSchema: FormSchema[] = [ dictCode:"${po.dictField}" }, +<#elseif po.fieldDbType=='int' || po.fieldDbType=='double' || po.fieldDbType=='BigDecimal'> + component: 'InputNumber', <#else> component: 'Input', @@ -184,7 +199,10 @@ export const searchFormSchema: FormSchema[] = [ <#if po.classType=='date'> component: 'RangePicker', componentProps: { - valueType: 'Date', + <#if po.extendParams?exists && po.extendParams.picker?exists> + picker: '${po.extendParams.picker}', + + valueType: 'Date', }, <#elseif po.classType=='datetime'> component: 'RangePicker', @@ -258,6 +276,9 @@ export const formSchema: FormSchema[] = [ <#elseif po.classType =='date'> component: 'DatePicker', componentProps: { + <#if po.extendParams?exists && po.extendParams.picker?exists> + picker: '${po.extendParams.picker}', + valueFormat: 'YYYY-MM-DD' }, <#elseif po.classType =='datetime'> @@ -351,7 +372,9 @@ export const formSchema: FormSchema[] = [ componentProps:{ <#if po.uploadnum??> fileMax:${po.uploadnum} - + <#else> + fileMax: 0 + }, <#elseif po.classType=='umeditor'> component: 'JEditor', diff --git a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/default/tree/java/${bussiPackage}/${entityPackage}/vue3Native/${entityName}__data.tsi b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/default/tree/java/${bussiPackage}/${entityPackage}/vue3Native/${entityName}__data.tsi index 835486b998..64ef3b0c09 100644 --- a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/default/tree/java/${bussiPackage}/${entityPackage}/vue3Native/${entityName}__data.tsi +++ b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/default/tree/java/${bussiPackage}/${entityPackage}/vue3Native/${entityName}__data.tsi @@ -3,6 +3,7 @@ import {BasicColumn} from '/@/components/Table'; import {FormSchema} from '/@/components/Table'; import { rules} from '/@/utils/helper/validator'; import { render } from '/@/utils/common/renderUtils'; +import { getWeekMonthQuarterYear } from '/@/utils'; //列表数据 export const columns: BasicColumn[] = [ <#list columns as po> @@ -22,7 +23,16 @@ export const columns: BasicColumn[] = [ <#if po.classType=='date'> dataIndex: '${po.fieldName}', customRender:({text}) =>{ - return !text?"":(text.length>10?text.substr(0,10):text); + text = !text ? "" : (text.length > 10 ? text.substr(0,10) : text); + <#if po.extendParams?exists && po.extendParams.picker?exists> + if(text) { + return getWeekMonthQuarterYear(text)['${po.extendParams.picker}']; + } else { + return text; + } + <#else> + return text; + }, <#elseif po.fieldDbType=='Blob'> dataIndex: '${po.fieldName}String' diff --git a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/erp/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}List.vuei b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/erp/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}List.vuei index 5a917fb14d..8c2107816a 100644 --- a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/erp/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}List.vuei +++ b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/erp/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}List.vuei @@ -119,7 +119,8 @@ title: '${tableVo.ftlDescription}', api: list, columns, - canResize:false, + canResize: false, + clickToRowSelect: true, rowSelection: {type: 'radio'}, formConfig: { schemas: searchFormSchema, @@ -349,4 +350,6 @@ } } } + + <#include "/common/form/vue3SearchStyle.ftl"> \ No newline at end of file diff --git a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/erp/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}__data.tsi b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/erp/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}__data.tsi index 23dfc4c86e..c8387176a0 100644 --- a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/erp/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}__data.tsi +++ b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/erp/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}__data.tsi @@ -3,6 +3,7 @@ import {BasicColumn} from '/@/components/Table'; import {FormSchema} from '/@/components/Table'; import { rules} from '/@/utils/helper/validator'; import { render } from '/@/utils/common/renderUtils'; +import { getWeekMonthQuarterYear } from '/@/utils'; //列表数据 export const columns: BasicColumn[] = [ <#list columns as po> @@ -18,7 +19,16 @@ export const columns: BasicColumn[] = [ <#if po.classType=='date'> dataIndex: '${po.fieldName}', customRender:({text}) =>{ - return !text?"":(text.length>10?text.substr(0,10):text) + text = !text ? "" : (text.length > 10 ? text.substr(0,10) : text); + <#if po.extendParams?exists && po.extendParams.picker?exists> + if(text) { + return getWeekMonthQuarterYear(text)['${po.extendParams.picker}']; + } else { + return text; + } + <#else> + return text; + }, <#elseif po.fieldDbType=='Blob'> dataIndex: '${po.fieldName}String' @@ -120,6 +130,9 @@ export const searchFormSchema: FormSchema[] = [ <#elseif po.classType=='date'> component: 'DatePicker', componentProps: { + <#if po.extendParams?exists && po.extendParams.picker?exists> + picker: '${po.extendParams.picker}', + valueFormat: 'YYYY-MM-DD' }, <#elseif po.classType=='datetime'> @@ -145,6 +158,22 @@ export const searchFormSchema: FormSchema[] = [ dictCode:"${po.dictField}" }, +<#elseif po.classType == 'sel_tree'> + component: 'JTreeSelect', + componentProps:{ + <#if po.dictText??> + <#if po.dictText?split(',')[2]?? && po.dictText?split(',')[0]??> + dict:"${po.dictTable},${po.dictText?split(',')[2]},${po.dictText?split(',')[0]}", + <#elseif po.dictText?split(',')[1]??> + pidField:"${po.dictText?split(',')[1]}", + <#elseif po.dictText?split(',')[3]??> + hasChildField:"${po.dictText?split(',')[3]}", + + + pidValue:"${po.dictField}", + }, +<#elseif po.fieldDbType=='int' || po.fieldDbType=='double' || po.fieldDbType=='BigDecimal'> + component: 'InputNumber', <#else> component: 'Input', @@ -157,7 +186,10 @@ export const searchFormSchema: FormSchema[] = [ <#if po.classType=='date'> component: 'RangePicker', componentProps: { - valueType: 'Date', + <#if po.extendParams?exists && po.extendParams.picker?exists> + picker: '${po.extendParams.picker}', + + valueType: 'Date', }, <#elseif po.classType=='datetime'> component: 'RangePicker', @@ -219,6 +251,9 @@ export const formSchema: FormSchema[] = [ <#if po.classType =='date'> component: 'DatePicker', componentProps: { + <#if po.extendParams?exists && po.extendParams.picker?exists> + picker: '${po.extendParams.picker}', + valueFormat: 'YYYY-MM-DD' }, <#elseif po.classType =='datetime'> @@ -312,6 +347,8 @@ export const formSchema: FormSchema[] = [ componentProps:{ <#if po.uploadnum??> fileMax:${po.uploadnum} + <#else> + fileMax: 0 }, <#elseif po.classType=='umeditor'> @@ -425,7 +462,16 @@ export const ${sub.entityName?uncap_first}Columns: BasicColumn[] = [ <#if po.classType=='date'> dataIndex: '${po.fieldName}', customRender:({text}) =>{ - return !text?"":(text.length>10?text.substr(0,10):text) + text = !text ? "" : (text.length > 10 ? text.substr(0,10) : text); + <#if po.extendParams?exists && po.extendParams.picker?exists> + if(text) { + return getWeekMonthQuarterYear(text)['${po.extendParams.picker}']; + } else { + return text; + } + <#else> + return text; + }, <#elseif po.fieldDbType=='Blob'> dataIndex: '${po.fieldName}String' @@ -511,6 +557,9 @@ export const ${sub.entityName?uncap_first}FormSchema: FormSchema[] = [ <#if po.classType =='date'> component: 'DatePicker', componentProps: { + <#if po.extendParams?exists && po.extendParams.picker?exists> + picker: '${po.extendParams.picker}', + valueFormat: 'YYYY-MM-DD' }, <#elseif po.classType =='datetime'> @@ -598,8 +647,10 @@ export const ${sub.entityName?uncap_first}FormSchema: FormSchema[] = [ componentProps:{ <#if po.uploadnum??> fileMax:${po.uploadnum} - - }, + <#else> + fileMax: 0 + + }, <#elseif po.classType=='umeditor'> component: 'JEditor', <#elseif po.classType == 'sel_tree'> diff --git a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/erp/onetomany/java/${bussiPackage}/${entityPackage}/vue3/[1-n]List.vuei b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/erp/onetomany/java/${bussiPackage}/${entityPackage}/vue3/[1-n]List.vuei index c606f2cb75..29c3d43f5a 100644 --- a/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/erp/onetomany/java/${bussiPackage}/${entityPackage}/vue3/[1-n]List.vuei +++ b/jeecg-module-system/jeecg-system-biz/src/main/resources/jeecg/code-template-online/erp/onetomany/java/${bussiPackage}/${entityPackage}/vue3/[1-n]List.vuei @@ -6,9 +6,9 @@