123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637 |
- <template>
- <!-- 听录音 学生字 -->
- <div style="text-align:center;margin-top:48px;">
- <Audio :mp3="cur.stem[0].mp3_url"/>
- <div class="SelectCorrect" v-if="cur.stem[0].con||cur.stem[0].img_url">
- <div class="SelectCorrect-top">
- <img alt src="../../assets/qp/Ellipse 27.png">
- <img alt src="../../assets/qp/Ellipse 28.png">
- <img alt src="../../assets/qp/Ellipse 29.png">
- </div>
- <div class="SelectCorrect-main">
- <div class="dialog-maxHeight">
- <div class="left-box">
- <!-- <img
- :src="cur.stem[0].img_url"
- @click="handleChildSrcList(cur.stem[0].img_url)"
- class="article-img"
- v-if="cur.stem[0].img_url"
- > -->
- <el-image
- :src="cur.stem[0].img_url"
- class="article-img"
- fit="scale-down"
- :preview-src-list="[cur.stem[0].img_url]"
- v-if="cur.stem[0].img_url && cur.stem[0].img_url.indexOf('http') > -1"
- >
- <div slot="placeholder" class="image-slot">
- <img src="../../assets/common/icon-imgloading.png" />
- </div>
- </el-image>
- </div>
- <div class="right-box">
- <div class="inner" v-if="cur.stem[0].con||cur.stem[0].english">
- <template v-if="cur.stem[0].pinyin">
- <div
- :key="indexs"
- style="padding-bottom:5px;"
- v-for="(items,indexs) in cur.stem[0].con"
- >
- <p
- :class="bd.indexOf(cur.stem[0].pinyin.split(' ')[indexs]) != -1 ? 'pinyin_hidden' : 'spell'"
- >{{cur.stem[0].pinyin.split(" ")[indexs]}}</p>
- <p class="chinese">{{items}}</p>
- </div>
- <p class="english">{{cur.stem[0].english}}</p>
- </template>
- <template v-else>
- <div
- style="padding-bottom:5px;"
- >
- <p class="chinese" v-html="cur.stem[0].con"></p>
- </div>
- <p class="english" v-html="cur.stem[0].english"></p>
- </template>
- </div>
- </div>
- </div>
- </div>
- </div>
- <ul class="learn-box">
- <li :key="index" v-for="(item,index) in cur.annotationChinese">
- <div v-if="item.con!==''||item.english!==''">
- <!-- <span>
- <Audio :mp3="item.mp3_url"/>
- </span>
- <div class="inner">
- <div :key="indexs" v-for="(items,indexs) in item.con">
- <p class="spell">{{item.pinyin.split(" ")[indexs]}}</p>
- <p class="chinese">{{items}}</p>
- </div>
- </div>
- <b>{{item.english}}</b>
- <div @click="handlePrashow(item)" class="bg-box">
- <img class="practice-icon" src="../../assets/common/dict-icon.png">
- </div>-->
- <p>{{item.pinyin}}</p>
- <b>{{item.con}}</b>
- <span>{{item.english}}</span>
- <div class="operate-box">
- <a v-if="item.mp3_url">
- <AudioRed :mp3="item.mp3_url"/>
- </a>
- <a>
- <img src="../../assets/common/icon-collect-red.png">
- </a>
- <a @click="handlePrashow(item)">
- <img src="../../assets/common/icon-write-red.png">
- </a>
- </div>
- </div>
- </li>
- </ul>
- <div class="practiceBox" v-if="isPraShow">
- <Practice :changePraShow="changePraShow" :cur="practiceCon"/>
- </div>
- <div class="practiceBox" v-if="isPraShows">
- <Practicewords :changePraShow="changePraShow" :cur="practiceCon"/>
- </div>
- </div>
- </template>
- <script>
- import Practice from "../../components/common/Practice";
- import Practicewords from "../../components/common/Practicewords";
- import AudioRed from "../../components/common/AudioRed";
- import Audio from "../../components/common/Audio";
- import VoicePlay from "../../components/common/VoicePlay";
- export default {
- name: 'listenAndLearn',
- components: {
- Practice,
- Practicewords,
- AudioRed,
- VoicePlay,
- Audio
- },
- props: [
- "cur",
- "getAnswer",
- "queIndex",
- "answer",
- "uiType",
- "watchIndex",
- "handleChildSrcList"
- ],
- data () {
- return {
- isPraShow: false,
- isPraShows: false,
- option: [
- ], // 选项
- stemCn: [], // 题干 中文
- stemPy: [], // 题干 拼音
- languageArr: [
- '简单',
- '困难'
- ],
- lanactiveArr: [
- '简单'
- ],
- lanShow: false, // 语言分类按钮是否显示
- voiceSrc: require("../../assets/single/icon-voice.png"),
- voicePauseSrc: require("../../assets/single/icon-voice.png"),
- voicePlaySrc: require("../../assets/common/icon-voice-play.png"),
- practiceValue: null,
- practiceCon: null, // 练一练内容
- isShowCorrect: false, //上面对话内容是否显示
- bd: [
- ",",
- ",",
- "。",
- ".",
- "!",
- "?",
- ":",
- ";",
- "(",
- ")",
- "【",
- "】",
- "{",
- "}",
- "‘",
- "“",
- "’",
- "”",
- "、",
- "、",
- "《",
- "》",
- "…",
- "·",
- "—",
- "~"
- ],
- previewSrcList: []
- };
- },
- watch: {
- watchIndex: {
- handler: function (val, oldVal) {
- let _this = this;
- if (val) {
- _this.handleData()
- }
- },
- // 深度观察监听
- deep: true,
- },
- },
- mounted () {
- },
- methods: {
- handleData () {
- if (this.cur.stem[0].img_url) this.previewSrcList = [this.cur.stem[0].img_url]
- },
- // 切换语言
- changeLan (item, index) {
- this.lanactiveArr = item
- },
- changePraShow () {
- this.isPraShow = false;
- this.isPraShows = false;
- },
- handlePrashow (item) {
- let obj = {
- stem: [
- {
- mp3_url: item.mp3_url,
- pinyin: item.pinyin,
- con: item.con
- }
- ],
- playStorkes: true,
- learn_mode: '1'
- }
- this.practiceCon = obj
- if (item.con.length > 1) {
- this.isPraShows = true;
- } else {
- this.isPraShow = true;
- }
- },
- // 判断对错
- practiceJudge () {
- return true
- }
- },
- created () {
- this.handleData()
- },
- };
- </script>
- <style lang="scss" scoped>
- * {
- margin: 0;
- padding: 0;
- }
- .SelectCorrect {
- width: 1200px;
- margin: 0 auto;
- background: #fff;
- border-radius: 24px;
- .SelectCorrect-top {
- width: 100%;
- height: 60px;
- background: rgba(255, 214, 107, 0.3);
- border-top-left-radius: 24px;
- border-top-right-radius: 24px;
- display: flex;
- align-items: center;
- > img {
- margin-left: 20px;
- width: 24px;
- }
- }
- .SelectCorrect-main {
- background: #fff;
- height: 580px;
- border-bottom-left-radius: 24px;
- border-bottom-right-radius: 24px;
- &::after {
- content: '';
- display: block;
- height: 0;
- clear: both;
- visibility: hidden;
- }
- }
- .dialog-maxHeight {
- display: flex;
- justify-content: flex-start;
- max-height: 580px;
- .right-box {
- max-height: 560px;
- overflow: auto;
- }
- .inner {
- padding: 36px 48px;
- display: flex;
- align-items: center;
- flex-flow: wrap;
- }
- }
- .english {
- color: #2c2c2c;
- font-size: 24px;
- line-height: 24px;
- font-family: sourceR;
- margin-left: 5px;
- text-align: left;
- width: 100%;
- }
- .spell {
- font-family: 'GB-PINYINOK-B';
- font-style: normal;
- font-weight: normal;
- font-size: 18px;
- height: 24px;
- color: #000;
- }
- .chinese {
- font-family: 'FZJCGFKTK';
- font-style: normal;
- font-weight: normal;
- font-size: 36px;
- color: #000;
- }
- .pinyin_hidden {
- visibility: hidden;
- }
- }
- .learn-box {
- list-style: none;
- width: 1200px;
- max-height: 800px;
- overflow: auto;
- margin: 20px auto;
- display: flex;
- justify-content: flex-start;
- align-items: center;
- flex-flow: wrap;
- li {
- margin: 12px;
- > div {
- width: 360px;
- height: 360px;
- background: #ffffff;
- box-shadow: 0px 6px 0px rgba(239, 167, 28, 0.4);
- border-radius: 24px;
- color: #2c2c2c;
- padding-top: 12px;
- > p {
- height: 60px;
- width: 100%;
- text-align: center;
- padding: 12px 30px;
- font-size: 24px;
- line-height: 1.5;
- font-family: 'GB-PINYINOK-B';
- }
- b {
- height: 108px;
- background: #fff2d1;
- font-size: 48px;
- line-height: 100%;
- text-align: center;
- display: block;
- font-weight: normal;
- padding: 30px 0;
- font-family: FZJCGFKTK;
- }
- span {
- height: 102px;
- display: flex;
- flex-flow: wrap;
- justify-content: center;
- padding: 24px 30px 6px 30px;
- font-size: 24px;
- line-height: 150%;
- word-break: keep-all;
- }
- .operate-box {
- display: flex;
- align-items: center;
- padding: 0 18px;
- }
- a {
- width: 84px;
- height: 48px;
- background: rgba(255, 87, 87, 0.1);
- border-radius: 24px;
- display: flex;
- margin: 0 12px;
- align-items: center;
- justify-content: center;
- &:hover {
- background: rgba(255, 137, 133, 0.1);
- }
- &:active {
- background: rgba(255, 87, 87, 0.15);
- }
- img {
- width: 24px;
- }
- }
- }
- }
- }
- .practiceBox {
- position: absolute;
- left: 0;
- top: 0;
- z-index: 999;
- width: 100%;
- height: 100%;
- background: rgba(0, 0, 0, 0.19);
- padding-top: 32px;
- box-sizing: border-box;
- }
- .questionMiddle {
- .SelectCorrect {
- width: 800px;
- border-radius: 16px;
- .SelectCorrect-top {
- height: 40px;
- border-top-left-radius: 16px;
- border-top-right-radius: 16px;
- > img {
- margin-left: 13px;
- width: 16px;
- }
- }
- .SelectCorrect-main {
- height: 386px;
- border-bottom-left-radius: 16px;
- border-bottom-right-radius: 16px;
- }
- .dialog-maxHeight {
- max-height: 386px;
- .right-box {
- max-height: 373px;
- }
- .inner {
- padding: 24px 32px;
- }
- }
- .english {
- font-size: 16px;
- line-height: 16px;
- margin-left: 4px;
- }
- .spell {
- font-size: 12px;
- height: 16px;
- }
- .chinese {
- font-size: 24px;
- }
- .pinyin_hidden {
- visibility: hidden;
- }
- }
- .learn-box {
- list-style: none;
- width: 800px;
- max-height: 533px;
- margin: 13px auto;
- li {
- margin: 8px;
- > div {
- width: 240px;
- height: 240px;
- box-shadow: 0px 4px 0px rgba(239, 167, 28, 0.4);
- border-radius: 16px;
- padding-top: 8px;
- > p {
- height: 40px;
- padding: 8px 20px;
- font-size: 16px;
- }
- b {
- height: 72px;
- font-size: 32px;
- padding: 20px 0;
- }
- span {
- height: 68px;
- padding: 16px 20px 4px 20px;
- font-size: 16px;
- }
- .operate-box {
- padding: 0 12px;
- }
- a {
- width: 58px;
- height: 32px;
- background: rgba(255, 87, 87, 0.1);
- border-radius: 16px;
- margin: 0 8px;
- &:hover {
- background: rgba(255, 137, 133, 0.1);
- }
- &:active {
- background: rgba(255, 87, 87, 0.15);
- }
- img {
- width: 16px;
- }
- }
- }
- }
- }
- }
- .questionSmall {
- .SelectCorrect {
- width: 600px;
- border-radius: 12px;
- .SelectCorrect-top {
- height: 30px;
- border-top-left-radius: 12px;
- border-top-right-radius: 12px;
- > img {
- margin-left: 10px;
- width: 12px;
- }
- }
- .SelectCorrect-main {
- height: 290px;
- border-bottom-left-radius: 12px;
- border-bottom-right-radius: 12px;
- }
- .dialog-maxHeight {
- max-height: 290px;
- .right-box {
- max-height: 280px;
- }
- .inner {
- padding: 18px 24px;
- }
- }
- .english {
- font-size: 12px;
- line-height: 12px;
- margin-left: 2px;
- }
- .spell {
- font-size: 12px;
- height: 18px;
- }
- .chinese {
- font-size: 18px;
- }
- .pinyin_hidden {
- visibility: hidden;
- height: 18px;
- }
- }
- .learn-box {
- list-style: none;
- width: 600px;
- max-height: 400px;
- overflow: auto;
- margin: 10px auto;
- li {
- margin: 6px;
- > div {
- width: 180px;
- height: 180px;
- box-shadow: 0px 3px 0px rgba(239, 167, 28, 0.4);
- border-radius: 12px;
- padding-top: 6px;
- > p {
- height: 30px;
- padding: 6px 15px;
- font-size: 12px;
- }
- b {
- height: 54px;
- font-size: 24px;
- padding: 15px 0;
- }
- span {
- height: 51px;
- padding: 12px 15px 3px 15px;
- font-size: 12px;
- }
- .operate-box {
- padding: 0 9px;
- }
- a {
- width: 44px;
- height: 24px;
- border-radius: 12px;
- margin: 0 6px;
- &:hover {
- background: rgba(255, 137, 133, 0.1);
- }
- &:active {
- background: rgba(255, 87, 87, 0.15);
- }
- img {
- width: 12px;
- }
- }
- }
- }
- }
- .practiceBox {
- padding-top: 16px;
- }
- }
- </style>
- <style lang="scss">
- .left-box .article-img {
- max-width: 444px;
- max-height: 560px;
- display: block;
- text-align: center;
- img {
- width: 100%;
- height: 560px;
- }
- }
- .el-image {
- max-width: 100%;
- max-height: 100%;
- }
- .questionMiddle {
- .left-box .article-img {
- max-width: 296px;
- max-height: 373px;
- img {
- max-width: 100%;
- max-height: 373px;
- }
- }
- }
- .questionSmall {
- .left-box .article-img {
- max-width: 222px;
- max-height: 280px;
- img {
- max-width: 100%;
- max-height: 280px;
- }
- }
- }
- </style>
|