mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-14 05:16:43 +08:00
贡献排行的机构处理问题
This commit is contained in:
@@ -292,6 +292,7 @@ import apiPraise from "@/api/modules/praises.js";
|
||||
import apiFavorites from "@/api/modules/favorites.js";
|
||||
import apiMessage from "@/api/system/message.js";
|
||||
import apiPlace from "@/api/phase2/place.js"
|
||||
import {cutOrgNamePath} from "@/utils/tools.js";
|
||||
export default {
|
||||
name: "answer",
|
||||
components: {
|
||||
@@ -409,22 +410,25 @@ export default {
|
||||
this.getAnswerList(false);
|
||||
},
|
||||
getAnkingData() {
|
||||
let $this=this;
|
||||
apiQa.queryList(5).then(res => {
|
||||
if (res.status == 200) {
|
||||
this.ankingList = res.result;
|
||||
let ids = [];
|
||||
this.ankingList.forEach(item =>{
|
||||
ids.push(item.sysCreateAid);
|
||||
})
|
||||
apiUser.getByIds(ids).then(res=>{
|
||||
res.result.forEach(item=>{
|
||||
this.ankIds.push(item.orgInfo);
|
||||
this.ankingList.forEach((value, index) => {
|
||||
value['orinfo'] = this.ankIds[index];
|
||||
})
|
||||
})
|
||||
// console.log(this.ankingList);
|
||||
let ids = [];
|
||||
res.result.forEach(item =>{
|
||||
item.orinfo='';
|
||||
ids.push(item.sysCreateAid);
|
||||
})
|
||||
$this.ankingList = res.result;
|
||||
apiUser.getByIds(ids).then(rs=>{
|
||||
rs.result.forEach(u=>{
|
||||
$this.ankingList.forEach((sub) => {
|
||||
if(sub.sysCreateAid=u.aid){
|
||||
sub.orinfo=cutOrgNamePath(u.orgInfo);
|
||||
}
|
||||
})
|
||||
})
|
||||
// console.log(this.ankingList);
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user