发起变更几个插件字段添加
This commit is contained in:
@@ -112,18 +112,19 @@ const aiOrganize = async () => {
|
||||
function uniqueById(arr: any[]) {
|
||||
const seen = new Set();
|
||||
const result = [];
|
||||
for (let i = arr.length - 1; i >= 0; i--) {
|
||||
const item = arr[i];
|
||||
if (!seen.has(item.id)) {
|
||||
seen.add(item.id);
|
||||
result.unshift(item); // 插入到头部,保持原顺序
|
||||
for (const item of arr) {
|
||||
const key = `${item.id}_${item.source}`;
|
||||
if (!seen.has(key)) {
|
||||
seen.add(key);
|
||||
result.push(item);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
return result;
|
||||
}
|
||||
// 整理入表
|
||||
const exportAll = (type: string, items: any[]) => {
|
||||
riskRecords.value = [...riskRecords.value, ...items];
|
||||
console.log(items)
|
||||
riskRecords.value = uniqueById([...riskRecords.value, ...items]);
|
||||
if (type === "all") {
|
||||
pluginDrawer.value = false;
|
||||
currentPlugin.value = '';
|
||||
|
||||
Reference in New Issue
Block a user