发起变更几个插件字段添加

This commit is contained in:
2026-09-17 15:58:05 +08:00
parent 9eff872e14
commit ef8bca3c92
5 changed files with 145 additions and 58 deletions
@@ -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 = '';