From 21c12f1a6d37cd9b55e55c4ede84be293070cca6 Mon Sep 17 00:00:00 2001 From: qiankanghui Date: Fri, 26 Jun 2026 10:41:06 +0800 Subject: [PATCH] =?UTF-8?q?refactor(npcIqc):=20=E4=BC=98=E5=8C=96=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E9=AB=98=E5=BA=A6=E8=AE=A1=E7=AE=97=E9=80=BB=E8=BE=91?= =?UTF-8?q?=E5=B9=B6=E7=BB=9F=E4=B8=80=E6=A0=B7=E5=BC=8F=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在logisticsManagement.vue中提取高度计算逻辑到变量calculatedHeight,提高代码可读性 - 为npcIqcList.vue中的详情内容包装器添加动态高度样式绑定 - 统一三个页面的高度计算公式为(window.innerHeight - 20) / 2保持一致性 - 在npcIqcList.vue的.detail-content-wrapper样式中添加height: 100%属性 - 移除poOrder_search.vue中关于模仿其他页面的注释,保持代码风格统一 --- src/views/modules/npcIqc/logisticsManagement.vue | 6 ++++-- src/views/modules/npcIqc/npcIqcList.vue | 11 ++++++----- src/views/modules/order/poOrder_search.vue | 5 +++-- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/views/modules/npcIqc/logisticsManagement.vue b/src/views/modules/npcIqc/logisticsManagement.vue index 1b8d3dd..be9a704 100644 --- a/src/views/modules/npcIqc/logisticsManagement.vue +++ b/src/views/modules/npcIqc/logisticsManagement.vue @@ -171,8 +171,10 @@ export default { }, mounted () { this.$nextTick(() => { - this.height = (window.innerHeight - 220) / 2 - this.detailHeight = (window.innerHeight - 220) / 2 + // 计算表格高度和详情页高度,保持一致 + const calculatedHeight = (window.innerHeight - 220) / 2 + this.height = calculatedHeight + this.detailHeight = calculatedHeight this.getMainData() }) }, diff --git a/src/views/modules/npcIqc/npcIqcList.vue b/src/views/modules/npcIqc/npcIqcList.vue index e69b6bd..9804d0f 100644 --- a/src/views/modules/npcIqc/npcIqcList.vue +++ b/src/views/modules/npcIqc/npcIqcList.vue @@ -115,7 +115,7 @@ -
+
@@ -236,10 +236,10 @@ export default { }, mounted () { this.$nextTick(() => { - // 计算表格高度和详情页高度 - const availableHeight = window.innerHeight - 280 - this.tableHeight = availableHeight * 0.4 - this.detailHeight = availableHeight * 0.6 + // 计算表格高度和详情页高度,保持一致 + const calculatedHeight = (window.innerHeight - 220) / 2 + this.tableHeight = calculatedHeight + this.detailHeight = calculatedHeight this.getMainData() }) }, @@ -592,6 +592,7 @@ export default { overflow-y: auto; overflow-x: hidden; padding: 10px; + height: 100%; } /* 分页插件紧凑化 */ diff --git a/src/views/modules/order/poOrder_search.vue b/src/views/modules/order/poOrder_search.vue index 14812dd..066c67e 100644 --- a/src/views/modules/order/poOrder_search.vue +++ b/src/views/modules/order/poOrder_search.vue @@ -465,8 +465,9 @@ export default { }, mounted() { this.$nextTick(() => { - // 模仿 supplierList.vue 的高度分配方式 - this.height = (window.innerHeight - 220) / 2 + // 计算表格高度和详情页高度,保持一致 + const calculatedHeight = (window.innerHeight - 220) / 2 + this.height = calculatedHeight }) }, methods: {