黄伟杰 3 days ago
commit 13fa9154b1

@ -61,7 +61,7 @@
<!-- 列表 -->
<ContentWrap>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" ref="tableRef" :max-height="planTableMaxHeight">
<!-- 子表的列表 -->
<el-table-column type="expand">
<template #default="scope">
@ -149,6 +149,18 @@ const { t } = useI18n()
const loading = ref(true)
const list = ref<AutocodeRuleVO[]>([])
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,
@ -172,6 +184,7 @@ const formVisible = ref(false)
/** 切换筛选框展开/折叠 */
const toggleFilters = () => {
showAllFilters.value = !showAllFilters.value
updatePlanTableMaxHeight()
}
const getBarcodeTypeLabel = (value: any) => {
@ -190,6 +203,7 @@ const getList = async () => {
total.value = data.total
} finally {
loading.value = false
updatePlanTableMaxHeight()
}
}
@ -248,5 +262,11 @@ const handleExport = async () => {
/** 初始化 **/
onMounted(() => {
getList()
updatePlanTableMaxHeight()
window.addEventListener('resize', updatePlanTableMaxHeight)
})
onBeforeUnmount(() => {
window.removeEventListener('resize', updatePlanTableMaxHeight)
})
</script>

@ -48,7 +48,7 @@
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" row-key="id"
<el-table ref="tableRef" v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" :max-height="planTableMaxHeight" row-key="id"
style="margin-top: 16px;">
<el-table-column :label="t('MoldManagement.MoldBrandPage.image')" align="center" width="120">
<template #default="scope">
@ -168,6 +168,18 @@ const loading = ref(false)
const exportLoading = ref(false)
const list = ref<MoldBrandVO[]>([])
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 productOptions = ref<ProductVO[]>([])
const deviceOptions = ref<DeviceLedgerVO[]>([])
const currentStatusKey = ref('all')
@ -259,6 +271,7 @@ const getList = async () => {
normalizePageResult(data)
} finally {
loading.value = false
updatePlanTableMaxHeight()
}
}
@ -422,6 +435,8 @@ onMounted(async () => {
productOptions.value = await ProductApi.getMesProductSimpleList()
deviceOptions.value = await DeviceLedgerApi.getDeviceLedgerList()
await getList()
updatePlanTableMaxHeight()
window.addEventListener("resize", updatePlanTableMaxHeight)
//
const { operateType: queryOperateType, moldId: queryMoldId } = route.query
@ -434,6 +449,10 @@ onMounted(async () => {
push({ path: route.path })
}
})
onBeforeUnmount(() => {
window.removeEventListener("resize", updatePlanTableMaxHeight)
})
</script>
<style scoped>

@ -74,6 +74,8 @@
:data="list"
:stripe="true"
:show-overflow-tooltip="true"
ref="tableRef"
:max-height="planTableMaxHeight"
row-key="id"
:default-expand-all="isExpandAll"
v-if="refreshTable"
@ -144,6 +146,19 @@ const { t } = useI18n() // 国际化
const loading = ref(true) //
const list = ref<ProductCategoryVO[]>([]) //
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 activeTab = ref('') // tab
const queryParams = reactive({
name: undefined,
@ -161,6 +176,7 @@ const getList = async () => {
list.value = handleTree(data, 'id', 'parentId')
} finally {
loading.value = false
updatePlanTableMaxHeight()
}
}
@ -236,5 +252,11 @@ onMounted(() => {
queryParams.type = typeOptions[0].value
}
getList()
updatePlanTableMaxHeight()
window.addEventListener('resize', updatePlanTableMaxHeight)
})
onBeforeUnmount(() => {
window.removeEventListener('resize', updatePlanTableMaxHeight)
})
</script>

@ -82,7 +82,7 @@
<!-- 右侧产品表格 -->
<div class="product-page-right">
<ContentWrap>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" :row-class-name="getRowClassName">
<el-table ref="tableRef" v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" :max-height="planTableMaxHeight" :row-class-name="getRowClassName">
<el-table-column :label="t('FactoryModeling.ProductInformation.tableBarCodeColumn')" align="center" prop="barCode"
sortable />
<el-table-column :label="t('FactoryModeling.ProductInformation.dialogCategoryTypeLabel')" align="center" prop="categoryType" sortable>
@ -329,6 +329,18 @@ const { t } = useI18n()
const loading = ref(true)
const list = ref<ProductVO[]>([])
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,
@ -420,6 +432,7 @@ const getList = async () => {
}
} finally {
loading.value = false
updatePlanTableMaxHeight()
}
}
@ -475,6 +488,12 @@ onMounted(async () => {
queryParams.categoryType = typeOptions[0].value
}
await getList()
updatePlanTableMaxHeight()
window.addEventListener('resize', updatePlanTableMaxHeight)
})
onBeforeUnmount(() => {
window.removeEventListener('resize', updatePlanTableMaxHeight)
})
const bomFormRef = ref()

@ -74,7 +74,7 @@
<!-- 列表 -->
<ContentWrap>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" ref="tableRef" :max-height="planTableMaxHeight">
<el-table-column
:label="t('FactoryModeling.ProductUnit.tableNameColumn')"
align="center"
@ -157,6 +157,19 @@ const { t } = useI18n() // 国际化
const loading = ref(true) //
const list = ref<ProductUnitVO[]>([]) //
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 total = ref(0) //
const queryParams = reactive({
pageNo: 1,
@ -176,6 +189,7 @@ const getList = async () => {
total.value = data.total
} finally {
loading.value = false
updatePlanTableMaxHeight()
}
}
@ -234,5 +248,11 @@ const handleExport = async () => {
/** 初始化 **/
onMounted(() => {
getList()
updatePlanTableMaxHeight()
window.addEventListener('resize', updatePlanTableMaxHeight)
})
onBeforeUnmount(() => {
window.removeEventListener('resize', updatePlanTableMaxHeight)
})
</script>

@ -63,7 +63,7 @@
<!-- 列表 -->
<ContentWrap>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
<el-table ref="tableRef" v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" :max-height="planTableMaxHeight">
<el-table-column label="名称" align="center" prop="name" sortable />
<el-table-column label="联系人" align="center" prop="contact" />
<el-table-column label="手机号码" align="center" prop="mobile" />
@ -126,6 +126,18 @@ const { t } = useI18n() // 国际化
const loading = ref(true) //
const list = ref<SupplierVO[]>([]) //
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,
@ -145,6 +157,7 @@ const getList = async () => {
total.value = data.total
} finally {
loading.value = false
updatePlanTableMaxHeight()
}
}
@ -197,5 +210,11 @@ const handleExport = async () => {
/** 初始化 **/
onMounted(() => {
getList()
updatePlanTableMaxHeight()
window.addEventListener('resize', updatePlanTableMaxHeight)
})
onBeforeUnmount(() => {
window.removeEventListener('resize', updatePlanTableMaxHeight)
})
</script>

@ -90,9 +90,11 @@
<ContentWrap>
<el-table
ref="tableRef"
v-loading="loading"
:data="list"
stripe
:max-height="planTableMaxHeight"
row-key="id"
@selection-change="handleSelectionChange"
>
@ -278,6 +280,18 @@ const message = useMessage()
const loading = ref(false)
const list = ref<StockCheckVO[]>([])
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 warehouseList = ref<WarehouseVO[]>([])
const selectionList = ref<StockCheckVO[]>([])
const queryFormRef = ref()
@ -319,6 +333,7 @@ const getList = async () => {
total.value = data?.total || 0
} finally {
loading.value = false
updatePlanTableMaxHeight()
}
}
@ -455,5 +470,11 @@ onMounted(async () => {
])
warehouseList.value = warehouses || []
await getList()
updatePlanTableMaxHeight()
window.addEventListener('resize', updatePlanTableMaxHeight)
})
onBeforeUnmount(() => {
window.removeEventListener('resize', updatePlanTableMaxHeight)
})
</script>

@ -156,10 +156,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"
>
@ -250,6 +252,18 @@ const dictStore = useDictStoreWithOut()
const loading = ref(false)
const list = ref<StockCheckRecordVO[]>([])
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 queryFormRef = ref()
const productList = ref<ProductVO[]>([])
const warehouseList = ref<WarehouseVO[]>([])
@ -283,6 +297,7 @@ const filteredAreaList = computed(() => {
const toggleFilters = () => {
showAllFilters.value = !showAllFilters.value
updatePlanTableMaxHeight()
}
const buildQueryParams = () => {
@ -302,6 +317,7 @@ const getList = async () => {
total.value = data?.total || 0
} finally {
loading.value = false
updatePlanTableMaxHeight()
}
}
@ -414,6 +430,12 @@ onMounted(async () => {
})
])
await getList()
updatePlanTableMaxHeight()
window.addEventListener('resize', updatePlanTableMaxHeight)
})
onBeforeUnmount(() => {
window.removeEventListener('resize', updatePlanTableMaxHeight)
})
</script>

@ -157,10 +157,12 @@
</el-tabs>
<el-table
ref="tableRef"
v-loading="loading"
:data="list"
:stripe="true"
:show-overflow-tooltip="true"
:max-height="planTableMaxHeight"
@selection-change="handleSelectionChange"
>
<el-table-column width="30" :label="t('common.select')" type="selection" />
@ -337,6 +339,18 @@ const { t } = useI18n() // 国际化
const loading = ref(true) //
const list = ref<StockInVO[]>([]) //
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,
@ -367,6 +381,7 @@ const useInitialStatusFilter = ref(true)
const filterCount = 7
const toggleFilters = () => {
showAllFilters.value = !showAllFilters.value
updatePlanTableMaxHeight()
}
const productList = ref<ProductVO[]>([]) //
const warehouseList = ref<WarehouseVO[]>([]) //
@ -413,6 +428,7 @@ const getList = async () => {
total.value = data.total
} finally {
loading.value = false
updatePlanTableMaxHeight()
}
}
@ -568,12 +584,18 @@ watch(stockInTypeOptions, (options) => {
onMounted(async () => {
syncDefaultInType()
await getList()
updatePlanTableMaxHeight()
window.addEventListener('resize', updatePlanTableMaxHeight)
//
productList.value = await ProductApi.getProductSimpleList()
warehouseList.value = await WarehouseApi.getWarehouseSimpleList()
supplierList.value = await SupplierApi.getSupplierSimpleList()
userList.value = await UserApi.getSimpleUserList()
})
onBeforeUnmount(() => {
window.removeEventListener('resize', updatePlanTableMaxHeight)
})
const handleTabClick = (tab: TabsPaneContext) => {
queryParams.inType = String(tab.paneName || '')
activeName.value = queryParams.inType

@ -132,10 +132,12 @@
<!-- 列表 -->
<ContentWrap>
<el-table
ref="tableRef"
v-loading="loading"
:data="list"
:stripe="true"
:show-overflow-tooltip="true"
:max-height="planTableMaxHeight"
@selection-change="handleSelectionChange"
>
<el-table-column :label="t('action.select')" type="selection" />
@ -298,6 +300,18 @@ const { t } = useI18n() // 国际化
const loading = ref(true) //
const list = ref<StockMoveVO[]>([]) //
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,
@ -351,6 +365,7 @@ const getList = async () => {
total.value = data.total
} finally {
loading.value = false
updatePlanTableMaxHeight()
}
}
@ -474,11 +489,17 @@ const handleSelectionChange = (rows: StockMoveVO[]) => {
/** 初始化 **/
onMounted(async () => {
await getList()
updatePlanTableMaxHeight()
window.addEventListener('resize', updatePlanTableMaxHeight)
//
productList.value = await ProductApi.getProductSimpleList()
warehouseList.value = await WarehouseApi.getWarehouseSimpleList()
userList.value = await UserApi.getSimpleUserList()
})
onBeforeUnmount(() => {
window.removeEventListener('resize', updatePlanTableMaxHeight)
})
// TODO
// TODO
</script>

@ -157,10 +157,12 @@
</el-tabs>
<el-table
ref="tableRef"
v-loading="loading"
:data="list"
:stripe="true"
:show-overflow-tooltip="true"
:max-height="planTableMaxHeight"
@selection-change="handleSelectionChange"
>
<el-table-column width="30" :label="t('common.select')" type="selection" />
@ -336,6 +338,18 @@ const { t } = useI18n() // 鍥介檯鍖?
const loading = ref(true) //
const list = ref<StockOutVO[]>([]) // ?
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,
@ -367,6 +381,7 @@ const useInitialStatusFilter = ref(true)
const filterCount = 7
const toggleFilters = () => {
showAllFilters.value = !showAllFilters.value
updatePlanTableMaxHeight()
}
const productList = ref<ProductVO[]>([]) // у
const warehouseList = ref<WarehouseVO[]>([]) //
@ -412,6 +427,7 @@ const getList = async () => {
total.value = data.total
} finally {
loading.value = false
updatePlanTableMaxHeight()
}
}
@ -566,11 +582,17 @@ watch(stockOutTypeOptions, (options) => {
onMounted(async () => {
syncDefaultOutType()
await getList()
updatePlanTableMaxHeight()
window.addEventListener('resize', updatePlanTableMaxHeight)
// у
productList.value = await ProductApi.getProductSimpleList()
warehouseList.value = await WarehouseApi.getWarehouseSimpleList()
userList.value = await UserApi.getSimpleUserList()
})
onBeforeUnmount(() => {
window.removeEventListener('resize', updatePlanTableMaxHeight)
})
const handleTabClick = (tab: TabsPaneContext) => {
queryParams.outType = String(tab.paneName || '')
activeName.value = queryParams.outType

@ -60,10 +60,12 @@
<!-- 列表 -->
<ContentWrap>
<el-table
ref="tableRef"
v-loading="loading"
:data="list"
:stripe="true"
:show-overflow-tooltip="true"
:max-height="planTableMaxHeight"
>
<el-table-column :label="t('ErpStock.PackagingScheme.code')" align="center" prop="code" sortable />
<el-table-column :label="t('ErpStock.PackagingScheme.name')" align="center" prop="name" sortable />
@ -133,6 +135,18 @@ const { t } = useI18n()
const loading = ref(true)
const list = ref<PackagingSchemeVO[]>([])
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,
@ -151,6 +165,7 @@ const getList = async () => {
total.value = data.total
} finally {
loading.value = false
updatePlanTableMaxHeight()
}
}
@ -185,5 +200,11 @@ const handleDelete = async (id: number) => {
/** 初始化 **/
onMounted(() => {
getList()
updatePlanTableMaxHeight()
window.addEventListener('resize', updatePlanTableMaxHeight)
})
onBeforeUnmount(() => {
window.removeEventListener('resize', updatePlanTableMaxHeight)
})
</script>

@ -57,7 +57,7 @@
</ContentWrap>
<ContentWrap>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" row-key="id">
<el-table ref="tableRef" v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" :max-height="planTableMaxHeight" row-key="id">
<el-table-column :label="t('ErpStock.Pallet.code')" align="center" prop="code" min-width="150" sortable />
<el-table-column :label="t('ErpStock.Pallet.palletType')" align="center" prop="palletType" min-width="100">
<template #default="scope">
@ -128,6 +128,18 @@ const message = useMessage()
const loading = ref(true)
const list = ref<PalletVO[]>([])
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,
@ -151,6 +163,7 @@ const filteredAreaList = computed(() => {
const toggleFilters = () => {
showAllFilters.value = !showAllFilters.value
updatePlanTableMaxHeight()
}
const getWarehouseName = (warehouseId: number) => {
@ -174,6 +187,7 @@ const getList = async () => {
total.value = data.total ?? 0
} finally {
loading.value = false
updatePlanTableMaxHeight()
}
}
@ -218,5 +232,11 @@ onMounted(() => {
getWarehouseList()
getAreaList()
getList()
updatePlanTableMaxHeight()
window.addEventListener('resize', updatePlanTableMaxHeight)
})
onBeforeUnmount(() => {
window.removeEventListener('resize', updatePlanTableMaxHeight)
})
</script>

@ -65,7 +65,7 @@
<el-tab-pane v-for="item in categoryTypeOptions" :key="item.value" :label="item.label"
:name="String(item.value)" />
</el-tabs>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" row-key="id"
<el-table ref="tableRef" v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" :max-height="planTableMaxHeight" row-key="id"
@selection-change="handleSelectionChange">
<el-table-column width="30" :label="t('action.select')" type="selection" />
<el-table-column :label="t('ErpStock.Record.bizNo')" align="center" prop="bizNo" min-width="180" sortable />
@ -130,6 +130,18 @@ const dictStore = useDictStoreWithOut()
const loading = ref(true) //
const list = ref<StockRecordVO[]>([]) //
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: number
pageSize: number
@ -156,6 +168,7 @@ const activeName = ref('')
const filterCount = 5
const toggleFilters = () => {
showAllFilters.value = !showAllFilters.value
updatePlanTableMaxHeight()
}
const productList = ref<ProductVO[]>([]) //
const warehouseList = ref<WarehouseVO[]>([]) //
@ -212,6 +225,7 @@ const getList = async () => {
total.value = data.total
} finally {
loading.value = false
updatePlanTableMaxHeight()
}
}
@ -289,10 +303,16 @@ onActivated(() => {
onMounted(async () => {
await dictStore.setDictMap()
await getList()
updatePlanTableMaxHeight()
window.addEventListener('resize', updatePlanTableMaxHeight)
//
productList.value = await ProductApi.getProductSimpleList()
warehouseList.value = await WarehouseApi.getWarehouseSimpleList()
})
onBeforeUnmount(() => {
window.removeEventListener('resize', updatePlanTableMaxHeight)
})
</script>
<style scoped lang="scss">

@ -80,10 +80,12 @@
/>
</el-tabs>
<el-table
ref="tableRef"
v-loading="loading"
:data="list"
:stripe="true"
:show-overflow-tooltip="true"
:max-height="planTableMaxHeight"
row-key="id"
@selection-change="handleSelectionChange"
>
@ -193,6 +195,18 @@ const dictStore = useDictStoreWithOut()
const loading = ref(true) //
const list = ref<StockVO[]>([]) //
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: number
pageSize: number
@ -281,6 +295,7 @@ const getList = async () => {
total.value = data.total
} finally {
loading.value = false
updatePlanTableMaxHeight()
}
}
@ -356,10 +371,16 @@ const handleSelectionChange = (rows: StockVO[]) => {
onMounted(async () => {
await dictStore.setDictMap()
await getList()
updatePlanTableMaxHeight()
window.addEventListener('resize', updatePlanTableMaxHeight)
//
await getProductList()
warehouseList.value = await WarehouseApi.getWarehouseSimpleList()
})
onBeforeUnmount(() => {
window.removeEventListener('resize', updatePlanTableMaxHeight)
})
</script>
<style scoped>

@ -82,10 +82,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"
>
@ -267,6 +269,18 @@ const { t } = useI18n() // 国际化
const loading = ref(true) //
const list = ref<WarehouseVO[]>([]) //
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,
@ -280,6 +294,7 @@ const showAllFilters = ref(false)
const filterCount = 2
const toggleFilters = () => {
showAllFilters.value = !showAllFilters.value
updatePlanTableMaxHeight()
}
const detailDialogVisible = ref(false) //
const detailData = ref<WarehouseVO | null>(null) //
@ -294,6 +309,7 @@ const getList = async () => {
total.value = data.total
} finally {
loading.value = false
updatePlanTableMaxHeight()
}
}
@ -390,5 +406,11 @@ const handleSelectionChange = (rows: WarehouseVO[]) => {
/** 初始化 **/
onMounted(() => {
getList()
updatePlanTableMaxHeight()
window.addEventListener('resize', updatePlanTableMaxHeight)
})
onBeforeUnmount(() => {
window.removeEventListener('resize', updatePlanTableMaxHeight)
})
</script>

@ -79,10 +79,12 @@
<ContentWrap>
<el-table
ref="tableRef"
v-loading="loading"
:data="list"
:stripe="true"
:show-overflow-tooltip="true"
:max-height="planTableMaxHeight"
row-key="id"
>
<el-table-column :label="t('ErpStock.WarehouseArea.warehouseId')" align="center" prop="warehouseId" sortable>
@ -147,6 +149,18 @@ const { t } = useI18n()
const loading = ref(true)
const list = ref<WarehouseAreaVO[]>([])
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,
@ -160,6 +174,7 @@ const showAllFilters = ref(false)
const filterCount = 4
const toggleFilters = () => {
showAllFilters.value = !showAllFilters.value
updatePlanTableMaxHeight()
}
const warehouseList = ref<any[]>([])
@ -175,6 +190,7 @@ const getList = async () => {
total.value = data.total
} finally {
loading.value = false
updatePlanTableMaxHeight()
}
}
@ -209,5 +225,11 @@ const handleDelete = async (id: number) => {
onMounted(() => {
getWarehouseList()
getList()
updatePlanTableMaxHeight()
window.addEventListener('resize', updatePlanTableMaxHeight)
})
onBeforeUnmount(() => {
window.removeEventListener('resize', updatePlanTableMaxHeight)
})
</script>

@ -94,7 +94,7 @@
<ContentWrap>
<div v-show="currentView === 'table'" class="simple-table-view">
<el-table
ref="tableRef" v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" row-key="id"
ref="tableRef" v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" :max-height="planTableMaxHeight" row-key="id"
@selection-change="handleSelectionChange" @row-click="handleShowAttribute">
<el-table-column type="selection" width="55" reserve-selection />
<el-table-column :label="t('DataCollection.Device.deviceCode')" align="left" prop="deviceCode" sortable/>
@ -923,6 +923,17 @@ const message = useMessage() // 消息弹窗
const { t } = useI18n() //
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 loading = ref(true) //
const showDetailForm =ref(true)
@ -1085,6 +1096,7 @@ const getList = async (showLoading = true) => {
if (showLoading) {
loading.value = false
}
updatePlanTableMaxHeight()
}
}
@ -1903,6 +1915,8 @@ const stopDeviceTimer = () => {
onMounted(() => {
getList()
startDeviceTimer()
updatePlanTableMaxHeight()
window.addEventListener('resize', updatePlanTableMaxHeight)
})
onActivated(() => {
@ -1915,6 +1929,7 @@ onDeactivated(() => {
onBeforeUnmount(() => {
stopDeviceTimer()
window.removeEventListener('resize', updatePlanTableMaxHeight)
})
const deviceAlarmDialogVisible = ref(false)

@ -93,6 +93,7 @@
:data="list"
:stripe="true"
:show-overflow-tooltip="true"
:max-height="planTableMaxHeight"
row-key="id"
@selection-change="handleSelectionChange"
>
@ -158,7 +159,17 @@ const message = useMessage() // 消息弹窗
const { t } = useI18n() //
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 loading = ref(true) //
const list = ref<DeviceAttributeTypeVO[]>([]) //
const total = ref(0) //
@ -187,6 +198,7 @@ const getList = async () => {
total.value = data.total
} finally {
loading.value = false
updatePlanTableMaxHeight()
}
}
@ -261,5 +273,11 @@ const handleExport = async () => {
/** 初始化 **/
onMounted(() => {
getList()
updatePlanTableMaxHeight()
window.addEventListener('resize', updatePlanTableMaxHeight)
})
onBeforeUnmount(() => {
window.removeEventListener('resize', updatePlanTableMaxHeight)
})
</script>

@ -72,6 +72,8 @@
:data="list"
:stripe="true"
:show-overflow-tooltip="true"
ref="tableRef"
:max-height="planTableMaxHeight"
row-key="id"
@selection-change="handleSelectionChange"
>
@ -155,12 +157,26 @@ const { t } = useI18n()
const loading = ref(true)
const list = ref<LineDeviceVO[]>([])
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 total = ref(0)
const exportLoading = ref(false)
const showAllFilters = ref(false)
const filterCount = 4
const toggleFilters = () => {
showAllFilters.value = !showAllFilters.value
updatePlanTableMaxHeight()
}
const queryParams = reactive({
pageNo: 1,
@ -217,6 +233,7 @@ const getList = async () => {
total.value = data.total
} finally {
loading.value = false
updatePlanTableMaxHeight()
}
}
@ -263,6 +280,12 @@ const handleSingleAnalyseView = (row: LineDeviceVO) => {
onMounted(() => {
getList()
updatePlanTableMaxHeight()
window.addEventListener('resize', updatePlanTableMaxHeight)
})
onBeforeUnmount(() => {
window.removeEventListener('resize', updatePlanTableMaxHeight)
})
const activatedOnce = ref(false)

@ -72,6 +72,8 @@
:data="list"
:stripe="true"
:show-overflow-tooltip="true"
ref="tableRef"
:max-height="planTableMaxHeight"
row-key="id"
@selection-change="handleSelectionChange"
>
@ -160,12 +162,26 @@ const { t } = useI18n()
const loading = ref(true)
const list = ref<LineDeviceVO[]>([])
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 total = ref(0)
const exportLoading = ref(false)
const showAllFilters = ref(false)
const filterCount = 4
const toggleFilters = () => {
showAllFilters.value = !showAllFilters.value
updatePlanTableMaxHeight()
}
const queryParams = reactive({
pageNo: 1,
@ -217,6 +233,7 @@ const getList = async () => {
total.value = data.total
} finally {
loading.value = false
updatePlanTableMaxHeight()
}
}
@ -260,6 +277,12 @@ const handleExport = async () => {
onMounted(() => {
getList()
updatePlanTableMaxHeight()
window.addEventListener('resize', updatePlanTableMaxHeight)
})
onBeforeUnmount(() => {
window.removeEventListener('resize', updatePlanTableMaxHeight)
})
</script>

@ -53,7 +53,7 @@
</ContentWrap>
<ContentWrap>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" row-key="id">
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" :max-height="planTableMaxHeight" row-key="id">
<el-table-column
:label="t('DataCollection.RunReport.tableDeviceCodeColumn')"
align="left"
@ -150,6 +150,19 @@ const { t } = useI18n()
const loading = ref(false)
const list = ref<DeviceOperationRecordVO[]>([])
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 total = ref(0)
const exportLoading = ref(false)
@ -191,6 +204,7 @@ const getList = async () => {
total.value = data.total
} finally {
loading.value = false
updatePlanTableMaxHeight()
}
}
@ -219,6 +233,12 @@ const handleExport = async () => {
onMounted(() => {
getList()
updatePlanTableMaxHeight()
window.addEventListener('resize', updatePlanTableMaxHeight)
})
onBeforeUnmount(() => {
window.removeEventListener('resize', updatePlanTableMaxHeight)
})
</script>

@ -89,7 +89,7 @@
<!-- 列表 -->
<ContentWrap>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" ref="tableRef" :max-height="planTableMaxHeight">
<!-- 子表的列表 -->
<el-table-column type="expand">
<template #default="scope">
@ -174,6 +174,18 @@ const { t } = useI18n()
const loading = ref(true)
const list = ref<BomVO[]>([])
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,
@ -195,6 +207,7 @@ const formVisible = ref(false)
/** 切换筛选框展开/折叠 */
const toggleFilters = () => {
showAllFilters.value = !showAllFilters.value
updatePlanTableMaxHeight()
}
/** 查询列表 */
@ -206,6 +219,7 @@ const getList = async () => {
total.value = data.total
} finally {
loading.value = false
updatePlanTableMaxHeight()
}
}
@ -256,6 +270,12 @@ const handleExport = async () => {
/** 初始化 **/
onMounted(async () => {
await getList()
updatePlanTableMaxHeight()
window.addEventListener('resize', updatePlanTableMaxHeight)
productList.value = await ProductApi.getMesProductSimpleList({ categoryType: 1 })
})
onBeforeUnmount(() => {
window.removeEventListener('resize', updatePlanTableMaxHeight)
})
</script>

@ -107,10 +107,12 @@
<ContentWrap>
<el-table
ref="tableRef"
v-loading="loading"
:data="list"
:stripe="true"
:show-overflow-tooltip="true"
:max-height="planTableMaxHeight"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" />
@ -217,8 +219,20 @@ const { t } = useI18n()
const loading = ref(true)
const list = ref<CriticalComponentVO[]>([])
const total = ref(0)
const tableRef = ref()
const planTableMaxHeight = ref(520)
const planPaginationRef = ref<HTMLElement>()
const exportLoading = ref(false)
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,
@ -235,6 +249,7 @@ const showAllFilters = ref(false)
const filterCount = 5
const toggleFilters = () => {
showAllFilters.value = !showAllFilters.value
updatePlanTableMaxHeight()
}
const importDialogVisible = ref(false)
@ -263,6 +278,7 @@ const getList = async () => {
total.value = data.total
} finally {
loading.value = false
updatePlanTableMaxHeight()
}
}
@ -392,5 +408,11 @@ const importTemplate = async () => {
onMounted(() => {
getList()
updatePlanTableMaxHeight()
window.addEventListener('resize', updatePlanTableMaxHeight)
})
onBeforeUnmount(() => {
window.removeEventListener('resize', updatePlanTableMaxHeight)
})
</script>

@ -112,7 +112,7 @@
<el-tab-pane :label="t('MesCustomer.tabs.participant')" name="2" />
<el-tab-pane :label="t('MesCustomer.tabs.subordinate')" name="3" />
</el-tabs> -->
<el-table v-loading="loading" :data="list" :show-overflow-tooltip="true" :stripe="true">
<el-table v-loading="loading" :data="list" :show-overflow-tooltip="true" :stripe="true" ref="tableRef" :max-height="planTableMaxHeight">
<el-table-column align="center" fixed="left" :label="t('MesCustomer.fields.name')" prop="name" width="160" sortable>
<template #default="scope">
<span>{{ scope.row.name }}</span>
@ -237,6 +237,19 @@ const { t } = useI18n() // 国际化
const loading = ref(true) //
const total = ref(0) //
const list = ref([]) //
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,
@ -267,6 +280,7 @@ const getList = async () => {
total.value = data.total
} finally {
loading.value = false
updatePlanTableMaxHeight()
}
}
@ -339,5 +353,11 @@ watch(
/** 初始化 **/
onMounted(() => {
getList()
updatePlanTableMaxHeight()
window.addEventListener('resize', updatePlanTableMaxHeight)
})
onBeforeUnmount(() => {
window.removeEventListener('resize', updatePlanTableMaxHeight)
})
</script>

@ -298,6 +298,7 @@
:data="list"
:stripe="true"
:show-overflow-tooltip="true"
:max-height="planTableMaxHeight"
row-key="id"
@selection-change="handleSelectionChange"
>
@ -693,6 +694,17 @@ const queryFormRef = ref() // 搜索的表单
const exportLoading = ref(false)
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 handleSelectionChange = (rows: any[]) => {
selectedIds.value = rows?.map((row) => row.id).filter((id) => id !== undefined) ?? []
@ -703,6 +715,7 @@ const toggleView = () => {
currentView.value = currentView.value === 'table' ? 'grid' : 'table'
//
localStorage.setItem('equipment-view', currentView.value)
updatePlanTableMaxHeight()
}
const dictStore = useDictStoreWithOut()
@ -1022,6 +1035,7 @@ const getList = async () => {
total.value = data.total
} finally {
loading.value = false
updatePlanTableMaxHeight()
}
}
@ -1100,6 +1114,12 @@ onMounted(async () => {
getDeviceTypeTree()
getTypeTree()
getList()
updatePlanTableMaxHeight()
window.addEventListener('resize', updatePlanTableMaxHeight)
})
onBeforeUnmount(() => {
window.removeEventListener('resize', updatePlanTableMaxHeight)
})
</script>

@ -63,10 +63,12 @@
<!-- 列表 -->
<ContentWrap>
<el-table
ref="tableRef"
v-loading="loading"
:data="list"
:stripe="true"
:show-overflow-tooltip="true"
:max-height="planTableMaxHeight"
row-key="id"
default-expand-all
:tree-props="{ children: 'children' }"
@ -138,6 +140,18 @@ const { t } = useI18n() // 国际化
const loading = ref(true) //
const list = ref<DeviceTypeTreeVO[]>([]) //
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 showPagination = ref(true)
const queryParams = reactive({
pageNo: 1,
@ -177,6 +191,7 @@ const getList = async () => {
showPagination.value = true
} finally {
loading.value = false
updatePlanTableMaxHeight()
}
}
@ -229,5 +244,11 @@ const handleExport = async () => {
/** 初始化 **/
onMounted(() => {
getList()
updatePlanTableMaxHeight()
window.addEventListener('resize', updatePlanTableMaxHeight)
})
onBeforeUnmount(() => {
window.removeEventListener('resize', updatePlanTableMaxHeight)
})
</script>

@ -127,6 +127,7 @@
:data="list"
:stripe="true"
:show-overflow-tooltip="true"
:max-height="planTableMaxHeight"
row-key="id"
@selection-change="handleSelectionChange">
<el-table-column type="selection" width="55px" fixed="left" reserve-selection />
@ -259,6 +260,7 @@ const showAllFilters = ref(false)
const filterCount = 8
const toggleFilters = () => {
showAllFilters.value = !showAllFilters.value
updatePlanTableMaxHeight()
}
const statusOptions = [
@ -308,6 +310,17 @@ const isProcessedRepair = (value: any) => {
}
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 handleSelectionChange = (rows: any[]) => {
selectedIds.value = rows?.map((row) => row.id).filter((id) => id !== undefined) ?? []
@ -322,6 +335,7 @@ const getList = async () => {
total.value = data.total
} finally {
loading.value = false
updatePlanTableMaxHeight()
}
}
@ -399,5 +413,11 @@ const handleExport = async () => {
/** 初始化 **/
onMounted(() => {
getList()
updatePlanTableMaxHeight()
window.addEventListener("resize", updatePlanTableMaxHeight)
})
onBeforeUnmount(() => {
window.removeEventListener("resize", updatePlanTableMaxHeight)
})
</script>

@ -62,8 +62,15 @@
<!-- 列表 -->
<ContentWrap>
<el-table
ref="tableRef" v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" row-key="id"
@selection-change="handleSelectionChange">
ref="tableRef"
v-loading="loading"
:data="list"
:stripe="true"
:show-overflow-tooltip="true"
:max-height="planTableMaxHeight"
row-key="id"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" fixed="left" reserve-selection />
<el-table-column :label="t('common.index')" align="center" width="80" fixed="left">
<template #default="scope">
@ -147,8 +154,19 @@ const loading = ref(true) // 列表的加载中
const list = ref<DvSubjectVO[]>([]) //
const total = ref(0) //
const tableRef = ref()
const planTableMaxHeight = ref(520)
const planPaginationRef = ref<HTMLElement>()
const selectedIds = ref<number[]>([])
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 handleSelectionChange = (rows: any[]) => {
selectedIds.value = rows?.map((row) => row.id).filter((id) => id !== undefined) ?? []
}
@ -206,6 +224,7 @@ const getList = async () => {
total.value = data.total
} finally {
loading.value = false
updatePlanTableMaxHeight()
}
}
@ -274,6 +293,12 @@ const handleExport = async () => {
onMounted(async () => {
await dictStore.setDictMap()
dictReady.value = true
getList()
await getList()
updatePlanTableMaxHeight()
window.addEventListener('resize', updatePlanTableMaxHeight)
})
onBeforeUnmount(() => {
window.removeEventListener('resize', updatePlanTableMaxHeight)
})
</script>

@ -53,10 +53,12 @@ type="success" plain @click="handleExport" :loading="exportLoading"
<!-- 列表 -->
<ContentWrap>
<el-table
ref="tableRef"
v-loading="loading"
:data="list"
:stripe="true"
:show-overflow-tooltip="true"
:max-height="planTableMaxHeight"
highlight-current-row
row-key="id"
@current-change="handleCurrentChange"
@ -165,6 +167,18 @@ const typeList = ref<EnergyTypeVO[]>([]) // 列表
const loading = ref(true) //
const list = ref<EnergyDeviceVO[]>([]) //
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<Array<number | string>>([])
const queryParams = reactive({
pageNo: 1,
@ -195,6 +209,7 @@ const getList = async () => {
}
} finally {
loading.value = false
updatePlanTableMaxHeight()
}
}
@ -268,6 +283,12 @@ const handleCurrentChange = (row) => {
onMounted(async () => {
typeList.value = await EnergyTypeApi.getEnergyTypeList()
getList()
updatePlanTableMaxHeight()
window.addEventListener('resize', updatePlanTableMaxHeight)
})
onBeforeUnmount(() => {
window.removeEventListener('resize', updatePlanTableMaxHeight)
})
/** 添加/修改操作 */

@ -40,6 +40,7 @@ v-model="queryParams.timeRange" type="datetimerange" value-format="YYYY-MM-DD HH
<ContentWrap>
<el-table
ref="tableRef" v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" row-key="id"
:max-height="planTableMaxHeight"
:expand-row-keys="expandRowKeys" :row-class-name="getRowClassName" style=" min-height: 50vh;margin-top: 20px"
@row-click="handleRowClick" @selection-change="handleSelectionChange">
<!-- <el-table-column type="selection" width="50" align="center" /> -->
@ -103,6 +104,17 @@ const loading = ref(true) // 列表的加载中
const list = ref<EnergyDeviceDataRecordVO[]>([]) //
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 expandRowKeys = ref<Array<string | number>>([])
const selectedIds = ref<Array<number | string>>([])
@ -233,6 +245,7 @@ const getList = async () => {
expandRowKeys.value = []
} finally {
loading.value = false
updatePlanTableMaxHeight()
}
}
@ -288,6 +301,12 @@ const loadOrgOptions = async () => {
onMounted(async () => {
await loadOrgOptions()
await getList()
updatePlanTableMaxHeight()
window.addEventListener('resize', updatePlanTableMaxHeight)
})
onBeforeUnmount(() => {
window.removeEventListener('resize', updatePlanTableMaxHeight)
})
</script>

@ -88,10 +88,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"
>
@ -187,6 +189,18 @@ const { t } = useI18n() // 国际化
const loading = ref(true) //
const list = ref<EnergyTypeVO[]>([]) //
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,
@ -203,6 +217,7 @@ const showAllFilters = ref(false)
const filterCount = 4
const toggleFilters = () => {
showAllFilters.value = !showAllFilters.value
updatePlanTableMaxHeight()
}
const selectedIds = ref<number[]>([])
@ -219,6 +234,7 @@ const getList = async () => {
total.value = data.total
} finally {
loading.value = false
updatePlanTableMaxHeight()
}
}
@ -275,5 +291,11 @@ const handleExport = async () => {
/** 初始化 **/
onMounted(() => {
getList()
updatePlanTableMaxHeight()
window.addEventListener('resize', updatePlanTableMaxHeight)
})
onBeforeUnmount(() => {
window.removeEventListener('resize', updatePlanTableMaxHeight)
})
</script>

@ -64,7 +64,7 @@
<!-- 列表 -->
<ContentWrap>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" ref="tableRef" :max-height="planTableMaxHeight">
<!-- <el-table-column label="id" align="center" prop="id" />
<el-table-column label="配置编号" align="center" prop="configId" />-->
<el-table-column :label="t('FactoryModeling.EsopFile.tableCodeColumn')" align="center" prop="code" />
@ -149,6 +149,18 @@ const { t } = useI18n() // 国际化
const loading = ref(true) //
const list = ref<FileVO[]>([]) //
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 total = ref(0) //
const queryParams = reactive({
pageNo: 1,
@ -176,6 +188,7 @@ const getList = async () => {
total.value = data.total
} finally {
loading.value = false
updatePlanTableMaxHeight()
}
}
@ -232,5 +245,11 @@ const handleExport = async () => {
/** 初始化 **/
onMounted(() => {
getList()
updatePlanTableMaxHeight()
window.addEventListener('resize', updatePlanTableMaxHeight)
})
onBeforeUnmount(() => {
window.removeEventListener('resize', updatePlanTableMaxHeight)
})
</script>

@ -77,7 +77,7 @@
<!-- 列表 -->
<ContentWrap>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
<el-table ref="tableRef" v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" :max-height="planTableMaxHeight">
<!-- <el-table-column label="id" align="center" prop="id" /> -->
<el-table-column label="记录" align="center" prop="recordCode" sortable />
<el-table-column label="记录明细" align="center" prop="recordDetailId" />
@ -143,6 +143,19 @@ const { t } = useI18n() // 国际化
const loading = ref(true) //
const list = ref<FeedingRecordPlanVO[]>([]) //
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 +181,7 @@ const getList = async () => {
total.value = data.total
} finally {
loading.value = false
updatePlanTableMaxHeight()
}
}
@ -220,5 +234,11 @@ const handleExport = async () => {
/** 初始化 **/
onMounted(() => {
getList()
updatePlanTableMaxHeight()
window.addEventListener("resize", updatePlanTableMaxHeight)
})
onBeforeUnmount(() => {
window.removeEventListener("resize", updatePlanTableMaxHeight)
})
</script>

@ -84,7 +84,7 @@
<el-tab-pane :label="t('MoldManagement.MoldOperate.tabUp')" name="1" />
<el-tab-pane :label="t('MoldManagement.MoldOperate.tabDown')" name="2" />
</el-tabs>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
<el-table ref="tableRef" v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" :max-height="planTableMaxHeight">
<!-- <el-table-column label="ID" align="center" prop="id" /> -->
<!-- <el-table-column label="操作类型" align="center" prop="operateType" sortable /> -->
<el-table-column :label="t('MoldManagement.MoldOperate.moldName')" align="center" prop="moldName" width="500px" sortable />
@ -148,6 +148,19 @@ const { t } = useI18n() // 国际化
const loading = ref(true) //
const list = ref<MoldOperateVO[]>([]) //
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,
@ -182,6 +195,7 @@ const getList = async () => {
total.value = data.total
} finally {
loading.value = false
updatePlanTableMaxHeight()
}
}
@ -241,5 +255,11 @@ const handleTabClick = (tab: TabsPaneContext) => {
/** 初始化 **/
onMounted(() => {
getList()
updatePlanTableMaxHeight()
window.addEventListener("resize", updatePlanTableMaxHeight)
})
onBeforeUnmount(() => {
window.removeEventListener("resize", updatePlanTableMaxHeight)
})
</script>

@ -126,6 +126,8 @@
:data="list"
:stripe="true"
:show-overflow-tooltip="true"
ref="tableRef"
:max-height="planTableMaxHeight"
row-key="id"
:default-expand-all="isExpandAll"
v-if="refreshTable"
@ -209,6 +211,19 @@ const { t } = useI18n() // 国际化
const loading = ref(true) //
const list = ref<OrganizationVO[]>([]) //
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({
code: undefined,
name: undefined,
@ -232,6 +247,7 @@ const filterCount = 4 // 筛选框数量code、parentId、name、orgClass
/** 切换筛选框展开/折叠 */
const toggleFilters = () => {
showAllFilters.value = !showAllFilters.value
updatePlanTableMaxHeight()
}
/** 查询列表 */
@ -242,6 +258,7 @@ const getList = async () => {
list.value = handleTree(data, 'id', 'parentId')
} finally {
loading.value = false
updatePlanTableMaxHeight()
}
}
@ -305,6 +322,8 @@ const organizationTree = ref() // 树形结构
/** 初始化 **/
onMounted(async () => {
await getList()
updatePlanTableMaxHeight()
window.addEventListener('resize', updatePlanTableMaxHeight)
/** 获得产线工位树 */
organizationTree.value = []
const data = await OrganizationApi.getOrganizationList()
@ -312,6 +331,10 @@ onMounted(async () => {
root.children = handleTree(data, 'id', 'parentId')
organizationTree.value.push(root)
})
onBeforeUnmount(() => {
window.removeEventListener('resize', updatePlanTableMaxHeight)
})
/** tab 切换 */
let activeName = ''
const handleTabClick = (tab: TabsPaneContext) => {

@ -106,7 +106,7 @@
<el-tab-pane label="塑封" name="sufeng" />
<el-tab-pane label="制浆" name="zhijiang" />
</el-tabs>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
<el-table ref="tableRef" v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" :max-height="planTableMaxHeight">
<el-table-column label="ID" prop="id" />
<el-table-column
label="工作日期"
@ -192,6 +192,19 @@ const { t } = useI18n() // 国际化
const loading = ref(true) //
const list = ref<OrgWorkerVO[]>([]) //
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,
@ -215,6 +228,7 @@ const getList = async () => {
total.value = data.total
} finally {
loading.value = false
updatePlanTableMaxHeight()
}
}
@ -275,9 +289,15 @@ const getOrganizationTree = async () => {
onMounted(async () => {
await getList()
await getOrganizationTree()
updatePlanTableMaxHeight()
window.addEventListener("resize", updatePlanTableMaxHeight)
//
userList.value = await UserApi.getSimpleUserList()
})
onBeforeUnmount(() => {
window.removeEventListener("resize", updatePlanTableMaxHeight)
})
/** tab 切换 */
let activeName = 'chengxing'
const handleTabClick = (tab: TabsPaneContext) => {

@ -68,6 +68,7 @@
row-key="id"
:stripe="true"
:show-overflow-tooltip="true"
:max-height="planTableMaxHeight"
:expand-row-keys="expandedKeys"
@expand-change="handleExpandChange"
@selection-change="handleSelectionChange"
@ -184,7 +185,18 @@ const queryParams = reactive({
const queryFormRef = ref()
const tableRef = ref()
const planTableMaxHeight = ref(520)
const planPaginationRef = ref<HTMLElement>()
const selectedIds = ref<(number | string)[]>([])
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 handleSelectionChange = (rows: any[]) => {
selectedIds.value = rows?.map((row) => row.id).filter((id) => id !== undefined && id !== null && id !== '') ?? []
}
@ -244,6 +256,7 @@ const getList = async () => {
total.value = normalized.total
} finally {
loading.value = false
updatePlanTableMaxHeight()
}
}
@ -339,6 +352,12 @@ const handleExport = async () => {
onMounted(async () => {
await dictStore.setDictMap()
dictReady.value = true
getList()
await getList()
updatePlanTableMaxHeight()
window.addEventListener('resize', updatePlanTableMaxHeight)
})
onBeforeUnmount(() => {
window.removeEventListener('resize', updatePlanTableMaxHeight)
})
</script>

@ -33,7 +33,7 @@
<el-tab-pane label="打印" name="1" />
<el-tab-pane label="报表" name="2" />
</el-tabs>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" row-key="id"
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" ref="tableRef" :max-height="planTableMaxHeight" row-key="id"
@selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" fixed="left" reserve-selection />
<el-table-column :label="t('TemplateManagement.PrintTemplate.templateCode')" align="center" prop="templateCode"
@ -102,6 +102,19 @@ const { t } = useI18n()
const loading = ref(true)
const list = ref<PrintTemplateVO[]>([])
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 total = ref(0)
const queryParams = reactive({
pageNo: 1,
@ -122,6 +135,7 @@ const getList = async () => {
total.value = data.total
} finally {
loading.value = false
updatePlanTableMaxHeight()
}
}
@ -187,5 +201,11 @@ const handleSelectionChange = (rows: any[]) => {
onMounted(() => {
getList()
updatePlanTableMaxHeight()
window.addEventListener('resize', updatePlanTableMaxHeight)
})
onBeforeUnmount(() => {
window.removeEventListener('resize', updatePlanTableMaxHeight)
})
</script>

@ -70,7 +70,7 @@
<!-- 列表 -->
<ContentWrap>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" ref="tableRef" :max-height="planTableMaxHeight">
<!-- <el-table-column label="主键ID" align="center" prop="id" />-->
<!-- <el-table-column type="selection" width="55" fixed="left" reserve-selection />-->
<el-table-column :label="t('TemplateManagement.PrintConfig.hostName')" align="center" prop="hostName" />
@ -161,6 +161,18 @@ const { t } = useI18n() // 国际化
const loading = ref(true) //
const list = ref<ConfigVO[]>([]) //
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 total = ref(0) //
interface QueryParams {
@ -431,6 +443,7 @@ const getList = async () => {
total.value = data.total
} finally {
loading.value = false
updatePlanTableMaxHeight()
}
}
@ -545,6 +558,12 @@ const handleExport = async () => {
onMounted(async () => {
await initCurrentHostName()
getList()
updatePlanTableMaxHeight()
window.addEventListener('resize', updatePlanTableMaxHeight)
})
onBeforeUnmount(() => {
window.removeEventListener('resize', updatePlanTableMaxHeight)
})
</script>

@ -99,6 +99,8 @@
:data="list"
:stripe="true"
:show-overflow-tooltip="true"
ref="tableRef"
:max-height="planTableMaxHeight"
>
<el-table-column :label="t('ProductionReport.Index.tableCode')" align="center" prop="code" width="200px" sortable />
<el-table-column :label="t('ProductionReport.Index.tableOrderDate')" align="center" prop="orderDate" :formatter="dateFormatter2" sortable />
@ -167,6 +169,18 @@ const message = useMessage()
const loading = ref(true)
const list = ref<TaskVO[]>([])
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,
@ -185,6 +199,7 @@ const filterCount = 4 // 筛选框数量
/** 切换筛选框展开/折叠 */
const toggleFilters = () => {
showAllFilters.value = !showAllFilters.value
updatePlanTableMaxHeight()
}
const activeStatusTab = ref('')
@ -210,6 +225,7 @@ const getList = async () => {
total.value = data.total
} finally {
loading.value = false
updatePlanTableMaxHeight()
}
}
@ -248,6 +264,12 @@ const handleTabClick = (tab: any) => {
onMounted(() => {
getList()
updatePlanTableMaxHeight()
window.addEventListener('resize', updatePlanTableMaxHeight)
})
onBeforeUnmount(() => {
window.removeEventListener('resize', updatePlanTableMaxHeight)
})
</script>

@ -81,7 +81,7 @@
<!-- 列表 -->
<ContentWrap>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
<el-table ref="tableRef" v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" :max-height="planTableMaxHeight">
<!-- <el-table-column label="id" align="center" prop="id" /> -->
<!-- <el-table-column label="入库单id" align="center" prop="stockInId" /> -->
<el-table-column label="入库单编号" align="center" prop="stockInNo" sortable/>
@ -153,8 +153,22 @@ const exportLoading = ref(false) // 导出的加载中
const showAllFilters = ref(false)
const filterCount = 4
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 toggleFilters = () => {
showAllFilters.value = !showAllFilters.value
updatePlanTableMaxHeight()
}
/** 查询列表 */
@ -166,6 +180,7 @@ const getList = async () => {
total.value = data.total
} finally {
loading.value = false
updatePlanTableMaxHeight()
}
}
@ -218,5 +233,11 @@ const handleExport = async () => {
/** 初始化 **/
onMounted(() => {
getList()
updatePlanTableMaxHeight()
window.addEventListener("resize", updatePlanTableMaxHeight)
})
onBeforeUnmount(() => {
window.removeEventListener("resize", updatePlanTableMaxHeight)
})
</script>

@ -86,10 +86,12 @@
<ContentWrap>
<el-table
ref="tableRef"
v-loading="loading"
:data="list"
:stripe="true"
:show-overflow-tooltip="true"
:max-height="planTableMaxHeight"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" />
@ -255,9 +257,21 @@ const taskTypeOptions = [
const loading = ref(true)
const list = ref<TaskManagementVO[]>([])
const total = ref(0)
const tableRef = ref()
const planTableMaxHeight = ref(520)
const planPaginationRef = ref<HTMLElement>()
const exportLoading = ref(false)
const selectedIds = ref<number[]>([])
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)))
}
type PlanOption = {
id: number | string
planName: string
@ -334,6 +348,7 @@ const getList = async () => {
total.value = data.total
} finally {
loading.value = false
updatePlanTableMaxHeight()
}
}
@ -425,7 +440,13 @@ const handleExport = async () => {
}
}
onMounted(() => {
Promise.all([ensurePlanOptionsLoaded(), ensureDeviceOptionsLoaded(), getList()])
onMounted(async () => {
await Promise.all([ensurePlanOptionsLoaded(), ensureDeviceOptionsLoaded(), getList()])
updatePlanTableMaxHeight()
window.addEventListener('resize', updatePlanTableMaxHeight)
})
onBeforeUnmount(() => {
window.removeEventListener('resize', updatePlanTableMaxHeight)
})
</script>

@ -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>

@ -48,7 +48,7 @@ type="success" plain @click="handleExport" :loading="exportLoading"
<!-- 列表 -->
<ContentWrap>
<el-table
ref="tableRef" v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" row-key="id"
ref="tableRef" v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" :max-height="planTableMaxHeight" row-key="id"
@selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" fixed="left" reserve-selection />
<el-table-column :label="t('MoldManagement.MoldInspectionItems.index')" align="center" width="80" fixed="left">
@ -126,6 +126,17 @@ const loading = ref(true) // 列表的加载中
const list = ref<DvSubjectVO[]>([]) //
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 handleSelectionChange = (rows: any[]) => {
@ -148,6 +159,7 @@ const showAllFilters = ref(false)
const filterCount = 3
const toggleFilters = () => {
showAllFilters.value = !showAllFilters.value
updatePlanTableMaxHeight()
}
const getTagDict = (dictType: string, value: any) => {
@ -190,6 +202,7 @@ const getList = async () => {
total.value = data.total
} finally {
loading.value = false
updatePlanTableMaxHeight()
}
}
@ -256,6 +269,12 @@ const handleExport = async () => {
onMounted(async () => {
await dictStore.setDictMap()
dictReady.value = true
getList()
await getList()
updatePlanTableMaxHeight()
window.addEventListener("resize", updatePlanTableMaxHeight)
})
onBeforeUnmount(() => {
window.removeEventListener("resize", updatePlanTableMaxHeight)
})
</script>

@ -68,6 +68,7 @@
row-key="id"
:stripe="true"
:show-overflow-tooltip="true"
:max-height="planTableMaxHeight"
@expand-change="handleExpandChange"
@selection-change="handleSelectionChange"
>
@ -223,6 +224,7 @@ const showAllFilters = ref(false)
const filterCount = 3
const toggleFilters = () => {
showAllFilters.value = !showAllFilters.value
updatePlanTableMaxHeight()
}
const queryParams = reactive({
@ -236,6 +238,17 @@ const queryParams = reactive({
const queryFormRef = ref()
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 | string)[]>([])
const handleSelectionChange = (rows: any[]) => {
selectedIds.value = rows?.map((row) => row.id).filter((id) => id !== undefined && id !== null && id !== '') ?? []
@ -295,6 +308,7 @@ const getList = async () => {
total.value = normalized.total
} finally {
loading.value = false
updatePlanTableMaxHeight()
}
}
@ -390,6 +404,12 @@ const handleExport = async () => {
onMounted(async () => {
await dictStore.setDictMap()
dictReady.value = true
getList()
await getList()
updatePlanTableMaxHeight()
window.addEventListener("resize", updatePlanTableMaxHeight)
})
onBeforeUnmount(() => {
window.removeEventListener("resize", updatePlanTableMaxHeight)
})
</script>

@ -110,7 +110,7 @@
<ContentWrap v-if="!formVisible">
<!-- 列表 -->
<el-table
ref="tableRef" v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" row-key="id"
ref="tableRef" v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" :max-height="planTableMaxHeight" row-key="id"
@selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" fixed="left" reserve-selection />
<el-table-column :label="t('MoldManagement.MoldRepair.repairCode')" align="center" prop="repairCode" min-width="150" sortable />
@ -219,6 +219,7 @@ const showAllFilters = ref(false)
const filterCount = 9
const toggleFilters = () => {
showAllFilters.value = !showAllFilters.value
updatePlanTableMaxHeight()
}
const queryParams = reactive({
pageNo: 1,
@ -287,6 +288,17 @@ const isProcessedRepair = (value: any) => {
}
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 handleSelectionChange = (rows: any[]) => {
selectedIds.value = rows?.map((row) => row.id).filter((id) => id !== undefined) ?? []
@ -307,6 +319,7 @@ const getList = async () => {
total.value = data.total
} finally {
loading.value = false
updatePlanTableMaxHeight()
}
}
@ -378,5 +391,11 @@ const handleExport = async () => {
onMounted(() => {
getList()
updatePlanTableMaxHeight()
window.addEventListener("resize", updatePlanTableMaxHeight)
})
onBeforeUnmount(() => {
window.removeEventListener("resize", updatePlanTableMaxHeight)
})
</script>

@ -68,6 +68,7 @@
:data="list"
:stripe="true"
:show-overflow-tooltip="true"
:max-height="planTableMaxHeight"
row-key="id"
@selection-change="handleSelectionChange"
>
@ -140,8 +141,20 @@ const showAllFilters = ref(false)
const filterCount = 4
const toggleFilters = () => {
showAllFilters.value = !showAllFilters.value
updatePlanTableMaxHeight()
}
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 formRef = ref()
@ -164,6 +177,7 @@ const getList = async () => {
total.value = data.total
} finally {
loading.value = false
updatePlanTableMaxHeight()
}
}
@ -226,5 +240,11 @@ const handleExport = async () => {
onMounted(async () => {
await getList()
updatePlanTableMaxHeight()
window.addEventListener("resize", updatePlanTableMaxHeight)
})
onBeforeUnmount(() => {
window.removeEventListener("resize", updatePlanTableMaxHeight)
})
</script>

@ -67,10 +67,12 @@
<ContentWrap>
<el-table
ref="tableRef"
v-loading="loading"
:data="list"
:stripe="true"
:show-overflow-tooltip="true"
:max-height="planTableMaxHeight"
@selection-change="handleSelectionChange"
>
<!-- <el-table-column type="selection" width="55" /> -->
@ -155,6 +157,18 @@ const taskTypeOptions = [
const loading = ref(true)
const list = ref<TaskManagementVO[]>([])
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 exportLoading = ref(false)
const selectedIds = ref<number[]>([])
@ -177,6 +191,7 @@ const showAllFilters = ref(false)
const filterCount = 3
const toggleFilters = () => {
showAllFilters.value = !showAllFilters.value
updatePlanTableMaxHeight()
}
const parseIdsValue = (value: any): string[] => {
@ -213,6 +228,7 @@ const getList = async () => {
total.value = data.total
} finally {
loading.value = false
updatePlanTableMaxHeight()
}
}
@ -281,7 +297,13 @@ onMounted(async () => {
try {
await ensurePlanOptionsLoaded()
} finally {
getList()
await getList()
}
updatePlanTableMaxHeight()
window.addEventListener("resize", updatePlanTableMaxHeight)
})
onBeforeUnmount(() => {
window.removeEventListener("resize", updatePlanTableMaxHeight)
})
</script>

@ -66,10 +66,12 @@
</div>
<el-table
ref="tableRef"
v-loading="loading"
:data="list"
:stripe="true"
:show-overflow-tooltip="true"
:max-height="planTableMaxHeight"
@selection-change="handleSelectionChange"
@row-click="handleRowClick"
>
@ -144,6 +146,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 resultVisible = ref(false)
@ -170,6 +184,7 @@ const showAllFilters = ref(false)
const filterCount = 4
const toggleFilters = () => {
showAllFilters.value = !showAllFilters.value
updatePlanTableMaxHeight()
}
const getList = async () => {
@ -180,6 +195,7 @@ const getList = async () => {
total.value = data.total
} finally {
loading.value = false
updatePlanTableMaxHeight()
}
}
@ -244,5 +260,11 @@ const handleResultSuccess = async () => {
onMounted(async () => {
await dictStore.setDictMap()
await getList()
updatePlanTableMaxHeight()
window.addEventListener("resize", updatePlanTableMaxHeight)
})
onBeforeUnmount(() => {
window.removeEventListener("resize", updatePlanTableMaxHeight)
})
</script>

@ -53,10 +53,12 @@
<!-- 列表 -->
<ContentWrap>
<el-table
ref="tableRef"
v-loading="loading"
:data="list"
row-key="id"
:default-expand-all="isExpandAll"
:max-height="planTableMaxHeight"
v-if="refreshTable"
>
<el-table-column prop="name" :label="t('SystemManagement.Dept.name')" sortable />
@ -119,6 +121,19 @@ const { t } = useI18n() // 国际化
const loading = ref(true) //
const list = ref() //
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: 100,
@ -138,6 +153,7 @@ const getList = async () => {
list.value = handleTree(data)
} finally {
loading.value = false
updatePlanTableMaxHeight()
}
}
@ -184,9 +200,15 @@ const handleDelete = async (id: number) => {
/** 初始化 **/
onMounted(async () => {
await getList()
updatePlanTableMaxHeight()
window.addEventListener("resize", updatePlanTableMaxHeight)
//
userList.value = await UserApi.getSimpleUserList()
})
onBeforeUnmount(() => {
window.removeEventListener("resize", updatePlanTableMaxHeight)
})
</script>
<style scoped>
.dept-search-form :deep(.el-form-item__label) {

@ -86,7 +86,7 @@
<!-- 列表 -->
<ContentWrap>
<el-table v-loading="loading" :data="list">
<el-table ref="tableRef" v-loading="loading" :data="list" :max-height="planTableMaxHeight">
<el-table-column align="center" :label="t('SystemManagement.Dict.id')" prop="id" />
<el-table-column
align="center"
@ -171,6 +171,19 @@ const { t } = useI18n() // 国际化
const loading = ref(true) //
const total = ref(0) //
const list = ref([]) //
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,
@ -191,6 +204,7 @@ const getList = async () => {
total.value = data.total
} finally {
loading.value = false
updatePlanTableMaxHeight()
}
}
@ -243,6 +257,12 @@ const handleExport = async () => {
/** 初始化 **/
onMounted(() => {
getList()
updatePlanTableMaxHeight()
window.addEventListener("resize", updatePlanTableMaxHeight)
})
onBeforeUnmount(() => {
window.removeEventListener("resize", updatePlanTableMaxHeight)
})
</script>

@ -75,10 +75,12 @@
<!-- 列表 -->
<ContentWrap>
<el-table
ref="tableRef"
v-if="refreshTable"
v-loading="loading"
:data="list"
:default-expand-all="isExpandAll"
:max-height="planTableMaxHeight"
row-key="id"
>
<el-table-column :show-overflow-tooltip="true" :label="t('SystemManagement.Menu.name')" prop="name" width="200" sortable />
@ -160,6 +162,19 @@ const message = useMessage() // 消息弹窗
const loading = ref(true) //
const list = ref<any>([]) //
const activeClientType = ref(1) // 1=Web2=APP
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({
name: undefined,
status: undefined,
@ -177,6 +192,7 @@ const getList = async () => {
list.value = handleTree(data)
} finally {
loading.value = false
updatePlanTableMaxHeight()
}
}
@ -258,5 +274,11 @@ const handleStatusChanged = async (menu: MenuVO, val: number) => {
/** 初始化 **/
onMounted(() => {
getList()
updatePlanTableMaxHeight()
window.addEventListener("resize", updatePlanTableMaxHeight)
})
onBeforeUnmount(() => {
window.removeEventListener("resize", updatePlanTableMaxHeight)
})
</script>

@ -67,7 +67,7 @@
<!-- 列表 -->
<ContentWrap>
<el-table v-loading="loading" :data="list">
<el-table ref="tableRef" v-loading="loading" :data="list" :max-height="planTableMaxHeight">
<el-table-column :label="t('SystemManagement.Post.code')" align="center" prop="code" sortable />
<el-table-column :label="t('SystemManagement.Post.name')" align="center" prop="name" sortable />
<el-table-column :label="t('SystemManagement.Post.sort')" align="center" prop="sort" />
@ -132,6 +132,19 @@ const { t } = useI18n() // 国际化
const loading = ref(true) //
const total = ref(0) //
const list = ref([]) //
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,
@ -151,6 +164,7 @@ const getList = async () => {
total.value = data.total
} finally {
loading.value = false
updatePlanTableMaxHeight()
}
}
@ -203,5 +217,11 @@ const handleExport = async () => {
/** 初始化 **/
onMounted(() => {
getList()
updatePlanTableMaxHeight()
window.addEventListener("resize", updatePlanTableMaxHeight)
})
onBeforeUnmount(() => {
window.removeEventListener("resize", updatePlanTableMaxHeight)
})
</script>

@ -86,7 +86,7 @@
<!-- 列表 -->
<ContentWrap>
<el-table v-loading="loading" :data="list">
<el-table ref="tableRef" v-loading="loading" :data="list" :max-height="planTableMaxHeight">
<el-table-column align="center" :label="t('SystemManagement.Role.code')" prop="code" sortable />
<el-table-column align="center" :label="t('SystemManagement.Role.name')" prop="name" sortable />
<el-table-column :label="t('SystemManagement.Role.type')" align="center" prop="type" sortable>
@ -182,6 +182,19 @@ const { t } = useI18n() // 国际化
const loading = ref(true) //
const total = ref(0) //
const list = ref([]) //
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,
@ -202,6 +215,7 @@ const getList = async () => {
total.value = data.total
} finally {
loading.value = false
updatePlanTableMaxHeight()
}
}
@ -265,6 +279,12 @@ const handleExport = async () => {
onMounted(() => {
getList()
updatePlanTableMaxHeight()
window.addEventListener("resize", updatePlanTableMaxHeight)
})
onBeforeUnmount(() => {
window.removeEventListener("resize", updatePlanTableMaxHeight)
})
</script>

@ -100,7 +100,7 @@
</el-form>
</ContentWrap>
<ContentWrap>
<el-table v-loading="loading" :data="list">
<el-table ref="tableRef" v-loading="loading" :data="list" :max-height="planTableMaxHeight">
<el-table-column
:label="t('SystemManagement.User.workNo')"
align="center"
@ -228,6 +228,19 @@ const { t } = useI18n() // 国际化
const loading = ref(true) //
const total = ref(0) //
const list = ref([]) //
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,
@ -252,6 +265,7 @@ const getList = async () => {
total.value = data.total
} finally {
loading.value = false
updatePlanTableMaxHeight()
}
}
@ -372,5 +386,11 @@ const handleRole = (row: UserApi.UserVO) => {
/** 初始化 */
onMounted(() => {
getList()
updatePlanTableMaxHeight()
window.addEventListener("resize", updatePlanTableMaxHeight)
})
onBeforeUnmount(() => {
window.removeEventListener("resize", updatePlanTableMaxHeight)
})
</script>

Loading…
Cancel
Save