|
|
@@ -1,2235 +0,0 @@
|
|
|
-<template>
|
|
|
- <view class="bankExam">
|
|
|
- <swiper
|
|
|
- class="swiper"
|
|
|
- :current="currentIndex"
|
|
|
- @change="swiperChange"
|
|
|
- :interval="interval"
|
|
|
- >
|
|
|
- <swiper-item v-for="(bank, bankIndex) in questionList" :key="bankIndex">
|
|
|
- <view class="pageContent">
|
|
|
- <view class="pad_8 titBox">
|
|
|
- <view class="firstLetter">
|
|
|
- <view class="leftLetters">
|
|
|
- <view class="btnType">
|
|
|
- <text v-if="bank.type == 1">单选</text>
|
|
|
- <text v-if="bank.type == 2">多选</text>
|
|
|
- <text v-if="bank.type == 3">判断</text>
|
|
|
- <text v-if="bank.type == 4">案例</text>
|
|
|
- <text v-if="bank.type == 5">简答</text>
|
|
|
- </view>
|
|
|
- <text>{{ bankIndex + 1 }}/{{ questionList.length }}</text>
|
|
|
- </view>
|
|
|
- <view style="color: #666; font-size: 28rpx">{{
|
|
|
- countdown(lastTime)
|
|
|
- }}</view>
|
|
|
- </view>
|
|
|
- <view class="titles" @click="showPhoto(bank.content)"
|
|
|
- ><rich-text :nodes="bank.content"></rich-text
|
|
|
- ></view>
|
|
|
- </view>
|
|
|
-
|
|
|
- <template v-if="bank.type == 1">
|
|
|
- <view class="pad_8 titBox no-margin">
|
|
|
- <view v-if="!bank.ques">
|
|
|
- <view
|
|
|
- v-for="(item, index) in bank.jsonStr"
|
|
|
- :key="index"
|
|
|
- class="lisSty"
|
|
|
- @click="radioSelect(item.optionsId, bankIndex)"
|
|
|
- >
|
|
|
- <view class="activeTI">{{ ast[index] }}</view>
|
|
|
- <view class="flex_auto"
|
|
|
- >{{ item.content }}
|
|
|
- <view v-if="item.imgUrl">
|
|
|
- <image
|
|
|
- style="width: 600rpx"
|
|
|
- mode="widthFix"
|
|
|
- :src="$method.splitImgHost(item.imgUrl)"
|
|
|
- ></image>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view v-if="bank.ques">
|
|
|
- <view
|
|
|
- v-for="(item, index) in bank.jsonStr"
|
|
|
- :key="index"
|
|
|
- class="lisSty"
|
|
|
- >
|
|
|
- <text
|
|
|
- :class="{
|
|
|
- right:
|
|
|
- item.optionsId == bank.ques ||
|
|
|
- item.optionsId == bank.ans,
|
|
|
- wrong:
|
|
|
- item.optionsId == bank.ques && bank.ques != bank.ans,
|
|
|
- }"
|
|
|
- class="activeTI"
|
|
|
- >
|
|
|
- {{ ast[index] }}
|
|
|
- </text>
|
|
|
- <view class="flex_auto">
|
|
|
- {{ item.content }}
|
|
|
- <view v-if="item.imgUrl">
|
|
|
- <image
|
|
|
- style="width: 600rpx"
|
|
|
- mode="widthFix"
|
|
|
- :src="$method.splitImgHost(item.imgUrl)"
|
|
|
- ></image>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view v-if="bank.ques">
|
|
|
- <view class="pad_8 answer">
|
|
|
- <view>正确答案:{{ ast[bank.ans - 1] }} </view>
|
|
|
- <view>我的答案:{{ ast[bank.ques - 1] }}</view>
|
|
|
- </view>
|
|
|
- <view class="pad_8 answerInfos">
|
|
|
- <view class="answerTitle">答案解析</view>
|
|
|
- <view class="answerContent"
|
|
|
- ><rich-text :nodes="bank.analysisContent"></rich-text
|
|
|
- ></view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </template>
|
|
|
-
|
|
|
- <template v-if="bank.type == 2">
|
|
|
- <view class="pad_8 titBox no-margin">
|
|
|
- <view v-if="!bank.ques">
|
|
|
- <view
|
|
|
- v-for="(item, index) in bank.jsonStr"
|
|
|
- :key="index"
|
|
|
- class="lisSty"
|
|
|
- @click="checkboxSelect(item.optionsId, bankIndex, index)"
|
|
|
- >
|
|
|
- <view :class="{ checked: item.checked }" class="activeTI">{{
|
|
|
- ast[index]
|
|
|
- }}</view>
|
|
|
- <view class="flex_auto">
|
|
|
- {{ item.content }}
|
|
|
- <view v-if="item.imgUrl">
|
|
|
- <image
|
|
|
- style="width: 600rpx"
|
|
|
- mode="widthFix"
|
|
|
- :src="$method.splitImgHost(item.imgUrl)"
|
|
|
- ></image>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view v-if="bank.ques">
|
|
|
- <view
|
|
|
- v-for="(item, index) in bank.jsonStr"
|
|
|
- :key="index"
|
|
|
- class="lisSty"
|
|
|
- >
|
|
|
- <text
|
|
|
- :class="{
|
|
|
- right:
|
|
|
- bank.ques.indexOf(item.optionsId) != -1 ||
|
|
|
- bank.ans.indexOf(item.optionsId) != -1,
|
|
|
- wrong:
|
|
|
- bank.ques.indexOf(item.optionsId) != -1 &&
|
|
|
- bank.ans.indexOf(item.optionsId) == -1,
|
|
|
- }"
|
|
|
- class="activeTI"
|
|
|
- >
|
|
|
- {{ ast[index] }}
|
|
|
- </text>
|
|
|
- <view class="flex_auto">
|
|
|
- {{ item.content }}
|
|
|
- <view v-if="item.imgUrl">
|
|
|
- <image
|
|
|
- style="width: 600rpx"
|
|
|
- mode="widthFix"
|
|
|
- :src="$method.splitImgHost(item.imgUrl)"
|
|
|
- ></image>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view
|
|
|
- v-if="!bank.ques"
|
|
|
- class="submit_checkbox"
|
|
|
- :class="{ disabled: !isCheckboxChecked(bank.jsonStr) }"
|
|
|
- @click="checkboxSubmit(bankIndex)"
|
|
|
- >确认答案</view
|
|
|
- >
|
|
|
- </view>
|
|
|
- <view v-if="bank.ques">
|
|
|
- <view class="pad_8 answer">
|
|
|
- <view>
|
|
|
- 正确答案:
|
|
|
- <text
|
|
|
- v-for="(ansItem, ansIndex) in bank.ans"
|
|
|
- :key="ansIndex"
|
|
|
- >{{ ast[ansItem - 1] }}</text
|
|
|
- >
|
|
|
- </view>
|
|
|
- <view>
|
|
|
- 我的答案:
|
|
|
- <text
|
|
|
- v-for="(quesItem, quesIndex) in bank.ques"
|
|
|
- :key="quesIndex"
|
|
|
- >{{ ast[quesItem - 1] }}</text
|
|
|
- >
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view class="pad_8 answerInfos">
|
|
|
- <view class="answerTitle">答案解析</view>
|
|
|
- <view class="answerContent"
|
|
|
- ><rich-text :nodes="bank.analysisContent"></rich-text
|
|
|
- ></view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </template>
|
|
|
-
|
|
|
- <template v-if="bank.type == 3">
|
|
|
- <view class="pad_8 titBox no-margin">
|
|
|
- <view v-if="!bank.ques">
|
|
|
- <view
|
|
|
- v-for="(item, index) in judge"
|
|
|
- :key="index"
|
|
|
- class="lisSty"
|
|
|
- @click="judgeSelect(index, bankIndex)"
|
|
|
- >
|
|
|
- <view class="activeTI">{{ ast[index] }}</view>
|
|
|
- <view class="flex_auto">
|
|
|
- {{ item }}
|
|
|
- <view v-if="item.imgUrl">
|
|
|
- <image
|
|
|
- style="width: 600rpx"
|
|
|
- mode="widthFix"
|
|
|
- :src="$method.splitImgHost(item.imgUrl)"
|
|
|
- ></image>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view v-if="bank.ques">
|
|
|
- <view
|
|
|
- v-for="(item, index) in judge"
|
|
|
- :key="index"
|
|
|
- class="lisSty"
|
|
|
- >
|
|
|
- <text
|
|
|
- :class="{
|
|
|
- right: index == bank.ques || index == bank.ans,
|
|
|
- wrong: index == bank.ques && bank.ques != bank.ans,
|
|
|
- }"
|
|
|
- class="activeTI"
|
|
|
- >
|
|
|
- {{ ast[index] }}
|
|
|
- </text>
|
|
|
- <view class="flex_auto">
|
|
|
- {{ item }}
|
|
|
- <view v-if="item.imgUrl">
|
|
|
- <image
|
|
|
- style="width: 600rpx"
|
|
|
- mode="widthFix"
|
|
|
- :src="$method.splitImgHost(item.imgUrl)"
|
|
|
- ></image>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view v-if="bank.ques">
|
|
|
- <view class="pad_8 answer">
|
|
|
- <view>正确答案:{{ ast[bank.ans] }}</view>
|
|
|
- <view>我的答案:{{ ast[bank.ques] }}</view>
|
|
|
- </view>
|
|
|
- <view class="pad_8 answerInfos">
|
|
|
- <view class="answerTitle">答案解析</view>
|
|
|
- <view class="answerContent"
|
|
|
- ><rich-text :nodes="bank.analysisContent"></rich-text
|
|
|
- ></view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </template>
|
|
|
-
|
|
|
- <!-- 简答题 -->
|
|
|
- <template v-if="bank.type == 5">
|
|
|
- <view class="pad_8 titBox">
|
|
|
- <view class="ans">
|
|
|
- <view
|
|
|
- class="ans_input"
|
|
|
- v-if="
|
|
|
- !bank.ques ||
|
|
|
- (!bank.ques.imageList.length && !bank.ques.text)
|
|
|
- "
|
|
|
- >
|
|
|
- <view class="top flex">
|
|
|
- <image
|
|
|
- :data-index="bankIndex"
|
|
|
- class="icon"
|
|
|
- @click="chooseImg(bankIndex)"
|
|
|
- src="/static/camera.png"
|
|
|
- mode=""
|
|
|
- ></image>
|
|
|
- <view class="progress"
|
|
|
- >{{ bank.ansText.imageList.length || "0" }}/4</view
|
|
|
- >
|
|
|
- <view
|
|
|
- class="submit"
|
|
|
- :class="{ disabled: !bank.ansText.text && hasImgs(bank) }"
|
|
|
- @click="submitAns(bankIndex)"
|
|
|
- >确认答案</view
|
|
|
- >
|
|
|
- </view>
|
|
|
- <view class="textarea">
|
|
|
- <textarea
|
|
|
- v-model="bank.ansText.text"
|
|
|
- placeholder="在此输入答案"
|
|
|
- ></textarea>
|
|
|
- </view>
|
|
|
- <view class="imgs">
|
|
|
- <view
|
|
|
- class="img"
|
|
|
- v-for="(img, imgIndex) in bank.ansText.imageList"
|
|
|
- :key="imgIndex"
|
|
|
- >
|
|
|
- <text @click="deleteImg(imgIndex, bankIndex)">x</text>
|
|
|
- <image :src="$method.splitImgHost(img, true)"></image>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view
|
|
|
- class="ans_submit answerInfos"
|
|
|
- v-if="
|
|
|
- bank.ques && (bank.ques.imageList.length || bank.ques.text)
|
|
|
- "
|
|
|
- >
|
|
|
- <view class="answerTitle">我的答案:</view>
|
|
|
- {{ bank.ques.text }}
|
|
|
- <view class="imgs"
|
|
|
- ><image
|
|
|
- class="img"
|
|
|
- :key="quesIndex"
|
|
|
- v-for="(ques, quesIndex) in bank.ques.imageList"
|
|
|
- :src="$method.splitImgHost(ques, true)"
|
|
|
- ></image
|
|
|
- ></view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
-
|
|
|
- <view
|
|
|
- v-if="bank.ques && (bank.ques.imageList.length || bank.ques.text)"
|
|
|
- >
|
|
|
- <view class="pad_8 answerInfos">
|
|
|
- <view class="answerTitle">答案解析:</view>
|
|
|
- <view class="answerContent"
|
|
|
- ><rich-text :nodes="bank.analysisContent"></rich-text
|
|
|
- ></view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </template>
|
|
|
-
|
|
|
- <!-- 案例题 -->
|
|
|
- <template v-if="bank.type == 4">
|
|
|
- <view class="tabs">
|
|
|
- <view
|
|
|
- class="tab"
|
|
|
- :class="{ current: tabIndex == bank.current }"
|
|
|
- :key="tabIndex"
|
|
|
- v-for="(tab, tabIndex) in bank.jsonStr"
|
|
|
- @click="tabSelect(tabIndex, bankIndex)"
|
|
|
- >
|
|
|
- 问题{{ tabIndex + 1 }}
|
|
|
- </view>
|
|
|
- </view>
|
|
|
-
|
|
|
- <view
|
|
|
- v-for="(ansItem, ansIndex) in bank.jsonStr"
|
|
|
- v-if="bank.current == ansIndex"
|
|
|
- :key="ansIndex"
|
|
|
- >
|
|
|
- <template v-if="ansItem.type == 1">
|
|
|
- <view class="pad_8 titBox">
|
|
|
- <view class="leftLetters">
|
|
|
- <view class="btnType">
|
|
|
- <text>单选</text>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view class="titles"
|
|
|
- ><rich-text :nodes="ansItem.content"></rich-text
|
|
|
- ></view>
|
|
|
- <view v-if="!bank.ques[ansIndex]">
|
|
|
- <view
|
|
|
- v-for="(option, childIndex) in ansItem.optionsList"
|
|
|
- :key="childIndex"
|
|
|
- class="lisSty"
|
|
|
- @click="
|
|
|
- radioSelectChild(option.optionsId, ansIndex, bankIndex)
|
|
|
- "
|
|
|
- >
|
|
|
- <view class="activeTI">{{ ast[childIndex] }}</view>
|
|
|
- <view class="flex_auto">
|
|
|
- <rich-text
|
|
|
- class="textChild"
|
|
|
- :nodes="option.content"
|
|
|
- ></rich-text>
|
|
|
- <view v-if="option.imgUrl">
|
|
|
- <image
|
|
|
- style="width: 600rpx"
|
|
|
- mode="widthFix"
|
|
|
- :src="$method.splitImgHost(option.imgUrl)"
|
|
|
- ></image>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view v-if="bank.ques[ansIndex]">
|
|
|
- <view
|
|
|
- v-for="(option, childIndex) in ansItem.optionsList"
|
|
|
- :key="childIndex"
|
|
|
- class="lisSty"
|
|
|
- >
|
|
|
- <text
|
|
|
- :class="{
|
|
|
- right:
|
|
|
- option.optionsId == bank.ques[ansIndex] ||
|
|
|
- option.optionsId == bank.ans[ansIndex],
|
|
|
- wrong:
|
|
|
- option.optionsId == bank.ques[ansIndex] &&
|
|
|
- bank.ques[ansIndex] != bank.ans[ansIndex],
|
|
|
- }"
|
|
|
- class="activeTI"
|
|
|
- >
|
|
|
- {{ ast[childIndex] }}
|
|
|
- </text>
|
|
|
- <view class="flex_auto">
|
|
|
- <rich-text :nodes="option.content"></rich-text>
|
|
|
- <view v-if="option.imgUrl">
|
|
|
- <image
|
|
|
- style="width: 600rpx"
|
|
|
- mode="widthFix"
|
|
|
- :src="$method.splitImgHost(option.imgUrl)"
|
|
|
- ></image>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
-
|
|
|
- <view v-if="bank.ques[ansIndex]">
|
|
|
- <view class="pad_8 answer">
|
|
|
- <view>正确答案:{{ ast[bank.ans[ansIndex] - 1] }}</view>
|
|
|
- <view>我的答案:{{ ast[bank.ques[ansIndex] - 1] }}</view>
|
|
|
- </view>
|
|
|
- <view class="pad_8 answerInfos">
|
|
|
- <view class="answerTitle">答案解析</view>
|
|
|
- <view class="answerContent"
|
|
|
- ><rich-text :nodes="option.analysisContent"></rich-text
|
|
|
- ></view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </template>
|
|
|
-
|
|
|
- <template v-if="ansItem.type == 2">
|
|
|
- <view class="pad_8 titBox">
|
|
|
- <view class="leftLetters">
|
|
|
- <view class="btnType">
|
|
|
- <text>多选</text>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view class="titles"
|
|
|
- ><rich-text :nodes="ansItem.content"></rich-text
|
|
|
- ></view>
|
|
|
- <view v-if="!bank.ques[ansIndex]">
|
|
|
- <view
|
|
|
- v-for="(option, childindex) in ansItem.optionsList"
|
|
|
- :key="childindex"
|
|
|
- class="lisSty"
|
|
|
- @click="
|
|
|
- checkboxSelectChild(bankIndex, ansIndex, childindex)
|
|
|
- "
|
|
|
- >
|
|
|
- <view
|
|
|
- :class="{ checked: option.checked }"
|
|
|
- class="activeTI"
|
|
|
- >{{ ast[childindex] }}</view
|
|
|
- >
|
|
|
- <view class="flex_auto">
|
|
|
- <rich-text :nodes="option.content"></rich-text>
|
|
|
- <view v-if="option.imgUrl">
|
|
|
- <image
|
|
|
- style="width: 600rpx"
|
|
|
- mode="widthFix"
|
|
|
- :src="$method.splitImgHost(option.imgUrl)"
|
|
|
- ></image>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view
|
|
|
- v-if="!bank.ques[ansIndex]"
|
|
|
- class="submit_checkbox"
|
|
|
- :class="{
|
|
|
- disabled: !isCheckboxChecked(ansItem.optionsList),
|
|
|
- }"
|
|
|
- @click="checkboxSubmitChild(bankIndex, ansIndex)"
|
|
|
- >确认答案</view
|
|
|
- >
|
|
|
- <view v-if="bank.ques && bank.ques[ansIndex]">
|
|
|
- <view
|
|
|
- v-for="(option, childindex) in ansItem.optionsList"
|
|
|
- :key="childindex"
|
|
|
- class="lisSty"
|
|
|
- >
|
|
|
- <text
|
|
|
- :class="{
|
|
|
- right: right(bankIndex, ansIndex, option),
|
|
|
- wrong: wrong(bankIndex, ansIndex, option),
|
|
|
- }"
|
|
|
- class="activeTI"
|
|
|
- >
|
|
|
- {{ ast[childindex] }}
|
|
|
- </text>
|
|
|
- <view class="flex_auto">
|
|
|
- <rich-text :nodes="option.content"></rich-text>
|
|
|
- <view v-if="option.imgUrl">
|
|
|
- <image
|
|
|
- style="width: 600rpx"
|
|
|
- mode="widthFix"
|
|
|
- :src="$method.splitImgHost(option.imgUrl)"
|
|
|
- ></image>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view v-if="bank.ques[ansIndex]">
|
|
|
- <view class="pad_8 answer">
|
|
|
- <view>
|
|
|
- 正确答案:
|
|
|
- <text
|
|
|
- :key="ansItemIndex1"
|
|
|
- v-for="(ansItem1, ansItemIndex1) in bank.ans[ansIndex]"
|
|
|
- >{{ ast[ansItem1 - 1] }}</text
|
|
|
- >
|
|
|
- </view>
|
|
|
- <view>
|
|
|
- 我的答案:
|
|
|
- <text
|
|
|
- :key="quesItemIndex"
|
|
|
- v-for="(quesItem, quesItemIndex) in bank.ques[ansIndex]"
|
|
|
- >{{ ast[quesItem - 1] }}</text
|
|
|
- >
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view class="pad_8 answerInfos">
|
|
|
- <view class="answerTitle">答案解析</view>
|
|
|
- <view class="answerContent"
|
|
|
- ><rich-text :nodes="ansItem.analysisContent"></rich-text
|
|
|
- ></view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </template>
|
|
|
-
|
|
|
- <template v-if="ansItem.type == 3">
|
|
|
- <view class="pad_8 titBox">
|
|
|
- <view class="leftLetters">
|
|
|
- <view class="btnType">
|
|
|
- <text>判断</text>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view class="titles"
|
|
|
- ><rich-text :nodes="ansItem.content"></rich-text
|
|
|
- ></view>
|
|
|
- <view v-if="!bank.ques[ansIndex]">
|
|
|
- <view
|
|
|
- v-for="(option, childindex) in judge"
|
|
|
- :key="childindex"
|
|
|
- class="lisSty"
|
|
|
- @click="judgeSelectChild(ansIndex, childindex, bankIndex)"
|
|
|
- >
|
|
|
- <view class="activeTI">{{ ast[childindex] }}</view>
|
|
|
- <view class="flex_auto">
|
|
|
- {{ option }}
|
|
|
- <view v-if="option.imgUrl">
|
|
|
- <image
|
|
|
- style="width: 600rpx"
|
|
|
- mode="widthFix"
|
|
|
- :src="$method.splitImgHost(option.imgUrl)"
|
|
|
- ></image>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view v-if="bank.ques[ansIndex]">
|
|
|
- <view
|
|
|
- v-for="(option, childindex) in judge"
|
|
|
- :key="childindex"
|
|
|
- class="lisSty"
|
|
|
- >
|
|
|
- <text
|
|
|
- :class="{
|
|
|
- right:
|
|
|
- childindex == bank.ques[ansIndex] ||
|
|
|
- childindex == bank.ans[ansIndex],
|
|
|
- wrong:
|
|
|
- childindex == bank.ques[ansIndex] &&
|
|
|
- bank.ques[ansIndex] != bank.ans[ansIndex],
|
|
|
- }"
|
|
|
- class="activeTI"
|
|
|
- >
|
|
|
- {{ ast[childindex] }}
|
|
|
- </text>
|
|
|
- <view class="flex_auto">
|
|
|
- {{ option }}
|
|
|
- <view v-if="option.imgUrl">
|
|
|
- <image
|
|
|
- style="width: 600rpx"
|
|
|
- mode="widthFix"
|
|
|
- :src="$method.splitImgHost(option.imgUrl)"
|
|
|
- ></image>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view v-if="bank.ques[ansIndex]">
|
|
|
- <view class="pad_8 answer">
|
|
|
- <view>正确答案:{{ ast[bank.ans[ansIndex]] }}</view>
|
|
|
- <view>我的答案:{{ ast[bank.ques[ansIndex]] }}</view>
|
|
|
- </view>
|
|
|
- <view class="pad_8 answerInfos">
|
|
|
- <view class="answerTitle">答案解析</view>
|
|
|
- <view class="answerContent"
|
|
|
- ><rich-text :nodes="ansItem.analysisContent"></rich-text
|
|
|
- ></view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </template>
|
|
|
-
|
|
|
- <!-- 简答题 -->
|
|
|
- <template v-if="ansItem.type == 5">
|
|
|
- <view class="pad_8 titBox_title">
|
|
|
- <view class="leftLetters">
|
|
|
- <view class="btnType">
|
|
|
- <text>简答</text>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view><rich-text :nodes="ansItem.content"></rich-text></view>
|
|
|
- </view>
|
|
|
- <view class="pad_8 titBox_title">
|
|
|
- <view class="ans">
|
|
|
- <view
|
|
|
- class="ans_input"
|
|
|
- v-if="
|
|
|
- !bank.ques[ansIndex] ||
|
|
|
- (!bank.ques[ansIndex].text &&
|
|
|
- !bank.ques[ansIndex].imageList.length)
|
|
|
- "
|
|
|
- >
|
|
|
- <view class="top flex">
|
|
|
- <image
|
|
|
- class="icon"
|
|
|
- @click="chooseImgChild(bankIndex, ansIndex)"
|
|
|
- src="/static/camera.png"
|
|
|
- mode=""
|
|
|
- ></image>
|
|
|
- <view class="progress"
|
|
|
- >{{ ansItem.ansText.imageList.length || "0" }}/4</view
|
|
|
- >
|
|
|
- <view
|
|
|
- class="submit"
|
|
|
- :class="{
|
|
|
- disabled: !ansItem.ansText.text && hasImgs(ansItem),
|
|
|
- }"
|
|
|
- @click="submitAnsChild(bankIndex, ansIndex)"
|
|
|
- >确认答案</view
|
|
|
- >
|
|
|
- </view>
|
|
|
- <view class="textarea">
|
|
|
- <textarea
|
|
|
- v-model="ansItem.ansText.text"
|
|
|
- placeholder="在此输入答案"
|
|
|
- ></textarea>
|
|
|
- </view>
|
|
|
- <view class="imgs">
|
|
|
- <view
|
|
|
- class="img"
|
|
|
- v-for="(img, imgIndex) in ansItem.ansText.imageList"
|
|
|
- :key="imgIndex"
|
|
|
- >
|
|
|
- <text
|
|
|
- @click="
|
|
|
- deleteImgChild(imgIndex, bankIndex, ansIndex)
|
|
|
- "
|
|
|
- >x</text
|
|
|
- >
|
|
|
- <image :src="$method.splitImgHost(img, true)"></image>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view
|
|
|
- class="ans_submit answerInfos"
|
|
|
- v-if="
|
|
|
- bank.ques[ansIndex] &&
|
|
|
- (bank.ques[ansIndex].imageList.length ||
|
|
|
- bank.ques[ansIndex].text)
|
|
|
- "
|
|
|
- >
|
|
|
- <view class="answerTitle">我的答案</view>
|
|
|
- {{ bank.ques[ansIndex].text || "" }}
|
|
|
- <view class="imgs">
|
|
|
- <image
|
|
|
- class="img"
|
|
|
- v-for="(ques, quesIndex) in bank.ques[ansIndex]
|
|
|
- .imageList"
|
|
|
- :key="quesIndex"
|
|
|
- :src="$method.splitImgHost(ques, true)"
|
|
|
- ></image>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view
|
|
|
- v-if="
|
|
|
- bank.ques[ansIndex].imageList.length ||
|
|
|
- bank.ques[ansIndex].text
|
|
|
- "
|
|
|
- >
|
|
|
- <view class="pad_8 answerInfos">
|
|
|
- <view class="answerTitle">答案解析</view>
|
|
|
- <view class="answerContent"
|
|
|
- ><rich-text :nodes="ansItem.analysisContent"></rich-text
|
|
|
- ></view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </template>
|
|
|
- </view>
|
|
|
- </template>
|
|
|
-
|
|
|
- <view class="footer_btn">
|
|
|
- <view
|
|
|
- v-if="isCollect"
|
|
|
- class="collect"
|
|
|
- :class="{ show: goodsId && !isFromVideo ? true : false }"
|
|
|
- @click="collect(collectList[bankIndex], bankIndex)"
|
|
|
- >
|
|
|
- <view v-if="collectList[bankIndex]">
|
|
|
- <image src="/static/icon/collected.png" mode=""></image>
|
|
|
- <view>取消收藏</view>
|
|
|
- </view>
|
|
|
- <view v-if="!collectList[bankIndex]">
|
|
|
- <image src="/static/icon/collect.png" mode=""></image>
|
|
|
- <view>收藏</view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view class="flex_center" @click="openFooterTab">
|
|
|
- <view class="up-icon">
|
|
|
- <image src="/static/up.png"></image>
|
|
|
- </view>
|
|
|
- 答题卡
|
|
|
- </view>
|
|
|
- <view class="collect show" @click="pdsubmit">
|
|
|
- <view>
|
|
|
- <image src="/static/jj.png" mode=""></image>
|
|
|
- <view>交卷</view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </swiper-item>
|
|
|
- </swiper>
|
|
|
-
|
|
|
- <u-popup v-model="show" mode="bottom" border-radius="14" height="680rpx">
|
|
|
- <view class="popupView">
|
|
|
- <view class="popupTops">
|
|
|
- <view class="topIcon"></view>
|
|
|
- 点击编号即可跳转至对应题目
|
|
|
- </view>
|
|
|
- <view class="popupContent">
|
|
|
- <scroll-view scroll-y="true" style="height: 506rpx">
|
|
|
- <view class="boxSty">
|
|
|
- <view
|
|
|
- v-for="(item, index) in questionList"
|
|
|
- :key="index"
|
|
|
- @click="changeIndex(index)"
|
|
|
- :class="{
|
|
|
- isRight: isRight(item, index),
|
|
|
- isWrong: isWrong(item, index),
|
|
|
- isPart: isPart(item, index),
|
|
|
- isOver: isOver(item, index),
|
|
|
- }"
|
|
|
- class="liListSty"
|
|
|
- >
|
|
|
- {{ index + 1 }}
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </scroll-view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </u-popup>
|
|
|
- </view>
|
|
|
-</template>
|
|
|
-
|
|
|
-<script>
|
|
|
-import { mapGetters } from 'vuex';
|
|
|
-import eventHub from '@/common/eventHub.js'
|
|
|
-import {WEBVIEW_URL} from '@/common/request.js'
|
|
|
-export default {
|
|
|
- name: 'bankExam',
|
|
|
- props: {
|
|
|
- examId:0,
|
|
|
- current: 0,
|
|
|
- list: {
|
|
|
- type:Array,
|
|
|
- default:[]
|
|
|
- },
|
|
|
- recordId: "",
|
|
|
- goodsId:'',
|
|
|
- bankType:0,
|
|
|
- orderGoodsId:'',
|
|
|
- isCollect:true,
|
|
|
- lastTime: 0, //剩余考试时长
|
|
|
- allTimes: 0, //总考试时长
|
|
|
- },
|
|
|
- watch:{
|
|
|
-
|
|
|
- },
|
|
|
- data() {
|
|
|
- return {
|
|
|
- ast: ["A", "B", "C", "D", "E", "F", "G"],
|
|
|
- judge: ["错误", "正确"],
|
|
|
- ans: [],
|
|
|
- ques: [],
|
|
|
- wrongList: [],
|
|
|
- timer: null,
|
|
|
- collectList: [],
|
|
|
- show: false,
|
|
|
- currentIndex:0,
|
|
|
- questionList:[],
|
|
|
- examLastTime: 0, //剩余考试时长
|
|
|
- examAllTimes: 0, //总考试时长
|
|
|
- };
|
|
|
- },
|
|
|
- onLoad() {
|
|
|
- },
|
|
|
- created() {
|
|
|
-
|
|
|
- },
|
|
|
- watch: {
|
|
|
- list:function (newVal,oldVal) {
|
|
|
- console.log(this)
|
|
|
- this.questionList = newVal;
|
|
|
- },
|
|
|
- current:function (newVal) {
|
|
|
- this.currentIndex = newVal;
|
|
|
- }
|
|
|
- },
|
|
|
- mounted() {
|
|
|
- if (this.examLastTime) {
|
|
|
- this.timer = setInterval(() => {
|
|
|
- if (this.examLastTime <= 0) {
|
|
|
- clearInterval(this.timer);
|
|
|
- uni.showToast({
|
|
|
- icon: "none",
|
|
|
- mask: true,
|
|
|
- title: "考试时间已到,系统将自动交卷",
|
|
|
- duration: 10000,
|
|
|
- });
|
|
|
-
|
|
|
- this.submit();
|
|
|
- return;
|
|
|
- }
|
|
|
- this.examLastTime--;
|
|
|
- }, 1000);
|
|
|
- }
|
|
|
- },
|
|
|
- methods: {
|
|
|
- getExamData() {
|
|
|
- let score = 0; //计算总分
|
|
|
- let reportStatus = 0;
|
|
|
- let number = 0; //做对的题目数量
|
|
|
- let doQuestionNum = 0; //做过的题目数量
|
|
|
- let allScore = 0; //总分
|
|
|
- let passScore = 0;
|
|
|
- let doWrongQuestionIds = []; //错题和未做题id(客观题)
|
|
|
- let doQuestionIds = []; //做过的题目id
|
|
|
- let lessQuestionNum = 0;
|
|
|
- let rightQuestionIds = []; //做对的题目id
|
|
|
- this.questionList.forEach((item, index) => {
|
|
|
- passScore = item.passScore;
|
|
|
- if (item.type == 1) {
|
|
|
- //正确
|
|
|
- if (item.ques == item.ans) {
|
|
|
- item.scoreResult = item.score;
|
|
|
- score += item.score;
|
|
|
- number++;
|
|
|
- rightQuestionIds.push(item.questionId);
|
|
|
- } else {
|
|
|
- //错误
|
|
|
- item.scoreResult = 0;
|
|
|
- if (item.ques) {
|
|
|
- doWrongQuestionIds.push(item.questionId);
|
|
|
- }
|
|
|
- }
|
|
|
- allScore += item.score;
|
|
|
- if (item.ques) {
|
|
|
- doQuestionNum++;
|
|
|
- doQuestionIds.push(item.questionId);
|
|
|
- }
|
|
|
- } else if (item.type == 2) {
|
|
|
- let isRight =
|
|
|
- item.ans &&
|
|
|
- item.ans.every((quesItem, quesIndex) => {
|
|
|
- if (item.ques) {
|
|
|
- return item.ques[quesIndex] == item.ans[quesIndex];
|
|
|
- } else {
|
|
|
- return false;
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
- if (isRight) {
|
|
|
- score += item.score;
|
|
|
- number++;
|
|
|
- item.scoreResult = item.score;
|
|
|
- rightQuestionIds.push(item.questionId);
|
|
|
- } else {
|
|
|
- let hasPart = false;
|
|
|
- let checkboxScore = 1; //获取单题总分数
|
|
|
- item.ques &&
|
|
|
- item.ques.forEach((ques, quesIndex) => {
|
|
|
- //选错一个全扣
|
|
|
- if (item.ques) {
|
|
|
- if (item.ans.indexOf(item.ques[quesIndex]) == -1) {
|
|
|
- checkboxScore = 0;
|
|
|
- }
|
|
|
- } else {
|
|
|
- checkboxScore = 0;
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
- //没选错
|
|
|
- if (checkboxScore) {
|
|
|
- checkboxScore = 0;
|
|
|
- item.ans.forEach((ans, quesIndex) => {
|
|
|
- //漏选扣一部分,对n题给n X partScore 分
|
|
|
- if (item.ques) {
|
|
|
- if (item.ques.indexOf(item.ans[quesIndex]) != -1) {
|
|
|
- checkboxScore += item.partScore;
|
|
|
- hasPart = true;
|
|
|
- }
|
|
|
- } else {
|
|
|
- checkboxScore = 0;
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
- if (!hasPart) {
|
|
|
- //0分
|
|
|
- item.scoreResult = 0;
|
|
|
- if (item.ques) {
|
|
|
- doWrongQuestionIds.push(item.questionId);
|
|
|
- }
|
|
|
- } else {
|
|
|
- //部分分
|
|
|
- // number++;
|
|
|
- lessQuestionNum++
|
|
|
- // doWrongQuestionIds.push(item.questionId);
|
|
|
- item.scoreResult = checkboxScore;
|
|
|
- score += checkboxScore;
|
|
|
- // rightQuestionIds.push(item.questionId)
|
|
|
- }
|
|
|
- }
|
|
|
- allScore += item.score;
|
|
|
- if (item.ques && item.ques.length) {
|
|
|
- doQuestionNum++;
|
|
|
- doQuestionIds.push(item.questionId);
|
|
|
- }
|
|
|
- } else if (item.type == 3) {
|
|
|
- if (item.ques == item.ans) {
|
|
|
- item.scoreResult = item.score;
|
|
|
- score += item.score;
|
|
|
- number++;
|
|
|
- rightQuestionIds.push(item.questionId);
|
|
|
- } else {
|
|
|
- item.scoreResult = 0;
|
|
|
- if (item.ques) {
|
|
|
- doWrongQuestionIds.push(item.questionId);
|
|
|
- }
|
|
|
- }
|
|
|
- allScore += item.score;
|
|
|
- if (item.ques) {
|
|
|
- doQuestionNum++;
|
|
|
- doQuestionIds.push(item.questionId);
|
|
|
- }
|
|
|
- } else if (item.type == 4) {
|
|
|
- allScore += item.score;
|
|
|
- if (item.ques && item.ques.length) {
|
|
|
- doQuestionNum++;
|
|
|
- doQuestionIds.push(item.questionId);
|
|
|
- }
|
|
|
- } else if (item.type == 5) {
|
|
|
- allScore += item.score;
|
|
|
- if (item.ques && (item.ques.imageList.length || item.ques.text)) {
|
|
|
- doQuestionNum++;
|
|
|
- doQuestionIds.push(item.questionId);
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
- //大于及格
|
|
|
- if (score >= passScore) {
|
|
|
- reportStatus = 1;
|
|
|
- } else {
|
|
|
- reportStatus = 0;
|
|
|
- }
|
|
|
- let data = {
|
|
|
- examId: this.examId,
|
|
|
- goodsId: this.goodsId,
|
|
|
- reportStatus: reportStatus,
|
|
|
- recordId: this.recordId,
|
|
|
- rightQuestionNum: number,
|
|
|
- orderGoodsId: this.orderGoodsId,
|
|
|
- lessQuestionNum:lessQuestionNum,
|
|
|
- doQuestionIds: doQuestionIds.join(","),
|
|
|
- rightQuestionIds: rightQuestionIds.join(","),
|
|
|
- doQuestionNum: doQuestionNum,
|
|
|
- performance: score,
|
|
|
- totalScore: allScore,
|
|
|
- examTime: parseInt(this.allTimes),
|
|
|
- doTime: parseInt(this.allTimes) - parseInt(this.lastTime),
|
|
|
- historyExamJson: JSON.stringify(this.questionList),
|
|
|
- doWrongQuestionIds:doWrongQuestionIds,
|
|
|
- }
|
|
|
-
|
|
|
- return data;
|
|
|
- },
|
|
|
- /**
|
|
|
- * 交卷
|
|
|
- */
|
|
|
- submit() {
|
|
|
- this.$emit('submit',this.getExamData())
|
|
|
- },
|
|
|
- pdsubmit() {
|
|
|
- // if (this.bankType == 1) {
|
|
|
- let ansCount = this.questionOverNum(true); //已答题数
|
|
|
- this.lastCount = this.questionList.length - ansCount; //统计未答完的题数
|
|
|
- //没有答完
|
|
|
- if (this.lastCount !== 0) {
|
|
|
- // this.cgType = 6;
|
|
|
- // this.showpopups = true;
|
|
|
- this.$emit('showpopups',6)
|
|
|
- return;
|
|
|
- }
|
|
|
- // }
|
|
|
-
|
|
|
- if (this.bankType == 2) {
|
|
|
- if (this.lastTime > 0) {
|
|
|
- let lastTime = this.countdown(this.lastTime);
|
|
|
- uni.showModal({
|
|
|
- title: "提示",
|
|
|
- content: `时间还剩余${lastTime},确定交卷吗?`,
|
|
|
- confirmText: "交卷",
|
|
|
- cancelText: "继续答题",
|
|
|
- success: (res) => {
|
|
|
- if (res.confirm) {
|
|
|
- //确定
|
|
|
- this.submit();
|
|
|
- } else {
|
|
|
- //取消
|
|
|
- }
|
|
|
- },
|
|
|
- });
|
|
|
- return;
|
|
|
- }
|
|
|
- }
|
|
|
- this.submit();
|
|
|
- },
|
|
|
- /**
|
|
|
- * 是否有上传图片
|
|
|
- */
|
|
|
- hasImgs(bank) {
|
|
|
- return bank.ansText.imageList.length == 0;
|
|
|
- },
|
|
|
- /**
|
|
|
- * 是否做完所有题目
|
|
|
- */
|
|
|
- isDoOver() {
|
|
|
- let questionOverNum = this.questionOverNum(true); //获取已经回答的题目数(包括简答和案例)
|
|
|
- if (this.questionList.length == questionOverNum) {
|
|
|
- this.$emit('isDoOver')
|
|
|
- }
|
|
|
- },
|
|
|
- /**
|
|
|
- * 获取已经回答的题目数
|
|
|
- * hasSpecail (是否包含简答和案例)
|
|
|
- */
|
|
|
- questionOverNum(hasSpecail) {
|
|
|
- let count = 0;
|
|
|
- this.questionList.forEach((item) => {
|
|
|
- if (item.type == 1 || item.type == 2 || item.type == 3) {
|
|
|
- if (item.ques) {
|
|
|
- count++;
|
|
|
- }
|
|
|
- } else if (item.type == 4) {
|
|
|
- //案例题
|
|
|
- if (hasSpecail) {
|
|
|
- let isOver = item.jsonStr.every((jsonItem, indexs) => {
|
|
|
- if (
|
|
|
- jsonItem.type == 1 ||
|
|
|
- jsonItem.type == 2 ||
|
|
|
- jsonItem.type == 3
|
|
|
- ) {
|
|
|
- if (item.ques[indexs]) {
|
|
|
- return true;
|
|
|
- } else {
|
|
|
- return false;
|
|
|
- }
|
|
|
- } else if (jsonItem.type == 5) {
|
|
|
- if (
|
|
|
- item.ques[indexs] &&
|
|
|
- (item.ques[indexs].text || item.ques[indexs].imageList.length)
|
|
|
- ) {
|
|
|
- console.log("chil");
|
|
|
- return true;
|
|
|
- } else {
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
- if (isOver) {
|
|
|
- count++;
|
|
|
- console.log(item, 444);
|
|
|
- }
|
|
|
- }
|
|
|
- } else if (item.type == 5) {
|
|
|
- //简答题
|
|
|
- if (hasSpecail) {
|
|
|
- if (item.ques && (item.ques.text || item.ques.imageList.length)) {
|
|
|
- console.log(5, item);
|
|
|
- count++;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
- return count;
|
|
|
- },
|
|
|
- /**
|
|
|
- * @param {Object} second倒计时过滤器
|
|
|
- */
|
|
|
- countdown(second) {
|
|
|
- if (second) {
|
|
|
- let h = parseInt((second / 60 / 60) % 24); // 计算小时
|
|
|
- let m = parseInt((second / 60) % 60); // 计算分数
|
|
|
- let s = parseInt(second % 60); // 计算当前秒数
|
|
|
-
|
|
|
- if (h < 10) h = "0" + h;
|
|
|
- if (m < 10) m = "0" + m;
|
|
|
- if (s < 10) s = "0" + s;
|
|
|
-
|
|
|
- return h + ":" + m + ":" + s;
|
|
|
- } else {
|
|
|
- return "";
|
|
|
- }
|
|
|
- },
|
|
|
- /**
|
|
|
- * @param {Object} e单选点击
|
|
|
- */
|
|
|
- radioSelect(optionsId, bindex) {
|
|
|
- if (this.questionList[bindex].ques) return;
|
|
|
- this.$set(this.questionList[bindex], "ques", optionsId);
|
|
|
- this.isDoOver();
|
|
|
-
|
|
|
- // 回答错误
|
|
|
- if (this.questionList[bindex].ques != this.questionList[bindex].ans) {
|
|
|
- this.$api
|
|
|
- .examWrongRecord({
|
|
|
- orderGoodsId: this.orderGoodsId,
|
|
|
- examId: this.examId,
|
|
|
- goodsId: this.goodsId,
|
|
|
- moduleExamId: this.moduleId || 0,
|
|
|
- chapterExamId: this.chapterId || 0,
|
|
|
- questionIds: [this.questionList[bindex].questionId],
|
|
|
- recordId: this.recordId,
|
|
|
- })
|
|
|
- .then((res) => {});
|
|
|
- } else {
|
|
|
- // let question = this.wrongList.find(item => item.questionId == this.questionList[bindex].questionId);
|
|
|
- // if(question) {
|
|
|
- // this.$api.wrongRecordDelete({
|
|
|
- // "examId": +this.id,
|
|
|
- // "goodsId": +this.goodsId,
|
|
|
- // "questionId": this.questionList[bindex].questionId,
|
|
|
- // }).then(res => {
|
|
|
- // })
|
|
|
- // }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- /**
|
|
|
- * @param {Object} e案例单选点击
|
|
|
- */
|
|
|
- radioSelectChild(optionsId, ansIndex, bindex) {
|
|
|
- if (this.questionList[bindex].ques[ansIndex]) return;
|
|
|
- this.$set(this.questionList[bindex].ques, ansIndex, optionsId);
|
|
|
- this.isDoOver();
|
|
|
- },
|
|
|
-
|
|
|
- /**
|
|
|
- * @param {Object} 多选点击
|
|
|
- */
|
|
|
- checkboxSelect(optionsId, bindex, index) {
|
|
|
- this.$set(
|
|
|
- this.questionList[bindex].jsonStr[index],
|
|
|
- "checked",
|
|
|
- !this.questionList[bindex].jsonStr[index].checked
|
|
|
- );
|
|
|
- },
|
|
|
-
|
|
|
- /**
|
|
|
- * @param {Object} 案例多选点击
|
|
|
- */
|
|
|
- checkboxSelectChild(bindex, ansIndex, childIndex) {
|
|
|
- this.$set(
|
|
|
- this.questionList[bindex].jsonStr[ansIndex].optionsList[childIndex],
|
|
|
- "checked",
|
|
|
- !this.questionList[bindex].jsonStr[ansIndex].optionsList[childIndex]
|
|
|
- .checked
|
|
|
- );
|
|
|
- },
|
|
|
-
|
|
|
- isCheckboxChecked(arr) {
|
|
|
- return arr.some((item) => {
|
|
|
- if (item.checked) {
|
|
|
- return true;
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
-
|
|
|
- /**
|
|
|
- * @param {Object} 多选确认
|
|
|
- */
|
|
|
- checkboxSubmit(bindex) {
|
|
|
- if (this.questionList[bindex].ques) return;
|
|
|
- let arr = [];
|
|
|
- this.questionList[bindex].jsonStr.forEach((item) => {
|
|
|
- if (item.checked) {
|
|
|
- arr.push(item.optionsId);
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
- if (!arr.length) {
|
|
|
- uni.showToast({
|
|
|
- title: "请选择答案",
|
|
|
- icon: "none",
|
|
|
- });
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- this.$set(this.questionList[bindex], "ques", arr);
|
|
|
- this.isDoOver();
|
|
|
-
|
|
|
- let isWrong = this.questionList[bindex].ques.some(
|
|
|
- (quesItem, quesIndex) => {
|
|
|
- return (
|
|
|
- this.questionList[bindex].ques[quesIndex] !=
|
|
|
- this.questionList[bindex].ans[quesIndex]
|
|
|
- );
|
|
|
- }
|
|
|
- );
|
|
|
- // 回答错误
|
|
|
- if (isWrong) {
|
|
|
- this.$api
|
|
|
- .examWrongRecord({
|
|
|
- orderGoodsId: this.orderGoodsId,
|
|
|
- examId: this.examId,
|
|
|
- goodsId: this.goodsId,
|
|
|
- moduleExamId: this.moduleId || 0,
|
|
|
- chapterExamId: this.chapterId || 0,
|
|
|
- questionIds: [this.questionList[bindex].questionId],
|
|
|
- recordId: this.recordId,
|
|
|
- })
|
|
|
- .then((res) => {});
|
|
|
- } else {
|
|
|
- // let question = this.wrongList.find(item => item.questionId == this.questionList[bindex].questionId);
|
|
|
- // if(question) {
|
|
|
- // this.$api.wrongRecordDelete({
|
|
|
- // "examId": +this.id,
|
|
|
- // "goodsId": +this.goodsId,
|
|
|
- // "questionId": this.questionList[bindex].questionId,
|
|
|
- // }).then(res => {
|
|
|
- // })
|
|
|
- // }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- /**
|
|
|
- * @param {Object} 案例多选确认
|
|
|
- */
|
|
|
- checkboxSubmitChild(bindex, ansIndex) {
|
|
|
- if (this.questionList[bindex].ques[ansIndex]) return;
|
|
|
- let arr = [];
|
|
|
- this.questionList[bindex].jsonStr[ansIndex].optionsList.forEach(
|
|
|
- (item) => {
|
|
|
- if (item.checked) {
|
|
|
- arr.push(item.optionsId);
|
|
|
- }
|
|
|
- }
|
|
|
- );
|
|
|
-
|
|
|
- if (!arr.length) {
|
|
|
- uni.showToast({
|
|
|
- title: "请选择答案",
|
|
|
- icon: "none",
|
|
|
- });
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- this.$set(this.questionList[bindex].ques, ansIndex, arr);
|
|
|
- this.isDoOver();
|
|
|
- },
|
|
|
-
|
|
|
- /**
|
|
|
- * @param {Object} index
|
|
|
- * @param {Object} bindex
|
|
|
- * 判断题
|
|
|
- */
|
|
|
- judgeSelect(index, bindex) {
|
|
|
- if (this.questionList[bindex].ques) return;
|
|
|
- this.$set(this.questionList[bindex], "ques", index + "");
|
|
|
- this.isDoOver();
|
|
|
- // 回答错误
|
|
|
- if (this.questionList[bindex].ques != this.questionList[bindex].ans) {
|
|
|
- this.$api
|
|
|
- .examWrongRecord({
|
|
|
- orderGoodsId: this.orderGoodsId,
|
|
|
- examId: this.examId,
|
|
|
- goodsId: this.goodsId,
|
|
|
- moduleExamId: this.moduleId || 0,
|
|
|
- chapterExamId: this.chapterId || 0,
|
|
|
- questionIds: [this.questionList[bindex].questionId],
|
|
|
- recordId: this.recordId,
|
|
|
- })
|
|
|
- .then((res) => {});
|
|
|
- } else {
|
|
|
- // let question = this.wrongList.find(item => item.questionId == this.questionList[bindex].questionId);
|
|
|
- // if(question) {
|
|
|
- // this.$api.wrongRecordDelete({
|
|
|
- // "examId": +this.id,
|
|
|
- // "goodsId": +this.goodsId,
|
|
|
- // "questionId": this.questionList[bindex].questionId,
|
|
|
- // }).then(res => {
|
|
|
- // })
|
|
|
- // }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- /**
|
|
|
- * @param {Object} ansindex
|
|
|
- * @param {Object} childindex
|
|
|
- * @param {Object} bindex
|
|
|
- * 案例判断题
|
|
|
- */
|
|
|
- judgeSelectChild(ansindex, childindex, bindex) {
|
|
|
- if (this.questionList[bindex].ques[ansindex]) return;
|
|
|
- this.$set(this.questionList[bindex].ques, ansindex, childindex + "");
|
|
|
- this.isDoOver();
|
|
|
- },
|
|
|
-
|
|
|
- openFooterTab() {
|
|
|
- this.show = true;
|
|
|
- },
|
|
|
- changeIndex(index) {
|
|
|
- this.currentIndex = index;
|
|
|
- },
|
|
|
- swiperChange(e) {
|
|
|
- this.currentIndex = e.detail.current;
|
|
|
- this.getCollectInfo(this.currentIndex);
|
|
|
- },
|
|
|
- /**
|
|
|
- * @param {Object} current
|
|
|
- * 获取收藏信息
|
|
|
- */
|
|
|
- getCollectInfo(current) {
|
|
|
- this.$api
|
|
|
- .getCollectInfo({
|
|
|
- examId: this.examId,
|
|
|
- questionId: this.questionList[current].questionId,
|
|
|
- goodsId: this.goodsId,
|
|
|
- orderGoodsId: this.orderGoodsId,
|
|
|
- })
|
|
|
- .then((res) => {
|
|
|
- if (res.data.code == 500) {
|
|
|
- this.$set(this.collectList, current, false);
|
|
|
- } else if (res.data.code == 200) {
|
|
|
- this.$set(this.collectList, current, res.data.data);
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
-
|
|
|
- /**
|
|
|
- * @param {Object} state
|
|
|
- * @param {Object} index
|
|
|
- * 收藏
|
|
|
- */
|
|
|
- collect(state, index) {
|
|
|
- if (!state) {
|
|
|
- this.$api
|
|
|
- .collectQuestion({
|
|
|
- examId: this.examId,
|
|
|
- questionId: this.questionList[index].questionId,
|
|
|
- goodsId: this.goodsId || "",
|
|
|
- orderGoodsId: this.orderGoodsId,
|
|
|
- })
|
|
|
- .then((res) => {
|
|
|
- if (res.data.code == 200) {
|
|
|
- this.$set(this.collectList, index, true);
|
|
|
- uni.showToast({
|
|
|
- title: "收藏成功",
|
|
|
- duration: 2000,
|
|
|
- icon: "none",
|
|
|
- });
|
|
|
- this.getCollectInfo(index);
|
|
|
- }
|
|
|
- });
|
|
|
- } else {
|
|
|
- this.$api
|
|
|
- .deleteCollectQuestion(this.collectList[index].collectQuestionId)
|
|
|
- .then((res) => {
|
|
|
- if (res.data.code == 200) {
|
|
|
- this.$set(this.collectList, index, false);
|
|
|
- uni.showToast({
|
|
|
- title: "取消收藏成功",
|
|
|
- duration: 2000,
|
|
|
- icon: "none",
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- return;
|
|
|
- },
|
|
|
-
|
|
|
- /**
|
|
|
- * @param {Object} imgIndex
|
|
|
- * @param {Object} bankIndex
|
|
|
- * 删除简答图片
|
|
|
- */
|
|
|
- deleteImg(imgIndex, bankIndex) {
|
|
|
- this.questionList[bankIndex].ansText.imageList.splice(imgIndex, 1);
|
|
|
- },
|
|
|
-
|
|
|
- /**
|
|
|
- * @param {Object} imgIndex
|
|
|
- * @param {Object} bankIndex
|
|
|
- * @param {Object} ansIndex
|
|
|
- * 删除案例题简答图片
|
|
|
- */
|
|
|
- deleteImgChild(imgIndex, bankIndex, ansIndex) {
|
|
|
- this.questionList[bankIndex].jsonStr[ansIndex].ansText.imageList.splice(
|
|
|
- imgIndex,
|
|
|
- 1
|
|
|
- );
|
|
|
- },
|
|
|
-
|
|
|
- /**
|
|
|
- * @param {Object} bankindex
|
|
|
- * 选择上传图片
|
|
|
- */
|
|
|
- chooseImg(bankindex) {
|
|
|
- if (
|
|
|
- this.questionList[bankindex] &&
|
|
|
- this.questionList[bankindex].ansText &&
|
|
|
- this.questionList[bankindex].ansText.imageList.length >= 4
|
|
|
- ) {
|
|
|
- uni.showToast({
|
|
|
- icon: "none",
|
|
|
- title: "最多选择4张",
|
|
|
- });
|
|
|
- return;
|
|
|
- }
|
|
|
- uni.chooseImage({
|
|
|
- count: 1, //默认9
|
|
|
- sizeType: ["compressed"], //可以指定是原图还是压缩图,默认二者都有
|
|
|
- sourceType: ["album", "camera"], //从相册选择
|
|
|
- success: (res) => {
|
|
|
- let self = this;
|
|
|
- // console.log(JSON.stringify(res.tempFilePaths));
|
|
|
- let img = res.tempFilePaths[0];
|
|
|
- uni.getImageInfo({
|
|
|
- src: img,
|
|
|
- success: async (res) => {
|
|
|
- let canvasWidth = res.width; //图片原始长宽
|
|
|
- let canvasHeight = res.height;
|
|
|
- if (canvasWidth > 1000 || canvasHeight > 1000) {
|
|
|
- uni.compressImage({
|
|
|
- src: img,
|
|
|
- quality: 75,
|
|
|
- width: "50%",
|
|
|
- height: "50%",
|
|
|
- success: async (rest) => {
|
|
|
- const dir = await self.uploadFile(rest.tempFilePath, 0);
|
|
|
- this.questionList[bankindex].ansText.imageList.push(dir);
|
|
|
- },
|
|
|
- });
|
|
|
- } else {
|
|
|
- const dir = await self.uploadFile(img, 0);
|
|
|
- this.questionList[bankindex].ansText.imageList.push(dir);
|
|
|
- }
|
|
|
- },
|
|
|
- });
|
|
|
- },
|
|
|
- });
|
|
|
- },
|
|
|
-
|
|
|
- /**
|
|
|
- * @param {Object} bankindex
|
|
|
- * @param {Object} ansindex
|
|
|
- * 案例题选择上传图片
|
|
|
- */
|
|
|
- chooseImgChild(bankindex, ansindex) {
|
|
|
- if (
|
|
|
- this.questionList[bankindex].jsonStr[ansindex] &&
|
|
|
- this.questionList[bankindex].jsonStr[ansindex].ansText &&
|
|
|
- this.questionList[bankindex].jsonStr[ansindex].ansText.imageList
|
|
|
- .length >= 4
|
|
|
- ) {
|
|
|
- uni.showToast({
|
|
|
- icon: "none",
|
|
|
- title: "最多选择4张",
|
|
|
- });
|
|
|
- return;
|
|
|
- }
|
|
|
- uni.chooseImage({
|
|
|
- count: 1, //默认9
|
|
|
- sizeType: ["compressed"], //可以指定是原图还是压缩图,默认二者都有
|
|
|
- sourceType: ["album", "camera"], //从相册选择
|
|
|
- success: (res) => {
|
|
|
- let self = this;
|
|
|
- // console.log(JSON.stringify(res.tempFilePaths));
|
|
|
- let img = res.tempFilePaths[0];
|
|
|
- uni.getImageInfo({
|
|
|
- src: img,
|
|
|
- success: async (res) => {
|
|
|
- let canvasWidth = res.width; //图片原始长宽
|
|
|
- let canvasHeight = res.height;
|
|
|
- if (canvasWidth > 1000 || canvasHeight > 1000) {
|
|
|
- uni.compressImage({
|
|
|
- src: img,
|
|
|
- quality: 75,
|
|
|
- width: "50%",
|
|
|
- height: "50%",
|
|
|
- success: async (rest) => {
|
|
|
- const dir = await self.uploadFile(rest.tempFilePath, 0);
|
|
|
- this.questionList[bankindex].jsonStr[
|
|
|
- ansindex
|
|
|
- ].ansText.imageList.push(dir);
|
|
|
- },
|
|
|
- });
|
|
|
- } else {
|
|
|
- const dir = await self.uploadFile(img, 0);
|
|
|
- this.questionList[bankindex].jsonStr[
|
|
|
- ansindex
|
|
|
- ].ansText.imageList.push(dir);
|
|
|
- }
|
|
|
- },
|
|
|
- });
|
|
|
- },
|
|
|
- });
|
|
|
- },
|
|
|
-
|
|
|
- uploadFile(options, int) {
|
|
|
- var self = this;
|
|
|
- return new Promise((resolve, reject) => {
|
|
|
- var data = {
|
|
|
- orderGoodsId: this.orderGoodsId,
|
|
|
- imageStatus: int,
|
|
|
- };
|
|
|
- self.$api.aliyunpolicy(data).then((res) => {
|
|
|
- console.log(res.data, 6);
|
|
|
- if (res.data.code != 200) {
|
|
|
- self.$method.showToast("签名错误" + JSON.stringify(res.data));
|
|
|
- return;
|
|
|
- }
|
|
|
- var ossToken = res.data.data.resultContent;
|
|
|
- if (ossToken.host == null || ossToken.host == undefined) {
|
|
|
- self.$method.showToast("上传路径报错" + JSON.stringify(res.data));
|
|
|
- return;
|
|
|
- }
|
|
|
- uni.uploadFile({
|
|
|
- url: ossToken.host,
|
|
|
- name: "file",
|
|
|
- filePath: options,
|
|
|
- fileType: "image",
|
|
|
- header: {
|
|
|
- AuthorizationToken: "WX " + uni.getStorageSync("token"),
|
|
|
- },
|
|
|
- formData: {
|
|
|
- key: ossToken.dir,
|
|
|
- OSSAccessKeyId: ossToken.accessid,
|
|
|
- policy: ossToken.policy,
|
|
|
- Signature: ossToken.signature,
|
|
|
- callback: ossToken.callback,
|
|
|
- success_action_status: 200,
|
|
|
- },
|
|
|
- success: (result) => {
|
|
|
- // if (result.statusCode === 200) {
|
|
|
- resolve(ossToken.dir);
|
|
|
- // } else {
|
|
|
- // uni.showToast({
|
|
|
- // title: "上传失败",
|
|
|
- // icon: "none",
|
|
|
- // });
|
|
|
- // return;
|
|
|
- // }
|
|
|
- },
|
|
|
- fail: (error) => {
|
|
|
- uni.showToast({
|
|
|
- title: "上传接口报错" + error,
|
|
|
- icon: "none",
|
|
|
- });
|
|
|
- return;
|
|
|
- },
|
|
|
- });
|
|
|
- });
|
|
|
- });
|
|
|
- },
|
|
|
- /**
|
|
|
- * @param {Object} type
|
|
|
- * @param {Object} bankindex
|
|
|
- * 简答题答案确认
|
|
|
- */
|
|
|
- submitAns(bankindex) {
|
|
|
- console.log(this.questionList[bankindex]);
|
|
|
- if (
|
|
|
- !this.questionList[bankindex].ansText.text &&
|
|
|
- !this.questionList[bankindex].ansText.imageList.length
|
|
|
- ) {
|
|
|
- uni.showToast({
|
|
|
- title: "请输入内容或上传图片",
|
|
|
- duration: 2000,
|
|
|
- icon: "none",
|
|
|
- });
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- this.$set(this.questionList[bankindex], "ques", {
|
|
|
- imageList: this.questionList[bankindex].ansText.imageList || [],
|
|
|
- text: this.questionList[bankindex].ansText.text || "",
|
|
|
- });
|
|
|
- this.isDoOver();
|
|
|
- },
|
|
|
-
|
|
|
- /**
|
|
|
- * @param {Object} bankindex
|
|
|
- * @param {Object} ansindex
|
|
|
- * 案例题简答答案确认
|
|
|
- */
|
|
|
- submitAnsChild(bankindex, ansindex) {
|
|
|
- if (
|
|
|
- !this.questionList[bankindex].jsonStr[ansindex].ansText.text &&
|
|
|
- !this.questionList[bankindex].jsonStr[ansindex].ansText.imageList.length
|
|
|
- ) {
|
|
|
- uni.showToast({
|
|
|
- title: "请输入内容或上传图片",
|
|
|
- duration: 2000,
|
|
|
- icon: "none",
|
|
|
- });
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- this.$set(this.questionList[bankindex].ques, ansindex, {
|
|
|
- imageList:
|
|
|
- this.questionList[bankindex].jsonStr[ansindex].ansText.imageList ||
|
|
|
- [],
|
|
|
- text: this.questionList[bankindex].jsonStr[ansindex].ansText.text || "",
|
|
|
- });
|
|
|
- this.isDoOver();
|
|
|
- },
|
|
|
-
|
|
|
- isRight(item, index) {
|
|
|
- //单选
|
|
|
- if (this.questionList[index].ques) {
|
|
|
- if (item.type == 1) {
|
|
|
- return this.questionList[index].ques == this.questionList[index].ans;
|
|
|
- //多选
|
|
|
- } else if (item.type == 2) {
|
|
|
- //每一项都相等
|
|
|
- return this.questionList[index].ans.every((item, i) => {
|
|
|
- return item == this.questionList[index].ques[i];
|
|
|
- });
|
|
|
- //判断
|
|
|
- } else if (item.type == 3) {
|
|
|
- return this.questionList[index].ques == this.questionList[index].ans;
|
|
|
- // } else if (item.type == 5) {
|
|
|
- // if(this.questionList[index].ques.text){
|
|
|
- // return true
|
|
|
- // }else{
|
|
|
- // return false
|
|
|
- // }
|
|
|
- } else {
|
|
|
- return false;
|
|
|
- }
|
|
|
- } else {
|
|
|
- return false;
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- right(bankIndex, ansIndex, option) {
|
|
|
- if (
|
|
|
- this.questionList[bankIndex].ques[ansIndex] &&
|
|
|
- this.questionList[bankIndex].ans[ansIndex]
|
|
|
- ) {
|
|
|
- if (
|
|
|
- this.questionList[bankIndex].ques[ansIndex].indexOf(
|
|
|
- option.optionsId
|
|
|
- ) != -1 ||
|
|
|
- this.questionList[bankIndex].ans[ansIndex].indexOf(
|
|
|
- option.optionsId
|
|
|
- ) != -1
|
|
|
- ) {
|
|
|
- return true;
|
|
|
- } else {
|
|
|
- return false;
|
|
|
- }
|
|
|
- } else {
|
|
|
- return false;
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- wrong(bankIndex, ansIndex, option) {
|
|
|
- if (
|
|
|
- this.questionList[bankIndex].ques[ansIndex] &&
|
|
|
- this.questionList[bankIndex].ans[ansIndex]
|
|
|
- ) {
|
|
|
- if (
|
|
|
- this.questionList[bankIndex].ques[ansIndex].indexOf(
|
|
|
- option.optionsId
|
|
|
- ) != -1 &&
|
|
|
- this.questionList[bankIndex].ans[ansIndex].indexOf(
|
|
|
- option.optionsId
|
|
|
- ) == -1
|
|
|
- ) {
|
|
|
- return true;
|
|
|
- } else {
|
|
|
- return false;
|
|
|
- }
|
|
|
- } else {
|
|
|
- return false;
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- isWrong(item, index) {
|
|
|
- if (this.questionList[index].ques) {
|
|
|
- //单选
|
|
|
- if (item.type == 1) {
|
|
|
- return this.questionList[index].ques != this.questionList[index].ans;
|
|
|
- //多选
|
|
|
- } else if (item.type == 2) {
|
|
|
- //每一项都相等
|
|
|
- return this.questionList[index].ques.some((item, i) => {
|
|
|
- return this.questionList[index].ans.indexOf(item) == -1;
|
|
|
- });
|
|
|
- //判断
|
|
|
- } else if (item.type == 3) {
|
|
|
- return this.questionList[index].ques != this.questionList[index].ans;
|
|
|
- } else {
|
|
|
- return false;
|
|
|
- }
|
|
|
- } else {
|
|
|
- return false;
|
|
|
- }
|
|
|
- },
|
|
|
- isPart(item, index) {
|
|
|
- if (this.questionList[index].ques) {
|
|
|
- if (item.type == 2) {
|
|
|
- let isWrong = this.questionList[index].ques.some((item, i) => {
|
|
|
- return this.questionList[index].ans.indexOf(item) == -1;
|
|
|
- });
|
|
|
-
|
|
|
- let isRight = this.questionList[index].ans.every((item, i) => {
|
|
|
- return item == this.questionList[index].ques[i];
|
|
|
- });
|
|
|
-
|
|
|
- if (!isRight && !isWrong) {
|
|
|
- return true;
|
|
|
- }
|
|
|
- }
|
|
|
- } else {
|
|
|
- return false;
|
|
|
- }
|
|
|
- },
|
|
|
- isOver(item, index) {
|
|
|
- if (this.questionList[index].ques) {
|
|
|
- if (item.type == 4) {
|
|
|
- //案例题
|
|
|
- let isOver = item.jsonStr.every((jsonItem, indexs) => {
|
|
|
- if (
|
|
|
- jsonItem.type == 1 ||
|
|
|
- jsonItem.type == 2 ||
|
|
|
- jsonItem.type == 3
|
|
|
- ) {
|
|
|
- if (item.ques[indexs]) {
|
|
|
- return true;
|
|
|
- } else {
|
|
|
- return false;
|
|
|
- }
|
|
|
- } else if (jsonItem.type == 5) {
|
|
|
- if (
|
|
|
- item.ques[indexs] &&
|
|
|
- (item.ques[indexs].text || item.ques[indexs].imageList.length)
|
|
|
- ) {
|
|
|
- console.log("chil");
|
|
|
- return true;
|
|
|
- } else {
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
- if (isOver) {
|
|
|
- return true;
|
|
|
- } else {
|
|
|
- return false;
|
|
|
- }
|
|
|
- } else if (item.type == 5) {
|
|
|
- //简答题
|
|
|
- //每一项都相等
|
|
|
- if (item.ques && (item.ques.imageList.length || item.ques.text)) {
|
|
|
- return true;
|
|
|
- }
|
|
|
- //判断
|
|
|
- } else {
|
|
|
- return false;
|
|
|
- }
|
|
|
- } else {
|
|
|
- return false;
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- tabSelect(index, bankindex) {
|
|
|
- this.$set(this.questionList[bankindex], "current", index);
|
|
|
- },
|
|
|
-
|
|
|
- showPhoto(contentStr) {
|
|
|
- if (contentStr && typeof contentStr == "string") {
|
|
|
- let reg = /<img[^>]*src[=\'\"\s]+([^\'\"]*)[\'\"]?[^>]*>/gi;
|
|
|
- let strArr = contentStr.match(reg);
|
|
|
- strArr.forEach((str, index) => {
|
|
|
- strArr[index] = str.replace(reg, "$1");
|
|
|
- });
|
|
|
-
|
|
|
- // 预览图片
|
|
|
- uni.previewImage({
|
|
|
- urls: strArr,
|
|
|
- longPressActions: {
|
|
|
- itemList: ["发送给朋友", "保存图片", "收藏"],
|
|
|
- success: function (data) {
|
|
|
- console.log(
|
|
|
- "选中了第" +
|
|
|
- (data.tapIndex + 1) +
|
|
|
- "个按钮,第" +
|
|
|
- (data.index + 1) +
|
|
|
- "张图片"
|
|
|
- );
|
|
|
- },
|
|
|
- fail: function (err) {
|
|
|
- console.log(err.errMsg);
|
|
|
- },
|
|
|
- },
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
- },
|
|
|
- computed: { ...mapGetters(['playSectionId','playChannelId','playVID','playNextId','userInfo','liveLast']) }
|
|
|
-
|
|
|
-};
|
|
|
-</script>
|
|
|
-
|
|
|
-<style scoped lang="scss">
|
|
|
- .lisSty {
|
|
|
- margin-bottom: 16rpx;
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
-
|
|
|
- .flex_auto {
|
|
|
- flex: 1;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- .swiper,.bankExam {
|
|
|
- height:100%;
|
|
|
- }
|
|
|
- .activeTI {
|
|
|
- vertical-align: middle;
|
|
|
- display: inline-block;
|
|
|
- border: 1rpx solid #eee;
|
|
|
- border-radius: 50rpx;
|
|
|
- height: 48rpx;
|
|
|
- line-height: 46rpx;
|
|
|
- text-align: center;
|
|
|
- width: 48rpx;
|
|
|
- margin-right: 15rpx;
|
|
|
- color: #666;
|
|
|
- font-size: 30rpx;
|
|
|
-
|
|
|
- &.right {
|
|
|
- color: #fff;
|
|
|
- background: #36c75a;
|
|
|
- }
|
|
|
-
|
|
|
- &.wrong {
|
|
|
- color: #fff;
|
|
|
- background: #ff3b30;
|
|
|
- }
|
|
|
-
|
|
|
- &.checked {
|
|
|
- color: #fff;
|
|
|
- background: #007aff;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- .submit_checkbox {
|
|
|
- position: fixed;
|
|
|
- left: 0;
|
|
|
- right: 0;
|
|
|
- bottom: 120rpx;
|
|
|
- margin: 20rpx auto;
|
|
|
- width: 526rpx;
|
|
|
- height: 80rpx;
|
|
|
- background: rgba(0, 122, 255, 1);
|
|
|
- color: #fff;
|
|
|
- text-align: center;
|
|
|
- line-height: 80rpx;
|
|
|
- font-size: 30rpx;
|
|
|
- border-radius: 40rpx;
|
|
|
-
|
|
|
- &.disabled {
|
|
|
- opacity: 0.6;
|
|
|
- }
|
|
|
- }
|
|
|
- .titles {
|
|
|
- overflow: hidden;
|
|
|
- margin-bottom: 24rpx;
|
|
|
- }
|
|
|
- .titBox {
|
|
|
- padding: 41rpx 25rpx 24rpx 25rpx;
|
|
|
- }
|
|
|
-
|
|
|
- .titBox_title {
|
|
|
- padding: 21rpx;
|
|
|
- }
|
|
|
-
|
|
|
- .tabs {
|
|
|
- margin: 10rpx;
|
|
|
- display: flex;
|
|
|
- .tab {
|
|
|
- margin: 0 4rpx;
|
|
|
- padding: 10rpx 13rpx;
|
|
|
- text-align: center;
|
|
|
- color: #007aff;
|
|
|
- font-size: 28rpx;
|
|
|
- border-radius: 16rpx;
|
|
|
- background: #fff;
|
|
|
-
|
|
|
- &.current {
|
|
|
- color: #fff;
|
|
|
- background: #007aff;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- .ans {
|
|
|
- margin: 8rpx 8rpx 8rpx;
|
|
|
-
|
|
|
- .ans_input {
|
|
|
- border-radius: 16rpx;
|
|
|
- background: #fff;
|
|
|
- .top {
|
|
|
- border-bottom: 1rpx solid #eeeeee;
|
|
|
- padding: 16rpx;
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
-
|
|
|
- .icon {
|
|
|
- margin-right: 20rpx;
|
|
|
- width: 40rpx;
|
|
|
- height: 38rpx;
|
|
|
- }
|
|
|
-
|
|
|
- .progress {
|
|
|
- flex: 1;
|
|
|
- }
|
|
|
-
|
|
|
- .submit {
|
|
|
- width: 168rpx;
|
|
|
- height: 48rpx;
|
|
|
- line-height: 48rpx;
|
|
|
- text-align: center;
|
|
|
- color: #fff;
|
|
|
- font-size: 30rpx;
|
|
|
- background: #007aff;
|
|
|
- border-radius: 24rpx;
|
|
|
-
|
|
|
- &.disabled {
|
|
|
- opacity: 0.6;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- .textarea {
|
|
|
- textarea {
|
|
|
- width: 100%;
|
|
|
- height: 287rpx;
|
|
|
- padding: 10rpx;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- .imgs {
|
|
|
- overflow: hidden;
|
|
|
- display: flex;
|
|
|
- width: 100%;
|
|
|
- .img {
|
|
|
- width: 104rpx;
|
|
|
- height: 104rpx;
|
|
|
- border-radius: 8rpx;
|
|
|
- position: relative;
|
|
|
- margin: 20rpx;
|
|
|
-
|
|
|
- text {
|
|
|
- position: absolute;
|
|
|
- right: -15rpx;
|
|
|
- top: -15rpx;
|
|
|
- width: 30rpx;
|
|
|
- height: 30rpx;
|
|
|
- text-align: center;
|
|
|
- line-height: 30rpx;
|
|
|
- color: #fff;
|
|
|
- background: #ff3b30;
|
|
|
- border-radius: 50%;
|
|
|
- }
|
|
|
-
|
|
|
- image {
|
|
|
- width: 100%;
|
|
|
- height: 100%;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- .ans_submit {
|
|
|
- padding: 16rpx;
|
|
|
- border-radius: 16rpx;
|
|
|
- background: #fff;
|
|
|
-
|
|
|
- .imgs {
|
|
|
- overflow: hidden;
|
|
|
- display: flex;
|
|
|
- width: 100%;
|
|
|
- .img {
|
|
|
- width: 104rpx;
|
|
|
- height: 104rpx;
|
|
|
- border-radius: 8rpx;
|
|
|
- position: relative;
|
|
|
- margin: 20rpx;
|
|
|
-
|
|
|
- image {
|
|
|
- width: 100%;
|
|
|
- height: 100%;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- .leftLetters {
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- width: 220rpx;
|
|
|
- .btnType {
|
|
|
- padding: 5rpx 10rpx;
|
|
|
- border: 1rpx solid #007aff;
|
|
|
- border-radius: 10rpx;
|
|
|
- background-color: rgba(0, 122, 255, 0.1);
|
|
|
- font-size: 28rpx;
|
|
|
- color: #007aff;
|
|
|
- margin-right: 15rpx;
|
|
|
- }
|
|
|
- }
|
|
|
- .firstLetter {
|
|
|
- display: flex;
|
|
|
- justify-content: space-between;
|
|
|
- align-items: center;
|
|
|
- margin-bottom: 30rpx;
|
|
|
- }
|
|
|
- .popupView {
|
|
|
- height: 100%;
|
|
|
- padding-bottom: 100rpx;
|
|
|
- .popupTops {
|
|
|
- height: 77rpx;
|
|
|
- border-bottom: 1rpx solid #eee;
|
|
|
- text-align: center;
|
|
|
- line-height: 77rpx;
|
|
|
- font-size: 24rpx;
|
|
|
- color: #999;
|
|
|
- position: relative;
|
|
|
- .topIcon {
|
|
|
- position: absolute;
|
|
|
- top: 10rpx;
|
|
|
- left: 50%;
|
|
|
- transform: translateX(-50%);
|
|
|
- width: 80rpx;
|
|
|
- height: 8rpx;
|
|
|
- background-color: #999;
|
|
|
- border-radius: 4rpx;
|
|
|
- }
|
|
|
- }
|
|
|
- .popupContent {
|
|
|
- }
|
|
|
- }
|
|
|
- .pageContent {
|
|
|
- position: relative;
|
|
|
- background-color: #eaeef1;
|
|
|
- height: 100%;
|
|
|
- padding-top: 8rpx;
|
|
|
- padding-bottom: 100rpx;
|
|
|
- overflow-y: scroll;
|
|
|
- }
|
|
|
- .pad_8 {
|
|
|
- background-color: #fff;
|
|
|
- margin: 0rpx 8rpx 8rpx;
|
|
|
- border-radius: 16rpx;
|
|
|
-
|
|
|
- &.no-margin {
|
|
|
- margin-top: -16rpx;
|
|
|
- border-radius: 0 0 16rpx 16rpx;
|
|
|
- }
|
|
|
- }
|
|
|
- .answer {
|
|
|
- height: 80rpx;
|
|
|
- line-height: 80rpx;
|
|
|
- padding: 0rpx 24rpx;
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- justify-content: space-between;
|
|
|
- color: #666;
|
|
|
- font-size: 30rpx;
|
|
|
- }
|
|
|
- .footer_btn {
|
|
|
- background-color: #fff;
|
|
|
- z-index: 10078;
|
|
|
- position: fixed;
|
|
|
- bottom: 0rpx;
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- justify-content: space-between;
|
|
|
- width: 100%;
|
|
|
- height: 98rpx;
|
|
|
- padding: 0rpx 38rpx;
|
|
|
- border-top: 1rpx solid #eee;
|
|
|
-
|
|
|
- .flex_center {
|
|
|
- flex: 1;
|
|
|
- display: flex;
|
|
|
- justify-content: center;
|
|
|
- align-items: center;
|
|
|
- flex-direction: column;
|
|
|
- margin: 0 200rpx;
|
|
|
- font-size: 24rpx;
|
|
|
- color: #999999;
|
|
|
-
|
|
|
- .up-icon {
|
|
|
- margin-bottom: 18rpx;
|
|
|
- width: 100%;
|
|
|
- display: flex;
|
|
|
- justify-content: center;
|
|
|
- image {
|
|
|
- width: 58rpx;
|
|
|
- height: 21rpx;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- .collect {
|
|
|
- visibility: hidden;
|
|
|
- width: 100rpx;
|
|
|
-
|
|
|
- &.show {
|
|
|
- visibility: visible;
|
|
|
- }
|
|
|
-
|
|
|
- > view {
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- align-items: center;
|
|
|
- justify-content: center;
|
|
|
-
|
|
|
- image {
|
|
|
- width: 32rpx;
|
|
|
- height: 32rpx;
|
|
|
- margin-bottom: 6rpx;
|
|
|
- }
|
|
|
-
|
|
|
- view {
|
|
|
- font-size: 24rpx;
|
|
|
- color: #999999;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- .boxSty {
|
|
|
- padding: 44rpx 41rpx 0rpx;
|
|
|
- }
|
|
|
- .liListSty {
|
|
|
- border: 1rpx solid #eeeeee;
|
|
|
- width: 88rpx;
|
|
|
- height: 88rpx;
|
|
|
- border-radius: 32rpx;
|
|
|
- text-align: center;
|
|
|
- line-height: 88rpx;
|
|
|
- color: #333;
|
|
|
- font-size: 32rpx;
|
|
|
- float: left;
|
|
|
- margin: 20rpx 23rpx;
|
|
|
-
|
|
|
- &.isRight {
|
|
|
- border: 1rpx solid #eeeeee;
|
|
|
- color: #fff;
|
|
|
- background: #36c75a;
|
|
|
- }
|
|
|
-
|
|
|
- &.isWrong {
|
|
|
- border: 1rpx solid #eeeeee;
|
|
|
- color: #fff;
|
|
|
- background: #ff3b30;
|
|
|
- }
|
|
|
-
|
|
|
- &.isPart {
|
|
|
- border: 1rpx solid #eeeeee;
|
|
|
- color: #fff;
|
|
|
- background: #FFC53D;
|
|
|
- }
|
|
|
-
|
|
|
- &.isOver {
|
|
|
- border: 1rpx solid #eeeeee;
|
|
|
- color: #fff;
|
|
|
- background: blue;
|
|
|
- }
|
|
|
- }
|
|
|
- .answerInfos {
|
|
|
- padding: 25rpx 25rpx 25rpx 23rpx;
|
|
|
- }
|
|
|
- .answerTitle {
|
|
|
- margin-bottom: 28rpx;
|
|
|
- color: #666;
|
|
|
- font-size: 30rpx;
|
|
|
- }
|
|
|
- .answerContent {
|
|
|
- font-size: 30rpx;
|
|
|
- color: #666;
|
|
|
- }
|
|
|
-
|
|
|
- .textChild {
|
|
|
- display: inline-block;
|
|
|
- vertical-align: middle;
|
|
|
- }
|
|
|
-</style>
|