From c2c1a1dcfed4059c2712226d88a31ff0d73d4338 Mon Sep 17 00:00:00 2001 From: caiyuchao Date: Wed, 6 Aug 2025 10:22:08 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20license=E9=87=8D=E6=96=B0=E7=94=B3?= =?UTF-8?q?=E8=AF=B7=E5=B7=AE=E5=BC=82=E6=AF=94=E8=BE=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../license/license/components/detail.vue | 43 +++++++++++++------ 1 file changed, 30 insertions(+), 13 deletions(-) diff --git a/apps/web-antd/src/views/license/license/components/detail.vue b/apps/web-antd/src/views/license/license/components/detail.vue index 132ade0..35ac83f 100644 --- a/apps/web-antd/src/views/license/license/components/detail.vue +++ b/apps/web-antd/src/views/license/license/components/detail.vue @@ -24,6 +24,12 @@ const columns = [ dataIndex: 'neListMap', key: 'neListMap', customRender: (data: any) => { + if (!data.value.old) { + data.value.old = []; + } + if (!data.value.new) { + data.value.new = []; + } const oldDict = h(DictTagGroup, { type: [ DICT_TYPE.LIC_NE_ALL, @@ -34,18 +40,26 @@ const columns = [ ], value: data.value.old, }); - if (data.value.new) { - const newDict = h(DictTagGroup, { - type: [ - DICT_TYPE.LIC_NE_ALL, - DICT_TYPE.LIC_NE_5G, - DICT_TYPE.LIC_NE_4G, - DICT_TYPE.LIC_NE_23G, - DICT_TYPE.LIC_NE_ADD, - ], - color: 'red', - value: data.value.new, - }); + function arrayEquals(arr1: any[], arr2: any[]) { + if (arr1.length !== arr2.length) { + return false; + } + return arr1.some((item) => arr2.includes(item)); + } + if (!arrayEquals(data.value.old, data.value.new)) { + const newDict = data.value.new + ? h(DictTagGroup, { + type: [ + DICT_TYPE.LIC_NE_ALL, + DICT_TYPE.LIC_NE_5G, + DICT_TYPE.LIC_NE_4G, + DICT_TYPE.LIC_NE_23G, + DICT_TYPE.LIC_NE_ADD, + ], + color: 'red', + value: data.value.new, + }) + : ''; const after = h( 'span', { @@ -65,7 +79,10 @@ const columns = [ dataIndex: 'activationCodeMap', key: 'activationCodeMap', customRender: (data: any) => { - if (data.value.new) { + if (!data.value.new) { + data.value.new = ''; + } + if (data.value.old !== data.value.new) { const after = h( 'span', {