This commit is contained in:
zhaofang
2022-09-19 19:01:22 +08:00
parent a0c8cae37d
commit cff824f00e

View File

@@ -26,7 +26,6 @@
</div>
<div class="medal-img">
<medal-img style="width:186px;height:210px" :item="medal"></medal-img>
<!-- <img style="width:186px;height:210px" src="/images/medal.png"/> -->
</div>
</div>
<div class="medal-steps">
@@ -36,23 +35,26 @@
</div>
<el-table
:data="tableData"
style="width: 100%">
<el-table-column
prop="date" angin="center"
label="勋章"
width="180">
</el-table-column>
style="width: 100%;height:200px;overflow-y: auto;">
<el-table-column
prop="name" angin="center"
label="勋章"
width="180">
<template slot-scope="scope">
<medal-img class="table-medal" style="width:46px;height:52px" :item="medal"></medal-img>
</template>
</el-table-column>
<el-table-column
prop="level" angin="center"
label="等级"
width="180">
</el-table-column>
<el-table-column
prop="address" angin="center"
prop="remark" angin="center"
label="获得条件">
</el-table-column>
<el-table-column
prop="address" angin="center"
prop="num" angin="center"
label="获得人数">
</el-table-column>
</el-table>
@@ -89,7 +91,30 @@
goView(item) {
this.dialogVisible = true;
this.medal = item;
console.log(item,'item');
for (let index = 0; index < item.medalLevel; index++) {
// if(item.medalId == 1){
// console.log(item['curValue'+index+1],'item[');
// item.remark = '累计学习'+item['curValue'+index+1]+'h';
// }
// if(item.medalId == 2){
// item.remark = `连续${item[curValue][index]}天活跃且学习时长>=10分钟`;
// }
// if(item.medalId == 3){
// item.remark = `累计上传${item[curValue][index]}个知识(课程、文章、笔记)`;
// }
// if(item.medalId == 4){
// item.remark = `累计被赞${item[curValue][index]}次`;
// }
this.tableData.push({
medalIcon:item.medalIcon,
medalLevel:index,
medalName:item.medalName,
level:index,
remark:item.requirement,
num:'todo'
})
}
},
getMedal() {
apiStat.userMedal(this.userInfo.aid).then(res=>{
@@ -106,6 +131,12 @@
</script>
<style lang="scss" scoped>
::v-deep .table-medal{
.medal-text{
display: none;
font-size: 12px;
}
}
::v-deep .el-dialog{
border-radius: 27px !important;
}
@@ -133,6 +164,12 @@
::v-deep .el-table th.el-table__cell.is-leaf {
border-bottom: 1px solid #fcfcfc;
}
::v-deep .el-table td.el-table__cell{
border-bottom: 1px solid #fcfcfc;
}
::v-deep .el-table::before{
background-color: none;
}
.medal-steps{
margin: 34px 0 60px 0;
::v-deep .el-step__icon-inner{