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..91f47613 100644 --- a/src/components/Table/src/hooks/useTable.ts +++ b/src/components/Table/src/hooks/useTable.ts @@ -76,15 +76,6 @@ export function useTable(tableProps?: Props): [ redoHeight: () => { getTableInstance().redoHeight() }, - initHeight: () => { - 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' - } - }, setSelectedRows: (rows: Recordable[]) => { return toRaw(getTableInstance().setSelectedRows(rows)) }, diff --git a/src/components/Table/src/types/table.ts b/src/components/Table/src/types/table.ts index c6990964..c721c30b 100644 --- a/src/components/Table/src/types/table.ts +++ b/src/components/Table/src/types/table.ts @@ -106,7 +106,6 @@ export interface TableActionType { setLoading: (loading: boolean) => void setProps: (props: Partial) => void redoHeight: () => void - initHeight: () => void setSelectedRowKeys: (rowKeys: string[] | number[]) => void getPaginationRef: () => PaginationProps | boolean getSize: () => SizeType @@ -199,7 +198,6 @@ export interface BasicTableProps { canResize?: boolean // 自适应高度偏移, 计算结果-偏移量 resizeHeightOffset?: number - // 在分页改变的时候清空选项 clearSelectOnPageChange?: boolean // 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..df8a42d7 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,17 @@ padding: 5px 10px!important; } } + .ant-table-thead { + th { + padding: 10px 7px!important; + } + .ant-table-column-sorters, .ant-table-filter-column { + justify-content: flex-start; + .ant-table-column-title { + flex: none; + } + } + } .ant-table-container { padding: 0 0 0 20px; .ant-table-header { @@ -181,6 +192,9 @@ } } } + .ant-table-column-sorters { + + } } .ant-table-tbody { .ant-table-row { @@ -194,7 +208,7 @@ } } .ant-pagination { - margin: 0!important; + margin: 2px 0 3px!important; font-size: 12px; } } @@ -215,7 +229,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/layouts/default/tabs/components/TabRedo.vue b/src/layouts/default/tabs/components/TabRedo.vue index 9088e8f0..ebe0a596 100644 --- a/src/layouts/default/tabs/components/TabRedo.vue +++ b/src/layouts/default/tabs/components/TabRedo.vue @@ -1,11 +1,3 @@ - + +
+
合计
+ +
{ 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') @@ -241,20 +334,25 @@ optionsStore.getOptionsByCode('GetPackageSelectList') }) }, - sortFn: (p) => { - return { sortField: p } - console.log(p) - }, - beforeFetch: () => { - var currentPageInfo: any = getPaginationRef() + beforeFetch: (p) => { var data = getForm().getFieldsValue() const postParam: API.PageRequest = { queryCondition: '', pageCondition: { - pageIndex: currentPageInfo.current, - pageSize: currentPageInfo.pageSize, - sortConditions: [], - }, + pageIndex: p.current, + pageSize: p.pageSize, + sortConditions: [] + } + } + if (p.field) { + postParam.sortConditions = [ + { + sortField: p.field, + listSortDirection: p.order == "ascend" ? 0 : 1 + } + ] + } else { + postParam.sortConditions = [] } let condition: API.ConditionItem[] = [] if (!!data.mblno) { @@ -394,7 +492,7 @@ width: 60, }, canResize: true, - resizeHeightOffset: 35, + resizeHeightOffset: 80, immediate: false, actionColumn: { width: 80,