提交 71ee1385 authored 作者: lihuihui's avatar lihuihui

update: 修改批阅考试

上级 ddc37847
...@@ -61,6 +61,7 @@ ...@@ -61,6 +61,7 @@
:class="item.id === $route.query.stu_id ? 'active' : ''" :class="item.id === $route.query.stu_id ? 'active' : ''"
v-for="(item, index) in studentList" v-for="(item, index) in studentList"
:key="index" :key="index"
@click="selectStudent(item)"
> >
{{ item.name }} {{ item.name }}
</li> </li>
...@@ -121,6 +122,9 @@ export default { ...@@ -121,6 +122,9 @@ export default {
clearInterval(this.cacheAnswerTime) // 停止缓存 clearInterval(this.cacheAnswerTime) // 停止缓存
}, },
methods: { methods: {
selectStudent(item) {
this.getTopic(item.sheet_id)
},
change() { change() {
this.studentList = JSON.parse(window.localStorage.examStudentsList) this.studentList = JSON.parse(window.localStorage.examStudentsList)
if (this.selectValue !== 0) { if (this.selectValue !== 0) {
...@@ -128,8 +132,8 @@ export default { ...@@ -128,8 +132,8 @@ export default {
} }
}, },
// 获取考卷 // 获取考卷
getTopic() { getTopic(sheetId) {
api.getReviewDetails({ sheet_id: this.$route.query.sheet_id }).then(response => { api.getReviewDetails({ sheet_id: sheetId || this.$route.query.sheet_id }).then(response => {
this.data = JSON.parse(response.data).sheet this.data = JSON.parse(response.data).sheet
}) })
}, },
......
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
</el-select> </el-select>
</div> </div>
<ul> <ul>
<li :class="item.id === $route.query.stu_id ? 'active' : ''" v-for="(item, index) in studentList" :key="index">{{ item.name }}</li> <li @click="selectStudent(item)" :class="item.id === $route.query.stu_id ? 'active' : ''" v-for="(item, index) in studentList" :key="index">{{ item.name }}</li>
</ul> </ul>
</div> </div>
</template> </template>
...@@ -119,6 +119,9 @@ export default { ...@@ -119,6 +119,9 @@ export default {
clearInterval(this.cacheAnswerTime) // 停止缓存 clearInterval(this.cacheAnswerTime) // 停止缓存
}, },
methods: { methods: {
selectStudent(item) {
this.getTopic(item.sheet_id)
},
change() { change() {
this.studentList = JSON.parse(window.localStorage.testStudentsList) this.studentList = JSON.parse(window.localStorage.testStudentsList)
if (this.selectValue !== 0) { if (this.selectValue !== 0) {
...@@ -126,8 +129,8 @@ export default { ...@@ -126,8 +129,8 @@ export default {
} }
}, },
// 获取考卷 // 获取考卷
getTopic() { getTopic(sheetId) {
api.getReviewDetails({ sheet_id: this.$route.query.sheet_id, type: 'chapter' }).then(response => { api.getReviewDetails({ sheet_id: sheetId || this.$route.query.sheet_id, type: 'chapter' }).then(response => {
this.data = JSON.parse(response.data).sheet this.data = JSON.parse(response.data).sheet
}) })
}, },
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论