From 4db90c67dad8e54d44094efca39ebd2ee7f56ffd Mon Sep 17 00:00:00 2001 From: unknown <qq1940665526@163.com> Date: 星期二, 04 六月 2024 15:17:39 +0800 Subject: [PATCH] Merge branch 'master' of http://182.92.203.7:2001/r/testbookLayout --- src/books/English/view/components/chapter001.vue | 134 +++++++++++++++++++++++++++++++-- src/books/embedded/assets/main.less | 2 src/books/childHealth/view/content/components/header.vue | 4 src/books/childHealth/assets/main.less | 2 src/components/matching/matching.vue | 28 +++--- src/books/English/view/components/header.vue | 11 +- src/books/English/assets/main.less | 2 src/books/embedded/view/components/header.vue | 2 8 files changed, 148 insertions(+), 37 deletions(-) diff --git a/src/books/English/assets/main.less b/src/books/English/assets/main.less index db919a5..7e7ed49 100644 --- a/src/books/English/assets/main.less +++ b/src/books/English/assets/main.less @@ -651,7 +651,7 @@ // 鑷畾涔夊唴瀹� .page-box { box-sizing: border-box; - min-height: 1128px !important; + min-height: 1128px; margin-bottom: 20px; box-shadow: 0 3px 6px 1px #00000029; background-color: #fff; diff --git a/src/books/English/view/components/chapter001.vue b/src/books/English/view/components/chapter001.vue index b00a6d0..4a537d1 100644 --- a/src/books/English/view/components/chapter001.vue +++ b/src/books/English/view/components/chapter001.vue @@ -517,6 +517,9 @@ <p class="center"> <img class="img-0" alt="" src="../../assets/images/0013-3.jpg" /> </p> + <!-- <div> + <matching :rawData="rawData" :item="question" :value="value"></matching> + </div> --> <h3 id="c003" class="fl al-cn"> <span class="bjh3">Reading</span> <audio :src="resource.readingOne" controls></audio> @@ -841,8 +844,7 @@ <p>along the way 娌块��</p> </li> </ul> - - + <div class="bj-note"> <p class="m0"><b class="fz-18">Notes:</b></p> <p class="m0"> @@ -1815,7 +1817,6 @@ <div class="pageBox"></div> </div> <!-- 鏄剧ず褰撳墠椤靛拰鎬婚〉鏁扮殑鍏冪礌 --> - </div> </div> </div> @@ -2306,9 +2307,11 @@ </template> <script> -import {getResourcePath} from "@/assets/methods/resources"; +import matching from "@/components/matching/matching.vue"; +import { getResourcePath } from "@/assets/methods/resources"; export default { name: "chapter-one", + components:{matching}, props: { showPageList: { type: Array, @@ -2324,8 +2327,119 @@ showAnswerFive: false, showImg: false, showQuestionAnswer: false, - // pageNum: "1", - // total: "27", + rawData: { + left: [ + { + oldId: "FB34", + txt: "Silk", + }, + { + oldId: "64D6", + txt: "The Great Wall", + }, + { + oldId: "2ED4", + txt: "Chinese Food", + }, + { + oldId: "44DE", + txt: "Chinese Tea", + }, + ], + right: [ + { + oldId: "64D6", + txt: "It is one of China's must-see sights for visitors, which shows thewisdom of Chinese people.", + }, + { + oldId: "FB34", + txt: "It was first discovered and drank in China and my favorileLongjing tca is praduced near the West Lake in Hangzhou.", + }, + { + oldId: "2ED4", + txt: "The clothing material is quite popular among Roman women inancient times.", + }, + { + oldId: "44DE", + txt: "It is very delicious and I like the hot and spicy Sichuan lavor hest.", + }, + ], + }, + value: [], + question: { + KnowledgePoint: "123", + analysis: "123", + answer: [ + { + id: "FB34", + linkValue: "The clothing material is quite popular among Roman women inancient times.", + value: "Silk", + }, + { + id: "64D6", + linkValue: "It is one of China's must-see sights for visitors, which shows thewisdom of Chinese people.", + value: "The Great Wall", + }, + { + id: "2ED4", + linkValue: "C", + value: "Chinese Food", + }, + { + id: "44DE", + linkValue: "D", + value: "Chinese Tea", + }, + ], + optionStyle: undefined, + id: 489306, + options: { + linkValues: [ + { + oldId: "64D6", + txt: "It is one of China's must-see sights for visitors, which shows thewisdom of Chinese people.", + }, + { + oldId: "FB34", + txt: "The clothing material is quite popular among Roman women inancient times.", + }, + { + oldId: "2ED4", + txt: "It is very delicious and I like the hot and spicy Sichuan lavor hest.", + }, + { + oldId: "44DE", + txt: "It was first discovered and drank in China and my favoriteLongjing tea is produced near the West Lake in Hangzhou.", + }, + ], + values: [ + { + oldId: "FB34", + txt: "Silk", + }, + { + oldId: "64D6", + txt: "The Great Wall", + }, + { + oldId: "2ED4", + txt: "Chinese Food", + }, + { + oldId: "44DE", + txt: "Chinese Tea", + }, + ], + }, + questionType: "matching", + stem: { + stemTxt: "鎸夐『搴忚繛绾�", + }, + stemStyle: undefined, + titleDescription: "1", + userChoise: [], + value: [], + }, questionData: { warnUp: { one: { @@ -2542,14 +2656,14 @@ JSON.stringify(this.questionData) ); }, - getPath() { - this.resource.listenOne = getResourcePath( + async getPath() { + this.resource.listenOne = await getResourcePath( "422139A2EF66EA888C5ED1D550AE23E0" ); - this.resource.readingOne = getResourcePath( + this.resource.readingOne = await getResourcePath( "3F442B682D84C8AB06C800B29D734920" ); - this.resource.readingTwo = getResourcePath( + this.resource.readingTwo = await getResourcePath( "E8719EC88026BCFB11D292AA999F6D3D" ); }, diff --git a/src/books/English/view/components/header.vue b/src/books/English/view/components/header.vue index 23782d6..c310ac9 100644 --- a/src/books/English/view/components/header.vue +++ b/src/books/English/view/components/header.vue @@ -1,16 +1,13 @@ <template> <div class="chapter" num="1"> - <!-- <div class="page-box"> - <matching :rawData="rawData" :item="question" :value="value"></matching> - </div> --> <!-- --> - <div class="page-box mt-20" page="1"> + <div class="page-box mt-20" page="1" style="min-height: auto"> <div v-if="showPageList.indexOf(1) > -1"> <img class="img-0" alt="" src="../../assets/images/Cover.jpg" /> </div> </div> <!-- 1 --> - <div class="page-box" page="2"> + <div class="page-box" page="2" style="min-height: auto"> <div v-if="showPageList.indexOf(2) > -1"> <img class="img-0" alt="" src="../../assets/images/SMY.jpg" /> </div> @@ -191,14 +188,14 @@ </div> </div> </div> + </div> </template> <script> -import matching from "@/components/matching/matching.vue"; + export default { name: "page-header", - components: { matching }, props: { showPageList: { type: Array, diff --git a/src/books/childHealth/assets/main.less b/src/books/childHealth/assets/main.less index 3e83968..49d7fe7 100644 --- a/src/books/childHealth/assets/main.less +++ b/src/books/childHealth/assets/main.less @@ -451,7 +451,7 @@ } .page-box { box-sizing: border-box; - min-height: 1150px !important; + min-height: 1150px ; margin-bottom: 20px; box-shadow: 0 3px 6px 1px #00000029; background-color: #fff; diff --git a/src/books/childHealth/view/content/components/header.vue b/src/books/childHealth/view/content/components/header.vue index 137585a..855a0ce 100644 --- a/src/books/childHealth/view/content/components/header.vue +++ b/src/books/childHealth/view/content/components/header.vue @@ -1,12 +1,12 @@ <template> <div class="chapter" num="1"> <!-- 灏侀潰 --> - <div class="page-box cover" page="1"> + <div class="page-box cover" page="1" style="min-height:auto"> <div v-if="showPageList.indexOf(1) > -1"> <img src="../../../assets/images/Covers.jpg" alt="" /> </div> </div> - <div class="page-box cover" page="2"> + <div class="page-box cover" page="2" style="min-height:auto"> <div v-if="showPageList.indexOf(2) > -1"> <img src="../../../assets/images/Cover.jpg" alt="" /> </div> diff --git a/src/books/embedded/assets/main.less b/src/books/embedded/assets/main.less index 9d51bae..5b16ee0 100644 --- a/src/books/embedded/assets/main.less +++ b/src/books/embedded/assets/main.less @@ -601,7 +601,7 @@ // 鑷畾涔夊唴瀹� .page-box { box-sizing: border-box; - min-height: 1092px !important; + min-height: 1092px ; margin-bottom: 20px; box-shadow: 0 3px 6px 1px #00000029; background-color: #fff; diff --git a/src/books/embedded/view/components/header.vue b/src/books/embedded/view/components/header.vue index f54dbda..477e3f6 100644 --- a/src/books/embedded/view/components/header.vue +++ b/src/books/embedded/view/components/header.vue @@ -1,7 +1,7 @@ <template> <div class="chapter" num="1"> <!-- 灏侀潰 --> - <div class="page-box" page="1"> + <div class="page-box" page="1" style="min-height: auto;"> <div v-if="showPageList.indexOf(1) > -1"> <h1 class="frontCover" title=""> <img diff --git a/src/components/matching/matching.vue b/src/components/matching/matching.vue index a33045c..2ceb837 100644 --- a/src/components/matching/matching.vue +++ b/src/components/matching/matching.vue @@ -1,6 +1,6 @@ <template> - <div class="connect" id="connect" ref="connect" @mouseup="mouseup"> - <div class="answer" @mousemove="mousemove"> + <div class="connect" id="connect" ref="connect" @mousemove="mousemove" @mouseup="(e) => touchend(e)"> + <div class="answer" > <div class="answer-box"> <div class="answer-box-item" @@ -19,7 +19,6 @@ v-for="(item, index) in rightArr" :key="index" ref="right" - @mouseup="(e) => touchend(e, item, index)" > {{ item.label.txt }} </div> @@ -57,6 +56,7 @@ scrollTop: 0, debounce: false, checkItem: null, + checkItemIndex:null }; }, props: { @@ -149,8 +149,8 @@ }); }, // 瑙︽懜缁撴潫 - touchend(e, item, index) { - console.log("鎶捣", e,item); + touchend(e, index) { + console.log("鎶捣", e,this.checkItem); this.isDragging = false; if (this.item.showAnswer) { return false; @@ -164,20 +164,20 @@ this.canvasB.clearRect(0, 0, this.clientWidth, this.clientHeight); // 濡傛灉涓嶆槸鍙宠竟鐨刣om 鐩存帴鎶� 绾� 骞叉帀 -- 璇佹槑涓嶆槸 娌℃湁鎷栧埌鍙宠竟涓� if (!right) { - item.line = []; + this.checkItem.line = []; return; } // 濡傛灉宸叉湁鐨勪笉鏄垜鑷繁 鐩存帴鏇挎崲鎺変笂涓�涓殑 - if (item.value[0] !== right.index) { + if (this.checkItem.value[0] !== right.index) { let model = this.leftArr.find((r) => r.value[0] === right.index); if (model) { model.value = []; model.line = []; } - item.value = [right.index]; + this.checkItem.value = [right.index]; } // 閲嶆柊璧嬪�� 绾跨殑 x y 杞� - item.line = this.attachment(index, right.index); + this.checkItem.line = this.attachment(this.checkItemIndex, right.index); this.drawing(); let model = this.leftArr .map((r, i) => { @@ -187,15 +187,16 @@ }; }) .filter((r) => r.right !== undefined); - this.$emit("input", model); + // this.$emit("input", model); this.item.userChoise = model; - console.log(JSON.stringify(model)); + // console.log(JSON.stringify(model)); }, // 瑙︽懜寮�濮� - touchstart(e, item) { + touchstart(e, item,index) { this.isDragging = true; console.log("鎸変笅", e); this.checkItem = item + this.checkItemIndex = index e.stopPropagation(); // let event = e.targetTouches[0]; item.line = [ @@ -219,11 +220,10 @@ // 绉诲姩涓� mousemove(e) { if (!this.isDragging) return false; - console.log("绉诲姩", e); if (this.item.showAnswer) { return false; } - // let event = e.targetTouches[0]; + console.log('绉诲姩',e); this.checkItem.line[2] = e.pageX; this.checkItem.line[3] = e.pageY - this.$refs.connect.getBoundingClientRect().y + this.scrollTop; -- Gitblit v1.9.1