fix: license重新申请差异比较

This commit is contained in:
caiyuchao
2025-08-06 10:22:08 +08:00
parent f2ef4e5491
commit c2c1a1dcfe

View File

@@ -24,6 +24,12 @@ const columns = [
dataIndex: 'neListMap', dataIndex: 'neListMap',
key: 'neListMap', key: 'neListMap',
customRender: (data: any) => { customRender: (data: any) => {
if (!data.value.old) {
data.value.old = [];
}
if (!data.value.new) {
data.value.new = [];
}
const oldDict = h(DictTagGroup, { const oldDict = h(DictTagGroup, {
type: [ type: [
DICT_TYPE.LIC_NE_ALL, DICT_TYPE.LIC_NE_ALL,
@@ -34,18 +40,26 @@ const columns = [
], ],
value: data.value.old, value: data.value.old,
}); });
if (data.value.new) { function arrayEquals(arr1: any[], arr2: any[]) {
const newDict = h(DictTagGroup, { if (arr1.length !== arr2.length) {
type: [ return false;
DICT_TYPE.LIC_NE_ALL, }
DICT_TYPE.LIC_NE_5G, return arr1.some((item) => arr2.includes(item));
DICT_TYPE.LIC_NE_4G, }
DICT_TYPE.LIC_NE_23G, if (!arrayEquals(data.value.old, data.value.new)) {
DICT_TYPE.LIC_NE_ADD, const newDict = data.value.new
], ? h(DictTagGroup, {
color: 'red', type: [
value: data.value.new, 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( const after = h(
'span', 'span',
{ {
@@ -65,7 +79,10 @@ const columns = [
dataIndex: 'activationCodeMap', dataIndex: 'activationCodeMap',
key: 'activationCodeMap', key: 'activationCodeMap',
customRender: (data: any) => { customRender: (data: any) => {
if (data.value.new) { if (!data.value.new) {
data.value.new = '';
}
if (data.value.old !== data.value.new) {
const after = h( const after = h(
'span', 'span',
{ {