|
@@ -16,9 +16,9 @@
|
|
|
</template>
|
|
|
</w-swiper>
|
|
|
<view class="exam-submit-btn" v-if="current === list.length-1"
|
|
|
- @click="handleSubmit(uniPointsRef,popupRef)"></view>
|
|
|
+ @click="handleSubmit(uniPointsRef)"></view>
|
|
|
</view>
|
|
|
-
|
|
|
+
|
|
|
<!-- 左右滑动 -->
|
|
|
<view class="tip-mask-box" @click="handleCloseTishi" v-if="showTishi">
|
|
|
<view class="exam-tip-box">左右滑动查看更多题目</view>
|
|
@@ -29,12 +29,16 @@
|
|
|
<chengji ref="chengjiRef" :list="list" @back="handleBack"></chengji>
|
|
|
<!-- 分数弹窗 -->
|
|
|
<uniPointsVue ref="uniPointsRef" @checkAnswer="checkAnswer" @goStudy="goStudyContinue" :isLastZhang="!!haveFlag" :studyFlag="studyFlag"></uniPointsVue>
|
|
|
+ <!-- 填空 -->
|
|
|
+ <FillItem :value="result" ref="popupRef" @blur="onBlur"></FillItem>
|
|
|
+
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
+ import FillItem from "@/components/question/FillItem.vue";
|
|
|
import wSwiper from '@/components/wSwiper/wSwiper.vue';
|
|
|
import danxuan from "@/components/question/danxuan.vue";
|
|
|
import panduan from "@/components/question/panduan.vue";
|
|
@@ -52,7 +56,8 @@
|
|
|
ref,
|
|
|
} from "vue";
|
|
|
import cacheManager from "@/utils/cacheManager";
|
|
|
-
|
|
|
+ import {onLoad} from "@dcloudio/uni-app"
|
|
|
+
|
|
|
const {
|
|
|
count,
|
|
|
total,
|
|
@@ -76,8 +81,31 @@
|
|
|
|
|
|
const uniPointsRef = ref(null);
|
|
|
const chengjiRef = ref(null);
|
|
|
- const popupRef = ref(null);
|
|
|
-
|
|
|
+ const popupRef= ref(null);
|
|
|
+ const result = ref('');
|
|
|
+ const curTiankong = ref(null);
|
|
|
+
|
|
|
+ function getPopupRef() {
|
|
|
+ return popupRef.value;
|
|
|
+ }
|
|
|
+ onLoad(() => {
|
|
|
+ uni.$on('tiankong-fillItem',(val) => {
|
|
|
+ const {index,question} = val;
|
|
|
+ curTiankong.value = val;
|
|
|
+ result.value = question.reply[index];
|
|
|
+ const dom = getPopupRef();
|
|
|
+ dom && dom.showPopup();
|
|
|
+ })
|
|
|
+
|
|
|
+ })
|
|
|
+ function onBlur({result}) {
|
|
|
+ if (curTiankong.value) {
|
|
|
+ uni.$emit('tiankong-setResult', {index: curTiankong.value.index,stId:curTiankong.value.question.stId,result});
|
|
|
+ }
|
|
|
+ const dom = getPopupRef();
|
|
|
+ dom && dom.handleClear();
|
|
|
+ }
|
|
|
+
|
|
|
// 查看答案
|
|
|
function checkAnswer() {
|
|
|
chengjiRef.value.showPopup();
|