|
|
@@ -3,18 +3,18 @@
|
|
|
<div class="cq_title" v-if="work.testJson[showIndex]">
|
|
|
<span>{{ work.testJson[showIndex].teststitle }}</span>
|
|
|
|
|
|
- <div class="cq_changeBtnArea" v-if="work.testJson.length>1">
|
|
|
+ <!-- <div class="cq_changeBtnArea" v-if="work.testJson.length>1">
|
|
|
<span :class="{cq_cba_disabled: showIndex == 0}" @click="changeQuestion('prev')">{{ lang.ssPrevQ }}</span>
|
|
|
<span :class="{cq_cba_disabled: showIndex == work.testJson.length - 1}" @click="changeQuestion('next')">{{ lang.ssNextQ }}</span>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
</div>
|
|
|
|
|
|
|
|
|
- <img class="cq_image" v-if="work.testJson[showIndex].timuList.length>0" :src="work.testJson[showIndex].timuList[0].src" @click="$hevueImgPreview(work.testJson[showIndex].timuList[0].src)">
|
|
|
+ <img class="cq_image" v-if="work.testJson[showIndex] && work.testJson[showIndex].timuList && work.testJson[showIndex].timuList.length>0" :src="work.testJson[showIndex].timuList[0].src" @click="$hevueImgPreview(work.testJson[showIndex].timuList[0].src)">
|
|
|
|
|
|
<div class="cq_type" v-if="work.testJson[showIndex]">
|
|
|
- {{ work.testJson[showIndex].type == 1 ? lang.MultipleChoice : lang.MultipleChoice }}
|
|
|
- <span v-if="work.testJson.length>1">({{showIndex+1}}/{{work.testJson.length}})</span>
|
|
|
+ {{ work.testJson[showIndex].type == '1' ? lang.SingleChoice : lang.MultipleChoice }}
|
|
|
+ <!-- <span v-if="work.testJson.length>1">({{showIndex+1}}/{{work.testJson.length}})</span> -->
|
|
|
|
|
|
</div>
|
|
|
<div class="cq_checkListArea">
|
|
|
@@ -67,6 +67,18 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+
|
|
|
+ <div class="cq_changeBtn" v-if="work.testJson.length>1">
|
|
|
+ <div :class="{cq_cb_disabled: showIndex == 0}" @click="changeQuestion('prev')">
|
|
|
+ <svg style="transform: rotate(-90deg);" viewBox="0 0 1024 1024" version="1.1" width="200" height="200"><path d="M512 330.666667c14.933333 0 29.866667 4.266667 40.533333 14.933333l277.33333399 234.666667c27.733333 23.466667 29.866667 64 8.53333301 89.6-23.466667 27.733333-64 29.866667-89.6 8.53333299L512 477.866667l-236.8 200.53333299c-27.733333 23.466667-68.266667 19.19999999-89.6-8.53333299-23.466667-27.733333-19.19999999-68.266667 8.53333301-89.6l277.33333399-234.666667c10.666667-10.666667 25.6-14.933333 40.533333-14.933333z" fill=""></path></svg>
|
|
|
+ </div>
|
|
|
+ <span>{{ showIndex+1 }}/{{work.testJson.length}}</span>
|
|
|
+ <div :class="{cq_cb_disabled: showIndex == work.testJson.length - 1}" @click="changeQuestion('next')">
|
|
|
+ <svg style="transform: rotate(90deg);" viewBox="0 0 1024 1024" version="1.1" width="200" height="200"><path d="M512 330.666667c14.933333 0 29.866667 4.266667 40.533333 14.933333l277.33333399 234.666667c27.733333 23.466667 29.866667 64 8.53333301 89.6-23.466667 27.733333-64 29.866667-89.6 8.53333299L512 477.866667l-236.8 200.53333299c-27.733333 23.466667-68.266667 19.19999999-89.6-8.53333299-23.466667-27.733333-19.19999999-68.266667 8.53333301-89.6l277.33333399-234.666667c10.666667-10.666667 25.6-14.933333 40.533333-14.933333z" fill=""></path></svg>
|
|
|
+ </div>
|
|
|
+ <!-- <span :class="{cq_cba_disabled: showIndex == 0}" @click="changeQuestion('prev')">{{ lang.ssPrevQ }}</span>
|
|
|
+ <span :class="{cq_cba_disabled: showIndex == work.testJson.length - 1}" @click="changeQuestion('next')">{{ lang.ssNextQ }}</span> -->
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -136,6 +148,7 @@ export default {
|
|
|
if (this.work.testJson[this.showIndex].type == "1") {
|
|
|
this.work.testJson[this.showIndex].userAnswer = index;
|
|
|
} else {
|
|
|
+ if(typeof this.work.testJson[this.showIndex].userAnswer !== 'object') this.work.testJson[this.showIndex].userAnswer = [];
|
|
|
if (this.work.testJson[this.showIndex].userAnswer.includes(index)) {
|
|
|
this.work.testJson[this.showIndex].userAnswer = this.work.testJson[
|
|
|
this.showIndex
|
|
|
@@ -411,4 +424,41 @@ export default {
|
|
|
z-index: 1; /* after在内容下方 */
|
|
|
pointer-events: none;
|
|
|
}
|
|
|
+
|
|
|
+.cq_changeBtn{
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ gap: 1.5rem;
|
|
|
+ margin-top: 2rem;
|
|
|
+}
|
|
|
+
|
|
|
+.cq_changeBtn>div{
|
|
|
+ padding: .6rem;
|
|
|
+ border-radius: .5rem;
|
|
|
+ border: solid 2px #F6C82B;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ cursor: pointer;
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+.cq_changeBtn>span{
|
|
|
+ font-weight: 500;
|
|
|
+}
|
|
|
+
|
|
|
+.cq_changeBtn>div>svg{
|
|
|
+ fill: #F6C82D;
|
|
|
+ width: 1rem;
|
|
|
+ height: 1rem;
|
|
|
+}
|
|
|
+
|
|
|
+.cq_cb_disabled{
|
|
|
+ cursor: not-allowed !important;
|
|
|
+ border-color: #FEF8E9 !important;
|
|
|
+}
|
|
|
+
|
|
|
+.cq_cb_disabled>svg{
|
|
|
+ fill: #A3A3A3 !important;
|
|
|
+}
|
|
|
</style>
|