|
|
@@ -92,7 +92,8 @@ export default defineComponent({
|
|
|
});
|
|
|
platList().then((r) => {
|
|
|
if (r) {
|
|
|
- achieveList.value = r
|
|
|
+ achieveList.value = r;
|
|
|
+ updateAction()
|
|
|
console.log(achieveList.value)
|
|
|
}
|
|
|
});
|
|
|
@@ -116,11 +117,14 @@ export default defineComponent({
|
|
|
}
|
|
|
return i;
|
|
|
})
|
|
|
+ updateAction()
|
|
|
} else {
|
|
|
achieveList.value = list.map(i => { if (i && i.type == type) { i.items = r, i.count = 0; } return i; });
|
|
|
+ updateAction()
|
|
|
}
|
|
|
} else {
|
|
|
achieveList.value = r;
|
|
|
+ updateAction()
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
@@ -130,7 +134,15 @@ export default defineComponent({
|
|
|
let params = {
|
|
|
id: currentTreeNodeKeys.value.length ? currentTreeNodeKeys.value[0] : null
|
|
|
}
|
|
|
- platList(params).then((r) => { if (r) achieveList.value = r });
|
|
|
+ platList(params).then((r) => { if (r) { achieveList.value = r, updateAction() } });
|
|
|
+ }
|
|
|
+
|
|
|
+ function updateAction() {
|
|
|
+ var type = true;
|
|
|
+ var r = achieveList.value;
|
|
|
+ r.forEach((i) => { if (i.type == 'MR' && i.count) { type = false; activeKey.value = 'MR' } });
|
|
|
+ if (type) r.forEach((i) => { if (i.type == 'ER' && i.count) { type = false; activeKey.value = 'ER' } });
|
|
|
+ if (type) r.forEach((i) => { if (i.type == 'DR' && i.count) { type = false; activeKey.value = 'DR' } });
|
|
|
}
|
|
|
|
|
|
return {
|