+
序号:{{index+1}}
@@ -101,7 +101,7 @@ export default {
'userId'
]),
...mapState('testpaper', [
- 'id','paperName','totalDuration'
+ 'id','paperName','totalDuration','score'
])
},
mounted() {
diff --git a/src/libs/util.js b/src/libs/util.js
index 8e0538e..ec9d3bf 100644
--- a/src/libs/util.js
+++ b/src/libs/util.js
@@ -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) {
diff --git a/src/pages/achievement/list/examResults.vue b/src/pages/achievement/list/examResults.vue
index d9488e1..9f4c6bd 100644
--- a/src/pages/achievement/list/examResults.vue
+++ b/src/pages/achievement/list/examResults.vue
@@ -10,7 +10,7 @@
-
+
@@ -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
diff --git a/src/pages/achievement/list/practiceResults.vue b/src/pages/achievement/list/practiceResults.vue
index 53dcdf9..6f44508 100644
--- a/src/pages/achievement/list/practiceResults.vue
+++ b/src/pages/achievement/list/practiceResults.vue
@@ -10,7 +10,7 @@
-
+
@@ -58,11 +58,11 @@
-
+
@@ -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
},
diff --git a/src/pages/achievement/list/wrongBook.vue b/src/pages/achievement/list/wrongBook.vue
index 181ee3a..d75224e 100644
--- a/src/pages/achievement/list/wrongBook.vue
+++ b/src/pages/achievement/list/wrongBook.vue
@@ -10,13 +10,13 @@
-
+
-
+
@@ -40,7 +40,11 @@
-
+
+
+
+
+
@@ -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, {
diff --git a/src/pages/assessment/list/index.vue b/src/pages/assessment/list/index.vue
index 9792a1d..314fdea 100644
--- a/src/pages/assessment/list/index.vue
+++ b/src/pages/assessment/list/index.vue
@@ -10,14 +10,14 @@
-
-
+
-
-
+
@@ -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(){
diff --git a/src/pages/assessment/list/studentTree.vue b/src/pages/assessment/list/studentTree.vue
index 52b6911..0746020 100644
--- a/src/pages/assessment/list/studentTree.vue
+++ b/src/pages/assessment/list/studentTree.vue
@@ -7,7 +7,7 @@
- {{item.label}}班
+ {{item.label}}