|
@@ -3,13 +3,23 @@
|
|
|
<!-- 左侧题目列表清单 -->
|
|
|
<div class="ql-left-box">
|
|
|
<!--<p style="font-size:28px;text-align:center;margin:20px 0">芳草小学2019年5月期中考试数学试卷</p>
|
|
|
- <p style="font-size:16px;text-align:center">考试时间:120分钟 出卷人:张纪中</p>-->
|
|
|
+ <p style="font-size:16px;text-align:center">考试时间:120分钟 出卷人:张纪中</p>-->
|
|
|
|
|
|
+ <span class="btn-back" @click="handleBackTo" ref="btnBack"><Icon type="ios-arrow-back" />返回</span>
|
|
|
|
|
|
<div class="ql-item" v-for="(question,index) in questionList">
|
|
|
- <span class="btn-back" @click="handleBackTo"><Icon type="ios-arrow-back" />返回</span>
|
|
|
- <div class="item-question">
|
|
|
- <p>{{index+1}} : <span class="item-type">{{question.questionType}}</span><span v-html="question.question"></span></p>
|
|
|
+ <div>
|
|
|
+ <div class="item-question">
|
|
|
+ <p>
|
|
|
+ <span>{{index+1}} :</span>
|
|
|
+ <span v-html="question.question"></span>
|
|
|
+ </p>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ <div class="item-question-score">
|
|
|
+ <span class="item-type">{{question.questionType}}</span>
|
|
|
+ <span class="item-type" style="background: #05b454;">{{question.score}}分</span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="item-option-wrap">
|
|
|
<div v-for="(option,optionIndex) in question.option" class="item-option">
|
|
@@ -26,11 +36,6 @@
|
|
|
<p>{{String.fromCharCode(64 + parseInt(childOptionIndex+1))}} : <span v-html="childOption.value"></span></p>
|
|
|
</div>
|
|
|
<div class="item-concept" style="margin-top:20px;">
|
|
|
- <div class="question-answer-info">
|
|
|
- <span class="fl-row">【知识点】: 实数的运用</span>
|
|
|
- <span class="fl-row"><span>班级得分率:</span><Progress :percent="75" stroke-color="#06a9bb" /><Icon type="ios-arrow-down" /></span>
|
|
|
- <span class="fl-row"><span>年级得分率:</span><Progress :percent="50" stroke-color="#00ab89" /></span>
|
|
|
- </div>
|
|
|
</div>
|
|
|
<div class="item-answer">
|
|
|
<span class="item-header-title">【答案】:</span>
|
|
@@ -44,68 +49,77 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
-
|
|
|
- <!-- 答案与解析部分选择是否展示 -->
|
|
|
- <div class="item-concept">
|
|
|
- <div class="question-answer-info" v-show="question.type != 'Compose'">
|
|
|
- <span class="fl-row">【知识点】: 实数的运用</span>
|
|
|
- <span class="fl-row"><span>班级得分率:</span><Progress :percent="75" stroke-color="#06a9bb" /><Icon type="ios-arrow-down" /></span>
|
|
|
- <span class="fl-row"><span>年级得分率:</span><Progress :percent="50" stroke-color="#00ab89"/></span>
|
|
|
+ <Collapse simple @on-change="handleCollapseChange" v-model="activeCollapseIndex">
|
|
|
+ <Panel :name="index+'answer'">
|
|
|
+ <span>查看答案及解析</span>
|
|
|
+ <div class="answerAndExplain" slot="content" style="margin-top:10px;margin-left: 25px;">
|
|
|
+ <div class="item-answer" v-show="question.type != 'Compose'">
|
|
|
+ <span class="item-header-title">【参考答案】</span>
|
|
|
+ <span v-html="question.answer[0] || question.answer" v-if="question.type == 'Subjective'"></span>
|
|
|
+ <span :class="[ question.type == 'Complete' ? 'item-answer-item':'']" v-for="answer in question.answer" v-else-if="question.type == 'Complete'" v-html="answer"></span>
|
|
|
+ <span :class="[ question.type == 'Complete' ? 'item-answer-item':'']" v-for="answer in question.answer" v-else>{{answer}}</span>
|
|
|
+ </div>
|
|
|
+ <div class="item-explain" v-show="question.type != 'Compose'">
|
|
|
+ <div class="item-header-title">【答题解析】</div>
|
|
|
+ <div v-html="question.explain"></div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="item-answer" v-show="question.type != 'Compose'">
|
|
|
- <span class="item-header-title">【参考答案】</span>
|
|
|
- <span v-html="question.answer[0] || question.answer" v-if="question.type == 'Subjective'"></span>
|
|
|
- <span :class="[ question.type == 'Complete' ? 'item-answer-item':'']" v-for="answer in question.answer" v-else-if="question.type == 'Complete'" v-html="answer"></span>
|
|
|
- <span :class="[ question.type == 'Complete' ? 'item-answer-item':'']" v-for="answer in question.answer" v-else>{{answer}}</span>
|
|
|
- </div>
|
|
|
- <div class="item-explain" v-show="question.type != 'Compose'">
|
|
|
- <div class="item-header-title">【答题解析】</div>
|
|
|
- <div v-html="question.explain"></div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-
|
|
|
+ </Panel>
|
|
|
+ <Panel :name="index+''">
|
|
|
+ <span>查看数据分析</span>
|
|
|
+ <div class="answerAndExplain" slot="content" style="margin-top:10px" v-if="collapseList.indexOf(index.toString()) > -1">
|
|
|
+ <Table :columns="dataColumns" :data="tableData.filter((item,index2) => index2 == index)"></Table>
|
|
|
+ <Table :columns="optionColumns" :data="optionsData" style="margin-top:20px"></Table>
|
|
|
+ <!-- 每个题目的数据分析折线图 -->
|
|
|
+ <div class="analysis-charts">
|
|
|
+ <BaseLine :ids="'myLine' + index" :echartsData="tableData[index]"></BaseLine>
|
|
|
+ <BaseRateLine :ids="'myRateLine' + index" :echartsData="optionsData"></BaseRateLine>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </Panel>
|
|
|
+ </Collapse>
|
|
|
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
|
|
|
<!-- 右侧题目列表题型概览 -->
|
|
|
<div class='ql-right-box' ref="rightBox">
|
|
|
<div class="ql-right-score">
|
|
|
- 试卷总分 :<span>150分</span>
|
|
|
+ 试卷总分 :<span>100分</span>
|
|
|
</div>
|
|
|
<div class="ql-right-list">
|
|
|
<div class="ql-right-part" v-if="SingleList.length">
|
|
|
- <span class="ql-right-part-title"><span class="ql-line"></span>单项选择题(30分)</span>
|
|
|
+ <span class="ql-right-part-title"><span class="ql-line"></span>单项选择题({{sumArr(SingleList.map(item => item.score))}}分)</span>
|
|
|
<div class="ql-right-items">
|
|
|
<span class="ql-right-item" v-for="(item,index) in SingleList" :key="index" @click="handleItemClick(item,$event)">{{index + 1}}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="ql-right-part" v-if="MultipleList.length">
|
|
|
- <span class="ql-right-part-title"><span class="ql-line"></span>多项选择题(30分)</span>
|
|
|
+ <span class="ql-right-part-title"><span class="ql-line"></span>多项选择题({{sumArr(MultipleList.map(item => item.score))}}分)</span>
|
|
|
<div class="ql-right-items">
|
|
|
<span class="ql-right-item" v-for="(item,index) in MultipleList" :key="index" @click="handleItemClick(item,$event)">{{index + 1}}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="ql-right-part" v-if="JudgeList.length">
|
|
|
- <span class="ql-right-part-title"><span class="ql-line"></span>判断题(30分)</span>
|
|
|
+ <span class="ql-right-part-title"><span class="ql-line"></span>判断题({{sumArr(JudgeList.map(item => item.score))}}分)</span>
|
|
|
<div class="ql-right-items">
|
|
|
<span class="ql-right-item" v-for="(item,index) in JudgeList" :key="index" @click="handleItemClick(item,$event)">{{index + 1}}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="ql-right-part" v-if="CompleteList.length">
|
|
|
- <span class="ql-right-part-title"><span class="ql-line"></span>填空题(30分)</span>
|
|
|
+ <span class="ql-right-part-title"><span class="ql-line"></span>填空题({{sumArr(CompleteList.map(item => item.score))}}分)</span>
|
|
|
<div class="ql-right-items">
|
|
|
<span class="ql-right-item" v-for="(item,index) in CompleteList" :key="index" @click="handleItemClick(item,$event)">{{index + 1}}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="ql-right-part" v-if="SubjectiveList.length">
|
|
|
- <span class="ql-right-part-title"><span class="ql-line"></span>问答题(30分)</span>
|
|
|
+ <span class="ql-right-part-title"><span class="ql-line"></span>问答题({{sumArr(SubjectiveList.map(item => item.score))}}分)</span>
|
|
|
<div class="ql-right-items">
|
|
|
<span class="ql-right-item" v-for="(item,index) in SubjectiveList" :key="index" @click="handleItemClick(item,$event)">{{index + 1}}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="ql-right-part" v-if="ComposeList.length">
|
|
|
- <span class="ql-right-part-title"><span class="ql-line"></span>综合题(30分)</span>
|
|
|
+ <span class="ql-right-part-title"><span class="ql-line"></span>综合题({{sumArr(ComposeList.map(item => item.score))}}分)</span>
|
|
|
<div class="ql-right-items">
|
|
|
<span class="ql-right-item" v-for="(item,index) in ComposeList" :key="index" @click="handleItemClick(item,$event)">{{index + 1}}</span>
|
|
|
</div>
|
|
@@ -116,19 +130,24 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import questions from '@/static/questionList.json'
|
|
|
- import classList from '@/static/classList.json'
|
|
|
import BaseTestScatter from '@/components/student-analysis/total/BaseTestScatter.vue'
|
|
|
- import BaseTable from '@/components/student-analysis/total/BaseMyTable.vue'
|
|
|
import BaseLineBar from '@/components/student-analysis/total/BaseLineBar.vue'
|
|
|
+ import BaseLine from '@/components/student-analysis/total/BaseLine.vue'
|
|
|
+ import BaseRateLine from '@/components/student-analysis/total/BaseRateLine.vue'
|
|
|
import { setTimeout } from 'timers';
|
|
|
export default {
|
|
|
components: {
|
|
|
- BaseTestScatter, BaseTable, BaseLineBar
|
|
|
+ BaseTestScatter, BaseRateLine, BaseLineBar,BaseLine
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- isFixed:false,
|
|
|
+ activeCollapseIndex:[],
|
|
|
+ isFixed: false,
|
|
|
+ isLoadingEcharts:false,
|
|
|
+ isShowAnswerExplain: false,
|
|
|
+ tableData: [],
|
|
|
+ optionsData:[],
|
|
|
+ collapseList:[],
|
|
|
questionList: [],
|
|
|
SingleList: [],
|
|
|
MultipleList:[],
|
|
@@ -145,15 +164,130 @@ import { setTimeout } from 'timers';
|
|
|
"Compose":"综合"
|
|
|
},
|
|
|
diffColors: ['#32CF74', '#E8BE15', '#F19300', '#EB5E00', '#D30000'],
|
|
|
+ dataColumns: [
|
|
|
+ {
|
|
|
+ title: '知识点',
|
|
|
+ key: 'knowledgePoint',
|
|
|
+ align:'center',
|
|
|
+ width:150
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '落点区域',
|
|
|
+ key: 'areaName',
|
|
|
+ align: 'center',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '配分',
|
|
|
+ key: 'score',
|
|
|
+ align:'center',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '难易度',
|
|
|
+ key: 'diff',
|
|
|
+ align:'center',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '鉴别度',
|
|
|
+ key: 'identify',
|
|
|
+ align:'center',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '正答率',
|
|
|
+ align:'center',
|
|
|
+ key: 'classScoreRate',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '高分组正答率',
|
|
|
+ align:'center',
|
|
|
+ key: 'PH',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '低分组正答率',
|
|
|
+ align:'center',
|
|
|
+ key: 'PL',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: 'R1',
|
|
|
+ align:'center',
|
|
|
+ key: 'R1',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: 'R2',
|
|
|
+ key: 'R2',
|
|
|
+ align:'center',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: 'R3',
|
|
|
+ align:'center',
|
|
|
+ key: 'R3',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: 'R4',
|
|
|
+ align:'center',
|
|
|
+ key: 'R4',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: 'R5',
|
|
|
+ align:'center',
|
|
|
+ key: 'R5',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: 'R6',
|
|
|
+ align:'center',
|
|
|
+ key: 'R6',
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ optionColumns: [
|
|
|
+ {
|
|
|
+ title: '选项',
|
|
|
+ key: 'option',
|
|
|
+ align:'center',
|
|
|
+ width:150
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '选答人数',
|
|
|
+ key: 'num',
|
|
|
+ align: 'center',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '选答率',
|
|
|
+ key: 'rate',
|
|
|
+ align: 'center',
|
|
|
+ render: (h, params) => {
|
|
|
+ return h('div', [
|
|
|
+ h('Progress', {
|
|
|
+ props: {
|
|
|
+ percent: params.row.rate,
|
|
|
+ strokeColor:params.row.isTrue?'#14db14':'#b5bcbe'
|
|
|
+ }
|
|
|
+ }),
|
|
|
+ ]);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '高分组选答率',
|
|
|
+ align:'center',
|
|
|
+ key: 'PH',
|
|
|
+ render: function (h, params) {
|
|
|
+ return h('span',params.row.PH + '%')
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '低分组选答率',
|
|
|
+ align:'center',
|
|
|
+ key: 'PL',
|
|
|
+ render: function (h, params) {
|
|
|
+ return h('span',params.row.PL + '%')
|
|
|
+ }
|
|
|
+ },
|
|
|
+ ],
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
- this.rightTableData = classList;
|
|
|
- questions.result.data.forEach(item => {
|
|
|
- item.questionType = this.typeTransfer[item.type];
|
|
|
- item.score = Math.ceil(Math.random() * 10);
|
|
|
- })
|
|
|
- this.questionList = questions.result.data;
|
|
|
+ this.rightTableData = this.$store.state.totalAnalysis.classList;
|
|
|
+ this.questionList = this.$store.state.totalAnalysis.questions;
|
|
|
this.SingleList = this.questionList.filter(item => item.type == 'Single');
|
|
|
this.MultipleList = this.questionList.filter(item => item.type == 'Multiple');
|
|
|
this.JudgeList = this.questionList.filter(item => item.type == 'Judge');
|
|
@@ -161,7 +295,54 @@ import { setTimeout } from 'timers';
|
|
|
this.SubjectiveList = this.questionList.filter(item => item.type == 'Subjective');
|
|
|
this.ComposeList = this.questionList.filter(item => item.type == 'Compose');
|
|
|
|
|
|
+ let testScatter = this.$store.state.totalAnalysis.testScatter;
|
|
|
+ let list = testScatter.map(item => item.tableData);
|
|
|
+
|
|
|
+ //list.forEach((item, index) => {
|
|
|
+ // item.type = questions[index].type;
|
|
|
+ // item.stem = '';
|
|
|
+ //})
|
|
|
|
|
|
+ //console.log(JSON.stringify(testScatter));
|
|
|
+
|
|
|
+ //数据分析表格数据
|
|
|
+ let knowledgeArr = testScatter.map(item => item.tableData);
|
|
|
+ this.tableData = knowledgeArr;
|
|
|
+
|
|
|
+ this.optionsData = [
|
|
|
+ {
|
|
|
+ option: "A",
|
|
|
+ isTrue:false,
|
|
|
+ num: 12,
|
|
|
+ rate: 40,
|
|
|
+ PH: 10,
|
|
|
+ PL:60
|
|
|
+ },
|
|
|
+ {
|
|
|
+ option: "B",
|
|
|
+ isTrue:false,
|
|
|
+ num: 6,
|
|
|
+ rate: 20,
|
|
|
+ PH: 10,
|
|
|
+ PL:23
|
|
|
+ },
|
|
|
+ {
|
|
|
+ option: "C",
|
|
|
+ isTrue:true,
|
|
|
+ num: 9,
|
|
|
+ rate: 30,
|
|
|
+ PH: 70,
|
|
|
+ PL:10
|
|
|
+ },
|
|
|
+ {
|
|
|
+ option: "D",
|
|
|
+ isTrue:false,
|
|
|
+ num: 3,
|
|
|
+ rate: 10,
|
|
|
+ PH: 10,
|
|
|
+ PL:7
|
|
|
+ }
|
|
|
+ ]
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
@@ -180,17 +361,17 @@ import { setTimeout } from 'timers';
|
|
|
|
|
|
//点击右边题序 获取到题目DOM 进行滚动操作
|
|
|
handleItemClick(item, e) {
|
|
|
- let currentSpan = e.target;
|
|
|
+ let currentSpan = e.target || e;
|
|
|
let allList = document.getElementsByClassName('ql-right-item');
|
|
|
let questionList = document.getElementsByClassName('ql-item');
|
|
|
let itemIndex = this.questionList.indexOf(item);
|
|
|
let questionDom = questionList[itemIndex];
|
|
|
//选中题目高亮显示
|
|
|
- questionDom.style.boxShadow = "0px 0px 5px 3px #9e9e9e";
|
|
|
- setTimeout(function () {
|
|
|
- questionDom.style.boxShadow = "none";
|
|
|
- }, 2000);
|
|
|
- let scrollDistance = questionDom.offsetTop + 83; //相对父级容器高度加上头部高度即为滚动距离
|
|
|
+ //questionDom.style.boxShadow = "0px 0px 5px 3px #9e9e9e";
|
|
|
+ //setTimeout(function () {
|
|
|
+ // questionDom.style.boxShadow = "none";
|
|
|
+ //}, 2000);
|
|
|
+ let scrollDistance = questionDom.offsetTop + 134; //相对父级容器高度加上头部高度即为滚动距离
|
|
|
this.scrollToTop(this.$parent.$refs.dataContainer, itemIndex == 0 ? 0 : scrollDistance, 500);
|
|
|
//伪数组处理统一背景颜色
|
|
|
Array.prototype.slice.call(allList).forEach(item => {
|
|
@@ -200,46 +381,60 @@ import { setTimeout } from 'timers';
|
|
|
currentSpan.style.background = "#139c51";
|
|
|
},
|
|
|
|
|
|
- //根据传过来的题目编号进行位置滚动
|
|
|
- handleIndexScroll(index) {
|
|
|
- let allList = document.getElementsByClassName('ql-right-item');
|
|
|
- let questionList = document.getElementsByClassName('ql-item');
|
|
|
- let questionDom = questionList[index];
|
|
|
- //选中题目高亮显示
|
|
|
- questionDom.style.boxShadow = "0px 0px 5px 3px #9e9e9e";
|
|
|
- questionDom.getElementsByClassName('btn-back')[0].style.display = 'inline-block';
|
|
|
- setTimeout(function () {
|
|
|
- questionDom.style.boxShadow = "none";
|
|
|
- }, 2000);
|
|
|
- let scrollDistance = questionDom.offsetTop + 83; //相对父级容器高度加上头部高度即为滚动距离
|
|
|
- this.scrollToTop(this.$parent.$refs.dataContainer, index == 0 ? 0 : scrollDistance, 500);
|
|
|
- //伪数组处理统一背景颜色
|
|
|
- Array.prototype.slice.call(allList).forEach(item => {
|
|
|
- item.style.background = "#3c8fa2";
|
|
|
- })
|
|
|
- //将当前选中项修改选中色
|
|
|
- allList[index].style.background = "#139c51";
|
|
|
- },
|
|
|
+ //点击返回
|
|
|
handleBackTo() {
|
|
|
+ this.$refs.btnBack.style.display = 'none';
|
|
|
this.$parent.isShowQuestions = false;
|
|
|
this.$router.back(-1);
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
+ //折叠面板点击事件
|
|
|
+ handleCollapseChange(val) {
|
|
|
+ let questionIndex = val[0];
|
|
|
+ if (questionIndex == "999") return;
|
|
|
+ if (questionIndex && this.collapseList.indexOf(questionIndex) == -1 && questionIndex != "999") {
|
|
|
+ this.collapseList.push(questionIndex);
|
|
|
+ this.activeCollapseIndex = questionIndex;
|
|
|
+ } else if (questionIndex == 0) {
|
|
|
+ this.collapseList.push(questionIndex);
|
|
|
+ this.activeCollapseIndex = questionIndex;
|
|
|
+ } else {
|
|
|
+ //console.log("加入异常", questionIndex);
|
|
|
+ //console.log("加入异常", this.collapseList.indexOf(questionIndex));
|
|
|
+ }
|
|
|
+ console.log(this.collapseList);
|
|
|
+ this.activeCollapseIndex = this.collapseList;
|
|
|
+ },
|
|
|
+
|
|
|
+ //返回题目区域总分 字符串换算
|
|
|
+ sumArr(arr) {
|
|
|
+ return eval(arr.join('+'));
|
|
|
}
|
|
|
},
|
|
|
|
|
|
mounted() {
|
|
|
+ this.$parent.isShowQuestions = true;
|
|
|
+ //this.isLoadingEcharts = true;
|
|
|
let box = this.$refs.rightBox;
|
|
|
+ let btnBack = this.$refs.btnBack;
|
|
|
+ //页面滚动时 右侧题目序号以及返回按钮的滚动
|
|
|
this.$parent.$refs.dataContainer.addEventListener('scroll', () => {
|
|
|
- let isOverHeight = this.$parent.$refs.dataContainer.scrollTop >= 129;
|
|
|
+ let isOverHeight = this.$parent.$refs.dataContainer.scrollTop >= 129; //判定右侧序号滚动距离是否到达临界值
|
|
|
+ let isBackHeight = this.$parent.$refs.dataContainer.scrollTop >= 129; //判定右侧序号滚动距离是否到达临界值
|
|
|
let t = 232 - this.$parent.$refs.dataContainer.scrollTop;
|
|
|
box.style.top = isOverHeight ? "100px" : (t + 'px');
|
|
|
+ btnBack.style.top = isBackHeight ? (this.$parent.$refs.dataContainer.scrollTop - 152) + 'px' : '-1px';
|
|
|
+ //btnBack.style.top = this.$parent.$refs.dataContainer.scrollTop > 146 ? (this.$parent.$refs.dataContainer.scrollTop - 146) + 'px' : '20px';
|
|
|
}, false)
|
|
|
|
|
|
- if (this.$route.query.index) {
|
|
|
- this.handleIndexScroll(this.$route.query.index - 1);
|
|
|
+ if (this.$route.query.QIndex) {
|
|
|
+ let index = this.$route.query.QIndex - 1;
|
|
|
+ let allList = document.getElementsByClassName('ql-right-item');
|
|
|
+ this.handleCollapseChange([index.toString()]);
|
|
|
+ this.activeCollapseIndex.push(index + 'answer');
|
|
|
+ this.handleItemClick(this.questionList[index], allList[index]);
|
|
|
}
|
|
|
- this.$parent.isShowQuestions = true;
|
|
|
-
|
|
|
-
|
|
|
},
|
|
|
}
|
|
|
</script>
|
|
@@ -247,4 +442,19 @@ import { setTimeout } from 'timers';
|
|
|
|
|
|
<style src="./QuestionList.css" scoped></style>
|
|
|
|
|
|
+<style>
|
|
|
+ .ql-item .ivu-collapse {
|
|
|
+ border:0;
|
|
|
+ }
|
|
|
+
|
|
|
+ .ql-item .ivu-collapse > .ivu-collapse-item > .ivu-collapse-header {
|
|
|
+ color:#06a9bb;
|
|
|
+ }
|
|
|
+ .ql-item .ivu-collapse > .ivu-collapse-item > .ivu-collapse-header > .ivu-icon {
|
|
|
+ vertical-align:unset;
|
|
|
+ }
|
|
|
|
|
|
+ .ql-item .ivu-collapse > .ivu-collapse-item {
|
|
|
+ border-top:0;
|
|
|
+ }
|
|
|
+</style>
|