From 92a5087cff2821903314f092209a4c792bc28c3e Mon Sep 17 00:00:00 2001 From: ZhangXianQiang <1135831638@qq.com> Date: 星期一, 01 七月 2024 13:48:00 +0800 Subject: [PATCH] fix:修改考试列表type --- src/components/ExamInfo/index.vue | 6 ++++-- src/views/exam/components/answer-main/answer-fill/index.vue | 30 +++++++++++++++++------------- src/style.css | 19 +++++++++++++++++++ src/views/exam-list/data-list/index.vue | 2 +- 4 files changed, 41 insertions(+), 16 deletions(-) diff --git a/src/components/ExamInfo/index.vue b/src/components/ExamInfo/index.vue index c092215..4c4ca4e 100644 --- a/src/components/ExamInfo/index.vue +++ b/src/components/ExamInfo/index.vue @@ -1,7 +1,6 @@ <template> <div class="info-container w-full"> - <div class="exam-title break-all mb-4 text-base text-gray-700"> - 绗瑊{questionIndex + 1}}棰�: {{ activeQuestion.title }} + <div class="exam-title break-all mb-4 text-base text-gray-700" v-html="activeQuestion.title"> </div> <div class="audio-container" v-if="activeQuestion.audioFile"> @@ -36,4 +35,7 @@ max-height: 250px; margin: 20px 10px; } +p { + display: inline !important; +} </style> \ No newline at end of file diff --git a/src/style.css b/src/style.css index 0cfd3ab..364ac34 100644 --- a/src/style.css +++ b/src/style.css @@ -39,4 +39,23 @@ opacity: 0; transition: all 0.2s; transform: translateX(30px); +} + +.gapfilling-span { + color: red; + padding: 0px 30px; + margin: 0px 5px; + border-bottom: 3px double red; +} + +.exampaper-item-box { + margin-top: 20px; +} + +.exampaper-item { + margin: 5px 0px; +} + +.ueditor-p { + display: inline !important; } \ No newline at end of file diff --git a/src/views/exam-list/data-list/index.vue b/src/views/exam-list/data-list/index.vue index d18e9d9..29570fe 100644 --- a/src/views/exam-list/data-list/index.vue +++ b/src/views/exam-list/data-list/index.vue @@ -73,7 +73,7 @@ type: 'success', disabled: false }, - 3: { + 'finished': { text: '宸茬粨鏉�', type: 'info', disabled: true diff --git a/src/views/exam/components/answer-main/answer-fill/index.vue b/src/views/exam/components/answer-main/answer-fill/index.vue index 0712750..773dfab 100644 --- a/src/views/exam/components/answer-main/answer-fill/index.vue +++ b/src/views/exam/components/answer-main/answer-fill/index.vue @@ -4,10 +4,12 @@ <ExamInfo class="mb-5" :questionIndex="currentIndex" :activeQuestion="activeQuestion"></ExamInfo> <div class="answer-content"> - <div class="answer-item flex" v-for="item, index in activeQuestion.questionItemList" @click="answerClick(item)" + <div class="answer-item flex" v-for="item, index in activeQuestion.questionItemList" :class="answerState(item)"> <div class="answer-icon flex flex-col justify-center items-center flex-shrink-0">{{ item.prefix }}</div> - <div class="answer-text text-gray-700">{{ item.content }}</div> + <div class="answer-text text-gray-700"> + <el-input v-model="answerList[`answer${index}`]" @focus="answerClick(item)" maxlength="30" placeholder="璇疯緭鍏ュ唴瀹�"></el-input> + </div> </div> </div> @@ -16,17 +18,23 @@ </template> <script setup> -import { ref } from 'vue'; +import { ref,watchEffect } from 'vue'; import { storeToRefs } from 'pinia'; import ExamInfo from '@/components/ExamInfo/index.vue'; import { useExamStore } from '@/store/index.js'; const examStore = useExamStore(); + +const answerList = ref({ + 'answer0': '' +}); + const { currentType, currentIndex } = storeToRefs(examStore); const activeQuestion = ref(examStore.getActiveQuestion); const answerClick = (item) => { + return; if (item) { if (item.isActive) { item.isActive = !item.isActive; @@ -57,6 +65,12 @@ return activeQuestion.value.questionItemList.find(item => item.isActive); } +watchEffect(() => { + activeQuestion.value.questionItemList.forEach((item,index) => { + answerList[`answer${index}`] = ''; + }) +}) + </script> @@ -67,19 +81,9 @@ border: 1px solid #DCDFE6; overflow: hidden; margin-bottom: 20px; - cursor: pointer; &:last-of-type { margin-bottom: 0; - } - - &:hover { - border-color: #3680fa; - - .answer-icon { - color: #3680fa; - border-color: #3680fa; - } } -- Gitblit v1.8.0