From db197adc2c4bdb0335f3d5b0a364d5b3dac1ea02 Mon Sep 17 00:00:00 2001 From: zhongshujie <2862698242@qq.com> Date: 星期四, 18 七月 2024 11:32:23 +0800 Subject: [PATCH] Merge branch 'master' of http://182.92.203.7:2001/r/testbookLayout --- src/books/English/view/components/chapter006.vue | 802 ++++++++++++++++++++++++++++++++++++--------------------- 1 files changed, 505 insertions(+), 297 deletions(-) diff --git a/src/books/English/view/components/chapter006.vue b/src/books/English/view/components/chapter006.vue index cefe9fa..47065a0 100644 --- a/src/books/English/view/components/chapter006.vue +++ b/src/books/English/view/components/chapter006.vue @@ -52,22 +52,90 @@ <div class="bk-wh"> <p>open plan office銆�cubicles銆�private office銆�SOHO</p> </div> - <p class="center"> - <img class="img-e" alt="" src="../../assets/images/0108-1.jpg" /> - </p> - <p class="center">1._____________________</p> - <p class="center"> - <img class="img-e" alt="" src="../../assets/images/0108-2.jpg" /> - </p> - <p class="center">2._____________________</p> - <p class="center"> - <img class="img-e" alt="" src="../../assets/images/0108-3.jpg" /> - </p> - <p class="center">3._____________________</p> - <p class="center"> - <img class="img-e" alt="" src="../../assets/images/0108-4.jpg" /> - </p> - <p class="center">4._____________________</p> + <ul class="fl fw-wr"> + <li class="w50"> + <p class="center"> + <img style="width:92%" alt="" src="../../assets/images/0108-1.jpg" /> + </p> + <p class="center">1. + <select class="select-border" v-model="dropDownOne[0].value[0].userAnswer" @change="saveDropdoenOne" + :disabled="dropDownOne[0].isComplete"> + <option v-for="(item, index) in dropDownOne[0].option" :key="index" :value="item"> + {{ item}} + </option> + </select> + <img :src="dropDownOne[0].value[0].isRight ? correctIcon : errorIcon" v-if="dropDownOne[0].isComplete"> + </p> + </li> + <li class="w50"> + <p class="center"> + <img class="w100" alt="" src="../../assets/images/0108-2.jpg" /> + </p> + <p class="center">2. + <select class="select-border" v-model="dropDownOne[0].value[1].userAnswer" @change="saveDropdoenOne" + :disabled="dropDownOne[0].isComplete"> + <option v-for="(item, index) in dropDownOne[0].option" :key="index" :value="item"> + {{ item}} + </option> + </select> + <img :src="dropDownOne[0].value[1].isRight ? correctIcon : errorIcon" v-if="dropDownOne[0].isComplete"> + </p> + </li> + <li class="w50"> + <p class="center"> + <img style="width:92%" alt="" src="../../assets/images/0108-3.jpg" /> + </p> + <p class="center">3. + <select class="select-border" v-model="dropDownOne[0].value[2].userAnswer" @change="saveDropdoenOne" + :disabled="dropDownOne[0].isComplete"> + <option v-for="(item, index) in dropDownOne[0].option" :key="index" :value="item"> + {{ item}} + </option> + </select> + <img :src="dropDownOne[0].value[2].isRight ? correctIcon : errorIcon" v-if="dropDownOne[0].isComplete"> + </p> + </li> + <li class="w50"> + <p class="center"> + <img class="w100" alt="" src="../../assets/images/0108-4.jpg" /> + </p> + <p class="center">4. + <select class="select-border" v-model="dropDownOne[0].value[3].userAnswer" @change="saveDropdoenOne" + :disabled="dropDownOne[0].isComplete"> + <option v-for="(item, index) in dropDownOne[0].option" :key="index" :value="item"> + {{ item }} + </option> + </select> + <img :src="dropDownOne[0].value[3].isRight ? correctIcon : errorIcon" v-if="dropDownOne[0].isComplete"> + </p> + </li> + </ul> + <div class="event-header-text-bc pd-5 w100 mt-20" + v-if="dropDownOne[0].isShowAnswer"> + <span>绛旀锛�</span> + <span v-for="(item,index) in dropDownOne[0].value" :key="index" class="mr-20"> + {{index + 1}}.{{ item.answer }} + </span> + </div> + <div class="w100 fl ju-cn"> + <ul class="fl ju-ev" style="width:80%"> + <li> + <button class="btn-border btn-w" @click="handledropDownOne"> + 鎻愪氦 + </button> + </li> + <li> + <button @click="recastdropDownOne" class="btn-border btn-w"> + 閲嶅仛 + </button> + </li> + <li> + <button @click="viewdropDownOne" class="parimary-btn"> + 鏌ョ湅绛旀 + </button> + </li> + </ul> + </div> <p> <b >鈪�.Pick up the words in the box below to describe the work @@ -77,6 +145,12 @@ <div class="bk-wh"> <p>caring, supportive, privacy, friendly, freedom, flexible</p> </div> + <ul> + <li v-for="(item,index) in noSubmitData[0].value" :key="index" class="fl al-cn" style="margin-bottom:10px"> + <span class="tl-right" style="width:20%">{{item.stem}}</span> + <textarea name="" id="" cols="30" rows="6" v-model="item.userAnswer" class="w100" @input="savenoSubmitData"></textarea> + </li> + </ul> </div> </div> <div class="preface-bottom"> @@ -129,69 +203,133 @@ <td> I would prefer working in an interesting and professional environment where everybody works hard and helps each other to - succeed as a l.<input - :disabled="testData.isComplete" + succeed as a l. + <input + :disabled="listenTable[0].isComplete" type="text" class="input-bottom-border input-bc-t" style="width: 70px" - v-model="testData.in.one" - @change="setTestData" + v-model="listenTable[0].value[0].userAnswer" + @input="savelistenTable" /> + <img :src="listenTable[0].value[0].isRight ? correctIcon : errorIcon" v-if="listenTable[0].isComplete"> </td> </tr> <tr class="table-tr-bc"> <td class="tl-cn table-th-bc">Ross</td> <td> For me, I prefer the workplace that gives me enough space to - grow, There should be good 2.<input - :disabled="testData.isComplete" + grow, There should be good 2. + <input + :disabled="listenTable[0].isComplete" type="text" class="input-bottom-border input-bc-t" style="width: 70px" - v-model="testData.in.one" - @change="setTestData" - />and mutual 3.<input - :disabled="testData.isComplete" + v-model="listenTable[0].value[1].userAnswer" + @input="savelistenTable" + /> + <img :src="listenTable[0].value[1].isRight ? correctIcon : errorIcon" v-if="listenTable[0].isComplete"> + and mutual 3. + <input + :disabled="listenTable[0].isComplete" type="text" class="input-bottom-border input-bc-t" style="width: 70px" - v-model="testData.in.one" - @change="setTestData" - />between each team member. + v-model="listenTable[0].value[2].userAnswer" + @input="savelistenTable" + /> + <img :src="listenTable[0].value[2].isRight ? correctIcon : errorIcon" v-if="listenTable[0].isComplete"> + between each team member. </td> </tr> <tr class="table-tr-bc"> <td class="tl-cn table-th-bc">Amelia</td> <td> I'd like to work in an environment that gives me learning - opportunities as well as spacefor personal 4.<input - :disabled="testData.isComplete" + opportunities as well as spacefor personal 4. + <input + :disabled="listenTable[0].isComplete" type="text" class="input-bottom-border input-bc-t" style="width: 70px" - v-model="testData.in.one" - @change="setTestData" + v-model="listenTable[0].value[3].userAnswer" + @input="savelistenTable" /> + <img :src="listenTable[0].value[3].isRight ? correctIcon : errorIcon" v-if="listenTable[0].isComplete"> </td> </tr> <tr class="table-tr-bc"> <td class="tl-cn table-th-bc">Li Tao</td> <td> - I hope it's a workplace where there is 5.<input - :disabled="testData.isComplete" + I hope it's a workplace where there is 5. + <input + :disabled="listenTable[0].isComplete" type="text" class="input-bottom-border input-bc-t" style="width: 70px" - v-model="testData.in.one" - @change="setTestData" - />for people's ideas as well as appreciationfor good work and + v-model="listenTable[0].value[4].userAnswer" + @input="savelistenTable" + /> + <img :src="listenTable[0].value[4].isRight ? correctIcon : errorIcon" v-if="listenTable[0].isComplete"> + for people's ideas as well as appreciationfor good work and elfort. </td> </tr> </table> + <div class="event-header-text-bc pd-5 w100 mt-20" + v-if="listenTable[0].isShowAnswer"> + <span>绛旀锛�</span> + <span v-for="(item,index) in listenTable[0].value" :key="index" class="mr-20"> + {{index + 1}}.{{ item.answer }} + </span> + </div> + <div class="w100 fl ju-cn"> + <ul class="fl ju-ev" style="width:80%"> + <li> + <button class="btn-border btn-w" @click="handlelistenTable"> + 鎻愪氦 + </button> + </li> + <li> + <button @click="recastlistenTable" class="btn-border btn-w"> + 閲嶅仛 + </button> + </li> + <li> + <button @click="viewlistenTable" class="parimary-btn"> + 鏌ョ湅绛旀 + </button> + </li> + </ul> + </div> <h3 id="c048"><span class="bjh3">Reading</span></h3> - <p>1.What makes a positive work environment?</p> - <p>2.Why would people be more productive in such environment?</p> + <p> + 1.What makes a positive work environment? + <span class="btn-box" @click="showNoSubmitAnswer(1,0)"> + <svg xmlns="http://www.w3.org/2000/svg" width="20.501" height="20.501" viewBox="0 0 20.501 20.501"> + <path class="a" + d="M3344.717-15308.5H3337.4a10.186,10.186,0,0,1-7.25-3,10.185,10.185,0,0,1-3-7.25A10.262,10.262,0,0,1,3337.4-15329a10.26,10.26,0,0,1,10.249,10.248,10.129,10.129,0,0,1-2.2,6.341v3.177A.734.734,0,0,1,3344.717-15308.5Zm-9.606-7.29h4.493l.527,1.419c.071.182.156.386.254.608a2.428,2.428,0,0,0,.273.512.986.986,0,0,0,.315.262.971.971,0,0,0,.454.1,1.05,1.05,0,0,0,.773-.327,1.025,1.025,0,0,0,.319-.723,3.3,3.3,0,0,0-.277-1.051l-.062-.161-2.889-7.313c-.119-.321-.228-.607-.335-.873a2.972,2.972,0,0,0-.323-.616,1.56,1.56,0,0,0-.5-.469,1.552,1.552,0,0,0-.781-.181,1.535,1.535,0,0,0-.773.181,1.475,1.475,0,0,0-.5.477,3.674,3.674,0,0,0-.362.739l-.239.627-.054.135-2.824,7.355c-.095.229-.179.46-.25.688a1.529,1.529,0,0,0-.073.477.978.978,0,0,0,.323.72,1.039,1.039,0,0,0,.746.315.838.838,0,0,0,.716-.3,4.676,4.676,0,0,0,.466-.985l.062-.165.527-1.449Zm3.747-1.5h-3.293l1.812-5.124,1.481,5.123Z" + transform="translate(-3327.144 15329)" /> + </svg> + </span> + </p> + <textarea name="" id="" cols="30" rows="10" v-model="noSubmitData[1].value[0].userAnswer" class="w100" @input="savenoSubmitData"></textarea> + <div class="event-header-text-bc pd-5 w100 mt-20" v-if="noSubmitData[1].value[0].isShowAnswer"> + 绛旀锛歿{noSubmitData[1].value[0].answer}} + </div> + <p>2.Why would people be more productive in such environment? + <span class="btn-box" @click="showNoSubmitAnswer(1,1)"> + <svg xmlns="http://www.w3.org/2000/svg" width="20.501" height="20.501" viewBox="0 0 20.501 20.501"> + <path class="a" + d="M3344.717-15308.5H3337.4a10.186,10.186,0,0,1-7.25-3,10.185,10.185,0,0,1-3-7.25A10.262,10.262,0,0,1,3337.4-15329a10.26,10.26,0,0,1,10.249,10.248,10.129,10.129,0,0,1-2.2,6.341v3.177A.734.734,0,0,1,3344.717-15308.5Zm-9.606-7.29h4.493l.527,1.419c.071.182.156.386.254.608a2.428,2.428,0,0,0,.273.512.986.986,0,0,0,.315.262.971.971,0,0,0,.454.1,1.05,1.05,0,0,0,.773-.327,1.025,1.025,0,0,0,.319-.723,3.3,3.3,0,0,0-.277-1.051l-.062-.161-2.889-7.313c-.119-.321-.228-.607-.335-.873a2.972,2.972,0,0,0-.323-.616,1.56,1.56,0,0,0-.5-.469,1.552,1.552,0,0,0-.781-.181,1.535,1.535,0,0,0-.773.181,1.475,1.475,0,0,0-.5.477,3.674,3.674,0,0,0-.362.739l-.239.627-.054.135-2.824,7.355c-.095.229-.179.46-.25.688a1.529,1.529,0,0,0-.073.477.978.978,0,0,0,.323.72,1.039,1.039,0,0,0,.746.315.838.838,0,0,0,.716-.3,4.676,4.676,0,0,0,.466-.985l.062-.165.527-1.449Zm3.747-1.5h-3.293l1.812-5.124,1.481,5.123Z" + transform="translate(-3327.144 15329)" /> + </svg> + </span> + </p> + <textarea name="" id="" cols="30" rows="10" v-model="noSubmitData[1].value[1].userAnswer" class="w100" @input="savenoSubmitData"></textarea> + <div class="event-header-text-bc pd-5 w100 mt-20" v-if="noSubmitData[1].value[1].isShowAnswer"> + 绛旀锛歿{noSubmitData[1].value[1].answer}} + </div> <p class="center"><b>A Positive Work Environment</b></p> <p class="center"> <audio @@ -200,7 +338,7 @@ controlslist="noplaybackrate nodownload" style="margin-left: 10px" class="audio" - @play="audioPlay" + ></audio> </p> <p> @@ -345,7 +483,7 @@ controlslist="noplaybackrate nodownload" style="margin-left: 10px" class="audio" - @play="audioPlay" + ></audio> <p>candidate /藞k忙nd瑟d蓹t/ <i>n.</i> 搴旇仒鑰�</p> <div class="bkbj"> @@ -477,22 +615,32 @@ > </p> </div> - <p>apart from ...闄や簡鈥︹�﹀锛堥兘锛�</p> - <p>be aware of 鎰忚瘑鍒帮紱瑙夊療</p> - <p>return the favor 鍥炴姤</p> - <p>keep an eye on 鐣欐剰锛涘瘑鍒囨敞瑙�</p> - <p>be likely to 寰堝彲鑳�</p> + <ul class="fl fw-wr"> + <li> + <p>apart from ...闄や簡鈥︹�﹀锛堥兘锛�</p> + <p>be aware of 鎰忚瘑鍒帮紱瑙夊療</p> + <p>return the favor 鍥炴姤</p> + </li> + <li> + <p>keep an eye on 鐣欐剰锛涘瘑鍒囨敞瑙�</p> + <p>be likely to 寰堝彲鑳�</p> + </li> + </ul> <p><b>鈪�.Reading comprehension.</b></p> <p> A.Mark the elements of a positive work environment mentioned in the passage. </p> - <p>鈻ompany culture</p> - <p>鈻ersonal development</p> - <p>鈻elationship with colleagues</p> - <p>鈻alary</p> - <p>鈻af茅</p> - <p>鈻eaders</p> + <p v-for="(item,index) in readingOne[0].option" :key="index"> + <input type="checkbox" + :value="item" + name="change" + v-model="readingOne[0].value[0].userAnswer" + :disabled="readingOne[0].isComplete" + @input="saveReadingOne" + > + {{item}} + </p> </div> </div> <div class="preface-bottom"> @@ -545,19 +693,19 @@ <td class="tl-cn">Para. 1-2</td> <td class="wh-no tl-cn"> <input - :disabled="testData.isComplete" + :disabled="readingOne[1].isComplete" type="text" class="input-bottom-border input-bc-t" style="width: 70px" - v-model="testData.in.one" - @change="setTestData" + v-model="readingOne[1].value[0].userAnswerOne" + @input="saveReadingOne" /> </td> <td style="width: 80%"> <textarea - v-model="questionData.table.one" + v-model="readingOne[1].value[0].userAnswerTwo" class="w100 table-tr-bc b0 table-textarea" - @change="setBookQuestion" + @input="saveReadingOne" ></textarea> </td> </tr> @@ -565,19 +713,19 @@ <td class="tl-cn">Para. 3-4</td> <td class="tl-cn"> <input - :disabled="testData.isComplete" + :disabled="readingOne[1].isComplete" type="text" class="input-bottom-border input-bc-t" style="width: 70px" - v-model="testData.in.one" - @change="setTestData" + v-model="readingOne[1].value[1].userAnswerOne" + @input="saveReadingOne" /> </td> <td> <textarea - v-model="questionData.table.two" + v-model="readingOne[1].value[1].userAnswerTwo" class="w100 table-tr-bc b0 table-textarea" - @change="setBookQuestion" + @input="saveReadingOne" ></textarea> </td> </tr> @@ -585,19 +733,19 @@ <td class="tl-cn">Para. 5</td> <td class="tl-cn"> <input - :disabled="testData.isComplete" + :disabled="readingOne[1].isComplete" type="text" class="input-bottom-border input-bc-t" style="width: 70px" - v-model="testData.in.one" - @change="setTestData" + v-model="readingOne[1].value[2].userAnswerOne" + @input="saveReadingOne" /> </td> <td> <textarea - v-model="questionData.table.three" + v-model="readingOne[1].value[2].userAnswerTwo" class="w100 table-tr-bc b0 table-textarea" - @change="setBookQuestion" + @input="saveReadingOne" ></textarea> </td> </tr> @@ -707,7 +855,7 @@ <p>______________________________________________</p> <p> <b>鈪�.Grammar focus:Inverted sentences.</b> - <span class="btn-box" @click="showAnswer('showImg')"> + <span class="btn-box" > <svg t="1717037443722" class="icon" @@ -798,6 +946,25 @@ <p>______________________________________________</p> <p>5.village in the front of river a was</p> <p>______________________________________________</p> + <div class="w100 fl ju-cn"> + <ul class="fl ju-ev" style="width:80%"> + <li> + <button class="btn-border btn-w" @click="handleReadingOne"> + 鎻愪氦 + </button> + </li> + <li> + <button @click="recastReadingOne" class="btn-border btn-w"> + 閲嶅仛 + </button> + </li> + <li> + <button @click="viewReadingOne" class="parimary-btn"> + 鏌ョ湅绛旀 + </button> + </li> + </ul> + </div> <h3 id="c049"><span class="bjh3">Mini-project</span></h3> <p> A pleasant work environment can make employees love their jobs and @@ -1215,7 +1382,7 @@ controlslist="noplaybackrate nodownload" style="margin-left: 10px" class="audio" - @play="audioPlay" + ></audio> </p> <p> @@ -1401,7 +1568,7 @@ controlslist="noplaybackrate nodownload" style="margin-left: 10px" class="audio" - @play="audioPlay" + ></audio> <p>core /k蓴藧(r)/ <i>adj</i>.鏍稿績鐨�</p> <div class="bkbj"> @@ -1694,7 +1861,7 @@ </p> <p> <b>鈪�.Grammar focus:Modal verbs (can,could,may,might).</b> - <span class="btn-box" @click="showAnswer('showImgOne')"> + <span class="btn-box" > <svg t="1717037443722" class="icon" @@ -2118,21 +2285,7 @@ <tr class="table-tr-bc"> <td class="tl-cn wh-no table-th-bc">Sally</td> <td> - <select - class="select-border select-bc-t" - style="background-color: transparent" - v-model="dropdownData.one.value" - @change="setDropdownData" - :disabled="dropdownData.isComplete" - > - <option - v-for="(item, index) in dropDownList" - :key="index" - :value="item" - > - {{ item }} - </option> - </select> + </td> <td rowspan="2"> <p class="table-p"> @@ -2159,21 +2312,7 @@ <tr class="table-tr-bc"> <td class="table-th-bc tl-cn">Ross</td> <td> - <select - class="select-border" - style="background-color: transparent" - v-model="dropdownData.two.value" - @change="setDropdownData" - :disabled="dropdownData.isComplete" - > - <option - v-for="(item, index) in dropDownList" - :key="index" - :value="item" - > - {{ item }} - </option> - </select> + </td> </tr> </table> @@ -2822,14 +2961,10 @@ return { imgThirteen: require("../../assets/images/grammar6-1.png"), imgThirteenOne: require("../../assets/images/grammar6-2.png"), - showAnswerOne: false, - showAnswerTwo: false, - showAnswerThree: false, - showAnswerFour: false, - showAnswerFive: false, + correctIcon:require('@/assets/images/correct.svg'), + errorIcon:require('@/assets/images/error.svg'), showImg: false, showImgOne: false, - showQuestionAnswer: false, rawData: { left: [ { @@ -3085,122 +3220,194 @@ readingOne: "", readingTwo: "", }, - dropDownList: [ - "online shopping", - "facial recognition", - "electronic payment", - "intercity train", - "shared bike", - "take-away service", + // 鏂板 + dropDownOne:[ + { + type:'dropdown', + isComplete:false, + isShowAnswer:false, + option:[ + 'open plan office','cubicles','private office','SOHO' + ], + value:[ + { + answer:"cubicles", + userAnswer:"", + isRight:"", + }, + { + answer:"open plan office", + userAnswer:"", + isRight:"", + }, + { + answer:"private office", + userAnswer:"", + isRight:"", + }, + { + answer:"SOHO", + userAnswer:"", + isRight:"", + }, + ] + } ], - dropdownData: { - one: { - value: "", - isRight: null, - answer: "intercity train", + listenTable:[ + { + type:'fill', + isComplete:false, + isShowAnswer:false, + value:[ + { + answer:'team', + userAnswer:'', + isRight:null + }, + { + answer:'communication', + userAnswer:'', + isRight:null + }, + { + answer:'understanding', + userAnswer:'', + isRight:null + }, + { + answer:'development', + userAnswer:'', + isRight:null + }, + { + answer:'respect', + userAnswer:'', + isRight:null + }, + ] + } + ], + noSubmitData:[ + { + type:'shortAnswer', + value:[ + { + stem:'caring', + userAnswer:'' + }, + { + stem:'supportive', + userAnswer:'' + }, + { + stem:'privacy', + userAnswer:'' + }, + { + stem:'friendly', + userAnswer:'' + }, + { + stem:'freedom', + userAnswer:'' + }, + { + stem:'flexible', + userAnswer:'' + }, + ] }, - two: { - value: "", - isRight: null, - answer: "online shopping", + { + type:'shortAnswer', + value:[ + { + userAnswer:'', + answer:'A positive work environment is characterized by factors like supportive colleagues, a respectful atmosphere, open communication, opportunities for growth, and a comfortable physical setting. It promotes collaboration, job satisfaction, and employee well-being.', + isShowAnswer:false + }, + { + userAnswer:'', + answer:'People tend to be more productive in a positive work environment because they feel motivated, valued, and empowered. When they enjoy their workplace, they are more likely to be engaged, contribute ideas, and work together effectively, leading to increased efficiency and better results.', + isShowAnswer:false + }, + ] + } + ], + readingOne:[ + { + type:'checkbox', + isComplete:false, + isShowAnswer:false, + option:['Company culture','Personal development','Relationship with colleagues','Salary','Caf茅','Leaders'], + value:[ + { + userAnswer:[] + } + ] }, - three: { - value: "", - isRight: null, - answer: "electronic payment", + { + type:'table', + isComplete:false, + isShowAnswer:false, + value:[ + { + userAnswerOne:'', + userAnswerTwo:'', + }, + { + userAnswerOne:'', + userAnswerTwo:'', + }, + { + userAnswerOne:'', + userAnswerTwo:'', + }, + ] }, - four: { - value: "", - isRight: null, - answer: "shared bike", - }, - five: { - value: "", - isRight: null, - answer: "take-away service", - }, - six: { - value: "", - isRight: null, - answer: "facial recognition", - }, - }, + { + type:'fill', + isComplete:false, + isShowAnswer:false, + value:[ + { + answer:'', + userAnswer:'', + isRight:null + }, + + ] + } + ] }; }, mounted() { - const testData = localStorage.getItem("english-testOne"); - if (testData) { - this.testData = JSON.parse(testData); - } - const bookQuestion = localStorage.getItem("english-book-question-one"); - if (bookQuestion) { - this.questionData = JSON.parse(bookQuestion); - } - const dropdownData = localStorage.getItem("english-dropdown-one"); - if (dropdownData) { - this.dropdownData = JSON.parse(dropdownData); - } this.getPath(); + const dropDownOne = localStorage.getItem('english-chapter04-dropDownOne') + if(dropDownOne) this.dropDownOne = JSON.parse(dropDownOne) + const listenTable = localStorage.getItem('english-chapter06-listenTable') + if(listenTable) this.listenTable = JSON.parse(listenTable) + const noSubmitData = localStorage.getItem('english-chapter06-noSubmitData') + if(noSubmitData) this.noSubmitData = JSON.parse(noSubmitData) }, methods: { + isTextRight(answer, data, num) { + console.log(answer[num]); + let flag = null; + answer[num] ? flag = answer[num] == data :flag = false + return flag; + }, + arrayToString(data) { + if(Array.isArray(data)) { + return data.toString() + } else { + return data + } + }, saveWord(event, word) { this.$emit("saveCharacters", event, word); }, setTestData() { localStorage.setItem("english-testOne", JSON.stringify(this.testData)); - }, - changeTestData() { - localStorage.removeItem("english-testOne"); - this.testData = { - check: { - isRight: null, - answer: ["Culture", "Cuisine", "Landscapes"], - value: [], - }, - tx: { - one: "", - two: "", - three: "", - four: "", - five: "", - }, - in: { - one: "", - two: "", - three: "", - four: "", - five: "", - isRight: null, - answer: ["uisine", "andscapes", "ivilization", "xplore", "nique"], - }, - line: { - one: "", - two: "", - three: "", - four: "", - five: "", - }, - ts: { - one: "", - two: "", - three: "", - four: "", - }, - gr: { - one: "", - two: "", - three: "", - four: "", - five: "", - }, - cm: { - one: "", - two: "", - three: "", - four: "", - five: "", - }, - }; }, setBookQuestion() { console.log("淇濆瓨"); @@ -3220,102 +3427,103 @@ "E8719EC88026BCFB11D292AA999F6D3D" ); }, - showAnswer(type) { - if (type == "showImg") { - this.showImg = !this.showImg; - } else if (type == "showImgOne") { - this.showImgOne = !this.showImgOne; - } - setTimeout(() => { - this.$emit("initViewer", ""); - }, 500); + saveDropdoenOne() { + localStorage.setItem('english-chapter06-dropDownOne',JSON.stringify(this.dropDownOne)) }, - handleQuestion(type) { - if (type == "one") { - this.questionData.warnUp.one.value - ? (this.questionData.warnUp.one.isRight = - this.questionData.warnUp.one.value == "Chinese knot") - : (this.questionData.warnUp.one.isRight = null); - } else if (type == "two") { - this.questionData.warnUp.two.value - ? (this.questionData.warnUp.two.isRight = - this.questionData.warnUp.two.value == "Chinese medicine") - : (this.questionData.warnUp.two.isRight = null); - } else if (type == "three") { - this.questionData.warnUp.three.value - ? (this.questionData.warnUp.three.isRight = - this.questionData.warnUp.three.value == "Chinese calligraphy") - : (this.questionData.warnUp.three.isRight = null); - } else if (type == "four") { - this.questionData.warnUp.four.value - ? (this.questionData.warnUp.four.isRight = - this.questionData.warnUp.four.value == "Taichi") - : (this.questionData.warnUp.four.isRight = null); - } else if (type == "five") { - this.questionData.warnUp.five.value - ? (this.questionData.warnUp.five.isRight = - this.questionData.warnUp.five.value == "sweet dumpling") - : (this.questionData.warnUp.five.isRight = null); - } else if (type == "six") { - this.questionData.warnUp.six.value - ? (this.questionData.warnUp.six.isRight = - this.questionData.warnUp.six.value == "Chinese chess") - : (this.questionData.warnUp.six.isRight = null); - } - }, - handleDropdown(type) { - const dropdownDatas = this.dropdownData; - for (let key in dropdownDatas) { - const item = dropdownDatas[key]; - if (type == "judge") { - item.value == item.answer - ? (item.isRight = true) - : (item.isRight = false); - console.log(item.value, item.answer); + handledropDownOne() { + for (let index = 0; index < this.dropDownOne.length; index++) { + const item = this.dropDownOne[index]; + item.isComplete = true + item.isShowAnswer = true + for (let cindex = 0; cindex < item.value.length; cindex++) { + const citem = item.value[cindex]; + citem.isRight = citem.answer == citem.userAnswer } } - this.dropdownData = dropdownDatas; + this.saveDropdoenOne() }, - changeDropdown() { - localStorage.removeItem("english-dropdown-one"); - for (let key in this.dropdownData) { - const item = this.dropdownData[key]; - item.value = ""; - item.isRight = null; - } - }, - setDropdownData() { - localStorage.setItem( - "english-dropdown-one", - JSON.stringify(this.dropdownData) - ); - }, - saveData() { - const item = this.testData["check"]; - const sortedArr1 = item.answer.slice().sort(); - const sortedArr2 = item.value.slice().sort(); - const isRight = sortedArr1.every( - (value, index) => value === sortedArr2[index] - ); - const inData = this.testData["in"]; - let inString = []; - for (let key in inData) { - const citem = inData[key]; - if (key != "answer" && key !== "isRight") { - console.log(key); - inString.push(citem); + recastdropDownOne() { + for (let index = 0; index < this.dropDownOne.length; index++) { + const item = this.dropDownOne[index]; + item.isComplete = false + item.isShowAnswer = false + for (let cindex = 0; cindex < item.value.length; cindex++) { + const citem = item.value[cindex]; + citem.isRight = null + citem.userAnswer = '' } } - const inRight = inData.answer == inString; - console.log("in", inData.answer, inString); - this.$set(this.testData["in"], "isRight", inRight); - this.$set(this.testData["check"], "isRight", isRight); - this.setTestData(); - console.log(this.testData); + localStorage.removeItem('english-chapter06-dropDownOne') }, - audioPlay() { - this.$emit("closeMiniAudio"); + viewdropDownOne() { + for (let index = 0; index < this.dropDownOne.length; index++) { + const item = this.dropDownOne[index]; + item.isShowAnswer = !item.isShowAnswer + } }, + savelistenTable() { + localStorage.setItem('english-chapter06-listenTable',JSON.stringify(this.listenTable)) + }, + handlelistenTable() { + for (let index = 0; index < this.listenTable.length; index++) { + const item = this.listenTable[index]; + item.isComplete = true + item.isShowAnswer = true + for (let cindex = 0; cindex < item.value.length; cindex++) { + const citem = item.value[cindex]; + citem.isRight = citem.userAnswer == citem.answer + } + } + this.savelistenTable() + }, + recastlistenTable() { + for (let index = 0; index < this.listenTable.length; index++) { + const item = this.listenTable[index]; + item.isComplete = false + item.isShowAnswer = false + for (let cindex = 0; cindex < item.value.length; cindex++) { + const citem = item.value[cindex]; + citem.isRight = null + citem.userAnswer = '' + } + } + localStorage.removeItem('english-chapter06-listenTable') + }, + viewlistenTable() { + for (let index = 0; index < this.listenTable.length; index++) { + const item = this.listenTable[index]; + item.isShowAnswer = !item.isShowAnswer + } + }, + savenoSubmitData() { + localStorage.setItem('english-chapter06-noSubmitData',JSON.stringify(this.noSubmitData)) + }, + showNoSubmitAnswer(index,num) { + this.$set(this.noSubmitData[index].value[num],'isShowAnswer',!this.noSubmitData[index].value[num].isShowAnswer) + }, + saveReadingOne() { + localStorage.setItem('english-chapter06-readingOne',JSON.stringify(this.readingOne)) + }, + handleReadingOne() { + for (let index = 0; index < this.readingOne.length; index++) { + const item = this.readingOne[index]; + item.isShowAnswer = true + item.isComplete = true + if(item.type !== 'checkbox' && item.type !== 'table') { + for (let cindex = 0; cindex < item.value.length; cindex++) { + const citem = array[cindex]; + + } + } + + } + }, + recastReadingOne() { + + }, + viewReadingOne() { + + } }, }; </script> -- Gitblit v1.9.1