mirror of https://github.com/jeecgboot/jeecg-boot
【v3.8.3】升级代码生成器模板
parent
7abc2e4c9c
commit
d728d6b090
|
@ -1,4 +1,4 @@
|
||||||
<#include "../utils.ftl">
|
<#include "/common/utils.ftl">
|
||||||
<#if po.isShow == 'Y' && poHasCheck(po)>
|
<#if po.isShow == 'Y' && poHasCheck(po)>
|
||||||
<#if po.fieldName != 'id'>
|
<#if po.fieldName != 'id'>
|
||||||
${po.fieldName}: [
|
${po.fieldName}: [
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<#include "../../utils.ftl">
|
<#include "/common/utils.ftl">
|
||||||
<#list columns as po>
|
<#list columns as po>
|
||||||
<#if po.isShow == 'Y' && poHasCheck(po)>
|
<#if po.isShow == 'Y' && poHasCheck(po)>
|
||||||
${po.fieldName}: [<#include "vue3CoreNative.ftl">],
|
${po.fieldName}: [<#include "vue3CoreNative.ftl">],
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<#include "../utils.ftl">
|
<#include "/common/utils.ftl">
|
||||||
<#if col.isShow == 'Y' && poHasCheck(col)>
|
<#if col.isShow == 'Y' && poHasCheck(col)>
|
||||||
validateRules: [
|
validateRules: [
|
||||||
<#if col.fieldName != 'id'>
|
<#if col.fieldName != 'id'>
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
<#--<#include "../../../../../../../common/utils.ftl">-->
|
|
||||||
<#include "/common/utils.ftl">
|
<#include "/common/utils.ftl">
|
||||||
<template>
|
<template>
|
||||||
<a-spin :spinning="confirmLoading">
|
<a-spin :spinning="confirmLoading">
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
<#--<#include "../../../../../../../common/utils.ftl">-->
|
|
||||||
<#include "/common/utils.ftl">
|
<#include "/common/utils.ftl">
|
||||||
<#assign modal_width = 800>
|
<#assign modal_width = 800>
|
||||||
<#if tableVo.fieldRowNum==2>
|
<#if tableVo.fieldRowNum==2>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<#assign buttonList = tableVo.extendParams.cgButtonList?filter(btn -> btn??)>
|
<#assign buttonList = tableVo.extendParams.cgButtonList?filter(btn -> btn??)>
|
||||||
</#if>
|
</#if>
|
||||||
<template>
|
<template>
|
||||||
<BasicModal v-bind="$attrs" @register="registerModal" destroyOnClose :title="title" :width="${getModalWidth(tableVo.fieldRowNum?default(1))}" @ok="handleSubmit">
|
<BasicModal v-bind="$attrs" @register="registerModal" destroyOnClose :title="title" :maxHeight="500" :width="${getModalWidth(tableVo.fieldRowNum?default(1))}" @ok="handleSubmit">
|
||||||
<BasicForm @register="registerForm" name="${entityName}Form" />
|
<BasicForm @register="registerForm" name="${entityName}Form" />
|
||||||
<#if buttonList?? && buttonList?size gt 0>
|
<#if buttonList?? && buttonList?size gt 0>
|
||||||
<template #insertFooter>
|
<template #insertFooter>
|
||||||
|
@ -38,7 +38,8 @@
|
||||||
</#if>
|
</#if>
|
||||||
schemas: formSchema,
|
schemas: formSchema,
|
||||||
showActionButtonGroup: false,
|
showActionButtonGroup: false,
|
||||||
baseColProps: {span: ${getFormSpan(tableVo.fieldRowNum?default(1))}}
|
baseColProps: {span: ${getFormSpan(tableVo.fieldRowNum?default(1))}},
|
||||||
|
baseRowStyle: { padding: "0 20px" }
|
||||||
});
|
});
|
||||||
//表单赋值
|
//表单赋值
|
||||||
const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => {
|
const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => {
|
||||||
|
|
|
@ -251,6 +251,6 @@
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
.antd-modal-form {
|
.antd-modal-form {
|
||||||
padding: 14px;
|
padding: 14px 20px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
|
<#include "/common/utils.ftl">
|
||||||
<template>
|
<template>
|
||||||
<#assign buttonList=[]>
|
<#assign buttonList=[]>
|
||||||
<#if tableVo.extendParams?? && tableVo.extendParams.cgButtonList??>
|
<#if tableVo.extendParams?? && tableVo.extendParams.cgButtonList??>
|
||||||
<#assign buttonList = tableVo.extendParams.cgButtonList?filter(btn -> btn??)>
|
<#assign buttonList = tableVo.extendParams.cgButtonList?filter(btn -> btn??)>
|
||||||
</#if>
|
</#if>
|
||||||
<j-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
|
<j-modal :title="title" maxHeight="500px" :width="${getModalWidth(tableVo.fieldRowNum?default(1))}" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
|
||||||
<${entityName}Form ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></${entityName}Form>
|
<${entityName}Form ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></${entityName}Form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<#if buttonList?? && buttonList?size gt 0>
|
<#if buttonList?? && buttonList?size gt 0>
|
||||||
|
|
|
@ -177,7 +177,7 @@ public class ${entityName}ServiceImpl extends ServiceImpl<${entityName}Mapper, $
|
||||||
*/
|
*/
|
||||||
private ${entityName} getTreeRoot(String pidVal){
|
private ${entityName} getTreeRoot(String pidVal){
|
||||||
${entityName} data = baseMapper.selectById(pidVal);
|
${entityName} data = baseMapper.selectById(pidVal);
|
||||||
if(data != null && !I${entityName}Service.ROOT_PID_VALUE.equals(data.get${pidFieldName?cap_first}())){
|
if(data != null && !I${entityName}Service.ROOT_PID_VALUE.equals(data.get${pidFieldName?cap_first}()) && !data.get${pidFieldName?cap_first}().equals(data.getId())){
|
||||||
return this.getTreeRoot(data.get${pidFieldName?cap_first}());
|
return this.getTreeRoot(data.get${pidFieldName?cap_first}());
|
||||||
}else{
|
}else{
|
||||||
return data;
|
return data;
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
<#assign buttonList = tableVo.extendParams.cgButtonList?filter(btn -> btn??)>
|
<#assign buttonList = tableVo.extendParams.cgButtonList?filter(btn -> btn??)>
|
||||||
</#if>
|
</#if>
|
||||||
<template>
|
<template>
|
||||||
<BasicModal v-bind="$attrs" @register="registerModal" destroyOnClose :width="${getModalWidth(tableVo.fieldRowNum?default(1))}" :title="getTitle" @ok="handleSubmit">
|
<BasicModal v-bind="$attrs" @register="registerModal" destroyOnClose :maxHeight="500" :width="${getModalWidth(tableVo.fieldRowNum?default(1))}" :title="getTitle" @ok="handleSubmit">
|
||||||
<BasicForm @register="registerForm" name="${entityName}Form" />
|
<BasicForm @register="registerForm" name="${entityName}Form" />
|
||||||
<#if buttonList?? && buttonList?size gt 0>
|
<#if buttonList?? && buttonList?size gt 0>
|
||||||
<template #insertFooter>
|
<template #insertFooter>
|
||||||
|
@ -65,6 +65,7 @@
|
||||||
xs: { span: 24 },
|
xs: { span: 24 },
|
||||||
sm: { span: 18 },
|
sm: { span: 18 },
|
||||||
},
|
},
|
||||||
|
baseRowStyle: { padding: "0 20px" }
|
||||||
});
|
});
|
||||||
//表单赋值
|
//表单赋值
|
||||||
const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => {
|
const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => {
|
||||||
|
@ -80,8 +81,20 @@
|
||||||
await setFieldsValue({
|
await setFieldsValue({
|
||||||
...data.record,
|
...data.record,
|
||||||
});
|
});
|
||||||
|
updateSchema([
|
||||||
|
{
|
||||||
|
field: '${pidFieldName}',
|
||||||
|
componentProps: { hiddenNodeKey: data.record.id },
|
||||||
|
},
|
||||||
|
]);
|
||||||
} else {
|
} else {
|
||||||
model = null;
|
model = null;
|
||||||
|
updateSchema([
|
||||||
|
{
|
||||||
|
field: '${pidFieldName}',
|
||||||
|
componentProps: { hiddenNodeKey: '' },
|
||||||
|
},
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
//父级节点树信息
|
//父级节点树信息
|
||||||
treeData.value = await loadTreeData({'async': false,'pcode':''});
|
treeData.value = await loadTreeData({'async': false,'pcode':''});
|
||||||
|
|
|
@ -54,6 +54,7 @@
|
||||||
pidField="${tableVo.extendParams.pidField}"
|
pidField="${tableVo.extendParams.pidField}"
|
||||||
pidValue="0"
|
pidValue="0"
|
||||||
hasChildField="${tableVo.extendParams.hasChildren}"
|
hasChildField="${tableVo.extendParams.hasChildren}"
|
||||||
|
:hiddenNodeKey="hiddenNodeKey"
|
||||||
<#if po.readonly=='Y'>disabled<#else>:disabled="disabled"</#if>>
|
<#if po.readonly=='Y'>disabled<#else>:disabled="disabled"</#if>>
|
||||||
</j-tree-select>
|
</j-tree-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
@ -106,6 +107,8 @@
|
||||||
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
|
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
|
||||||
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
|
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
|
||||||
const confirmLoading = ref<boolean>(false);
|
const confirmLoading = ref<boolean>(false);
|
||||||
|
//需要隐藏的key
|
||||||
|
const hiddenNodeKey = ref<string>('');
|
||||||
//表单验证
|
//表单验证
|
||||||
const validatorRules = reactive({
|
const validatorRules = reactive({
|
||||||
<#include "/common/validatorRulesTemplate/native/vue3MainNative.ftl">
|
<#include "/common/validatorRulesTemplate/native/vue3MainNative.ftl">
|
||||||
|
@ -186,6 +189,11 @@
|
||||||
})
|
})
|
||||||
//赋值
|
//赋值
|
||||||
Object.assign(formData,tmpData);
|
Object.assign(formData,tmpData);
|
||||||
|
if(tmpData.id) {
|
||||||
|
hiddenNodeKey.value = tmpData.id;
|
||||||
|
} else {
|
||||||
|
hiddenNodeKey.value = "";
|
||||||
|
}
|
||||||
model = tmpData
|
model = tmpData
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -303,6 +311,6 @@
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
.antd-modal-form {
|
.antd-modal-form {
|
||||||
padding: 14px;
|
padding: 14px 20px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
|
<#include "/common/utils.ftl">
|
||||||
<template>
|
<template>
|
||||||
<#assign buttonList=[]>
|
<#assign buttonList=[]>
|
||||||
<#if tableVo.extendParams?? && tableVo.extendParams.cgButtonList??>
|
<#if tableVo.extendParams?? && tableVo.extendParams.cgButtonList??>
|
||||||
<#assign buttonList = tableVo.extendParams.cgButtonList?filter(btn -> btn??)>
|
<#assign buttonList = tableVo.extendParams.cgButtonList?filter(btn -> btn??)>
|
||||||
</#if>
|
</#if>
|
||||||
<j-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
|
<j-modal :title="title" maxHeight="500px" :width="${getModalWidth(tableVo.fieldRowNum?default(1))}" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
|
||||||
<${entityName}Form ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></${entityName}Form>
|
<${entityName}Form ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></${entityName}Form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<#if buttonList?? && buttonList?size gt 0>
|
<#if buttonList?? && buttonList?size gt 0>
|
||||||
|
|
|
@ -154,6 +154,7 @@
|
||||||
api: list,
|
api: list,
|
||||||
columns,
|
columns,
|
||||||
canResize: true,
|
canResize: true,
|
||||||
|
maxHeight: 300,
|
||||||
clickToRowSelect: true,
|
clickToRowSelect: true,
|
||||||
rowSelection: {type: 'radio'},
|
rowSelection: {type: 'radio'},
|
||||||
formConfig: {
|
formConfig: {
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<#if tableVo.extendParams?? && tableVo.extendParams.cgButtonList??>
|
<#if tableVo.extendParams?? && tableVo.extendParams.cgButtonList??>
|
||||||
<#assign buttonList = tableVo.extendParams.cgButtonList?filter(btn -> btn??)>
|
<#assign buttonList = tableVo.extendParams.cgButtonList?filter(btn -> btn??)>
|
||||||
</#if>
|
</#if>
|
||||||
<BasicModal v-bind="$attrs" @register="registerModal" destroyOnClose :title="title" :width="${getModalWidth(tableVo.fieldRowNum?default(1))}" @ok="handleSubmit">
|
<BasicModal v-bind="$attrs" @register="registerModal" destroyOnClose :title="title" :maxHeight="500" :width="${getModalWidth(tableVo.fieldRowNum?default(1))}" @ok="handleSubmit">
|
||||||
<BasicForm @register="registerForm" name="${entityName}Form" />
|
<BasicForm @register="registerForm" name="${entityName}Form" />
|
||||||
<#if buttonList?? && buttonList?size gt 0>
|
<#if buttonList?? && buttonList?size gt 0>
|
||||||
<template #insertFooter>
|
<template #insertFooter>
|
||||||
|
@ -46,7 +46,8 @@
|
||||||
</#if>
|
</#if>
|
||||||
schemas: formSchema,
|
schemas: formSchema,
|
||||||
showActionButtonGroup: false,
|
showActionButtonGroup: false,
|
||||||
baseColProps: {span: ${getFormSpan(tableVo.fieldRowNum?default(1))}}
|
baseColProps: {span: ${getFormSpan(tableVo.fieldRowNum?default(1))}},
|
||||||
|
baseRowStyle: { padding: "0 20px" }
|
||||||
});
|
});
|
||||||
//表单赋值
|
//表单赋值
|
||||||
const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => {
|
const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<#list subTables as sub>
|
<#list subTables as sub>
|
||||||
#segment#${sub.entityName}Modal.vue
|
#segment#${sub.entityName}Modal.vue
|
||||||
<template>
|
<template>
|
||||||
<BasicModal v-bind="$attrs" @register="registerModal" destroyOnClose :title="title" :width="${getModalWidth(tableVo.fieldRowNum?default(1))}" @ok="handleSubmit">
|
<BasicModal v-bind="$attrs" @register="registerModal" destroyOnClose :title="title" :maxHeight="500" :width="${getModalWidth(tableVo.fieldRowNum?default(1))}" @ok="handleSubmit">
|
||||||
<BasicForm @register="registerForm" name="${sub.entityName}Form" />
|
<BasicForm @register="registerForm" name="${sub.entityName}Form" />
|
||||||
</BasicModal>
|
</BasicModal>
|
||||||
</template>
|
</template>
|
||||||
|
@ -36,7 +36,8 @@
|
||||||
</#if>
|
</#if>
|
||||||
schemas: ${sub.entityName?uncap_first}FormSchema,
|
schemas: ${sub.entityName?uncap_first}FormSchema,
|
||||||
showActionButtonGroup: false,
|
showActionButtonGroup: false,
|
||||||
baseColProps: {span: ${getFormSpan(tableVo.fieldRowNum?default(1))}}
|
baseColProps: {span: ${getFormSpan(tableVo.fieldRowNum?default(1))}},
|
||||||
|
baseRowStyle: { padding: "0 20px" }
|
||||||
});
|
});
|
||||||
//表单赋值
|
//表单赋值
|
||||||
const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => {
|
const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => {
|
||||||
|
|
|
@ -243,6 +243,7 @@
|
||||||
api: list,
|
api: list,
|
||||||
columns,
|
columns,
|
||||||
canResize:true,
|
canResize:true,
|
||||||
|
maxHeight: 300,
|
||||||
useSearchForm: false,
|
useSearchForm: false,
|
||||||
clickToRowSelect: true,
|
clickToRowSelect: true,
|
||||||
rowSelection: {type: 'radio'},
|
rowSelection: {type: 'radio'},
|
||||||
|
|
|
@ -246,6 +246,6 @@
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
.antd-modal-form {
|
.antd-modal-form {
|
||||||
padding: 14px;
|
padding: 14px 20px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
|
<#include "/common/utils.ftl">
|
||||||
<template>
|
<template>
|
||||||
<#assign buttonList=[]>
|
<#assign buttonList=[]>
|
||||||
<#if tableVo.extendParams?? && tableVo.extendParams.cgButtonList??>
|
<#if tableVo.extendParams?? && tableVo.extendParams.cgButtonList??>
|
||||||
<#assign buttonList = tableVo.extendParams.cgButtonList?filter(btn -> btn??)>
|
<#assign buttonList = tableVo.extendParams.cgButtonList?filter(btn -> btn??)>
|
||||||
</#if>
|
</#if>
|
||||||
<j-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
|
<j-modal :title="title" maxHeight="500px" :width="${getModalWidth(tableVo.fieldRowNum?default(1))}" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
|
||||||
<${entityName}Form ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></${entityName}Form>
|
<${entityName}Form ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></${entityName}Form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<#if buttonList?? && buttonList?size gt 0>
|
<#if buttonList?? && buttonList?size gt 0>
|
||||||
|
|
|
@ -222,7 +222,7 @@
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
.antd-modal-form {
|
.antd-modal-form {
|
||||||
padding: 14px;
|
padding: 14px 20px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</#list>
|
</#list>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<#list subTables as sub>
|
<#list subTables as sub>
|
||||||
#segment#${sub.entityName}Modal.vue
|
#segment#${sub.entityName}Modal.vue
|
||||||
<template>
|
<template>
|
||||||
<j-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
|
<j-modal :title="title" maxHeight="500px" :width="${getModalWidth(tableVo.fieldRowNum?default(1))}" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
|
||||||
<${sub.entityName}Form ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></${sub.entityName}Form>
|
<${sub.entityName}Form ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></${sub.entityName}Form>
|
||||||
</j-modal>
|
</j-modal>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
<#-- noinspection JSDuplicatedDeclaration,RequiredAttributes,NpmUsedModulesInstalled -->
|
<#-- noinspection JSDuplicatedDeclaration,RequiredAttributes,NpmUsedModulesInstalled -->
|
||||||
<#-- ** 引入全局工具方法 ** -->
|
<#-- ** 引入全局工具方法 ** -->
|
||||||
<#--<#include "/common/utils.ftl">-->
|
<#include "/common/utils.ftl">
|
||||||
<#include "../../../../../../common/utils.ftl">
|
|
||||||
<#-- ** 定义全局使用的变量 ** -->
|
<#-- ** 定义全局使用的变量 ** -->
|
||||||
<#-- 是否有查询条件 -->
|
<#-- 是否有查询条件 -->
|
||||||
<#assign query_flag=false>
|
<#assign query_flag=false>
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<#-- ** 引入全局工具方法 ** -->
|
<#-- ** 引入全局工具方法 ** -->
|
||||||
<#--<#include "/common/utils.ftl">-->
|
<#include "/common/utils.ftl">
|
||||||
<#include "../../../../../../common/utils.ftl">
|
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<#assign list_need_category=false>
|
<#assign list_need_category=false>
|
||||||
|
|
|
@ -4,10 +4,10 @@
|
||||||
<#if tableVo.extendParams?? && tableVo.extendParams.cgButtonList??>
|
<#if tableVo.extendParams?? && tableVo.extendParams.cgButtonList??>
|
||||||
<#assign buttonList = tableVo.extendParams.cgButtonList?filter(btn -> btn??)>
|
<#assign buttonList = tableVo.extendParams.cgButtonList?filter(btn -> btn??)>
|
||||||
</#if>
|
</#if>
|
||||||
<BasicModal v-bind="$attrs" @register="registerModal" destroyOnClose :title="title" :width="${getModalWidth(tableVo.fieldRowNum?default(1))}" @ok="handleSubmit">
|
<BasicModal v-bind="$attrs" @register="registerModal" destroyOnClose :title="title" :maxHeight="500" :width="${getModalWidth(tableVo.fieldRowNum?default(1))}" @ok="handleSubmit">
|
||||||
<BasicForm @register="registerForm" ref="formRef" name="${entityName}Form" />
|
<BasicForm @register="registerForm" ref="formRef" name="${entityName}Form" />
|
||||||
<!-- 子表单区域 -->
|
<!-- 子表单区域 -->
|
||||||
<a-tabs v-model:activeKey="activeKey" animated @change="handleChangeTabs">
|
<a-tabs v-model:activeKey="activeKey" animated @change="handleChangeTabs" class="jeecg-tab">
|
||||||
<#list subTables as sub><#rt/>
|
<#list subTables as sub><#rt/>
|
||||||
<#assign refKey = sub.entityName?uncap_first/>
|
<#assign refKey = sub.entityName?uncap_first/>
|
||||||
<#if sub.foreignRelationType =='1'>
|
<#if sub.foreignRelationType =='1'>
|
||||||
|
@ -118,7 +118,8 @@
|
||||||
</#if>
|
</#if>
|
||||||
schemas: formSchema,
|
schemas: formSchema,
|
||||||
showActionButtonGroup: false,
|
showActionButtonGroup: false,
|
||||||
baseColProps: {span: ${getFormSpan(tableVo.fieldRowNum?default(1))}}
|
baseColProps: {span: ${getFormSpan(tableVo.fieldRowNum?default(1))}},
|
||||||
|
baseRowStyle: { padding: "0 20px"}
|
||||||
});
|
});
|
||||||
//表单赋值
|
//表单赋值
|
||||||
const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => {
|
const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => {
|
||||||
|
@ -271,4 +272,8 @@
|
||||||
:deep(.ant-calendar-picker) {
|
:deep(.ant-calendar-picker) {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.jeecg-tab {
|
||||||
|
padding: 0 20px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
|
@ -4,10 +4,10 @@
|
||||||
<#if tableVo.extendParams?? && tableVo.extendParams.cgButtonList??>
|
<#if tableVo.extendParams?? && tableVo.extendParams.cgButtonList??>
|
||||||
<#assign buttonList = tableVo.extendParams.cgButtonList?filter(btn -> btn??)>
|
<#assign buttonList = tableVo.extendParams.cgButtonList?filter(btn -> btn??)>
|
||||||
</#if>
|
</#if>
|
||||||
<BasicModal v-bind="$attrs" @register="registerModal" destroyOnClose :title="title" :width="${getModalWidth(tableVo.fieldRowNum?default(1))}" @ok="handleSubmit">
|
<BasicModal v-bind="$attrs" @register="registerModal" destroyOnClose :title="title" :maxHeight="500" :width="${getModalWidth(tableVo.fieldRowNum?default(1))}" @ok="handleSubmit">
|
||||||
<BasicForm @register="registerForm" ref="formRef" name="${entityName}Form"/>
|
<BasicForm @register="registerForm" ref="formRef" name="${entityName}Form"/>
|
||||||
<!-- 子表单区域 -->
|
<!-- 子表单区域 -->
|
||||||
<a-tabs v-model:activeKey="activeKey" animated @change="handleChangeTabs">
|
<a-tabs v-model:activeKey="activeKey" animated @change="handleChangeTabs" class="jeecg-tab">
|
||||||
<#list subTables as sub><#rt/>
|
<#list subTables as sub><#rt/>
|
||||||
<#assign refKey = sub.entityName?uncap_first/>
|
<#assign refKey = sub.entityName?uncap_first/>
|
||||||
<#if sub.foreignRelationType =='1'>
|
<#if sub.foreignRelationType =='1'>
|
||||||
|
@ -106,7 +106,8 @@
|
||||||
const ${sub.entityName?uncap_first}Table = reactive({
|
const ${sub.entityName?uncap_first}Table = reactive({
|
||||||
loading: false,
|
loading: false,
|
||||||
dataSource: [],
|
dataSource: [],
|
||||||
columns:${sub.entityName?uncap_first}Columns
|
columns:${sub.entityName?uncap_first}Columns,
|
||||||
|
baseRowStyle: { padding: "0 20px"}
|
||||||
})
|
})
|
||||||
</#if>
|
</#if>
|
||||||
</#list>
|
</#list>
|
||||||
|
@ -117,7 +118,8 @@
|
||||||
</#if>
|
</#if>
|
||||||
schemas: formSchema,
|
schemas: formSchema,
|
||||||
showActionButtonGroup: false,
|
showActionButtonGroup: false,
|
||||||
baseColProps: {span: ${getFormSpan(tableVo.fieldRowNum?default(1))}}
|
baseColProps: {span: ${getFormSpan(tableVo.fieldRowNum?default(1))}},
|
||||||
|
baseRowStyle: { padding: "0 20px" }
|
||||||
});
|
});
|
||||||
//表单赋值
|
//表单赋值
|
||||||
const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => {
|
const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => {
|
||||||
|
@ -270,4 +272,8 @@
|
||||||
:deep(.ant-calendar-picker) {
|
:deep(.ant-calendar-picker) {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.jeecg-tab {
|
||||||
|
padding: 0 20px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
|
@ -36,7 +36,7 @@
|
||||||
<a-spin :spinning="loading">
|
<a-spin :spinning="loading">
|
||||||
<JFormContainer :disabled="disabled">
|
<JFormContainer :disabled="disabled">
|
||||||
<template #detail>
|
<template #detail>
|
||||||
<a-form v-bind="formItemLayout" name="${entityName}Form" ref="formRef">
|
<a-form v-bind="formItemLayout" name="${entityName}Form" ref="formRef" class="jeecg-native-form">
|
||||||
<a-row>
|
<a-row>
|
||||||
<#list columns as po>
|
<#list columns as po>
|
||||||
<#if po.isShow == 'Y' && po.fieldValidType?default("") == 'only'>
|
<#if po.isShow == 'Y' && po.fieldValidType?default("") == 'only'>
|
||||||
|
@ -54,7 +54,7 @@
|
||||||
</JFormContainer>
|
</JFormContainer>
|
||||||
|
|
||||||
<!-- 子表单区域 -->
|
<!-- 子表单区域 -->
|
||||||
<a-tabs v-model:activeKey="activeKey" animated style="overflow:hidden;">
|
<a-tabs v-model:activeKey="activeKey" animated style="overflow:hidden;" class="jeecg-native-tab">
|
||||||
<#list subTables as sub><#rt/>
|
<#list subTables as sub><#rt/>
|
||||||
<#if sub.foreignRelationType =='1'>
|
<#if sub.foreignRelationType =='1'>
|
||||||
<a-tab-pane class="sub-one-form" tab="${sub.ftlDescription}" key="${sub.entityName?uncap_first}" :forceRender="true">
|
<a-tab-pane class="sub-one-form" tab="${sub.ftlDescription}" key="${sub.entityName?uncap_first}" :forceRender="true">
|
||||||
|
@ -408,4 +408,8 @@
|
||||||
max-height: 340px;
|
max-height: 340px;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
.jeecg-native-form,
|
||||||
|
.jeecg-native-tab {
|
||||||
|
padding: 0 20px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<#if tableVo.extendParams?? && tableVo.extendParams.cgButtonList??>
|
<#if tableVo.extendParams?? && tableVo.extendParams.cgButtonList??>
|
||||||
<#assign buttonList = tableVo.extendParams.cgButtonList?filter(btn -> btn??)>
|
<#assign buttonList = tableVo.extendParams.cgButtonList?filter(btn -> btn??)>
|
||||||
</#if>
|
</#if>
|
||||||
<BasicModal v-bind="$attrs" @register="registerModal" :title="title" :width="${getModalWidth(tableVo.fieldRowNum?default(1))}" @ok="handleSubmit">
|
<BasicModal v-bind="$attrs" @register="registerModal" :title="title" maxHeight="500px" :width="${getModalWidth(tableVo.fieldRowNum?default(1))}" @ok="handleSubmit">
|
||||||
<${Format.humpToShortbar(entityName)}-form ref="formComponent" :formDisabled="formDisabled" :formBpm="false" @success="submitSuccess"></${Format.humpToShortbar(entityName)}-form>
|
<${Format.humpToShortbar(entityName)}-form ref="formComponent" :formDisabled="formDisabled" :formBpm="false" @success="submitSuccess"></${Format.humpToShortbar(entityName)}-form>
|
||||||
<#if buttonList?? && buttonList?size gt 0>
|
<#if buttonList?? && buttonList?size gt 0>
|
||||||
<template #insertFooter>
|
<template #insertFooter>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<#if tableVo.extendParams?? && tableVo.extendParams.cgButtonList??>
|
<#if tableVo.extendParams?? && tableVo.extendParams.cgButtonList??>
|
||||||
<#assign buttonList = tableVo.extendParams.cgButtonList?filter(btn -> btn??)>
|
<#assign buttonList = tableVo.extendParams.cgButtonList?filter(btn -> btn??)>
|
||||||
</#if>
|
</#if>
|
||||||
<BasicModal ref="modalRef" destroyOnClose wrapClassName="j-cgform-tab-modal" v-bind="$attrs" @register="registerModal" :width="${getModalWidth(tableVo.fieldRowNum?default(1))}" @ok="handleSubmit">
|
<BasicModal ref="modalRef" destroyOnClose wrapClassName="j-cgform-tab-modal" v-bind="$attrs" @register="registerModal" :maxHeight="500" :width="${getModalWidth(tableVo.fieldRowNum?default(1))}" @ok="handleSubmit">
|
||||||
<!-- 标题区域 -->
|
<!-- 标题区域 -->
|
||||||
<template #title>
|
<template #title>
|
||||||
<div class="titleArea">
|
<div class="titleArea">
|
||||||
|
|
Loading…
Reference in New Issue