|
|
@@ -62,6 +62,7 @@ import Bus from '@/utils/eventBus/index';
|
|
|
import { expandIcon } from '@/common/setup/table/clolumn';
|
|
|
import { getApplyStatusFinanceName, getFinanceTypeName, getInterestrateModeName, getInterestSettleModeName } from '@/common/constants/enumsName';
|
|
|
import { BtnListType } from '@/common/components/btnList/interface';
|
|
|
+import { sortTime } from '@/utils/time';
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: enumOrderComponents.financing_manager_apply_order,
|
|
|
@@ -72,14 +73,6 @@ export default defineComponent({
|
|
|
setup() {
|
|
|
// 表格列表数据
|
|
|
const { loading, tableList, queryTable } = queryTableList<WrFinanceBuyApply>();
|
|
|
- function sortTime<T extends object>(arr: T[], key: keyof T, isUp = true) {
|
|
|
- const result = arr.sort((a, b) => {
|
|
|
- const time1 = new Date((a[key] as unknown) as string).getTime();
|
|
|
- const time2 = new Date((b[key] as unknown) as string).getTime();
|
|
|
- return isUp ? time1 - time2 : time2 - time1;
|
|
|
- });
|
|
|
- return result;
|
|
|
- }
|
|
|
// 获取列表数据
|
|
|
const queryTableAction = () => {
|
|
|
queryTable(queryWrFinanceBuyApply).then((res) => {
|