This commit is contained in:
zhaofang
2022-09-20 11:02:00 +08:00
parent 596410abef
commit 2626fe7fa2
6 changed files with 95 additions and 65 deletions

View File

@@ -33,27 +33,29 @@
</el-steps>
</div>
<el-table
:data="tableData"
:data="rules"
style="width: 100%;height:200px;overflow-y: auto;">
<el-table-column
prop="name" angin="center"
label="勋章"
width="180">
width="80">
<template slot-scope="scope">
<medal-img class="table-medal" style="width:46px;height:52px" :item="medal"></medal-img>
<img style="width:40px;height:40px" src="/images/medal.png" alt="" srcset="">
<!-- <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">
width="80">
<template slot-scope="scope">LV{{scope.row.level}}</template>
</el-table-column>
<el-table-column
prop="remark" angin="center"
label="获得条件">
</el-table-column>
<el-table-column
prop="num" angin="center"
prop="num" angin="center" width="120"
label="获得人数">
</el-table-column>
</el-table>
@@ -99,32 +101,30 @@
dialogVisible:false,
medalList:[],
medal:{},
tableData:[]
tableData:[],
medalConfig:[],
rules:[],
}
},
mounted() {
this.getMedal()
this.getMedal();
this.getConfig();
},
methods:{
getConfig() {// 获取勋章配置
apiStat.userMedalConfig().then(res=>{
if(res.status == 200) {
this.medalConfig = res.result;
}
})
},
goView(item) {
this.dialogVisible = true;
this.medal = item;
apiStat.userMedalConfig().then(res=>{
if(res.status == 200) {
}
})
for (let index = 0; index < item.medalLevel; index++) {
this.tableData.push({
medalIcon:item.medalIcon,
medalLevel:index,
medalName:item.medalName,
level:index,
remark:item.requirement,
num:'todo'
})
}
let data = this.medalConfig.find(it=>it.id ==item.medalId);
this.rules = JSON.parse(data.rules);
console.log(data,'data');
},
getMedal() {
apiStat.userMedal(this.userInfo.aid).then(res=>{
@@ -192,6 +192,9 @@
background-color: #387DF7;
margin-top: 7px;
}
.el-step__line{
background-color: #387DF7;
}
}
::v-deep .el-step__title.is-finish{

View File

@@ -494,7 +494,7 @@ export default {
title: "完成课程评分",//事件的标题
parameters:"",//用户自定义参数 name:value,name:value
content: "给课程评分",//事件的内容
objId: this.resolveId,//关联的id
objId: this.courseInfo.id,//关联的id
objType: 1,//关联的类型
objInfo: this.courseInfo.name,
aid: this.userInfo.aid, //当前登录人的id