|
|
@ -89,6 +89,8 @@ |
|
|
|
<TableForm |
|
|
|
ref="tableFormRef" |
|
|
|
class="w-[100%]" |
|
|
|
:fixedScrollHieght="fixedScrollHieght" |
|
|
|
:maxHeight="fixedScrollHieght?'auto':490" |
|
|
|
:tableFields="tableAllSchemas.tableFormColumns" |
|
|
|
:tableData="tableData" |
|
|
|
:tableFormRules="tableFormRules" |
|
|
@ -137,6 +139,7 @@ |
|
|
|
</div> |
|
|
|
<div v-if="includeCollectionTable&&formType=='create'&&tableAllSchemas&&tableAllSchemas.tableFormColumns.find(item=>item.field == 'itemCode')" v-show="tabSheet=='CollectionTable'"> |
|
|
|
<CollectionTable |
|
|
|
:fixedScrollHieght="fixedScrollHieght" |
|
|
|
:tableFields="tableAllSchemas?tableAllSchemas.tableFormColumns:[]" |
|
|
|
:tableData="tableData" |
|
|
|
></CollectionTable> |
|
|
@ -381,6 +384,11 @@ const props = defineProps({ |
|
|
|
type:Boolean, |
|
|
|
default:false |
|
|
|
}, |
|
|
|
//滚动高度 |
|
|
|
fixedScrollHieght:{ |
|
|
|
type:Boolean, |
|
|
|
default:false |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
const { t } = useI18n() // 国际化 |
|
|
@ -394,13 +402,24 @@ if (props.basicFormWidth) { |
|
|
|
|
|
|
|
const collectionRef = ref() |
|
|
|
const updateFullscreen = (isFullscreen) => { |
|
|
|
formHeight.value.height = isFullscreen ? 'auto' : '60vh' |
|
|
|
nextTick(()=>{ |
|
|
|
tableFormRef.value?.reloadFullscreen(isFullscreen) |
|
|
|
collectionRef.value?.reloadFullscreen(isFullscreen) |
|
|
|
|
|
|
|
}) |
|
|
|
if(props.fixedScrollHieght){ |
|
|
|
formHeight.value.height = isFullscreen ? 'auto' : '60vh' |
|
|
|
nextTick(()=>{ |
|
|
|
tableFormRef.value?.reloadFullscreen(isFullscreen) |
|
|
|
collectionRef.value?.reloadFullscreen(isFullscreen) |
|
|
|
}) |
|
|
|
}else{ |
|
|
|
if(isFullscreen){ |
|
|
|
formHeight.value = { |
|
|
|
'max-height':'100%', |
|
|
|
} |
|
|
|
}else{ |
|
|
|
formHeight.value = { |
|
|
|
'max-height': '60vh' |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const dialogVisible = ref(false) // 弹窗的是否展示 |
|
|
@ -417,23 +436,14 @@ const routeName = ref('') |
|
|
|
const sureDisabled = ref(false) |
|
|
|
const tabSheet = ref('TableForm') |
|
|
|
routeName.value = route.name |
|
|
|
const formHeight = ref({ |
|
|
|
'max-height': '60vh' |
|
|
|
}) |
|
|
|
const formHeight = ref({}) |
|
|
|
|
|
|
|
|
|
|
|
const tabChange = (item) => { |
|
|
|
tabSheet.value = item.prop |
|
|
|
} |
|
|
|
|
|
|
|
// if(!props.tableAllSchemas||formType.value!='create'){ |
|
|
|
// formHeight.value = { |
|
|
|
// height:'auto' |
|
|
|
// } |
|
|
|
// }else{ |
|
|
|
// formHeight.value = { |
|
|
|
// height:'60vh' |
|
|
|
// } |
|
|
|
// } |
|
|
|
|
|
|
|
// 列表-按钮 |
|
|
|
// const buttondata = [ |
|
|
|
// defaultButtons.mainListEditBtn(null), // 编辑 |
|
|
@ -683,15 +693,24 @@ const open = async ( |
|
|
|
dialogTitle.value = t('action.' + type) |
|
|
|
} |
|
|
|
formType.value = type |
|
|
|
// if(!props.tableAllSchemas||formType.value!='create'){ |
|
|
|
// formHeight.value = { |
|
|
|
// height:'auto' |
|
|
|
// } |
|
|
|
// }else{ |
|
|
|
// formHeight.value = { |
|
|
|
// height:'60vh' |
|
|
|
// } |
|
|
|
// } |
|
|
|
|
|
|
|
if(props.fixedScrollHieght){ |
|
|
|
if(!props.tableAllSchemas||formType.value!='create'){ |
|
|
|
formHeight.value = { |
|
|
|
height:'auto' |
|
|
|
} |
|
|
|
}else{ |
|
|
|
formHeight.value = { |
|
|
|
height:'70vh' |
|
|
|
} |
|
|
|
} |
|
|
|
}else{ |
|
|
|
formHeight.value = { |
|
|
|
'max-height': '60vh' |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
resetForm() |
|
|
|
count.value = 0 |
|
|
|
// 修改时,设置数据 |
|
|
|