feat(pl): add datetime column dual-caret sort on scoped transport lists.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
100b0880f0
commit
45a6fc5cc5
25 files changed
+41949
-40523
No files matched your search
@@ -490,6 +490,7 @@ import {
|
||||
} from '@/api/pl'
|
||||
import ColumnHeaderFilter from '@/components/business/column-header-filter/index.vue'
|
||||
import { useServerColumnFilters } from '@/composables/useServerColumnFilters'
|
||||
import { useColumnSort } from '@/composables/useColumnSort'
|
||||
import { plPlanContractColumnFilterDefs } from './columnFilterDefs'
|
||||
import PlPlanContractCell from '@/components/business/pl-plan-contract-cell/index.vue'
|
||||
import PlPlanContractMultiSelect from '@/components/business/pl-plan-contract-multi-select/index.vue'
|
||||
@@ -570,6 +571,25 @@ const {
|
||||
onChange: () => handleSearch()
|
||||
})
|
||||
|
||||
const {
|
||||
sortField,
|
||||
sortOrder,
|
||||
setSort,
|
||||
clearSort,
|
||||
isSortActive,
|
||||
toQueryParams: toSortQueryParams
|
||||
} = useColumnSort({
|
||||
onChange: () => handleSearch()
|
||||
})
|
||||
|
||||
provide('crmColumnSort', {
|
||||
setSort,
|
||||
clearSort,
|
||||
isSortActive,
|
||||
sortField,
|
||||
sortOrder
|
||||
})
|
||||
|
||||
function enumOptionsFor(prop: string) {
|
||||
const def = plPlanContractColumnFilterDefs.find((d) => d.prop === prop)
|
||||
return (def?.enumOptions || []).map((o) => ({ ...o, count: 0 }))
|
||||
@@ -659,7 +679,7 @@ function showGapSupplementAction(row: PlPlanListDisplayRow): boolean {
|
||||
}
|
||||
|
||||
function buildListQueryParams(): Record<string, any> {
|
||||
const colParams = { ...toQueryParams() }
|
||||
const colParams = { ...toQueryParams(), ...toSortQueryParams() }
|
||||
const keyword = quickSearch.value.trim()
|
||||
const params: Record<string, any> = { ...colParams }
|
||||
if (keyword) params.q = keyword
|
||||
|
||||
Reference in new issue
Block a user