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. 20
      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. 27
      src/pages/index/list/index.vue
  12. 28
      src/pages/practice/list/index.vue
  13. 22
      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. 71
      src/pages/system/list/staff.vue
  24. 65
      src/pages/testPaper/add/index.vue
  25. 56
      src/pages/testPaper/list/allTestPaper.vue
  26. 101
      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="metas">
<div class="m-r-20"> <div class="m-r-20">
<span class="name">总分</span> <span class="name">总分</span>
<span class="val">100</span> <span class="val">{{score === undefined ? 100 : score}}</span>
</div> </div>
<div v-if="totalDuration !== ''"> <div v-if="totalDuration !== ''">
<span class="name">考试时长</span> <span class="name">考试时长</span>
@ -23,7 +23,7 @@
<div class="wrap"> <div class="wrap">
<div class="item" v-for="(item,index) in curType" :key="index"> <div class="item" v-for="(item,index) in curType" :key="index">
<div class="type"> <div class="type yet">
<span>序号{{index+1}}</span> <span>序号{{index+1}}</span>
</div> </div>
<div class="inner"> <div class="inner">
@ -101,7 +101,7 @@ export default {
'userId' 'userId'
]), ]),
...mapState('testpaper', [ ...mapState('testpaper', [
'id','paperName','totalDuration' 'id','paperName','totalDuration','score'
]) ])
}, },
mounted() { mounted() {

@ -106,15 +106,15 @@ const util = {
}, },
// 成功提示 // 成功提示
successMsg(message) { 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) { 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) { 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) { ellipsisStr(str) {

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

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

@ -10,13 +10,13 @@
</li> </li>
<li v-if="type == 2"> <li v-if="type == 2">
<label>练习名称</label> <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-option v-for="(item,index) in nameList" :key="index" :label="item.practiseName" :value="item.practiseId"></el-option>
</el-select> </el-select>
</li> </li>
<li v-else> <li v-else>
<label>考试名称</label> <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-option v-for="(item,index) in nameList" :key="index" :label="item.assessmentName" :value="item.id"></el-option>
</el-select> </el-select>
</li> </li>
@ -40,7 +40,11 @@
</el-table-column> </el-table-column>
<el-table-column prop="paperName" label="试卷名称" align="center"></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="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 prop="wrongNum" 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">
@ -148,7 +152,7 @@ export default {
keyword: function(val) { keyword: function(val) {
clearTimeout(this.searchTimer) clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => { this.searchTimer = setTimeout(() => {
this.getData() this.initData()
},500) },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}`) 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 = 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.total = res.data.list.totalCount
}).catch(err => {}) }).catch(err => {})
}, },
initData(){
this.page = 1
this.getData()
},
getName() { getName() {
if(this.type == 1){ if(this.type == 1){
this.$get(this.api.queryAssessment, { this.$get(this.api.queryAssessment, {

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

@ -7,7 +7,7 @@
<div class="item" @click.stop="open(item)"> <div class="item" @click.stop="open(item)">
<i class="empty"></i> <i class="empty"></i>
<i :class="item.ischeck ? 'checked' : 'checkbox'" @click.stop="fircheckitem(item)"></i> <i :class="item.ischeck ? 'checked' : 'checkbox'" @click.stop="fircheckitem(item)"></i>
<span>{{item.label}}</span> <span>{{item.label}}</span>
</div> </div>
</div> </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/> <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 v-else class="empty"></i>
<i :class="item2.ischeck ? 'checked' : 'checkbox'" @click.stop="threecheckitem(item2)"></i> <i :class="item2.ischeck ? 'checked' : 'checkbox'" @click.stop="threecheckitem(item2)"></i>
<span>{{item2.label}}</span> <span>{{item2.label}}</span>
</div> </div>
<div v-show="item2.ifVisible" v-if="item2.children&&item2.children.length!=0"> <div v-show="item2.ifVisible" v-if="item2.children&&item2.children.length!=0">
@ -95,13 +95,17 @@ export default {
}, },
methods: { methods: {
fuzzyQuery(){ fuzzyQuery(){
let list = this.allClassList if(this.keyword){
let result = [] let list = this.allClassList
let result = []
list.map((n,i) => { list.map((n,i) => {
if(n.label.includes(this.keyword)) result.push(n) if(n.label.includes(this.keyword)) result.push(n)
}) })
this.classList = result this.classList = result
}else{
this.classList = []
}
}, },
// //
open(item) { open(item) {

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

@ -50,7 +50,7 @@
<ul class="filter"> <ul class="filter">
<li> <li>
<label>批阅状态</label> <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 label="不限" value=""></el-option>
<el-option v-for="(item,index) in reviewStatusList" :key="index" :label="item.name" :value="item.id"></el-option> <el-option v-for="(item,index) in reviewStatusList" :key="index" :label="item.name" :value="item.id"></el-option>
</el-select> </el-select>
@ -89,7 +89,7 @@
<el-table-column label="操作" width="100"> <el-table-column label="操作" width="100">
<template slot-scope="scope"> <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,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> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -155,7 +155,7 @@ export default {
keyword: function(val) { keyword: function(val) {
clearTimeout(this.searchTimer) clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => { this.searchTimer = setTimeout(() => {
this.getData() this.initData()
},500) },500)
} }
}, },
@ -164,8 +164,7 @@ export default {
'setReviewInfo' 'setReviewInfo'
]), ]),
getData() { getData() {
this.$post(`${this.api.reviewList}?pageNum=${this.page}&pageSize=${10000}&userId=${this.userId}&assessmentId=${this.id}&keyword=${this.keyword}&state=${this.state}`) this.$post(`${this.api.reviewList}?pageNum=${this.page}&pageSize=${10000}&userId=${this.userId}&assessmentId=${this.id}&keyword=${this.keyword}&state=${this.state}`).then(res => {
.then(res => {
let list = res.data.list.list let list = res.data.list.list
let result = [] let result = []
list.map(n => { list.map(n => {
@ -176,8 +175,11 @@ export default {
this.listDataAll = result this.listDataAll = result
this.total = result.length this.total = result.length
this.handlePage() this.handlePage()
}) }).catch(err => {})
.catch(err => {}) },
initData(){
this.page = 1
this.getData()
}, },
handlePage(){ handlePage(){
let list = this.listDataAll let list = this.listDataAll

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

@ -6,16 +6,15 @@
<a class="item active">我的考试计划</a> <a class="item active">我的考试计划</a>
</div> </div>
<div class="page-content"> <div class="page-content">
<div class="tool">
<ul class="filter">
<li>
<label>创建时间</label>
<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 size="small"></el-date-picker>
</li>
</ul>
</div>
<template v-if="listData.length"> <template v-if="listData.length">
<div class="tool">
<ul class="filter">
<li>
<label>创建时间</label>
<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 size="small"></el-date-picker>
</li>
</ul>
</div>
<el-table :data="listData" ref="table" row-key="id" class="table" stripe header-align="center"> <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"> <el-table-column type="index" width="100" label="序号" align="center">
<template <template
@ -182,7 +181,7 @@ export default {
this.startTime = '' this.startTime = ''
this.endTime = '' this.endTime = ''
} }
this.getData() this.initData()
} }
}, },
components: { components: {
@ -190,8 +189,8 @@ export default {
breadcrumb breadcrumb
}, },
mounted() { mounted() {
let now = util.formatDate('yyyy-MM-dd') 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() + 86400000)) let second = util.formatDate('yyyy-MM-dd',new Date(new Date().getTime() + 1296000000))
this.date = [now,second] this.date = [now,second]
this.startTime = now this.startTime = now
this.endTime = second this.endTime = second
@ -221,6 +220,10 @@ export default {
this.total = res.data.list.totalCount this.total = res.data.list.totalCount
}).catch(err => {}) }).catch(err => {})
}, },
initData(){
this.page = 1
this.getData()
},
handleCurrentChange(val) { handleCurrentChange(val) {
this.page = val this.page = val
this.getData() this.getData()

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

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

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

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

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

@ -4,14 +4,14 @@
<ul class="filter"> <ul class="filter">
<li> <li>
<label>创建人</label> <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 label="不限" value=""></el-option>
<el-option v-for="(item,index) in createUserList" :key="index" :label="item.name" :value="item.name"></el-option> <el-option v-for="(item,index) in createUserList" :key="index" :label="item.name" :value="item.name"></el-option>
</el-select> </el-select>
</li> </li>
<li> <li>
<label>题目类型</label> <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 label="不限" value=""></el-option>
<el-option v-for="(item,index) in typeList" :key="index" :label="item.name" :value="item.name"></el-option> <el-option v-for="(item,index) in typeList" :key="index" :label="item.name" :value="item.name"></el-option>
</el-select> </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 :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="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 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="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="所属题库" min-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-column>
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
<el-pagination background @current-change="handleCurrentChange" :current-page="page" layout="total, prev, pager, next" :total="total"> <el-pagination background @current-change="handleCurrentChange" :current-page="page" layout="total, prev, pager, next" :total="total"></el-pagination>
</el-pagination>
</div> </div>
<el-dialog title="查看题目" :visible.sync="visible" width="870px" class="dialog" :close-on-click-modal="false"> <el-dialog title="查看题目" :visible.sync="visible" width="870px" class="dialog" :close-on-click-modal="false">
@ -138,7 +141,7 @@ export default {
keyword: function(val) { keyword: function(val) {
clearTimeout(this.searchTimer) clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => { this.searchTimer = setTimeout(() => {
this.getData() this.initData()
},500) },500)
} }
}, },
@ -153,22 +156,35 @@ export default {
schoolId: this.clientId schoolId: this.clientId
}) })
.then(res => { .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.total = res.data.list.totalCount
if(!this.listData.length && this.total){
this.page--
this.getData()
}
}) })
.catch(err => {}) .catch(err => {})
}, },
initData(){
this.page = 1
this.getData()
},
getType() { getType() {
this.$get(this.api.typesList).then(res => { this.$get(this.api.typesList).then(res => {
this.typeList = res.data.list this.typeList = res.data.list
}).catch(err => {}) }).catch(err => {})
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.page = val; this.page = val
this.getData(); this.$refs.table.clearSelection()
this.getData()
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val; this.multipleSelection = val
}, },
disabledSelection(row,index){ disabledSelection(row,index){
if(row.createUser == '超竞教育') return false if(row.createUser == '超竞教育') return false
@ -222,7 +238,8 @@ export default {
pageNum: 1, pageNum: 1,
pageSize: 10000, pageSize: 10000,
schoolId: this.clientId, schoolId: this.clientId,
source: 2 source: 2,
keyword: ''
} }
this.$post(this.api.listByPage,data).then(res => { this.$post(this.api.listByPage,data).then(res => {
let list = res.data.list.list let list = res.data.list.list
@ -325,6 +342,9 @@ export default {
max-width: calc(100% - 80px); max-width: calc(100% - 80px);
font-size: 16px; font-size: 16px;
color: rgba(0, 0, 0, 0.65); color: rgba(0, 0, 0, 0.65);
/deep/img{
max-width: 100%;
}
} }
} }
} }

@ -4,7 +4,7 @@
<ul class="filter"> <ul class="filter">
<li> <li>
<label>题目类型</label> <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 label="不限" value=""></el-option>
<el-option v-for="(item,index) in typeList" :key="index" :label="item.name" :value="item.name"></el-option> <el-option v-for="(item,index) in typeList" :key="index" :label="item.name" :value="item.name"></el-option>
</el-select> </el-select>
@ -27,7 +27,11 @@
<el-table-column type="index" width="60" label="序号" align="center"> <el-table-column type="index" width="60" label="序号" align="center">
<template slot-scope="scope">{{scope.$index + (page - 1) * pageSize + 1}}</template> <template slot-scope="scope">{{scope.$index + (page - 1) * pageSize + 1}}</template>
</el-table-column> </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="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="所属题库" min-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) { keyword: function(val) {
clearTimeout(this.searchTimer) clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => { this.searchTimer = setTimeout(() => {
this.getData() this.initData()
},500) },500)
} }
}, },
@ -171,11 +175,23 @@ export default {
schoolId: this.clientId schoolId: this.clientId
}) })
.then(res => { .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.total = res.data.list.totalCount
if(!this.listData.length && this.total){
this.page--
this.getData()
}
}) })
.catch(err => {}) .catch(err => {})
}, },
initData(){
this.page = 1
this.getData()
},
getType() { getType() {
this.$get(this.api.typesList) this.$get(this.api.typesList)
.then(res => { .then(res => {
@ -185,6 +201,7 @@ export default {
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.page = val this.page = val
this.$refs.table.clearSelection()
this.getData() this.getData()
}, },
dialogGetData(){ dialogGetData(){
@ -207,7 +224,8 @@ export default {
pageNum: 1, pageNum: 1,
pageSize: 10000, pageSize: 10000,
schoolId: this.clientId, schoolId: this.clientId,
source: 2 source: 2,
keyword: ''
} }
this.$post(this.api.listByPage,data).then(res => { this.$post(this.api.listByPage,data).then(res => {
let list = res.data.list.list let list = res.data.list.list
@ -461,6 +479,9 @@ export default {
max-width: calc(100% - 80px); max-width: calc(100% - 80px);
font-size: 16px; font-size: 16px;
color: rgba(0, 0, 0, 0.65); color: rgba(0, 0, 0, 0.65);
/deep/img{
max-width: 100%;
}
} }
} }
} }

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

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

@ -94,7 +94,7 @@
</span> </span>
</el-dialog> </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}"> <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-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"> <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) { keyword: function(val) {
clearTimeout(this.searchTimer) clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => { this.searchTimer = setTimeout(() => {
this.getData() this.initData()
},500) },500)
} }
}, },
@ -276,11 +276,19 @@ export default {
this.$get(`${this.api.queryStudent}/${this.page}/${this.pageSize}`,data).then(res => { this.$get(`${this.api.queryStudent}/${this.page}/${this.pageSize}`,data).then(res => {
this.listData = res.data.studentList.list this.listData = res.data.studentList.list
this.total = res.data.studentList.totalCount this.total = res.data.studentList.totalCount
if(!this.listData.length && this.total){
this.page--
this.getData()
}
}).catch(res => {}) }).catch(res => {})
}, },
initData(){
this.page = 1
this.getData()
},
orgChange(node){ orgChange(node){
this.classIds = node.map(n => n[2]).toString() this.classIds = node.map(n => n[2]).toString()
this.getData() this.initData()
}, },
closestudent(){ closestudent(){
this.$refs.studentForm.resetFields() this.$refs.studentForm.resetFields()
@ -314,7 +322,10 @@ export default {
}).catch(res => {}); }).catch(res => {});
}, },
resetPassword(row){ resetPassword(row){
this.$confirm(`重置后的密码为:${Setting.initialPassword},确定重置?`, '提示',).then(() => { this.$confirm(`重置后的密码为:${Setting.initialPassword},确定重置?`, '提示', {
type: 'info',
customClass: 'normal'
}).then(() => {
let data = { let data = {
userId: row.userId, userId: row.userId,
password: Setting.initialPassword password: Setting.initialPassword
@ -465,7 +476,7 @@ export default {
studentIds: delList.join() studentIds: delList.join()
} }
this.$del(this.api.deleteStudents,data).then(res => { this.$del(this.api.deleteStudents,data).then(res => {
this.multipleSelection = [] this.$refs.table.clearSelection()
util.successMsg('删除成功') util.successMsg('删除成功')
this.getData() this.getData()
}).catch(res => {}); }).catch(res => {});
@ -482,8 +493,9 @@ export default {
this.getData() this.getData()
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.page = val; this.page = val
this.getData(); this.$refs.table.clearSelection()
this.getData()
}, },
downLoad(){ downLoad(){
location.href = this.api.downloadStudentTemp location.href = this.api.downloadStudentTemp
@ -524,6 +536,9 @@ export default {
this.uploadList = fileList this.uploadList = fileList
this.uploadFaild = false this.uploadFaild = false
}, },
closeImport(){
this.uploadList = []
},
uploadSure(){ uploadSure(){
this.importVisible = false this.importVisible = false
this.page = 1 this.page = 1

@ -13,7 +13,7 @@
</div> </div>
</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="selection" width="80" 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">
</el-table-column> </el-table-column>
@ -35,7 +35,7 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination"> <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> </el-pagination>
</div> </div>
@ -88,9 +88,9 @@ export default {
children: 'children', children: 'children',
label: 'name' label: 'name'
}, },
pageNo: 1, page: 1,
pageSize: 10, pageSize: 10,
totals: 0, total: 0,
multipleSelection: [], multipleSelection: [],
importVisible: false, importVisible: false,
isAdd: true, isAdd: true,
@ -109,7 +109,7 @@ export default {
keyword: function(val) { keyword: function(val) {
clearTimeout(this.searchTimer) clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => { this.searchTimer = setTimeout(() => {
this.getData() this.initData()
},500) },500)
} }
}, },
@ -124,11 +124,19 @@ export default {
if(this.keyword.length){ if(this.keyword.length){
data.name = this.keyword 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.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 => {}); }).catch(res => {});
}, },
initData(){
this.page = 1
this.getData()
},
closeRole(){ closeRole(){
this.isDetail = false this.isDetail = false
this.form = { this.form = {
@ -140,8 +148,9 @@ export default {
this.permissions = [] this.permissions = []
}, },
currentChange(val) { currentChange(val) {
this.pageNo = val; this.page = val
this.getData(); this.$refs.table.clearSelection()
this.getData()
}, },
getPer(){ getPer(){
if(!this.permissions.length){ if(!this.permissions.length){
@ -253,13 +262,14 @@ export default {
.then(() => { .then(() => {
this.$del(`${this.api.removeRole}?roleIds=${delList.join()}`).then(res => { this.$del(`${this.api.removeRole}?roleIds=${delList.join()}`).then(res => {
if(res.success){ if(res.success){
util.successMsg('删除成功'); this.$refs.table.clearSelection()
util.successMsg('删除成功')
this.getData() this.getData()
} }
}).catch(res => {}) }).catch(res => {})
}).catch(() => {}); }).catch(() => {});
}else{ }else{
util.errorMsg('请先选择数据 !'); util.errorMsg('请先选择数据 !')
} }
} }
} }

@ -18,7 +18,7 @@
</div> </div>
</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="selection" width="80" align="center"></el-table-column>
<el-table-column type="index" label="序号" width="55" align="center"> <el-table-column type="index" label="序号" width="55" align="center">
</el-table-column> </el-table-column>
@ -51,7 +51,7 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination"> <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> </el-pagination>
</div> </div>
@ -147,7 +147,7 @@
</ul> </ul>
</el-dialog> </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}"> <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-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"> <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: [], listData: [],
importVisible: false, importVisible: false,
keyword: '', keyword: '',
pageNo: 1, page: 1,
pageSize: 10, pageSize: 10,
total: 0, total: 0,
departmentList: [], departmentList: [],
@ -334,32 +334,32 @@ export default {
}, },
getData(){ getData(){
let totalPage = Math.ceil((this.total - 1) / this.pageSize) let totalPage = Math.ceil((this.total - 1) / this.pageSize)
let currentPage = this.pageNo > totalPage ? totalPage : this.pageNo let currentPage = this.page > totalPage ? totalPage : this.page
this.pageNo = currentPage < 1 ? 1 : currentPage this.page = currentPage < 1 ? 1 : currentPage
let data = { let data = {
staffProfessionalArchitectureIds: this.oneDepartmentIds, staffProfessionalArchitectureIds: this.oneDepartmentIds,
staffGradeIds: this.twoDepartmentIds, staffGradeIds: this.twoDepartmentIds,
searchContent: this.keyword, searchContent: this.keyword,
schoolId: this.clientId, schoolId: this.clientId,
pageNum: this.pageNo, pageNum: this.page,
pageSize: this.pageSize 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.listData = res.data.staffList.list
this.total = res.data.staffList.totalCount this.total = res.data.staffList.totalCount
if(!this.listData.length && this.total){ if(!this.listData.length && this.total){
this.pageNo-- this.page--
this.getData() this.getData()
} }
}).catch(res => {}); }).catch(res => {})
}, },
initData(){ initData(){
this.pageNo = 1 this.page = 1
this.getData() this.getData()
}, },
orgChange(node){ orgChange(node){
this.twoDepartmentIds = node.map(n => n[1]).toString() this.twoDepartmentIds = node.map(n => n[1]).toString()
this.getData() this.initData()
}, },
getRoles(){ getRoles(){
let data = { let data = {
@ -367,24 +367,25 @@ export default {
} }
this.$get(`${this.api.queryRoles}/1/100`,data).then(res => { this.$get(`${this.api.queryRoles}/1/100`,data).then(res => {
this.roleList = res.data.items this.roleList = res.data.items
}).catch(res => {}); }).catch(res => {})
}, },
resetPassword(row){ resetPassword(row){
this.$confirm(`重置后的密码为:${Setting.initialPassword},确定重置?`, '提示', { this.$confirm(`重置后的密码为:${Setting.initialPassword},确定重置?`, '提示', {
}).then(() => { type: 'info',
let data = { customClass: 'normal'
userId: row.userId, }).then(() => {
password: Setting.initialPassword let data = {
userId: row.userId,
password: Setting.initialPassword
}
this.$post(this.api.userinfoUpdate,data).then(res => {
if(res.success){
util.successMsg('重置成功')
}else{
util.errorMsg('重置失败')
} }
this.$post(this.api.userinfoUpdate,data).then(res => { }).catch(res => {})
if(res.success){ }).catch(() => {})
util.successMsg('重置成功')
}else{
util.errorMsg('重置失败')
}
}).catch(res => {});
}).catch(() => {
});
}, },
accountChange(){ accountChange(){
if(this.teacherForm.userAccount !== this.originalAccount){ if(this.teacherForm.userAccount !== this.originalAccount){
@ -395,7 +396,7 @@ export default {
}else{ }else{
this.accountRepeat = false this.accountRepeat = false
} }
}).catch(res => {}); }).catch(res => {})
}else{ }else{
this.accountRepeat = false this.accountRepeat = false
} }
@ -409,7 +410,7 @@ export default {
}else{ }else{
this.workNumberRepeat = false this.workNumberRepeat = false
} }
}).catch(res => {}); }).catch(res => {})
}else{ }else{
this.workNumberRepeat = false this.workNumberRepeat = false
} }
@ -573,7 +574,7 @@ export default {
staffIds: delList.join(',') staffIds: delList.join(',')
} }
this.$del(this.api.deleteStaffs,data).then(res => { this.$del(this.api.deleteStaffs,data).then(res => {
this.multipleSelection = []; this.$refs.table.clearSelection()
util.successMsg('删除成功') util.successMsg('删除成功')
this.getData() this.getData()
}).catch(res => {}); }).catch(res => {});
@ -588,12 +589,13 @@ export default {
this.uploadFaild = false this.uploadFaild = false
}, },
searchTeacher(){ searchTeacher(){
this.pageNo = 1; this.page = 1
this.getData() this.getData()
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.pageNo = val; this.page = val
this.getData(); this.$refs.table.clearSelection()
this.getData()
}, },
downLoad(){ downLoad(){
location.href = this.api.downloadStaffTemp location.href = this.api.downloadStaffTemp
@ -634,9 +636,12 @@ export default {
this.uploadList = fileList this.uploadList = fileList
this.uploadFaild = false this.uploadFaild = false
}, },
closeImport(){
this.uploadList = []
},
uploadSure(){ uploadSure(){
this.importVisible = false this.importVisible = false
this.pageNo = 1 this.page = 1
this.keyword = '' this.keyword = ''
this.getData() 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="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 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" 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="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="courses" label="对应课程" min-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>
@ -120,28 +124,28 @@
<ul class="filter"> <ul class="filter">
<li> <li>
<label>课程名称</label> <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 label="不限" value=""></el-option>
<el-option v-for="(item,index) in courseList" :key="index" :label="item.courses" :value="item.courses"></el-option> <el-option v-for="(item,index) in courseList" :key="index" :label="item.courses" :value="item.courses"></el-option>
</el-select> </el-select>
</li> </li>
<li> <li>
<label>知识点</label> <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 label="不限" value=""></el-option>
<el-option v-for="(item,index) in pointList" :key="index" :label="item.knowledgePoint" :value="item.knowledgePoint"></el-option> <el-option v-for="(item,index) in pointList" :key="index" :label="item.knowledgePoint" :value="item.knowledgePoint"></el-option>
</el-select> </el-select>
</li> </li>
<li> <li>
<label>试题类型</label> <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 label="不限" value=""></el-option>
<el-option v-for="(item,index) in nameList" :key="index" :label="item.name" :value="item.name"></el-option> <el-option v-for="(item,index) in nameList" :key="index" :label="item.name" :value="item.name"></el-option>
</el-select> </el-select>
</li> </li>
<li> <li>
<label>所属题库</label> <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 label="不限" value=""></el-option>
<el-option v-for="(item,index) in quesBankList" :key="index" :label="item.typeName" :value="item.typeName"></el-option> <el-option v-for="(item,index) in quesBankList" :key="index" :label="item.typeName" :value="item.typeName"></el-option>
</el-select> </el-select>
@ -161,7 +165,11 @@
>{{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" 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="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>
@ -170,14 +178,7 @@
<el-table-column prop="createUser" label="创建人" align="center"></el-table-column> <el-table-column prop="createUser" label="创建人" align="center"></el-table-column>
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
<el-pagination <el-pagination background @current-change="handleCurrentChange" :current-page="page" :page-size="pageSize" layout="total,prev, pager, next" :total="total"></el-pagination>
background
@current-change="handleCurrentChange"
:current-page="page"
:page-size="pageSize"
layout="total,prev, pager, next"
:total="total"
></el-pagination>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
@ -379,7 +380,7 @@ export default {
keyword: function(val) { keyword: function(val) {
clearTimeout(this.searchTimer) clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => { this.searchTimer = setTimeout(() => {
this.getManualData() this.initData()
},500) },500)
} }
}, },
@ -419,7 +420,11 @@ 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 = 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() this.computeTypeCount()
}) })
.catch(err => {}) .catch(err => {})
@ -505,11 +510,19 @@ export default {
userId: this.userId, userId: this.userId,
} }
this.$post(this.api.pageByChoiceList,data).then(res => { 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.total = res.data.list.totalCount
this.$refs.listTable.clearSelection() this.$refs.listTable.clearSelection()
}).catch(err => {}) }).catch(err => {})
}, },
initData(){
this.page = 1
this.getManualData()
},
disabledSelection(row,index){ disabledSelection(row,index){
let selectedData = this.selectedData let selectedData = this.selectedData
if(selectedData.find(n => n.id == row.id)) return false if(selectedData.find(n => n.id == row.id)) return false
@ -539,11 +552,11 @@ export default {
}, },
preview(){ preview(){
if(!this.selectedData.length) return util.errorMsg('请先添加试题') if(!this.selectedData.length) return util.errorMsg('请先添加试题')
this.$post(`${this.api.previewPaper}?qid=${this.selectedData.map(n => n.id).join(',')}`) this.$post(`${this.api.previewPaper}?qid=${this.selectedData.map(n => n.id).join(',')}`).then(res => {
.then(res => {
this.setInfo({ this.setInfo({
paperName: this.name, paperName: this.name,
totalDuration: this.duration totalDuration: this.duration,
score: this.totalScore ? this.totalScore : 0
}) })
this.previewIndex++ this.previewIndex++
this.previewList = res.data this.previewList = res.data
@ -558,12 +571,12 @@ export default {
this.multipleSelection = val this.multipleSelection = val
}, },
getSelectFilter(){ getSelectFilter(){
this.$post(`${this.api.getSelectInfo}?type=1`) this.$post(`${this.api.getSelectInfo}?type=1&schoolId=${this.clientId}`)
.then(res => { .then(res => {
this.pointList = res.data.pointList this.pointList = res.data.pointList
}).catch(err => {}) }).catch(err => {})
this.$post(`${this.api.getSelectInfo}?type=2`) this.$post(`${this.api.getSelectInfo}?type=2&schoolId=${this.clientId}`)
.then(res => { .then(res => {
this.courseList = res.data.pointList this.courseList = res.data.pointList
}).catch(err => {}) }).catch(err => {})
@ -952,22 +965,20 @@ export default {
color: #444; color: #444;
font-size: 12px; font-size: 12px;
input{ input{
width: 80px; width: 56px;
height: 30px; height: 30px;
padding: 0 10px; padding: 0 10px;
margin: 0 10px; margin: 0 10px;
line-height: 30px; line-height: 30px;
border: 1px solid #e8e8e8; border: 1px solid rgba(0, 0, 0, 0.15);
border-radius: 4px;
background-color: #fff; background-color: #fff;
box-sizing: border-box; box-sizing: border-box;
&:focus{ &:focus{
outline: none; outline: none;
} }
&:disabled{ &:disabled{
width: 56px;
background-color: rgba(0, 0, 0, 0.04); background-color: rgba(0, 0, 0, 0.04);
border: 1px solid rgba(0, 0, 0, 0.15);
border-radius: 4px;
cursor: not-allowed; cursor: not-allowed;
} }
} }

@ -4,21 +4,21 @@
<ul class="filter"> <ul class="filter">
<li> <li>
<label>所属课程</label> <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 label="不限" value=""></el-option>
<el-option v-for="(item,index) in courseList" :key="index" :label="item.courses" :value="item.courses"></el-option> <el-option v-for="(item,index) in courseList" :key="index" :label="item.courses" :value="item.courses"></el-option>
</el-select> </el-select>
</li> </li>
<li> <li>
<label>试卷状态</label> <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 label="不限" value=""></el-option>
<el-option v-for="(item,index) in statusList" :key="index" :label="item.name" :value="item.id"></el-option> <el-option v-for="(item,index) in statusList" :key="index" :label="item.name" :value="item.id"></el-option>
</el-select> </el-select>
</li> </li>
<li> <li>
<label>试卷用途</label> <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 label="不限" value=""></el-option>
<el-option v-for="(item,index) in effectList" :key="index" :label="item.label" :value="item.id"></el-option> <el-option v-for="(item,index) in effectList" :key="index" :label="item.label" :value="item.id"></el-option>
</el-select> </el-select>
@ -117,7 +117,7 @@ export default {
keyword: function(val) { keyword: function(val) {
clearTimeout(this.searchTimer) clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => { this.searchTimer = setTimeout(() => {
this.getData() this.initData()
},500) },500)
}, },
date: function(val){ date: function(val){
@ -128,7 +128,7 @@ export default {
this.startTime = '' this.startTime = ''
this.endTime = '' this.endTime = ''
} }
this.getData() this.initData()
} }
}, },
methods: { methods: {
@ -153,8 +153,16 @@ export default {
.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
if(!this.listData.length && this.total){
this.page--
this.getData()
}
}).catch(err => {}) }).catch(err => {})
}, },
initData(){
this.page = 1
this.getData()
},
handleSelecteChange(val){ handleSelecteChange(val){
this.multipleSelection = val; this.multipleSelection = val;
}, },
@ -200,9 +208,9 @@ export default {
data.briefAnswerNum = briefCount data.briefAnswerNum = briefCount
this.$post(this.api.modifyState,data).then(res => { this.$post(this.api.modifyState,data).then(res => {
if(row.effect){ if(row.effect){
util.successMsg(`练习${row.name}”已成功发布,请于练习管理列表中查看`) util.successMsg(`${row.name}”已发布,您可在“ 练习管理>创建练习” 菜单中用此练习卷创建新的练习`)
}else{ }else{
util.successMsg(`考试${row.name}”已成功发布,请于考试管理列表中查看`) util.successMsg(`${row.name}”已发布,您可在 “考试管理>创建考试” 菜单中用此考试卷创建新的考试`)
} }
this.getData() this.getData()
}).catch(res => {}) }).catch(res => {})
@ -213,12 +221,34 @@ export default {
}).catch(err => {}) }).catch(err => {})
}, },
preview(row){ preview(row){
this.setInfo({ let totalScore = 100
id: row.id, this.$post(`${this.api.detailtestPaper}?id=${row.id}`).then(res => {
paperName: row.name, let qid = res.data.list.qid
totalDuration: row.duration if(qid){
}) let data = {
this.$router.push('show') 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,
score: totalScore
})
this.$router.push('show')
}).catch(err => {})
}
}).catch(err => {})
}, },
review(row){ review(row){
this.$router.push('review') this.$router.push('review')

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

@ -1,7 +1,7 @@
/** /**
* @description 鉴权指令 * @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 store from '@/store'
import Setting from '@/setting' import Setting from '@/setting'

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

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

Loading…
Cancel
Save