优化vue3代码生成器模板子表高度样式

dev
zhangdaiscott 3 years ago
parent fb1cef7cd3
commit 1a902d94c9

@ -1,6 +1,6 @@
<#include "/common/utils.ftl">
<template>
<div style="height: 400px">
<div style="min-height: 400px">
<BasicForm @register="registerForm"></BasicForm>
<div style="width: 100%;text-align: center" v-if="!formDisabled">
<a-button @click="submitForm" pre-icon="ant-design:check" type="primary">提 交</a-button>

@ -222,7 +222,7 @@
<style lang="less" scoped>
.antd-modal-form {
height: 500px !important;
min-height: 500px !important;
overflow-y: auto;
padding: 24px 24px 24px 24px;
}

@ -1,6 +1,6 @@
<#include "/common/utils.ftl">
<template>
<div style="height: 400px">
<div style="min-height: 400px">
<BasicForm @register="registerForm"></BasicForm>
<div style="width: 100%;text-align: center" v-if="!formDisabled">
<a-button @click="submitForm" pre-icon="ant-design:check" type="primary">提 交</a-button>

@ -273,7 +273,7 @@
<style lang="less" scoped>
.antd-modal-form {
height: 500px !important;
min-height: 500px !important;
overflow-y: auto;
padding: 24px 24px 24px 24px;
}

@ -14,6 +14,7 @@
<#else>
<a-tab-pane tab="${sub.ftlDescription}" key="${refKey}" :forceRender="true">
<JVxeTable
v-if="${sub.entityName?uncap_first}Table.show"
keep-source
resizable
ref="${refKey}"
@ -72,7 +73,8 @@
const ${sub.entityName?uncap_first}Table = reactive({
loading: false,
dataSource: [],
columns:${sub.entityName?uncap_first}JVxeColumns
columns:${sub.entityName?uncap_first}JVxeColumns,
show: false
})
</#if>
</#list>
@ -128,7 +130,9 @@
</#list>
<#list subTables as sub><#rt/>
<#if sub.foreignRelationType =='0'>
requestSubTableData(query${sub.entityName}, {id: data.id}, ${sub.entityName?uncap_first}Table)
requestSubTableData(query${sub.entityName}, {id: data.id}, ${sub.entityName?uncap_first}Table, ()=>{
${sub.entityName?uncap_first}Table.show = true;
});
</#if>
</#list>
// 隐藏底部时禁用整个表单

@ -17,6 +17,7 @@
keep-source
resizable
ref="${refKey}"
v-if="${sub.entityName?uncap_first}Table.show"
:loading="${sub.entityName?uncap_first}Table.loading"
:columns="${sub.entityName?uncap_first}Table.columns"
:dataSource="${sub.entityName?uncap_first}Table.dataSource"
@ -102,7 +103,8 @@
const ${sub.entityName?uncap_first}Table = reactive({
loading: false,
dataSource: [],
columns:${sub.entityName?uncap_first}Columns
columns:${sub.entityName?uncap_first}Columns,
show: false
})
</#if>
</#list>
@ -161,7 +163,9 @@
await setFieldsValue({...data});
<#list subTables as sub>
<#if sub.foreignRelationType =='0'>
requestSubTableData(${sub.entityName?uncap_first}List, {id: data.id}, ${sub.entityName?uncap_first}Table, ()=>{});
requestSubTableData(${sub.entityName?uncap_first}List, {id: data.id}, ${sub.entityName?uncap_first}Table, ()=>{
${sub.entityName?uncap_first}Table.show = true;
});
</#if>
<#if sub.foreignRelationType =='1'>
${sub.entityName?uncap_first}Form.value.initFormData(${sub.entityName?uncap_first}List, data.id);

@ -55,10 +55,11 @@
<j-vxe-table
:keep-source="true"
ref="${sub.entityName?uncap_first}TableRef"
v-if="${sub.entityName?uncap_first}Table.show"
:loading="${sub.entityName?uncap_first}Table.loading"
:columns="${sub.entityName?uncap_first}Table.columns"
:dataSource="${sub.entityName?uncap_first}Table.dataSource"
:maxHeight="300"
:height="340"
:disabled="disabled"
:rowNumber="true"
:rowSelection="true"
@ -139,7 +140,8 @@
const ${sub.entityName?uncap_first}Table = reactive<Record<string, any>>({
loading: false,
columns: ${sub.entityName?uncap_first}Columns,
dataSource: []
dataSource: [],
show: false
});
</#if>
</#list>
@ -201,6 +203,7 @@
<#else>
const ${sub.entityName?uncap_first}DataList = await query${sub.entityName}ListByMainId(row['${subMainFieldMap[sub.entityName]}']);
${sub.entityName?uncap_first}Table.dataSource = [...${sub.entityName?uncap_first}DataList];
${sub.entityName?uncap_first}Table.show = true;
</#if>
</#list>
}

@ -21,6 +21,7 @@
keep-source
resizable
ref="${refKey}"
v-if="${sub.entityName?uncap_first}Table.show"
:loading="${sub.entityName?uncap_first}Table.loading"
:columns="${sub.entityName?uncap_first}Table.columns"
:dataSource="${sub.entityName?uncap_first}Table.dataSource"
@ -75,7 +76,8 @@
const ${sub.entityName?uncap_first}Table = reactive({
loading: false,
dataSource: [],
columns:${sub.entityName?uncap_first}Columns
columns:${sub.entityName?uncap_first}Columns,
show: false
})
</#if>
</#list>
@ -131,7 +133,9 @@
</#list>
<#list subTables as sub><#rt/>
<#if sub.foreignRelationType =='0'>
requestSubTableData(${sub.entityName?uncap_first}List, {id: data.id}, ${sub.entityName?uncap_first}Table)
requestSubTableData(${sub.entityName?uncap_first}List, {id: data.id}, ${sub.entityName?uncap_first}Table, ()=>{
${sub.entityName?uncap_first}Table.show = true;
})
</#if>
</#list>
// 隐藏底部时禁用整个表单
@ -147,7 +151,11 @@
let minHeight = '100px'
let maxHeight: Nullable<string> = '500px'
// 弹窗wrapper
return {height, minHeight, maxHeight}
<#-- update-begin-author:taoyan date:2022-11-14 for:VUEN-2674 【代码生成】对接流程表单 附加单据显示问题 5.多tab生成代码后新增 没有滚动条,只能填写部分字段 -->
let overflow = 'auto';
return {height, minHeight, maxHeight, overflow};
<#-- update-end-author:taoyan date:2022-11-14 for:VUEN-2674 【代码生成】对接流程表单 附加单据显示问题 5.多tab生成代码后新增 没有滚动条,只能填写部分字段 -->
})
async function reset(){

@ -128,7 +128,10 @@
maxHeight = null
}
}
return {height, minHeight, maxHeight}
<#-- update-begin-author:taoyan date:2022-11-14 for:VUEN-2674 【代码生成】对接流程表单 附加单据显示问题 5.多tab生成代码后新增 没有滚动条,只能填写部分字段 -->
let overflow = 'auto';
return {height, minHeight, maxHeight, overflow};
<#-- update-end-author:taoyan date:2022-11-14 for:VUEN-2674 【代码生成】对接流程表单 附加单据显示问题 5.多tab生成代码后新增 没有滚动条,只能填写部分字段 -->
})
async function reset(){

Loading…
Cancel
Save