|
|
|
|
@ -81,10 +81,12 @@
|
|
|
|
|
|
|
|
|
|
<ContentWrap>
|
|
|
|
|
<el-table
|
|
|
|
|
ref="tableRef"
|
|
|
|
|
v-loading="loading"
|
|
|
|
|
:data="list"
|
|
|
|
|
:stripe="true"
|
|
|
|
|
:show-overflow-tooltip="true"
|
|
|
|
|
:max-height="planTableMaxHeight"
|
|
|
|
|
row-key="id"
|
|
|
|
|
@selection-change="handleSelectionChange"
|
|
|
|
|
>
|
|
|
|
|
@ -152,6 +154,18 @@ const { t } = useI18n()
|
|
|
|
|
const loading = ref(true)
|
|
|
|
|
const list = ref<ProcessParameterVO[]>([])
|
|
|
|
|
const total = ref(0)
|
|
|
|
|
const tableRef = ref()
|
|
|
|
|
const planTableMaxHeight = ref(520)
|
|
|
|
|
const planPaginationRef = ref<HTMLElement>()
|
|
|
|
|
|
|
|
|
|
const updatePlanTableMaxHeight = async () => {
|
|
|
|
|
await nextTick()
|
|
|
|
|
const tableTop = tableRef.value?.$el?.getBoundingClientRect().top ?? 0
|
|
|
|
|
const paginationHeight = planPaginationRef.value?.getBoundingClientRect().height ?? 72
|
|
|
|
|
const pageBottomGap = 56
|
|
|
|
|
const availableHeight = window.innerHeight - tableTop - paginationHeight - pageBottomGap
|
|
|
|
|
planTableMaxHeight.value = Math.min(window.innerHeight, Math.max(240, Math.floor(availableHeight)))
|
|
|
|
|
}
|
|
|
|
|
const queryParams = reactive({
|
|
|
|
|
pageNo: 1,
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
@ -168,6 +182,7 @@ const filterCount = 4
|
|
|
|
|
|
|
|
|
|
const toggleFilters = () => {
|
|
|
|
|
showAllFilters.value = !showAllFilters.value
|
|
|
|
|
updatePlanTableMaxHeight()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const getList = async () => {
|
|
|
|
|
@ -178,6 +193,7 @@ const getList = async () => {
|
|
|
|
|
total.value = data.total
|
|
|
|
|
} finally {
|
|
|
|
|
loading.value = false
|
|
|
|
|
updatePlanTableMaxHeight()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -227,5 +243,11 @@ const handleExport = async () => {
|
|
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
getList()
|
|
|
|
|
updatePlanTableMaxHeight()
|
|
|
|
|
window.addEventListener("resize", updatePlanTableMaxHeight)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
onBeforeUnmount(() => {
|
|
|
|
|
window.removeEventListener("resize", updatePlanTableMaxHeight)
|
|
|
|
|
})
|
|
|
|
|
</script>
|
|
|
|
|
|