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