|
@@ -816,6 +816,15 @@ export default {
|
|
|
let bScore = b.hasOwnProperty(this.tType==2?'ownScore':'sum') ? this.tType=='2'?b.ownScore:b.sum===0?Number.MAX_VALUE: parseFloat(b.sum) : Number.MAX_VALUE;
|
|
|
return aScore - bScore;
|
|
|
})
|
|
|
+
|
|
|
+ // 如果是管理员则再排序一次
|
|
|
+ if(this.tType=='0'){
|
|
|
+ p.sort((a,b)=>{
|
|
|
+ let aScore = a.scoreList.length>=2?-1:a.scoreList.length==1?a.scoreList[0].score:Number.MAX_VALUE;
|
|
|
+ let bScore = b.scoreList.length>=2?-1:a.scoreList.length==1?a.scoreList[0].score:Number.MAX_VALUE;
|
|
|
+ return aScore - bScore;
|
|
|
+ })
|
|
|
+ }
|
|
|
}else if(this.scoreFn===2){//降序
|
|
|
//降序
|
|
|
p.sort((a, b) => {
|
|
@@ -823,18 +832,24 @@ export default {
|
|
|
let bScore = b.hasOwnProperty(this.tType==2?'ownScore':'sum') ? this.tType=='2'?b.ownScore:b.sum===0?-1: parseFloat(b.sum) : -1;
|
|
|
return bScore - aScore;
|
|
|
});
|
|
|
+ // 如果是管理员则再排序一次
|
|
|
+ if(this.tType=='0'){
|
|
|
+ p.sort((a,b)=>{
|
|
|
+ let aScore = a.scoreList.length>=2?Number.MAX_VALUE:a.scoreList.length==1?a.scoreList[0].score:-1;
|
|
|
+ let bScore = b.scoreList.length>=2?Number.MAX_VALUE:a.scoreList.length==1?a.scoreList[0].score:-1;
|
|
|
+ return bScore - aScore;
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
sessionStorage.setItem("allScoreList",JSON.stringify(p.map(i=>i.id)))
|
|
|
|
|
|
const start = (this.page - 1) * 10;
|
|
|
const end = start + 10;
|
|
|
let result = p.slice(start, end);
|
|
|
|
|
|
- console.log("==============================")
|
|
|
- console.log(result)
|
|
|
- console.log("++++++++++++++++++++++++++++++")
|
|
|
-
|
|
|
result.forEach(i=>{
|
|
|
let typeName = i.typename;
|
|
|
if(typeName=="活动类" || typeName =="学科类")return;
|
|
@@ -843,11 +858,9 @@ export default {
|
|
|
// console.log(typeName.indexOf("理科类"))
|
|
|
if(typeName.indexOf("活动类")!=-1){
|
|
|
replaceValue = typeName.replace("活动类","")
|
|
|
- console.log(replaceValue.split('/'))
|
|
|
typeName = `活动类:${replaceValue.split('/').filter(f=>f!=='').join('/')}`
|
|
|
}else if(typeName.indexOf("学科类")!=-1){
|
|
|
replaceValue = typeName.replace("学科类","")
|
|
|
- console.log(replaceValue.split('/'))
|
|
|
typeName = `学科类:${replaceValue.split('/').filter(f=>f!=='').join('/')}`
|
|
|
}
|
|
|
i.typename = typeName;
|