mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-18 23:36:44 +08:00
Merge branch 'stat' of https://codeup.aliyun.com/6265f483e4166464dc2f9c14/boeu/portal into stat
This commit is contained in:
@@ -46,11 +46,12 @@
|
||||
:total="total"
|
||||
></el-pagination></div>
|
||||
<div v-else>
|
||||
<div v-if="pageData.list.length == 0">
|
||||
<div v-if="isSearh" class="zan-wu">没有查询到相关内容</div>
|
||||
<div v-else class="zan-wu">暂无数据</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="pageData.list.length == 0" class="home-no-list">
|
||||
<img class="img" style="width:360px;height:226px" :src="`${webBaseUrl}/images/homeWu/no-madel.png`" alt="" srcset=""/>
|
||||
<div v-if="isSearh" class="zan-wu">没有查询到相关内容</div>
|
||||
<div v-else class="zan-wu">你还没有发布文章~</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<el-dialog title="创建文章" :visible.sync="diagSync" :close-on-click-modal="false" width="900px" custom-class="g-dialog">
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
<div class="lev-li">
|
||||
<div class="li-img"><author-img :avatar="rep.authorInfo.avatar" :aid="rep.authorInfo.aid" :sex="rep.authorInfo.sex"></author-img></div>
|
||||
<div class="li-text">
|
||||
<p class="portal-title-tow">{{rep.authorInfo.name}} <span class="portal-summary-text">个性签名:不要期待,不要假想</span></p>
|
||||
<p class="portal-title-tow">{{rep.authorInfo.name}} <span class="portal-summary-text">个性签名:{{rep.authorInfo.sign}}</span></p>
|
||||
<p>{{rep.content}}</p>
|
||||
</div>
|
||||
<div class="li-right">
|
||||
@@ -162,7 +162,7 @@
|
||||
res.result.list.forEach(item=>{
|
||||
item.replysList = [];
|
||||
item.isReplys = false;
|
||||
item.authorInfo = { aid: "",name: "",orgInfo: "",avatar: "",sex: null }
|
||||
item.authorInfo = { aid: "",name: "",orgInfo: "",avatar: "",sex: null,sign:'' }
|
||||
if(item.replys != '') {
|
||||
item.replysList = JSON.parse(item.replys);
|
||||
}
|
||||
@@ -189,24 +189,45 @@
|
||||
})
|
||||
},
|
||||
getUserData(list) {
|
||||
let ids = list.map(item=> item.aid);
|
||||
const noReapetIds = [...new Set(ids)];
|
||||
apiUser.getByIds(noReapetIds).then(res => {
|
||||
if (res.status == 200) {
|
||||
list.forEach((item, index) => {
|
||||
res.result.some(author => {
|
||||
if (author.aid == item.aid) {
|
||||
item.authorInfo = author;
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
} else {
|
||||
this.$message.error(res.message);
|
||||
}
|
||||
});
|
||||
if(this.pageId == this.userInfo.aid) {
|
||||
let ids = list.map(item=> item.aid);
|
||||
const noReapetIds = [...new Set(ids)];
|
||||
apiUser.getByIds(noReapetIds).then(res => {
|
||||
if (res.status == 200) {
|
||||
list.forEach((item, index) => {
|
||||
res.result.some(author => {
|
||||
if (author.aid == item.aid) {
|
||||
item.authorInfo = author;
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
} else {
|
||||
this.$message.error(res.message);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
let ids = list.map(item=> item.sysCreateAid);
|
||||
const noReapetIds = [...new Set(ids)];
|
||||
apiUser.getByIds(noReapetIds).then(res => {
|
||||
if (res.status == 200) {
|
||||
list.forEach((item, index) => {
|
||||
res.result.some(author => {
|
||||
if (author.aid == item.sysCreateAid) {
|
||||
item.authorInfo = author;
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
} else {
|
||||
this.$message.error(res.message);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.page.pageSize = val;
|
||||
|
||||
@@ -36,9 +36,10 @@
|
||||
></el-pagination>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div v-if="qaList.length == 0">
|
||||
<div v-if="qaList.length == 0" class="home-no-list">
|
||||
<img class="img" style="width:360px;height:226px" :src="`${webBaseUrl}/images/homeWu/no-madel.png`" alt="" srcset=""/>
|
||||
<div v-if="isSearh" class="zan-wu">没有查询到相关内容</div>
|
||||
<div v-else class="zan-wu">暂无数据</div>
|
||||
<div v-else class="zan-wu">你还没有回答问题哦~</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -78,6 +79,7 @@ export default {
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
||||
getList() {
|
||||
this.queryObj.pageIndex = 1;
|
||||
this.isSearh = true;
|
||||
@@ -90,8 +92,10 @@ export default {
|
||||
.then(res => {
|
||||
if (res.status == 200) {
|
||||
this.total = res.result.count;
|
||||
res = res.result.list;
|
||||
this.qaList = res;
|
||||
res.result.list.forEach(item => {
|
||||
item.isAll = false;
|
||||
});
|
||||
this.qaList = res.result.list;
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
我的排名 : <span> {{learningDurationTotalData.rankNo}}</span>
|
||||
</div>
|
||||
<div class="myexperience">
|
||||
我的学习时长: <span> {{learningDurationTotalData.rankValue}}</span> h
|
||||
我的学习时长: <span> {{formatSecondToHour(learningDurationTotalData.rankValue)}}</span> h
|
||||
</div>
|
||||
</div>
|
||||
<div class="exp-table" style="margin-top:20px;height:600px;overflow-y:auto">
|
||||
@@ -151,10 +151,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="jy tab-jy">
|
||||
<div v-if="learningDuration.field == 'total'" style="font-size: 18px;color: #333333;font-weight: 600;">{{lan.total}}</div>
|
||||
<div v-if="learningDuration.field == 'months'" style="font-size: 18px;color: #333333;font-weight: 600;">{{lan.months}}</div>
|
||||
<div v-if="learningDuration.field == 'years'" style="font-size: 18px;color: #333333;font-weight: 600;">{{lan.years}}</div>
|
||||
<div v-if="learningDuration.field == 'weeks'" style="font-size: 18px;color: #333333;font-weight: 600;">{{lan.weeks}}</div>
|
||||
<div v-if="learningDuration.field == 'total'" style="font-size: 18px;color: #333333;font-weight: 600;">{{formatSecondToHour(lan.total)}}</div>
|
||||
<div v-if="learningDuration.field == 'months'" style="font-size: 18px;color: #333333;font-weight: 600;">{{formatSecondToHour(lan.months)}}</div>
|
||||
<div v-if="learningDuration.field == 'years'" style="font-size: 18px;color: #333333;font-weight: 600;">{{formatSecondToHour(lan.years)}}</div>
|
||||
<div v-if="learningDuration.field == 'weeks'" style="font-size: 18px;color: #333333;font-weight: 600;">{{formatSecondToHour(lan.weeks)}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -275,7 +275,7 @@
|
||||
import apiStat from '@/api/phase2/stat.js';
|
||||
import { mapGetters } from 'vuex';
|
||||
import authorImg from '@/components/Portal/authorImg.vue';
|
||||
import {translate,experienceValue} from "@/utils/tools.js";
|
||||
import {translate,experienceValue,formatSecondToHour} from "@/utils/tools.js";
|
||||
export default {
|
||||
computed: {
|
||||
...mapGetters(['userInfo']),
|
||||
@@ -292,6 +292,7 @@ export default {
|
||||
endValue:0 // 累计经验值进度条最大值
|
||||
},
|
||||
translate,
|
||||
formatSecondToHour:formatSecondToHour,
|
||||
experience:{
|
||||
field:'total',
|
||||
name:'累计',
|
||||
|
||||
Reference in New Issue
Block a user