From b5b4102b22eb55b25929ffe272ac20c4f8e3e83e Mon Sep 17 00:00:00 2001 From: lijingjia Date: Thu, 4 Jul 2024 18:39:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Table/src/BasicTable.vue | 4 - src/components/Table/src/hooks/useTable.ts | 15 +- src/components/Table/src/types/table.ts | 2 +- src/design/ant/index.less | 1 + src/design/ant/pagination.less | 1 + src/design/ant/tabs.less | 7 + src/design/public.less | 24 +- src/styles/common.scss | 6 +- .../operation/seaexport/detail/index.vue | 56 ++- .../detail/modules/operationArea.vue | 114 ++--- .../seaexport/detail/style/operationArea.less | 417 ------------------ src/views/operation/seaexport/index.vue | 97 +++- 12 files changed, 196 insertions(+), 548 deletions(-) create mode 100644 src/design/ant/tabs.less diff --git a/src/components/Table/src/BasicTable.vue b/src/components/Table/src/BasicTable.vue index 71ef4238..69ecc5b6 100644 --- a/src/components/Table/src/BasicTable.vue +++ b/src/components/Table/src/BasicTable.vue @@ -411,10 +411,6 @@ //} } - .ant-pagination { - margin: 10px 0 0; - } - .ant-table-footer { padding: 0; diff --git a/src/components/Table/src/hooks/useTable.ts b/src/components/Table/src/hooks/useTable.ts index 9bdad36f..911656b2 100644 --- a/src/components/Table/src/hooks/useTable.ts +++ b/src/components/Table/src/hooks/useTable.ts @@ -76,13 +76,16 @@ export function useTable(tableProps?: Props): [ redoHeight: () => { getTableInstance().redoHeight() }, - initHeight: () => { + initHeight: (h) => { + console.log(h) const tb = document.getElementsByClassName('ds-table') - for (let i = 0; i < tb.length; i++) { - const child = document.getElementsByClassName('ant-table-body') - console.log(child) - child[0].style.minHeight = 'calc(100vh - 235px)' - child[0].style.maxHeight = 'none' + if (tb && tb.length) { + const child = tb[0].getElementsByClassName('ant-table-body') + if (child && child.length) { + // child[0].style.height = `calc(100vh - ${243 + (h || 0)}px)` + // console.log(child[0].style.height) + // child[0].style.maxHeight = 'none' + } } }, setSelectedRows: (rows: Recordable[]) => { diff --git a/src/components/Table/src/types/table.ts b/src/components/Table/src/types/table.ts index c6990964..8240d7a4 100644 --- a/src/components/Table/src/types/table.ts +++ b/src/components/Table/src/types/table.ts @@ -106,7 +106,7 @@ export interface TableActionType { setLoading: (loading: boolean) => void setProps: (props: Partial) => void redoHeight: () => void - initHeight: () => void + initHeight: (h) => void setSelectedRowKeys: (rowKeys: string[] | number[]) => void getPaginationRef: () => PaginationProps | boolean getSize: () => SizeType diff --git a/src/design/ant/index.less b/src/design/ant/index.less index 1cc81653..263e6f9d 100644 --- a/src/design/ant/index.less +++ b/src/design/ant/index.less @@ -1,6 +1,7 @@ @import './pagination.less'; @import './input.less'; @import './btn.less'; +@import './tabs.less'; .ant-image-preview-root { img { diff --git a/src/design/ant/pagination.less b/src/design/ant/pagination.less index 8b546c4f..70e9e8be 100644 --- a/src/design/ant/pagination.less +++ b/src/design/ant/pagination.less @@ -75,6 +75,7 @@ html[data-theme='dark'] { } .ant-pagination-options { + padding-right: 20px; .ant-select-selector, .ant-input-number-input-wrap { height: 20px!important; min-height: 20px!important; diff --git a/src/design/ant/tabs.less b/src/design/ant/tabs.less new file mode 100644 index 00000000..c7f49bc2 --- /dev/null +++ b/src/design/ant/tabs.less @@ -0,0 +1,7 @@ +@prefix-cls: ~'@{namespace}-tabs'; +.ant-tabs-tab { + font-size: 12px!important; + .ant-tabs-nav { + border-bottom: 1px solid #CED5D9; + } +} \ No newline at end of file diff --git a/src/design/public.less b/src/design/public.less index e032d71b..5ae933f5 100644 --- a/src/design/public.less +++ b/src/design/public.less @@ -59,21 +59,21 @@ .ant-input-affix-wrapper-sm, .ant-select-selector, .ant-input-number { - height: 28px !important; + height: 26px !important; .ant-select-selection-item { line-height: 26px !important; } } .ant-picker-small { - height: 28px; + height: 26px; width: 100%; } .ant-input-number-input-wrap { - height: 28px; - line-height: 26px; + height: 26px; + line-height: 24px; } - .ant-form-item-label > label { - height: 20px !important; + .ant-form-item-label { + height: 22px; } } @@ -168,6 +168,11 @@ padding: 5px 10px!important; } } + .ant-table-thead { + th { + padding: 10px 7px!important; + } + } .ant-table-container { padding: 0 0 0 20px; .ant-table-header { @@ -181,6 +186,9 @@ } } } + .ant-table-column-sorters { + + } } .ant-table-tbody { .ant-table-row { @@ -194,7 +202,7 @@ } } .ant-pagination { - margin: 0!important; + margin: 2px 0 3px!important; font-size: 12px; } } @@ -215,7 +223,7 @@ .ant-input-affix-wrapper-placeholder { line-height: 26px !important; } -.ant-select-selection-search-input, .ant-input-affix-wrapper, .ant-form-item-control-input { +.ant-select-selection-search-input, .ant-input-affix-wrapper { height: 26px!important; font-size: 12px!important; } diff --git a/src/styles/common.scss b/src/styles/common.scss index e99d1941..11e8b0fc 100644 --- a/src/styles/common.scss +++ b/src/styles/common.scss @@ -29,8 +29,8 @@ h4 { } h5 { font-size: 12px; - color: #8c8c8c; - margin-bottom: 8px; + color: #33383D; + font-weight: 400; } .ml10 { @@ -116,7 +116,7 @@ h5 { } .ds-detail-box { - margin: 10px; + margin: 0 0 0 20px; } .flex { diff --git a/src/views/operation/seaexport/detail/index.vue b/src/views/operation/seaexport/detail/index.vue index 8727dc29..2764f829 100644 --- a/src/views/operation/seaexport/detail/index.vue +++ b/src/views/operation/seaexport/detail/index.vue @@ -2134,34 +2134,32 @@ diff --git a/src/views/operation/seaexport/detail/modules/operationArea.vue b/src/views/operation/seaexport/detail/modules/operationArea.vue index 0bae00ba..3e672cc0 100644 --- a/src/views/operation/seaexport/detail/modules/operationArea.vue +++ b/src/views/operation/seaexport/detail/modules/operationArea.vue @@ -1,6 +1,26 @@ + +
+
合计
+ +
{ const res: API.DataResult = await PageDataByBooking(p) + console.log(res.data?.dataTotal) + calcData.value = [res.data?.dataTotal] return new Promise((resolve) => { - res.data.forEach(item => { + res.data?.list.forEach(item => { item.stlDate = formatTableData(item.stlDate) item.etd = formatTableData(item.etd) item.closingDate = formatTableData(item.closingDate) @@ -223,7 +316,7 @@ item.customDate = formatTableData(item.customDate) item.inspectionDate = formatTableData(item.inspectionDate) }) - resolve({ data: [...res.data], total: res.count }) + resolve({ data: [...res.data.list], total: res.data.totalCount }) // 加载详情需要使用的下拉数据 optionsStore.getOptionsByCode('GetVesselSelectList') optionsStore.getOptionsByCode('GetClientStlModeSelectList')