贡献排行的机构处理问题

This commit is contained in:
daihh
2022-10-23 17:50:42 +08:00
parent 855a2ac709
commit 2b7aff67b7
4 changed files with 58 additions and 41 deletions

View File

@@ -121,6 +121,7 @@ import apiPraises from '@/api/modules/praises.js';
import apiShares from '@/api/modules/shares.js'; import apiShares from '@/api/modules/shares.js';
import apiFavorites from '@/api/modules/favorites.js'; import apiFavorites from '@/api/modules/favorites.js';
import editItems from '@/components/Article/editItems.vue'; import editItems from '@/components/Article/editItems.vue';
import {cutOrgNamePath} from "@/utils/tools.js";
import "quill/dist/quill.core.css"; import "quill/dist/quill.core.css";
import "quill/dist/quill.snow.css"; import "quill/dist/quill.snow.css";
import "quill/dist/quill.bubble.css"; import "quill/dist/quill.bubble.css";
@@ -215,22 +216,26 @@ export default {
this.diagSync=true this.diagSync=true
}, },
getAnkingData() { getAnkingData() {
let $this=this;
apiArticle.countsUsername(5).then(res => { apiArticle.countsUsername(5).then(res => {
if (res.status == 200) { if (res.status == 200) {
this.ankingList = res.result;
let ids = []; let ids = [];
this.ankingList.forEach(item =>{ res.result.forEach(item =>{
item.orinfo='';
ids.push(item.sysCreateAid); ids.push(item.sysCreateAid);
}) })
apiUser.getByIds(ids).then(res=>{ $this.ankingList = res.result;
res.result.forEach(item=>{ apiUser.getByIds(ids).then(rs=>{
this.ankIds.push(item.orgInfo); rs.result.forEach(u=>{
this.ankingList.forEach((value, index) => { $this.ankingList.forEach((sub) => {
value['orinfo'] = this.ankIds[index]; if(sub.sysCreateAid=u.aid){
}) sub.orinfo=cutOrgNamePath(u.orgInfo);
}
})
}) })
// console.log(this.ankingList); // console.log(this.ankingList);
}) })
} }
}); });
}, },

View File

@@ -136,6 +136,7 @@ import apiSearchterm from '@/api/modules/searchterm.js';
import articleImage from '@/components/Article/articleImage.vue'; import articleImage from '@/components/Article/articleImage.vue';
import editItems from '@/components/Article/editItems.vue'; import editItems from '@/components/Article/editItems.vue';
import apiPlace from "@/api/phase2/place.js" import apiPlace from "@/api/phase2/place.js"
import {cutOrgNamePath} from "@/utils/tools.js";
export default { export default {
name: 'index', name: 'index',
components: { editItems,portalHeader, portalFooter,articleImage, portalFloatTools, interactBar, timeShow, author }, components: { editItems,portalHeader, portalFooter,articleImage, portalFloatTools, interactBar, timeShow, author },
@@ -389,22 +390,26 @@ export default {
}); });
}, },
getAnkingData() { getAnkingData() {
let $this=this;
apiArticle.countsUsername(5).then(res => { apiArticle.countsUsername(5).then(res => {
if (res.status == 200) { if (res.status == 200) {
this.ankingList = res.result;
let ids = []; let ids = [];
this.ankingList.forEach(item =>{ res.result.forEach(item =>{
item.orinfo='';
ids.push(item.sysCreateAid); ids.push(item.sysCreateAid);
}) })
apiUser.getByIds(ids).then(res=>{ $this.ankingList = res.result;
res.result.forEach(item=>{ apiUser.getByIds(ids).then(rs=>{
this.ankIds.push(item.orgInfo); rs.result.forEach(u=>{
this.ankingList.forEach((value, index) => { $this.ankingList.forEach((sub) => {
value['orinfo'] = this.ankIds[index]; if(sub.sysCreateAid=u.aid){
}) sub.orinfo=cutOrgNamePath(u.orgInfo);
}
})
}) })
// console.log(this.ankingList); // console.log(this.ankingList);
}) })
} }
}); });

View File

@@ -292,6 +292,7 @@ import apiPraise from "@/api/modules/praises.js";
import apiFavorites from "@/api/modules/favorites.js"; import apiFavorites from "@/api/modules/favorites.js";
import apiMessage from "@/api/system/message.js"; import apiMessage from "@/api/system/message.js";
import apiPlace from "@/api/phase2/place.js" import apiPlace from "@/api/phase2/place.js"
import {cutOrgNamePath} from "@/utils/tools.js";
export default { export default {
name: "answer", name: "answer",
components: { components: {
@@ -409,22 +410,25 @@ export default {
this.getAnswerList(false); this.getAnswerList(false);
}, },
getAnkingData() { getAnkingData() {
let $this=this;
apiQa.queryList(5).then(res => { apiQa.queryList(5).then(res => {
if (res.status == 200) { if (res.status == 200) {
this.ankingList = res.result; let ids = [];
let ids = []; res.result.forEach(item =>{
this.ankingList.forEach(item =>{ item.orinfo='';
ids.push(item.sysCreateAid); ids.push(item.sysCreateAid);
}) })
apiUser.getByIds(ids).then(res=>{ $this.ankingList = res.result;
res.result.forEach(item=>{ apiUser.getByIds(ids).then(rs=>{
this.ankIds.push(item.orgInfo); rs.result.forEach(u=>{
this.ankingList.forEach((value, index) => { $this.ankingList.forEach((sub) => {
value['orinfo'] = this.ankIds[index]; if(sub.sysCreateAid=u.aid){
}) sub.orinfo=cutOrgNamePath(u.orgInfo);
}) }
// console.log(this.ankingList); })
}) })
// console.log(this.ankingList);
})
} }
}); });
}, },

View File

@@ -144,6 +144,7 @@ import apiQa from '@/api/modules/qa.js';
import apiUser from '@/api/system/user.js'; import apiUser from '@/api/system/user.js';
import apiSearchterm from '@/api/modules/searchterm.js'; import apiSearchterm from '@/api/modules/searchterm.js';
import apiPlace from "@/api/phase2/place.js" import apiPlace from "@/api/phase2/place.js"
import {cutOrgNamePath} from "@/utils/tools.js";
export default { export default {
name: 'qaindex', name: 'qaindex',
components: { portalHeader, portalFooter, portalFloatTools, WxEditor, addQuestion, author, interactBar, timeShow }, components: { portalHeader, portalFooter, portalFloatTools, WxEditor, addQuestion, author, interactBar, timeShow },
@@ -419,23 +420,25 @@ export default {
this.$router.push({ path: '/qa/answer', query: { id: data.id } }); this.$router.push({ path: '/qa/answer', query: { id: data.id } });
}, },
getAnkingData() { getAnkingData() {
let $this=this;
apiQa.queryList(5).then(res => { apiQa.queryList(5).then(res => {
if (res.status == 200) { if (res.status == 200) {
this.ankingList = res.result;
this.ankingList = res.result;
let ids = []; let ids = [];
this.ankingList.forEach(item =>{ res.result.forEach(item =>{
item.orinfo='';
ids.push(item.sysCreateAid); ids.push(item.sysCreateAid);
}) })
apiUser.getByIds(ids).then(res=>{ $this.ankingList = res.result;
res.result.forEach(item=>{ apiUser.getByIds(ids).then(rs=>{
this.ankIds.push(item.orgInfo); rs.result.forEach(u=>{
this.ankingList.forEach((value, index) => { $this.ankingList.forEach((sub) => {
value['orinfo'] = this.ankIds[index]; if(sub.sysCreateAid=u.aid){
}) sub.orinfo=cutOrgNamePath(u.orgInfo);
}
})
}) })
// console.log(this.ankingList); // console.log(this.ankingList);
}) })
} }
}); });
} }