|
|
|
|
@ -81,10 +81,12 @@
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<el-table
|
|
|
|
|
ref="tableRef"
|
|
|
|
|
v-loading="loading"
|
|
|
|
|
:data="list"
|
|
|
|
|
:stripe="true"
|
|
|
|
|
:show-overflow-tooltip="true"
|
|
|
|
|
:max-height="planTableMaxHeight"
|
|
|
|
|
row-key="id"
|
|
|
|
|
@selection-change="handleSelectionChange"
|
|
|
|
|
@row-click="handleRowClick"
|
|
|
|
|
@ -231,6 +233,18 @@ const jobResultOptions = [
|
|
|
|
|
const loading = ref(true)
|
|
|
|
|
const list = ref<TicketManagementVO[]>([])
|
|
|
|
|
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 selectedIds = ref<number[]>([])
|
|
|
|
|
const cancelLoading = ref(false)
|
|
|
|
|
const exportLoading = ref(false)
|
|
|
|
|
@ -259,6 +273,7 @@ const showAllFilters = ref(false)
|
|
|
|
|
const filterCount = 4
|
|
|
|
|
const toggleFilters = () => {
|
|
|
|
|
showAllFilters.value = !showAllFilters.value
|
|
|
|
|
updatePlanTableMaxHeight()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const getList = async () => {
|
|
|
|
|
@ -269,6 +284,7 @@ const getList = async () => {
|
|
|
|
|
total.value = data.total
|
|
|
|
|
} finally {
|
|
|
|
|
loading.value = false
|
|
|
|
|
updatePlanTableMaxHeight()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -352,5 +368,11 @@ const handleResultSuccess = async () => {
|
|
|
|
|
onMounted(async () => {
|
|
|
|
|
await dictStore.setDictMap()
|
|
|
|
|
await getList()
|
|
|
|
|
updatePlanTableMaxHeight()
|
|
|
|
|
window.addEventListener("resize", updatePlanTableMaxHeight)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
onBeforeUnmount(() => {
|
|
|
|
|
window.removeEventListener("resize", updatePlanTableMaxHeight)
|
|
|
|
|
})
|
|
|
|
|
</script>
|
|
|
|
|
|