| | |
| | | v-show="item.infoList.length" |
| | | > |
| | | <p class="catalogName" :style="{ color: primaryColor }"> |
| | | <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 v-html="item.catalogName"></span> |
| | | <span class="catalogName-box" > |
| | | <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 v-html="item.catalogName"></span> |
| | | </span> |
| | | <img |
| | | :src="item.isCollect ? isHeart : heart" |
| | | alt="" |
| | | class="collect-png" |
| | | @click="setCollect(nindex, index)" |
| | | v-if="!hideCollect && item.type == 'material'" |
| | | /> |
| | | </p> |
| | | <el-image |
| | | v-if="item.catalogImage" |
| | |
| | | v-html="itemText" |
| | | class="input-txt" |
| | | ></span> |
| | | <input |
| | | <!-- <input |
| | | v-else |
| | | type="text" |
| | | class="input" |
| | | v-model.trim="value.userAnswer[itemText.num]" |
| | | :disabled="value.isComplete" |
| | | :style="{ backgroundColor: inputBc }" |
| | | /> |
| | | <!-- <math-field |
| | | v-else |
| | | class="mathField" |
| | | /> --> |
| | | <math-field |
| | | v-else |
| | | class="mathField" |
| | | :menuItems="[]" |
| | | @input="onChangeInput" |
| | | @input="onChangeInput($event,nindex,index,itemText.num)" |
| | | > |
| | | </math-field> --> |
| | | {{ value.userAnswer[itemText.num] }} |
| | | </math-field> |
| | | </span> |
| | | </p> |
| | | <!-- 富文本 --> |
| | |
| | | </span> |
| | | </p> |
| | | </div> |
| | | <!-- <img |
| | | <img |
| | | :src="value.isCollect ? isHeart : heart" |
| | | alt="" |
| | | class="collect-png" |
| | | @click="setCollect(nindex, index)" |
| | | v-if="!(hideCollect && value.questionType == 'shortAnswer')" |
| | | /> --> |
| | | v-if="!hideCollect && item.type != 'material'" |
| | | /> |
| | | <!-- 收藏 --> |
| | | </div> |
| | | <div class="questionContent"> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { MathfieldElement } from "mathlive" |
| | | import { MathfieldElement } from "mathlive"; |
| | | import { Message } from "element-ui"; |
| | | import TEditorVue from "../teditor/index.vue"; |
| | | export default { |
| | |
| | | getPublicImage(md5, width, height) { |
| | | if (!md5) return; |
| | | if (md5.includes("http")) { |
| | | if(width) { |
| | | return md5 + `?width=${width}` |
| | | if (width) { |
| | | return md5 + `?width=${width}`; |
| | | } else { |
| | | return md5 |
| | | return md5; |
| | | } |
| | | }; |
| | | } |
| | | let src = null; |
| | | if (md5) { |
| | | src = process.env.VUE_APP_API_URL + `/file/GetPreViewImage?md5=${md5}`; |
| | |
| | | }, |
| | | // 题目收藏按钮,收藏和取消同一接口,取消数组减去该项id |
| | | setCollect(num, number) { |
| | | const item = this.cardData[num].infoList[number]; |
| | | let item = null |
| | | if(number) { |
| | | item = this.cardData[num].infoList[number]; |
| | | |
| | | } else { |
| | | item = this.cardData[num] |
| | | } |
| | | item.isCollect = !item.isCollect; |
| | | console.log(111,item); |
| | | if (this.cardData.length == 0) { |
| | | this.collectList.push(item.id); |
| | | } else { |
| | |
| | | const item = this.allCollect[index]; |
| | | if (item.type == this.sourceType) item.collectList = this.collectList; |
| | | } |
| | | // console.log(this.allCollect, this.collectList, list); |
| | | console.log('点击收藏按钮',this.allCollect) |
| | | this.MG.identity |
| | | .setUserKey({ |
| | | setKeyRequests: [ |
| | |
| | | .then((res) => { |
| | | try { |
| | | const collect = JSON.parse(res[0].value); |
| | | console.log('全部收藏id',collect); |
| | | if (collect.length) { |
| | | this.collectList = collect.find( |
| | | (citem) => citem.type == this.sourceType |
| | |
| | | ).errorList; |
| | | } |
| | | } catch (error) {} |
| | | console.log("错题列表", this.allError); |
| | | }) |
| | | .catch(() => {}); |
| | | }, |
| | | onChangeInput(e) { |
| | | console.log(e.target.value); |
| | | } |
| | | onChangeInput(e,index,cindex,num) { |
| | | this.cardData[index].infoList[cindex].userAnswer[num] = e.target.value |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | |
| | | |
| | | <style lang="less" scoped> |
| | | .catalogName { |
| | | display: flex; |
| | | text-indent: 1em !important; |
| | | font-size: 16px; |
| | | .catalogName-box { |
| | | display: inline-block; |
| | | width: 94%; |
| | | } |
| | | } |
| | | .catalogImage { |
| | | width: 50%; |
| | |
| | | } |
| | | .mathField { |
| | | min-width: 200px; |
| | | max-width: 518px; |
| | | } |
| | | } |
| | | |