From 99554e0613bd5d8b0230ebfbf66524686e030acb Mon Sep 17 00:00:00 2001 From: 闫增涛 <1829501689@qq.com> Date: 星期三, 08 五月 2024 17:57:40 +0800 Subject: [PATCH] 代码目录结构调整、分页,样式修改 --- src/components/examinations/index.vue | 56 +++++++++++++++++++++++++++++++++++++++++++++++--------- 1 files changed, 47 insertions(+), 9 deletions(-) diff --git a/src/view/components/examinations/index.vue b/src/components/examinations/index.vue similarity index 95% copy from src/view/components/examinations/index.vue copy to src/components/examinations/index.vue index 647a3ce..9adde9f 100644 --- a/src/view/components/examinations/index.vue +++ b/src/components/examinations/index.vue @@ -1,7 +1,14 @@ <template> <div class="examination" v-loading="loading"> <div v-for="(item, nindex) in cardList" :key="nindex"> - <h1>{{ item.catalogName }}</h1> + <p class="catalogName"> + <span v-if="nindex == 0">涓�銆�</span> + <span v-if="nindex == 1">浜屻��</span> + <span v-if="nindex == 2">涓夈��</span> + <span v-if="nindex == 3">鍥涖��</span> + <span v-if="nindex == 4">浜斻��</span> + <span>{{ item.catalogName }}</span> + </p> <ul> <li v-for="(value, index) in item.infoList" @@ -11,7 +18,7 @@ <!-- 鏍囬 --> <div class="questionTitle"> <div class="titleContent"> - <span class="questionNum">{{ index + 1 }}銆�</span> + <span class="questionNum" :style="{marginTop:value.questionType == 'completion' ? '12px' : '0'}">{{ index + 1 }}銆�</span> <!-- 鍚姏杩涘害鏉� --> <!-- <answerAudioPlayer :audioUrl="value.src" v-show="item.name == '鍚姏棰�'" /> --> <!-- 棰樺共 --> @@ -249,7 +256,7 @@ > </p> </div> - <p class="difficulty"> + <p class="difficulty" v-if="value.difficulty"> <span style="color: #333">闅惧害绛夌骇锛�</span> <el-rate v-model="value.difficulty" @@ -347,7 +354,7 @@ <div class="bottom-btn" v-if="!loading"> <el-button>淇濆瓨</el-button> - <el-button>鎻愪氦</el-button> + <el-button @click="openAnswers">鎻愪氦</el-button> <el-button @click="redo">閲嶅仛</el-button> <el-button @click="openAnswers">鏌ョ湅绛旀</el-button> </div> @@ -365,6 +372,9 @@ cardList: [], loading: false, }; + }, + mounted() { + this.getIdPathList() }, methods: { // 鏁扮粍杞负瀛楃涓叉柟娉� @@ -414,6 +424,7 @@ // } }, openAnswers() { + this.$data.loading = true for (let index = 0; index < this.cardList.length; index++) { const item = this.cardList[index]; for (let cindex = 0; cindex < item.infoList.length; cindex++) { @@ -421,6 +432,7 @@ citem.isComplete = true; } } + this.$data.loading = false }, watchParsing(data) { data.isUnfold = !data.isUnfold; @@ -432,13 +444,14 @@ path: "*", queryType: "*", productId: this.config.bookId, - cmsPath: this.$props.productLinkPath, + cmsPath: '24080\\63791\\63792\\63807', pading: { start: 0, size: 999, }, }; this.MG.store.getProductDetail(query).then(async (res) => { + console.log(this.$props.productLinkPath,res.datas.cmsDatas[0].datas); const idPathList = res.datas.cmsDatas[0].datas; await this.getQuestionList(idPathList); }); @@ -672,8 +685,16 @@ </script> <style lang="less" scoped> +.catalogName { + color: #00aeef; + text-indent: 1em !important; + font-size: 24px; +} .examination { min-height: 100px; + ul { + list-style:none ; + } } p { margin-top: 0em; @@ -759,10 +780,12 @@ line-height: 32px; color: #000; span { + display: inline-block; font-size: 14px; - line-height: 26px; + // line-height: 26px; color: #000; font-weight: 400; + margin-top: 6px; } .el-input { width: 150px; @@ -778,6 +801,9 @@ border-right: 0 !important ; border-bottom: 1px solid #000 !important; border-radius: 0 !important; + } + /deep/ .el-input.is-disabled .el-input__inner { + background-color: #fff; } /dee/ p { display: flex; @@ -800,7 +826,8 @@ .option { .el-radio, .el-checkbox { - min-height: 32px; + // min-height: 32px; + height: min-content; display: flex; align-items: center; min-width: 45%; @@ -812,6 +839,7 @@ } } .optionContent { + margin: 0; display: flex; align-items: center; line-height: 26px; @@ -819,7 +847,7 @@ } } .analysis { - margin-top: 20px; + margin: 20px 0; } .el-collapse { width: 100%; @@ -827,7 +855,8 @@ /** 瑙f瀽 */ .objective { /deep/ .el-collapse-item__header { - width: 95%; + min-height: 48px; + height: min-content; padding: 0 20px; font-size: 14px; background-color: #f4f4f4; @@ -836,10 +865,15 @@ height: 100%; display: flex; justify-content: space-between; + flex-wrap: wrap; .headerConent { height: 100%; display: flex; align-items: center; + flex-wrap: wrap; + p { + margin-bottom: 0; + } .el-image { width: 9px; height: 9px; @@ -1117,5 +1151,9 @@ margin-top: 50px; display: flex; justify-content: center; + flex-wrap: wrap; + .el-button { + margin-top: 10px; + } } </style> -- Gitblit v1.9.1