yujialong 4 years ago
parent 4e9b321312
commit cf9e15f4a3
  1. 8
      src/api/index.js
  2. BIN
      src/assets/img/index/achievement.png
  3. BIN
      src/assets/img/index/assesment.png
  4. BIN
      src/assets/img/index/bg.png
  5. BIN
      src/assets/img/index/bg1.png
  6. BIN
      src/assets/img/index/bg2.png
  7. BIN
      src/assets/img/index/bg3.png
  8. BIN
      src/assets/img/index/bg4.png
  9. BIN
      src/assets/img/index/bg5.png
  10. BIN
      src/assets/img/index/book.png
  11. BIN
      src/assets/img/index/chengji拷贝.png
  12. BIN
      src/assets/img/index/class.png
  13. BIN
      src/assets/img/index/datiqia拷贝.png
  14. BIN
      src/assets/img/index/del.png
  15. BIN
      src/assets/img/index/edit.png
  16. BIN
      src/assets/img/index/guanliyuan_guanliyuanliebiao拷贝2.png
  17. BIN
      src/assets/img/index/msg.png
  18. BIN
      src/assets/img/index/pen.png
  19. BIN
      src/assets/img/index/pingjiakaohe拷贝.png
  20. BIN
      src/assets/img/index/plan.png
  21. BIN
      src/assets/img/index/practice.png
  22. BIN
      src/assets/img/index/show.png
  23. BIN
      src/assets/img/index/system.png
  24. BIN
      src/assets/img/index/testPaper-icon.png
  25. BIN
      src/assets/img/index/testPaper.png
  26. BIN
      src/assets/img/index/tiku.png
  27. BIN
      src/assets/img/index/xiaoxi.png
  28. BIN
      src/assets/img/index/zuopin.png
  29. BIN
      src/assets/img/index/日期.png
  30. 19
      src/components/doReview/index.vue
  31. 12
      src/components/quill/index.vue
  32. 10
      src/components/testPaperDetail/index.vue
  33. 7
      src/layouts/navbar/index.vue
  34. 9
      src/libs/util.js
  35. 186
      src/pages/achievement/list/examResults.vue
  36. 2
      src/pages/achievement/list/index.vue
  37. 170
      src/pages/achievement/list/practiceResults.vue
  38. 305
      src/pages/achievement/list/wrongBook.vue
  39. 60
      src/pages/assessment/list/index.vue
  40. 13
      src/pages/assessment/review/index.vue
  41. 12
      src/pages/assessment/scoreQuery/index.vue
  42. 426
      src/pages/index/list/index.vue
  43. 97
      src/pages/messageBoard/list/index.vue
  44. 42
      src/pages/practice/doReview/index.vue
  45. 23
      src/pages/practice/list/index.vue
  46. 6
      src/pages/practice/result/index.vue
  47. 13
      src/pages/practice/review/index.vue
  48. 12
      src/pages/practice/scoreQuery/index.vue
  49. 63
      src/pages/quesBank/list/globalQuesBank.vue
  50. 54
      src/pages/quesBank/list/myQuesBank.vue
  51. 4
      src/pages/quesBank/list/quesDialog.vue
  52. 21
      src/pages/student/list/index.vue
  53. 19
      src/pages/system/list/role.vue
  54. 120
      src/pages/testPaper/add/index.vue
  55. 59
      src/pages/testPaper/list/allTestPaper.vue
  56. 61
      src/pages/testPaper/list/myTestPaper.vue
  57. 13
      src/pages/testPaper/review/index.vue
  58. 2
      src/plugins/requests/index.js
  59. 23
      src/router/modules/index.js
  60. 6
      src/router/modules/student.js
  61. 14
      src/router/permission.js
  62. 2
      src/router/routes.js
  63. 30
      src/styles/common.scss
  64. 85
      src/styles/pages/messageBoard.scss
  65. 4
      src/styles/pages/tree.scss

@ -180,6 +180,7 @@ export default {
reviewListByStudent:`/management/practise/review/reviewListByStudent`, reviewListByStudent:`/management/practise/review/reviewListByStudent`,
reviewDetail:`/management/practise/review/reviewDetail`, reviewDetail:`/management/practise/review/reviewDetail`,
reviewByidPractice:`/management/practise/review/reviewByid`, reviewByidPractice:`/management/practise/review/reviewByid`,
getWrongPractice:`/management/practise/review/getWrong`,
// 练习成绩管理 // 练习成绩管理
AchievementDetail:`/management/practise/review/AchievementDetail`, AchievementDetail:`/management/practise/review/AchievementDetail`,
@ -190,5 +191,12 @@ export default {
byClassIdGetPractise:`/management/practise/review/byClassIdGetPractise`, byClassIdGetPractise:`/management/practise/review/byClassIdGetPractise`,
// 错题管理 // 错题管理
getPeopleInfo:`/management/wrongTopic/getPeopleInfo`,
pageByNameWrong:`/management/wrongTopic/pageByName`, pageByNameWrong:`/management/wrongTopic/pageByName`,
// 首页
waitReply:`/management/index/waitReply`,
waitReview:`/management/index/waitReview`,
waitExam:`/management/index/waitExam`,
waitReplyDel:`/management/index/waitReplyDel`,
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

@ -47,10 +47,16 @@
<span class="key">答案解析</span> <span class="key">答案解析</span>
<span class="val">{{item.answer_analysis}}</span> <span class="val">{{item.answer_analysis}}</span>
</div> </div>
<div class="meta"> <div class="flex a-center point">
<span class="key">考试得分</span> <div class="meta">
<div class="val"> <span class="key">题目分数</span>
<input type="text" v-model.number="item.question_score" :disabled="!isReview || !item.isSub"> <div class="val">{{item.question_points}} </div>
</div>
<div class="meta">
<span class="key">考试得分</span>
<div class="val">
<input type="text" v-model.number="item.question_score" :disabled="!isReview || !item.isSub">
</div>
</div> </div>
</div> </div>
</div> </div>
@ -270,6 +276,11 @@ export default {
} }
} }
} }
.point{
.meta{
margin: 0;
}
}
} }
} }
</style> </style>

@ -26,6 +26,10 @@
type: Boolean, type: Boolean,
default: false default: false
}, },
toTop: {
type: Boolean,
default: true
},
border: { border: {
type: Boolean, type: Boolean,
default: false default: false
@ -112,9 +116,11 @@
this.Quill = new Quill(editor, this.options); this.Quill = new Quill(editor, this.options);
// //
this.Quill.pasteHTML(this.currentValue); this.Quill.pasteHTML(this.currentValue);
this.$nextTick(() => { if(this.toTop){
window.scrollTo(0,0) this.$nextTick(() => {
}) window.scrollTo(0,0)
})
}
// //
this.Quill.on('text-change', (delta, oldDelta, source) => { this.Quill.on('text-change', (delta, oldDelta, source) => {
const html = this.$refs.editor.children[0].innerHTML; const html = this.$refs.editor.children[0].innerHTML;

@ -120,11 +120,9 @@ export default {
}, },
initMedia(item){ initMedia(item){
if(item.videoAudio && !item.player){ if(item.videoAudio && !item.player){
// let fileId = '312d8a6efd1747ae9de519da574195db'
this.$get(`${this.api.getPlayAuth}/${item.videoAudio}`).then(res => { this.$get(`${this.api.getPlayAuth}/${item.videoAudio}`).then(res => {
let playAuth = res.data.playAuth let playAuth = res.data.playAuth
this.$nextTick(() => { this.$nextTick(() => {
console.log('初始化开始',item.mediaEleId)
item.player = new Aliplayer({ item.player = new Aliplayer({
id: item.mediaEleId, id: item.mediaEleId,
width: '100%', width: '100%',
@ -133,7 +131,6 @@ export default {
playauth : playAuth, playauth : playAuth,
encryptType:1, // encryptType:1, //
}) })
console.log('初始化结束')
}) })
}).catch(res => {}) }).catch(res => {})
} }
@ -162,14 +159,20 @@ export default {
}, },
insertScript(){ insertScript(){
const linkTag = document.createElement('link') const linkTag = document.createElement('link')
linkTag.id = 'aliplayerLink'
linkTag.rel = 'stylesheet' linkTag.rel = 'stylesheet'
linkTag.href = 'https://g.alicdn.com/de/prismplayer/2.8.2/skins/default/aliplayer-min.css' linkTag.href = 'https://g.alicdn.com/de/prismplayer/2.8.2/skins/default/aliplayer-min.css'
document.body.appendChild(linkTag) document.body.appendChild(linkTag)
const scriptTag = document.createElement('script') const scriptTag = document.createElement('script')
scriptTag.id = 'aliplayerScript'
scriptTag.type = 'text/javascript' scriptTag.type = 'text/javascript'
scriptTag.src = 'https://g.alicdn.com/de/prismplayer/2.8.2/aliplayer-min.js' scriptTag.src = 'https://g.alicdn.com/de/prismplayer/2.8.2/aliplayer-min.js'
document.body.appendChild(scriptTag) document.body.appendChild(scriptTag)
this.$once('hook:beforeDestroy', function () {
document.body.removeChild(document.querySelector('#aliplayerLink'))
document.body.removeChild(document.querySelector('#aliplayerScript'))
})
}, },
}, },
}; };
@ -238,6 +241,7 @@ export default {
font-size: 14px; font-size: 14px;
} }
.val{ .val{
line-height: 1.6;
color: #757575; color: #757575;
font-size: 14px; font-size: 14px;
} }

@ -60,8 +60,13 @@ export default {
collapse: false, collapse: false,
defaultMenus: [ defaultMenus: [
{ {
icon: 'el-icon-user', icon: 'el-icon-folder-checked',
index: '/index/list', index: '/index/list',
title: '首页'
},
{
icon: 'el-icon-user',
index: '/student/list',
title: '学生管理' title: '学生管理'
}, },
{ {

@ -72,7 +72,14 @@ const util = {
isImg(ext) { isImg(ext) {
if('jpg,jpeg,png,gif,svg,psd'.includes(ext)) return true if('jpg,jpeg,png,gif,svg,psd'.includes(ext)) return true
return false return false
} },
// 循环去除html标签
removeHtmlTag(list,attr) {
list.map(n => {
n[attr] = n[attr].replace(/<\/?.+?>/gi,'')
})
return list
},
} }
export default util export default util

@ -1,104 +1,92 @@
<template> <template>
<div> <div>
<el-row :gutter="20"> <el-card shadow="hover" class="m-b-20">
<el-col :span="24"> <div class="p-title m-b-20">筛选</div>
<el-card shadow="hover" class="m-b-20"> <div class="flex j-between">
<div class="flex a-center m-b-20"> <el-form label-width="80px" inline>
<p class="hr_tag"></p> <el-form-item class="no-mb" label="教学班级">
<span>筛选</span> <el-select v-model="classId" clearable placeholder="请选择教学班级" @change="getAssess">
</div> <el-option v-for="(item,index) in classList" :key="index" :label="item.className" :value="item.classId"></el-option>
<div class="flex j-between"> </el-select>
<el-form label-width="80px" inline> </el-form-item>
<el-form-item class="no-mb" label="教学班级"> <el-form-item class="no-mb" label="考试名称">
<el-select v-model="classId" clearable placeholder="请选择教学班级" @change="getAssess"> <el-select v-model="assessmentName" clearable placeholder="请选择考试名称" @change="getData">
<el-option v-for="(item,index) in classList" :key="index" :label="item.className" :value="item.classId"></el-option> <el-option v-for="(item,index) in assessmentNameList" :key="index" :label="item.assessmentName" :value="item.assessmentName"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item class="no-mb" label="考试名称"> </el-form>
<el-select v-model="assessmentName" clearable placeholder="请选择考试名称" @change="getData"> <div>
<el-option v-for="(item,index) in assessmentNameList" :key="index" :label="item.assessmentName" :value="item.assessmentName"></el-option> <el-input
</el-select> placeholder="请输入学生姓名或学号"
</el-form-item> prefix-icon="el-icon-search"
</el-form> v-model="keyword"
<div> clearable
<el-input ></el-input>
placeholder="请输入学生姓名或学号" </div>
prefix-icon="el-icon-search" </div>
v-model="keyword" </el-card>
clearable
></el-input>
</div>
</div>
</el-card>
</el-col>
<el-col :span="24"> <el-card shadow="hover" class="m-b-20">
<el-card shadow="hover" class="m-b-20"> <div class="flex j-between m-b-20">
<div class="flex j-between m-b-20"> <div class="p-title">考试成绩</div>
<div class="flex a-center"> <div>
<p class="hr_tag"></p> <el-button
<span>考试成绩</span> type="primary"
</div> size="small"
<div> round
<el-button @click="toStat"
type="primary" >成绩统计</el-button>
size="small" <el-button
round type="primary"
@click="toStat" size="small"
>成绩统计</el-button> round
<el-button @click="exportData"
type="primary" >导出</el-button>
size="small" </div>
round </div>
@click="exportData"
>导出</el-button>
</div>
</div>
<el-table <el-table
:data="listData" :data="listData"
ref="table" ref="table"
row-key="id" row-key="id"
class="table" class="table"
stripe stripe
header-align="center" header-align="center"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
<el-table-column <el-table-column
type="selection" type="selection"
width="55" width="55"
align="center" align="center"
:reserve-selection="true" :reserve-selection="true"
></el-table-column> ></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center"> <el-table-column type="index" width="100" label="序号" align="center">
<template <template
slot-scope="scope" slot-scope="scope"
>{{scope.$index + (page - 1) * pageSize + 1}}</template> >{{scope.$index + (page - 1) * pageSize + 1}}</template>
</el-table-column> </el-table-column>
<el-table-column prop="stuName" label="真实姓名" align="center"></el-table-column> <el-table-column prop="stuName" label="真实姓名" align="center"></el-table-column>
<el-table-column prop="stuNo" label="学号" align="center"></el-table-column> <el-table-column prop="stuNo" label="学号" align="center"></el-table-column>
<el-table-column prop="thisScore" label="得分" align="center"></el-table-column> <el-table-column prop="thisScore" label="得分" align="center"></el-table-column>
<el-table-column prop="timeSpent" label="用时(分钟)" align="center"></el-table-column> <el-table-column prop="timeSpent" label="用时(分钟)" align="center"></el-table-column>
<el-table-column prop="totalDuration" label="考试时间" align="center"></el-table-column> <el-table-column prop="totalDuration" label="考试时间" align="center"></el-table-column>
<el-table-column label="操作" align="center"> <el-table-column label="操作" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="show(scope.row)">查看详情</el-button> <el-button type="text" @click="show(scope.row)">查看详情</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
<el-pagination <el-pagination
background background
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
:current-page="page" :current-page="page"
:page-size="pageSize" :page-size="pageSize"
layout="total,prev, pager, next" layout="total,prev, pager, next"
:total="total" :total="total"
></el-pagination> ></el-pagination>
</div> </div>
</el-card> </el-card>
</el-col>
</el-row>
</div> </div>
</template> </template>
<script> <script>
@ -146,7 +134,7 @@ export default {
pageSize: this.pageSize, pageSize: this.pageSize,
keyword: this.keyword, keyword: this.keyword,
assessmentId: this.assessmentId, assessmentId: this.assessmentId,
classId: this.classId classId: Number(this.classId)
}) })
.then(res => { .then(res => {
this.listData = res.data.list.list this.listData = res.data.list.list
@ -191,7 +179,7 @@ export default {
show(row){ show(row){
this.setAssDetailInfo({ this.setAssDetailInfo({
id: row.paperId, id: row.paperId,
assessmentId: row.id, assessmentId: row.assessmentId,
stuId: row.stuId stuId: row.stuId
}) })
this.$router.push('detail') this.$router.push('detail')

@ -20,7 +20,7 @@ export default {
tabs: { tabs: {
practice: '练习成绩', practice: '练习成绩',
exam: '考试成绩', exam: '考试成绩',
wrong: '错题管理' wrong: '错题收藏'
} }
}; };
}, },

@ -1,98 +1,86 @@
<template> <template>
<div> <div>
<el-row :gutter="20"> <el-card shadow="hover" class="m-b-20">
<el-col :span="24"> <div class="p-title m-b-20">筛选</div>
<el-card shadow="hover" class="m-b-20"> <div class="flex j-between">
<div class="flex a-center m-b-20"> <el-form label-width="80px" inline>
<p class="hr_tag"></p> <el-form-item class="no-mb" label="教学班级">
<span>筛选</span> <el-select v-model="classId" clearable placeholder="请选择教学班级" @change="getPrac">
</div> <el-option v-for="(item,index) in classList" :key="index" :label="item.className" :value="item.classId"></el-option>
<div class="flex j-between"> </el-select>
<el-form label-width="80px" inline> </el-form-item>
<el-form-item class="no-mb" label="教学班级"> <el-form-item class="no-mb" label="练习名称">
<el-select v-model="classId" clearable placeholder="请选择教学班级" @change="getPrac"> <el-select v-model="practiseId" clearable placeholder="请选择练习名称" @change="getData">
<el-option v-for="(item,index) in classList" :key="index" :label="item.className" :value="item.classId"></el-option> <el-option v-for="(item,index) in practiceNameList" :key="index" :label="item.practiseName" :value="item.practiseId"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item class="no-mb" label="练习名称"> </el-form>
<el-select v-model="practiseId" clearable placeholder="请选择练习名称" @change="getData"> <div>
<el-option v-for="(item,index) in practiceNameList" :key="index" :label="item.practiseName" :value="item.practiseId"></el-option> <el-input
</el-select> placeholder="请输入学生姓名或学号"
</el-form-item> prefix-icon="el-icon-search"
</el-form> v-model="keyword"
<div> clearable
<el-input ></el-input>
placeholder="请输入学生姓名或学号" </div>
prefix-icon="el-icon-search" </div>
v-model="keyword" </el-card>
clearable
></el-input>
</div>
</div>
</el-card>
</el-col>
<el-col :span="24"> <el-card shadow="hover" class="m-b-20">
<el-card shadow="hover" class="m-b-20"> <div class="flex j-between m-b-20">
<div class="flex j-between m-b-20"> <div class="p-title">练习成绩</div>
<div class="flex a-center"> <div>
<p class="hr_tag"></p> <el-button
<span>考试成绩</span> type="primary"
</div> size="small"
<div> round
<el-button @click="exportData"
type="primary" >导出</el-button>
size="small" </div>
round </div>
@click="exportData"
>导出</el-button>
</div>
</div>
<el-table <el-table
:data="listData" :data="listData"
ref="table" ref="table"
row-key="id" row-key="id"
class="table" class="table"
stripe stripe
header-align="center" header-align="center"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
<el-table-column <el-table-column
type="selection" type="selection"
width="55" width="55"
align="center" align="center"
:reserve-selection="true" :reserve-selection="true"
></el-table-column> ></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center"> <el-table-column type="index" width="100" label="序号" align="center">
<template <template
slot-scope="scope" slot-scope="scope"
>{{scope.$index + (page - 1) * pageSize + 1}}</template> >{{scope.$index + (page - 1) * pageSize + 1}}</template>
</el-table-column> </el-table-column>
<el-table-column prop="userName" label="真实姓名" align="center"></el-table-column> <el-table-column prop="userName" label="真实姓名" align="center"></el-table-column>
<el-table-column prop="workNumber" label="学号" align="center"></el-table-column> <el-table-column prop="workNumber" label="学号" align="center"></el-table-column>
<el-table-column prop="max" label="最高分" align="center"></el-table-column> <el-table-column prop="max" label="最高分" align="center"></el-table-column>
<el-table-column prop="min" label="最低分" align="center"></el-table-column> <el-table-column prop="min" label="最低分" align="center"></el-table-column>
<el-table-column prop="avg" label="平均分" align="center"></el-table-column> <el-table-column prop="avg" label="平均分" align="center"></el-table-column>
<el-table-column label="操作" align="center"> <el-table-column label="操作" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="showDetail(scope.row)">查看详情</el-button> <el-button type="text" @click="showDetail(scope.row)">查看详情</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
<el-pagination <el-pagination
background background
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
:current-page="page" :current-page="page"
:page-size="pageSize" :page-size="pageSize"
layout="total,prev, pager, next" layout="total,prev, pager, next"
:total="total" :total="total"
></el-pagination> ></el-pagination>
</div> </div>
</el-card> </el-card>
</el-col>
</el-row>
<el-dialog title="练习成绩详情" :visible.sync="detailVisible" width="40%" :close-on-click-modal="false"> <el-dialog title="练习成绩详情" :visible.sync="detailVisible" width="40%" :close-on-click-modal="false">
<div class="flex flex-j-e"> <div class="flex flex-j-e">

@ -1,134 +1,114 @@
<template> <template>
<div> <div>
<el-row :gutter="20"> <el-card shadow="hover" class="m-b-20">
<el-col :span="24"> <div class="p-title m-b-20">筛选</div>
<el-card shadow="hover" class="m-b-20"> <div class="flex j-between">
<div class="flex a-center m-b-20"> <el-form label-width="80px" inline>
<p class="hr_tag"></p> <el-form-item class="no-mb" label="错题来源">
<span>筛选</span> <el-select v-model="type" clearable placeholder="请选择错题来源" @change="getName">
</div> <el-option v-for="(item,index) in typeList" :key="index" :label="item.name" :value="item.id"></el-option>
<div class="flex j-between"> </el-select>
<el-form label-width="80px" inline> </el-form-item>
<el-form-item class="no-mb" label="错题来源"> <el-form-item class="no-mb" label="练习名称" v-if="type == 2">
<el-select v-model="type" clearable placeholder="请选择错题来源" @change="getName"> <el-select v-model="name" clearable placeholder="请选择练习名称" @change="getData">
<el-option v-for="(item,index) in typeList" :key="index" :label="item.name" :value="item.id"></el-option> <el-option v-for="(item,index) in nameList" :key="index" :label="item.practiseName" :value="item.practiseId"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item class="no-mb" label="练习名称" v-if="type == 2"> <el-form-item class="no-mb" label="考核名称" v-else>
<el-select v-model="name" clearable placeholder="请选择练习名称" @change="getData"> <el-select v-model="name" clearable placeholder="请选择考核名称" @change="getData">
<el-option v-for="(item,index) in nameList" :key="index" :label="item.practiseName" :value="item.practiseId"></el-option> <el-option v-for="(item,index) in nameList" :key="index" :label="item.assessmentName" :value="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item class="no-mb" label="考核名称" v-else> </el-form>
<el-select v-model="name" clearable placeholder="请选择考核名称" @change="getData"> <div>
<el-option v-for="(item,index) in nameList" :key="index" :label="item.assessmentName" :value="item.id"></el-option> <el-input
</el-select> placeholder="请输入学生姓名或学号"
</el-form-item> prefix-icon="el-icon-search"
</el-form> v-model="keyword"
<div> clearable
<el-input ></el-input>
placeholder="请输入学生姓名或学号" </div>
prefix-icon="el-icon-search" </div>
v-model="keyword" </el-card>
clearable
></el-input>
</div>
</div>
</el-card>
</el-col>
<el-col :span="24">
<el-card shadow="hover" class="m-b-20">
<div class="flex j-between m-b-20">
<div class="flex a-center">
<p class="hr_tag"></p>
<span>错题管理</span>
</div>
</div>
<el-table
:data="listData"
ref="table"
row-key="id"
class="table"
stripe
header-align="center"
@selection-change="handleSelectionChange"
>
<el-table-column
type="selection"
width="55"
align="center"
:reserve-selection="true"
></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center">
<template
slot-scope="scope"
>{{scope.$index + (page - 1) * pageSize + 1}}</template>
</el-table-column>
<el-table-column label="错题来源" align="center">
<template>
{{type == 1 ? '考核试卷' : '练习试卷'}}
</template>
</el-table-column>
<el-table-column label="试卷名称" align="center">
<template slot-scope="scope">
</template> <el-card shadow="hover" class="m-b-20">
</el-table-column> <div class="p-title m-b-20">错题收藏</div>
<el-table-column prop="knowledgePoints" label="所需知识点" align="center"></el-table-column>
<el-table-column label="题干名称" align="center">
<template slot-scope="scope">
<div v-html="scope.row.questionStem"></div>
</template>
</el-table-column>
<el-table-column label="错题人数" align="center">
<template slot-scope="scope">
<el-button type="text" @click="showNum(scope.row)">{{scope.row.wrongNum}}</el-button>
</template>
</el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button type="text" @click="show(scope.row)">查看</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination
background
@current-change="handleCurrentChange"
:current-page="page"
:page-size="pageSize"
layout="total,prev, pager, next"
:total="total"
></el-pagination>
</div>
</el-card>
</el-col>
</el-row>
<el-dialog title="错题人数" :visible.sync="numVisible" width="50%">
<el-table <el-table
:data="numList" :data="listData"
ref="table" ref="table"
row-key="id" row-key="id"
class="table" class="table"
stripe stripe
header-align="center" header-align="center"
@selection-change="handleSelectionChange"
> >
<el-table-column
type="selection"
width="55"
align="center"
:reserve-selection="true"
></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center"> <el-table-column type="index" width="100" label="序号" align="center">
<template <template
slot-scope="scope" slot-scope="scope"
>{{scope.$index + (page - 1) * pageSize + 1}}</template> >{{scope.$index + (page - 1) * pageSize + 1}}</template>
</el-table-column> </el-table-column>
<el-table-column prop="paperName" label="姓名" align="center"></el-table-column> <el-table-column label="错题来源" align="center">
<el-table-column prop="examTime" label="学号" align="center"></el-table-column> <template>
<el-table-column prop="score" label="所属班级" align="center"></el-table-column> {{type == 1 ? '考核试卷' : '练习试卷'}}
<el-table-column prop="score" label="重做正确率" align="center"></el-table-column> </template>
<el-table-column prop="score" label="知识点掌握程度" align="center"></el-table-column> </el-table-column>
<el-table-column label="试卷名称" align="center">
<template slot-scope="scope">
{{paperName}}
</template>
</el-table-column>
<el-table-column prop="knowledgePoints" label="所需知识点" align="center"></el-table-column>
<el-table-column prop="questionStem" label="题干" align="center" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="错题人数" align="center">
<template slot-scope="scope">
<el-button type="text" @click="showNum(scope.row)">{{scope.row.wrongNum}}</el-button>
</template>
</el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button type="text" @click="show(scope.row,1)">查看</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination
background
@current-change="handleCurrentChange"
:current-page="page"
:page-size="pageSize"
layout="total,prev, pager, next"
:total="total"
></el-pagination>
</div>
</el-card>
<el-dialog title="错题人数" :visible.sync="numVisible" width="50%">
<el-table
:data="numList"
ref="table"
row-key="id"
class="table"
stripe
header-align="center"
>
<el-table-column type="index" width="100" label="序号" align="center">
<template slot-scope="scope">{{scope.$index + (page - 1) * pageSize + 1}}</template>
</el-table-column>
<el-table-column prop="userName" label="姓名" align="center"></el-table-column>
<el-table-column prop="workNumber" label="学号" align="center"></el-table-column>
<el-table-column prop="className" label="所属班级" align="center"></el-table-column>
<el-table-column prop="redo" label="重做正确率" align="center"></el-table-column>
<el-table-column prop="masterKnowledge" label="知识点掌握程度" align="center"></el-table-column>
<el-table-column label="操作" align="center"> <el-table-column label="操作" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="show(scope.row)">查看</el-button> <el-button type="text" @click="show(scope.row,0)">查看</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -145,34 +125,35 @@
</el-dialog> </el-dialog>
<el-dialog title="错题详情" :visible.sync="detailVisible" width="40%"> <el-dialog title="错题详情" :visible.sync="detailVisible" width="40%">
<!-- <div class="ques"> <div class="ques">
<div class="meta"> <div class="meta">
<p class="key">题干</p> <p class="key">题干</p>
<p class="val" v-html="item.questionStem"></p> <p class="val" v-html="quesInfo.questionStem"></p>
<div class="media" :id="item.mediaEleId"></div> <div class="media" :id="quesInfo.mediaEleId"></div>
</div> </div>
<div class="meta"> <div class="meta">
<p class="key">选项</p> <p class="key">选项</p>
<div class="val"> <div class="val">
<p v-for="(option,i) in item.options" :key="i">{{i}}.{{item.options[i]}}</p> <p v-for="(option,i) in quesInfo.options" :key="i">{{i}}.{{quesInfo.options[i]}}</p>
</div> </div>
</div> </div>
<div class="meta ans"> <div class="meta ans">
<div class="info"> <div class="info">
<p class="key">正确答案</p> <p class="key">正确答案</p>
<p class="val">{{item.answer}}</p> <p class="val">{{quesInfo.answer}}</p>
</div> </div>
</div> </div>
<div class="meta"> <div class="meta">
<p class="key">答案解析</p> <p class="key">答案解析</p>
<p class="val" v-html="item.answerAnalysis"></p> <p class="val" v-html="quesInfo.answerAnalysis"></p>
</div> </div>
</div> --> </div>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { mapState,mapActions } from 'vuex' import { mapState,mapActions } from 'vuex'
import util from '@/libs/util'
export default { export default {
data() { data() {
return { return {
@ -193,13 +174,16 @@ export default {
page: 1, page: 1,
pageSize: 10, pageSize: 10,
total: 0, total: 0,
paperName: '',
searchTimer: null, searchTimer: null,
numVisible: false, numVisible: false,
numList: [], numList: [],
pageNum: 0, pageNum: 1,
pageSizeNum: 10, pageSizeNum: 10,
totalNum: 0, totalNum: 0,
detailVisible: false detailVisible: false,
quesInfo: {},
curRow: {}
}; };
}, },
computed: { computed: {
@ -220,34 +204,48 @@ export default {
}, },
methods: { methods: {
getData() { getData() {
if(this.type == 1){
this.paperName = this.nameList.find(n => n.id == this.name).name
}else{
this.paperName = this.nameList.find(n => n.practiseId == this.name).name
}
this.$post(`${this.api.pageByNameWrong}?type=${this.type}&pageNum=${this.page}&pageSize=${this.pageSize}&practiseName=${this.keyword}&userId=${this.userId}&id=${this.name}`) this.$post(`${this.api.pageByNameWrong}?type=${this.type}&pageNum=${this.page}&pageSize=${this.pageSize}&practiseName=${this.keyword}&userId=${this.userId}&id=${this.name}`)
.then(res => { .then(res => {
this.listData = res.data.list.list this.listData = util.removeHtmlTag(res.data.list.list,'questionStem')
this.total = res.data.list.totalCount this.total = res.data.list.totalCount
}) }).catch(err => {})
.catch(err => {})
}, },
getName() { getName() {
if(this.type == 1){ if(this.type == 1){
this.$get(this.api.queryAssessment, { this.$get(this.api.queryAssessment, {
page: 1, pageNum: 1,
size: 1000, pageSize: 1000,
type: '', type: '',
state: '', state: '',
assessmentName: '', assessmentName: '',
userId: this.userId userId: this.userId
}) })
.then(res => { .then(res => {
this.nameList = res.data.Assessment this.nameList = res.data.Assessment.list
this.name = this.nameList[0].id if(this.nameList.length){
this.getData() this.name = this.nameList[0].id
this.getData()
}else{
this.name = ''
this.listData = []
}
}).catch(err => {}) }).catch(err => {})
}else{ }else{
this.$post(`${this.api.pageByName}?pageNum=1&pageSize=1000&practiseName=&userId=${this.userId}`) this.$post(`${this.api.pageByName}?pageNum=1&pageSize=1000&practiseName=&userId=${this.userId}`)
.then(res => { .then(res => {
this.nameList = res.data.list.list this.nameList = res.data.list.list
this.name = this.nameList[0].practiseId if(this.nameList.length){
this.getData() this.name = this.nameList[0].practiseId
this.getData()
}else{
this.name = ''
this.listData = []
}
}).catch(err => {}) }).catch(err => {})
} }
}, },
@ -255,13 +253,14 @@ export default {
this.page = val this.page = val
this.getData() this.getData()
}, },
getNum() { showNum(row) {
this.$post(`${this.api.pageByNameWrong}?type=${this.type}&pageNum=${this.page}&pageSize=${this.pageSize}&practiseName=${this.keyword}&userId=${this.userId}&id=${this.name}`) this.curRow = row
this.numVisible = true
this.$post(`${this.api.getPeopleInfo}?type=${this.type}&pageNum=${this.pageNum}&pageSize=${this.pageSizeNum}&questionId=${row.id}&id=${this.name}`)
.then(res => { .then(res => {
this.numData = res.data.list.list this.numList = res.data.list.list
this.totalNum = res.data.list.totalCount this.totalNum = res.data.list.totalCount
}) }).catch(err => {})
.catch(err => {})
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val this.multipleSelection = val
@ -270,21 +269,24 @@ export default {
this.pageNum = val this.pageNum = val
this.getData() this.getData()
}, },
showNum(row){ show(row,type) {
this.numVisible = true
this.getNum()
},
getDetail() {
this.$post(`${this.api.pageByNameWrong}?type=${this.type}&pageNum=${this.page}&pageSize=${this.pageSize}&practiseName=${this.keyword}&userId=${this.userId}&id=${this.name}`)
.then(res => {
this.numData = res.data.list.list
this.totalNum = res.data.list.totalCount
})
.catch(err => {})
},
show(row){
this.detailVisible = true this.detailVisible = true
this.getDetail() let qid = type ? row.id : this.curRow.id
this.$post(`${this.api.previewPaper}?qid=${qid}`)
.then(res => {
let info = {}
for(let i in res.data){
if(res.data[i].length) info = res.data[i][0]
}
let options = {}
for(let i in info){
if(i.includes('option') && info[i]){
options[i.replace('option','')] = info[i]
}
}
info.options = options
this.quesInfo = info
}).catch(err => {})
}, },
} }
}; };
@ -301,6 +303,7 @@ export default {
font-size: 14px; font-size: 14px;
} }
.val{ .val{
line-height: 1.6;
color: #757575; color: #757575;
font-size: 14px; font-size: 14px;
} }

@ -2,31 +2,26 @@
<div> <div>
<el-card shadow="hover" class="m-b-20"> <el-card shadow="hover" class="m-b-20">
<div> <div>
<div class="flex a-center m-b-20"> <div class="p-title m-b-20">筛选</div>
<p class="hr_tag"></p> <div class="flex j-between no-mb">
<span>筛选</span> <div>
</div> <el-form label-width="80px" inline>
<div> <el-form-item label="考试类型" class="no-mb">
<div class="flex j-between no-mb"> <el-select v-model="type" clearable placeholder="请选择考试类型" @change="getData">
<div> <el-option label="不限" value=""></el-option>
<el-form label-width="80px" inline> <el-option v-for="(item,index) in typeList" :key="index" :label="item.name" :value="item.id"></el-option>
<el-form-item label="考试类型" class="no-mb"> </el-select>
<el-select v-model="type" clearable placeholder="请选择考试类型" @change="getData"> </el-form-item>
<el-option label="不限" value=""></el-option> <el-form-item label="考试状态" class="no-mb">
<el-option v-for="(item,index) in typeList" :key="index" :label="item.name" :value="item.id"></el-option> <el-select v-model="state" clearable placeholder="请选择考试状态" @change="getData">
</el-select> <el-option label="不限" value=""></el-option>
</el-form-item> <el-option v-for="(item,index) in stateList" :key="index" :label="item.name" :value="item.id"></el-option>
<el-form-item label="考试状态" class="no-mb"> </el-select>
<el-select v-model="state" clearable placeholder="请选择考试状态" @change="getData"> </el-form-item>
<el-option label="不限" value=""></el-option> </el-form>
<el-option v-for="(item,index) in stateList" :key="index" :label="item.name" :value="item.id"></el-option> </div>
</el-select> <div>
</el-form-item> <el-input placeholder="请输入考核名称" prefix-icon="el-icon-search" v-model="keyword" clearable></el-input>
</el-form>
</div>
<div>
<el-input placeholder="请输入考核名称" prefix-icon="el-icon-search" v-model="keyword" clearable></el-input>
</div>
</div> </div>
</div> </div>
</div> </div>
@ -34,10 +29,7 @@
<el-card shadow="hover"> <el-card shadow="hover">
<div class="flex j-between m-b-20"> <div class="flex j-between m-b-20">
<div class="flex a-center"> <div class="p-title">考核列表</div>
<p class="hr_tag"></p>
<span>考核列表</span>
</div>
<div> <div>
<el-button type="primary" size="small" round @click="addAss" v-auth>创建考核</el-button> <el-button type="primary" size="small" round @click="addAss" v-auth>创建考核</el-button>
</div> </div>
@ -219,7 +211,7 @@
</span> </span>
</el-dialog> </el-dialog>
<el-dialog title="试卷详情" :visible.sync="previewVisible" width="40%" fullscreen> <el-dialog title="试卷详情" :visible.sync="previewVisible" width="90%">
<test-paper-detail :key="previewId"></test-paper-detail> <test-paper-detail :key="previewId"></test-paper-detail>
</el-dialog> </el-dialog>
</div> </div>
@ -341,16 +333,16 @@ export default {
]), ]),
getData() { getData() {
this.$get(this.api.queryAssessment, { this.$get(this.api.queryAssessment, {
page: this.page, pageNum: this.page,
size: this.pageSize, pageSize: this.pageSize,
type: this.type, type: this.type,
state: this.state, state: this.state,
assessmentName: this.keyword, assessmentName: this.keyword,
userId: this.userId userId: this.userId
}) })
.then(res => { .then(res => {
this.listData = res.data.Assessment this.listData = res.data.Assessment.list
this.total = res.data.total this.total = res.data.Assessment.totalCount
}) })
.catch(err => { .catch(err => {
clearInterval(this.timer) clearInterval(this.timer)

@ -1,10 +1,8 @@
<template> <template>
<div> <div>
<el-card shadow="hover" class="m-b-20"> <el-card shadow="hover" class="m-b-20">
<div class="flex a-center m-b-20"> <div class="p-title m-b-20">筛选</div>
<p class="hr_tag"></p>
<span>筛选</span>
</div>
<div class="flex j-between"> <div class="flex j-between">
<el-form label-width="80px" inline> <el-form label-width="80px" inline>
<el-form-item class="no-mb" label="批阅状态"> <el-form-item class="no-mb" label="批阅状态">
@ -27,12 +25,7 @@
</el-card> </el-card>
<el-card shadow="hover" class="m-b-20"> <el-card shadow="hover" class="m-b-20">
<div class="flex j-between m-b-20"> <div class="p-title m-b-20">考试批阅</div>
<div class="flex a-center">
<p class="hr_tag"></p>
<span>考试批阅</span>
</div>
</div>
<el-table <el-table
:data="listData" :data="listData"

@ -3,10 +3,8 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="24"> <el-col :span="24">
<el-card shadow="hover" class="m-b-20"> <el-card shadow="hover" class="m-b-20">
<div class="flex a-center m-b-20"> <div class="p-title m-b-20">筛选</div>
<p class="hr_tag"></p>
<span>筛选</span>
</div>
<div class="flex j-between"> <div class="flex j-between">
<el-form label-width="80px" inline> <el-form label-width="80px" inline>
<el-form-item class="no-mb" label="教学班级"> <el-form-item class="no-mb" label="教学班级">
@ -35,10 +33,8 @@
<el-col :span="24"> <el-col :span="24">
<el-card shadow="hover" class="m-b-20"> <el-card shadow="hover" class="m-b-20">
<div class="flex j-between m-b-20"> <div class="flex j-between m-b-20">
<div class="flex a-center"> <div class="p-title">考试成绩</div>
<p class="hr_tag"></p>
<span>考试成绩</span>
</div>
<div> <div>
<el-button <el-button
type="primary" type="primary"

@ -0,0 +1,426 @@
<template>
<div>
<el-card shadow="hover" class="m-b-10">
<div class="title m-b-20"><img src="../../../assets/img/index/plan.png" alt=""> 我的考试计划</div>
<div>
<el-date-picker v-model="date" align="right" unlink-panels type="daterange" start-placeholder="开始日期" end-placeholder="结束日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" clearable></el-date-picker>
</div>
</el-card>
<el-card shadow="hover" class="m-b-30">
<div class="text-center text-grey m-b-10">考试计划表</div>
<el-table
:data="listData"
ref="table"
row-key="id"
class="table"
stripe
header-align="center"
>
<el-table-column type="index" width="100" label="序号" align="center">
<template
slot-scope="scope"
>{{scope.$index + (page - 1) * pageSize + 1}}</template>
</el-table-column>
<el-table-column prop="assessmentName" label="考核名称" align="center"></el-table-column>
<el-table-column label="考核类型" align="center">
<template slot-scope="scope">
{{getTypeName(scope.row.type)}}
</template>
</el-table-column>
<el-table-column prop="duration" label="考核时长(分钟)" align="center"></el-table-column>
<el-table-column prop="createTime" label="创建时间" align="center"></el-table-column>
<el-table-column prop="name" label="考核状态" align="center">
<template slot-scope="scope">
{{getStateName(scope.row.state)}}
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination
background
@current-change="handleCurrentChange"
:current-page="page"
:page-size="pageSize"
layout="total,prev, pager, next"
:total="total"
></el-pagination>
</div>
</el-card>
<el-card shadow="hover" class="m-b-10">
<div class="title"><img src="../../../assets/img/index/testPaper.png" alt=""> 待批阅的试卷</div>
</el-card>
<el-card shadow="hover" class="m-b-30">
<ul class="review">
<li v-for="(item,index) in reviewList" :key="index">
<div class="btn flex j-end">
<button type="button" @click="review(item)"><img src="../../../assets/img/index/edit.png" alt=""> 批阅</button>
</div>
<p class="text">考试名称{{item.assessmentName}}</p>
<p class="text">{{item.startTime}} {{item.endTime}}</p>
<div class="member flex">
<p class="m-r-20">应试人数<span>{{item.shouldArrive}}</span></p>
<p>已考试人数<span>{{item.alreadyExam}}</span></p>
</div>
</li>
</ul>
<div class="pagination">
<el-pagination
background
@current-change="handleReviewCurrentChange"
:current-page="pageReview"
:page-size="pageSizeReview"
layout="total,prev, pager, next"
:total="totalReview"
></el-pagination>
</div>
</el-card>
<el-card shadow="hover" class="m-b-10">
<div class="title"><img src="../../../assets/img/index/class.png" alt=""> 学生管理</div>
</el-card>
<el-card shadow="hover" class="m-b-30">
<ul class="class">
<li v-for="(item,index) in classList" :key="index" :class="'index' + index">
<p class="name">{{item.className}}</p>
<p class="text">班级{{item.className}}</p>
<!-- <p class="text">人数30</p> -->
<!-- <p class="text">创建时间测试</p> -->
<div class="action flex j-end">
<button class="edit" @click="editClass(item)"></button>
<button class="del" @click="delClass(item)"></button>
</div>
</li>
</ul>
<div class="pagination">
<el-pagination
background
@current-change="handleClassCurrentChange"
:current-page="pageClass"
:page-size="pageSizeClass"
layout="total,prev, pager, next"
:total="totalClass"
></el-pagination>
</div>
</el-card>
<el-card shadow="hover" class="m-b-10">
<div class="title"><img src="../../../assets/img/index/msg.png" alt=""> 待回复提问</div>
</el-card>
<el-card shadow="hover">
<ul class="list">
<li v-for="(item,index) in msgList" :key="index">
<div class="item">
<div class="inner">
<img class="avatar" :src="item.userAvatars" alt="">
<div class="texts">
<div class="title">
<span class="username">{{item.userName}}</span>
<span class="publish">发表于</span>
<span class="date">{{item.createTime}}</span>
</div>
<div class="desc" v-html="item.content"></div>
</div>
</div>
<div class="action">
<button v-if="item.userId != userId" class="btn" @click="showReply(item)">回复</button>
<button v-else class="btn" @click="delMsg(item)">删除</button>
</div>
<div class="reply" v-if="item.showReply">
<quill :border="true" v-model="item.replyContent" :toTop="false" :height="150" />
<div class="m-t-10 text-right">
<el-button type="primary" size="mini" @click="submitComment(item)">提交</el-button>
</div>
</div>
</div>
</li>
</ul>
</el-card>
<el-dialog title="编辑班级" :visible.sync="classVisible" width="24%" center :close-on-click-modal="false">
<el-input placeholder="请输入班级名称" v-model="curClass.className"></el-input>
<span slot="footer" class="dialog-footer">
<el-button @click="classVisible = false">取消</el-button>
<el-button type="primary" @click="saveClass">确定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { mapState,mapGetters,mapActions } from 'vuex'
import quill from '@/components/quill'
import util from '@/libs/util'
export default {
data() {
return {
date: [util.formatDate('yyyy-MM-dd'),util.formatDate('yyyy-MM-dd')],
startTime: '',
endTime: '',
page: 1,
pageSize: 10,
total: 0,
listData: [],
pageReview: 1,
pageSizeReview: 5,
totalReview: 0,
reviewList: [],
pageClass: 1,
pageSizeClass: 5,
totalClass: 0,
classList: [],
classListAll: [],
msgList: [],
curClass: {},
classVisible: false,
};
},
computed: {
...mapState('user', [
'userId','clientId'
]),
...mapGetters('assessment', [
'getTypeName','getStateName'
])
},
watch: {
date: function(val){
if(val){
this.startTime = val[0]
this.endTime = val[1]
}else{
this.startTime = ''
this.endTime = ''
}
this.getData()
}
},
components: {
quill
},
mounted() {
this.getData()
this.getReview()
this.getClass()
this.getMsg()
},
methods: {
...mapActions('assessment', [
'setAssInfo'
]),
getData() {
this.$post(`${this.api.waitExam}?userId=${this.userId}&pageNum=${this.page}&pageSize=${this.pageSize}&startTime=${this.startTime}&endTime=${this.endTime}`)
.then(res => {
this.listData = this.handleList(res.data.list.list)
this.total = res.data.list.totalCount
}).catch(err => {})
},
handleCurrentChange(val) {
this.page = val
this.getData()
},
getReview() {
this.$post(`${this.api.waitReview}?userId=${this.userId}&pageNum=${this.pageReview}&pageSize=${this.pageSizeReview}&startTime=${this.startTime}&endTime=${this.endTime}`)
.then(res => {
this.reviewList = res.data.list.list
this.totalReview = res.data.list.totalCount
})
},
handleReviewCurrentChange(val) {
this.pageReview = val
this.getReview()
},
review(row){
this.setAssInfo({
id: row.id
})
this.$router.push('/assessment/review')
},
getClass() {
this.$post(`${this.api.getMineClass}?userId=${this.userId}`)
.then(res => {
this.classListAll = res.data.list
this.totalClass = res.data.list.length
this.handleClassPage()
}).catch(err => {})
},
handleClassPage(){
this.classList = this.classListAll.slice((this.pageClass - 1) * this.pageSizeClass,this.pageClass * this.pageSizeClass)
},
handleClassCurrentChange(val) {
this.pageClass = val
this.handleClassPage()
},
editClass(row){
this.classVisible = true
this.curClass = row
},
delClass(item){
this.$confirm('确定要删除吗?', '提示', {
type: 'warning'
}).then(() => {
this.$post(`${this.api.deleteClass}?classIds=${item.classId}`).then(res => {
this.$message.success('删除成功')
this.getClass()
}).catch(res => {})
}).catch(() => {})
},
saveClass(){
if(!this.curClass.className) return this.$message.warning('请输入班级名称')
if(isNaN(this.curClass.className)) return this.$message.warning('班级名称必须为数字')
let data = {
className: this.curClass.className,
classId: this.curClass.classId,
gradeId: ''
}
this.$post(this.api.updateClass,data).then(res => {
this.$message.success('编辑成功')
this.classVisible = false
}).catch(res => {})
},
getMsg() {
this.$post(`${this.api.waitReply}?schoolId=${this.clientId}&userId=${this.userId}`)
.then(res => {
this.msgList = this.handleList(res.data.list)
}).catch(err => {})
},
handleList(list){
list.map(n => {
n.userAvatars = n.userAvatars ? n.userAvatars : 'https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png'
n.showReply = false
n.replyContent = ''
n.children = []
n.showChildren = false
})
return list
},
showReply(row){
row.showReply = !row.showReply
},
delMsg(row){
this.$post(`${this.api.waitReplyDel}?userId=${this.userId}&bid=${row.bid}`).then(res => {
this.$message.success('删除成功')
this.getMsg()
}).catch(res => {})
},
submitComment(row){
let data = {
bid: row.bid,
content: row.replyContent,
commentUserId: this.userId,
schoolId: this.clientId,
}
this.$post(this.api.saveComment,data).then(res => {
this.$message.success('提交成功')
row.replyContent = ''
this.getMsg()
}).catch(res => {})
},
}
};
</script>
<style lang="scss" scoped>
@import "@/styles/pages/messageBoard.scss";
.title{
display: flex;
align-items: center;
font-size: 16px;
color: #6f6f6f;
img{
width: 20px;
margin-right: 5px;
}
}
.review{
display: flex;
justify-content: space-between;
li{
width: 32%;
min-height: 180px;
padding: 20px 30px;
margin-right: 10px;
background: url(../../../assets/img/index/testPaper-icon.png) 90% 70% no-repeat,url(../../../assets/img/index/bg.png) 0 0/100% 100% no-repeat;
button{
color: #198cff;
font-size: 12px;
background-color: transparent;
border: 0;
cursor: pointer;
img{
width: 15px;
margin-right: 5px;
}
}
.text{
margin-bottom: 20px;
font-size: 14px;
color: #444;
}
.member{
font-size: 14px;
color: #444;
span{
color: #198cff;
font-weight: bold;
}
}
}
}
.class{
display: flex;
li{
width: 19%;
padding: 15px 20px;
margin-right: .5%;
background: url(../../../assets/img/index/bg1.png) 0 0/100% 100% no-repeat;
&.index1{
background-image: url(../../../assets/img/index/bg2.png);
}
&.index2{
background-image: url(../../../assets/img/index/bg3.png);
}
&.index3{
background-image: url(../../../assets/img/index/bg4.png);
}
&.index4{
background-image: url(../../../assets/img/index/bg5.png);
}
.name{
padding-bottom: 5px;
margin-bottom: 10px;
text-align: center;
color: #fff;
font-size: 16px;
font-weight: bold;
border-bottom: 1px solid #fff;
}
.text{
font-size: 14px;
color: #fff;
line-height: 1.8;
}
.action{
margin-bottom: 20px;
.edit{
width: 20px;
height: 20px;
margin-right: 15px;
background-color: transparent;
border: 0;
background: url(../../../assets/img/index/pen.png) 0 0/100% 100% no-repeat;
cursor: pointer;
}
.del{
@extend .edit;
width: 16px;
background-image: url(../../../assets/img/index/del.png);
}
}
}
}
</style>

@ -5,7 +5,7 @@
<li v-for="(item,index) in listData" :key="index"> <li v-for="(item,index) in listData" :key="index">
<div class="item"> <div class="item">
<div class="inner"> <div class="inner">
<img class="avatar" src="https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png" alt=""> <img class="avatar" :src="item.userAvatars" alt="">
<div class="texts"> <div class="texts">
<div class="title"> <div class="title">
<span class="username">{{item.userName}}</span> <span class="username">{{item.userName}}</span>
@ -23,7 +23,7 @@
<button v-else class="btn" @click="delMsg(item)">删除</button> <button v-else class="btn" @click="delMsg(item)">删除</button>
</div> </div>
<div class="reply" v-if="item.showReply"> <div class="reply" v-if="item.showReply">
<quill :border="true" v-model="item.replyContent" :height="150" /> <quill :border="true" v-model="item.replyContent" :toTop="false" :height="150" />
<div class="m-t-10 text-right"> <div class="m-t-10 text-right">
<el-button type="primary" size="mini" @click="submitComment(item)">提交</el-button> <el-button type="primary" size="mini" @click="submitComment(item)">提交</el-button>
</div> </div>
@ -32,7 +32,7 @@
<ul class="list children" v-if="item.showChildren"> <ul class="list children" v-if="item.showChildren">
<li v-for="(reply,i) in item.children" :key="i"> <li v-for="(reply,i) in item.children" :key="i">
<div class="inner"> <div class="inner">
<img class="avatar" src="https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png" alt=""> <img class="avatar" :src="reply.userAvatars" alt="">
<div class="texts"> <div class="texts">
<div class="title"> <div class="title">
<span class="username">{{reply.userName}}</span> <span class="username">{{reply.userName}}</span>
@ -47,7 +47,7 @@
<button v-else class="btn" @click="delReply(reply,i,index)">删除</button> <button v-else class="btn" @click="delReply(reply,i,index)">删除</button>
</div> </div>
<div class="reply" v-if="reply.showReply"> <div class="reply" v-if="reply.showReply">
<quill :border="true" v-model="reply.replyContent" :height="150" /> <quill :border="true" v-model="reply.replyContent" :toTop="false" :height="150" />
<div class="m-t-10 text-right"> <div class="m-t-10 text-right">
<el-button type="primary" size="mini" @click="submitReply(reply)">提交</el-button> <el-button type="primary" size="mini" @click="submitReply(reply)">提交</el-button>
</div> </div>
@ -69,7 +69,7 @@
></el-pagination> ></el-pagination>
</div> </div>
<div class="input-wrap"> <div class="input-wrap">
<quill class="m-t-20" :border="true" v-model="content" :height="150" /> <quill class="m-t-20" :border="true" v-model="content" :toTop="false" :height="150" />
<div class="m-t-10 text-right"> <div class="m-t-10 text-right">
<el-button type="primary" size="mini" @click="submitMsg">提交</el-button> <el-button type="primary" size="mini" @click="submitMsg">提交</el-button>
</div> </div>
@ -111,6 +111,7 @@ export default {
}, },
handleList(list){ handleList(list){
list.map(n => { list.map(n => {
n.userAvatars = n.userAvatars ? n.userAvatars : 'https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png'
n.showReply = false n.showReply = false
n.replyContent = '' n.replyContent = ''
n.children = [] n.children = []
@ -207,89 +208,5 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.list{ @import "@/styles/pages/messageBoard.scss";
li{
padding-bottom: 10px;
border-top: 1px solid #f1f1f1;
&:first-child{
border-top: 0;
}
.inner{
position: relative;
display: flex;
justify-content: space-between;
padding: 10px 0 20px;
.avatar{
width: 40px;
height: 40px;
border-radius: 50%;
}
.texts{
flex: 1;
margin-left: 10px;
.title{
margin-bottom: 5px;
font-size: 14px;
.username{
color: $main-color;
}
.publish{
margin: 0 5px;
color: #d6d6d6;
}
.date{
color: #b5b5b5;
}
}
}
.right{
.index{
font-size: 12px;
color: #ccc;
}
}
}
.action{
text-align: right;
.btn{
padding: 2px 4px;
color: $main-color;
font-size: 12px;
background-color: #fff;
border: 1px solid;
border-radius: 4px;
cursor: pointer;
&:hover{
opacity: .8;
}
&:first-child{
margin-right: 5px;
}
}
}
.reply{
margin-top: 20px;
}
}
&.children{
padding: 0 10px 10px;
margin: 10px 0 0 30px;
background-color: #f3f4f6;
li{
border-top-color: #fff;
}
}
}
.toggle{
margin: 10px 0;
text-align: center;
color: $main-color;
font-size: 12px;
span{
cursor: pointer;
}
}
/deep/.quill{
background-color: #fff;
}
</style> </style>

@ -47,10 +47,16 @@
<span class="key">答案解析</span> <span class="key">答案解析</span>
<span class="val">{{item.answerAnalysis}}</span> <span class="val">{{item.answerAnalysis}}</span>
</div> </div>
<div class="meta"> <div class="flex a-center point">
<span class="key">考试得分</span> <div class="meta">
<div class="val"> <span class="key">题目分数</span>
<input type="text" v-model.number="item.questionScore" :disabled="!isReview || !item.isSub"> <div class="val">{{item.questionPoints}} </div>
</div>
<div class="meta">
<span class="key">考试得分</span>
<div class="val">
<input type="number" v-model.number="item.questionScore" :disabled="!isReview || !item.isSub">
</div>
</div> </div>
</div> </div>
</div> </div>
@ -110,7 +116,7 @@ export default {
if(i.includes('option')) answer.push(n[i]) if(i.includes('option')) answer.push(n[i])
} }
n.answer = answer.join('|') n.answer = answer.join('|')
n.userAnswer = n.userAnswer.replace(/&lt;&gt;/g,'|') n.userAnswer = n.userAnswer ? n.userAnswer.replace(/&lt;&gt;/g,'|') : ''
} }
}) })
this.list = data.list this.list = data.list
@ -118,15 +124,22 @@ export default {
this.userName = data.stuName this.userName = data.stuName
this.this_score = data.score this.this_score = data.score
this.duration = data.timeCost this.duration = data.timeCost
}) }).catch(err => {})
.catch(err => {})
}, },
getWrong(){ getWrong(){
this.$post(`${this.api.getWrong}?assessmentId=${this.id}&userId=${this.stuId}&paperId=${this.paperId}`) this.$post(`${this.api.getWrongPractice}?practiseId=${this.practiseId}&userId=${this.stuId}&identification=${this.identification}`)
.then(res => { .then(res => {
this.list = res.data.list let list = res.data.list
}) list.map(n => {
.catch(err => {}) n.userAnswer = n.user_answer
n.answerAnalysis = n.answer_analysis
n.knowledgePoints = n.knowledge_points
n.questionPoints = n.question_points
n.questionScore = n.question_score
n.questionStem = n.question_stem
})
this.list = list
}).catch(err => {})
}, },
save(status) { save(status) {
let isEmpty = false let isEmpty = false
@ -135,7 +148,7 @@ export default {
this.list.map(n => { this.list.map(n => {
if(n.questionScore === '') isEmpty = true if(n.questionScore === '') isEmpty = true
if(isNaN(n.questionScore)) isNotNum = true if(isNaN(n.questionScore)) isNotNum = true
if(Number(n.questionScore) > Number(n.question_points)) invalid = true if(Number(n.questionScore) > Number(n.questionPoints)) invalid = true
}) })
if(status){ if(status){
if(isEmpty) return this.$message.warning('请批阅完所有题目') if(isEmpty) return this.$message.warning('请批阅完所有题目')
@ -269,6 +282,11 @@ export default {
} }
} }
} }
.point{
.meta{
margin: 0;
}
}
} }
} }
</style> </style>

@ -2,15 +2,10 @@
<div> <div>
<el-card shadow="hover" class="m-b-20"> <el-card shadow="hover" class="m-b-20">
<div> <div>
<div class="flex a-center m-b-20"> <div class="p-title m-b-20">筛选</div>
<p class="hr_tag"></p> <div class="flex">
<span>筛选</span> <div>
</div> <el-input placeholder="请输入练习名称" prefix-icon="el-icon-search" v-model="keyword" clearable></el-input>
<div>
<div class="flex">
<div>
<el-input placeholder="请输入练习名称" prefix-icon="el-icon-search" v-model="keyword" clearable></el-input>
</div>
</div> </div>
</div> </div>
</div> </div>
@ -18,10 +13,7 @@
<el-card shadow="hover"> <el-card shadow="hover">
<div class="flex j-between m-b-20"> <div class="flex j-between m-b-20">
<div class="flex a-center"> <div class="p-title">练习列表</div>
<p class="hr_tag"></p>
<span>练习列表</span>
</div>
<div> <div>
<el-button type="primary" size="small" round @click="addAss" v-auth>创建练习</el-button> <el-button type="primary" size="small" round @click="addAss" v-auth>创建练习</el-button>
</div> </div>
@ -159,7 +151,7 @@
</span> </span>
</el-dialog> </el-dialog>
<el-dialog title="试卷详情" :visible.sync="previewVisible" width="40%" fullscreen> <el-dialog title="试卷详情" :visible.sync="previewVisible" width="95%">
<test-paper-detail :key="previewId"></test-paper-detail> <test-paper-detail :key="previewId"></test-paper-detail>
</el-dialog> </el-dialog>
</div> </div>
@ -462,9 +454,6 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
/deep/.no-mb.el-form-item{
margin-bottom: 0;
}
.details{ .details{
.line{ .line{
display: flex; display: flex;

@ -1,10 +1,8 @@
<template> <template>
<div> <div>
<el-card shadow="hover" class="m-b-20"> <el-card shadow="hover" class="m-b-20">
<div class="flex a-center m-b-20"> <div class="p-title m-b-20">筛选</div>
<p class="hr_tag"></p>
<span>筛选</span>
</div>
<div class="flex j-between"> <div class="flex j-between">
<el-form label-width="80px" inline> <el-form label-width="80px" inline>
<el-form-item class="no-mb" label="批阅状态"> <el-form-item class="no-mb" label="批阅状态">

@ -1,10 +1,8 @@
<template> <template>
<div> <div>
<el-card shadow="hover" class="m-b-20"> <el-card shadow="hover" class="m-b-20">
<div class="flex a-center m-b-20"> <div class="p-title m-b-20">筛选</div>
<p class="hr_tag"></p>
<span>筛选</span>
</div>
<div class="flex j-between"> <div class="flex j-between">
<el-form label-width="80px" inline> <el-form label-width="80px" inline>
<el-form-item class="no-mb" label="批阅状态"> <el-form-item class="no-mb" label="批阅状态">
@ -27,12 +25,7 @@
</el-card> </el-card>
<el-card shadow="hover" class="m-b-20"> <el-card shadow="hover" class="m-b-20">
<div class="flex j-between m-b-20"> <div class="p-title m-b-20">练习批阅</div>
<div class="flex a-center">
<p class="hr_tag"></p>
<span>练习批阅</span>
</div>
</div>
<el-table <el-table
:data="listData" :data="listData"

@ -3,10 +3,8 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="24"> <el-col :span="24">
<el-card shadow="hover" class="m-b-20"> <el-card shadow="hover" class="m-b-20">
<div class="flex a-center m-b-20"> <div class="p-title m-b-20">筛选</div>
<p class="hr_tag"></p>
<span>筛选</span>
</div>
<div class="flex j-between"> <div class="flex j-between">
<el-form label-width="80px" inline> <el-form label-width="80px" inline>
<el-form-item class="no-mb" label="教学班级"> <el-form-item class="no-mb" label="教学班级">
@ -35,10 +33,8 @@
<el-col :span="24"> <el-col :span="24">
<el-card shadow="hover" class="m-b-20"> <el-card shadow="hover" class="m-b-20">
<div class="flex j-between m-b-20"> <div class="flex j-between m-b-20">
<div class="flex a-center"> <div class="p-title">练习成绩</div>
<p class="hr_tag"></p>
<span>练习成绩</span>
</div>
<div> <div>
<el-button <el-button
type="primary" type="primary"

@ -2,31 +2,26 @@
<div> <div>
<el-card shadow="hover" class="m-b-20"> <el-card shadow="hover" class="m-b-20">
<div> <div>
<div class="flex a-center m-b-20"> <div class="p-title m-b-20">筛选</div>
<p class="hr_tag"></p> <div class="flex j-between no-mb">
<span>筛选</span> <div>
</div> <el-form label-width="80px" inline>
<div> <el-form-item class="no-mb" label="创建人">
<div class="flex j-between no-mb"> <el-select v-model="createUser" clearable placeholder="请选择创建人" @change="getData">
<div> <el-option label="不限" value=""></el-option>
<el-form label-width="80px" inline> <el-option v-for="(item,index) in createUserList" :key="index" :label="item.name" :value="item.name"></el-option>
<el-form-item class="no-mb" label="创建人"> </el-select>
<el-select v-model="createUser" clearable placeholder="请选择创建人" @change="getData"> </el-form-item>
<el-option label="不限" value=""></el-option> <el-form-item class="no-mb" label="试题类型">
<el-option v-for="(item,index) in createUserList" :key="index" :label="item.name" :value="item.name"></el-option> <el-select v-model="name" clearable placeholder="请选择试题类型" @change="getData">
</el-select> <el-option label="不限" value=""></el-option>
</el-form-item> <el-option v-for="(item,index) in typeList" :key="index" :label="item.name" :value="item.name"></el-option>
<el-form-item class="no-mb" label="试题类型"> </el-select>
<el-select v-model="name" clearable placeholder="请选择试题类型" @change="getData"> </el-form-item>
<el-option label="不限" value=""></el-option> </el-form>
<el-option v-for="(item,index) in typeList" :key="index" :label="item.name" :value="item.name"></el-option> </div>
</el-select> <div>
</el-form-item> <el-input placeholder="请输入题库名称" prefix-icon="el-icon-search" v-model="keyword" clearable></el-input>
</el-form>
</div>
<div>
<el-input placeholder="请输入题库名称" prefix-icon="el-icon-search" v-model="keyword" clearable></el-input>
</div>
</div> </div>
</div> </div>
</div> </div>
@ -34,10 +29,7 @@
<el-card shadow="hover"> <el-card shadow="hover">
<div class="flex j-between m-b-20"> <div class="flex j-between m-b-20">
<div class="flex a-center"> <div class="p-title">公共题库</div>
<p class="hr_tag"></p>
<span>题目列表</span>
</div>
<div> <div>
<!-- <el-button type="primary" size="small" round @click="delAllData" v-auth>取消共享</el-button> --> <!-- <el-button type="primary" size="small" round @click="delAllData" v-auth>取消共享</el-button> -->
<el-button type="primary" size="small" round @click="delAllData" v-auth>批量删除</el-button> <el-button type="primary" size="small" round @click="delAllData" v-auth>批量删除</el-button>
@ -46,11 +38,7 @@
<el-table :data="listData" class="table" stripe header-align="center" row-key="id" @selection-change="handleSelectionChange"> <el-table :data="listData" class="table" stripe header-align="center" row-key="id" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column> <el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="60" label="序号" align="center"></el-table-column> <el-table-column type="index" width="60" label="序号" align="center"></el-table-column>
<el-table-column prop="questionStem" label="题干" align="center"> <el-table-column prop="questionStem" :show-overflow-tooltip="true" label="题干" align="center"></el-table-column>
<template slot-scope="scope">
<div v-html="scope.row.questionStem"></div>
</template>
</el-table-column>
<el-table-column prop="name" label="试题类型" width="100" align="center"></el-table-column> <el-table-column prop="name" label="试题类型" width="100" align="center"></el-table-column>
<el-table-column prop="courses" label="对应课程" width="140" align="center"></el-table-column> <el-table-column prop="courses" label="对应课程" width="140" align="center"></el-table-column>
<el-table-column prop="typeName" label="所属题库" width="140" align="center"></el-table-column> <el-table-column prop="typeName" label="所属题库" width="140" align="center"></el-table-column>
@ -76,8 +64,9 @@
</template> </template>
<script> <script>
import quesDialog from './quesDialog'; import quesDialog from './quesDialog'
import { mapState,mapActions } from 'vuex'; import { mapState,mapActions } from 'vuex'
import util from '@/libs/util'
export default { export default {
data() { data() {
return { return {
@ -132,7 +121,7 @@ export default {
schoolId: this.clientId schoolId: this.clientId
}) })
.then(res => { .then(res => {
this.listData = res.data.list.list this.listData = util.removeHtmlTag(res.data.list.list,'questionStem')
this.total = res.data.list.totalCount this.total = res.data.list.totalCount
}) })
.catch(err => {}) .catch(err => {})

@ -3,10 +3,8 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="24"> <el-col :span="24">
<el-card shadow="hover" class="m-b-20"> <el-card shadow="hover" class="m-b-20">
<div class="flex a-center m-b-20"> <div class="p-title m-b-20">测评题库</div>
<p class="hr_tag"></p>
<span>测评题库</span>
</div>
<div class="flex j-between"> <div class="flex j-between">
<el-form label-width="80px"> <el-form label-width="80px">
<el-form-item class="no-mb" label="试题类型"> <el-form-item class="no-mb" label="试题类型">
@ -31,10 +29,8 @@
<el-col :span="24"> <el-col :span="24">
<el-card shadow="hover" class="m-b-20"> <el-card shadow="hover" class="m-b-20">
<div class="flex j-between m-b-20"> <div class="flex j-between m-b-20">
<div class="flex a-center"> <div class="p-title m-b-20">题目列表</div>
<p class="hr_tag"></p>
<span>题目列表</span>
</div>
<div> <div>
<el-button <el-button
type="primary" type="primary"
@ -89,18 +85,14 @@
slot-scope="scope" slot-scope="scope"
>{{scope.$index + (page - 1) * pageSize + 1}}</template> >{{scope.$index + (page - 1) * pageSize + 1}}</template>
</el-table-column> </el-table-column>
<el-table-column prop="questionStem" label="题干" align="center"> <el-table-column prop="questionStem" :show-overflow-tooltip="true" label="题干" align="center"></el-table-column>
<template slot-scope="scope">
<div class="ellipsis" v-html="scope.row.questionStem"></div>
</template>
</el-table-column>
<el-table-column prop="name" label="试题类型" width="100" align="center"></el-table-column> <el-table-column prop="name" label="试题类型" width="100" align="center"></el-table-column>
<el-table-column prop="courses" label="对应课程" width="140" align="center"></el-table-column> <el-table-column prop="courses" label="对应课程" width="140" align="center"></el-table-column>
<el-table-column prop="typeName" label="所属题库" width="140" align="center"></el-table-column> <el-table-column prop="typeName" label="所属题库" width="140" align="center"></el-table-column>
<el-table-column prop="knowledgePoints" label="知识点" width="140" align="center"></el-table-column> <el-table-column prop="knowledgePoints" label="知识点" width="140" align="center"></el-table-column>
<el-table-column prop="useNum" label="使用次数" width="100" align="center"></el-table-column> <el-table-column prop="useNum" label="使用次数" width="100" align="center"></el-table-column>
<el-table-column prop="createTime" label="上传时间" width="140" align="center"></el-table-column> <el-table-column prop="createTime" label="上传时间" width="140" align="center"></el-table-column>
<el-table-column label="操作" width="200" align="center"> <el-table-column label="操作" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="show(scope.row)">查看</el-button> <el-button type="text" @click="show(scope.row)">查看</el-button>
<el-button type="text" @click="edit(scope.row)">修改</el-button> <el-button type="text" @click="edit(scope.row)">修改</el-button>
@ -156,6 +148,7 @@
<script> <script>
import quesDialog from './quesDialog' import quesDialog from './quesDialog'
import { mapState } from 'vuex' import { mapState } from 'vuex'
import util from '@/libs/util'
export default { export default {
data() { data() {
return { return {
@ -206,11 +199,7 @@ export default {
userId: this.userId userId: this.userId
}) })
.then(res => { .then(res => {
let list = res.data.list.list this.listData = util.removeHtmlTag(res.data.list.list,'questionStem')
list.map(n => {
n.questionStem = n.questionStem.replace(/<\/?.+?>/gi,'')
})
this.listData = list
this.total = res.data.list.totalCount this.total = res.data.list.totalCount
}) })
.catch(err => {}) .catch(err => {})
@ -261,9 +250,11 @@ export default {
this.$post(`${this.api.deleteByMeSubject}?ids=${row.id}`).then(res => { this.$post(`${this.api.deleteByMeSubject}?ids=${row.id}`).then(res => {
this.$message.success('删除成功') this.$message.success('删除成功')
this.getData() this.getData()
}).catch(res => {}); }).catch(res => {})
}) if(row.videoAudio){
.catch(() => {}); this.$del(`${this.api.removeVideo}/${row.videoAudio}`).then(res => {}).catch(res => {});
}
}).catch(() => {})
}, },
share(row) { share(row) {
this.$confirm('确定要共享吗?', '提示', { this.$confirm('确定要共享吗?', '提示', {
@ -277,9 +268,8 @@ export default {
this.$post(this.api.saveSharing,data).then(res => { this.$post(this.api.saveSharing,data).then(res => {
this.$message.success('共享成功') this.$message.success('共享成功')
this.getData() this.getData()
}).catch(res => {}); }).catch(res => {})
}) }).catch(() => {})
.catch(() => {});
}, },
cancelShare(row) { cancelShare(row) {
this.$confirm('确定要取消共享吗?', '提示', { this.$confirm('确定要取消共享吗?', '提示', {
@ -289,9 +279,8 @@ export default {
this.$post(`${this.api.cancelByMySharing}?ids=${row.id}`).then(res => { this.$post(`${this.api.cancelByMySharing}?ids=${row.id}`).then(res => {
this.$message.success('取消共享成功'); this.$message.success('取消共享成功');
this.getData() this.getData()
}).catch(res => {}); }).catch(res => {})
}) }).catch(() => {})
.catch(() => {});
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val this.multipleSelection = val
@ -344,11 +333,11 @@ export default {
this.multipleSelection = []; this.multipleSelection = [];
this.$message.success('取消共享成功'); this.$message.success('取消共享成功');
this.getData() this.getData()
}).catch(res => {}); }).catch(res => {})
}) })
.catch(() => {}); .catch(() => {})
}else{ }else{
this.$message.error('请先选择数据!'); this.$message.error('请先选择数据!')
} }
}, },
delAllData() { delAllData() {
@ -375,7 +364,8 @@ export default {
} }
}, },
downLoad() { downLoad() {
location.href = 'http://39.108.250.202:9000/cjEnterprise/questions/getExcel' // location.href = 'http://39.108.250.202:9000/cjEnterprise/questions/getExcel'
location.href = 'http://39.108.250.202/cjEnterprise/题库导入模板.xlsx'
}, },
showimportVisible() { showimportVisible() {
this.importVisible = true this.importVisible = true

@ -285,7 +285,8 @@ export default {
if(!topicForm[`option${curOpt.toUpperCase()}`].length) isInvalidAnswer = true if(!topicForm[`option${curOpt.toUpperCase()}`].length) isInvalidAnswer = true
} }
} }
if(optionCount < 2) return this.$message.warning('请至少添加两个选项!') if((topicForm.typeId == 1 || topicForm.typeId == 3) && optionCount < 2) return this.$message.warning('请至少添加两个选项!')
if(topicForm.typeId == 2 && optionCount < 3) return this.$message.warning('请至少添加三个选项!')
if(!answer) return this.$message.warning('请设置正确答案!') if(!answer) return this.$message.warning('请设置正确答案!')
if(topicForm.questionType == '单选题' && answer.length > 1) return this.$message.warning('单选题只能设置一个正确选项!') if(topicForm.questionType == '单选题' && answer.length > 1) return this.$message.warning('单选题只能设置一个正确选项!')
if(topicForm.questionType == '多选题' && answer.length < 2) return this.$message.warning('多选题必须设置至少两个正确选项!') if(topicForm.questionType == '多选题' && answer.length < 2) return this.$message.warning('多选题必须设置至少两个正确选项!')
@ -403,6 +404,7 @@ export default {
closeTopics() { closeTopics() {
this.$emit('update:visible',false) this.$emit('update:visible',false)
this.$emit('closeTopics') this.$emit('closeTopics')
this.uploadList = []
this.resetForm() this.resetForm()
}, },
closeDialog(){ closeDialog(){

@ -41,16 +41,17 @@
</el-table-column> </el-table-column>
<el-table-column prop="lastLoginTime" label="上次登录时间" width="150" align="center"> <el-table-column prop="lastLoginTime" label="上次登录时间" width="150" align="center">
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center"> <el-table-column label="操作" width="180" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <el-button type="text">查看</el-button> --> <!-- <el-button type="text">查看</el-button> -->
<el-button type="text" @click="editstudent(scope.row)">编辑</el-button> <el-button type="text" @click="editstudent(scope.row)">编辑</el-button>
<el-button type="text" @click="resetPassword(scope.row)" v-auth>重置密码</el-button>
<el-button type="text" @click="delstudent(scope.row)">删除</el-button> <el-button type="text" @click="delstudent(scope.row)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
<el-pagination background layout="prev, pager, next" :current-page="page" @current-change="handleCurrentChange" :total="total"> <el-pagination background layout="total,prev, pager, next" :current-page="page" @current-change="handleCurrentChange" :total="total">
</el-pagination> </el-pagination>
</div> </div>
</el-card> </el-card>
@ -137,6 +138,7 @@
import StudentSide from './studentSide' import StudentSide from './studentSide'
import { mapState,mapGetters } from 'vuex' import { mapState,mapGetters } from 'vuex'
import util from '@/libs/util' import util from '@/libs/util'
import Setting from '@/setting'
export default { export default {
data() { data() {
return { return {
@ -371,6 +373,21 @@ export default {
this.getClassData() this.getClassData()
}).catch(res => {}); }).catch(res => {});
}, },
resetPassword(row){
this.$confirm(`重置后的密码为:${Setting.initialPassword},确定重置?`, '提示',).then(() => {
let data = {
userId: row.userId,
password: Setting.initialPassword
}
this.$post(this.api.userinfoUpdate,data).then(res => {
if(res.success){
this.$message.success('重置成功')
}else{
this.$message.error('重置失败')
}
}).catch(res => {})
}).catch(() => {})
},
// //
getGrade(){ getGrade(){
this.studentForm.gradeId = '' this.studentForm.gradeId = ''

@ -2,15 +2,11 @@
<div> <div>
<el-card shadow="hover" class="m-b-20"> <el-card shadow="hover" class="m-b-20">
<div> <div>
<div class="flex a-center m-b-20"> <div class="p-title m-b-20">筛选</div>
<p class="hr_tag"></p>
<span>筛选</span> <div class="flex">
</div> <div>
<div> <el-input placeholder="请输入角色名称" prefix-icon="el-icon-search" v-model="keyword" clearable></el-input>
<div style="display: flex;">
<div>
<el-input placeholder="请输入角色名称" prefix-icon="el-icon-search" v-model="keyword" clearable></el-input>
</div>
</div> </div>
</div> </div>
</div> </div>
@ -18,10 +14,7 @@
<el-card shadow="hover"> <el-card shadow="hover">
<div class="flex j-between m-b-20"> <div class="flex j-between m-b-20">
<div class="flex a-center"> <div class="p-title">角色列表</div>
<p class="hr_tag"></p>
<span>角色列表</span>
</div>
<div> <div>
<el-button type="primary" size="small" round @click="addRole" v-auth="'system:角色权限:新增角色'">新增角色</el-button> <el-button type="primary" size="small" round @click="addRole" v-auth="'system:角色权限:新增角色'">新增角色</el-button>
<el-button type="primary" size="small" round @click="delAllSelection" v-auth="'system:角色权限:批量删除'">批量删除</el-button> <el-button type="primary" size="small" round @click="delAllSelection" v-auth="'system:角色权限:批量删除'">批量删除</el-button>

@ -28,7 +28,7 @@
</div> </div>
<div class="item lg"> <div class="item lg">
<p class="key">建议时长分钟</p> <p class="key">建议时长分钟</p>
<el-input v-model.number="duration"></el-input> <el-input v-model.number="duration" type="number"></el-input>
</div> </div>
</div> </div>
<div class="line"> <div class="line">
@ -56,11 +56,7 @@
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column> <el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="60" label="序号" align="center"></el-table-column> <el-table-column type="index" width="60" label="序号" align="center"></el-table-column>
<el-table-column prop="questionSource" label="题库来源" width="120" align="center"></el-table-column> <el-table-column prop="questionSource" label="题库来源" width="120" align="center"></el-table-column>
<el-table-column prop="questionStem" label="题干" align="center"> <el-table-column prop="questionStem" label="题干" align="center" :show-overflow-tooltip="true"></el-table-column>
<template slot-scope="scope">
<div v-html="scope.row.questionStem"></div>
</template>
</el-table-column>
<el-table-column prop="name" label="试题类型" width="100" align="center"></el-table-column> <el-table-column prop="name" label="试题类型" width="100" align="center"></el-table-column>
<el-table-column prop="courses" label="对应课程" width="120" align="center"></el-table-column> <el-table-column prop="courses" label="对应课程" width="120" align="center"></el-table-column>
<el-table-column prop="knowledgePoints" label="知识点" width="120" align="center"></el-table-column> <el-table-column prop="knowledgePoints" label="知识点" width="120" align="center"></el-table-column>
@ -75,30 +71,30 @@
<div class="line"> <div class="line">
<div class="item"> <div class="item">
<p class="label">单选题</p> <p class="label">单选题</p>
<input type="text" :disabled="type == 1" v-model.number="singleCount"> <input type="text" :disabled="singleDisabled || type == 1" v-model.number="singleCount">
<input type="text" v-model.number="singleChoiceScore"> / <input type="text" :disabled="singleDisabled" v-model.number="singleChoiceScore" v-disabled="'单项选择'"> /
</div> </div>
<div class="item"> <div class="item">
<p class="label">多选题</p> <p class="label">多选题</p>
<input type="text" :disabled="type == 1" v-model.number="multipleCount"> <input type="text" :disabled="multipleDisabled || type == 1" v-model.number="multipleCount" v-disabled="'多项选择'">
<input type="text" v-model.number="multipleChoiceScore"> / <input type="text" :disabled="multipleDisabled" v-model.number="multipleChoiceScore" v-disabled="'多项选择'"> /
</div> </div>
<div class="item"> <div class="item">
<p class="label">填空题</p> <p class="label">填空题</p>
<input type="text" :disabled="type == 1" v-model.number="fillBlankCount"> <input type="text" :disabled="fillBlankDisabled || type == 1" v-model.number="fillBlankCount" v-disabled="'填空题'">
<input type="text" v-model.number="fillBlanksScore"> / <input type="text" :disabled="fillBlankDisabled" v-model.number="fillBlanksScore" v-disabled="'填空题'"> /
</div> </div>
</div> </div>
<div class="line"> <div class="line">
<div class="item"> <div class="item">
<p class="label">判断题</p> <p class="label">判断题</p>
<input type="text" :disabled="type == 1" v-model.number="judgeCount"> <input type="text" :disabled="judgeDisabled || type == 1" v-model.number="judgeCount" v-disabled="'判断题'">
<input type="text" v-model.number="judgeScore"> / <input type="text" :disabled="judgeDisabled" v-model.number="judgeScore" v-disabled="'判断题'"> /
</div> </div>
<div class="item"> <div class="item">
<p class="label">简答题</p> <p class="label">简答题</p>
<input type="text" :disabled="type == 1" v-model.number="briefCount"> <input type="text" :disabled="briefDisabled || type == 1" v-model.number="briefCount" v-disabled="'简答题'">
<input type="text" v-model.number="briefAnswerScore"> / <input type="text" :disabled="briefDisabled" v-model.number="briefAnswerScore" v-disabled="'简答题'"> /
</div> </div>
<div class="item"> <div class="item">
<p class="label">总分</p> <p class="label">总分</p>
@ -167,18 +163,14 @@
header-align="center" header-align="center"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column> <el-table-column type="selection" width="55" align="center" :reserve-selection="true" :selectable="disabledSelection"></el-table-column>
<el-table-column type="index" width="60" label="序号" align="center"> <el-table-column type="index" width="60" label="序号" align="center">
<template <template
slot-scope="scope" slot-scope="scope"
>{{scope.$index + (page - 1) * pageSize + 1}}</template> >{{scope.$index + (page - 1) * pageSize + 1}}</template>
</el-table-column> </el-table-column>
<el-table-column prop="questionSource" label="题库来源" align="center"></el-table-column> <el-table-column prop="questionSource" label="题库来源" align="center"></el-table-column>
<el-table-column prop="questionStem" label="题干" align="center"> <el-table-column prop="questionStem" label="题干" align="center" :show-overflow-tooltip="true"></el-table-column>
<template slot-scope="scope">
<div v-html="scope.row.questionStem"></div>
</template>
</el-table-column>
<el-table-column prop="name" label="试题类型" align="center"></el-table-column> <el-table-column prop="name" label="试题类型" align="center"></el-table-column>
<el-table-column prop="courses" label="对应课程" align="center"></el-table-column> <el-table-column prop="courses" label="对应课程" align="center"></el-table-column>
<el-table-column prop="knowledgePoints" label="知识点" align="center"></el-table-column> <el-table-column prop="knowledgePoints" label="知识点" align="center"></el-table-column>
@ -243,7 +235,7 @@
</span> </span>
</el-dialog> </el-dialog>
<el-dialog title="选择试题" :visible.sync="previewVisible" width="60%"> <el-dialog title="试卷预览" :visible.sync="previewVisible" fullscreen>
<test-paper :data="previewList" :key="previewIndex"></test-paper> <test-paper :data="previewList" :key="previewIndex"></test-paper>
</el-dialog> </el-dialog>
</div> </div>
@ -252,6 +244,7 @@
import mixins from '@/mixins/setBackground' import mixins from '@/mixins/setBackground'
import { mapState } from 'vuex' import { mapState } from 'vuex'
import testPaper from '@/components/testPaperDetail' import testPaper from '@/components/testPaperDetail'
import util from '@/libs/util'
export default { export default {
mixins: [ mixins ], mixins: [ mixins ],
data() { data() {
@ -276,6 +269,7 @@ export default {
judgeScore: '', judgeScore: '',
fillBlanksScore: '', fillBlanksScore: '',
briefAnswerScore: '', briefAnswerScore: '',
multipleSelected: [], multipleSelected: [],
typeNameList: ['单选题','多选题','判断题','填空题','简答题'], typeNameList: ['单选题','多选题','判断题','填空题','简答题'],
previewVisible: false, previewVisible: false,
@ -333,6 +327,12 @@ export default {
}; };
}, },
components: {testPaper}, components: {testPaper},
directives: {
disabled: function(el,binding,vnode){
let that = vnode.context
if(!that.selectedData.find(n => n.name == binding.value)) el.disabled = true
}
},
computed: { computed: {
...mapState('user', [ ...mapState('user', [
'userId','clientId' 'userId','clientId'
@ -340,6 +340,26 @@ export default {
...mapState('testpaper', [ ...mapState('testpaper', [
'degreeList','effectList','typeList' 'degreeList','effectList','typeList'
]), ]),
singleDisabled(){
if(this.selectedData.find(n => n.name == '单项选择')) return false
return true
},
multipleDisabled(){
if(this.selectedData.find(n => n.name == '多项选择')) return false
return true
},
fillBlankDisabled(){
if(this.selectedData.find(n => n.name == '填空题')) return false
return true
},
judgeDisabled(){
if(this.selectedData.find(n => n.name == '判断题')) return false
return true
},
briefDisabled(){
if(this.selectedData.find(n => n.name == '简答题')) return false
return true
},
totalScore(){ totalScore(){
let totalScore = this.singleCount * this.singleChoiceScore + this.multipleCount * this.multipleChoiceScore + this.fillBlankCount * this.fillBlanksScore + this.judgeCount * this.judgeScore + this.briefCount * this.briefAnswerScore let totalScore = this.singleCount * this.singleChoiceScore + this.multipleCount * this.multipleChoiceScore + this.fillBlankCount * this.fillBlanksScore + this.judgeCount * this.judgeScore + this.briefCount * this.briefAnswerScore
return totalScore ? totalScore : '' return totalScore ? totalScore : ''
@ -386,7 +406,7 @@ export default {
userId: this.userId userId: this.userId
} }
this.$post(this.api.getModifyByList, data).then(res => { this.$post(this.api.getModifyByList, data).then(res => {
this.selectedData = res.data.list this.selectedData = util.removeHtmlTag(res.data.list,'questionStem')
this.computeTypeCount() this.computeTypeCount()
}) })
.catch(err => {}) .catch(err => {})
@ -468,21 +488,19 @@ export default {
typeName: this.selectManual.typeName, typeName: this.selectManual.typeName,
userId: this.userId, userId: this.userId,
} }
this.$post(this.api.pageByChoiceList,data) this.$post(this.api.pageByChoiceList,data).then(res => {
.then(res => { this.listData = util.removeHtmlTag(res.data.list.list,'questionStem')
let listData = res.data.list.list this.total = res.data.list.totalCount
let newData = []
listData.forEach((n,i) => {
this.selectedData.every(e => e.id != n.id) && newData.push(n)
})
this.listData = newData
this.total = newData.length
this.$refs.listTable.clearSelection() this.$refs.listTable.clearSelection()
}) }).catch(err => {})
.catch(err => {}) },
disabledSelection(row,index){
let selectedData = this.selectedData
if(selectedData.find(n => n.id == row.id)) return false
return true
}, },
handleSelecteChange(val){ handleSelecteChange(val){
this.multipleSelected = val; this.multipleSelected = val
}, },
removeQues(){ removeQues(){
if(this.multipleSelected.length){ if(this.multipleSelected.length){
@ -566,6 +584,12 @@ export default {
this.fillBlankCount = fillBlankCount this.fillBlankCount = fillBlankCount
this.judgeCount = judgeCount this.judgeCount = judgeCount
this.briefCount = briefCount this.briefCount = briefCount
if(!singleCount) this.singleChoiceScore = 0
if(!multipleCount) this.multipleChoiceScore = 0
if(!fillBlankCount) this.fillBlanksScore = 0
if(!judgeCount) this.judgeScore = 0
if(!briefCount) this.briefAnswerScore = 0
} }
}, },
submitManual(){ submitManual(){
@ -591,25 +615,19 @@ export default {
}, },
getInteData() { getInteData() {
let data = { let data = {
// courses: '',
schoolId: this.clientId, schoolId: this.clientId,
userId: this.userId, userId: this.userId,
// schoolId: 2,
// userId: 2,
} }
this.$post(this.api.fuzzyQuery,data) this.$post(this.api.fuzzyQuery,data)
.then(res => { .then(res => {
this.inteListData = res.data.fuzzyList this.inteListData = res.data.fuzzyList
}) }).catch(err => {})
.catch(err => {});
}, },
courseChange(val,dir,allData){ courseChange(val,dir,allData){
let data = { let data = {
coursesList: val, coursesList: val,
schoolId: this.clientId, schoolId: this.clientId,
userId: this.userId, userId: this.userId,
// schoolId: 2,
// userId: 2,
} }
this.$post(this.api.statistical,data) this.$post(this.api.statistical,data)
.then(res => { .then(res => {
@ -619,8 +637,7 @@ export default {
this.countNumber3 = data.countNumber3 this.countNumber3 = data.countNumber3
this.countNumber4 = data.countNumber4 this.countNumber4 = data.countNumber4
this.countNumber5 = data.countNumber5 this.countNumber5 = data.countNumber5
}) }).catch(err => {})
.catch(err => {});
}, },
typeValid(index){ typeValid(index){
return this.countCheck[`countCheck${index}`] && this[`countNumberInput${index}`] && this[`countNumber${index}`] return this.countCheck[`countCheck${index}`] && this[`countNumberInput${index}`] && this[`countNumber${index}`]
@ -792,10 +809,17 @@ export default {
} }
this.$post(this.api.getQuestionListBySelect,data) this.$post(this.api.getQuestionListBySelect,data)
.then(res => { .then(res => {
this.selectedData = res.data.count.splice(0,totalCount) let list = res.data.count
let result = []
if(this.countCheck.countCheck1) result = result.concat(list.filter(n => n.name == '单项选择').slice(0,this.countNumberInput1))
if(this.countCheck.countCheck2) result = result.concat(list.filter(n => n.name == '多项选择').slice(0,this.countNumberInput2))
if(this.countCheck.countCheck3) result = result.concat(list.filter(n => n.name == '判断题').slice(0,this.countNumberInput3))
if(this.countCheck.countCheck4) result = result.concat(list.filter(n => n.name == '填空题').slice(0,this.countNumberInput4))
if(this.countCheck.countCheck5) result = result.concat(list.filter(n => n.name == '简答题').slice(0,this.countNumberInput5))
result = util.removeHtmlTag(result,'questionStem')
this.selectedData = result
this.inteVisible = false this.inteVisible = false
}) }).catch(err => {})
.catch(err => {});
}, },
closeInte(){ closeInte(){
this.course = [], this.course = [],

@ -2,20 +2,18 @@
<div> <div>
<el-card shadow="hover" class="m-b-20"> <el-card shadow="hover" class="m-b-20">
<div> <div>
<div class="flex a-center m-b-20"> <div class="p-title m-b-20">筛选</div>
<p class="hr_tag"></p>
<span>筛选</span>
</div>
<div> <div>
<div class="no-mb"> <div class="no-mb">
<el-form label-width="80px" inline> <el-form label-width="80px" inline>
<el-form-item label="所属课程" class="userRadio"> <el-form-item label="所属课程" class="userRadio">
<el-select v-model="cid" clearable placeholder="请选择所属题库"> <el-select v-model="cid" clearable placeholder="请选择所属课程" @change="getData">
<el-option v-for="(item,index) in quesBankList" :key="index" :label="item.typeName" :value="item.cid"></el-option> <el-option label="不限" value=""></el-option>
<el-option v-for="(item,index) in courseList" :key="index" :label="item.courses" :value="item.courses"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="试卷状态" class="userRadio"> <el-form-item label="试卷状态" class="userRadio">
<el-radio-group v-model="statusId" @change="getData"> <el-radio-group v-model="state" @change="getData">
<el-radio label="" border>全部</el-radio> <el-radio label="" border>全部</el-radio>
<el-radio v-for="(item,index) in statusList" :key="index" :label="item.id" border>{{item.name}}</el-radio> <el-radio v-for="(item,index) in statusList" :key="index" :label="item.id" border>{{item.name}}</el-radio>
</el-radio-group> </el-radio-group>
@ -24,7 +22,7 @@
<div class="flex j-between"> <div class="flex j-between">
<el-form label-width="80px" inline> <el-form label-width="80px" inline>
<el-form-item label="试卷用途" class="userRadio no-mb"> <el-form-item label="试卷用途" class="userRadio no-mb">
<el-radio-group v-model="purposeId" @change="getData"> <el-radio-group v-model="effect" @change="getData">
<el-radio label="" border>全部</el-radio> <el-radio label="" border>全部</el-radio>
<el-radio v-for="(item,index) in effectList" :key="index" :label="item.id" border>用于{{item.label}}</el-radio> <el-radio v-for="(item,index) in effectList" :key="index" :label="item.id" border>用于{{item.label}}</el-radio>
</el-radio-group> </el-radio-group>
@ -44,12 +42,7 @@
</el-card> </el-card>
<el-card shadow="hover"> <el-card shadow="hover">
<div class="flex j-between m-b-20"> <div class="p-title m-b-20">所有试卷</div>
<div class="flex a-center">
<p class="hr_tag"></p>
<span>所有试卷</span>
</div>
</div>
<el-table :data="listData" class="table" stripe header-align="center" row-key="id" @selection-change="handleSelecteChange"> <el-table :data="listData" class="table" stripe header-align="center" row-key="id" @selection-change="handleSelecteChange">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column> <el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column> <el-table-column type="index" width="100" label="序号" align="center"></el-table-column>
@ -98,16 +91,17 @@ import { mapState,mapGetters,mapActions } from 'vuex'
export default { export default {
data() { data() {
return { return {
listData: [],
multipleSelection: [],
date: [], date: [],
startTime: '', startTime: '',
endTime: '', endTime: '',
cid: '', cid: '',
quesBankList: [], state: '',
statusId: '', courseList: [],
purposeId: '', state: '',
effect: '',
keyword: '', keyword: '',
listData: [],
multipleSelection: [],
page: 1, page: 1,
pageSize: 10, pageSize: 10,
total: 0, total: 0,
@ -127,7 +121,7 @@ export default {
}, },
mounted() { mounted() {
this.getData() this.getData()
this.getQuesBank() this.getCourses()
}, },
watch: { watch: {
keyword: function(val) { keyword: function(val) {
@ -152,27 +146,32 @@ export default {
'setInfo' 'setInfo'
]), ]),
getData() { getData() {
this.$post(this.api.pageBySchoolTestPaper, { let data = {
pageNum: this.page, pageNum: this.page,
pageSize: this.pageSize, pageSize: this.pageSize,
userId: this.userId, userId: this.userId,
schoolId: this.clientId, schoolId: this.clientId,
questionStem: this.keyword, }
}) this.keyword && (data.name = this.keyword)
this.cid && (data.courses = this.cid)
this.effect !== '' && (data.effect = this.effect)
this.startTime && (data.startTime = this.startTime)
this.endTime && (data.endTime = this.endTime)
this.state !== '' && (data.state = this.state)
this.$post(this.api.pageBySchoolTestPaper,data)
.then(res => { .then(res => {
this.listData = res.data.list.list this.listData = res.data.list.list
this.total = res.data.list.totalCount this.total = res.data.list.totalCount
this.$refs.table.clearSelection() }).catch(err => {})
})
.catch(err => {})
}, },
handleSelecteChange(val){ handleSelecteChange(val){
this.multipleSelection = val; this.multipleSelection = val;
}, },
getQuesBank() { getCourses() {
this.$get(this.api.getTypeByOneLever) this.$post(`${this.api.getSelectInfo}?type=2`)
.then(res => { .then(res => {
this.quesBankList = res.data.list this.courseList = res.data.pointList
}) })
.catch(err => {}) .catch(err => {})
}, },
@ -214,6 +213,8 @@ export default {
this.getData() this.getData()
}).catch(res => {}) }).catch(res => {})
}).catch(err => {}) }).catch(err => {})
}else{
this.$message.warning('请先选择试题')
} }
}).catch(err => {}) }).catch(err => {})
}, },

@ -2,21 +2,18 @@
<div> <div>
<el-card shadow="hover" class="m-b-20"> <el-card shadow="hover" class="m-b-20">
<div> <div>
<div class="flex a-center m-b-20"> <div class="p-title m-b-20">筛选</div>
<p class="hr_tag"></p>
<span>筛选</span>
</div>
<div> <div>
<div class="no-mb"> <div class="no-mb">
<el-form label-width="80px" inline> <el-form label-width="80px" inline>
<el-form-item label="所属课程" class="userRadio"> <el-form-item label="所属课程" class="userRadio">
<el-select v-model="cid" clearable placeholder="请选择所属课程" @change="getData"> <el-select v-model="cid" clearable placeholder="请选择所属课程" @change="getData">
<el-option label="不限" value=""></el-option> <el-option label="不限" value=""></el-option>
<el-option v-for="(item,index) in quesBankList" :key="index" :label="item.typeName" :value="item.cid"></el-option> <el-option v-for="(item,index) in courseList" :key="index" :label="item.courses" :value="item.courses"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="试卷状态" class="userRadio"> <el-form-item label="试卷状态" class="userRadio">
<el-radio-group v-model="statusId" @change="getData"> <el-radio-group v-model="state" @change="getData">
<el-radio label="" border>全部</el-radio> <el-radio label="" border>全部</el-radio>
<el-radio v-for="(item,index) in statusList" :key="index" :label="item.id" border>{{item.name}}</el-radio> <el-radio v-for="(item,index) in statusList" :key="index" :label="item.id" border>{{item.name}}</el-radio>
</el-radio-group> </el-radio-group>
@ -25,7 +22,7 @@
<div class="flex j-between"> <div class="flex j-between">
<el-form label-width="80px" inline> <el-form label-width="80px" inline>
<el-form-item label="试卷用途" class="userRadio no-mb"> <el-form-item label="试卷用途" class="userRadio no-mb">
<el-radio-group v-model="purposeId" @change="getData"> <el-radio-group v-model="effect" @change="getData">
<el-radio label="" border>全部</el-radio> <el-radio label="" border>全部</el-radio>
<el-radio v-for="(item,index) in effectList" :key="index" :label="item.id" border>用于{{item.label}}</el-radio> <el-radio v-for="(item,index) in effectList" :key="index" :label="item.id" border>用于{{item.label}}</el-radio>
</el-radio-group> </el-radio-group>
@ -46,10 +43,7 @@
<el-card shadow="hover"> <el-card shadow="hover">
<div class="flex j-between m-b-20"> <div class="flex j-between m-b-20">
<div class="flex a-center"> <div class="p-title">我的试卷</div>
<p class="hr_tag"></p>
<span>我的试卷</span>
</div>
<div> <div>
<el-button type="primary" size="small" round @click="addTestPaper" v-auth>创建试卷</el-button> <el-button type="primary" size="small" round @click="addTestPaper" v-auth>创建试卷</el-button>
<el-button type="primary" size="small" round @click="delAllSelection" v-auth>批量删除</el-button> <el-button type="primary" size="small" round @click="delAllSelection" v-auth>批量删除</el-button>
@ -106,16 +100,17 @@ import { mapState,mapGetters,mapActions } from 'vuex'
export default { export default {
data() { data() {
return { return {
listData: [],
multipleSelection: [],
date: [], date: [],
startTime: '', startTime: '',
endTime: '', endTime: '',
cid: '', cid: '',
quesBankList: [], state: '',
statusId: '', courseList: [],
purposeId: '', state: '',
effect: '',
keyword: '', keyword: '',
listData: [],
multipleSelection: [],
page: 1, page: 1,
pageSize: 10, pageSize: 10,
total: 0, total: 0,
@ -135,7 +130,7 @@ export default {
}, },
mounted() { mounted() {
this.getData() this.getData()
this.getQuesBank() this.getCourses()
}, },
watch: { watch: {
keyword: function(val) { keyword: function(val) {
@ -160,26 +155,32 @@ export default {
'setInfo' 'setInfo'
]), ]),
getData() { getData() {
this.$post(this.api.pageBygetMeTestPaper, { let data = {
pageNum: this.page, pageNum: this.page,
pageSize: this.pageSize, pageSize: this.pageSize,
userId: this.userId, userId: this.userId,
schoolId: this.clientId, schoolId: this.clientId,
questionStem: this.keyword, }
}) this.keyword && (data.name = this.keyword)
this.cid && (data.courses = this.cid)
this.effect !== '' && (data.effect = this.effect)
this.startTime && (data.startTime = this.startTime)
this.endTime && (data.endTime = this.endTime)
this.state !== '' && (data.state = this.state)
this.$post(this.api.pageBygetMeTestPaper,data)
.then(res => { .then(res => {
this.listData = res.data.list.list this.listData = res.data.list.list
this.total = res.data.list.totalCount this.total = res.data.list.totalCount
}) }).catch(err => {})
.catch(err => {})
}, },
handleSelecteChange(val){ handleSelecteChange(val){
this.multipleSelection = val; this.multipleSelection = val;
}, },
getQuesBank() { getCourses() {
this.$get(this.api.getTypeByOneLever) this.$post(`${this.api.getSelectInfo}?type=2`)
.then(res => { .then(res => {
this.quesBankList = res.data.list this.courseList = res.data.pointList
}) })
.catch(err => {}) .catch(err => {})
}, },
@ -196,8 +197,7 @@ export default {
this.$message.success('删除成功') this.$message.success('删除成功')
this.getData() this.getData()
}).catch(res => {}); }).catch(res => {});
}) }).catch(() => {})
.catch(() => {});
}, },
delAllSelection() { delAllSelection() {
if(this.multipleSelection.length){ if(this.multipleSelection.length){
@ -215,8 +215,7 @@ export default {
this.$message.success('删除成功') this.$message.success('删除成功')
this.getData() this.getData()
}).catch(res => {}) }).catch(res => {})
}) }).catch(() => {})
.catch(() => {})
}else{ }else{
this.$message.error('请先选择数据 !') this.$message.error('请先选择数据 !')
} }
@ -255,6 +254,8 @@ export default {
this.getData() this.getData()
}).catch(res => {}) }).catch(res => {})
}).catch(err => {}) }).catch(err => {})
}else{
this.$message.warning('请先选择试题')
} }
}).catch(err => {}) }).catch(err => {})
}, },
@ -270,7 +271,7 @@ export default {
this.$post(`${this.api.copyPaper}?id=${row.id}`).then(res => { this.$post(`${this.api.copyPaper}?id=${row.id}`).then(res => {
this.$message.success('复制成功'); this.$message.success('复制成功');
this.getData() this.getData()
}).catch(res => {}); }).catch(res => {})
}, },
edit(row){ edit(row){
this.$router.push(`add?id=${row.id}`) this.$router.push(`add?id=${row.id}`)

@ -3,10 +3,8 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="24"> <el-col :span="24">
<el-card shadow="hover" class="m-b-20"> <el-card shadow="hover" class="m-b-20">
<div class="flex a-center m-b-20"> <div class="p-title m-b-20">筛选</div>
<p class="hr_tag"></p>
<span>筛选</span>
</div>
<div class="flex j-between"> <div class="flex j-between">
<el-form label-width="80px" inline> <el-form label-width="80px" inline>
<el-form-item class="no-mb" label="授课专业"> <el-form-item class="no-mb" label="授课专业">
@ -34,12 +32,7 @@
<el-col :span="24"> <el-col :span="24">
<el-card shadow="hover" class="m-b-20"> <el-card shadow="hover" class="m-b-20">
<div class="flex j-between m-b-20"> <div class="p-title m-b-20">练习批阅</div>
<div class="flex a-center">
<p class="hr_tag"></p>
<span>练习批阅</span>
</div>
</div>
<el-table <el-table
:data="listData" :data="listData"

@ -6,7 +6,7 @@ import Setting from '@/setting'
const service = axios.create({ const service = axios.create({
baseURL: Setting.apiBaseURL, baseURL: Setting.apiBaseURL,
timeout: 5000 timeout: 50000
}) })
// post请求头 // post请求头

@ -0,0 +1,23 @@
import BasicLayout from '@/layouts/home';
const meta = {};
const pre = 'index-';
export default {
path: '/index',
name: 'index',
redirect: {
name: `${pre}list`
},
meta,
component: BasicLayout,
children: [
{
name: `${pre}list`,
path: `list`,
component: () => import('@/pages/index/list'),
meta: { title: '首页' }
},
]
};

@ -2,11 +2,11 @@ import BasicLayout from '@/layouts/home';
const meta = {}; const meta = {};
const pre = 'index-'; const pre = 'student-';
export default { export default {
path: '/index', path: '/student',
name: 'index', name: 'student',
redirect: { redirect: {
name: `${pre}list` name: `${pre}list`
}, },

@ -1,11 +1,11 @@
import router from './index'; import router from './index'
import generateRoutes from '@/libs/route/generateRoutes'; import generateRoutes from '@/libs/route/generateRoutes'
import Setting from '@/setting'; import Setting from '@/setting'
import util from '@/libs/util'; import util from '@/libs/util'
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
document.title = `${to.meta.title} | ${Setting.titleSuffix}`; document.title = `${to.meta.title} | ${Setting.titleSuffix}`
const role = util.session.get(Setting.usernameKey); const role = util.session.get(Setting.usernameKey)
if (!role && to.path !== '/login') { if (!role && to.path !== '/login') {
next('/login'); next('/login');
} else if(role && to.path == '/login') { } else if(role && to.path == '/login') {
@ -13,7 +13,7 @@ router.beforeEach((to, from, next) => {
} else if(role && to.path == '/') { } else if(role && to.path == '/') {
next('/index') next('/index')
} else { } else {
next(); next()
} }
}); });

@ -1,3 +1,4 @@
import index from './modules/index';
import student from './modules/student'; import student from './modules/student';
import quesBank from './modules/quesBank'; import quesBank from './modules/quesBank';
import testPaper from './modules/testPaper'; import testPaper from './modules/testPaper';
@ -21,6 +22,7 @@ const frameIn = [
meta: { title: '首页' }, meta: { title: '首页' },
children: [] children: []
}, },
index,
student, student,
quesBank, quesBank,
testPaper, testPaper,

@ -60,25 +60,17 @@
margin-right: 5px; margin-right: 5px;
color: #F56C6C; color: #F56C6C;
} }
.hr_tag{ .p-title{
background-color: $--color-primary; display: flex;
width: 3px; align-items: center;
height: 15px; &:before{
margin-right: 5px; content: '';
} display: inline-block;
width: 3px;
.per_title span{ height: 15px;
font-size: 16px; margin-right: 5px;
font-weight: bold; background-color: $--color-primary;
} }
.per_back{
margin-left: 5px;
}
.per_school{
margin-left: 30px;
}
.per_title:hover{
cursor:pointer;
} }
[v-cloak] { [v-cloak] {

@ -0,0 +1,85 @@
.list{
li{
padding-bottom: 10px;
border-top: 1px solid #f1f1f1;
&:first-child{
border-top: 0;
}
.inner{
position: relative;
display: flex;
justify-content: space-between;
padding: 10px 0 20px;
.avatar{
width: 40px;
height: 40px;
border-radius: 50%;
}
.texts{
flex: 1;
margin-left: 10px;
.title{
margin-bottom: 5px;
font-size: 14px;
.username{
color: $main-color;
}
.publish{
margin: 0 5px;
color: #d6d6d6;
}
.date{
color: #b5b5b5;
}
}
}
.right{
.index{
font-size: 12px;
color: #ccc;
}
}
}
.action{
text-align: right;
.btn{
padding: 2px 4px;
color: $main-color;
font-size: 12px;
background-color: #fff;
border: 1px solid;
border-radius: 4px;
cursor: pointer;
&:hover{
opacity: .8;
}
&:first-child{
margin-right: 5px;
}
}
}
.reply{
margin-top: 20px;
}
}
&.children{
padding: 0 10px 10px;
margin: 10px 0 0 30px;
background-color: #f3f4f6;
li{
border-top-color: #fff;
}
}
}
.toggle{
margin: 10px 0;
text-align: center;
color: $main-color;
font-size: 12px;
span{
cursor: pointer;
}
}
/deep/.quill{
background-color: #fff;
}

@ -1,3 +1,5 @@
@import "../default/index.scss";
$insideColor: rgba(245, 242, 255, 0.8); //内部节点的边框颜色 $insideColor: rgba(245, 242, 255, 0.8); //内部节点的边框颜色
$outColor: rgba(255, 255, 255, 0.8); //外部节点的边框颜色 $outColor: rgba(255, 255, 255, 0.8); //外部节点的边框颜色
//混合代码,提取item共同样式 //混合代码,提取item共同样式
@ -59,7 +61,7 @@ $outColor: rgba(255, 255, 255, 0.8); //外部节点的边框颜色
margin-left:95px margin-left:95px
} }
.item2:hover{ .item2:hover{
color: #cb221c; color: $--color-primary;
} }
.edit{ .edit{
display: inline-block; display: inline-block;

Loading…
Cancel
Save