From 1511792e3b0f22debaba2150cadcb3e69edc91bf Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Fri, 15 Nov 2024 19:53:45 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=BF=AB=E9=80=9F=E5=BC=80=E7=AB=99?= =?UTF-8?q?=E7=BD=91=E5=85=83=E6=8E=92=E5=BA=8F=E8=BF=9B=E8=A1=8C=E9=80=90?= =?UTF-8?q?=E4=B8=AA=E5=AE=89=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/constants/ne-constants.ts | 2 ++ .../components/NeInfoSoftwareInstall.vue | 14 +++++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/constants/ne-constants.ts b/src/constants/ne-constants.ts index 037ece3e..ec2282c9 100644 --- a/src/constants/ne-constants.ts +++ b/src/constants/ne-constants.ts @@ -16,7 +16,9 @@ export const NE_TYPE_LIST = [ 'N3IWF', 'MOCNGW', 'SMSC', + 'SMSF', 'CBC', + 'CHF', ]; /** diff --git a/src/views/system/quick-start/components/NeInfoSoftwareInstall.vue b/src/views/system/quick-start/components/NeInfoSoftwareInstall.vue index 54a3b42c..625991e0 100644 --- a/src/views/system/quick-start/components/NeInfoSoftwareInstall.vue +++ b/src/views/system/quick-start/components/NeInfoSoftwareInstall.vue @@ -7,6 +7,7 @@ import useI18n from '@/hooks/useI18n'; import useDictStore from '@/store/modules/dict'; import { listNeVersion, operateNeVersion } from '@/api/ne/neVersion'; import { RESULT_CODE_SUCCESS } from '@/constants/result-constants'; +import { NE_TYPE_LIST } from '@/constants/ne-constants'; const { t } = useI18n(); const { getDict } = useDictStore(); @@ -139,6 +140,15 @@ async function fnRecordInstall() { const selectRows = state.data.filter(item => state.selectedRowKeys.includes(item.id) ); + //通过sort进行冒泡排序 + selectRows.sort((a: any, b: any) => { + const typeA = NE_TYPE_LIST.indexOf(a.neType); + const typeB = NE_TYPE_LIST.indexOf(b.neType); + if (typeA === -1) return 1; // 如果不在特定顺序中,排到后面 + if (typeB === -1) return -1; // 如果不在特定顺序中,排到后面 + return typeA - typeB; + }); + for (const row of selectRows) { if (row.newVersion === '-' || row.newVersion === '') { state.operateDataUpgrade.push({ @@ -280,9 +290,7 @@ onMounted(() => { {{ t('views.ne.neSoftware.upload') }}