<template>

    <view>
		
		<view class="info-box">
			<view><h3>{{data.title}}</h3></view>
			<view>试卷总分：{{ data.totalScore }}分</view>
			<view>及格分数：{{ data.qualifyScore }}分</view>
			<view>考试用时：{{data.userTime}}分钟</view>
			<view>考试得分：{{data.userScore}}分</view>
			
			<view class="desc-box">
			  考试结果：
			  <view v-if="data.userScore >= data.qualifyScore" class="desc-box">
				<icon type="success" size="16" color="#09BB07" /> 
				<text class="text">合格</text>
			  </view>
			  <view v-else>
				  <view v-if="data.state==1" class="desc-box">
					 <icon type="waiting" size="16" color="#FF8000" /> 
					 <text class="text">待阅卷</text>
				  </view>
				  <view v-else class="desc-box">
					  <icon type="warn" size="16" color="#FF0000" /> 
					  <text class="text">不合格</text>
				  </view>
			  </view>
			</view>
			
			<view v-if="data.hasSaq && data.state==1">
			  阅卷提示：<text style="color: #FF8000; ">阅卷后将重新累计分数，请耐心等候！</text>
			</view>
			<view v-if="data.reviewer_dictText!=null && data.reviewer_dictText!=''">阅卷老师：{{data.reviewer_dictText}}</view>
			<view v-if="data.remark!=null && data.remark!=''">阅卷评语：{{data.remark}}</view>
			
		</view>
		
		
		<view v-for="group in data.groupList">
			
			<view class="group-title">
				<view>{{group.title}} </view>
				<view>共{{group.quCount}}题，总{{group.totalScore}}分</view>
			</view>
			
			<view v-for="item in group.quList">
				<qu-item-show :value="item"></qu-item-show>
			</view>
			
			
		</view>
		
		
		
	</view>

</template>

<script>

import QuItemShow from "./QuItemShow.vue"

export default {
  name: 'ResultDetail',
  components: { QuItemShow },
  props: {
    data: Object
  },
  data() {
    return {
      postForm: {
        resultType: null,
        groupList: []
      }
    }
  },
  created() {
    this.postForm = this.data
  },
  methods: {

  }
}
</script>


<style>
	.container {
		font-size: 16rpx;
		line-height: 30px;
		padding: 15px;
	}
	
	.info-box{
		/* border-bottom: #efefef 10px solid; */
		font-size: 16px; 
		padding-bottom: 10px; 
		margin-bottom: 60px;
		/* margin-top: -25px; */
	}
	
	.dqu-item{
		
		border-bottom: #eee 1px solid;
		padding-bottom: 10px; 
		margin-bottom: 30px;
	}
	
	.group-title{
		background: #eee; 
		padding: 10px; 
		color: #555; 
		margin-bottom: 20px; 
		font-weight: 700;
		display: flex;
		align-items: center;
	}
	
	.group-title :first-child {
		flex-grow: 1;
	}
	
	.uni-card{
		margin: 10px 0px !important;
	}
	
</style>