闫增涛
2024-07-22 06abf30210fc7173b60d8872e10e8809f75ed1d5
src/books/English/view/components/chapter008.vue
@@ -296,7 +296,7 @@
                    <div class="bodystyle">
                        <h3 id="c065"><span class="bjh3">Listening</span></h3>
                        <p class="center"> <audio :src="resource.listenOne" controls
                                controlslist="noplaybackrate nodownload" class="audio" @play="audioPlay"></audio></p>
                                controlslist="noplaybackrate nodownload" class="audio" ></audio></p>
                        <p><b>Watch the video and find out how the speakers describe their jobs.</b></p>
                        <table border="1" cellpadding="4" cellspacing="0" style="border-color: #fff" class="fz-14">
                            <tr class="table-th-bc">
@@ -361,7 +361,7 @@
                        <p>2.If you’re considering a part-time job,what’s your expectation of it?</p>
                        <p class="center">__________________</p>
                        <p class="center"> <audio :src="resource.listenOne" controls
                                controlslist="noplaybackrate nodownload" class="audio" @play="audioPlay"></audio></p>
                                controlslist="noplaybackrate nodownload" class="audio" ></audio></p>
                        <p>Everyone’s first job is special.There are a couple of reasons for this:the experience is
                            burned into one’s memory; it gives you the practice needed to
                            <span class="word-bc" @click="saveWord($event, 'fulfill')">fulfill</span>
@@ -439,7 +439,7 @@
                        </p>
                        <p class="center"><audio :src="resource.readingTwo" controls
                                controlslist="noplaybackrate nodownload" style="margin-left: 10px" class="audio"
                                @play="audioPlay"></audio></p>
                               ></audio></p>
                        <p>fulfill /fʊlˈfɪl/ <i>v.</i> 符合;履行</p>
                        <div class="bkbj">
                            <p><i>to do or have what is required or necessary</i></p>
@@ -1095,7 +1095,7 @@
                        <p class="center"><b>Choose a Career You Love</b></p>
                        <p class="center"><audio :src="resource.readingTwo" controls
                                controlslist="noplaybackrate nodownload" style="margin-left: 10px" class="audio"
                                @play="audioPlay"></audio></p>
                               ></audio></p>
                        <p>We spend a large
                            <span class="word-bc" @click="saveWord($event, 'portion')">portion</span>
                            of our lives working,so how we spend those years matters.It is
@@ -1177,7 +1177,7 @@
                            <span class="line-border-box"></span>
                        </p>
                        <audio :src="resource.readingTwo" controls controlslist="noplaybackrate nodownload"
                            style="margin-left: 10px" class="audio" @play="audioPlay"></audio>
                            style="margin-left: 10px" class="audio" ></audio>
                        <p>portion /ˈpɔːʃn/ <i>n.</i>部分</p>
                        <div class="bkbj">
                            <p><i>one part of sth.larger</i></p>
@@ -1608,7 +1608,7 @@
                        <h3 id="c071"><span class="bjh3">Listening</span></h3>
                        <p class="center"> <audio :src="resource.readingTwo" controls
                                controlslist="noplaybackrate nodownload" style="margin-left: 10px" class="audio"
                                @play="audioPlay"></audio></p>
                                ></audio></p>
                        <p><b>Ⅰ.Derek is talking about his job interview.Listen to the recording and fill in the blanks
                                with what you hear.</b></p>
                        <p>Hi,everyone.I’m Derek Cruise.I landed a job interview the other day.It is a bank
@@ -1799,7 +1799,6 @@
                        <p>1.Work with your partner and decide what questions you will ask during the
                            interview.2.Complete the worksheet for the interviewer.</p>
                        <audio :src="resource.readingTwo" controls controlslist="noplaybackrate nodownload"
                            style="margin-left: 10px" class="audio" @play="audioPlay"></audio>
                        <p class="center"></p>
                        <p><b>Role 2:Interviewee</b></p>
                        <p>1.Make a list of the information which might be useful in the interview.2.Finish the
@@ -2092,14 +2091,8 @@
        return {
            imgThirteen: require("../../assets/images/grammar8-1.png"),
            imgThirteenOne: require("../../assets/images/grammar8-2.png"),
            showAnswerOne: false,
            showAnswerTwo: false,
            showAnswerThree: false,
            showAnswerFour: false,
            showAnswerFive: false,
            showImg: false,
            showImgOne: false,
            showQuestionAnswer: false,
            rawData: {
                left: [
                    {
@@ -2355,14 +2348,6 @@
                readingOne: "",
                readingTwo: "",
            },
            dropDownList: [
                "online shopping",
                "facial recognition",
                "electronic payment",
                "intercity train",
                "shared bike",
                "take-away service",
            ],
            dropdownData: {
                one: {
                    value: "",
@@ -2398,18 +2383,6 @@
        };
    },
    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();
    },
    methods: {
@@ -2419,61 +2392,7 @@
        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("保存");
            localStorage.setItem(
                "english-book-question-one",
                JSON.stringify(this.questionData)
@@ -2497,95 +2416,6 @@
                this.showImgOne = !this.showImgOne;
            }
            setTimeout(() => { this.$emit("initViewer", "") }, 500)
        },
        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);
                }
            }
            this.dropdownData = dropdownDatas;
        },
        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)
                }
            }
            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);
        },
        audioPlay() {
            this.$emit("closeMiniAudio");
        },
    },
};