|
@@ -1,6 +1,5 @@
|
|
<template>
|
|
<template>
|
|
<div class="ev-list-container">
|
|
<div class="ev-list-container">
|
|
- <Loading v-show="importLoading"></Loading>
|
|
|
|
|
|
|
|
<div class="ev-header">
|
|
<div class="ev-header">
|
|
<Icon type="md-bookmarks" size="30" color="rgb(16, 171, 231)" />
|
|
<Icon type="md-bookmarks" size="30" color="rgb(16, 171, 231)" />
|
|
@@ -56,7 +55,7 @@
|
|
</span>
|
|
</span>
|
|
<div class="operation-cart">
|
|
<div class="operation-cart">
|
|
<Poptip trigger="hover" title="我的试题篮" placement="bottom">
|
|
<Poptip trigger="hover" title="我的试题篮" placement="bottom">
|
|
- <Badge :count="basketCount" show-zero>
|
|
|
|
|
|
+ <Badge :count="basketCount" show-zero type="success">
|
|
<img src="../../../assets/icon/icon_cart.png" />
|
|
<img src="../../../assets/icon/icon_cart.png" />
|
|
</Badge>
|
|
</Badge>
|
|
<div class="basket-content" slot="content">
|
|
<div class="basket-content" slot="content">
|
|
@@ -97,65 +96,96 @@
|
|
<p @click="handleSubmitPaper">进入组卷中心</p>
|
|
<p @click="handleSubmitPaper">进入组卷中心</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
</Poptip>
|
|
</Poptip>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+ <!-- 筛选部分结束 -->
|
|
|
|
+
|
|
|
|
+
|
|
<!-- 题目列表部分 -->
|
|
<!-- 题目列表部分 -->
|
|
- <div v-if="list.length == 0">暂无数据</div>
|
|
|
|
|
|
+ <div v-if="list.length == 0" class="no-data-text">
|
|
|
|
+ <img src="../../../assets/icon/no_data.svg" width="120"/>
|
|
|
|
+ <span style="margin-top:15px;color:#808080">暂无数据</span>
|
|
|
|
+ </div>
|
|
<div class="content-wrap" v-else>
|
|
<div class="content-wrap" v-else>
|
|
|
|
+ <Loading v-show="importLoading"></Loading>
|
|
|
|
+
|
|
<div class="exercise-item" v-for="(item,index) of list">
|
|
<div class="exercise-item" v-for="(item,index) of list">
|
|
- <div>
|
|
|
|
|
|
+ <!-- 题目难度类型以及绑定知识点 -->
|
|
|
|
+ <div class="item-types">
|
|
<span class="item-difficulty" :style="{backgroundColor:diffColors[item.difficulty || 3]}">{{exersicesDiff[item.difficulty || 3]}}</span>
|
|
<span class="item-difficulty" :style="{backgroundColor:diffColors[item.difficulty || 3]}">{{exersicesDiff[item.difficulty || 3]}}</span>
|
|
<span class="item-type">{{exersicesType[item.type]}}</span>
|
|
<span class="item-type">{{exersicesType[item.type]}}</span>
|
|
<span class="item-relevant-points">
|
|
<span class="item-relevant-points">
|
|
<span class="item-tools-bind">
|
|
<span class="item-tools-bind">
|
|
<span class="item-tools-tool">
|
|
<span class="item-tools-tool">
|
|
- <span class="item-bind-point">已关联知识点:</span>
|
|
|
|
- <span class="item-bind-point">字音辨析</span>
|
|
|
|
- <span class="item-bind-point">字音辨析</span>
|
|
|
|
- <span class="item-bind-point">字音辨析</span>
|
|
|
|
- <span class="item-bind-point">字音辨析</span>
|
|
|
|
|
|
+ <span class="item-bind-point">已关联知识点:</span>
|
|
|
|
+ <span class="item-bind-point" v-for="concept in item.concept" v-show="item.concept"><Tag color="success">{{concept.name}}</Tag></span>
|
|
|
|
+ <span class="item-bind-point" v-show="!item.concept">暂未关联</span>
|
|
<Icon type="md-link" size="20" />
|
|
<Icon type="md-link" size="20" />
|
|
- <span @click="handleBindPoint">绑定知识点</span>
|
|
|
|
|
|
+ <span @click="handleBindPoint(item.concept || [])">绑定知识点</span>
|
|
</span>
|
|
</span>
|
|
</span>
|
|
</span>
|
|
</span>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
|
|
+ <!-- 题干部分 -->
|
|
<div class="item-question">
|
|
<div class="item-question">
|
|
<p>{{index+1}} : <span v-html="item.question"></span></p>
|
|
<p>{{index+1}} : <span v-html="item.question"></span></p>
|
|
</div>
|
|
</div>
|
|
|
|
+ <!-- 选项部分 -->
|
|
<div v-for="(option,optionIndex) in item.option">
|
|
<div v-for="(option,optionIndex) in item.option">
|
|
<p>{{String.fromCharCode(64 + parseInt(optionIndex+1))}} : <span v-html="option.value"></span></p>
|
|
<p>{{String.fromCharCode(64 + parseInt(optionIndex+1))}} : <span v-html="option.value"></span></p>
|
|
</div>
|
|
</div>
|
|
- <div class="item-answer">
|
|
|
|
|
|
+
|
|
|
|
+ <!-- 如果是组合题 -->
|
|
|
|
+ <div v-for="(childQuestion,childIndex) in item.children" v-if="item.children.length">
|
|
|
|
+ <div class="item-question">
|
|
|
|
+ <p>{{childIndex+1}} : <span v-html="childQuestion.question"></span></p>
|
|
|
|
+ </div>
|
|
|
|
+ <div v-for="(childOption,childOptionIndex) in childQuestion.option">
|
|
|
|
+ <p>{{String.fromCharCode(64 + parseInt(childOptionIndex+1))}} : <span v-html="childOption.value"></span></p>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="item-answer" v-show="isShowAnswer">
|
|
|
|
+ <span style="color:#01b4ef">【答案】:</span>
|
|
|
|
+ <span v-html="childQuestion.answer[0] || childQuestion.answer" v-if="childQuestion.type == 'Subjective'"></span>
|
|
|
|
+ <span :class="[ childQuestion.type == 'Complete' ? 'item-answer-item':'']" v-for="answer in childQuestion.answer" v-else-if="childQuestion.type == 'Complete'" v-html="answer"></span>
|
|
|
|
+ <span :class="[ childQuestion.type == 'Complete' ? 'item-answer-item':'']" v-for="answer in childQuestion.answer" v-else>{{answer}}</span>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="item-explain" v-show="isShowAnswer">
|
|
|
|
+ <span style="color:#01b4ef">【解析】:</span>
|
|
|
|
+ <span v-html="childQuestion.explain"></span>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <!-- 组合题结束 -->
|
|
|
|
+ <!-- 答案展示部分 -->
|
|
|
|
+ <div class="item-answer" v-show="item.type != 'Compose'">
|
|
<span class="answer-title-line"></span>
|
|
<span class="answer-title-line"></span>
|
|
<span class="answer-title" @click="showAnswer($event,'answer')">答案:点击展开答案详情</span>
|
|
<span class="answer-title" @click="showAnswer($event,'answer')">答案:点击展开答案详情</span>
|
|
<div class="item-answer-details">
|
|
<div class="item-answer-details">
|
|
<span v-html="item.answer" v-if="item.type == 'Subjective'"></span>
|
|
<span v-html="item.answer" v-if="item.type == 'Subjective'"></span>
|
|
<span :class="[ item.type == 'Complete' ? 'item-answer-item':'']" v-for="answer in item.answer" v-else-if="item.type == 'Complete'" v-html="answer"></span>
|
|
<span :class="[ item.type == 'Complete' ? 'item-answer-item':'']" v-for="answer in item.answer" v-else-if="item.type == 'Complete'" v-html="answer"></span>
|
|
<span :class="[ item.type == 'Complete' ? 'item-answer-item':'']" v-for="answer in item.answer" v-else>{{answer}}</span>
|
|
<span :class="[ item.type == 'Complete' ? 'item-answer-item':'']" v-for="answer in item.answer" v-else>{{answer}}</span>
|
|
-
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div class="item-explain">
|
|
|
|
|
|
+ <!-- 解析部分 -->
|
|
|
|
+ <div class="item-explain" v-show="item.type != 'Compose'">
|
|
<span class="explain-title-line"></span>
|
|
<span class="explain-title-line"></span>
|
|
<span class="explain-title" @click="showAnswer($event,'explain')">解析:点击展开解析详情</span>
|
|
<span class="explain-title" @click="showAnswer($event,'explain')">解析:点击展开解析详情</span>
|
|
<div class="item-explain-details">
|
|
<div class="item-explain-details">
|
|
<span v-html="item.explain"></span>
|
|
<span v-html="item.explain"></span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+ <!-- 底部题目操作栏 -->
|
|
<div class="item-tools">
|
|
<div class="item-tools">
|
|
-
|
|
|
|
<span class="item-tools-info">来源:浙江省温州市2019年中考数学试卷</span>
|
|
<span class="item-tools-info">来源:浙江省温州市2019年中考数学试卷</span>
|
|
<span class="item-tools-info">使用次数:98 次</span>
|
|
<span class="item-tools-info">使用次数:98 次</span>
|
|
<span class="item-tools-info" style="border:0">更新时间:2019-07-01</span>
|
|
<span class="item-tools-info" style="border:0">更新时间:2019-07-01</span>
|
|
-
|
|
|
|
<Button type="info" @click="handleChoose(item)">{{basketList.all.indexOf(item) > -1 ? '已选入' : '选题'}}</Button>
|
|
<Button type="info" @click="handleChoose(item)">{{basketList.all.indexOf(item) > -1 ? '已选入' : '选题'}}</Button>
|
|
<Button type="primary" @click="handleEdit(item)" style="margin-right:10px">编辑题目</Button>
|
|
<Button type="primary" @click="handleEdit(item)" style="margin-right:10px">编辑题目</Button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+
|
|
|
|
+ <!-- 底部分页区域 -->
|
|
<Page :total="totalNum"
|
|
<Page :total="totalNum"
|
|
show-sizer
|
|
show-sizer
|
|
@on-page-size-change="pageSizeChange"
|
|
@on-page-size-change="pageSizeChange"
|
|
@@ -164,7 +194,7 @@
|
|
<Button type="success" @click="backToAdd" style="margin:10px;">返回</Button>
|
|
<Button type="success" @click="backToAdd" style="margin:10px;">返回</Button>
|
|
<Button type="success" @click="backToPaper" style="margin:10px;">试卷</Button>
|
|
<Button type="success" @click="backToPaper" style="margin:10px;">试卷</Button>
|
|
|
|
|
|
- <!-- 绑定知识点弹窗 Transfer -->
|
|
|
|
|
|
+ <!-- 绑定知识点弹窗开始 -->
|
|
<Modal v-model="bindPointModal"
|
|
<Modal v-model="bindPointModal"
|
|
title="绑定知识点"
|
|
title="绑定知识点"
|
|
width="500"
|
|
width="500"
|
|
@@ -176,20 +206,20 @@
|
|
<Input search placeholder="搜索知识点..." v-model="searchWord" @on-change="filterChange" />
|
|
<Input search placeholder="搜索知识点..." v-model="searchWord" @on-change="filterChange" />
|
|
<Tabs v-model="tabSelectVal">
|
|
<Tabs v-model="tabSelectVal">
|
|
<TabPane label="校本知识点" name="school">
|
|
<TabPane label="校本知识点" name="school">
|
|
- <Tree :data="knowPointList" ref="pointTree" :render="renderContent" @on-check-change="pointTreeCheck" check-strictly></Tree>
|
|
|
|
|
|
+ <Tree :data="knowPointList" ref="pointTree" :render="renderContent" check-strictly></Tree>
|
|
</TabPane>
|
|
</TabPane>
|
|
<TabPane label="标准知识点" name="all">
|
|
<TabPane label="标准知识点" name="all">
|
|
- <Tree :data="allPointList" ref="pointTree" :render="renderContent" @on-check-change="pointTreeCheck" check-strictly></Tree>
|
|
|
|
|
|
+ <Tree :data="allPointList" ref="pointTree" :render="renderContent" check-strictly></Tree>
|
|
</TabPane>
|
|
</TabPane>
|
|
</Tabs>
|
|
</Tabs>
|
|
<Spin fix v-show="pointListLoading"></Spin>
|
|
<Spin fix v-show="pointListLoading"></Spin>
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
<div class="selected-point-list">
|
|
<div class="selected-point-list">
|
|
<p class="bind-title">已选知识点<span style="font-weight:500;font-size:12px"> (最多绑定5个知识点,颜色代表不同来源)</span><span class="btn-clear" @click="handleClearChecked">清空</span></p>
|
|
<p class="bind-title">已选知识点<span style="font-weight:500;font-size:12px"> (最多绑定5个知识点,颜色代表不同来源)</span><span class="btn-clear" @click="handleClearChecked">清空</span></p>
|
|
<span class="checked-point" :style="{background:item.origin=='school'?'#10abe7':'#12b9ab'}" v-for="item in checkedPointList">{{item.name}}<Icon type="md-close" color="#fff" style="margin-left:5px;cursor:pointer" @click="deleteCheckedPoint(item)" /></span>
|
|
<span class="checked-point" :style="{background:item.origin=='school'?'#10abe7':'#12b9ab'}" v-for="item in checkedPointList">{{item.name}}<Icon type="md-close" color="#fff" style="margin-left:5px;cursor:pointer" @click="deleteCheckedPoint(item)" /></span>
|
|
</div>
|
|
</div>
|
|
</Modal>
|
|
</Modal>
|
|
|
|
+ <!-- 绑定知识点弹窗结束 -->
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
@@ -330,6 +360,8 @@ import { setTimeout } from 'core-js';
|
|
|
|
|
|
//编辑习题
|
|
//编辑习题
|
|
handleEdit(item) {
|
|
handleEdit(item) {
|
|
|
|
+ item.options = item.option;
|
|
|
|
+ item.difficulty = item.difficulty || 2;
|
|
this.$router.push({
|
|
this.$router.push({
|
|
name: 'createExercises',
|
|
name: 'createExercises',
|
|
params:{
|
|
params:{
|
|
@@ -385,10 +417,11 @@ import { setTimeout } from 'core-js';
|
|
},
|
|
},
|
|
|
|
|
|
//绑定知识点操作
|
|
//绑定知识点操作
|
|
- handleBindPoint() {
|
|
|
|
|
|
+ handleBindPoint(concepts) {
|
|
this.bindPointModal = true;
|
|
this.bindPointModal = true;
|
|
- this.checkedPointList = [];
|
|
|
|
|
|
+ this.checkedPointList = concepts;
|
|
this.knowPointList = this.schoolPointList;
|
|
this.knowPointList = this.schoolPointList;
|
|
|
|
+ console.log(concepts);
|
|
},
|
|
},
|
|
|
|
|
|
//获取标准知识块数据
|
|
//获取标准知识块数据
|
|
@@ -406,19 +439,6 @@ import { setTimeout } from 'core-js';
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
|
|
- //获取标准知识点仓库数据
|
|
|
|
- getAllPoints() {
|
|
|
|
- let data = {
|
|
|
|
- pointParams: {
|
|
|
|
- SubjectCode: "Subject_Chinese",
|
|
|
|
- PartitionKey: "zh-CN",
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- this.$api.FindKnowledgePointByDict(data).then(res => {
|
|
|
|
- this.pointListLoading = false;
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
//获取学校知识块仓库数据
|
|
//获取学校知识块仓库数据
|
|
getSchoolPoints() {
|
|
getSchoolPoints() {
|
|
let data = {
|
|
let data = {
|
|
@@ -445,16 +465,16 @@ import { setTimeout } from 'core-js';
|
|
},
|
|
},
|
|
|
|
|
|
//知识点绑定选中事件
|
|
//知识点绑定选中事件
|
|
- pointTreeCheck(val, data) {
|
|
|
|
- let points = val.filter(item => item.children.length == 0);
|
|
|
|
- if (points.length > 5) {
|
|
|
|
- this.checkedPointList = points.slice(0, 5);
|
|
|
|
- this.$Message.warning("最多绑定5个知识点!");
|
|
|
|
- } else {
|
|
|
|
- this.checkedPointList = points;
|
|
|
|
- }
|
|
|
|
- console.log(val, data);
|
|
|
|
- },
|
|
|
|
|
|
+ //pointTreeCheck(val, data) {
|
|
|
|
+ // let points = val.filter(item => item.children.length == 0);
|
|
|
|
+ // if (points.length > 5) {
|
|
|
|
+ // this.checkedPointList = points.slice(0, 5);
|
|
|
|
+ // this.$Message.warning("最多绑定5个知识点!");
|
|
|
|
+ // } else {
|
|
|
|
+ // this.checkedPointList = points;
|
|
|
|
+ // }
|
|
|
|
+ // console.log(val, data);
|
|
|
|
+ //},
|
|
|
|
|
|
//知识点树形结构渲染
|
|
//知识点树形结构渲染
|
|
renderContent(h, { root, node, data }) {
|
|
renderContent(h, { root, node, data }) {
|
|
@@ -485,7 +505,7 @@ import { setTimeout } from 'core-js';
|
|
h("span", data.name),
|
|
h("span", data.name),
|
|
h('span',{
|
|
h('span',{
|
|
domProps: {
|
|
domProps: {
|
|
- className: this.checkedPointList.indexOf(data) > -1 ? "point-checkbox point-checked" : "point-checkbox point-unchecked"
|
|
|
|
|
|
+ className: this.checkedPointList.map(item => item.knowledgeId).indexOf(data.knowledgeId || data.rowKey) > -1 ? "point-checkbox point-checked" : "point-checkbox point-unchecked"
|
|
},
|
|
},
|
|
style: {
|
|
style: {
|
|
display: data.children && data.children.length > 0
|
|
display: data.children && data.children.length > 0
|
|
@@ -494,15 +514,19 @@ import { setTimeout } from 'core-js';
|
|
},
|
|
},
|
|
on: {
|
|
on: {
|
|
click: () => {
|
|
click: () => {
|
|
- if (this.checkedPointList.indexOf(data) == -1) {
|
|
|
|
|
|
+ let conceptData = {};
|
|
|
|
+ if (this.checkedPointList.map(item => item.knowledgeId).indexOf(data.knowledgeId || data.rowKey) == -1) {
|
|
if (this.checkedPointList.length < 5) {
|
|
if (this.checkedPointList.length < 5) {
|
|
- data.origin = this.tabSelectVal;
|
|
|
|
- this.checkedPointList.push(data);
|
|
|
|
|
|
+ conceptData.origin = this.tabSelectVal;
|
|
|
|
+ conceptData.knowledgeId = data.knowledgeId || data.rowKey;
|
|
|
|
+ conceptData.name = data.name;
|
|
|
|
+ conceptData.subjectCode = data.subjectCode;
|
|
|
|
+ this.checkedPointList.push(conceptData);
|
|
} else {
|
|
} else {
|
|
this.$Message.warning("最多绑定5个知识点!");
|
|
this.$Message.warning("最多绑定5个知识点!");
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- this.checkedPointList.splice(this.checkedPointList.indexOf(data), 1);
|
|
|
|
|
|
+ this.checkedPointList.splice(this.checkedPointList.map(item => item.knowledgeId).indexOf(data.knowledgeId || data.rowKey), 1);
|
|
}
|
|
}
|
|
|
|
|
|
console.log(this.checkedPointList);
|
|
console.log(this.checkedPointList);
|
|
@@ -566,7 +590,7 @@ import { setTimeout } from 'core-js';
|
|
mounted() {
|
|
mounted() {
|
|
this.getStandardList();
|
|
this.getStandardList();
|
|
this.getSchoolPoints();
|
|
this.getSchoolPoints();
|
|
- this.getAllPoints();
|
|
|
|
|
|
+ //this.getAllPoints();
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
headers(){
|
|
headers(){
|