master
yujialong 4 years ago
parent cf99172f6a
commit 0694358cf3
  1. 6
      src/components/testPaperDetail/index.vue
  2. 6
      src/libs/util.js
  3. 8
      src/pages/achievement/list/examResults.vue
  4. 24
      src/pages/achievement/list/practiceResults.vue
  5. 22
      src/pages/achievement/list/wrongBook.vue
  6. 31
      src/pages/assessment/list/index.vue
  7. 8
      src/pages/assessment/list/studentTree.vue
  8. 14
      src/pages/assessment/monitor/index.vue
  9. 16
      src/pages/assessment/review/index.vue
  10. 14
      src/pages/assessment/scoreQuery/index.vue
  11. 13
      src/pages/index/list/index.vue
  12. 28
      src/pages/practice/list/index.vue
  13. 10
      src/pages/practice/list/studentTree.vue
  14. 6
      src/pages/practice/result/index.vue
  15. 12
      src/pages/practice/review/index.vue
  16. 27
      src/pages/practice/scoreQuery/index.vue
  17. 42
      src/pages/quesBank/list/globalQuesBank.vue
  18. 31
      src/pages/quesBank/list/myQuesBank.vue
  19. 10
      src/pages/quesBank/list/quesBankType.vue
  20. 3
      src/pages/quesBank/list/quesDialog.vue
  21. 29
      src/pages/student/list/student.vue
  22. 32
      src/pages/system/list/role.vue
  23. 51
      src/pages/system/list/staff.vue
  24. 65
      src/pages/testPaper/add/index.vue
  25. 46
      src/pages/testPaper/list/allTestPaper.vue
  26. 91
      src/pages/testPaper/list/myTestPaper.vue
  27. 2
      src/plugins/auth/index.js
  28. 2
      src/setting.js
  29. 4
      src/store/modules/testpaper.js

@ -7,7 +7,7 @@
<div class="metas">
<div class="m-r-20">
<span class="name">总分</span>
<span class="val">100</span>
<span class="val">{{score === undefined ? 100 : score}}</span>
</div>
<div v-if="totalDuration !== ''">
<span class="name">考试时长</span>
@ -23,7 +23,7 @@
<div class="wrap">
<div class="item" v-for="(item,index) in curType" :key="index">
<div class="type">
<div class="type yet">
<span>序号{{index+1}}</span>
</div>
<div class="inner">
@ -101,7 +101,7 @@ export default {
'userId'
]),
...mapState('testpaper', [
'id','paperName','totalDuration'
'id','paperName','totalDuration','score'
])
},
mounted() {

@ -106,15 +106,15 @@ const util = {
},
// 成功提示
successMsg(message) {
Message.success({message,showClose: true,offset: (document.documentElement.clientHeight - 40) / 2,duration: 1500})
Message.success({message,showClose: true,offset: (document.documentElement.clientHeight - 40) / 2,duration: 3000})
},
// 警告提示
warningMsg(message) {
Message.warning({message,showClose: true,offset: (document.documentElement.clientHeight - 40) / 2,duration: 1500})
Message.warning({message,showClose: true,offset: (document.documentElement.clientHeight - 40) / 2,duration: 3000})
},
// 错误提示
errorMsg(message) {
Message.error({message,showClose: true,offset: (document.documentElement.clientHeight - 40) / 2,duration: 1500})
Message.error({message,showClose: true,offset: (document.documentElement.clientHeight - 40) / 2,duration: 3000})
},
// 给超过给定长度的字符串加省略号
ellipsisStr(str) {

@ -10,7 +10,7 @@
</li>
<li>
<label>考试名称</label>
<el-select v-model="assessmentId" placeholder="请选择考试名称" size="small" @change="getData">
<el-select v-model="assessmentId" placeholder="请选择考试名称" size="small" @change="initData">
<el-option v-for="(item,index) in assessmentNameList" :key="index" :label="item.assessmentName" :value="item.assessmentId"></el-option>
</el-select>
</li>
@ -89,7 +89,7 @@ export default {
keyword: function(val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.getData()
this.initData()
},500)
}
},
@ -112,6 +112,10 @@ export default {
})
.catch(err => {})
},
initData(){
this.page = 1
this.getData()
},
getClass() {
this.$post(this.api.getMyClass,{
userId: this.userId

@ -10,7 +10,7 @@
</li>
<li>
<label>练习名称</label>
<el-select v-model="practiseId" placeholder="请选择练习名称" size="small" @change="getData">
<el-select v-model="practiseId" placeholder="请选择练习名称" size="small" @change="initData">
<el-option v-for="(item,index) in practiceNameList" :key="index" :label="item.practiseName" :value="item.practiseId"></el-option>
</el-select>
</li>
@ -58,11 +58,11 @@
</div>
<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">
<div class="m-b-20">
<el-input placeholder="请输入练习项目名称" prefix-icon="el-icon-search" v-model="keywordAch" clearable></el-input>
</div>
<el-input placeholder="请输入练习试卷名称" prefix-icon="el-icon-search" v-model="keywordAch" clearable></el-input>
</div>
</div> -->
<el-table :data="achiList" ref="table" row-key="id" class="table" stripe header-align="center">
<el-table-column type="index" width="100" label="序号" align="center">
@ -122,6 +122,7 @@ export default {
pageAch: 1,
pageSizeAch: 10,
totalAch: 0,
curUserId: ''
};
},
computed: {
@ -136,13 +137,13 @@ export default {
keyword: function(val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.getData()
this.initData()
},500)
},
keywordAch: function(val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.getData()
this.initAchData()
},500)
}
},
@ -157,6 +158,10 @@ export default {
this.total = res.data.list.totalCount
}).catch(err => {})
},
initData(){
this.page = 1
this.getData()
},
getClass() {
this.$post(`${this.api.getMineClass}?userId=${this.userId}`)
.then(res => {
@ -179,16 +184,21 @@ export default {
this.getData()
},
showDetail(row){
this.curUserId = row.userId
this.getDetail(row)
this.detailVisible = true
},
getDetail(row){
this.$post(`${this.api.AchievementDetail}?userId=${row.userId}&practiseId=${this.practiseId}&pageNum=${this.page}&pageSize=${this.pageSize}`)
this.$post(`${this.api.AchievementDetail}?userId=${this.curUserId}&practiseId=${this.practiseId}&pageNum=${this.pageAch}&pageSize=${this.pageSizeAch}`)
.then(res => {
this.achiList = res.data.list.list
this.totalAch = res.data.list.totalCount
}).catch(err => {})
},
initAchData(){
this.pageAch = 1
this.getDetail()
},
handleSelectionChange(val) {
this.multipleSelection = val
},

@ -10,13 +10,13 @@
</li>
<li v-if="type == 2">
<label>练习名称</label>
<el-select v-model="name" placeholder="请选择练习名称" size="small" @change="getData">
<el-select v-model="name" placeholder="请选择练习名称" size="small" @change="initData">
<el-option v-for="(item,index) in nameList" :key="index" :label="item.practiseName" :value="item.practiseId"></el-option>
</el-select>
</li>
<li v-else>
<label>考试名称</label>
<el-select v-model="name" placeholder="请选择考试名称" size="small" @change="getData">
<el-select v-model="name" placeholder="请选择考试名称" size="small" @change="initData">
<el-option v-for="(item,index) in nameList" :key="index" :label="item.assessmentName" :value="item.id"></el-option>
</el-select>
</li>
@ -40,7 +40,11 @@
</el-table-column>
<el-table-column prop="paperName" label="试卷名称" align="center"></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 prop="questionStem" label="题干" align="center" :show-overflow-tooltip="true">
<template slot-scope="scope">
<div class="ellipsis" v-html="scope.row.questionStem"></div>
</template>
</el-table-column>
<el-table-column prop="wrongNum" label="错题次数" align="center"></el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
@ -148,7 +152,7 @@ export default {
keyword: function(val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.getData()
this.initData()
},500)
}
},
@ -161,10 +165,18 @@ export default {
}
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.listData = util.removeHtmlTag(res.data.list.list,'questionStem')
let list = util.removeHtmlTag(res.data.list.list,'questionStem')
list.map(n => {
n.questionStem = n.questionStem.replace(/\(\)\(\)\(\)/g,`______`)
})
this.listData = list
this.total = res.data.list.totalCount
}).catch(err => {})
},
initData(){
this.page = 1
this.getData()
},
getName() {
if(this.type == 1){
this.$get(this.api.queryAssessment, {

@ -10,14 +10,14 @@
<ul class="filter">
<li>
<label>考试类型</label>
<el-select v-model="type" clearable placeholder="请选择考试类型" size="small" @change="getData">
<el-select v-model="type" clearable placeholder="请选择考试类型" size="small" @change="initData">
<el-option label="不限" value=""></el-option>
<el-option v-for="(item,index) in typeList" :key="index" :label="item.name" :value="item.id"></el-option>
</el-select>
</li>
<li>
<label>考试状态</label>
<el-select v-model="state" clearable placeholder="请选择考试状态" size="small" @change="getData">
<el-select v-model="state" clearable placeholder="请选择考试状态" size="small" @change="initData">
<el-option label="不限" value=""></el-option>
<el-option v-for="(item,index) in stateList" :key="index" :label="item.name" :value="item.id"></el-option>
</el-select>
@ -238,7 +238,8 @@ export default {
timer: null,
stuCompKey: 1,
previewVisible: false,
previewId: ''
previewId: '',
submiting: false
};
},
components: {
@ -263,7 +264,7 @@ export default {
keyword: function(val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.getData()
this.initData()
},500)
},
keywordPaper: function(val) {
@ -304,11 +305,19 @@ export default {
.then(res => {
this.listData = res.data.Assessment.list
this.total = res.data.Assessment.totalCount
if(!this.listData.length && this.total){
this.page--
this.getData()
}
})
.catch(err => {
clearInterval(this.timer)
})
},
initData(){
this.page = 1
this.getData()
},
addInterval(){
this.timer = setInterval(this.getData,1000)
this.$once('hook:beforeDestroy',() => {
@ -485,7 +494,8 @@ export default {
},
finish(row){
this.$confirm('是否结束此次考试?', '提示', {
type: 'warning'
type: 'warning',
customClass: 'normal'
}).then(() => {
this.$post(`${this.api.compulsory}?id=${row.id}`).then(res => {
util.successMsg('结束成功')
@ -536,6 +546,9 @@ export default {
if(!form.studentId.length) return util.warningMsg('请选择学生')
if(new Date(this.form.startTime).getTime() < new Date().getTime()) form.state = 2
if(this.submiting) return false
this.submiting = true
let data = {
id: form.id,
userId: this.userId,
@ -550,18 +563,22 @@ export default {
}
if(this.form.id){
this.$post(this.api.updateAssessment, data).then(res => {
this.submiting = false
util.successMsg('修改成功')
this.addVisible = false
this.getData()
}).catch(err => {
this.submiting = false
})
.catch(err => {})
}else{
this.$post(this.api.addAssessment, data).then(res => {
this.submiting = false
util.successMsg('创建成功')
this.addVisible = false
this.getData()
}).catch(err => {
this.submiting = false
})
.catch(err => {})
}
},
closeAdd(){

@ -7,7 +7,7 @@
<div class="item" @click.stop="open(item)">
<i class="empty"></i>
<i :class="item.ischeck ? 'checked' : 'checkbox'" @click.stop="fircheckitem(item)"></i>
<span>{{item.label}}</span>
<span>{{item.label}}</span>
</div>
</div>
</div>
@ -36,7 +36,7 @@
<img v-if="item2.children&&item2.children.length!=0" :class="{ 'arrowTransform': !item2.ifVisible, 'arrowTransformReturn': item2.ifVisible}" src="../../../assets/img/arrow-down.png" alt/>
<i v-else class="empty"></i>
<i :class="item2.ischeck ? 'checked' : 'checkbox'" @click.stop="threecheckitem(item2)"></i>
<span>{{item2.label}}</span>
<span>{{item2.label}}</span>
</div>
<div v-show="item2.ifVisible" v-if="item2.children&&item2.children.length!=0">
@ -95,6 +95,7 @@ export default {
},
methods: {
fuzzyQuery(){
if(this.keyword){
let list = this.allClassList
let result = []
@ -102,6 +103,9 @@ export default {
if(n.label.includes(this.keyword)) result.push(n)
})
this.classList = result
}else{
this.classList = []
}
},
//
open(item) {

@ -48,7 +48,7 @@
<ul class="filter">
<li>
<label>考试状态</label>
<el-select v-model="state" clearable placeholder="请选择考试状态" @change="getData" size="small">
<el-select v-model="state" clearable placeholder="请选择考试状态" @change="initData" size="small">
<el-option label="不限" value=""></el-option>
<el-option v-for="(item,index) in studentStateList" :key="index" :label="item.name" :value="item.id"></el-option>
</el-select>
@ -130,7 +130,7 @@ export default {
keyword: function(val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.getData()
this.initData()
},500)
}
},
@ -174,8 +174,7 @@ export default {
state: this.state,
userId: this.userId
}
this.$post(this.api.monitorList,data)
.then(res => {
this.$post(this.api.monitorList,data).then(res => {
let list = res.data
this.paperName = list.paperName
this.paperScore = list.paperScore
@ -190,6 +189,10 @@ export default {
clearInterval(this.timer)
})
},
initData(){
this.page = 1
this.getData()
},
addLeaveEvent(){
this.timer = setInterval(this.getData,1000)
this.$once('hook:beforeDestroy',() => {
@ -206,7 +209,8 @@ export default {
rollUp(){
if(this.listData.length){
this.$confirm('是否强制终止此次考试?', '提示', {
type: 'warning'
type: 'warning',
customClass: 'normal'
}).then(() => {
this.$post(`${this.api.compulsory}?id=${this.id}`).then(res => {
util.successMsg('强制收卷成功')

@ -50,7 +50,7 @@
<ul class="filter">
<li>
<label>批阅状态</label>
<el-select v-model="state" placeholder="请选择批阅状态" size="small" @change="getData">
<el-select v-model="state" placeholder="请选择批阅状态" size="small" @change="initData">
<el-option label="不限" value=""></el-option>
<el-option v-for="(item,index) in reviewStatusList" :key="index" :label="item.name" :value="item.id"></el-option>
</el-select>
@ -89,7 +89,7 @@
<el-table-column label="操作" width="100">
<template slot-scope="scope">
<el-button type="text" @click="review(scope.row,false)" v-if="scope.row.reviewStatus == 2 || scope.row.reviewStatus == 3">查看</el-button>
<el-button type="text" @click="review(scope.row,true)" v-if="(scope.row.reviewStatus == 0 || scope.row.reviewStatus == 1) && scope.row.examinationStatus == 2">批阅</el-button>
<el-button type="text" @click="review(scope.row,true)" v-if="(scope.row.reviewStatus == 0 || scope.row.reviewStatus == 1) && (scope.row.examinationStatus == 1 || scope.row.examinationStatus == 2)">批阅</el-button>
</template>
</el-table-column>
</el-table>
@ -155,7 +155,7 @@ export default {
keyword: function(val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.getData()
this.initData()
},500)
}
},
@ -164,8 +164,7 @@ export default {
'setReviewInfo'
]),
getData() {
this.$post(`${this.api.reviewList}?pageNum=${this.page}&pageSize=${10000}&userId=${this.userId}&assessmentId=${this.id}&keyword=${this.keyword}&state=${this.state}`)
.then(res => {
this.$post(`${this.api.reviewList}?pageNum=${this.page}&pageSize=${10000}&userId=${this.userId}&assessmentId=${this.id}&keyword=${this.keyword}&state=${this.state}`).then(res => {
let list = res.data.list.list
let result = []
list.map(n => {
@ -176,8 +175,11 @@ export default {
this.listDataAll = result
this.total = result.length
this.handlePage()
})
.catch(err => {})
}).catch(err => {})
},
initData(){
this.page = 1
this.getData()
},
handlePage(){
let list = this.listDataAll

@ -10,13 +10,13 @@
<ul class="filter">
<li>
<label>教学班级</label>
<el-select v-model="classId" placeholder="请选择教学班级" size="small" @change="getData">
<el-select v-model="classId" placeholder="请选择教学班级" size="small" @change="initData">
<el-option v-for="(item,index) in classList" :key="index" :label="item.className" :value="item.classId"></el-option>
</el-select>
</li>
<li>
<label>考试名称</label>
<el-select v-model="assessmentName" clearable placeholder="请选择考试名称" size="small" @change="getData" disabled>
<el-select v-model="assessmentName" clearable placeholder="请选择考试名称" size="small" @change="initData" disabled>
<el-option v-for="(item,index) in assessmentNameList" :key="index" :label="item.assessmentName" :value="item.assessmentName"></el-option>
</el-select>
</li>
@ -106,7 +106,7 @@ export default {
keyword: function(val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.getData()
this.initData()
},500)
}
},
@ -129,6 +129,10 @@ export default {
})
.catch(err => {})
},
initData(){
this.page = 1
this.getData()
},
getClass() {
let classId = this.classIdAss.split(',')
let className = this.classNameAss.split(',')
@ -196,7 +200,5 @@ export default {
</script>
<style lang="scss" scoped>
/deep/.no-mb.el-form-item{
margin-bottom: 0;
}
</style>

@ -6,7 +6,6 @@
<a class="item active">我的考试计划</a>
</div>
<div class="page-content">
<template v-if="listData.length">
<div class="tool">
<ul class="filter">
<li>
@ -15,7 +14,7 @@
</li>
</ul>
</div>
<template v-if="listData.length">
<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
@ -182,7 +181,7 @@ export default {
this.startTime = ''
this.endTime = ''
}
this.getData()
this.initData()
}
},
components: {
@ -190,8 +189,8 @@ export default {
breadcrumb
},
mounted() {
let now = util.formatDate('yyyy-MM-dd')
let second = util.formatDate('yyyy-MM-dd',new Date(new Date().getTime() + 86400000))
let now = util.formatDate('yyyy-MM-dd',new Date(new Date().getTime() - 1296000000))
let second = util.formatDate('yyyy-MM-dd',new Date(new Date().getTime() + 1296000000))
this.date = [now,second]
this.startTime = now
this.endTime = second
@ -221,6 +220,10 @@ export default {
this.total = res.data.list.totalCount
}).catch(err => {})
},
initData(){
this.page = 1
this.getData()
},
handleCurrentChange(val) {
this.page = val
this.getData()

@ -114,7 +114,7 @@
</span>
</el-dialog>
<el-dialog title="试卷详情" :visible.sync="previewVisible" width="95%">
<el-dialog title="试卷详情" :visible.sync="previewVisible" width="95%" custom-class="testpaperDia">
<test-paper-detail :key="previewId"></test-paper-detail>
</el-dialog>
</div>
@ -167,7 +167,8 @@ export default {
assContent: '',
stuCompKey: 1,
previewVisible: false,
previewId: ''
previewId: '',
submiting: false
};
},
components: {
@ -192,7 +193,7 @@ export default {
keyword: function(val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.getData()
this.initData()
},500)
},
keywordPaper: function(val) {
@ -223,6 +224,10 @@ export default {
})
.catch(err => {})
},
initData(){
this.page = 1
this.getData()
},
handleCheck(data){
let professionalStudentIds = []
let gradeIds = []
@ -301,7 +306,7 @@ export default {
},
edit(row){
this.form = JSON.parse(JSON.stringify(row))
this.testPaperName = row.name
this.testPaperName = row.paperName
this.addVisible = true
this.isAdd = false
this.stuCompKey++
@ -333,6 +338,8 @@ export default {
if(form.testPaperId === '') return util.warningMsg('请选择试卷')
if(form.classId === '') return util.warningMsg('请选择发布班级')
if(this.submiting) return false
this.submiting = true
let data = {
practiseId: form.practiseId,
userId: this.userId,
@ -342,18 +349,22 @@ export default {
}
if(this.form.practiseId){
this.$post(this.api.updatePractise, data).then(res => {
this.submiting = false
util.successMsg('修改成功')
this.addVisible = false
this.getData()
}).catch(err => {
this.submiting = false
})
.catch(err => {})
}else{
this.$post(this.api.createPractise, data).then(res => {
this.submiting = false
util.successMsg('创建成功')
this.addVisible = false
this.getData()
}).catch(err => {
this.submiting = false
})
.catch(err => {})
}
},
closeAdd(){
@ -423,7 +434,6 @@ export default {
},
addEvent(){
this.$once('hook:beforeDestroy',() => {
console.log(11)
this.setClassInfo({
classId: '',
className: ''
@ -467,4 +477,8 @@ export default {
}
}
}
// /deep/.testpaperDia{
// width: calc(100% - 220px) !important;
// margin-left: 240px;
// }
</style>

@ -6,7 +6,7 @@
<div v-for="(item,index) in classList" :key="index">
<div class="item" @click.stop="open(item)">
<i :class="item.ischeck ? 'checked' : 'checkbox'" @click.stop="fircheckitem(item)"></i>
<span>{{item.label}}</span>
<span>{{item.label}}</span>
</div>
</div>
</div>
@ -31,7 +31,7 @@
<div v-for="(item2,index2) in item1.children" :key="index2">
<div class="item2" @click.stop="open(item2)">
<i :class="item2.ischeck ? 'checked' : 'checkbox'" @click.stop="threecheckitem(item2)"></i>
<span>{{item2.label}}</span>
<span>{{item2.label}}</span>
</div>
</div>
</div>
@ -82,12 +82,18 @@ export default {
},
methods: {
fuzzyQuery(){
if(this.keyword){
let list = this.allClassList
let result = []
list.map((n,i) => {
if(n.label.includes(this.keyword)) result.push(n)
})
this.$nextTick(() => {
this.classList = result
})
}else{
this.classList = []
}
},
//
open(item) {

@ -10,7 +10,7 @@
<ul class="filter">
<li>
<label>批阅状态</label>
<el-select v-model="state" placeholder="请选择批阅状态" size="small" @change="getData">
<el-select v-model="state" placeholder="请选择批阅状态" size="small" @change="initData">
<el-option label="不限" value="3"></el-option>
<el-option v-for="(item,index) in reviewStatusList" :key="index" :label="item.name" :value="item.id"></el-option>
</el-select>
@ -110,6 +110,10 @@ export default {
this.handlePage()
}).catch(err => {})
},
initData(){
this.page = 1
this.getData()
},
handlePage(){
let list = this.listDataAll
this.listData = list.slice((this.page - 1) * this.pageSize,this.page * this.pageSize)

@ -10,7 +10,7 @@
<ul class="filter">
<li>
<label>批阅状态</label>
<el-select v-model="state" placeholder="请选择批阅状态" size="small" @change="getData">
<el-select v-model="state" placeholder="请选择批阅状态" size="small" @change="initData">
<el-option label="不限" value="3"></el-option>
<el-option v-for="(item,index) in reviewStatusList" :key="index" :label="item.name" :value="item.id"></el-option>
</el-select>
@ -97,7 +97,7 @@ export default {
keyword: function(val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.getData()
this.initData()
},500)
}
},
@ -110,13 +110,19 @@ export default {
let list = res.data.list.list
let result = []
list.map(n => {
result.find(e => e.userId == n.userId) || result.push(n)
if(!result.find(e => e.userId == n.userId) && (this.state == 3 || n.reviewStatus == this.state)){
result.push(n)
}
})
this.listDataAll = result
this.total = result.length
this.handlePage()
}).catch(err => {})
},
initData(){
this.page = 1
this.getData()
},
handlePage(){
let list = this.listDataAll
this.listData = list.slice((this.page - 1) * this.pageSize,this.page * this.pageSize)

@ -10,7 +10,7 @@
<ul class="filter">
<li>
<label>教学班级</label>
<el-select v-model="classId" placeholder="请选择教学班级" size="small" @change="getData">
<el-select v-model="classId" placeholder="请选择教学班级" size="small" @change="initData">
<el-option v-for="(item,index) in classList" :key="index" :label="item.className" :value="item.classId"></el-option>
</el-select>
</li>
@ -61,15 +61,6 @@
</div>
<el-dialog title="练习成绩详情" :visible.sync="detailVisible" width="800px" :close-on-click-modal="false">
<div class="tool">
<ul class="filter">
<li>
<label>搜索</label>
<el-input placeholder="请输入练习项目名称" prefix-icon="el-icon-search" v-model="keywordAch" clearable size="small"></el-input>
</li>
</ul>
</div>
<el-table :data="achiList" ref="table" row-key="id" class="table" stripe header-align="center">
<el-table-column type="index" width="100" label="序号" align="center">
<template
@ -119,7 +110,6 @@ export default {
total: 0,
searchTimer: null,
detailVisible: false,
keywordAch: '',
achiList: [],
multipleSelectionAch: [],
pageAch: 1,
@ -145,13 +135,7 @@ export default {
keyword: function(val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.getData()
},500)
},
keywordAch: function(val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.getData()
this.initData()
},500)
}
},
@ -167,6 +151,10 @@ export default {
})
.catch(err => {})
},
initData(){
this.page = 1
this.getData()
},
getClass() {
let classId = this.classIdAss.split(',')
let className = this.classNameAss.split(',')
@ -195,8 +183,7 @@ export default {
this.detailVisible = true
},
getDetail(row){
this.$post(`${this.api.AchievementDetail}?userId=${row.userId}&practiseId=${this.practiseId}&pageNum=${this.page}&pageSize=${this.pageSize}`)
.then(res => {
this.$post(`${this.api.AchievementDetail}?userId=${row.userId}&practiseId=${this.practiseId}&pageNum=${this.page}&pageSize=${this.pageSize}`).then(res => {
this.achiList = res.data.list.list
this.totalAch = res.data.list.totalCount
}).catch(err => {})

@ -4,14 +4,14 @@
<ul class="filter">
<li>
<label>创建人</label>
<el-select v-model="createUser" clearable placeholder="请选择创建人" size="small" @change="getData">
<el-select v-model="createUser" clearable placeholder="请选择创建人" size="small" @change="initData">
<el-option label="不限" value=""></el-option>
<el-option v-for="(item,index) in createUserList" :key="index" :label="item.name" :value="item.name"></el-option>
</el-select>
</li>
<li>
<label>题目类型</label>
<el-select v-model="name" clearable placeholder="请选择题目类型" size="small" @change="getData">
<el-select v-model="name" clearable placeholder="请选择题目类型" size="small" @change="initData">
<el-option label="不限" value=""></el-option>
<el-option v-for="(item,index) in typeList" :key="index" :label="item.name" :value="item.name"></el-option>
</el-select>
@ -29,7 +29,11 @@
<el-table :data="listData" class="table" ref="table" stripe header-align="center" row-key="id" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="80" align="center" :reserve-selection="true" :selectable="disabledSelection"></el-table-column>
<el-table-column type="index" width="60" label="序号" align="center"></el-table-column>
<el-table-column prop="questionStem" :show-overflow-tooltip="true" width="300" label="题干" align="center"></el-table-column>
<el-table-column prop="questionStem" :show-overflow-tooltip="true" width="300" label="题干" align="center">
<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="courses" label="对应课程" width="140" align="center"></el-table-column>
<el-table-column prop="typeName" label="所属题库" min-width="140" align="center"></el-table-column>
@ -45,8 +49,7 @@
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background @current-change="handleCurrentChange" :current-page="page" layout="total, prev, pager, next" :total="total">
</el-pagination>
<el-pagination background @current-change="handleCurrentChange" :current-page="page" layout="total, prev, pager, next" :total="total"></el-pagination>
</div>
<el-dialog title="查看题目" :visible.sync="visible" width="870px" class="dialog" :close-on-click-modal="false">
@ -138,7 +141,7 @@ export default {
keyword: function(val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.getData()
this.initData()
},500)
}
},
@ -153,22 +156,35 @@ export default {
schoolId: this.clientId
})
.then(res => {
this.listData = util.removeHtmlTag(res.data.list.list,'questionStem')
let list = util.removeHtmlTag(res.data.list.list,'questionStem')
list.map(n => {
n.questionStem = n.questionStem.replace(/\(\)\(\)\(\)/g,`______`)
})
this.listData = list
this.total = res.data.list.totalCount
if(!this.listData.length && this.total){
this.page--
this.getData()
}
})
.catch(err => {})
},
initData(){
this.page = 1
this.getData()
},
getType() {
this.$get(this.api.typesList).then(res => {
this.typeList = res.data.list
}).catch(err => {})
},
handleCurrentChange(val) {
this.page = val;
this.getData();
this.page = val
this.$refs.table.clearSelection()
this.getData()
},
handleSelectionChange(val) {
this.multipleSelection = val;
this.multipleSelection = val
},
disabledSelection(row,index){
if(row.createUser == '超竞教育') return false
@ -222,7 +238,8 @@ export default {
pageNum: 1,
pageSize: 10000,
schoolId: this.clientId,
source: 2
source: 2,
keyword: ''
}
this.$post(this.api.listByPage,data).then(res => {
let list = res.data.list.list
@ -325,6 +342,9 @@ export default {
max-width: calc(100% - 80px);
font-size: 16px;
color: rgba(0, 0, 0, 0.65);
/deep/img{
max-width: 100%;
}
}
}
}

@ -4,7 +4,7 @@
<ul class="filter">
<li>
<label>题目类型</label>
<el-select v-model="typeId" clearable placeholder="请选择题目类型" size="small" @change="getData">
<el-select v-model="typeId" clearable placeholder="请选择题目类型" size="small" @change="initData">
<el-option label="不限" value=""></el-option>
<el-option v-for="(item,index) in typeList" :key="index" :label="item.name" :value="item.name"></el-option>
</el-select>
@ -27,7 +27,11 @@
<el-table-column type="index" width="60" label="序号" align="center">
<template slot-scope="scope">{{scope.$index + (page - 1) * pageSize + 1}}</template>
</el-table-column>
<el-table-column prop="questionStem" :show-overflow-tooltip="true" label="题干" width="300" align="center"></el-table-column>
<el-table-column prop="questionStem" :show-overflow-tooltip="true" label="题干" width="300" align="center">
<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="courses" label="对应课程" width="140" align="center"></el-table-column>
<el-table-column prop="typeName" label="所属题库" min-width="140" align="center"></el-table-column>
@ -156,7 +160,7 @@ export default {
keyword: function(val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.getData()
this.initData()
},500)
}
},
@ -171,11 +175,23 @@ export default {
schoolId: this.clientId
})
.then(res => {
this.listData = util.removeHtmlTag(res.data.list.list,'questionStem')
let list = util.removeHtmlTag(res.data.list.list,'questionStem')
list.map(n => {
n.questionStem = n.questionStem.replace(/\(\)\(\)\(\)/g,`______`)
})
this.listData = list
this.total = res.data.list.totalCount
if(!this.listData.length && this.total){
this.page--
this.getData()
}
})
.catch(err => {})
},
initData(){
this.page = 1
this.getData()
},
getType() {
this.$get(this.api.typesList)
.then(res => {
@ -185,6 +201,7 @@ export default {
},
handleCurrentChange(val) {
this.page = val
this.$refs.table.clearSelection()
this.getData()
},
dialogGetData(){
@ -207,7 +224,8 @@ export default {
pageNum: 1,
pageSize: 10000,
schoolId: this.clientId,
source: 2
source: 2,
keyword: ''
}
this.$post(this.api.listByPage,data).then(res => {
let list = res.data.list.list
@ -461,6 +479,9 @@ export default {
max-width: calc(100% - 80px);
font-size: 16px;
color: rgba(0, 0, 0, 0.65);
/deep/img{
max-width: 100%;
}
}
}
}

@ -93,7 +93,7 @@ export default {
keyword: function(val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.getData()
this.initData()
},500)
}
},
@ -133,9 +133,17 @@ export default {
}
})
this.listData = original
if(!this.listData.length && this.total){
this.page--
this.getData()
}
}).catch(err => {})
}).catch(err => {})
},
initData(){
this.page = 1
this.getData()
},
handleCurrentChange(val) {
this.page = val
this.getData()

@ -248,7 +248,8 @@ export default {
pageNum: 1,
pageSize: 10000,
schoolId: this.clientId,
source: 2
source: 2,
keyword: ''
}
this.$post(this.api.listByPage,data).then(res => {
let list = res.data.list.list

@ -94,7 +94,7 @@
</span>
</el-dialog>
<el-dialog title="批量导入" :visible.sync="importVisible" width="400px" :close-on-click-modal="false">
<el-dialog title="批量导入" :visible.sync="importVisible" width="400px" @close="closeImport" :close-on-click-modal="false">
<div class="upload-wrap" :class="{lg: uploadFaild}">
<el-button class="download" size="small" @click="downLoad"><img src="../../../assets/img/download.png" alt=""> 模板下载</el-button>
<el-upload accept=".xls,.xlsx" :on-remove="handleRemove" :on-error="uploadError" :on-success="uploadSuccess" :before-remove="beforeRemove" :limit="1" :on-exceed="handleExceed" :action="this.api.uploadFileStudent" :file-list="uploadList" :data="{schoolId: this.clientId}" name="file">
@ -216,7 +216,7 @@ export default {
keyword: function(val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.getData()
this.initData()
},500)
}
},
@ -276,11 +276,19 @@ export default {
this.$get(`${this.api.queryStudent}/${this.page}/${this.pageSize}`,data).then(res => {
this.listData = res.data.studentList.list
this.total = res.data.studentList.totalCount
if(!this.listData.length && this.total){
this.page--
this.getData()
}
}).catch(res => {})
},
initData(){
this.page = 1
this.getData()
},
orgChange(node){
this.classIds = node.map(n => n[2]).toString()
this.getData()
this.initData()
},
closestudent(){
this.$refs.studentForm.resetFields()
@ -314,7 +322,10 @@ export default {
}).catch(res => {});
},
resetPassword(row){
this.$confirm(`重置后的密码为:${Setting.initialPassword},确定重置?`, '提示',).then(() => {
this.$confirm(`重置后的密码为:${Setting.initialPassword},确定重置?`, '提示', {
type: 'info',
customClass: 'normal'
}).then(() => {
let data = {
userId: row.userId,
password: Setting.initialPassword
@ -465,7 +476,7 @@ export default {
studentIds: delList.join()
}
this.$del(this.api.deleteStudents,data).then(res => {
this.multipleSelection = []
this.$refs.table.clearSelection()
util.successMsg('删除成功')
this.getData()
}).catch(res => {});
@ -482,8 +493,9 @@ export default {
this.getData()
},
handleCurrentChange(val) {
this.page = val;
this.getData();
this.page = val
this.$refs.table.clearSelection()
this.getData()
},
downLoad(){
location.href = this.api.downloadStudentTemp
@ -524,6 +536,9 @@ export default {
this.uploadList = fileList
this.uploadFaild = false
},
closeImport(){
this.uploadList = []
},
uploadSure(){
this.importVisible = false
this.page = 1

@ -13,7 +13,7 @@
</div>
</div>
<el-table :data="roleData" class="table" stripe header-align="center" @selection-change="handleSelectionChange" :row-key="getRowKeys">
<el-table :data="roleData" class="table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange" :row-key="getRowKeys">
<el-table-column type="selection" width="80" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center">
</el-table-column>
@ -35,7 +35,7 @@
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background @current-change="currentChange" :current-page="pageNo" layout="total, prev, pager, next" :total="totals">
<el-pagination background @current-change="currentChange" :current-page="page" layout="total, prev, pager, next" :total="total">
</el-pagination>
</div>
@ -88,9 +88,9 @@ export default {
children: 'children',
label: 'name'
},
pageNo: 1,
page: 1,
pageSize: 10,
totals: 0,
total: 0,
multipleSelection: [],
importVisible: false,
isAdd: true,
@ -109,7 +109,7 @@ export default {
keyword: function(val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.getData()
this.initData()
},500)
}
},
@ -124,11 +124,19 @@ export default {
if(this.keyword.length){
data.name = this.keyword
}
this.$get(`${this.api.queryRoles}/${this.pageNo}/${this.pageSize}`,data).then(res => {
this.$get(`${this.api.queryRoles}/${this.page}/${this.pageSize}`,data).then(res => {
this.roleData = res.data.items
this.totals = res.data.total
this.total = res.data.total
if(!this.roleData.length && this.total){
this.page--
this.getData()
}
}).catch(res => {});
},
initData(){
this.page = 1
this.getData()
},
closeRole(){
this.isDetail = false
this.form = {
@ -140,8 +148,9 @@ export default {
this.permissions = []
},
currentChange(val) {
this.pageNo = val;
this.getData();
this.page = val
this.$refs.table.clearSelection()
this.getData()
},
getPer(){
if(!this.permissions.length){
@ -253,13 +262,14 @@ export default {
.then(() => {
this.$del(`${this.api.removeRole}?roleIds=${delList.join()}`).then(res => {
if(res.success){
util.successMsg('删除成功');
this.$refs.table.clearSelection()
util.successMsg('删除成功')
this.getData()
}
}).catch(res => {})
}).catch(() => {});
}else{
util.errorMsg('请先选择数据 !');
util.errorMsg('请先选择数据 !')
}
}
}

@ -18,7 +18,7 @@
</div>
</div>
<el-table :data="listData" class="table" stripe header-align="center" @selection-change="handleSelectionChange">
<el-table :data="listData" class="table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="80" align="center"></el-table-column>
<el-table-column type="index" label="序号" width="55" align="center">
</el-table-column>
@ -51,7 +51,7 @@
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background layout="total,prev, pager, next" :current-page="pageNo" @current-change="handleCurrentChange" :total="total">
<el-pagination background layout="total,prev, pager, next" :current-page="page" @current-change="handleCurrentChange" :total="total">
</el-pagination>
</div>
@ -147,7 +147,7 @@
</ul>
</el-dialog>
<el-dialog title="批量导入" :visible.sync="importVisible" width="400px" :close-on-click-modal="false">
<el-dialog title="批量导入" :visible.sync="importVisible" width="400px" @close="closeImport" :close-on-click-modal="false">
<div class="upload-wrap" :class="{lg: uploadFaild}">
<el-button class="download" size="small" @click="downLoad"><img src="../../../assets/img/download.png" alt=""> 模板下载</el-button>
<el-upload accept=".xls,.xlsx" :on-remove="handleRemove" :on-error="uploadError" :on-success="uploadSuccess" :before-remove="beforeRemove" :limit="1" :on-exceed="handleExceed" :action="this.api.uploadFileStaff" :file-list="uploadList" :data="{schoolId: this.clientId}" name="file">
@ -249,7 +249,7 @@ export default {
listData: [],
importVisible: false,
keyword: '',
pageNo: 1,
page: 1,
pageSize: 10,
total: 0,
departmentList: [],
@ -334,32 +334,32 @@ export default {
},
getData(){
let totalPage = Math.ceil((this.total - 1) / this.pageSize)
let currentPage = this.pageNo > totalPage ? totalPage : this.pageNo
this.pageNo = currentPage < 1 ? 1 : currentPage
let currentPage = this.page > totalPage ? totalPage : this.page
this.page = currentPage < 1 ? 1 : currentPage
let data = {
staffProfessionalArchitectureIds: this.oneDepartmentIds,
staffGradeIds: this.twoDepartmentIds,
searchContent: this.keyword,
schoolId: this.clientId,
pageNum: this.pageNo,
pageNum: this.page,
pageSize: this.pageSize
}
this.$get(`${this.api.queryStaff}/${this.pageNo}/${this.pageSize}`,data).then(res => {
this.$get(`${this.api.queryStaff}/${this.page}/${this.pageSize}`,data).then(res => {
this.listData = res.data.staffList.list
this.total = res.data.staffList.totalCount
if(!this.listData.length && this.total){
this.pageNo--
this.page--
this.getData()
}
}).catch(res => {});
}).catch(res => {})
},
initData(){
this.pageNo = 1
this.page = 1
this.getData()
},
orgChange(node){
this.twoDepartmentIds = node.map(n => n[1]).toString()
this.getData()
this.initData()
},
getRoles(){
let data = {
@ -367,10 +367,12 @@ export default {
}
this.$get(`${this.api.queryRoles}/1/100`,data).then(res => {
this.roleList = res.data.items
}).catch(res => {});
}).catch(res => {})
},
resetPassword(row){
this.$confirm(`重置后的密码为:${Setting.initialPassword},确定重置?`, '提示', {
type: 'info',
customClass: 'normal'
}).then(() => {
let data = {
userId: row.userId,
@ -382,9 +384,8 @@ export default {
}else{
util.errorMsg('重置失败')
}
}).catch(res => {});
}).catch(() => {
});
}).catch(res => {})
}).catch(() => {})
},
accountChange(){
if(this.teacherForm.userAccount !== this.originalAccount){
@ -395,7 +396,7 @@ export default {
}else{
this.accountRepeat = false
}
}).catch(res => {});
}).catch(res => {})
}else{
this.accountRepeat = false
}
@ -409,7 +410,7 @@ export default {
}else{
this.workNumberRepeat = false
}
}).catch(res => {});
}).catch(res => {})
}else{
this.workNumberRepeat = false
}
@ -573,7 +574,7 @@ export default {
staffIds: delList.join(',')
}
this.$del(this.api.deleteStaffs,data).then(res => {
this.multipleSelection = [];
this.$refs.table.clearSelection()
util.successMsg('删除成功')
this.getData()
}).catch(res => {});
@ -588,12 +589,13 @@ export default {
this.uploadFaild = false
},
searchTeacher(){
this.pageNo = 1;
this.page = 1
this.getData()
},
handleCurrentChange(val) {
this.pageNo = val;
this.getData();
this.page = val
this.$refs.table.clearSelection()
this.getData()
},
downLoad(){
location.href = this.api.downloadStaffTemp
@ -634,9 +636,12 @@ export default {
this.uploadList = fileList
this.uploadFaild = false
},
closeImport(){
this.uploadList = []
},
uploadSure(){
this.importVisible = false
this.pageNo = 1
this.page = 1
this.keyword = ''
this.getData()
}

@ -59,7 +59,11 @@
<el-table-column type="selection" width="80" align="center" :reserve-selection="true"></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="questionStem" width="300" label="题干" align="center" :show-overflow-tooltip="true"></el-table-column>
<el-table-column prop="questionStem" width="300" label="题干" align="center" :show-overflow-tooltip="true">
<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="courses" label="对应课程" min-width="120" align="center"></el-table-column>
<el-table-column prop="knowledgePoints" label="知识点" width="120" align="center"></el-table-column>
@ -120,28 +124,28 @@
<ul class="filter">
<li>
<label>课程名称</label>
<el-select v-model="selectManual.courses" clearable placeholder="请选择课程名称" size="small" @change="getManualData">
<el-select v-model="selectManual.courses" clearable placeholder="请选择课程名称" size="small" @change="initData">
<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>
</li>
<li>
<label>知识点</label>
<el-select v-model="selectManual.knowledgePoints" clearable placeholder="请选择知识点" size="small" @change="getManualData">
<el-select v-model="selectManual.knowledgePoints" clearable placeholder="请选择知识点" size="small" @change="initData">
<el-option label="不限" value=""></el-option>
<el-option v-for="(item,index) in pointList" :key="index" :label="item.knowledgePoint" :value="item.knowledgePoint"></el-option>
</el-select>
</li>
<li>
<label>试题类型</label>
<el-select v-model="selectManual.name" clearable placeholder="请选择试题类型" size="small" @change="getManualData">
<el-select v-model="selectManual.name" clearable placeholder="请选择试题类型" size="small" @change="initData">
<el-option label="不限" value=""></el-option>
<el-option v-for="(item,index) in nameList" :key="index" :label="item.name" :value="item.name"></el-option>
</el-select>
</li>
<li>
<label>所属题库</label>
<el-select v-model="selectManual.typeName" clearable placeholder="请选择所属题库" size="small" @change="getManualData">
<el-select v-model="selectManual.typeName" clearable placeholder="请选择所属题库" size="small" @change="initData">
<el-option label="不限" value=""></el-option>
<el-option v-for="(item,index) in quesBankList" :key="index" :label="item.typeName" :value="item.typeName"></el-option>
</el-select>
@ -161,7 +165,11 @@
>{{scope.$index + (page - 1) * pageSize + 1}}</template>
</el-table-column>
<el-table-column prop="questionSource" label="题库来源" align="center"></el-table-column>
<el-table-column prop="questionStem" width="300" label="题干" align="center" :show-overflow-tooltip="true"></el-table-column>
<el-table-column prop="questionStem" width="300" label="题干" align="center" :show-overflow-tooltip="true">
<template slot-scope="scope">
<div class="ellipsis" 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="courses" label="对应课程" align="center"></el-table-column>
<el-table-column prop="knowledgePoints" label="知识点" align="center"></el-table-column>
@ -170,14 +178,7 @@
<el-table-column prop="createUser" label="创建人" align="center"></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>
<el-pagination background @current-change="handleCurrentChange" :current-page="page" :page-size="pageSize" layout="total,prev, pager, next" :total="total"></el-pagination>
</div>
<span slot="footer" class="dialog-footer">
@ -379,7 +380,7 @@ export default {
keyword: function(val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.getManualData()
this.initData()
},500)
}
},
@ -419,7 +420,11 @@ export default {
userId: this.userId
}
this.$post(this.api.getModifyByList, data).then(res => {
this.selectedData = util.removeHtmlTag(res.data.list,'questionStem')
let list = util.removeHtmlTag(res.data.list,'questionStem')
list.map(n => {
n.questionStem = n.questionStem.replace(/\(\)\(\)\(\)/g,`______`)
})
this.selectedData = list
this.computeTypeCount()
})
.catch(err => {})
@ -505,11 +510,19 @@ export default {
userId: this.userId,
}
this.$post(this.api.pageByChoiceList,data).then(res => {
this.listData = util.removeHtmlTag(res.data.list.list,'questionStem')
let list = util.removeHtmlTag(res.data.list.list,'questionStem')
list.map(n => {
n.questionStem = n.questionStem.replace(/\(\)\(\)\(\)/g,`______`)
})
this.listData = list
this.total = res.data.list.totalCount
this.$refs.listTable.clearSelection()
}).catch(err => {})
},
initData(){
this.page = 1
this.getManualData()
},
disabledSelection(row,index){
let selectedData = this.selectedData
if(selectedData.find(n => n.id == row.id)) return false
@ -539,11 +552,11 @@ export default {
},
preview(){
if(!this.selectedData.length) return util.errorMsg('请先添加试题')
this.$post(`${this.api.previewPaper}?qid=${this.selectedData.map(n => n.id).join(',')}`)
.then(res => {
this.$post(`${this.api.previewPaper}?qid=${this.selectedData.map(n => n.id).join(',')}`).then(res => {
this.setInfo({
paperName: this.name,
totalDuration: this.duration
totalDuration: this.duration,
score: this.totalScore ? this.totalScore : 0
})
this.previewIndex++
this.previewList = res.data
@ -558,12 +571,12 @@ export default {
this.multipleSelection = val
},
getSelectFilter(){
this.$post(`${this.api.getSelectInfo}?type=1`)
this.$post(`${this.api.getSelectInfo}?type=1&schoolId=${this.clientId}`)
.then(res => {
this.pointList = res.data.pointList
}).catch(err => {})
this.$post(`${this.api.getSelectInfo}?type=2`)
this.$post(`${this.api.getSelectInfo}?type=2&schoolId=${this.clientId}`)
.then(res => {
this.courseList = res.data.pointList
}).catch(err => {})
@ -952,22 +965,20 @@ export default {
color: #444;
font-size: 12px;
input{
width: 80px;
width: 56px;
height: 30px;
padding: 0 10px;
margin: 0 10px;
line-height: 30px;
border: 1px solid #e8e8e8;
border: 1px solid rgba(0, 0, 0, 0.15);
border-radius: 4px;
background-color: #fff;
box-sizing: border-box;
&:focus{
outline: none;
}
&:disabled{
width: 56px;
background-color: rgba(0, 0, 0, 0.04);
border: 1px solid rgba(0, 0, 0, 0.15);
border-radius: 4px;
cursor: not-allowed;
}
}

@ -4,21 +4,21 @@
<ul class="filter">
<li>
<label>所属课程</label>
<el-select v-model="cid" clearable placeholder="请选择所属课程" size="small" @change="getData">
<el-select v-model="cid" clearable placeholder="请选择所属课程" size="small" @change="initData">
<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>
</li>
<li>
<label>试卷状态</label>
<el-select v-model="state" clearable placeholder="请选择试卷状态" size="small" @change="getData">
<el-select v-model="state" clearable placeholder="请选择试卷状态" size="small" @change="initData">
<el-option label="不限" value=""></el-option>
<el-option v-for="(item,index) in statusList" :key="index" :label="item.name" :value="item.id"></el-option>
</el-select>
</li>
<li>
<label>试卷用途</label>
<el-select v-model="effect" clearable placeholder="请选择试卷用途" size="small" @change="getData">
<el-select v-model="effect" clearable placeholder="请选择试卷用途" size="small" @change="initData">
<el-option label="不限" value=""></el-option>
<el-option v-for="(item,index) in effectList" :key="index" :label="item.label" :value="item.id"></el-option>
</el-select>
@ -117,7 +117,7 @@ export default {
keyword: function(val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.getData()
this.initData()
},500)
},
date: function(val){
@ -128,7 +128,7 @@ export default {
this.startTime = ''
this.endTime = ''
}
this.getData()
this.initData()
}
},
methods: {
@ -153,8 +153,16 @@ export default {
.then(res => {
this.listData = res.data.list.list
this.total = res.data.list.totalCount
if(!this.listData.length && this.total){
this.page--
this.getData()
}
}).catch(err => {})
},
initData(){
this.page = 1
this.getData()
},
handleSelecteChange(val){
this.multipleSelection = val;
},
@ -200,9 +208,9 @@ export default {
data.briefAnswerNum = briefCount
this.$post(this.api.modifyState,data).then(res => {
if(row.effect){
util.successMsg(`练习${row.name}”已成功发布,请于练习管理列表中查看`)
util.successMsg(`${row.name}”已发布,您可在“ 练习管理>创建练习” 菜单中用此练习卷创建新的练习`)
}else{
util.successMsg(`考试${row.name}”已成功发布,请于考试管理列表中查看`)
util.successMsg(`${row.name}”已发布,您可在 “考试管理>创建考试” 菜单中用此考试卷创建新的考试`)
}
this.getData()
}).catch(res => {})
@ -213,12 +221,34 @@ export default {
}).catch(err => {})
},
preview(row){
let totalScore = 100
this.$post(`${this.api.detailtestPaper}?id=${row.id}`).then(res => {
let qid = res.data.list.qid
if(qid){
let data = {
ids: qid.split(','),
schoolId: this.clientId,
userId: this.userId
}
this.$post(this.api.getModifyByList, data).then(res => {
let selected = res.data.list
let singleCount = selected.filter(n => n.name == '单项选择').length
let multipleCount = selected.filter(n => n.name == '多项选择').length
let fillBlankCount = selected.filter(n => n.name == '填空题').length
let judgeCount = selected.filter(n => n.name == '判断题').length
let briefCount = selected.filter(n => n.name == '简答题').length
totalScore = singleCount * row.singleChoiceScore + multipleCount * row.multipleChoiceScore + fillBlankCount * row.fillBlanksScore + judgeCount * row.judgeScore + briefCount * row.briefAnswerScore
this.setInfo({
id: row.id,
paperName: row.name,
totalDuration: row.duration
totalDuration: row.duration,
score: totalScore
})
this.$router.push('show')
}).catch(err => {})
}
}).catch(err => {})
},
review(row){
this.$router.push('review')

@ -4,8 +4,8 @@
<div class="testpaper" id="pdfDom">
<h1 class="title">{{paperName}}</h1>
<ul class="types">
<li>
<h6 class="type">单选题</h6>
<li v-if="paperList.list1.length">
<h6 class="type">{{paperList.list1[0].serial}}单选题</h6>
<ul class="ques">
<li v-for="(item,index) in paperList.list1" :key="index">
<div class="stem">
@ -18,8 +18,8 @@
</li>
</ul>
</li>
<li>
<h6 class="type">多选题</h6>
<li v-if="paperList.list2.length">
<h6 class="type">{{paperList.list2[0].serial}}多选题</h6>
<ul class="ques">
<li v-for="(item,index) in paperList.list2" :key="index">
<div class="stem">
@ -32,8 +32,8 @@
</li>
</ul>
</li>
<li>
<h6 class="type">填空题</h6>
<li v-if="paperList.list3.length">
<h6 class="type">{{paperList.list3[0].serial}}填空题</h6>
<ul class="ques">
<li v-for="(item,index) in paperList.list3" :key="index">
<div class="stem">
@ -46,8 +46,8 @@
</li>
</ul>
</li>
<li>
<h6 class="type">判断题</h6>
<li v-if="paperList.list4.length">
<h6 class="type">{{paperList.list4[0].serial}}判断题</h6>
<ul class="ques">
<li v-for="(item,index) in paperList.list4" :key="index">
<div class="stem">
@ -60,8 +60,8 @@
</li>
</ul>
</li>
<li>
<h6 class="type">简答题</h6>
<li v-if="paperList.list5.length">
<h6 class="type">{{paperList.list5[0].serial}}简答题</h6>
<ul class="ques">
<li v-for="(item,index) in paperList.list5" :key="index">
<div class="stem">
@ -82,21 +82,21 @@
<ul class="filter">
<li>
<label>所属课程</label>
<el-select v-model="cid" clearable placeholder="请选择所属课程" size="small" @change="getData">
<el-select v-model="cid" clearable placeholder="请选择所属课程" size="small" @change="initData">
<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>
</li>
<li>
<label>试卷状态</label>
<el-select v-model="state" clearable placeholder="请选择试卷状态" size="small" @change="getData">
<el-select v-model="state" clearable placeholder="请选择试卷状态" size="small" @change="initData">
<el-option label="不限" value=""></el-option>
<el-option v-for="(item,index) in statusList" :key="index" :label="item.name" :value="item.id"></el-option>
</el-select>
</li>
<li>
<label>试卷用途</label>
<el-select v-model="effect" clearable placeholder="请选择试卷用途" size="small" @change="getData">
<el-select v-model="effect" clearable placeholder="请选择试卷用途" size="small" @change="initData">
<el-option label="不限" value=""></el-option>
<el-option v-for="(item,index) in effectList" :key="index" :label="item.label" :value="item.id"></el-option>
</el-select>
@ -116,7 +116,7 @@
</div>
</div>
<el-table :data="listData" class="table" stripe header-align="center" row-key="id" @selection-change="handleSelecteChange">
<el-table :data="listData" class="table" ref="table" stripe header-align="center" row-key="id" @selection-change="handleSelecteChange">
<el-table-column type="selection" width="80" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column>
<el-table-column prop="name" label="试卷名称" align="center"></el-table-column>
@ -233,7 +233,7 @@ export default {
keyword: function(val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.getData()
this.initData()
},500)
},
date: function(val){
@ -244,7 +244,7 @@ export default {
this.startTime = ''
this.endTime = ''
}
this.getData()
this.initData()
}
},
methods: {
@ -265,12 +265,19 @@ export default {
this.endTime && (data.endTime = this.endTime)
this.state !== '' && (data.state = this.state)
this.$post(this.api.pageBygetMeTestPaper,data)
.then(res => {
this.$post(this.api.pageBygetMeTestPaper,data).then(res => {
this.listData = res.data.list.list
this.total = res.data.list.totalCount
if(!this.listData.length && this.total){
this.page--
this.getData()
}
}).catch(err => {})
},
initData(){
this.page = 1
this.getData()
},
handleSelecteChange(val){
this.multipleSelection = val
},
@ -283,6 +290,7 @@ export default {
},
handleCurrentChange(val) {
this.page = val
this.$refs.table.clearSelection()
this.getData()
},
delData(row) {
@ -323,10 +331,16 @@ export default {
.then(res => {
let list = res.data
let reg = /<img src=".*?">/gi
for(let i in list){
let index = 0
let serialList = ['一','二','三','四','五']
let listIndex = ['list1','list2','list3','list4','list5']
listIndex.map(i => {
if(list[i].length){
list[i][0].serial = serialList[index]
index++
}
list[i].map(n => {
let src = reg.exec(n.questionStem)
// n.questionStem = n.questionStem.replace(/<img.*?(?:>|\/>)/gi,'')
if(src){
src = src[0].replace('<img src="','').replace('">','')
getUrlBase64(src, 'jpg', function (base64) {
@ -334,7 +348,7 @@ export default {
})
}
})
}
})
this.paperList = list
this.handleOptions()
var title = row.name
@ -387,7 +401,7 @@ export default {
})
.then(() => {
this.$post(`${this.api.delByMyTestPaper}?ids=${delList.join()}`).then(res => {
this.multipleSelection = []
this.$refs.table.clearSelection()
util.successMsg('删除成功')
this.getData()
}).catch(res => {})
@ -397,8 +411,7 @@ export default {
}
},
publish(row){
this.$post(`${this.api.detailtestPaper}?id=${row.id}`)
.then(res => {
this.$post(`${this.api.detailtestPaper}?id=${row.id}`).then(res => {
let qid = res.data.list.qid
if(qid){
let data = {
@ -427,9 +440,9 @@ export default {
data.briefAnswerNum = briefCount
this.$post(this.api.modifyState,data).then(res => {
if(row.effect){
util.successMsg(`练习${row.name}”已成功发布,请于练习管理列表中查看`)
util.successMsg(`${row.name}”已发布,您可在“ 练习管理>创建练习” 菜单中用此练习卷创建新的练习`)
}else{
util.successMsg(`考试${row.name}”已成功发布,请于考试管理列表中查看`)
util.successMsg(`${row.name}”已发布,您可在 “考试管理>创建考试” 菜单中用此考试卷创建新的考试`)
}
this.getData()
}).catch(res => {})
@ -440,16 +453,38 @@ export default {
}).catch(err => {})
},
preview(row){
let totalScore = 100
this.$post(`${this.api.detailtestPaper}?id=${row.id}`).then(res => {
let qid = res.data.list.qid
if(qid){
let data = {
ids: qid.split(','),
schoolId: this.clientId,
userId: this.userId
}
this.$post(this.api.getModifyByList, data).then(res => {
let selected = res.data.list
let singleCount = selected.filter(n => n.name == '单项选择').length
let multipleCount = selected.filter(n => n.name == '多项选择').length
let fillBlankCount = selected.filter(n => n.name == '填空题').length
let judgeCount = selected.filter(n => n.name == '判断题').length
let briefCount = selected.filter(n => n.name == '简答题').length
totalScore = singleCount * row.singleChoiceScore + multipleCount * row.multipleChoiceScore + fillBlankCount * row.fillBlanksScore + judgeCount * row.judgeScore + briefCount * row.briefAnswerScore
this.setInfo({
id: row.id,
paperName: row.name,
totalDuration: row.duration
totalDuration: row.duration,
score: totalScore
})
this.$router.push('show')
}).catch(err => {})
}
}).catch(err => {})
},
copy(row){
this.$post(`${this.api.copyPaper}?id=${row.id}`).then(res => {
util.successMsg('复制成功');
util.successMsg('复制成功')
this.getData()
}).catch(res => {})
},

@ -1,7 +1,7 @@
/**
* @description 鉴权指令
* 当传入的权限当前用户没有时会移除该组件
* 用例<Tag v-auth">text</Tag> 或者:<Tag v-auth="'user:编辑'">text</Tag>
* 用例<Tag v-auth>text</Tag> <Tag v-auth="'user:'">text</Tag>
* */
import store from '@/store'
import Setting from '@/setting'

@ -15,7 +15,7 @@ const Setting = {
// 页面切换时,是否显示模拟的进度条
showProgressBar: true,
// 接口请求地址
// apiBaseURL: env === 'development' ? 'http://192.168.31.152:8001' : 'http://39.108.250.202:8000/',
// apiBaseURL: env === 'development' ? 'http://192.168.31.151:8001' : 'http://39.108.250.202:8000/',
apiBaseURL: env === 'development' ? 'http://39.108.250.202:9000' : 'http://39.108.250.202:9000',
// 接口请求返回错误时,弹窗的持续时间,单位:秒
modalDuration: 3,

@ -48,7 +48,8 @@ export default {
],
id: '',
paperName: '',
totalDuration: ''
totalDuration: '',
score: 100
},
getters: {
getStatusName: state => id => {
@ -69,6 +70,7 @@ export default {
state.id = info.id
state.paperName = info.paperName
state.totalDuration = info.totalDuration
state.score = info.score
},
},
actions: {

Loading…
Cancel
Save