@@ -230,6 +239,9 @@
dialogType: "new",
workscopeOptions:[],
paperOptions:[],
+ currentPage: 1, // 当前页码
+ pageSize: 10, // 每页显示的条数
+ total: 0, // 总条数
rule1: {
name: [{ required: true, message: "请输入", trigger: "blur" }],
place: [{ required: true, message: "请输入", trigger: "change" }],
@@ -248,6 +260,7 @@
this.getList();
this.getCourseList();
this.getDepartmentList();
+ this.getUser();
},
methods: {
checkPermission,
@@ -268,16 +281,27 @@
this.listLoading = false;
});
},
+ handleSizeChange(val) {
+ // 改变每页显示的条数
+ this.pageSize = val;
+ this.getUser();
+ },
+ handleCurrentChange(val) {
+ // 改变当前页码
+ this.currentPage = val;
+ this.getUser();
+ },
getDepartmentList(){
getDepartment().then(response =>{
this.depOptions = response.data
return this.depOptions
})
},
- getUserList(){
- getUserList().then(response =>{
- this.userOptions = response.data
- console.log(this.userOptions)
+ getUser(){
+ getUserList({page: this.currentPage, size: this.pageSize}).then(response =>{
+ this.userOptions = response.data.results
+ this.total = response.data.total;
+ // console.log(this.userOptions)
})
},
getCourseList(){
diff --git a/client/src/views/exam/questions.vue b/client/src/views/exam/questions.vue
index 0180fe8..cb9456a 100644
--- a/client/src/views/exam/questions.vue
+++ b/client/src/views/exam/questions.vue
@@ -24,8 +24,12 @@
下载模板
-
+
上传导入
@@ -153,8 +157,9 @@ export default {
methods: {
checkPermission,
handleUploadSuccess(res, file) {
- if (res.code == 200) {
+ if (res.code == 201) {
const loading = this.$loading({ text: "正在导入中..." })
+ console.log(res.data);
importQuestion(res.data).then(response => {
loading.close()
if (response.code == 200) {
diff --git a/client/src/views/exam/testPaperCreate.vue b/client/src/views/exam/testPaperCreate.vue
index 6b0087e..6362044 100644
--- a/client/src/views/exam/testPaperCreate.vue
+++ b/client/src/views/exam/testPaperCreate.vue
@@ -45,7 +45,20 @@
选题信息
- 选择试题
+
+
+ 选择试题
+
+ 上传试题
+
+
+
+
+
+
+ {{ index+1 }} -
+ {{item.type}}
+ {{ item.name }}
+ (正确答案:{{item.right}})
+
+
{{ name }}: {{ value }}
+