123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- <template>
- <yf-more-list url="/api/paper/paper/my-paging" :params="queryParams" ref="moreList">
- <template v-slot:item="{ data }">
- <uni-list-item
- :note="`得分:${data.userScore}`"
- :rightText="stateText(data)"
- :title="`考试时间:${data.createTime}`"
- link="navigateTo"
- :to="`/pages/paper/detail?id=${data.id}`">
- </uni-list-item>
- </template>
- </yf-more-list>
- </template>
- <script>
- export default {
- components: { },
- data() {
- return {
- queryParams:{
- examId: ''
- }
- }
- },
- onLoad(option) {
- this.queryParams.examId = option.id;
- },
- onShow() {
- if(this.$refs.moreList){
- this.$refs.moreList.initData()
- }
- },
-
- onReachBottom() {
- // 加载数据
- this.$refs.moreList.loadData()
- },
-
- onBackPress(e){
-
- //正常返回页面
- uni.redirectTo({
- url:"/pages/paper/index"
- })
-
- return true;
- },
-
- methods: {
-
- stateText(item){
-
- if(item.state===1){
- return '待阅卷'
- }else{
- if(item.userScore>=item.qualifyScore){
- return '合格'
- }else{
- return '不合格'
- }
- }
- }
- }
- }
- </script>
- <style>
-
- .container {
- font-size: 14rpx;
- }
-
- .exam-item{
- display: flex; align-items: center;
- line-height: 30px;
- }
- .exam-item .left{
- text-align: left;
- flex-grow: 1;
- }
- .exam-item .left .title{
- font-size: 16px;
- }
-
- .exam-item .left .desc{
- font-size: 14px;
- color: #888;
- }
-
- .exam-item .left .icons{
- font-size: 10px;
- display: flex;
- align-items: center;
- color: #666;
- }
- .right {
-
- display: flex;
- align-items: center;
- }
- .pass{
- color: #007AFF !important;
- margin-right: 5px;
- }
-
- .fail{
- color: #ff0000 !important;
- margin-right: 5px;
- }
- </style>
|