Browse Source

添加自定义指令:table 中分页和滚动条永远展示在试图区

master_hella_20240701
yufei0306 5 months ago
parent
commit
4a9be1b5a4
  1. 2
      src/directives/index.ts
  2. 21
      src/directives/permission/clientTable.ts
  3. 2
      src/views/wms/issueManage/issue/issueJobMain/index.vue
  4. 2
      src/views/wms/issueManage/issue/issueRecordMain/index.vue
  5. 2
      src/views/wms/issueManage/issue/issueRequestMain/index.vue
  6. 2
      src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/index.vue
  7. 2
      src/views/wms/issueManage/productionreceipt/productionreceiptJobMain/index.vue
  8. 2
      src/views/wms/issueManage/productionreceipt/productionreceiptRecordMain/index.vue
  9. 2
      src/views/wms/issueManage/productionreturn/productionreturnJobMain/index.vue
  10. 2
      src/views/wms/issueManage/productionreturn/productionreturnRecordMain/index.vue
  11. 2
      src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue
  12. 2
      src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue
  13. 2
      src/views/wms/issueManage/repleinsh/repleinshJobMain/index.vue
  14. 2
      src/views/wms/issueManage/repleinsh/repleinshRecordMain/index.vue
  15. 2
      src/views/wms/issueManage/repleinsh/repleinshRequestMain/index.vue
  16. 2
      src/views/wms/productionManage/productionplan/productionMain/index.vue
  17. 2
      src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue
  18. 2
      src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue
  19. 2
      src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue
  20. 2
      src/views/wms/productionManage/productreceipt/productreceiptJobMain/index.vue
  21. 2
      src/views/wms/productionManage/productreceipt/productreceiptRecordMain/index.vue
  22. 2
      src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue
  23. 2
      src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue
  24. 2
      src/views/wms/productionManage/productreceiptscrap/productreceiptscrapJobMain/index.vue
  25. 2
      src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRecordMain/index.vue
  26. 2
      src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue
  27. 2
      src/views/wms/productionManage/productredress/productredressJobMain/index.vue
  28. 2
      src/views/wms/productionManage/productredress/productredressRecordMain/index.vue
  29. 2
      src/views/wms/productionManage/productredress/productredressRequestMain/index.vue
  30. 2
      src/views/wms/purchasereceiptManage/inspect/inspectJobMain/index.vue
  31. 2
      src/views/wms/purchasereceiptManage/inspect/inspectRecordMain/index.vue
  32. 2
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/index.vue
  33. 2
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue
  34. 2
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue
  35. 2
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnJobMain/index.vue
  36. 2
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/index.vue
  37. 2
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue
  38. 2
      src/views/wms/purchasereceiptManage/putaway/putawayJobMain/index.vue
  39. 2
      src/views/wms/purchasereceiptManage/putaway/putawayRecordMain/index.vue
  40. 2
      src/views/wms/purchasereceiptManage/putaway/putawayRequestMain/index.vue
  41. 2
      src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptJobMain/index.vue
  42. 2
      src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRecordMain/index.vue
  43. 2
      src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/index.vue
  44. 2
      src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/index.vue
  45. 2
      src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/index.vue
  46. 2
      src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue
  47. 2
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/index.vue
  48. 2
      src/views/wms/supplierManage/purchaseclaim/purchaseclaimRecordMain/index.vue
  49. 2
      src/views/wms/supplierManage/purchaseclaim/purchaseclaimRequestMain/index.vue
  50. 2
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/index.vue
  51. 2
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue

2
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<Element>) => {
hasRole(app)
hasPermi(app)
clientTable(app)
}

21
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<Element>) {
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%'
})
})
}

2
src/views/wms/issueManage/issue/issueJobMain/index.vue

@ -17,7 +17,7 @@
<!-- 列表 -->
<ContentWrap>
<Table
<Table v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"

2
src/views/wms/issueManage/issue/issueRecordMain/index.vue

@ -17,7 +17,7 @@
<!-- 列表 -->
<ContentWrap>
<Table
<Table v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"

2
src/views/wms/issueManage/issue/issueRequestMain/index.vue

@ -17,7 +17,7 @@
<!-- 列表 -->
<ContentWrap>
<Table
<Table v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"

2
src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/index.vue

@ -17,7 +17,7 @@
<!-- 列表 -->
<ContentWrap>
<Table
<Table v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"

2
src/views/wms/issueManage/productionreceipt/productionreceiptJobMain/index.vue

@ -17,7 +17,7 @@
<!-- 列表 -->
<ContentWrap>
<Table
<Table v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"

2
src/views/wms/issueManage/productionreceipt/productionreceiptRecordMain/index.vue

@ -17,7 +17,7 @@
<!-- 列表 -->
<ContentWrap>
<Table
<Table v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"

2
src/views/wms/issueManage/productionreturn/productionreturnJobMain/index.vue

@ -17,7 +17,7 @@
<!-- 列表 -->
<ContentWrap>
<Table
<Table v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"

2
src/views/wms/issueManage/productionreturn/productionreturnRecordMain/index.vue

@ -17,7 +17,7 @@
<!-- 列表 -->
<ContentWrap>
<Table
<Table v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"

2
src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue

@ -17,7 +17,7 @@
<!-- 列表 -->
<ContentWrap>
<Table
<Table v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"

2
src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue

@ -17,7 +17,7 @@
<!-- 列表 -->
<ContentWrap>
<Table
<Table v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"

2
src/views/wms/issueManage/repleinsh/repleinshJobMain/index.vue

@ -18,7 +18,7 @@
<!-- 列表 -->
<ContentWrap>
<Table
<Table v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"

2
src/views/wms/issueManage/repleinsh/repleinshRecordMain/index.vue

@ -17,7 +17,7 @@
<!-- 列表 -->
<ContentWrap>
<Table
<Table v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"

2
src/views/wms/issueManage/repleinsh/repleinshRequestMain/index.vue

@ -17,7 +17,7 @@
<!-- 列表 -->
<ContentWrap>
<Table
<Table v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"

2
src/views/wms/productionManage/productionplan/productionMain/index.vue

@ -17,7 +17,7 @@
<!-- 列表 -->
<ContentWrap>
<Table
<Table v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"

2
src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue

@ -17,7 +17,7 @@
<!-- 列表 -->
<ContentWrap>
<Table
<Table v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"

2
src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue

@ -17,7 +17,7 @@
<!-- 列表 -->
<ContentWrap>
<Table
<Table v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"

2
src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue

@ -17,7 +17,7 @@
<!-- 列表 -->
<ContentWrap>
<Table
<Table v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"

2
src/views/wms/productionManage/productreceipt/productreceiptJobMain/index.vue

@ -17,7 +17,7 @@
<!-- 列表 -->
<ContentWrap>
<Table
<Table v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"

2
src/views/wms/productionManage/productreceipt/productreceiptRecordMain/index.vue

@ -17,7 +17,7 @@
<!-- 列表 -->
<ContentWrap>
<Table
<Table v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"

2
src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue

@ -17,7 +17,7 @@
<!-- 列表 -->
<ContentWrap>
<Table
<Table v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"

2
src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue

@ -17,7 +17,7 @@
<!-- 列表 -->
<ContentWrap>
<Table
<Table v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"

2
src/views/wms/productionManage/productreceiptscrap/productreceiptscrapJobMain/index.vue

@ -17,7 +17,7 @@
<!-- 列表 -->
<ContentWrap>
<Table
<Table v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"

2
src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRecordMain/index.vue

@ -17,7 +17,7 @@
<!-- 列表 -->
<ContentWrap>
<Table
<Table v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"

2
src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue

@ -17,7 +17,7 @@
<!-- 列表 -->
<ContentWrap>
<Table
<Table v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"

2
src/views/wms/productionManage/productredress/productredressJobMain/index.vue

@ -17,7 +17,7 @@
<!-- 列表 -->
<ContentWrap>
<Table
<Table v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"

2
src/views/wms/productionManage/productredress/productredressRecordMain/index.vue

@ -17,7 +17,7 @@
<!-- 列表 -->
<ContentWrap>
<Table
<Table v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"

2
src/views/wms/productionManage/productredress/productredressRequestMain/index.vue

@ -17,7 +17,7 @@
<!-- 列表 -->
<ContentWrap>
<Table
<Table v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"

2
src/views/wms/purchasereceiptManage/inspect/inspectJobMain/index.vue

@ -17,7 +17,7 @@
<!-- 列表 -->
<ContentWrap>
<Table
<Table v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"

2
src/views/wms/purchasereceiptManage/inspect/inspectRecordMain/index.vue

@ -17,7 +17,7 @@
<!-- 列表 -->
<ContentWrap>
<Table
<Table v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"

2
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/index.vue

@ -17,7 +17,7 @@
<!-- 列表 -->
<ContentWrap>
<Table
<Table v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"

2
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue

@ -17,7 +17,7 @@
<!-- 列表 -->
<ContentWrap>
<Table
<Table v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"

2
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue

@ -17,7 +17,7 @@
<!-- 列表 -->
<ContentWrap>
<Table
<Table v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"

2
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnJobMain/index.vue

@ -17,7 +17,7 @@
<!-- 列表 -->
<ContentWrap>
<Table
<Table v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"

2
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/index.vue

@ -17,7 +17,7 @@
<!-- 列表 -->
<ContentWrap>
<Table
<Table v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"

2
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue

@ -21,7 +21,7 @@
<!-- 列表 -->
<ContentWrap>
<Table
<Table v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"

2
src/views/wms/purchasereceiptManage/putaway/putawayJobMain/index.vue

@ -17,7 +17,7 @@
<!-- 列表 -->
<ContentWrap>
<Table
<Table v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"

2
src/views/wms/purchasereceiptManage/putaway/putawayRecordMain/index.vue

@ -17,7 +17,7 @@
<!-- 列表 -->
<ContentWrap>
<Table
<Table v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"

2
src/views/wms/purchasereceiptManage/putaway/putawayRequestMain/index.vue

@ -17,7 +17,7 @@
<!-- 列表 -->
<ContentWrap>
<Table
<Table v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"

2
src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptJobMain/index.vue

@ -17,7 +17,7 @@
<!-- 列表 -->
<ContentWrap>
<Table
<Table v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"

2
src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRecordMain/index.vue

@ -17,7 +17,7 @@
<!-- 列表 -->
<ContentWrap>
<Table
<Table v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"

2
src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/index.vue

@ -17,7 +17,7 @@
<!-- 列表 -->
<ContentWrap>
<Table
<Table v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"

2
src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/index.vue

@ -17,7 +17,7 @@
<!-- 列表 -->
<ContentWrap>
<Table
<Table v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"

2
src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/index.vue

@ -9,7 +9,7 @@
@updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick" :allSchemas="PurchaseMain.allSchemas" :detailAllSchemas="PurchaseDetail.allSchemas" />
<!-- 列表 -->
<ContentWrap>
<Table ref="elTableRef" :columns="tableColumns" :data="tableObject.tableList" :loading="tableObject.loading" :pagination="{
<Table v-clientTable ref="elTableRef" :columns="tableColumns" :data="tableObject.tableList" :loading="tableObject.loading" :pagination="{
total: tableObject.total
}" v-model:pageSize="tableObject.pageSize" v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort" >

2
src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue

@ -11,7 +11,7 @@
<!-- 列表 -->
<ContentWrap>
<Table :columns="tableColumns" :data="tableObject.tableList" :loading="tableObject.loading" :pagination="{
<Table v-clientTable :columns="tableColumns" :data="tableObject.tableList" :loading="tableObject.loading" :pagination="{
total: tableObject.total
}" v-model:pageSize="tableObject.pageSize" v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort">

2
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/index.vue

@ -17,7 +17,7 @@
<!-- 列表 -->
<ContentWrap>
<Table
<Table v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"

2
src/views/wms/supplierManage/purchaseclaim/purchaseclaimRecordMain/index.vue

@ -17,7 +17,7 @@
<!-- 列表 -->
<ContentWrap>
<Table
<Table v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"

2
src/views/wms/supplierManage/purchaseclaim/purchaseclaimRequestMain/index.vue

@ -13,7 +13,7 @@
<!-- 列表 -->
<ContentWrap>
<Table :columns="tableColumns" :data="tableObject.tableList" :loading="tableObject.loading" :pagination="{
<Table v-clientTable :columns="tableColumns" :data="tableObject.tableList" :loading="tableObject.loading" :pagination="{
total: tableObject.total
}" v-model:pageSize="tableObject.pageSize" v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort">

2
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/index.vue

@ -17,7 +17,7 @@
<!-- 列表 -->
<ContentWrap>
<Table
<Table v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"

2
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue

@ -18,7 +18,7 @@
<!-- 列表 -->
<ContentWrap>
<Table :columns="tableColumns" :data="tableObject.tableList" :loading="tableObject.loading" :pagination="{
<Table v-clientTable :columns="tableColumns" :data="tableObject.tableList" :loading="tableObject.loading" :pagination="{
total: tableObject.total
}" v-model:pageSize="tableObject.pageSize" v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort">

Loading…
Cancel
Save