From 4746ad5110684d132f7b7f39511af4eae87a0b15 Mon Sep 17 00:00:00 2001 From: 闫增涛 <1829501689@qq.com> Date: 星期三, 30 四月 2025 15:25:25 +0800 Subject: [PATCH] 答题器样式及答案解析功能优化 --- src/assets/js/config.ts | 4 ++-- src/views/examination/components/list.vue | 12 +++++++----- src/views/examination/index.vue | 9 ++++++--- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/src/assets/js/config.ts b/src/assets/js/config.ts index e5d0973..58f52c3 100644 --- a/src/assets/js/config.ts +++ b/src/assets/js/config.ts @@ -1,7 +1,7 @@ // 娴嬭瘯 -// export const requestCtx = "https://jsek.bnuic.com"; //jsek +export const requestCtx = "https://jsek.bnuic.com"; //jsek // export const appId = 3; -export const requestCtx = "http://182.92.203.7:3007"; //jsek +// export const requestCtx = "http://182.92.203.7:3007"; //jsek export const appId = 27 export const requestTimeOut = 300000; // 璇锋眰瓒呮椂鏃堕棿 export const tokenKey = "token"; diff --git a/src/views/examination/components/list.vue b/src/views/examination/components/list.vue index ab6ba44..d4ef5d7 100644 --- a/src/views/examination/components/list.vue +++ b/src/views/examination/components/list.vue @@ -237,18 +237,18 @@ <!-- 鎻愪氦鍚庤В鏋� --> <div class="analysis" v-if="value.isComplete"> <ul class="analysis-box"> - <li class="headerConent" style="width: 60%"> + <li class="headerConent" > <!-- 姝g‘閿欒鏍囪瘑 --> <ul class="mark"> <li v-if="value.isRight" class="mark-correct">姝g‘</li> <li v-if="value.isRight == false" class="mark-error">閿欒</li> </ul> - <p :title="arrayToString(value.answer)"> + <p :title="arrayToString(value.answer)" class="mark-txt " > <span>銆愭纭瓟妗堛�戯細</span> <span v-html="arrayToString(value.answer)" class="correctBox"></span> </p> <p - :class="value.isRight ? 'correct textOverFlow' : 'error textOverFlow'" + :class="value.isRight ? 'correct textOverFlow mark-txt' : 'error textOverFlow mark-txt'" :title="arrayToString(value.userAnswer)" style="margin-left: 20px" > @@ -275,7 +275,7 @@ v-model="value.isUnfold" @change="handleChange(value)" accordion - v-if="value.questionType != 'shortAnswer'" + v-if="value.questionType != 'shortAnswer' && value.questionType != 'formula'" > <el-collapse-item :name="value.id" class="objective"> <template #title> @@ -636,7 +636,9 @@ .headerConent { height: 100%; display: flex; - align-items: center; + .mark-txt { + max-width: 385px; + } .el-image { width: 9px; height: 9px; diff --git a/src/views/examination/index.vue b/src/views/examination/index.vue index 41dfcc6..8a252b9 100644 --- a/src/views/examination/index.vue +++ b/src/views/examination/index.vue @@ -271,12 +271,12 @@ for (let cindex = 0; cindex < item.infoList.length; cindex++) { const citem = item.infoList[cindex] console.log(citem) - if (type == 'noshow') { citem.isUnfold = '' examination.isCollapse = false } else { - citem.questionType == 'shortAnswer' || citem.questionType == 'formula' ? (citem.isUnfold = true) : (citem.isUnfold = citem.id) + // citem.questionType == 'shortAnswer' || citem.questionType == 'formula' ? (citem.isUnfold = true) : (citem.isUnfold = citem.id) + citem.isUnfold = citem.id examination.isCollapse = true } } @@ -933,7 +933,7 @@ examination.allError[1].errorList = error.find((citem:any) => citem.type == 'json').errorList } } catch (error) {} - if (examination.allError[0].errorList || examination.allError[1].errorList) { + if (examination.allError[0].errorList.length || examination.allError[1].errorList.length) { examination.cardList = (await getErrorDataList()) as any await getJsonError() } else { @@ -1436,6 +1436,9 @@ .examintaion-box { display: flex; justify-content: space-between; + li:last-child { + flex: 1; + } .examintaion-box-list { padding-right: 10px; height: 850px; -- Gitblit v1.9.1