examTeamApp/pageTwo/history/historyDetail.vue

116 lines
1.9 KiB
Vue
Raw Normal View History

2024-05-02 15:59:36 +08:00
<template>
<view>
<view class="box">
<view class="form lanBox">
2024-05-29 16:35:45 +08:00
<view class="lan border-bottom" v-for="(item,index) in ranklist">
2024-05-02 15:59:36 +08:00
<view class="left">
<view class="view">
2024-07-25 16:55:39 +08:00
<view class="t-icon" :class="'t-icon-'+item.key_name" v-if="item.key_name!='score'"></view>
<view class="score" v-else>A</view>
</view>
{{item.name}}
2024-05-02 15:59:36 +08:00
</view>
2024-05-29 16:35:45 +08:00
<view class="right">{{item.value?item.value:"0"}}{{item.unit}}</view>
2024-05-02 15:59:36 +08:00
</view>
</view>
</view>
</view>
</template>
<script>
import {
mapState
} from "vuex";
export default {
data() {
return {
2024-05-29 16:35:45 +08:00
id: "",
type: "",
ranklist: []
2024-05-02 15:59:36 +08:00
};
},
computed: {
2024-05-29 16:35:45 +08:00
...mapState([])
2024-05-02 15:59:36 +08:00
},
onLoad(options) {
// 导航栏颜色
2024-05-29 16:35:45 +08:00
let that = this
that.id = options.id
that.type = options.type
that.getList()
},
methods: {
getList() {
let that = this
that.$model.gethistorydetail({
id: that.id,
type: that.type,
}).then((res) => {
console.log("历史记录详情", res)
this.ranklist = res.data
})
},
2024-05-02 15:59:36 +08:00
}
2024-05-29 16:35:45 +08:00
2024-05-02 15:59:36 +08:00
};
</script>
<style scoped="scoped" lang="scss">
.box {
min-height: 100vh;
background-color: #fff;
}
.lanBox {
padding: 0px 15px 0;
}
.lan {
display: flex;
align-items: center;
2024-08-05 10:01:06 +08:00
font-size: 32rpx;
2024-05-02 15:59:36 +08:00
height: 50px;
line-height: 50px;
justify-content: space-between;
border-bottom: 1px solid #f7f7f7;
.left {
display: flex;
align-items: center;
text-align: left;
2024-08-05 10:01:06 +08:00
font-size: 32rpx;
2024-05-02 15:59:36 +08:00
padding-left: 30px;
.view {
width: 18px;
height: 18px;
position: absolute;
left: 15px;
padding: 2px;
background-color: #c7c7c7;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
}
.t-icon,
image {
width: 16px;
height: 16px;
}
}
.right {
display: flex;
align-items: center;
justify-content: flex-end;
width: 50%;
min-height: 38px;
box-sizing: border-box;
line-height: 36px;
}
}
</style>