|
|
@@ -193,6 +193,20 @@ const sortGroupEntries = (entries: Array<[string, SyncClient[]]>) => {
|
|
|
});
|
|
|
};
|
|
|
|
|
|
+const sortClientsByGroupSequence = (items: SyncClient[]) => {
|
|
|
+ return [...items].sort((a, b) => {
|
|
|
+ const sequenceA = getGroupKey(a.groupSequence);
|
|
|
+ const sequenceB = getGroupKey(b.groupSequence);
|
|
|
+ if (sequenceA === '__empty__') {
|
|
|
+ return 1;
|
|
|
+ }
|
|
|
+ if (sequenceB === '__empty__') {
|
|
|
+ return -1;
|
|
|
+ }
|
|
|
+ return sequenceA.localeCompare(sequenceB, 'zh-CN', { numeric: true });
|
|
|
+ });
|
|
|
+};
|
|
|
+
|
|
|
const groupedClients = computed<SyncClientRow[]>(() => {
|
|
|
const marketGroups = groupByField(clients.value, 'marketType');
|
|
|
|
|
|
@@ -206,7 +220,7 @@ const groupedClients = computed<SyncClientRow[]>(() => {
|
|
|
`market:${marketType}:data:${dataType}:platform:${platform}`,
|
|
|
getGroupTitle('platform', platform === '__empty__' ? undefined : platform),
|
|
|
platformItems,
|
|
|
- platformItems.map(createClientRow),
|
|
|
+ sortClientsByGroupSequence(platformItems).map(createClientRow),
|
|
|
);
|
|
|
});
|
|
|
|