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', {