From 4a9be1b5a414f3f5cce0ba26e147c6fed0b11610 Mon Sep 17 00:00:00 2001 From: yufei0306 <13417315+yufei0306@user.noreply.gitee.com> Date: Thu, 18 Apr 2024 16:54:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E6=8C=87=E4=BB=A4=EF=BC=9Atable=20=E4=B8=AD=E5=88=86=E9=A1=B5?= =?UTF-8?q?=E5=92=8C=E6=BB=9A=E5=8A=A8=E6=9D=A1=E6=B0=B8=E8=BF=9C=E5=B1=95?= =?UTF-8?q?=E7=A4=BA=E5=9C=A8=E8=AF=95=E5=9B=BE=E5=8C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/directives/index.ts | 2 ++ src/directives/permission/clientTable.ts | 21 +++++++++++++++++++ .../issueManage/issue/issueJobMain/index.vue | 2 +- .../issue/issueRecordMain/index.vue | 2 +- .../issue/issueRequestMain/index.vue | 2 +- .../preparetoissueMain/index.vue | 2 +- .../productionreceiptJobMain/index.vue | 2 +- .../productionreceiptRecordMain/index.vue | 2 +- .../productionreturnJobMain/index.vue | 2 +- .../productionreturnRecordMain/index.vue | 2 +- .../productionreturnRequestMain/index.vue | 2 +- .../productionreturnRequestMainNo/index.vue | 2 +- .../repleinsh/repleinshJobMain/index.vue | 2 +- .../repleinsh/repleinshRecordMain/index.vue | 2 +- .../repleinsh/repleinshRequestMain/index.vue | 2 +- .../productionplan/productionMain/index.vue | 2 +- .../productionMainAssemble/index.vue | 2 +- .../productionMainAssembleSparePart/index.vue | 2 +- .../productionMainPredictSparePart/index.vue | 2 +- .../productreceiptJobMain/index.vue | 2 +- .../productreceiptRecordMain/index.vue | 2 +- .../productreceiptRequestMain/index.vue | 2 +- .../index.vue | 2 +- .../productreceiptscrapJobMain/index.vue | 2 +- .../productreceiptscrapRecordMain/index.vue | 2 +- .../productreceiptscrapRequestMain/index.vue | 2 +- .../productredressJobMain/index.vue | 2 +- .../productredressRecordMain/index.vue | 2 +- .../productredressRequestMain/index.vue | 2 +- .../inspect/inspectJobMain/index.vue | 2 +- .../inspect/inspectRecordMain/index.vue | 2 +- .../purchasereceiptJobMain/index.vue | 2 +- .../purchasereceiptRecordMain/index.vue | 2 +- .../purchasereceiptRequestMain/index.vue | 2 +- .../purchasereturnJobMain/index.vue | 2 +- .../purchasereturnRecordMain/index.vue | 2 +- .../purchasereturnRequestMain/index.vue | 2 +- .../putaway/putawayJobMain/index.vue | 2 +- .../putaway/putawayRecordMain/index.vue | 2 +- .../putaway/putawayRequestMain/index.vue | 2 +- .../sparereceiptJobMain/index.vue | 2 +- .../sparereceiptRecordMain/index.vue | 2 +- .../sparereceiptRequestMain/index.vue | 2 +- .../demandforecastingMain/index.vue | 2 +- .../supplierdeliver/purchaseMain/index.vue | 2 +- .../purchasePlanMain/index.vue | 2 +- .../supplierdeliverRecordMain/index.vue | 2 +- .../purchaseclaimRecordMain/index.vue | 2 +- .../purchaseclaimRequestMain/index.vue | 2 +- .../supplierinvoiceRecordMain/index.vue | 2 +- .../supplierinvoiceRequestMain/index.vue | 2 +- 51 files changed, 72 insertions(+), 49 deletions(-) create mode 100644 src/directives/permission/clientTable.ts diff --git a/src/directives/index.ts b/src/directives/index.ts index 89cc8ba14..a6fa38eff 100644 --- a/src/directives/index.ts +++ b/src/directives/index.ts @@ -1,6 +1,7 @@ import type { App } from 'vue' import { hasRole } from './permission/hasRole' import { hasPermi } from './permission/hasPermi' +import { clientTable } from './permission/clientTable' /** * 导出指令:v-xxx @@ -10,4 +11,5 @@ import { hasPermi } from './permission/hasPermi' export const setupAuth = (app: App) => { hasRole(app) hasPermi(app) + clientTable(app) } diff --git a/src/directives/permission/clientTable.ts b/src/directives/permission/clientTable.ts new file mode 100644 index 000000000..84e9e97bf --- /dev/null +++ b/src/directives/permission/clientTable.ts @@ -0,0 +1,21 @@ +import type { App } from 'vue' +import { CACHE_KEY, useCache } from '@/hooks/web/useCache' + +const { t } = useI18n() // 国际化 + +export function clientTable(app: App) { + app.directive('clientTable', (el, binding) => { + nextTick(() => { + const top = el.getBoundingClientRect().top + ////--top-tool-height:50 --tags-view-height:35 + const qustionHeight = 85 + let paginationHeight = 0 + if(el.children&&el.children.length>1){ + paginationHeight = 70 + } + const height = window.innerHeight - top - paginationHeight - qustionHeight + el.style.height = height + 'px' + el.firstChild.style.height = '100%' + }) + }) +} diff --git a/src/views/wms/issueManage/issue/issueJobMain/index.vue b/src/views/wms/issueManage/issue/issueJobMain/index.vue index c159d6aa7..f904e3d98 100644 --- a/src/views/wms/issueManage/issue/issueJobMain/index.vue +++ b/src/views/wms/issueManage/issue/issueJobMain/index.vue @@ -17,7 +17,7 @@ - -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue index a332d40ec..6025aae49 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue @@ -11,7 +11,7 @@ -
diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/index.vue index ca2a7fddd..4c6a3afae 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/index.vue @@ -17,7 +17,7 @@ -
-
-
diff --git a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/index.vue b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/index.vue index b35ec27d7..a8576d009 100644 --- a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/index.vue +++ b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/index.vue @@ -17,7 +17,7 @@ -
-