| | |
| | | <template> |
| | | <div class="examination" v-loading="!cardData.length"> |
| | | <div class="examination" v-loading="loading"> |
| | | <div |
| | | v-for="(item, nindex) in cardData" |
| | | :key="nindex" |
| | |
| | | :src="getPublicImage(content.img, 115)" |
| | | v-show="content.img" |
| | | :preview-src-list="[getPublicImage(content.img)]" |
| | | v-if="isReal" |
| | | ></el-image> |
| | | <img :src="content.img" alt="" v-if="!isReal" class="radio-img"> |
| | | </p> |
| | | <p |
| | | class="optionContent" |
| | |
| | | </ul> |
| | | </div> |
| | | <div class="bottom-btn" v-if="!loading"> |
| | | <el-button class="btn-box" @click="saveAnswer">保存</el-button> |
| | | <el-button class="examinations-btn-box" @click="saveAnswer">保存</el-button> |
| | | <el-button |
| | | @click="handleQuestion" |
| | | class="btn-box" |
| | | class="examinations-btn-box" |
| | | :style="{ borderColor: primaryColor }" |
| | | >提交</el-button |
| | | > |
| | | <el-button @click="redo" class="btn-box">重做</el-button> |
| | | <el-button @click="redo" class="examinations-btn-box">重做</el-button> |
| | | <el-button |
| | | @click="openAnswers" |
| | | class="btn-box" |
| | | class="examinations-btn-box" |
| | | :style="{ borderColor: primaryColor }" |
| | | >查看答案</el-button |
| | | > |
| | |
| | | page: { |
| | | type: Number, |
| | | }, |
| | | isReal:{ |
| | | type:Boolean, |
| | | default:true |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | type: "option", |
| | | loading: false, |
| | | cardData:[] |
| | | cardData:[], |
| | | loading:true, |
| | | |
| | | }; |
| | | }, |
| | | watch:{ |
| | | cardList:{ |
| | | handler(newVal) { |
| | | console.log('11',newVal); |
| | | } |
| | | this.cardData = this.cardList |
| | | if(newVal && newVal.length) { |
| | | this.loading = false |
| | | } |
| | | }, |
| | | immediate:true, |
| | | deep:true |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.cardData = this.cardList |
| | | console.log('this.cardList',this.cardList); |
| | | console.log('this.cardData',this.cardData); |
| | | // this.cardData = this.cardList |
| | | // console.log('this.cardList',this.cardList); |
| | | // console.log('this.cardData',this.cardData); |
| | | }, |
| | | methods: { |
| | | // 数组转为字符串方法 |
| | |
| | | list-style: none; |
| | | } |
| | | } |
| | | .btn-box { |
| | | .examinations-btn-box { |
| | | height: 30px; |
| | | width: 78px; |
| | | padding: 4px 10px; |
| | |
| | | margin-top: 10px; |
| | | } |
| | | } |
| | | .radio-img { |
| | | width: 200px; |
| | | object-fit: contain; |
| | | } |
| | | </style> |