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,8 +40,15 @@ 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) {
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: [ type: [
DICT_TYPE.LIC_NE_ALL, DICT_TYPE.LIC_NE_ALL,
DICT_TYPE.LIC_NE_5G, DICT_TYPE.LIC_NE_5G,
@@ -45,7 +58,8 @@ const columns = [
], ],
color: 'red', color: 'red',
value: data.value.new, 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',
{ {