处理语法的问题
This commit is contained in:
@@ -226,7 +226,7 @@ export default {
|
||||
},
|
||||
|
||||
combineAndSortAndTakeTop50(arr1, arr2, personnelType) {
|
||||
const combinedArray = [...arr1, ...arr2];
|
||||
const combinedArray = arr1.concat(arr2);
|
||||
let processedArray = [];
|
||||
|
||||
if(personnelType === "department") {
|
||||
@@ -258,7 +258,8 @@ export default {
|
||||
|
||||
let filteredArrayMap = filteredArray.map(item => {
|
||||
if (departmentsToReplace.includes(item.departName)) {
|
||||
return { ...item, departName: "公共事务中心" };
|
||||
item.departName = "公共事务中心";
|
||||
return item;
|
||||
}
|
||||
return item;
|
||||
});
|
||||
@@ -278,13 +279,15 @@ export default {
|
||||
const currentValue = parseFloat(item.value);
|
||||
if (index === 0) {
|
||||
previousValue = currentValue;
|
||||
return { ...item, rank: currentRank };
|
||||
item.rank = currentRank;
|
||||
return item;
|
||||
} else {
|
||||
if (currentValue !== previousValue) {
|
||||
currentRank++;
|
||||
}
|
||||
previousValue = currentValue;
|
||||
return { ...item, rank: currentRank };
|
||||
item.rank = currentRank;
|
||||
return item;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user